summaryrefslogtreecommitdiffstats
path: root/kolf/config.cpp
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitc90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch)
tree6d8391395bce9eaea4ad78958617edb20c6a7573 /kolf/config.cpp
downloadtdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz
tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kolf/config.cpp')
-rw-r--r--kolf/config.cpp48
1 files changed, 48 insertions, 0 deletions
diff --git a/kolf/config.cpp b/kolf/config.cpp
new file mode 100644
index 00000000..7652cf40
--- /dev/null
+++ b/kolf/config.cpp
@@ -0,0 +1,48 @@
+#include <qlabel.h>
+#include <qlayout.h>
+
+#include <kdialog.h>
+#include <klocale.h>
+
+#include "config.h"
+
+Config::Config(QWidget *parent, const char *name)
+ : QFrame(parent, name)
+{
+ startedUp = false;
+}
+
+void Config::ctorDone()
+{
+ startedUp = true;
+}
+
+int Config::spacingHint()
+{
+ return KDialog::spacingHint() / 2;
+}
+
+int Config::marginHint()
+{
+ return KDialog::marginHint();
+}
+
+void Config::changed()
+{
+ if (startedUp)
+ emit modified();
+}
+
+MessageConfig::MessageConfig(QString text, QWidget *parent, const char *name)
+ : Config(parent, name)
+{
+ QVBoxLayout *layout = new QVBoxLayout(this, marginHint(), spacingHint());
+ layout->addWidget(new QLabel(text, this));
+}
+
+DefaultConfig::DefaultConfig(QWidget *parent, const char *name)
+ : MessageConfig(i18n("No configuration options"), parent, name)
+{
+}
+
+#include "config.moc"