summaryrefslogtreecommitdiffstats
path: root/katomic/configbox.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 /katomic/configbox.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 'katomic/configbox.cpp')
-rw-r--r--katomic/configbox.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/katomic/configbox.cpp b/katomic/configbox.cpp
new file mode 100644
index 00000000..ea546d89
--- /dev/null
+++ b/katomic/configbox.cpp
@@ -0,0 +1,59 @@
+/* configbox.cpp
+ *
+ * 1999 (c) Cristian Tibirna (tibirna@kde.org)
+ *
+ */
+
+#include "configbox.h"
+#include <klocale.h>
+#include <kglobal.h>
+#include <kconfig.h>
+#include <qlayout.h>
+#include <qgroupbox.h>
+#include <qslider.h>
+
+#include "settings.h"
+
+extern Options settings;
+
+ConfigBox::ConfigBox ( QWidget *parent, const char *name)
+ : KDialogBase ( parent, name, true, i18n("Configure"), Ok | Cancel, Ok, true )
+{
+ QWidget *page = makeMainWidget();
+
+ QGridLayout *glay = new QGridLayout (page, 4, 5, 0, spacingHint());
+ glay->setRowStretch(0, 1);
+ glay->setRowStretch(3, 1);
+ glay->setColStretch(0, 1);
+ glay->setColStretch(4, 1);
+
+ glay->addWidget(new QLabel(i18n("Animation speed:"),page), 2, 1);
+
+ disp = new QLCDNumber(page);
+ glay->addWidget(disp, 1, 2);
+ disp->display(1);
+
+ speed = new QSlider(1, 10, 1, 1, QSlider::Horizontal, page);
+ glay->addMultiCellWidget(speed, 2, 2, 2, 3);
+
+ connect(speed, SIGNAL(valueChanged(int)), disp, SLOT(display(int)));
+
+ speed->setValue(settings.anim_speed);
+ incInitialSize(QSize(20,20), true);
+}
+
+void ConfigBox::slotOk()
+{
+ settings.anim_speed = speed->value();
+ settings.changed = true;
+
+ emit speedChanged();
+
+ accept();
+}
+
+ConfigBox::~ConfigBox()
+{
+}
+
+#include "configbox.moc"