Warning, /frameworks/kconfig/autotests/kconfig_compiler/test5.h.ref is written in an unsupported language. File is not indexed.

0001 // This file is generated by kconfig_compiler_kf6 from test5.kcfg.
0002 // All changes you do to this file will be lost.
0003 #ifndef TEST5_H
0004 #define TEST5_H
0005 
0006 #include <kconfigskeleton.h>
0007 #include <QCoreApplication>
0008 #include <QDebug>
0009 
0010 class Test5 : public KConfigSkeleton
0011 {
0012   public:
0013     enum EnumMouseAction { Encrypt, Decrypt, CrashNBurn, PumpNDump };
0014     enum EnumButton { right, mid, left };
0015     static const char* const EnumButtonToString[];
0016 
0017     static Test5 *self();
0018     ~Test5() override;
0019 
0020     /**
0021       Set Block colors.
0022     */
0023     static
0024     void setColor( int i, const QColor & v )
0025     {
0026       if (!self()->isColorImmutable( i ))
0027         self()->mColor[i] = v;
0028     }
0029 
0030     /**
0031       Get Block colors.
0032     */
0033     static
0034     QColor color( int i )
0035     {
0036       return self()->mColor[i];
0037     }
0038 
0039     /**
0040       Is Block colors. Immutable
0041     */
0042     static
0043     bool isColorImmutable( int i )
0044     {
0045       return self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) );
0046     }
0047 
0048     /**
0049       Set Mouse actions.
0050     */
0051     static
0052     void setMouseAction( int i, int v )
0053     {
0054       if (!self()->isMouseActionImmutable( i ))
0055         self()->mMouseAction[i] = v;
0056     }
0057 
0058     /**
0059       Get Mouse actions.
0060     */
0061     static
0062     int mouseAction( int i )
0063     {
0064       return self()->mMouseAction[i];
0065     }
0066 
0067     /**
0068       Is Mouse actions. Immutable
0069     */
0070     static
0071     bool isMouseActionImmutable( int i )
0072     {
0073       return self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButtonToString[i] ) ) );
0074     }
0075 
0076     /**
0077       Set foo bar
0078     */
0079     static
0080     void setFooBar( const QString & v )
0081     {
0082       if (!self()->isFooBarImmutable())
0083         self()->mFooBar = v;
0084     }
0085 
0086     /**
0087       Get foo bar
0088     */
0089     static
0090     QString fooBar()
0091     {
0092       return self()->mFooBar;
0093     }
0094 
0095     /**
0096       Is foo bar Immutable
0097     */
0098     static
0099     bool isFooBarImmutable()
0100     {
0101       return self()->isImmutable( QStringLiteral( "FooBar" ) );
0102     }
0103 
0104     /**
0105       Set Age
0106     */
0107     static
0108     void setAge( int v )
0109     {
0110       if (v < 8)
0111       {
0112         qDebug() << "setAge: value " << v << " is less than the minimum value of 8";
0113         v = 8;
0114       }
0115 
0116       if (v > 88)
0117       {
0118         qDebug() << "setAge: value " << v << " is greater than the maximum value of 88";
0119         v = 88;
0120       }
0121 
0122       if (!self()->isAgeImmutable())
0123         self()->mAge = v;
0124     }
0125 
0126     /**
0127       Get Age
0128     */
0129     static
0130     int age()
0131     {
0132       return self()->mAge;
0133     }
0134 
0135     /**
0136       Is Age Immutable
0137     */
0138     static
0139     bool isAgeImmutable()
0140     {
0141       return self()->isImmutable( QStringLiteral( "Age" ) );
0142     }
0143 
0144   protected:
0145     Test5(QObject *parent = nullptr);
0146     friend class Test5Helper;
0147 
0148 
0149     // Foo
0150     QColor mColor[4];
0151     int mMouseAction[3];
0152     QString mFooBar;
0153     int mAge;
0154 
0155   private:
0156 };
0157 
0158 #endif
0159