aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test13.cpp.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.cpp.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.cpp.ref')
-rw-r--r--autotests/kconfig_compiler/test13.cpp.ref34
1 files changed, 34 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test13.cpp.ref b/autotests/kconfig_compiler/test13.cpp.ref
new file mode 100644
index 00000000..4eac1034
--- /dev/null
+++ b/autotests/kconfig_compiler/test13.cpp.ref
@@ -0,0 +1,34 @@
+// This file is generated by kconfig_compiler_kf5 from test13.kcfg.
+// All changes you do to this file will be lost.
+
+#include "test13.h"
+
+Test13::Test13( )
+ : KConfigSkeleton( QLatin1String( "muondatasourcesrc" ) )
+{
+ KConfigCompilerSignallingItem::NotifyFunction notifyFunction = static_cast<KConfigCompilerSignallingItem::NotifyFunction>(&Test13::itemChanged);
+
+ setCurrentGroup( QLatin1String( "kamoso" ) );
+
+ KConfigSkeleton::ItemUrl *itemPicturesDir;
+ itemPicturesDir = new KConfigSkeleton::ItemUrl( currentGroup(), QLatin1String( "picturesDir" ), mPicturesDir );
+ addItem( itemPicturesDir, QLatin1String( "picturesDir" ) );
+ KConfigCompilerSignallingItem *itemBrightness;
+ itemBrightness = new KConfigCompilerSignallingItem(new KConfigSkeleton::ItemDouble( currentGroup(), QLatin1String( "brightness" ), mBrightness ), this, notifyFunction, signalBrightnessChanged);
+ addItem( itemBrightness, QLatin1String( "brightness" ) );
+}
+
+Test13::~Test13()
+{
+}
+
+
+void Test13::itemChanged(quint64 flags) {
+
+ if ( flags & signalBrightnessChanged ) {
+ Q_EMIT brightnessChanged();
+ }
+}
+
+#include "test13.moc"
+