BaseScenario.hpp
1 #pragma once
2 #include <Scenario/Document/BaseScenario/BaseScenarioContainer.hpp>
3 
4 #include <score/model/IdentifiedObject.hpp>
5 #include <score/selection/Selection.hpp>
6 #include <score/serialization/VisitorInterface.hpp>
7 #include <score/tools/Metadata.hpp>
8 
9 #include <QVector>
10 
11 #include <verdigris>
12 
13 class DataStream;
14 class JSONObject;
15 class QObject;
16 #include <score/model/Identifier.hpp>
17 namespace Scenario
18 {
19 class IntervalModel;
20 class TimeSyncModel;
21 class BaseScenario final
22  : public IdentifiedObject<BaseScenario>
23  , public BaseScenarioContainer
24 {
25  W_OBJECT(BaseScenario)
26  SCORE_SERIALIZE_FRIENDS
27 
28 public:
30  const Id<BaseScenario>& id, const score::DocumentContext& ctx,
31  QObject* parentObject);
32 
33  template <IsDeserializer DeserializerVisitor>
35  DeserializerVisitor&& vis, const score::DocumentContext& ctx, QObject* parent)
36  : IdentifiedObject{vis, parent}
38  {
39  vis.writeTo(*this);
40  }
41 
42  ~BaseScenario() override;
43 
44  Selection selectedChildren() const;
45  bool focused() const;
46 
47  using BaseScenarioContainer::event;
48  using QObject::event;
49 };
50 
51 const QVector<Id<IntervalModel>>
52 intervalsBeforeTimeSync(const BaseScenario&, const Id<TimeSyncModel>& timeSyncId);
53 }
54 
55 DEFAULT_MODEL_METADATA(Scenario::BaseScenario, "Base Scenario")
56 UNDO_NAME_METADATA(EMPTY_MACRO, Scenario::BaseScenario, "Base Scenario")
Definition: VisitorInterface.hpp:53
The IdentifiedObject class.
Definition: IdentifiedObject.hpp:19
Definition: VisitorInterface.hpp:61
Definition: BaseScenarioContainer.hpp:26
Definition: BaseScenario.hpp:24
Definition: Selection.hpp:12
The id_base_t class.
Definition: Identifier.hpp:57
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: BaseScenarioContainer.hpp:30
Definition: DocumentContext.hpp:18