aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test13.h.ref
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-04-26 01:41:29 +0200
committerAleix Pol <aleixpol@kde.org>2015-04-26 01:41:29 +0200
commit97552ff2ecd13eb4398231650e2f719f7a7ba052 (patch)
treeae9d525c7200cc734f1976bc9fc49f16f954976f /autotests/kconfig_compiler/test13.h.ref
parent611ab289b16e100f4842906bb956e479d7c4e7a4 (diff)
downloadkconfig-97552ff2ecd13eb4398231650e2f719f7a7ba052.tar.gz
kconfig-97552ff2ecd13eb4398231650e2f719f7a7ba052.tar.bz2
Generate Q_PROPERTY entries out of KConfigSkeleton classes
It adds a configuration setting that makes it possible to generate Q_PROPERTY instances out of each variable exposed by the configuration class. Especially useful when it comes to exposing these classes to QtQuick interfaces. REVIEW: 123367 CHANGELOG: Generate QML-proof classes using the kconfigcompiler
Diffstat (limited to 'autotests/kconfig_compiler/test13.h.ref')
-rw-r--r--autotests/kconfig_compiler/test13.h.ref70
1 files changed, 70 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test13.h.ref b/autotests/kconfig_compiler/test13.h.ref
new file mode 100644
index 00000000..0636ad2f
--- /dev/null
+++ b/autotests/kconfig_compiler/test13.h.ref
@@ -0,0 +1,70 @@
+// This file is generated by kconfig_compiler_kf5 from test13.kcfg.
+// All changes you do to this file will be lost.
+#ifndef TEST13_H
+#define TEST13_H
+
+#include <qglobal.h>
+#include <kconfigskeleton.h>
+#include <QCoreApplication>
+#include <QDebug>
+
+class Test13 : public KConfigSkeleton
+{
+ Q_OBJECT
+ public:
+
+ Test13( );
+ ~Test13();
+
+
+ Q_PROPERTY(QUrl picturesDir READ picturesDir CONSTANT)
+ /**
+ Get picturesDir
+ */
+ QUrl picturesDir() const
+ {
+ return mPicturesDir;
+ }
+
+ /**
+ Set brightness
+ */
+ void setBrightness( double v )
+ {
+ if (v != mBrightness && !isImmutable( QString::fromLatin1( "brightness" ) )) {
+ mBrightness = v;
+ Q_EMIT brightnessChanged();
+ }
+ }
+
+ Q_PROPERTY(double brightness READ brightness WRITE setBrightness NOTIFY brightnessChanged)
+ /**
+ Get brightness
+ */
+ double brightness() const
+ {
+ return mBrightness;
+ }
+
+
+ enum {
+ signalBrightnessChanged = 0x1
+ };
+
+ Q_SIGNALS:
+ void brightnessChanged();
+
+ private:
+ void itemChanged(quint64 flags);
+
+ protected:
+
+ // kamoso
+ QUrl mPicturesDir;
+ double mBrightness;
+
+ private:
+};
+
+#endif
+