5 #ifndef CNOID_BASE_SCROLLBAR_H
6 #define CNOID_BASE_SCROLLBAR_H
8 #include <cnoid/Signal>
10 #include "exportdecl.h"
20 ScrollBar(Qt::Orientation orientation, QWidget* parent = 0);
23 return sigValueChanged_;
27 void onValueChanged(
int value);
30 Signal<void(
int)> sigValueChanged_;
43 double getMaximum()
const {
return QScrollBar::maximum() / resolution; }
44 double getMinimum()
const {
return QScrollBar::minimum() / resolution; }
45 double getPageStep()
const {
return QScrollBar::pageStep() / resolution; }
46 double getSingleStep()
const {
return QScrollBar::singleStep() / resolution; }
47 double getValue()
const {
return value() / resolution; }
50 QScrollBar::setRange(min * resolution, max * resolution);
54 QScrollBar::setPageStep(step * resolution);
58 QScrollBar::setSingleStep(step * resolution);
62 QScrollBar::setValue(value * resolution);
66 return sigValueChanged_;
70 void onValueChanged(
int value);
73 Signal<void(
double)> sigValueChanged_;
79 int maximum()
const {
return QScrollBar::maximum(); }
80 int minimum()
const {
return QScrollBar::minimum(); }
81 int pageStep()
const {
return QScrollBar::pageStep(); }
82 int singleStep()
const {
return QScrollBar::singleStep(); }
83 int value()
const {
return QScrollBar::value(); }
84 void setMaximum(
int max) { QScrollBar::setMaximum(max); }
85 void setMinimum(
int min) { QScrollBar::setMinimum(min); }
86 void setPageStep(
int step) { QScrollBar::setPageStep(step); }
87 void setRange(
int min,
int max) { QScrollBar::setRange(min, max); }
88 void setSingleStep(
int step) { QScrollBar::setSingleStep(step); }
89 void setValue(
int value) { QScrollBar::setValue(value); }