2 #include <score/graphics/widgets/Constants.hpp>
3 #include <score/graphics/widgets/QGraphicsSpinbox.hpp>
5 #include <ossia-qt/value_metatypes.hpp>
7 #include <QGraphicsItem>
10 #include <score_lib_base_export.h>
16 struct DefaultGraphicsSpinboxImpl;
19 ,
public QGraphicsItem
22 SCORE_GRAPHICS_ITEM_TYPE(260)
24 QRectF m_rect{0., 0., 150., 24.};
33 void setPoint(
const QPointF& r);
34 void setValue(std::array<float, 2> v);
35 void setValue(std::array<double, 2> v);
37 ossia::vec2f min = {0.f, 0.f}, ossia::vec2f max = {1.f, 1.f},
38 ossia::vec2f init = {0.f, 0.f});
40 std::array<double, 2> value()
const noexcept;
41 std::array<double, 2> getMin()
const noexcept;
42 std::array<double, 2> getMax()
const noexcept;
47 void sliderMoved() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderMoved)
48 void sliderReleased() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderReleased)
51 std::array<double, 2> scaledValue(
double x,
double y)
const noexcept;
52 QRectF boundingRect()
const override;
53 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
59 ,
public QGraphicsItem
62 SCORE_GRAPHICS_ITEM_TYPE(270)
64 QRectF m_rect{0., 0., 150., 24.};
74 void setPoint(
const QPointF& r);
75 void setValue(std::array<float, 2> v);
76 void setValue(std::array<double, 2> v);
78 ossia::vec2f min = {0.f, 0.f}, ossia::vec2f max = {1.f, 1.f},
79 ossia::vec2f init = {0.f, 0.f});
81 std::array<double, 2> value()
const noexcept;
82 std::array<double, 2> getMin()
const noexcept;
83 std::array<double, 2> getMax()
const noexcept;
88 void sliderMoved() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderMoved)
89 void sliderReleased() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderReleased)
92 std::array<double, 2> scaledValue(
double x,
double y)
const noexcept;
93 QRectF boundingRect()
const override;
94 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
Definition: QGraphicsSpinbox.hpp:64
Definition: QGraphicsXYSpinbox.hpp:60
Definition: QGraphicsSpinbox.hpp:15
Definition: QGraphicsXYSpinbox.hpp:20
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DefaultGraphicsSpinboxImpl.hpp:24