CmEditorPrefs.h 802 B

12345678910111213141516171819202122232425262728293031
  1. #pragma once
  2. #include "CmEditorPrerequisites.h"
  3. #include "CmModule.h"
  4. #include <QtCore/QString>
  5. namespace CamelotEditor
  6. {
  7. class EditorPrefs : public CamelotEngine::Module<EditorPrefs>
  8. {
  9. public:
  10. UINT32 getNumRecentlyUsedProjects() const;
  11. const QString& getRecentlyUsedProjectPath(UINT32 idx) const;
  12. void addRecentlyUsedProjectPath(const QString& path);
  13. void removeRecentlyUsedProjectPath(UINT32 idx);
  14. void setLastUsedProjectDirectory(const QString& value);
  15. const QString& getLastUsedProjectDirectory() const;
  16. void save(const QString& path, bool overwrite = true) const;
  17. void load(const QString& path);
  18. private:
  19. vector<QString>::type mRecentlyUsedProjects;
  20. QString mLastUsedProjectDirectory;
  21. void clear();
  22. };
  23. EditorPrefs& gEditorPrefs();
  24. }