summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/settings.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 /libksirtet/common/settings.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 'libksirtet/common/settings.cpp')
-rw-r--r--libksirtet/common/settings.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/libksirtet/common/settings.cpp b/libksirtet/common/settings.cpp
new file mode 100644
index 00000000..902d1e56
--- /dev/null
+++ b/libksirtet/common/settings.cpp
@@ -0,0 +1,54 @@
+#include "settings.h"
+#include "settings.moc"
+
+#include <qlabel.h>
+#include <qlayout.h>
+#include <qcheckbox.h>
+#include <qwhatsthis.h>
+
+#include <klocale.h>
+#include <knuminput.h>
+#include <kdialog.h>
+#include <kglobal.h>
+
+
+//-----------------------------------------------------------------------------
+AppearanceConfig::AppearanceConfig()
+{
+ int row = _grid->numRows();
+ int col = _grid->numCols();
+
+ QCheckBox *cb = new QCheckBox(i18n("Show piece's shadow"), _main, "kcfg_ShowPieceShadow");
+ _grid->addMultiCellWidget(cb, row, row, 0, col-1);
+
+ cb = new QCheckBox(i18n("Show next piece"), _main, "kcfg_ShowNextPiece");
+ _grid->addMultiCellWidget(cb, row+1, row+1, 0, col-1);
+
+ cb = new QCheckBox(i18n("Show detailed \"removed lines\" field"), _main, "kcfg_ShowDetailedRemoved");
+ _grid->addMultiCellWidget(cb, row+2, row+2, 0, col-1);
+}
+
+//-----------------------------------------------------------------------------
+GameConfig::GameConfig()
+ : QWidget(0, "game config")
+{
+ QVBoxLayout *top = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+
+ _grid = new QGridLayout(top, 3, 2);
+ _grid->setColStretch(1, 1);
+
+ QLabel *label = new QLabel(i18n("Initial level:"), this);
+ _grid->addWidget(label, 0, 0);
+ KIntNumInput *in = new KIntNumInput(this, "kcfg_InitialGameLevel");
+ in->setRange(1, 20, 1, true);
+ _grid->addWidget(in, 0, 1);
+
+ _grid->addRowSpacing(1, KDialog::spacingHint());
+
+ QCheckBox *cb = new QCheckBox(i18n("Direct drop down"), this, "kcfg_DirectDropDownEnabled");
+ QWhatsThis::add(cb, i18n("Drop down is not stopped when drop down key is released."));
+ _grid->addMultiCellWidget(cb, 2, 2, 0, 1);
+
+ top->addStretch(1);
+}
+