UndoApplicationPlugin.hpp
1 #pragma once
2 
3 #include <score/plugins/application/GUIApplicationPlugin.hpp>
4 
5 #include <QAction>
6 #include <QList>
7 
8 #include <score_lib_base_export.h>
9 
10 #include <vector>
11 
12 class QObject;
13 namespace score
14 {
15 class Document;
16 } // namespace score
17 
18 namespace score
19 {
26 class SCORE_LIB_BASE_EXPORT UndoApplicationPlugin final
28 {
29 public:
31  ~UndoApplicationPlugin() override;
32 
33 private:
34  void on_documentChanged(score::Document* olddoc, score::Document* newdoc) override;
35 
36  GUIElements makeGUIElements() override;
37 
38  // Connections to keep for the running document.
39  QList<QMetaObject::Connection> m_connections;
40 
41  QAction* m_undoAction{};
42  QAction* m_redoAction{};
43 };
44 }
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
The UndoApplicationPlugin class.
Definition: UndoApplicationPlugin.hpp:28
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Specializes ApplicationContext with the QMainWindow.
Definition: GUIApplicationContext.hpp:15
Definition: GUIApplicationPlugin.hpp:24