Loading...
Searching...
No Matches
ObjectMenuActions.hpp
1#pragma once
2#include <Scenario/Application/Menus/ObjectsActions/EventActions.hpp>
3#include <Scenario/Application/Menus/ObjectsActions/IntervalActions.hpp>
4
6#include <score/actions/Menu.hpp>
7#include <score/command/Dispatchers/CommandDispatcher.hpp>
8#include <score/selection/Selection.hpp>
9
10#include <ossia/detail/json.hpp>
11namespace Scenario
12{
13struct Point;
14class ScenarioApplicationPlugin;
15class ScenarioDocumentModel;
16class ScenarioDocumentPresenter;
17class ScenarioPresenter;
18class SCORE_PLUGIN_SCENARIO_EXPORT ObjectMenuActions final : public QObject
19{
20public:
22
23 void makeGUIElements(score::GUIElements& ref);
24 void setupContextMenu(Process::LayerContextMenuManager& ctxm);
25
26 CommandDispatcher<> dispatcher() const;
27
28 auto appPlugin() const { return m_parent; }
29
30private:
31 void copySelectedElementsToJson(JSONReader& r);
32 void removeSelectedElements();
33 void cutSelectedElementsToJson(JSONReader& r);
34
35 void pasteElements(QPoint);
36 void pasteElements();
37
38 void pasteElements(const rapidjson::Value& obj, const Scenario::Point& origin);
39 void pasteElementsAfter(const rapidjson::Value& obj);
40 void writeJsonToSelectedElements(const rapidjson::Value& obj);
41
42 bool isFocusingScenario() const noexcept;
43
44 ScenarioDocumentModel* getScenarioDocModel() const;
45 ScenarioDocumentPresenter* getScenarioDocPresenter() const;
46 ScenarioApplicationPlugin* m_parent{};
47
48 EventActions m_eventActions;
49 IntervalActions m_cstrActions;
50
51 QAction* m_removeElements{};
52 QAction* m_copyContent{};
53 QAction* m_cutContent{};
54 QAction* m_pasteElements{};
55 QAction* m_pasteElementsAfter{};
56 QAction* m_elementsToJson{};
57 QAction* m_mergeTimeSyncs{};
58 QAction* m_mergeEvents{};
59 QAction* m_encapsulate{};
60 QAction* m_decapsulate{};
61 QAction* m_duplicate{};
62
63 QAction* m_selectAll{};
64 QAction* m_deselectAll{};
65 QAction* m_selectTop{};
66 QAction* m_goToParent{};
67};
68}
The CommandDispatcher class.
Definition CommandDispatcher.hpp:13
Definition JSONVisitor.hpp:52
Definition LayerContextMenu.hpp:38
Definition EventActions.hpp:26
Definition IntervalActions.hpp:26
Definition ObjectMenuActions.hpp:19
Definition ScenarioApplicationPlugin.hpp:42
Definition ScenarioDocumentModel.hpp:29
The ScenarioDocumentPresenter class.
Definition ScenarioDocumentPresenter.hpp:58
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition ScenarioPoint.hpp:13
Definition GUIApplicationPlugin.hpp:24