CProject.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #pragma once
  2. #include "CWallpaper.h"
  3. #include "WallpaperEngine/Core/Core.h"
  4. #include "WallpaperEngine/Core/Projects/CProperty.h"
  5. #include "WallpaperEngine/Assets/CContainer.h"
  6. namespace WallpaperEngine::Core
  7. {
  8. using json = nlohmann::json;
  9. using namespace WallpaperEngine::Assets;
  10. class CWallpaper;
  11. class CProject
  12. {
  13. public:
  14. static CProject* fromFile (const std::string& filename, CContainer& container);
  15. CWallpaper* getWallpaper () const;
  16. const std::string& getTitle () const;
  17. const std::string& getType () const;
  18. const std::vector<Projects::CProperty*>& getProperties () const;
  19. CContainer& getContainer ();
  20. protected:
  21. CProject (std::string title, std::string type, CWallpaper* wallpaper, CContainer& container);
  22. void insertProperty (Projects::CProperty* property);
  23. private:
  24. std::vector<Projects::CProperty*> m_properties;
  25. std::string m_title;
  26. std::string m_type;
  27. CWallpaper* m_wallpaper;
  28. CContainer& m_container;
  29. };
  30. }