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

0001 // This file is generated by kconfig_compiler_kf6 from test4.kcfg.
0002 // All changes you do to this file will be lost.
0003 #ifndef TEST4_H
0004 #define TEST4_H
0005 
0006 #include <kconfigskeleton.h>
0007 #include <QCoreApplication>
0008 #include <QDebug>
0009 
0010 class Test4 : public KConfigSkeleton
0011 {
0012   public:
0013     class EnumMouseAction
0014     {
0015       public:
0016       enum type { Encrypt, Decrypt, CrashNBurn, PumpNDump, COUNT };
0017     };
0018     class EnumButton
0019     {
0020       public:
0021       enum type { right, mid, left, COUNT };
0022       static const char* const enumToString[];
0023     };
0024 
0025     static Test4 *self();
0026     ~Test4() override;
0027 
0028     /**
0029       Set Block colors.
0030     */
0031     static
0032     void setColor( int i, const QColor & v )
0033     {
0034       if (!self()->isColorImmutable( i ))
0035         self()->mColor[i] = v;
0036     }
0037 
0038     /**
0039       Get Block colors.
0040     */
0041     static
0042     QColor color( int i )
0043     {
0044       return self()->mColor[i];
0045     }
0046 
0047     /**
0048       Is Block colors. Immutable
0049     */
0050     static
0051     bool isColorImmutable( int i )
0052     {
0053       return self()->isImmutable( QStringLiteral( "Color%1" ).arg( i ) );
0054     }
0055 
0056     /**
0057       Set Mouse actions.
0058     */
0059     static
0060     void setMouseAction( int i, int v )
0061     {
0062       if (!self()->isMouseActionImmutable( i ))
0063         self()->mMouseAction[i] = v;
0064     }
0065 
0066     /**
0067       Get Mouse actions.
0068     */
0069     static
0070     int mouseAction( int i )
0071     {
0072       return self()->mMouseAction[i];
0073     }
0074 
0075     /**
0076       Is Mouse actions. Immutable
0077     */
0078     static
0079     bool isMouseActionImmutable( int i )
0080     {
0081       return self()->isImmutable( QStringLiteral( "MouseAction%1" ).arg( QLatin1String( EnumButton::enumToString[i] ) ) );
0082     }
0083 
0084     /**
0085       Set Gray colors.
0086     */
0087     static
0088     void setGrayColor( int i, const QColor & v )
0089     {
0090       if (!self()->isGrayColorImmutable( i ))
0091         self()->mGrayColor[i] = v;
0092     }
0093 
0094     /**
0095       Get Gray colors.
0096     */
0097     static
0098     QColor grayColor( int i )
0099     {
0100       return self()->mGrayColor[i];
0101     }
0102 
0103     /**
0104       Is Gray colors. Immutable
0105     */
0106     static
0107     bool isGrayColorImmutable( int i )
0108     {
0109       return self()->isImmutable( QStringLiteral( "GrayColor%1" ).arg( i ) );
0110     }
0111 
0112     /**
0113       Set Gray colors as string.
0114     */
0115     static
0116     void setColorString( int i, const QString & v )
0117     {
0118       if (!self()->isColorStringImmutable( i ))
0119         self()->mColorString[i] = v;
0120     }
0121 
0122     /**
0123       Get Gray colors as string.
0124     */
0125     static
0126     QString colorString( int i )
0127     {
0128       return self()->mColorString[i];
0129     }
0130 
0131     /**
0132       Is Gray colors as string. Immutable
0133     */
0134     static
0135     bool isColorStringImmutable( int i )
0136     {
0137       return self()->isImmutable( QStringLiteral( "ColorString%1" ).arg( i ) );
0138     }
0139 
0140     /**
0141       Set foo bar
0142     */
0143     static
0144     void setFooBar( const QString & v )
0145     {
0146       if (!self()->isFooBarImmutable())
0147         self()->mFooBar = v;
0148     }
0149 
0150     /**
0151       Get foo bar
0152     */
0153     static
0154     QString fooBar()
0155     {
0156       return self()->mFooBar;
0157     }
0158 
0159     /**
0160       Is foo bar Immutable
0161     */
0162     static
0163     bool isFooBarImmutable()
0164     {
0165       return self()->isImmutable( QStringLiteral( "FooBar" ) );
0166     }
0167 
0168     /**
0169       Set Age
0170     */
0171     static
0172     void setAge( int v )
0173     {
0174       if (v < 8)
0175       {
0176         qDebug() << "setAge: value " << v << " is less than the minimum value of 8";
0177         v = 8;
0178       }
0179 
0180       if (v > 88)
0181       {
0182         qDebug() << "setAge: value " << v << " is greater than the maximum value of 88";
0183         v = 88;
0184       }
0185 
0186       if (!self()->isAgeImmutable())
0187         self()->mAge = v;
0188     }
0189 
0190     /**
0191       Get Age
0192     */
0193     static
0194     int age()
0195     {
0196       return self()->mAge;
0197     }
0198 
0199     /**
0200       Is Age Immutable
0201     */
0202     static
0203     bool isAgeImmutable()
0204     {
0205       return self()->isImmutable( QStringLiteral( "Age" ) );
0206     }
0207 
0208   protected:
0209     Test4();
0210     friend class Test4Helper;
0211 
0212 
0213     // Foo
0214     QColor mColor[4];
0215     int mMouseAction[3];
0216     QColor mGrayColor[11];
0217     QString mColorString[11];
0218     QString mFooBar;
0219     int mAge;
0220 
0221   private:
0222 };
0223 
0224 #endif
0225