2 #include <score/graphics/widgets/Constants.hpp>
3 #include <score/graphics/widgets/QGraphicsSliderBase.hpp>
5 #include <QGraphicsItem>
8 #include <score_lib_base_export.h>
19 SCORE_GRAPHICS_ITEM_TYPE(190)
29 double min{}, max{}, init{};
39 double from01(
double v)
const noexcept {
return v; }
40 double unmap(
double v)
const noexcept {
return (v - min) / (max - min); }
41 double map(
double v)
const noexcept {
return (v * (max - min)) + min; }
43 void setRange(
double min,
double max,
double init);
44 void setValue(
double v);
46 void setExecutionValue(
double v);
47 void resetExecution();
52 void sliderMoved() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderMoved)
53 void sliderReleased() E_SIGNAL(SCORE_LIB_BASE_EXPORT, sliderReleased)
56 void mousePressEvent(QGraphicsSceneMouseEvent* event)
override;
57 void mouseMoveEvent(QGraphicsSceneMouseEvent* event)
override;
58 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override;
59 void contextMenuEvent(QGraphicsSceneContextMenuEvent* event)
override;
60 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
override;
62 void paint(QPainter* painter,
const QStyleOptionGraphicsItem* option, QWidget* widget)
Definition: QGraphicsSlider.hpp:17
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DefaultControlImpl.hpp:10
Definition: DefaultGraphicsSliderImpl.hpp:31
Definition: QGraphicsSliderBase.hpp:17