Changeset View
Changeset View
Standalone View
Standalone View
libs/ui/widgets/kis_double_widget.cc
Show All 20 Lines | |||||
21 | 21 | | |||
22 | #include "widgets/kis_double_widget.h" | 22 | #include "widgets/kis_double_widget.h" | ||
23 | 23 | | |||
24 | #include <QLayout> | 24 | #include <QLayout> | ||
25 | #include <QSlider> | 25 | #include <QSlider> | ||
26 | #include <QHBoxLayout> | 26 | #include <QHBoxLayout> | ||
27 | #include <QDoubleSpinBox> | 27 | #include <QDoubleSpinBox> | ||
28 | 28 | | |||
29 | #include "kis_double_parse_spin_box.h" | ||||
30 | | ||||
29 | KisDoubleWidget::KisDoubleWidget(QWidget* parent, const char* name) | 31 | KisDoubleWidget::KisDoubleWidget(QWidget* parent, const char* name) | ||
30 | : QWidget(parent) | 32 | : QWidget(parent) | ||
31 | { | 33 | { | ||
32 | setObjectName(name); | 34 | setObjectName(name); | ||
33 | init(0, 1); | 35 | init(0, 1); | ||
34 | } | 36 | } | ||
35 | 37 | | |||
36 | KisDoubleWidget::KisDoubleWidget(double min, double max, QWidget* parent, const char* name) | 38 | KisDoubleWidget::KisDoubleWidget(double min, double max, QWidget* parent, const char* name) | ||
37 | : QWidget(parent) | 39 | : QWidget(parent) | ||
38 | { | 40 | { | ||
39 | setObjectName(name); | 41 | setObjectName(name); | ||
40 | init(min, max); | 42 | init(min, max); | ||
41 | } | 43 | } | ||
42 | 44 | | |||
43 | KisDoubleWidget::~KisDoubleWidget() | 45 | KisDoubleWidget::~KisDoubleWidget() | ||
44 | { | 46 | { | ||
45 | } | 47 | } | ||
46 | 48 | | |||
47 | void KisDoubleWidget::init(double min, double max) | 49 | void KisDoubleWidget::init(double min, double max) | ||
48 | { | 50 | { | ||
49 | m_spinBox = new QDoubleSpinBox(this); | 51 | m_spinBox = new KisDoubleParseSpinBox(this); | ||
50 | m_spinBox->setMinimum(min); | 52 | m_spinBox->setMinimum(min); | ||
51 | m_spinBox->setMaximum(max); | 53 | m_spinBox->setMaximum(max); | ||
52 | m_spinBox->setSingleStep(0.05); | 54 | m_spinBox->setSingleStep(0.05); | ||
53 | m_spinBox->setValue(0); | 55 | m_spinBox->setValue(0); | ||
54 | m_spinBox->setObjectName("spinbox"); | 56 | m_spinBox->setObjectName("spinbox"); | ||
55 | connect(m_spinBox, SIGNAL(valueChanged(double)), this, SLOT(setSliderValue(double))); | 57 | connect(m_spinBox, SIGNAL(valueChanged(double)), this, SLOT(setSliderValue(double))); | ||
56 | 58 | | |||
57 | m_slider = new QSlider(Qt::Horizontal, this); | 59 | m_slider = new QSlider(Qt::Horizontal, this); | ||
▲ Show 20 Lines • Show All 104 Lines • Show Last 20 Lines |