Loading...
Searching...
No Matches
Application.hpp
1#pragma once
2#include <score/application/ApplicationContext.hpp>
3
4#include <core/application/ApplicationInterface.hpp>
5#include <core/application/ApplicationSettings.hpp>
6#include <core/plugin/PluginManager.hpp>
7#include <core/settings/Settings.hpp>
8
9#include <QApplication>
10
11#include <memory>
12#include <verdigris>
13
14namespace score
15{
16class Settings;
17} // namespace score
18
20namespace score
21{
22class Presenter;
23class View;
24class StartScreen;
25}
26
34class Application final
35 : public QObject
37{
38 W_OBJECT(Application)
39 friend class ChildEventFilter;
40
41public:
42 Application(int& argc, char** argv);
43
44 Application(const score::ApplicationSettings& appSettings, int& argc, char** argv);
45
46 Application(const Application&) = delete;
47 Application& operator=(const Application&) = delete;
49
50 int exec();
51
52 const score::GUIApplicationContext& context() const override;
53 const score::ApplicationComponents& components() const override;
54 void init(); // m_applicationSettings has to be set.
55
57
58private:
59 void initDocuments();
60 void openNewDocument();
61
62 // Base stuff.
63 QCoreApplication* m_app;
64 score::Settings m_settings; // Global settings
65 score::ProjectSettings m_projectSettings; // Per project
66
67 // MVP
68 score::View* m_view{};
69 score::Presenter* m_presenter{};
70 score::StartScreen* m_startScreen{};
71};
Application.
Definition Application.hpp:37
Wrapper over QApplication.
Definition SafeQApplication.hpp:44
Definition ApplicationComponents.hpp:68
Definition ApplicationInterface.hpp:39
The Presenter class.
Definition lib/core/presenter/Presenter.hpp:36
Definition lib/core/settings/Settings.hpp:70
Application-wide user settings registering and handling.
Definition lib/core/settings/Settings.hpp:42
Definition StartScreen.hpp:256
The main display of the application.
Definition lib/core/view/Window.hpp:41
Base toolkit upon which the software is built.
Definition Application.cpp:90
Load-time settings.
Definition ApplicationSettings.hpp:17
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15