appcontext.h 535 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __APPCONTEXT_H__
  2. #define __APPCONTEXT_H__
  3. #include <QObject>
  4. #include "pluginmanager.h"
  5. #include "projectmanager.h"
  6. #include "network.h"
  7. class AppContext : public QObject
  8. {
  9. Q_OBJECT
  10. explicit AppContext(QObject *parent = nullptr);
  11. ~AppContext();
  12. public:
  13. static AppContext &instance();
  14. PluginManager &pluginManager();
  15. ProjectManager &projectManager();
  16. Network &network();
  17. private:
  18. PluginManager m_pluginMgr;
  19. ProjectManager m_projectMgr;
  20. Network m_network;
  21. };
  22. #endif // APPCONTEXT_H