ApplicationInterface.hpp
1 #pragma once
2 #include <score/application/GUIApplicationContext.hpp>
3 
4 #include <score_lib_base_export.h>
5 namespace score
6 {
7 class Settings;
8 class Presenter;
9 class GUIApplicationRegistrar;
10 struct GUIApplicationContext;
11 
22 class SCORE_LIB_BASE_EXPORT ApplicationInterface
23 {
24 public:
26  virtual ~ApplicationInterface();
27 
28  virtual const ApplicationContext& context() const = 0;
29 
30  virtual const ApplicationComponents& components() const = 0;
31 
32  static ApplicationInterface& instance();
33 
34 protected:
35  static ApplicationInterface* m_instance;
36 };
37 
38 class SCORE_LIB_BASE_EXPORT GUIApplicationInterface : public ApplicationInterface
39 {
40 public:
41  using ApplicationInterface::ApplicationInterface;
42  virtual ~GUIApplicationInterface();
43  virtual const GUIApplicationContext& context() const override = 0;
44 
45  static GUIApplicationInterface& instance();
46 
60  void loadPluginData(score::Settings& settings, score::Presenter& presenter);
61 
62  void registerPlugin(score::Plugin_QtInterface&);
63 
64  void requestExit();
65  void forceExit();
66 };
67 }
Definition: ApplicationComponents.hpp:68
The ApplicationInterface class.
Definition: ApplicationInterface.hpp:23
Definition: ApplicationInterface.hpp:39
Definition: PluginRequirements_QtInterface.hpp:18
The Presenter class.
Definition: lib/core/presenter/Presenter.hpp:36
Application-wide user settings registering and handling.
Definition: lib/core/settings/Settings.hpp:42
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Used to access all the application-wide state and structures.
Definition: ApplicationContext.hpp:24
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15