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