aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test_notifiers.h.ref
blob: 6d73b7d01af3041b36e3c670793e74e14469fbed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// This file is generated by kconfig_compiler_kf5 from test_notifiers.kcfg.
// All changes you do to this file will be lost.
#ifndef TESTNOTIFIERS_H
#define TESTNOTIFIERS_H

#include <kconfigskeleton.h>
#include <QCoreApplication>
#include <QDebug>

class TestNotifiers : public KConfigSkeleton
{
  public:

    TestNotifiers( int Number );
    ~TestNotifiers();

    /**
      Set Block colors.
    */
    void setColor( const QColor & v )
    {
      if (!isColorImmutable())
        mColor = v;
    }

    /**
      Get Block colors.
    */
    QColor color() const
    {
      return mColor;
    }

    /**
      Is Block colors. Immutable
    */
    bool isColorImmutable() const
    {
      return isImmutable( QStringLiteral( "Color" ) );
    }

    /**
      Set foo bar
    */
    void setFooBar( const QString & v )
    {
      if (!isFooBarImmutable())
        mFooBar = v;
    }

    /**
      Get foo bar
    */
    QString fooBar() const
    {
      return mFooBar;
    }

    /**
      Is foo bar Immutable
    */
    bool isFooBarImmutable() const
    {
      return isImmutable( QStringLiteral( "FooBar" ) );
    }

    /**
      Set Age
    */
    void setAge( int v )
    {
      if (v < 8)
      {
        qDebug() << "setAge: value " << v << " is less than the minimum value of 8";
        v = 8;
      }

      if (v > 88)
      {
        qDebug() << "setAge: value " << v << " is greater than the maximum value of 88";
        v = 88;
      }

      if (!isAgeImmutable())
        mAge = v;
    }

    /**
      Get Age
    */
    int age() const
    {
      return mAge;
    }

    /**
      Is Age Immutable
    */
    bool isAgeImmutable() const
    {
      return isImmutable( QStringLiteral( "Age" ) );
    }

  protected:
    int mParamNumber;

    // Foo
    QColor mColor;

    // Bar$(Number)
    QString mFooBar;
    int mAge;

  private:
};

#endif