summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/configdlg.cpp
Side-by-side diff
Diffstat (limited to 'inputmethods/multikey/configdlg.cpp') (more/less context) (show whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp31
1 files changed, 26 insertions, 5 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index 59a290b..566b2b9 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -111,10 +111,12 @@ ConfigDlg::ConfigDlg () : QTabWidget ()
remove_button->setDisabled(true);
connect(remove_button, SIGNAL(clicked()), SLOT(removeMap()));
- pick_button = new QCheckBox(tr("Pickboard"), gen_box);
+ // make a box that will contain the buttons on the bottom
+ QGrid *other_grid = new QGrid(2, gen_box);
+ pick_button = new QCheckBox(tr("Pickboard"), other_grid);
- config.setGroup ("pickboard");
- bool pick_open = config.readBoolEntry ("open", "0"); // default closed
+ config.setGroup ("general");
+ bool pick_open = config.readBoolEntry ("usePickboard", (bool)0); // default closed
if (pick_open) {
pick_button->setChecked(true);
@@ -123,6 +125,16 @@ ConfigDlg::ConfigDlg () : QTabWidget ()
// by connecting it after checking it, the signal isn't emmited
connect (pick_button, SIGNAL(clicked()), this, SLOT(pickTog()));
+ repeat_button = new QCheckBox(tr("Key Repeat"), other_grid);
+ bool repeat_on = config.readBoolEntry ("useRepeat", (bool)1);
+
+ if (repeat_on) {
+
+ repeat_button->setChecked(true);
+ }
+ connect (repeat_button, SIGNAL(clicked()), this, SLOT(repeatTog()));
+
+
/*
* 'color' tab
*/
@@ -169,12 +181,21 @@ ConfigDlg::ConfigDlg () : QTabWidget ()
void ConfigDlg::pickTog() {
Config config ("multikey");
- config.setGroup ("pickboard");
- config.writeEntry ("open", pick_button->isChecked()); // default closed
+ config.setGroup ("general");
+ config.writeEntry ("usePickboard", pick_button->isChecked()); // default closed
emit pickboardToggled(pick_button->isChecked());
}
+void ConfigDlg::repeatTog() {
+
+ Config config ("multikey");
+ config.setGroup ("general");
+ config.writeEntry ("useRepeat", repeat_button->isChecked()); // default closed
+
+ emit repeatToggled(repeat_button->isChecked());
+}
+
/*
* the index is kinda screwy, because in the config file, index 0 is just the
* first element in the QStringList, but here it's the "Current Language"