Loading...
Searching...
No Matches
AddressBarItem.hpp
1#pragma once
2#include <Scenario/Document/Interval/IntervalModel.hpp>
3
4#include <score/model/path/ObjectPath.hpp>
5
6#include <QGraphicsItem>
7#include <QList>
8#include <QRect>
9
10#include <verdigris>
11
12class QPainter;
13class QStyleOptionGraphicsItem;
14class QWidget;
15
16namespace Scenario
17{
18class IntervalModel;
19class ClickableLabelItem;
20class AddressBarItem final
21 : public QObject
22 , public QGraphicsItem
23{
24 W_OBJECT(AddressBarItem)
25 Q_INTERFACES(QGraphicsItem)
26public:
27 AddressBarItem(const score::DocumentContext& ctx, QGraphicsItem* parent);
28
29 double width() const;
30 void setTargetObject(ObjectPath&&);
31
32 QRectF boundingRect() const override;
33 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
34 override;
35
36public:
37 void needRedraw() W_SIGNAL(needRedraw);
38 void intervalSelected(IntervalModel* cst) W_SIGNAL(intervalSelected, cst);
39
40private:
41 void redraw();
42 QList<QGraphicsItem*> m_items;
43 ObjectPath m_currentPath;
44 const score::DocumentContext& m_ctx;
45
46 double m_width{};
47};
48}
The ObjectPath class.
Definition ObjectPath.hpp:37
Definition AddressBarItem.hpp:23
Definition IntervalModel.hpp:50
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DocumentContext.hpp:18