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

0001 // This file is generated by kconfig_compiler_kf6 from test_properties_minmax.kcfg.
0002 // All changes you do to this file will be lost.
0003 #ifndef TESTPROPERTIESMINMAX_H
0004 #define TESTPROPERTIESMINMAX_H
0005 
0006 #include <qglobal.h>
0007 #include <kconfigskeleton.h>
0008 #include <QCoreApplication>
0009 #include <QDebug>
0010 
0011 class TestPropertiesMinMax : public KConfigSkeleton
0012 {
0013   Q_OBJECT
0014   public:
0015 
0016     TestPropertiesMinMax( KSharedConfig::Ptr config = KSharedConfig::openConfig() );
0017     ~TestPropertiesMinMax() override;
0018 
0019     /**
0020       Set bar
0021     */
0022     void setBar( int v )
0023     {
0024       if (v < 36)
0025       {
0026         qDebug() << "setBar: value " << v << " is less than the minimum value of 36";
0027         v = 36;
0028       }
0029 
0030       if (v > 102)
0031       {
0032         qDebug() << "setBar: value " << v << " is greater than the maximum value of 102";
0033         v = 102;
0034       }
0035 
0036       if (v != mBar && !isBarImmutable()) {
0037         mBar = v;
0038         Q_EMIT barChanged();
0039       }
0040     }
0041 
0042     Q_PROPERTY(int bar READ bar WRITE setBar NOTIFY barChanged)
0043     Q_PROPERTY(bool isBarImmutable READ isBarImmutable CONSTANT)
0044     /**
0045       Get bar
0046     */
0047     int bar() const
0048     {
0049       return mBar;
0050     }
0051 
0052     /**
0053       Is bar Immutable
0054     */
0055     bool isBarImmutable() const
0056     {
0057       return isImmutable( QStringLiteral( "bar" ) );
0058     }
0059 
0060 
0061     enum {
0062       signalBarChanged = 1
0063     };
0064 
0065   Q_SIGNALS:
0066     void barChanged();
0067 
0068   private:
0069     void itemChanged(quint64 signalFlag);
0070 
0071   protected:
0072 
0073     // Something
0074     int mBar;
0075 
0076   private:
0077 };
0078 
0079 #endif
0080