From c90c389a8a8d9d8661e9772ec4144c5cf2039f23 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- kolf/config.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 kolf/config.cpp (limited to 'kolf/config.cpp') 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 +#include + +#include +#include + +#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" -- cgit v1.2.1