summaryrefslogtreecommitdiff
authorhash <hash>2002-08-14 05:40:26 (UTC)
committer hash <hash>2002-08-14 05:40:26 (UTC)
commit33a402ac713d5009306db0b1a365831becca17f7 (patch) (unidiff)
tree9bf347bcc4bfb446ba6c9b9f8c03f950a57fce01
parent13a1334cca686bf512c4a8f94a648ba969b38d22 (diff)
downloadopie-33a402ac713d5009306db0b1a365831becca17f7.zip
opie-33a402ac713d5009306db0b1a365831becca17f7.tar.gz
opie-33a402ac713d5009306db0b1a365831becca17f7.tar.bz2
these are the config dialog files. only open/closing the pickboard works
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp100
-rw-r--r--inputmethods/multikey/configdlg.h26
-rw-r--r--inputmethods/multikey/configdlg.obin0 -> 5608 bytes
3 files changed, 126 insertions, 0 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
new file mode 100644
index 0000000..e39fa6a
--- a/dev/null
+++ b/inputmethods/multikey/configdlg.cpp
@@ -0,0 +1,100 @@
1/*
2 * TODO
3 * make a font selection thing
4 *
5 * FIXME
6 * if you open the config dialog and close it from the little (x) button on the title bar,
7 * you have to hit the button on the keyboard twice for it to open the next time
8 *
9 *
10 */
11
12#include <qpe/qpeapplication.h>
13#include <qpe/config.h>
14
15#include <qwidget.h>
16#include <qdialog.h>
17#include <qtabwidget.h>
18#include <qvbox.h>
19#include <qgrid.h>
20#include <qgroupbox.h>
21#include <qlabel.h>
22#include <qcheckbox.h>
23#include <qsizepolicy.h>
24#include <qpushbutton.h>
25#include <qcombobox.h>
26#include "configdlg.h"
27#include "keyboard.h"
28
29ConfigDlg::ConfigDlg () : QTabWidget ()
30{
31 setCaption( tr("Multikey Configuration") );
32
33 /*
34 * 'general config' tab
35 */
36
37 QVBox *gen_box = new QVBox (this);
38 gen_box->setMargin(3);
39 addTab(gen_box, tr("General Settings"));
40
41 QGroupBox *map_group = new QGroupBox (2, Qt::Horizontal, tr("Keymap File"), gen_box);
42
43 QComboBox *combo = new QComboBox ((bool)0, map_group);
44 QString cur(tr("Current Language"));
45 combo->insertItem(cur);
46 combo->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
47
48 QPushButton *button = new QPushButton(tr("Browse..."), map_group);
49 button->setFlat((bool)1);
50
51 pick_button = new QCheckBox(tr("Pickboard"), gen_box);
52
53 Config config ("multikey");
54 config.setGroup ("pickboard");
55 bool pick_open = config.readBoolEntry ("open", "0"); // default closed
56 if (pick_open) {
57
58 pick_button->setChecked(true);
59 }
60
61 // by connecting it after checking it, the signal isn't emmited
62 connect (pick_button, SIGNAL(clicked()), this, SLOT(pickTog()));
63
64 /*
65 * 'color' tab
66 */
67
68 QGrid *color_box = new QGrid(2, this);
69 color_box->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
70 color_box->setMargin(3);
71 addTab(color_box, tr("Colors"));
72
73 QLabel *label;
74
75 label = new QLabel(tr("Key Color"), color_box);
76 button = new QPushButton(color_box);
77 button->setFlat((bool)1);
78 label = new QLabel(tr("Key Pressed Color"), color_box);
79 button = new QPushButton(color_box);
80 button->setFlat((bool)1);
81 label = new QLabel(tr("Line Color"), color_box);
82 button = new QPushButton(color_box);
83 button->setFlat((bool)1);
84 label = new QLabel(tr("Text Color"), color_box);
85 button = new QPushButton(color_box);
86 button->setFlat((bool)1);
87
88 label = new QLabel("", color_box); // a spacer so the above buttons dont expand
89 label->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
90
91}
92
93void ConfigDlg::pickTog() {
94
95 Config config ("multikey");
96 config.setGroup ("pickboard");
97 config.writeEntry ("open", pick_button->isChecked()); // default closed
98
99 emit pickboardToggled(pick_button->isChecked());
100}
diff --git a/inputmethods/multikey/configdlg.h b/inputmethods/multikey/configdlg.h
new file mode 100644
index 0000000..21bdb17
--- a/dev/null
+++ b/inputmethods/multikey/configdlg.h
@@ -0,0 +1,26 @@
1#include <qpe/qpeapplication.h>
2#include <qtabwidget.h>
3#include <qcheckbox.h>
4
5#ifndef CONFIGDLG_H
6#define CONFIGDLG_H
7
8class ConfigDlg : public QTabWidget
9{
10 Q_OBJECT
11
12public:
13 ConfigDlg ();
14
15signals:
16 void pickboardToggled(bool on_off);
17
18private slots:
19 void pickTog();
20
21private:
22 QCheckBox *pick_button;
23
24};
25
26#endif
diff --git a/inputmethods/multikey/configdlg.o b/inputmethods/multikey/configdlg.o
new file mode 100644
index 0000000..9cd8205
--- a/dev/null
+++ b/inputmethods/multikey/configdlg.o
Binary files differ