summaryrefslogtreecommitdiff
path: root/utils/wpseditor/gui/src/slider.cpp
blob: 4cbc714507a5985524c14e01875a8b8d44f7d160 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include "slider.h"
#include <QDebug>
//
Slider::Slider(QWidget *parent, QString caption, int min, int max ):QDialog(parent),mCaption(caption) {
    setupUi ( this );
    connect(horslider, SIGNAL(valueChanged(int)), this, SIGNAL(valueChanged(int)));
    connect(this, SIGNAL(valueChanged(int)), this, SLOT(slotValueChanged(int)));
    setWindowTitle(mCaption);
    horslider->setMinimum(min);
    horslider->setMaximum(max);
}
//
int Slider::value() {
    return horslider->value();
}
void Slider::slotValueChanged(int step) {
    setWindowTitle(tr("%1 = %2 ").arg(mCaption).arg(step));
}