Krita Source Code Documentation
Loading...
Searching...
No Matches
rnuminput.h
Go to the documentation of this file.
1
28#ifndef RNUMINPUT_H
29#define RNUMINPUT_H
30
31// Qt includes
32
33#include <QWidget>
34
35// Local includes
36
37
38
39namespace KDcrawIface
40{
41
42class RIntNumInput : public QWidget
43{
44 Q_OBJECT
45
46public:
47
48 RIntNumInput(QWidget* const parent=0);
49 ~RIntNumInput() override;
50
51 void setRange(int min, int max, int step);
52
53 void setDefaultValue(int d);
54 int defaultValue() const;
55 int value() const;
56
57 void setSuffix(const QString& suffix);
58
59Q_SIGNALS:
60
61 void reset();
62 void valueChanged(int);
63
64public Q_SLOTS:
65
66 void setValue(int d);
67 void slotReset();
68
69private Q_SLOTS:
70
71 void slotValueChanged(int);
72
73private:
74
75 class Private;
76 Private* const d;
77};
78
79// ---------------------------------------------------------
80
81class RDoubleNumInput : public QWidget
82{
83 Q_OBJECT
84
85public:
86
87 RDoubleNumInput(QWidget* const parent=0);
88 ~RDoubleNumInput() override;
89
90 void setDecimals(int p);
91 void setRange(double min, double max, double step);
92
93 void setDefaultValue(double d);
94 double defaultValue() const;
95 double value() const;
96
97 void setSuffix(const QString& suffix);
98
99Q_SIGNALS:
100
101 void reset();
102 void valueChanged(double);
103
104public Q_SLOTS:
105
106 void setValue(double d);
107 void slotReset();
108
109private Q_SLOTS:
110
111 void slotValueChanged(double);
112
113private:
114
115 class Private;
116 Private* const d;
117};
118
119} // namespace KDcrawIface
120
121#endif /* RNUMINPUT_H */
const Params2D p
void setRange(double min, double max, double step)
void setSuffix(const QString &suffix)
RDoubleNumInput(QWidget *const parent=0)
RIntNumInput(QWidget *const parent=0)
Definition rnuminput.cpp:73
void setRange(int min, int max, int step)
void setSuffix(const QString &suffix)