projectexplorerconstants.h 8.88 KB
Newer Older
hjk's avatar
hjk committed
1
/****************************************************************************
con's avatar
con committed
2
**
3 4
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
con's avatar
con committed
5
**
hjk's avatar
hjk committed
6
** This file is part of Qt Creator.
con's avatar
con committed
7
**
hjk's avatar
hjk committed
8 9 10 11
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
12 13 14
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
15
**
16 17 18 19 20 21 22
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 as published by the Free Software
** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
con's avatar
con committed
23
**
hjk's avatar
hjk committed
24
****************************************************************************/
hjk's avatar
hjk committed
25

Tobias Hunger's avatar
Tobias Hunger committed
26
#pragma once
con's avatar
con committed
27

28
#include <QtGlobal>
Friedemann Kleint's avatar
Friedemann Kleint committed
29

con's avatar
con committed
30 31 32
namespace ProjectExplorer {
namespace Constants {

33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
// Modes and their priorities
const char MODE_SESSION[]         = "Project";

// Actions
const char BUILD[]                = "ProjectExplorer.Build";
const char STOP[]                 = "ProjectExplorer.Stop";

// Context
const char C_PROJECT_TREE[]       = "ProjectExplorer.ProjectTreeContext";

// Menus
const char M_BUILDPROJECT[]       = "ProjectExplorer.Menu.Build";
const char M_DEBUG[]              = "ProjectExplorer.Menu.Debug";
const char M_DEBUG_STARTDEBUGGING[] = "ProjectExplorer.Menu.Debug.StartDebugging";

// Menu groups
49 50 51 52
const char G_BUILD_BUILD[]        = "ProjectExplorer.Group.Build";
const char G_BUILD_DEPLOY[]       = "ProjectExplorer.Group.Deploy";
const char G_BUILD_REBUILD[]      = "ProjectExplorer.Group.Rebuild";
const char G_BUILD_CLEAN[]        = "ProjectExplorer.Group.Clean";
53 54 55 56 57 58 59 60 61 62 63

// Context menus
const char M_SESSIONCONTEXT[]     = "Project.Menu.Session";
const char M_PROJECTCONTEXT[]     = "Project.Menu.Project";
const char M_SUBPROJECTCONTEXT[]  = "Project.Menu.SubProject";
const char M_FOLDERCONTEXT[]      = "Project.Menu.Folder";
const char M_FILECONTEXT[]        = "Project.Menu.File";
const char M_OPENFILEWITHCONTEXT[] = "Project.Menu.File.OpenWith";

// Context menu groups
const char G_SESSION_BUILD[]      = "Session.Group.Build";
64
const char G_SESSION_REBUILD[]     = "Session.Group.Rebuild";
65 66 67 68 69
const char G_SESSION_FILES[]      = "Session.Group.Files";
const char G_SESSION_OTHER[]      = "Session.Group.Other";

const char G_PROJECT_FIRST[]      = "Project.Group.Open";
const char G_PROJECT_BUILD[]      = "Project.Group.Build";
70
const char G_PROJECT_REBUILD[]    = "Project.Group.Rebuild";
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
const char G_PROJECT_RUN[]        = "Project.Group.Run";
const char G_PROJECT_FILES[]      = "Project.Group.Files";
const char G_PROJECT_TREE[]       = "Project.Group.Tree";
const char G_PROJECT_LAST[]       = "Project.Group.Last";

const char G_FOLDER_FILES[]       = "ProjectFolder.Group.Files";
const char G_FOLDER_OTHER[]       = "ProjectFolder.Group.Other";
const char G_FOLDER_CONFIG[]      = "ProjectFolder.Group.Config";

const char G_FILE_OPEN[]          = "ProjectFile.Group.Open";
const char G_FILE_OTHER[]         = "ProjectFile.Group.Other";
const char G_FILE_CONFIG[]        = "ProjectFile.Group.Config";

// Mime types
const char C_SOURCE_MIMETYPE[]    = "text/x-csrc";
const char C_HEADER_MIMETYPE[]    = "text/x-chdr";
const char CPP_SOURCE_MIMETYPE[]  = "text/x-c++src";
const char CPP_HEADER_MIMETYPE[]  = "text/x-c++hdr";
Eike Ziller's avatar
Eike Ziller committed
89
const char LINGUIST_MIMETYPE[]    = "text/vnd.trolltech.linguist";
90
const char FORM_MIMETYPE[]        = "application/x-designer";
91
const char QML_MIMETYPE[]         = "text/x-qml"; // separate def also in qmljstoolsconstants.h
Orgad Shaneh's avatar
Orgad Shaneh committed
92
const char RESOURCE_MIMETYPE[]    = "application/vnd.qt.xml.resource";
93
const char SCXML_MIMETYPE[]       = "application/scxml+xml";
94 95 96

// Settings page
const char PROJECTEXPLORER_SETTINGS_CATEGORY[]  = "K.ProjectExplorer";
97
const char PROJECTEXPLORER_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Build & Run");
98
const char PROJECTEXPLORER_SETTINGS_CATEGORY_ICON[]  = ":/projectexplorer/images/category_buildrun.png";
99
const char PROJECTEXPLORER_SETTINGS_ID[] = "A.ProjectExplorer.ProjectExplorer";
100
const char TOOLCHAIN_SETTINGS_PAGE_ID[] = "M.ProjectExplorer.ToolChainOptions";
101
const char DEBUGGER_SETTINGS_PAGE_ID[] = "N.ProjectExplorer.DebuggerOptions";
Tobias Hunger's avatar
Tobias Hunger committed
102
const char KITS_SETTINGS_PAGE_ID[] = "D.ProjectExplorer.KitsOptions";
103

104
// Device settings page
105
const char DEVICE_SETTINGS_CATEGORY[] = "XW.Devices";
106
const char DEVICE_SETTINGS_TR_CATEGORY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Devices");
107 108
const char DEVICE_SETTINGS_PAGE_ID[] = "AA.Device Settings";

109 110 111
// Task categories
const char TASK_CATEGORY_COMPILE[] = "Task.Category.Compile";
const char TASK_CATEGORY_BUILDSYSTEM[] = "Task.Category.Buildsystem";
112
const char TASK_CATEGORY_DEPLOYMENT[] = "Task.Category.Deploy";
113

114
// Wizard categories
115
const char QT_PROJECT_WIZARD_CATEGORY[] = "H.Project";
116 117
const char QT_PROJECT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Other Project");

118 119
const char QT_APPLICATION_WIZARD_CATEGORY[] = "F.Application";
const char QT_APPLICATION_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Application");
120

121 122
const char LIBRARIES_WIZARD_CATEGORY[] = "G.Library";
const char LIBRARIES_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Library");
123

124
const char IMPORT_WIZARD_CATEGORY[] = "T.Import";
125
const char IMPORT_WIZARD_CATEGORY_DISPLAY[] = QT_TRANSLATE_NOOP("ProjectExplorer", "Import Project");
Friedemann Kleint's avatar
Friedemann Kleint committed
126

127
// Wizard extra values
Kai Koehne's avatar
Kai Koehne committed
128
const char PREFERRED_PROJECT_NODE[] = "ProjectExplorer.PreferredProjectNode";
129
const char PROJECT_KIT_IDS[] = "ProjectExplorer.Profile.Ids";
130

Tobias Hunger's avatar
Tobias Hunger committed
131
// Build step lists ids:
132 133 134
const char BUILDSTEPS_CLEAN[] = "ProjectExplorer.BuildSteps.Clean";
const char BUILDSTEPS_BUILD[] = "ProjectExplorer.BuildSteps.Build";
const char BUILDSTEPS_DEPLOY[] = "ProjectExplorer.BuildSteps.Deploy";
Tobias Hunger's avatar
Tobias Hunger committed
135

136
// Language
137 138 139 140

// Keep these short: These constants are exposed to the MacroExplorer!
const char C_LANGUAGE_ID[] = "C";
const char CXX_LANGUAGE_ID[] = "Cxx";
141
const char QMLJS_LANGUAGE_ID[] = "QMLJS";
142

143 144 145 146 147 148
// ToolChain TypeIds
const char CLANG_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Clang";
const char GCC_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Gcc";
const char LINUXICC_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.LinuxIcc";
const char MINGW_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Mingw";
const char MSVC_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Msvc";
149
const char CLANG_CL_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.ClangCl";
150
const char CUSTOM_TOOLCHAIN_TYPEID[] = "ProjectExplorer.ToolChain.Custom";
151

Friedemann Kleint's avatar
Friedemann Kleint committed
152
// Default directory to run custom (build) commands in.
153
const char DEFAULT_WORKING_DIR[] = "%{buildDir}";
154
const char DEFAULT_WORKING_DIR_ALTERNATE[] = "%{sourceDir}";
Friedemann Kleint's avatar
Friedemann Kleint committed
155

156 157 158
// Desktop Device related ids:
const char DESKTOP_DEVICE_ID[] = "Desktop Device";
const char DESKTOP_DEVICE_TYPE[] = "Desktop";
159 160
const int DESKTOP_PORT_START = 30000;
const int DESKTOP_PORT_END = 31000;
161

162
// Variable Names:
163
const char VAR_CURRENTPROJECT_PREFIX[] = "CurrentProject";
164 165 166 167 168 169
const char VAR_CURRENTPROJECT_NAME[] = "CurrentProject:Name";
const char VAR_CURRENTKIT_NAME[] = "CurrentKit:Name";
const char VAR_CURRENTKIT_FILESYSTEMNAME[] = "CurrentKit:FileSystemName";
const char VAR_CURRENTKIT_ID[] = "CurrentKit:Id";
const char VAR_CURRENTBUILD_NAME[] = "CurrentBuild:Name";
const char VAR_CURRENTBUILD_TYPE[] = "CurrentBuild:Type";
170
const char VAR_CURRENTBUILD_ENV[] = "CurrentBuild:Env";
171
const char VAR_CURRENTRUN_NAME[] = "CurrentRun:Name";
172

Tobias Hunger's avatar
Tobias Hunger committed
173 174 175 176
// JsonWizard:
const char PAGE_ID_PREFIX[] = "PE.Wizard.Page.";
const char GENERATOR_ID_PREFIX[] = "PE.Wizard.Generator.";

177 178 179 180
// RunMode
const char NO_RUN_MODE[]="RunConfiguration.NoRunMode";
const char NORMAL_RUN_MODE[]="RunConfiguration.NormalRunMode";
const char QML_PROFILER_RUN_MODE[]="RunConfiguration.QmlProfilerRunMode";
181
const char PERFPROFILER_RUN_MODE[]="PerfProfiler.RunMode";
182
const char DEBUG_RUN_MODE[]="RunConfiguration.DebugRunMode";
183

184 185 186
// Navigation Widget
const char PROJECTTREE_ID[] = "Projects";

Alessandro Portale's avatar
Alessandro Portale committed
187 188 189 190 191 192 193 194 195 196
// File icon overlays
const char FILEOVERLAY_QT[]=":/projectexplorer/images/fileoverlay_qt.png";
const char FILEOVERLAY_QML[]=":/projectexplorer/images/fileoverlay_qml.png";
const char FILEOVERLAY_UI[]=":/projectexplorer/images/fileoverlay_ui.png";
const char FILEOVERLAY_QRC[]=":/projectexplorer/images/fileoverlay_qrc.png";
const char FILEOVERLAY_CPP[]=":/projectexplorer/images/fileoverlay_cpp.png";
const char FILEOVERLAY_H[]=":/projectexplorer/images/fileoverlay_h.png";
const char FILEOVERLAY_SCXML[]=":/projectexplorer/images/fileoverlay_scxml.png";
const char FILEOVERLAY_UNKNOWN[]=":/projectexplorer/images/fileoverlay_unknown.png";

197
} // namespace Constants
hjk's avatar
hjk committed
198
} // namespace ProjectExplorer