2 #include <Scenario/Document/Interval/ExecutionState.hpp>
3 #include <Scenario/Document/Interval/Temporal/Braces/LeftBrace.hpp>
4 #include <Scenario/Document/ScenarioDocument/ScenarioDocumentViewConstants.hpp>
6 #include <score/graphics/TextItem.hpp>
7 #include <score/model/ColorInterpolator.hpp>
9 #include <QGraphicsItem>
10 #include <qnamespace.h>
12 #include <score_plugin_scenario_export.h>
15 class QGraphicsSceneMouseEvent;
27 class IntervalPresenter;
30 class IntervalMenuOverlay;
33 ,
public QGraphicsItem
36 Q_INTERFACES(QGraphicsItem)
42 static const constexpr
int Type = ItemType::Interval;
43 int type()
const final override {
return Type; }
47 void setInfinite(
bool);
48 bool infinite()
const {
return m_infinite; }
50 void setExecuting(
bool);
51 void setDefaultWidth(
double width);
52 void setMaxWidth(
bool infinite,
double max);
53 void setMinWidth(
double min);
54 void setRigid(
bool r);
55 void setHeight(
double height);
56 double setPlayWidth(
double width);
57 void setValid(
bool val);
59 double height()
const {
return m_height; }
61 bool isSelected()
const {
return m_selected; }
63 double defaultWidth()
const {
return m_defaultWidth; }
65 double minWidth()
const {
return m_minWidth; }
67 double maxWidth()
const {
return m_maxWidth; }
69 bool rigid()
const {
return m_rigid; }
71 double intervalAndRackHeight()
const {
return m_height; }
73 double playWidth()
const {
return m_playWidth; }
75 bool isValid()
const {
return m_validInterval; }
78 void setWarning(
bool warning);
80 void setExecutionState(IntervalExecutionState);
82 const QPixmap& intervalDashedPixmap(
const Process::Style& skin)
const;
84 void updateLabelPos();
85 void updateCounterPos();
86 virtual void updatePaths() = 0;
87 virtual void updatePlayPaths() = 0;
89 void mousePressEvent(QGraphicsSceneMouseEvent* event)
final override;
90 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
final override;
91 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
final override;
96 void setDropTarget(
bool b)
103 void requestOverlayMenu(QPointF arg_1)
104 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, requestOverlayMenu, arg_1)
105 void dropReceived(
const QPointF& pos,
const QMimeData& arg_2)
106 E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, dropReceived, pos, arg_2)
111 void dragEnterEvent(QGraphicsSceneDragDropEvent* event)
override;
112 void dragMoveEvent(QGraphicsSceneDragDropEvent* event)
override;
113 void dragLeaveEvent(QGraphicsSceneDragDropEvent* event)
override;
114 void dropEvent(QGraphicsSceneDragDropEvent* event)
override;
116 QPainterPath shape()
const override;
117 QPainterPath opaqueArea()
const override;
118 bool contains(
const QPointF&)
const override;
120 void setGripCursor();
121 void setUngripCursor();
128 QPainterPath solidPath, playedSolidPath;
130 double m_defaultWidth{};
133 double m_playWidth{};
139 bool m_validInterval : 1;
142 bool m_dropTarget : 1;
144 IntervalExecutionState m_state : 2;
Definition: IntervalPresenter.hpp:30
Definition: IntervalView.hpp:34
Definition: LeftBrace.hpp:12
Definition: LeftBrace.hpp:27
Definition: ColorInterpolator.hpp:9
Definition: TextItem.hpp:28
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:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ScenarioStyle.hpp:13