Commit d4be77b4 authored by con's avatar con
Browse files

Reorder the "new" wizard categories.

parent 3061d7dc
......@@ -220,7 +220,7 @@ const char * const ICON_RESET = ":/core/images/reset.png";
const char * const ICON_MAGNIFIER = ":/core/images/magnifier.png";
const char * const ICON_TOGGLE_SIDEBAR = ":/core/images/sidebaricon.png";
const char * const WIZARD_CATEGORY_QT = "M.Qt";
const char * const WIZARD_CATEGORY_QT = "R.Qt";
const char * const WIZARD_TR_CATEGORY_QT = QT_TRANSLATE_NOOP("Core", "Qt");
const char * const SETTINGS_CATEGORY_CORE = "A.Core";
......
......@@ -207,7 +207,7 @@ bool CppPlugin::initialize(const QStringList & /*arguments*/, QString *errorMess
CppFileWizard::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setCategory(QLatin1String("C.C++"));
wizardParameters.setCategory(QLatin1String("O.C++"));
wizardParameters.setDisplayCategory(tr("C++"));
wizardParameters.setDisplayName(tr("C++ Class"));
wizardParameters.setId(QLatin1String("A.Class"));
......
......@@ -188,8 +188,9 @@ const char * const TASK_CATEGORY_COMPILE = "Task.Category.Compile";
const char * const TASK_CATEGORY_BUILDSYSTEM = "Task.Category.Buildsystem";
// Wizard category
const char * const PROJECT_WIZARD_CATEGORY = "R.Projects"; // (after Qt)
const char * const PROJECT_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("ProjectExplorer", "Projects");
const char * const PROJECT_WIZARD_CATEGORY = "I.Projects"; // (after Qt)
const char * const PROJECT_WIZARD_TR_SCOPE = "ProjectExplorer";
const char * const PROJECT_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");
} // namespace Constants
} // namespace ProjectExplorer
......
......@@ -29,6 +29,8 @@
#include "qmlnewprojectwizard.h"
#include "qmlprojectconstants.h"
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
......@@ -62,8 +64,9 @@ Core::BaseFileWizardParameters QmlNewProjectWizard::parameters()
parameters.setDisplayName(tr("QML Application"));
parameters.setId(QLatin1String("QA.QML Application"));
parameters.setDescription(tr("Creates a QML application."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
Constants::QML_WIZARD_TR_CATEGORY));
return parameters;
}
......
......@@ -52,6 +52,11 @@ const char *const FILES_MIMETYPE = QMLMIMETYPE;
const char *const TASK_CATEGORY_QML = "Task.Category.Qml";
// Wizard category
const char * const QML_WIZARD_CATEGORY = "F.Projects"; // (after Qt)
const char * const QML_WIZARD_TR_SCOPE = "QmlProjectManager";
const char * const QML_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("QmlProjectManager", "QML Project");
} // namespace Constants
} // namespace QmlProjectManager
......
......@@ -29,6 +29,8 @@
#include "qmlprojectwizard.h"
#include "qmlprojectconstants.h"
#include <coreplugin/icore.h>
#include <coreplugin/mimedatabase.h>
#include <projectexplorer/projectexplorer.h>
......@@ -94,8 +96,9 @@ Core::BaseFileWizardParameters QmlProjectWizard::parameters()
parameters.setDisplayName(tr("Import of existing QML directory"));
parameters.setId(QLatin1String("QI.QML Import"));
parameters.setDescription(tr("Creates a QML project from an existing directory of QML files."));
parameters.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
parameters.setCategory(QLatin1String(Constants::QML_WIZARD_CATEGORY));
parameters.setDisplayCategory(QCoreApplication::translate(Constants::QML_WIZARD_TR_SCOPE,
Constants::QML_WIZARD_TR_CATEGORY));
return parameters;
}
......
......@@ -34,14 +34,18 @@
#include "filenamingparameters.h"
#include <cpptools/cppmodelmanagerinterface.h>
#include <projectexplorer/projectexplorerconstants.h>
namespace Qt4ProjectManager {
namespace Internal {
CustomWidgetWizard::CustomWidgetWizard() :
QtWizard(QLatin1String("P.Qt4CustomWidget"),
tr("Qt4 Designer Custom Widget"),
tr("Creates a Qt4 Designer Custom Widget or a Custom Widget Collection."),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Qt Custom Designer Widget"),
tr("Creates a Qt Custom Designer Widget or a Custom Widget Collection."),
QIcon(QLatin1String(":/wizards/images/gui.png")))
{
}
......
......@@ -80,6 +80,11 @@ const char * const QT_SETTINGS_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectMan
const char * const QTVERSION_SETTINGS_PAGE_ID = "Qt Versions";
const char * const QTVERSION_SETTINGS_PAGE_NAME = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Versions");
// Wizard categories
const char * const QT_APP_WIZARD_CATEGORY = "C.QtApplicationProjects";
const char * const QT_APP_WIZARD_TR_SCOPE = "Qt4ProjectManager";
const char * const QT_APP_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("Qt4ProjectManager", "Qt Application Project");
} // namespace Constants
} // namespace Qt4ProjectManager
......
......@@ -55,9 +55,12 @@ namespace Qt4ProjectManager {
namespace Internal {
ConsoleAppWizard::ConsoleAppWizard()
: QtWizard(QLatin1String("D.Qt4Core"),
tr("Qt4 Console Application"),
tr("Creates a Qt4 console application."),
: QtWizard(QLatin1String("E.Qt4Core"),
QLatin1String(Constants::QT_APP_WIZARD_CATEGORY),
QLatin1String(Constants::QT_APP_WIZARD_TR_SCOPE),
QLatin1String(Constants::QT_APP_WIZARD_TR_CATEGORY),
tr("Qt Console Application"),
tr("Creates a Qt console application."),
QIcon(QLatin1String(":/wizards/images/console.png")))
{
}
......
......@@ -31,12 +31,17 @@
#include "emptyprojectwizarddialog.h"
#include <projectexplorer/projectexplorerconstants.h>
namespace Qt4ProjectManager {
namespace Internal {
EmptyProjectWizard::EmptyProjectWizard()
: QtWizard(QLatin1String("E.Qt4Empty"),
tr("Empty Qt4 Project"),
: QtWizard(QLatin1String("U.Qt4Empty"),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Empty Qt Project"),
tr("Creates an empty Qt project."),
QIcon(QLatin1String(":/wizards/images/gui.png")))
{
......
......@@ -73,8 +73,11 @@ namespace Internal {
GuiAppWizard::GuiAppWizard()
: QtWizard(QLatin1String("C.Qt4Gui"),
tr("Qt4 Gui Application"),
tr("Creates a Qt4 Gui Application with one form."),
QLatin1String(Constants::QT_APP_WIZARD_CATEGORY),
QLatin1String(Constants::QT_APP_WIZARD_TR_SCOPE),
QLatin1String(Constants::QT_APP_WIZARD_TR_CATEGORY),
tr("Qt Gui Application"),
tr("Creates a Qt Gui Application with one form."),
QIcon(QLatin1String(":/wizards/images/gui.png")))
{
}
......
......@@ -34,6 +34,7 @@
#include <utils/codegeneration.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <QtCore/QDir>
#include <QtCore/QFileInfo>
......@@ -47,9 +48,12 @@ namespace Qt4ProjectManager {
namespace Internal {
LibraryWizard::LibraryWizard()
: QtWizard(QLatin1String("Q.Qt4Library"),
: QtWizard(QLatin1String("H.Qt4Library"),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("C++ Library"),
tr("Creates a C++ Library."),
tr("Creates a Qt based C++ Library."),
QIcon(QLatin1String(":/wizards/images/lib.png")))
{
}
......
......@@ -50,13 +50,17 @@ using namespace Qt4ProjectManager::Internal;
static inline Core::BaseFileWizardParameters
wizardParameters(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name,
const QString &description,
const QIcon &icon)
{
Core::BaseFileWizardParameters rc(Core::IWizard::ProjectWizard);
rc.setCategory(QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY));
rc.setDisplayCategory(QCoreApplication::translate("ProjectExplorer", ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY));
rc.setCategory(category);
rc.setDisplayCategory(QCoreApplication::translate(categoryTranslationScope.toLatin1(),
displayCategory.toLatin1()));
rc.setIcon(icon);
rc.setDisplayName(name);
rc.setId(id);
......@@ -65,9 +69,19 @@ static inline Core::BaseFileWizardParameters
}
// -------------------- QtWizard
QtWizard::QtWizard(const QString &id, const QString &name,
QtWizard::QtWizard(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name,
const QString &description, const QIcon &icon) :
Core::BaseFileWizard(wizardParameters(id, name, description, icon))
Core::BaseFileWizard(wizardParameters(id,
category,
categoryTranslationScope,
displayCategory,
name,
description,
icon))
{
}
......
......@@ -56,6 +56,9 @@ class QtWizard : public Core::BaseFileWizard
protected:
QtWizard(const QString &id,
const QString &category,
const QString &categoryTranslationScope,
const QString &displayCategory,
const QString &name,
const QString &description,
const QIcon &icon);
......
......@@ -29,7 +29,9 @@
#include "testwizard.h"
#include "testwizarddialog.h"
#include <cpptools/cppmodelmanager.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
......@@ -42,9 +44,12 @@ namespace Qt4ProjectManager {
namespace Internal {
TestWizard::TestWizard() :
QtWizard(QLatin1String("E.Qt4Test"),
tr("Qt4 Unit Test"),
tr("Creates a Qt4 Unit Test."),
QtWizard(QLatin1String("L.Qt4Test"),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_CATEGORY),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_SCOPE),
QLatin1String(ProjectExplorer::Constants::PROJECT_WIZARD_TR_CATEGORY),
tr("Qt Unit Test"),
tr("Creates a Qt Unit Test."),
QIcon(QLatin1String(":/wizards/images/console.png")))
{
}
......
......@@ -93,7 +93,7 @@ bool TextEditorPlugin::initialize(const QStringList &arguments, QString *errorMe
Core::BaseFileWizardParameters wizardParameters(Core::IWizard::FileWizard);
wizardParameters.setDescription(tr("Creates a text file (.txt)."));
wizardParameters.setDisplayName(tr("Text File"));
wizardParameters.setCategory(QLatin1String("O.General"));
wizardParameters.setCategory(QLatin1String("U.General"));
wizardParameters.setDisplayCategory(tr("General"));
m_wizard = new TextFileWizard(QLatin1String(TextEditor::Constants::C_TEXTEDITOR_MIMETYPE_TEXT),
QLatin1String(Core::Constants::K_DEFAULT_TEXT_EDITOR_ID),
......
......@@ -41,7 +41,7 @@ const char * const VCS_COMMON_SETTINGS_ID = "A.Common";
const char * const VCS_COMMON_SETTINGS_NAME = QT_TRANSLATE_NOOP("VCSBase", "Common");
const char * const VCS_WIZARD_TR_CATEGORY = QT_TRANSLATE_NOOP("VCSBase", "Version Control");
const char * const VCS_WIZARD_CATEGORY = "Z.Version Control";
const char * const VCS_WIZARD_CATEGORY = "L.Version Control";
// Ids for sort order (wizards and preferences)
const char * const VCS_ID_GIT = "G.Git";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment