Changeset View
Changeset View
Standalone View
Standalone View
autotests/kconfig_compiler/test_notifiers.h.ref
- This file was added.
1 | // This file is generated by kconfig_compiler_kf5 from test_notifiers.kcfg. | ||||
---|---|---|---|---|---|
2 | // All changes you do to this file will be lost. | ||||
3 | #ifndef TESTNOTIFIERS_H | ||||
4 | #define TESTNOTIFIERS_H | ||||
5 | | ||||
6 | #include <kconfigskeleton.h> | ||||
7 | #include <QCoreApplication> | ||||
8 | #include <QDebug> | ||||
9 | | ||||
10 | class TestNotifiers : public KConfigSkeleton | ||||
11 | { | ||||
12 | public: | ||||
13 | | ||||
14 | TestNotifiers( int Number ); | ||||
15 | ~TestNotifiers(); | ||||
16 | | ||||
17 | /** | ||||
18 | Set Block colors. | ||||
19 | */ | ||||
20 | void setColor( const QColor & v ) | ||||
21 | { | ||||
22 | if (!isImmutable( QStringLiteral( "Color" ) )) | ||||
23 | mColor = v; | ||||
24 | } | ||||
25 | | ||||
26 | /** | ||||
27 | Get Block colors. | ||||
28 | */ | ||||
29 | QColor color() const | ||||
30 | { | ||||
31 | return mColor; | ||||
32 | } | ||||
33 | | ||||
34 | /** | ||||
35 | Set foo bar | ||||
36 | */ | ||||
37 | void setFooBar( const QString & v ) | ||||
38 | { | ||||
39 | if (!isImmutable( QStringLiteral( "FooBar" ) )) | ||||
40 | mFooBar = v; | ||||
41 | } | ||||
42 | | ||||
43 | /** | ||||
44 | Get foo bar | ||||
45 | */ | ||||
46 | QString fooBar() const | ||||
47 | { | ||||
48 | return mFooBar; | ||||
49 | } | ||||
50 | | ||||
51 | /** | ||||
52 | Set Age | ||||
53 | */ | ||||
54 | void setAge( int v ) | ||||
55 | { | ||||
56 | if (v < 8) | ||||
57 | { | ||||
58 | qDebug() << "setAge: value " << v << " is less than the minimum value of 8"; | ||||
59 | v = 8; | ||||
60 | } | ||||
61 | | ||||
62 | if (v > 88) | ||||
63 | { | ||||
64 | qDebug() << "setAge: value " << v << " is greater than the maximum value of 88"; | ||||
65 | v = 88; | ||||
66 | } | ||||
67 | | ||||
68 | if (!isImmutable( QStringLiteral( "Age" ) )) | ||||
69 | mAge = v; | ||||
70 | } | ||||
71 | | ||||
72 | /** | ||||
73 | Get Age | ||||
74 | */ | ||||
75 | int age() const | ||||
76 | { | ||||
77 | return mAge; | ||||
78 | } | ||||
79 | | ||||
80 | protected: | ||||
81 | int mParamNumber; | ||||
82 | | ||||
83 | // Foo | ||||
84 | QColor mColor; | ||||
85 | | ||||
86 | // Bar$(Number) | ||||
87 | QString mFooBar; | ||||
88 | int mAge; | ||||
89 | | ||||
90 | private: | ||||
91 | }; | ||||
92 | | ||||
93 | #endif | ||||
94 | |