ObjectMapper.hpp
1 #pragma once
2 #include <Scenario/Document/Interval/Slot.hpp>
3 
4 #include <score/model/Identifier.hpp>
5 
6 class QGraphicsItem;
7 namespace Scenario
8 {
9 class EventModel;
10 class TimeSyncModel;
11 class IntervalModel;
12 class StateModel;
13 
14 struct SCORE_PLUGIN_SCENARIO_EXPORT ObjectMapper
15 {
16 
17  static OptionalId<EventModel>
18  itemToEventId(const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
19  static OptionalId<EventModel> itemToConditionId(
20  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
21  static OptionalId<TimeSyncModel> itemToTimeSyncId(
22  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
23  static OptionalId<TimeSyncModel>
24  itemToTriggerId(const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
25  static OptionalId<IntervalModel> itemToIntervalId(
26  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
27  static OptionalId<IntervalModel> itemToGraphIntervalId(
28  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
29  static OptionalId<StateModel>
30  itemToStateId(const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
31 
32  static std::optional<SlotPath> itemToIntervalFromHeader(
33  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
34  static std::optional<SlotPath> itemToIntervalFromFooter(
35  const QGraphicsItem* pressedItem, const QObject* parentModel) noexcept;
36 };
37 
38 }
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: ObjectMapper.hpp:15