ModelEditor: Clean up exposed constants

Change-Id: Ic8b51dc2d121f7bfefb58a6b15a961e70ee8c74a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
hjk
2023-09-27 15:58:32 +02:00
parent 60d1fe4cb7
commit 24f8990511
2 changed files with 3 additions and 18 deletions

View File

@@ -3,18 +3,13 @@
#pragma once
#include <QtGlobal>
namespace ModelEditor {
namespace Constants {
namespace ModelEditor::Constants {
const char MODEL_EDITOR_ID[] = "Editors.ModelEditor";
const char MODEL_EDITOR_DISPLAY_NAME[] = QT_TRANSLATE_NOOP("QtC::Core", "Model Editor");
const char REMOVE_SELECTED_ELEMENTS[] = "ModelEditor.RemoveSelectedElements";
const char DELETE_SELECTED_ELEMENTS[] = "ModelEditor.DeleteSelectedElements";
const char OPEN_PARENT_DIAGRAM[] = "ModelEditor.OpenParentDiagram";
const char MENU_ID[] = "ModelEditor.Menu";
const char EXPORT_DIAGRAM[] = "ModelEditor.ExportDiagram";
const char EXPORT_SELECTED_ELEMENTS[] = "ModelEditor.ExportSelectedElements";
const char ACTION_ADD_PACKAGE[] = "ModelEditor.Action.AddPackage";
@@ -31,16 +26,6 @@ const char SHORTCUT_MODEL_EDITOR_EDIT_PROPERTIES[] =
const char SHORTCUT_MODEL_EDITOR_EDIT_ITEM[] =
"ModelEditor.ModelEditor.Shortcut.EditItem";
const char WIZARD_CATEGORY[] = "O.Model";
const char WIZARD_TR_CATEGORY[] = QT_TRANSLATE_NOOP("Modeling", "Modeling");
const char WIZARD_MODEL_ID[] = "SA.Model";
const char MIME_TYPE_MODEL[] = "text/vnd.qtcreator.model";
// Settings entries
const char SETTINGS_GROUP[] = "ModelEditorPlugin";
const char SETTINGS_RIGHT_SPLITTER[] = "RightSplitter";
const char SETTINGS_RIGHT_HORIZ_SPLITTER[] = "RightHorizSplitter";
} // namespace Constants
} // namespace ModelEditor
} // ModelEditor::Constants

View File

@@ -17,7 +17,7 @@ namespace Internal {
ModelEditorFactory::ModelEditorFactory(UiController *uiController, ActionHandler *actionHandler)
{
setId(Constants::MODEL_EDITOR_ID);
setDisplayName(::Core::Tr::tr(Constants::MODEL_EDITOR_DISPLAY_NAME));
setDisplayName(::Core::Tr::tr("Model Editor"));
addMimeType(Constants::MIME_TYPE_MODEL);
setEditorCreator([uiController, actionHandler] { return new ModelEditor(uiController, actionHandler); });
}