Loading...
Searching...
No Matches
TimeSyncPresenter.hpp
1#pragma once
2
3#include <Scenario/Document/VerticalExtent.hpp>
4
5#include <score/graphics/GraphicsItem.hpp>
6#include <score/model/Identifier.hpp>
7
8#include <QObject>
9#include <QPoint>
10
11#include <sys/types.h>
12
13#include <score_plugin_scenario_export.h>
14
15#include <verdigris>
16
17class QGraphicsItem;
18class QMimeData;
19
20namespace Scenario
21{
22class EventModel;
23class EventPresenter;
24class TimeSyncModel;
25class TimeSyncView;
26class TriggerView;
27
28class SCORE_PLUGIN_SCENARIO_EXPORT TimeSyncPresenter final : public QObject
29{
30 W_OBJECT(TimeSyncPresenter)
31public:
33 const TimeSyncModel& model, QGraphicsItem* parentview, QObject* parent);
35
36 const Id<TimeSyncModel>& id() const;
37 int32_t id_val() const { return id().val(); }
38
39 const TimeSyncModel& model() const;
40 TimeSyncView* view() const;
41
42 TriggerView& trigger() const noexcept;
43 void handleDrop(const QPointF& pos, const QMimeData& mime);
44
45 void addEvent(EventPresenter* ev);
46 void removeEvent(EventPresenter* ev);
47
48 const VerticalExtent& extent() const noexcept;
49 void setExtent(const VerticalExtent& extent);
50
51 void extentChanged(const Scenario::VerticalExtent& arg_1)
52 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, extentChanged, arg_1)
53
54 const std::vector<EventPresenter*>& events() const noexcept { return m_events; }
55
56public:
57 void pressed(const QPointF& arg_1)
58 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, pressed, arg_1)
59 void moved(const QPointF& arg_1) E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, moved, arg_1)
60 void released(const QPointF& arg_1)
61 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, released, arg_1)
62
63private:
64 const TimeSyncModel& m_model;
65 std::vector<EventPresenter*> m_events;
67 TriggerView* m_triggerView{};
68 VerticalExtent m_extent;
69};
70}
Definition EventPresenter.hpp:24
Definition TimeSyncModel.hpp:34
Definition TimeSyncPresenter.hpp:29
Definition TimeSyncView.hpp:20
Definition TriggerView.hpp:21
The id_base_t class.
Definition Identifier.hpp:57
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
The VerticalExtent struct.
Definition VerticalExtent.hpp:20
Definition GraphicsItem.hpp:47