Diffstat (limited to 'inputmethods/multikey/configdlg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | inputmethods/multikey/configdlg.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp index fe5051d..52c498b 100644 --- a/inputmethods/multikey/configdlg.cpp +++ b/inputmethods/multikey/configdlg.cpp | |||
@@ -1,42 +1,43 @@ | |||
1 | /* | 1 | /* |
2 | * TODO | 2 | * TODO |
3 | * make a font selection thing (size too) | 3 | * make a font selection thing (size too) |
4 | * make a keymap editor | 4 | * make a keymap editor |
5 | * make keys translucent | 5 | * make keys translucent |
6 | * make vertical keys possible | 6 | * make vertical keys possible |
7 | * | 7 | * |
8 | * | 8 | * |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <opie2/ofiledialog.h> | ||
12 | #include <opie2/qcolordialog.h> | ||
13 | #include <opie2/oresource.h> | ||
14 | |||
11 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
12 | #include <qpe/config.h> | 16 | #include <qpe/config.h> |
13 | #include <qpe/resource.h> | ||
14 | 17 | ||
15 | #include <qlayout.h> | 18 | #include <qlayout.h> |
16 | #include <qwidget.h> | 19 | #include <qwidget.h> |
17 | #include <qdialog.h> | 20 | #include <qdialog.h> |
18 | #include <qtabwidget.h> | 21 | #include <qtabwidget.h> |
19 | #include <qvbox.h> | 22 | #include <qvbox.h> |
20 | #include <qgrid.h> | 23 | #include <qgrid.h> |
21 | #include <qgroupbox.h> | 24 | #include <qgroupbox.h> |
22 | #include <qlabel.h> | 25 | #include <qlabel.h> |
23 | #include <qcheckbox.h> | 26 | #include <qcheckbox.h> |
24 | #include <qsizepolicy.h> | 27 | #include <qsizepolicy.h> |
25 | #include <qpushbutton.h> | 28 | #include <qpushbutton.h> |
26 | #include <qlistbox.h> | 29 | #include <qlistbox.h> |
27 | #include <qstringlist.h> | 30 | #include <qstringlist.h> |
28 | #include <qtoolbutton.h> | 31 | #include <qtoolbutton.h> |
29 | #include <opie2/ofiledialog.h> | ||
30 | #include <opie2/qcolordialog.h> | ||
31 | #include <qdir.h> | 32 | #include <qdir.h> |
32 | #include <qfileinfo.h> | 33 | #include <qfileinfo.h> |
33 | #include "configdlg.h" | 34 | #include "configdlg.h" |
34 | #include "keyboard.h" | 35 | #include "keyboard.h" |
35 | 36 | ||
36 | using namespace Opie; | 37 | using namespace Opie; |
37 | using namespace Opie::Ui; | 38 | using namespace Opie::Ui; |
38 | // ConfigDlg::ConfigDlg() {{{1 | 39 | // ConfigDlg::ConfigDlg() {{{1 |
39 | ConfigDlg::ConfigDlg () : QDialog () | 40 | ConfigDlg::ConfigDlg () : QDialog () |
40 | { | 41 | { |
41 | setCaption( tr("Multikey Configuration") ); | 42 | setCaption( tr("Multikey Configuration") ); |
42 | Config config ("multikey"); | 43 | Config config ("multikey"); |
@@ -53,32 +54,34 @@ ConfigDlg::ConfigDlg () : QDialog () | |||
53 | 54 | ||
54 | QWidget *gen_box = new QWidget(tabs, "gen_tab"); | 55 | QWidget *gen_box = new QWidget(tabs, "gen_tab"); |
55 | QVBoxLayout *gen_lay = new QVBoxLayout(gen_box); | 56 | QVBoxLayout *gen_lay = new QVBoxLayout(gen_box); |
56 | gen_lay->setMargin(3); | 57 | gen_lay->setMargin(3); |
57 | QGroupBox *map_group = new QGroupBox (2, Qt::Vertical, tr("Keymap File"), gen_box); | 58 | QGroupBox *map_group = new QGroupBox (2, Qt::Vertical, tr("Keymap File"), gen_box); |
58 | 59 | ||
59 | QHBox *hbox1 = new QHBox(map_group); | 60 | QHBox *hbox1 = new QHBox(map_group); |
60 | keymaps = new QListBox(hbox1); | 61 | keymaps = new QListBox(hbox1); |
61 | keymaps->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); | 62 | keymaps->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); |
62 | QVBox *vbox1 = new QVBox(hbox1); | 63 | QVBox *vbox1 = new QVBox(hbox1); |
63 | 64 | ||
64 | QToolButton *tb1 = new QToolButton(vbox1, tr("Move Up")); | 65 | QToolButton *tb1 = new QToolButton(vbox1, tr("Move Up")); |
65 | tb1->setPixmap(Resource::loadPixmap("up")); | 66 | tb1->setUsesBigPixmap( qApp->desktop()->size().width() > 330 ); |
67 | tb1->setPixmap(Opie::Core::OResource::loadPixmap("up", Opie::Core::OResource::SmallIcon)); | ||
66 | tb1->setAutoRaise(TRUE); | 68 | tb1->setAutoRaise(TRUE); |
67 | tb1->setFocusPolicy(QWidget::NoFocus); | 69 | tb1->setFocusPolicy(QWidget::NoFocus); |
68 | tb1->setToggleButton(FALSE); | 70 | tb1->setToggleButton(FALSE); |
69 | connect(tb1, SIGNAL(clicked()), this, SLOT(moveSelectedUp())); | 71 | connect(tb1, SIGNAL(clicked()), this, SLOT(moveSelectedUp())); |
70 | 72 | ||
71 | QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down")); | 73 | QToolButton *tb2 = new QToolButton(vbox1, tr("Move Down")); |
72 | tb2->setPixmap(Resource::loadPixmap("down")); | 74 | tb2->setUsesBigPixmap( qApp->desktop()->size().width() > 330 ); |
75 | tb2->setPixmap(Opie::Core::OResource::loadPixmap("down", Opie::Core::OResource::SmallIcon)); | ||
73 | tb2->setAutoRaise(TRUE); | 76 | tb2->setAutoRaise(TRUE); |
74 | tb2->setFocusPolicy(QWidget::NoFocus); | 77 | tb2->setFocusPolicy(QWidget::NoFocus); |
75 | tb2->setToggleButton(FALSE); | 78 | tb2->setToggleButton(FALSE); |
76 | connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown())); | 79 | connect(tb2, SIGNAL(clicked()), this, SLOT(moveSelectedDown())); |
77 | 80 | ||
78 | QString cur(tr("Current Language")); | 81 | QString cur(tr("Current Language")); |
79 | keymaps->insertItem(cur); | 82 | keymaps->insertItem(cur); |
80 | keymaps->setSelected(0, true); | 83 | keymaps->setSelected(0, true); |
81 | 84 | ||
82 | QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap"); | 85 | QDir map_dir(QPEApplication::qpeDir() + "share/multikey", "*.keymap"); |
83 | default_maps = map_dir.entryList(); // so i can access it in other places | 86 | default_maps = map_dir.entryList(); // so i can access it in other places |
84 | custom_maps = config.readListEntry("maps", QChar('|')); | 87 | custom_maps = config.readListEntry("maps", QChar('|')); |