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 QRectF boundingRect() const override;
32
33 const TemporalIntervalPresenter& presenter() const;
34 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
35 override;
36
37 void setExecutionDuration(const TimeVal& progress);
38
39 void updateOverlayPos();
40 void setSelected(bool selected);
41
42public:
43 void intervalHoverEnter() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, intervalHoverEnter)
44 void intervalHoverLeave() E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, intervalHoverLeave)
45
46private:
47 void hoverEnterEvent(QGraphicsSceneHoverEvent* h) override;
48 void hoverLeaveEvent(QGraphicsSceneHoverEvent* h) override;
49
50 void updatePaths() final override;
51 void updatePlayPaths() final override;
52 void drawDashedPath(QPainter& p, QRectF visibleRect, const Process::Style& skin);
53 void drawPlayDashedPath(QPainter& p, QRectF visibleRect, const Process::Style& skin);
54};
55}
Definition IntervalView.hpp:34
Definition TemporalIntervalPresenter.hpp:25
Definition TemporalIntervalView.hpp:24
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition ScenarioStyle.hpp:13
Definition TimeValue.hpp:21