2 #include <score/model/Skin.hpp>
4 #include <ossia/detail/ssize.hpp>
6 #include <QGraphicsItem>
16 std::vector<QLineF> positions;
19 setFlag(ItemStacksBehindParent);
26 QRectF boundingRect()
const
31 positions.front().x1(), 0, positions.back().x1() - positions.front().x1(),
35 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
37 painter->setRenderHint(QPainter::Antialiasing,
true);
38 painter->setPen(score::Skin::instance().DarkGray.main.pen_cosmetic);
39 painter->drawLines(positions.data(), positions.size());
42 QLineF& operator[](
int i)
44 if(i >= std::ssize(positions))
46 positions.resize((i + 1) * 1.2);
53 prepareGeometryChange();
61 std::vector<QLineF> positions;
64 setFlag(ItemStacksBehindParent);
71 QRectF boundingRect()
const
76 positions.front().x1(), 0, positions.back().x1() - positions.front().x1(),
80 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
82 painter->setRenderHint(QPainter::Antialiasing,
true);
83 painter->setPen(score::Skin::instance().DarkGray.darker300.pen_cosmetic);
84 painter->drawLines(positions.data(), positions.size());
87 QLineF& operator[](
int i)
89 if(i >= std::ssize(positions))
91 positions.resize((i + 1) * 1.2);
98 prepareGeometryChange();
Definition: Timebar.hpp:14
Definition: Timebar.hpp:59
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14