Loading...
Searching...
No Matches
TemporalIntervalView.hpp
1#pragma once
2#include <Process/TimeValue.hpp>
3
4#include <Scenario/Document/Interval/ExecutionState.hpp>
5#include <Scenario/Document/Interval/IntervalView.hpp>
6
7#include <score/graphics/TextItem.hpp>
8#include <score/model/ColorReference.hpp>
9#include <score/widgets/MimeData.hpp>
10
11#include <QPainter>
12#include <QRect>
13
14#include <verdigris>
15namespace Process
16{
17class LayerPresenter;
18}
19namespace Scenario
20{
21class TemporalIntervalPresenter;
22class IntervalDurations;
23class SCORE_PLUGIN_SCENARIO_EXPORT TemporalIntervalView final : public IntervalView
24{
25 W_OBJECT(TemporalIntervalView)
26
27public:
28 TemporalIntervalView(TemporalIntervalPresenter& presenter, QGraphicsItem* parent);
29 ~TemporalIntervalView() override;
30
31 static const constexpr int Type = ItemType::TemporalInterval;
32 int type() const final override { return Type; }
33
34 QRectF boundingRect() const override;
35
36 const TemporalIntervalPresenter& presenter() const;
37 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
38 override;
39
40 void setExecutionDuration(const TimeVal& progress);
41
42 void updateOverlayPos();
43 void setSelected(bool selected);
44
45public:
46 void intervalHoverEnter() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, intervalHoverEnter)
47 void intervalHoverLeave() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, intervalHoverLeave)
48
49private:
50 void hoverEnterEvent(QGraphicsSceneHoverEvent* h) override;
51 void hoverLeaveEvent(QGraphicsSceneHoverEvent* h) override;
52
53 void updatePaths() final override;
54 void updatePlayPaths() final override;
55 void drawDashedPath(QPainter& p, QRectF visibleRect, const Process::Style& skin);
56 void drawPlayDashedPath(QPainter& p, QRectF visibleRect, const Process::Style& skin);
57};
58}
Definition IntervalView.hpp:34
Definition TemporalIntervalPresenter.hpp:25
Definition TemporalIntervalView.hpp:24
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1115
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition ScenarioStyle.hpp:13
Definition TimeValue.hpp:21