CmEditorApplication.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include "CmEditorPrerequisites.h"
  3. #include <QtCore/QString>
  4. namespace CamelotEditor
  5. {
  6. class EditorApplication
  7. {
  8. struct PImpl;
  9. public:
  10. EditorApplication();
  11. ~EditorApplication();
  12. void startUp();
  13. void run();
  14. void shutDown();
  15. void loadProject(const QString& absProjPath);
  16. void createProject(const QString& absProjDir, const QString& projName);
  17. void deleteProject(const QString& absProjPath);
  18. bool isValidProject(const QString& absProjDir) const;
  19. bool isValidProjectName(const QString& name) const;
  20. QString getFullProjectPath(const QString& absProjDir, const QString& projName) const;
  21. bool projectExists(const QString& absProjPath) const;
  22. QString getEditorRootPath() const;
  23. QtEditor* getMainWindow() const;
  24. private:
  25. static const QString PROJECT_PREFS_FILE_NAME;
  26. static const QString EDITOR_PREFS_FILE_NAME;
  27. static const QString STYLE_SHEETS_DIRECTORY_NAME;
  28. PImpl* p;
  29. QString getProjectPrefsPath(const QString& absProjPath) const;
  30. QString getEditorPrefsPath() const;
  31. QString getStyleSheetsDirectoryPath() const;
  32. void startUpQt();
  33. void shutDownQt();
  34. void loadStyleSheets();
  35. };
  36. EditorApplication& gEditorApp();
  37. }