Changeset View
Changeset View
Standalone View
Standalone View
widgets/imagelib/effects/kpNumInput.cpp
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Line(s) | |||||
45 | 45 | | |||
46 | class kpNumInputPrivate | 46 | class kpNumInputPrivate | ||
47 | { | 47 | { | ||
48 | public: | 48 | public: | ||
49 | kpNumInputPrivate(kpNumInput *q) : | 49 | kpNumInputPrivate(kpNumInput *q) : | ||
50 | q(q), | 50 | q(q), | ||
51 | column1Width(0), | 51 | column1Width(0), | ||
52 | column2Width(0), | 52 | column2Width(0), | ||
53 | label(0), | 53 | label(nullptr), | ||
54 | slider(0), | 54 | slider(nullptr), | ||
55 | labelAlignment(0) | 55 | labelAlignment(nullptr) | ||
56 | { | 56 | { | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | static kpNumInputPrivate *get(const kpNumInput *i) | 59 | static kpNumInputPrivate *get(const kpNumInput *i) | ||
60 | { | 60 | { | ||
61 | return i->d; | 61 | return i->d; | ||
62 | } | 62 | } | ||
63 | 63 | | |||
Show All 33 Lines | |||||
97 | { | 97 | { | ||
98 | return d->slider; | 98 | return d->slider; | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | void kpNumInput::setLabel(const QString &label, Qt::Alignment a) | 101 | void kpNumInput::setLabel(const QString &label, Qt::Alignment a) | ||
102 | { | 102 | { | ||
103 | if (label.isEmpty()) { | 103 | if (label.isEmpty()) { | ||
104 | delete d->label; | 104 | delete d->label; | ||
105 | d->label = 0; | 105 | d->label = nullptr; | ||
106 | d->labelAlignment = 0; | 106 | d->labelAlignment = nullptr; | ||
107 | } else { | 107 | } else { | ||
108 | if (!d->label) { | 108 | if (!d->label) { | ||
109 | d->label = new QLabel(this); | 109 | d->label = new QLabel(this); | ||
110 | } | 110 | } | ||
111 | d->label->setText(label); | 111 | d->label->setText(label); | ||
112 | d->label->setObjectName("kpNumInput::QLabel"); | 112 | d->label->setObjectName("kpNumInput::QLabel"); | ||
113 | d->label->setAlignment(a); | 113 | d->label->setAlignment(a); | ||
114 | // if no vertical alignment set, use Top alignment | 114 | // if no vertical alignment set, use Top alignment | ||
▲ Show 20 Lines • Show All 304 Lines • ▼ Show 20 Line(s) | |||||
419 | } | 419 | } | ||
420 | 420 | | |||
421 | // ---------------------------------------------------------------------------- | 421 | // ---------------------------------------------------------------------------- | ||
422 | 422 | | |||
423 | class kpDoubleNumInput::kpDoubleNumInputPrivate | 423 | class kpDoubleNumInput::kpDoubleNumInputPrivate | ||
424 | { | 424 | { | ||
425 | public: | 425 | public: | ||
426 | kpDoubleNumInputPrivate() | 426 | kpDoubleNumInputPrivate() | ||
427 | : spin(0) {} | 427 | : spin(nullptr) {} | ||
428 | QDoubleSpinBox *spin; | 428 | QDoubleSpinBox *spin; | ||
429 | QSize editSize; | 429 | QSize editSize; | ||
430 | QString specialValue; | 430 | QString specialValue; | ||
431 | }; | 431 | }; | ||
432 | 432 | | |||
433 | kpDoubleNumInput::kpDoubleNumInput(QWidget *parent) | 433 | kpDoubleNumInput::kpDoubleNumInput(QWidget *parent) | ||
434 | : kpNumInput(parent) | 434 | : kpNumInput(parent) | ||
435 | , d(new kpDoubleNumInputPrivate()) | 435 | , d(new kpDoubleNumInputPrivate()) | ||
▲ Show 20 Lines • Show All 275 Lines • Show Last 20 Lines |