2 #include <score/graphics/widgets/Constants.hpp>
4 #include <QGraphicsItem>
7 #include <score_lib_base_export.h>
15 ,
public QGraphicsItem
18 SCORE_GRAPHICS_ITEM_TYPE(70)
25 QRectF m_rect{defaultKnobSize};
28 double min{}, max{}, init{};
38 double unmap(
double v)
const noexcept {
return (v - min) / (max - min); }
39 double map(
double v)
const noexcept {
return (v * (max - min)) + min; }
41 void setRect(
const QRectF& r);
42 void setRange(
double min,
double max,
double init);
43 void setValue(
double v);
45 void setExecutionValue(
double v);
46 void resetExecution();
48 QRectF boundingRect()
const override;
53 void sliderMoved() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderMoved)
54 void sliderReleased() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderReleased)
57 void mousePressEvent(QGraphicsSceneMouseEvent* event)
override;
58 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
override;
59 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override;
60 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
override;
61 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
override;
63 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
Definition: QGraphicsKnob.hpp:16
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DefaultControlImpl.hpp:10
Definition: DefaultGraphicsKnobImpl.hpp:24