appcontext.h 671 B

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