summaryrefslogtreecommitdiffstats
path: root/kolf/config.cpp
diff options
context:
space:
mode:
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"