3#include <EditorEngineProcessFramework/LongOps/LongOpControllerManager.h>
4#include <EditorFramework/EditorApp/Configuration/Plugins.h>
5#include <EditorFramework/EditorFrameworkDLL.h>
6#include <EditorFramework/IPC/EngineProcessConnection.h>
7#include <Foundation/Application/Config/FileSystemConfig.h>
8#include <Foundation/Application/Config/PluginConfig.h>
9#include <Foundation/Communication/Event.h>
10#include <Foundation/Configuration/Singleton.h>
11#include <Foundation/Containers/Set.h>
12#include <Foundation/Logging/HTMLWriter.h>
13#include <Foundation/Strings/String.h>
14#include <Foundation/Types/Bitflags.h>
15#include <Foundation/Types/UniquePtr.h>
16#include <GuiFoundation/ContainerWindow/ContainerWindow.moc.h>
17#include <QApplication>
18#include <ToolsFoundation/Project/ToolsProject.h>
19#include <ToolsFoundation/Utilities/RecentFilesList.h>
38 BeforeApplyDataDirectories,
56 using StorageType = plUInt8;
63 Background = PL_BIT(4),
69 StorageType Headless : 1;
70 StorageType SafeMode : 1;
71 StorageType NoRecent : 1;
72 StorageType UnitTest : 1;
73 StorageType Background : 1;
91 plString FindToolApplication(
const char* szToolName);
100 plString BuildFileserveCommandLine()
const;
113 bool IsInSafeMode()
const {
return m_StartupFlags.IsSet(StartupFlags::SafeMode); }
127 void AddRestartRequiredReason(
const char* szReason);
128 const plSet<plString>& GetRestartRequiredReasons() {
return m_RestartRequiredReasons; }
130 void AddReloadProjectRequiredReason(
const char* szReason);
131 const plSet<plString>& GetReloadProjectRequiredReason() {
return m_ReloadProjectRequiredReasons; }
136 void SaveOpenDocumentsList();
141 void InitQt(
int iArgc,
char** pArgv);
142 void StartupEditor();
144 void ShutdownEditor();
148 void LoadEditorPlugins();
155 void ShowSettingsDocument();
156 void CloseSettingsDocument();
159 plResult OpenProject(
const char* szProject,
bool bImmediate =
false);
161 void GuiCreateDocument();
162 void GuiOpenDocument();
164 void GuiOpenDashboard();
165 void GuiOpenDocsAndCommunity();
166 bool GuiCreateProject(
bool bImmediate =
false);
167 bool GuiOpenProject(
bool bImmediate =
false);
182 bool ExistsPluginSelectionStateDDL(
const char* szProjectDir =
":project");
183 void WritePluginSelectionStateDDL(
const char* szProjectDir =
":project");
184 void CreatePluginSelectionDDL(
const char* szProjectFile,
const char* szTemplate);
185 void LoadPluginBundleDlls(
const char* szProjectFile);
186 void DetectAvailablePluginBundles(
plStringView sSearchDirectory);
189 void LaunchEditor(
const char* szProject,
bool bCreate);
193 void AddPluginDataDirDependency(
const char* szSdkRootRelativePath,
const char* szRootName =
nullptr,
bool bWriteable =
false);
200 bool MakeDataDirectoryRelativePathAbsolute(
plStringBuilder& ref_sPath)
const;
201 bool MakeDataDirectoryRelativePathAbsolute(
plString& ref_sPath)
const;
203 bool MakePathDataDirectoryRelative(
plString& ref_sPath)
const;
205 bool MakePathDataDirectoryParentRelative(
plStringBuilder& ref_sPath)
const;
206 bool MakeParentDataDirectoryRelativePathAbsolute(
plStringBuilder& ref_sPath,
bool bCheckExists)
const;
217 void ReloadEngineResources();
219 void RestartEngineProcessIfPluginsChanged(
bool bForce);
220 void SetStyleSheet();
226 plString BuildDocumentTypeFileFilter(
bool bForCreation);
228 void GuiCreateOrOpenDocument(
bool bCreate);
229 bool GuiCreateOrOpenProject(
bool bCreate);
232 void SlotTimedUpdate();
233 void SlotQueuedCloseProject();
234 void SlotQueuedOpenProject(QString sProject);
235 void SlotQueuedOpenDocument(QString sProject,
void* pOpenContext);
236 void SlotQueuedGuiOpenDashboard();
237 void SlotQueuedGuiOpenDocsAndCommunity();
238 void SlotQueuedGuiCreateOrOpenProject(
bool bCreate);
239 void SlotSaveSettings();
240 void SlotVersionCheckCompleted(
bool bNewVersionReleased,
bool bForced);
243 void UpdateGlobalStatusBarMessage();
254 void SetupNewProject();
255 void LoadEditorPreferences();
256 void LoadProjectPreferences();
257 void StoreEnginePluginModificationTimes();
258 bool CheckForEnginePluginModifications();
259 void SaveAllOpenDocuments();
261 void ReadTagRegistry();
263 void SetupDataDirectories();
266 void SetupAndShowSplashScreen();
267 void CloseSplashScreen();
271 bool m_bSavePreferencesAfterOpenProject;
272 bool m_bLoadingProjectInProgress =
false;
273 bool m_bAnyProjectOpened =
false;
274 bool m_bWroteCrashIndicatorFile =
false;
284 void SaveRecentFiles();
285 void LoadRecentFiles();
291 QApplication* m_pQtApplication =
nullptr;
294 QTimer* m_pTimer =
nullptr;
296 QSplashScreen* m_pSplashScreen =
nullptr;
300 plTime m_LastPluginModificationCheck;
309 bool IsProgressBarProcessingEvents()
const;
Definition EditorApp.moc.h:27
Definition FileSystemConfig.h:8
Definition PluginConfig.h:9
Definition DocumentObjectBase.h:11
Definition DynamicArray.h:81
Stores the valid values and names for 'dynamic' enums.
Definition DynamicStringEnum.h:14
Definition EngineProcessConnection.h:21
Base class for all logging classes.
Definition Log.h:77
A log writer that writes out log messages to an HTML file.
Definition HTMLWriter.h:14
The LongOp controller is active in the editor process and manages which long ops are available,...
Definition LongOpControllerManager.h:30
Manages the way a progress bar is subdivided and advanced.
Definition Progress.h:36
Definition EditorApp.moc.h:48
bool IsBackgroundMode() const
Returns true if the editor is started in run in background mode.
Definition EditorApp.moc.h:122
bool IsInSafeMode() const
Can be set via the command line option '-safe'. In this mode the editor will not automatically load r...
Definition EditorApp.moc.h:113
bool IsInUnitTestMode() const
Returns true if the editor is started in run in test mode.
Definition EditorApp.moc.h:119
bool IsInHeadlessMode() const
Returns true if the the app shouldn't display anything. This is the case in an EditorProcessor.
Definition EditorApp.moc.h:116
A Qt implementation to display the state of an plProgress instance.
Definition QtProgressbar.h:19
Downloads a web page and checks whether the latest version online is newer than the current one.
Definition CheckVersion.moc.h:33
Maintains a list of recently used files and the container window ID they previously resided in.
Definition RecentFilesList.h:7
plStringBuilder is a class that is meant for creating and modifying strings.
Definition StringBuilder.h:35
plStringView represent a read-only sub-string of a larger string, as it can store a dedicated string ...
Definition StringView.h:34
Loads translations from files. Each translator can have different search paths, but the files to be l...
Definition TranslationLookup.h:88
A Unique ptr manages an object and destroys that object when it goes out of scope....
Definition UniquePtr.h:10
The plBitflags class allows you to work with type-safe bitflags.
Definition Bitflags.h:82
Definition Declarations.h:54
Definition DocumentManager.h:65
Definition DocumentManager.h:87
Definition EditorApp.moc.h:35
Type
Definition EditorApp.moc.h:37
Definition EngineProcessConnection.h:63
@ WarningMsg
A warning message.
Definition Log.h:37
Contains multiple plPluginBundle's.
Definition Plugins.h:58
Definition DocumentWindow.moc.h:19
Definition EditorApp.moc.h:68
Definition EditorApp.moc.h:55
Enum
Definition EditorApp.moc.h:58
Definition UIServices.moc.h:23
Default enum for returning failure or success, instead of using a bool.
Definition Types.h:54
An plResult with an additional message for the reason of failure.
Definition Status.h:12
The time class encapsulates a double value storing the time in seconds.
Definition Time.h:12