projecthandler.h
Go to the documentation of this file.
1 #ifndef DNAI_CORE_PROJECTHANDLER_H
2 #define DNAI_CORE_PROJECTHANDLER_H
3 
4 #include <queue>
5 
6 #include <QObject>
7 
8 #include "dnai/project.h"
9 #include "entitymanager.h"
10 
11 namespace dnai
12 {
13  namespace gcore
14  {
15  class ProjectHandler : public QObject
16  {
17  Q_OBJECT
18 
19  public:
21  virtual ~ProjectHandler() = default;
22 
23  public:
24  void setup();
25 
26  public:
27  Q_INVOKABLE void create(dnai::Project *tocreate, bool save = true);
28 
29  private:
30  void onCreated(QString const &name, ::core::EntityID rootEntity);
31  void onCreateError(QString const &name, QString const &error);
32 
33  private:
35  std::queue<Project *> pendingProjects;
36  };
37  }
38 }
39 
40 #endif // DNAI_CORE_PROJECTHANDLER_H
EntityManager & manager
Definition: projecthandler.h:34
void onCreated(QString const &name,::core::EntityID rootEntity)
Definition: projecthandler.cpp:42
Definition: entitymanager.h:15
Definition: projecthandler.h:15
Definition: project.h:22
ProjectHandler(EntityManager &manager)
Definition: projecthandler.cpp:16
void setup()
Definition: projecthandler.cpp:22
Definition: api.h:13
virtual ~ProjectHandler()=default
Q_INVOKABLE void create(dnai::Project *tocreate, bool save=true)
Definition: projecthandler.cpp:28
std::queue< Project * > pendingProjects
Definition: projecthandler.h:35
void onCreateError(QString const &name, QString const &error)
Definition: projecthandler.cpp:60