Loading...
Searching...
No Matches
GUIApplicationPlugin.hpp
1#pragma once
3#include <score/actions/Menu.hpp>
4#include <score/actions/Toolbar.hpp>
5#include <score/application/GUIApplicationContext.hpp>
6
7#include <QKeyEvent>
8#include <qnamespace.h>
9
10#include <vector>
11class QAction;
12class QObject;
13namespace score
14{
15class Document;
16} // namespace score
17struct VisitorVariant;
18
19namespace score
20{
21class DocumentPlugin;
22
24{
25 ActionContainer actions;
26 std::vector<Menu> menus;
27 std::vector<Toolbar> toolbars;
28};
29
30class SCORE_LIB_BASE_EXPORT ApplicationPlugin
31{
32public:
34
41 virtual void initialize();
42
43 virtual ~ApplicationPlugin();
44
45 const score::ApplicationContext& context;
46};
47
88class SCORE_LIB_BASE_EXPORT GUIApplicationPlugin
89{
90public:
93
94 virtual ~GUIApplicationPlugin();
95
107 virtual GUIElements makeGUIElements();
108
109 const GUIApplicationContext& context;
110
117 virtual void initialize();
118
123 Document* currentDocument() const;
124
129 virtual bool handleLoading();
130
135 virtual void afterStartup();
136
142 virtual void on_initDocument(score::Document& doc);
143
150 virtual void on_newDocument(score::Document& doc);
151
156 virtual void on_loadedDocument(score::Document& doc);
157
163 virtual void on_createdDocument(score::Document& doc);
170 virtual void prepareNewDocument();
171
178 virtual void on_documentChanged(score::Document* olddoc, score::Document* newdoc);
179
185 virtual void on_activeWindowChanged();
186
190 virtual void on_keyPressEvent(QKeyEvent& event);
191
195 virtual void on_keyReleaseEvent(QKeyEvent& event);
196};
197}
Definition GUIApplicationPlugin.hpp:31
The Document class is the central part of the software.
Definition Document.hpp:51
Used to extend the software with application-wide data.
Definition GUIApplicationPlugin.hpp:89
Base toolkit upon which the software is built.
Definition Application.cpp:90
The VisitorVariant struct.
Definition VisitorInterface.hpp:26
The ActionContainer struct.
Definition Action.hpp:132
Used to access all the application-wide state and structures.
Definition ApplicationContext.hpp:24
Specializes ApplicationContext with the QMainWindow.
Definition GUIApplicationContext.hpp:15
Definition GUIApplicationPlugin.hpp:24