Loading...
Searching...
No Matches
RemoveSelection.hpp
1#pragma once
2#include <Scenario/Commands/Event/SplitEvent.hpp>
3#include <Scenario/Commands/Interval/SetRigidity.hpp>
4#include <Scenario/Commands/ScenarioCommandFactory.hpp>
5#include <Scenario/Commands/TimeSync/SplitTimeSync.hpp>
6
7#include <Dataflow/Commands/CableHelpers.hpp>
8
9#include <score/command/Command.hpp>
10#include <score/model/Identifier.hpp>
11#include <score/model/path/Path.hpp>
12#include <score/selection/Selection.hpp>
13#include <score/tools/std/Optional.hpp>
14
15#include <QByteArray>
16#include <QPair>
17#include <QVector>
18
19struct DataStreamInput;
20struct DataStreamOutput;
21
22namespace Scenario
23{
24class IntervalModel;
25class EventModel;
26class StateModel;
27class TimeSyncModel;
28class CommentBlockModel;
29class ProcessModel;
30namespace Command
31{
37class SCORE_PLUGIN_SCENARIO_EXPORT RemoveSelection final : public score::Command
38{
39 SCORE_COMMAND_DECL(CommandFactoryName(), RemoveSelection, "Remove selected elements")
40public:
42
43 void undo(const score::DocumentContext& ctx) const override;
44 void redo(const score::DocumentContext& ctx) const override;
45
46protected:
47 void serializeImpl(DataStreamInput&) const override;
48 void deserializeImpl(DataStreamOutput&) override;
49
50private:
52
53 std::vector<std::pair<Id<CommentBlockModel>, QByteArray>> m_removedComments;
54 std::vector<std::pair<Id<StateModel>, QByteArray>> m_removedStates;
55 std::vector<std::pair<Id<EventModel>, QByteArray>> m_cleanedEvents;
56 std::vector<std::pair<Id<TimeSyncModel>, QByteArray>> m_cleanedTimeSyncs;
57 std::vector<std::pair<Id<IntervalModel>, QByteArray>> m_removedIntervals;
58 std::vector<SetRigidity> m_cmds_set_rigidity;
59 Dataflow::SerializedCables m_cables;
60};
61}
62}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
The RemoveSelection class.
Definition RemoveSelection.hpp:38
The core hierarchical and temporal process of score.
Definition ScenarioModel.hpp:37
Definition Selection.hpp:12
The Command class.
Definition Command.hpp:34
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18