Diffstat (limited to 'inputmethods/multikey/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index 26c9233..a8206b7 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp | |||
@@ -1,17 +1,18 @@ | |||
1 | /* | 1 | /* |
2 | * TODO | 2 | * TODO |
3 | * make a font selection thing (size too) | 3 | * make a font selection thing (size too) |
4 | * make vertical keys possible | ||
5 | * make a keymap editor | 4 | * make a keymap editor |
5 | * make keys translucent | ||
6 | * make vertical keys possible | ||
6 | * | 7 | * |
7 | * | 8 | * |
8 | */ | 9 | */ |
9 | 10 | ||
10 | #include <qpe/qpeapplication.h> | 11 | #include <qpe/qpeapplication.h> |
11 | #include <qpe/config.h> | 12 | #include <qpe/config.h> |
12 | 13 | ||
13 | #include <qwidget.h> | 14 | #include <qwidget.h> |
14 | #include <qdialog.h> | 15 | #include <qdialog.h> |
15 | #include <qtabwidget.h> | 16 | #include <qtabwidget.h> |
16 | #include <qvbox.h> | 17 | #include <qvbox.h> |
17 | #include <qgrid.h> | 18 | #include <qgrid.h> |
@@ -239,44 +240,50 @@ void ConfigDlg::pickTog() { | |||
239 | emit pickboardToggled(pick_button->isChecked()); | 240 | emit pickboardToggled(pick_button->isChecked()); |
240 | } | 241 | } |
241 | 242 | ||
242 | void ConfigDlg::repeatTog() { | 243 | void ConfigDlg::repeatTog() { |
243 | 244 | ||
244 | Config config ("multikey"); | 245 | Config config ("multikey"); |
245 | config.setGroup ("general"); | 246 | config.setGroup ("general"); |
246 | config.writeEntry ("useRepeat", repeat_button->isChecked()); // default closed | 247 | config.writeEntry ("useRepeat", repeat_button->isChecked()); // default closed |
247 | 248 | ||
248 | emit repeatToggled(repeat_button->isChecked()); | 249 | emit repeatToggled(repeat_button->isChecked()); |
249 | } | 250 | } |
250 | 251 | ||
252 | void ConfigDlg::closeEvent(QCloseEvent *) { | ||
253 | |||
254 | // tell the parent it was closed, so delete me | ||
255 | emit configDlgClosed(); | ||
256 | } | ||
257 | |||
251 | // ConfigDlg::setMap {{{1 | 258 | // ConfigDlg::setMap {{{1 |
252 | 259 | ||
253 | /* | 260 | /* |
254 | * the index is kinda screwy, because in the config file, index 0 is just the | 261 | * the index is kinda screwy, because in the config file, index 0 is just the |
255 | * first element in the QStringList, but here it's the "Current Language" | 262 | * first element in the QStringList, but here it's the "Current Language" |
256 | * listItem. therefor you have to minus one to the index before you access it. | 263 | * listItem. therefor you have to minus one to the index before you access it. |
257 | * | 264 | * |
258 | */ | 265 | */ |
259 | 266 | ||
260 | void ConfigDlg::setMap(int index) { | 267 | void ConfigDlg::setMap(int index) { |
261 | 268 | ||
262 | if (index == 0) { | 269 | if (index == 0) { |
263 | 270 | ||
264 | remove_button->setDisabled(true); | 271 | remove_button->setDisabled(true); |
265 | emit setMapToDefault(); | 272 | emit setMapToDefault(); |
266 | } | 273 | } |
267 | else if ((uint)index <= default_maps.count()) { | 274 | else if ((uint)index <= default_maps.count()) { |
268 | 275 | ||
269 | remove_button->setDisabled(true); | 276 | remove_button->setDisabled(true); |
270 | emit setMapToFile(QPEApplication::qpeDir() + "/share/multikey/" + default_maps[index - 1]); | 277 | emit setMapToFile(QPEApplication::qpeDir() + "share/multikey/" + default_maps[index - 1]); |
271 | 278 | ||
272 | } else { | 279 | } else { |
273 | 280 | ||
274 | remove_button->setEnabled(true); | 281 | remove_button->setEnabled(true); |
275 | emit setMapToFile(custom_maps[index - default_maps.count() - 1]); | 282 | emit setMapToFile(custom_maps[index - default_maps.count() - 1]); |
276 | } | 283 | } |
277 | } | 284 | } |
278 | 285 | ||
279 | // ConfigDlg::addMap() {{{1 | 286 | // ConfigDlg::addMap() {{{1 |
280 | void ConfigDlg::addMap() { | 287 | void ConfigDlg::addMap() { |
281 | 288 | ||
282 | QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); | 289 | QString map = OFileDialog::getOpenFileName(1, QDir::home().absPath()); |