diff options
Diffstat (limited to 'utils/wpseditor/gui/src/slider.cpp')
-rw-r--r-- | utils/wpseditor/gui/src/slider.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/utils/wpseditor/gui/src/slider.cpp b/utils/wpseditor/gui/src/slider.cpp new file mode 100644 index 0000000000..7e3c9a942c --- /dev/null +++ b/utils/wpseditor/gui/src/slider.cpp | |||
@@ -0,0 +1,20 @@ | |||
1 | #include "slider.h" | ||
2 | #include <QDebug> | ||
3 | // | ||
4 | Slider::Slider(QWidget *parent, QString caption, int min, int max ):QDialog(parent) { | ||
5 | setupUi ( this ); | ||
6 | connect(horslider, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int))); | ||
7 | connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int))); | ||
8 | setWindowTitle(caption); | ||
9 | horslider->setMinimum(min); | ||
10 | horslider->setMaximum(max); | ||
11 | } | ||
12 | // | ||
13 | int Slider::value() { | ||
14 | return horslider->value(); | ||
15 | } | ||
16 | void Slider::slotValueChanged(int step) { | ||
17 | setWindowTitle(tr("Value =%1 ").arg(step)); | ||
18 | } | ||
19 | |||
20 | |||