Diffstat (limited to 'inputmethods/handwriting/qimpensetup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | inputmethods/handwriting/qimpensetup.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp index 3f4841d..564b6ba 100644 --- a/inputmethods/handwriting/qimpensetup.cpp +++ b/inputmethods/handwriting/qimpensetup.cpp | |||
@@ -15,48 +15,49 @@ | |||
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | #include "qimpenwidget.h" | 21 | #include "qimpenwidget.h" |
22 | #include "qimpenprefbase.h" | 22 | #include "qimpenprefbase.h" |
23 | #include "qimpensetup.h" | 23 | #include "qimpensetup.h" |
24 | 24 | ||
25 | #include <qpe/qpeapplication.h> | 25 | #include <qpe/qpeapplication.h> |
26 | #include <qpe/config.h> | 26 | #include <qpe/config.h> |
27 | 27 | ||
28 | #include <qcombobox.h> | 28 | #include <qcombobox.h> |
29 | #include <qlistbox.h> | 29 | #include <qlistbox.h> |
30 | #include <qlabel.h> | 30 | #include <qlabel.h> |
31 | #include <qpushbutton.h> | 31 | #include <qpushbutton.h> |
32 | #include <qlayout.h> | 32 | #include <qlayout.h> |
33 | #include <qpixmap.h> | 33 | #include <qpixmap.h> |
34 | #include <qbuttongroup.h> | 34 | #include <qbuttongroup.h> |
35 | #include <qslider.h> | 35 | #include <qslider.h> |
36 | #include <qtabwidget.h> | 36 | #include <qtabwidget.h> |
37 | #include <qdir.h> | 37 | #include <qdir.h> |
38 | #include <qmessagebox.h> | 38 | #include <qmessagebox.h> |
39 | #include <opie2/odebug.h> | ||
39 | 40 | ||
40 | 41 | ||
41 | /* XPM */ | 42 | /* XPM */ |
42 | static const char * const left_xpm[] = { | 43 | static const char * const left_xpm[] = { |
43 | "16 16 2 1", | 44 | "16 16 2 1", |
44 | " c None", | 45 | " c None", |
45 | ".c #000000", | 46 | ".c #000000", |
46 | " ", | 47 | " ", |
47 | " ", | 48 | " ", |
48 | " ", | 49 | " ", |
49 | " . ", | 50 | " . ", |
50 | " .. ", | 51 | " .. ", |
51 | " ... ", | 52 | " ... ", |
52 | " .... ", | 53 | " .... ", |
53 | " ..... ", | 54 | " ..... ", |
54 | " ...... ", | 55 | " ...... ", |
55 | " ..... ", | 56 | " ..... ", |
56 | " .... ", | 57 | " .... ", |
57 | " ... ", | 58 | " ... ", |
58 | " .. ", | 59 | " .. ", |
59 | " . ", | 60 | " . ", |
60 | " ", | 61 | " ", |
61 | " "}; | 62 | " "}; |
62 | 63 | ||
@@ -87,49 +88,49 @@ static const char * const right_xpm[] = { | |||
87 | 88 | ||
88 | QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent, | 89 | QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent, |
89 | const char *name, bool modal, int WFlags ) | 90 | const char *name, bool modal, int WFlags ) |
90 | : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p) | 91 | : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p) |
91 | { | 92 | { |
92 | setCaption( tr("Setup Handwriting Input") ); | 93 | setCaption( tr("Setup Handwriting Input") ); |
93 | 94 | ||
94 | QVBoxLayout *vb = new QVBoxLayout( this ); | 95 | QVBoxLayout *vb = new QVBoxLayout( this ); |
95 | 96 | ||
96 | #define MULTIPROFILE | 97 | #define MULTIPROFILE |
97 | #ifdef MULTIPROFILE | 98 | #ifdef MULTIPROFILE |
98 | profileList.setAutoDelete( true ); | 99 | profileList.setAutoDelete( true ); |
99 | QHBoxLayout *hb = new QHBoxLayout( vb ); | 100 | QHBoxLayout *hb = new QHBoxLayout( vb ); |
100 | hb->setMargin( 6 ); | 101 | hb->setMargin( 6 ); |
101 | QLabel *l = new QLabel( tr("Character Profile:"), this ); | 102 | QLabel *l = new QLabel( tr("Character Profile:"), this ); |
102 | hb->addWidget( l ); | 103 | hb->addWidget( l ); |
103 | profileCombo = new QComboBox( this ); | 104 | profileCombo = new QComboBox( this ); |
104 | connect( profileCombo, SIGNAL(activated(const QString&)), | 105 | connect( profileCombo, SIGNAL(activated(const QString&)), |
105 | this, SLOT(selectProfile(const QString&)) ); | 106 | this, SLOT(selectProfile(const QString&)) ); |
106 | hb->addWidget( profileCombo ); | 107 | hb->addWidget( profileCombo ); |
107 | #else | 108 | #else |
108 | profileList.append( profile ); | 109 | profileList.append( profile ); |
109 | #endif | 110 | #endif |
110 | 111 | ||
111 | qWarning("profiles: %d", profileList.count()); | 112 | owarn << "profiles: " << profileList.count() << oendl; |
112 | 113 | ||
113 | QTabWidget *tw = new QTabWidget( this ); | 114 | QTabWidget *tw = new QTabWidget( this ); |
114 | vb->addWidget( tw ); | 115 | vb->addWidget( tw ); |
115 | 116 | ||
116 | pref = new QIMPenPrefBase( this ); | 117 | pref = new QIMPenPrefBase( this ); |
117 | tw->addTab( pref, tr("Preferences") ); | 118 | tw->addTab( pref, tr("Preferences") ); |
118 | 119 | ||
119 | pref->inputStyle->setExclusive( TRUE ); | 120 | pref->inputStyle->setExclusive( TRUE ); |
120 | 121 | ||
121 | style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; | 122 | style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; |
122 | pref->inputStyle->setButton( style ); | 123 | pref->inputStyle->setButton( style ); |
123 | connect( pref->inputStyle, SIGNAL(clicked(int)), | 124 | connect( pref->inputStyle, SIGNAL(clicked(int)), |
124 | this, SLOT(styleClicked(int)) ); | 125 | this, SLOT(styleClicked(int)) ); |
125 | pref->inputStyle->setEnabled( profile->canSelectStyle() ); | 126 | pref->inputStyle->setEnabled( profile->canSelectStyle() ); |
126 | 127 | ||
127 | multiTimeout = profile->multiStrokeTimeout(); | 128 | multiTimeout = profile->multiStrokeTimeout(); |
128 | pref->multiStrokeSlider->setValue( multiTimeout ); | 129 | pref->multiStrokeSlider->setValue( multiTimeout ); |
129 | multiTimeoutChanged( multiTimeout ); | 130 | multiTimeoutChanged( multiTimeout ); |
130 | connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)), | 131 | connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)), |
131 | this, SLOT(multiTimeoutChanged(int)) ); | 132 | this, SLOT(multiTimeoutChanged(int)) ); |
132 | 133 | ||
133 | edit = new QIMPenEdit( p, tw ); | 134 | edit = new QIMPenEdit( p, tw ); |
134 | tw->addTab( edit, tr("Customize") ); | 135 | tw->addTab( edit, tr("Customize") ); |
135 | #ifdef MULTIPROFILE | 136 | #ifdef MULTIPROFILE |