summaryrefslogtreecommitdiff
authorhash <hash>2002-11-25 10:07:40 (UTC)
committer hash <hash>2002-11-25 10:07:40 (UTC)
commit6525f85bff4ef02e6636e1b9cfdb3440cdeed78c (patch) (unidiff)
tree7f56d4a76fa0a54be9233f15749351dee2f9d753
parente73898d0cda891308115871bfbfa4a2739275c6a (diff)
downloadopie-6525f85bff4ef02e6636e1b9cfdb3440cdeed78c.zip
opie-6525f85bff4ef02e6636e1b9cfdb3440cdeed78c.tar.gz
opie-6525f85bff4ef02e6636e1b9cfdb3440cdeed78c.tar.bz2
for now, lets just disable the charset selection... there is something very
wrong with it.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/handwriting/qimpenprefbase.ui8
-rw-r--r--inputmethods/handwriting/qimpensetup.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/inputmethods/handwriting/qimpenprefbase.ui b/inputmethods/handwriting/qimpenprefbase.ui
index 1639d1a..4189206 100644
--- a/inputmethods/handwriting/qimpenprefbase.ui
+++ b/inputmethods/handwriting/qimpenprefbase.ui
@@ -1,167 +1,167 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>QIMPenPrefBase</class> 2<class>QIMPenPrefBase</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QWidget</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>QIMPenPrefBase</cstring> 7 <cstring>QIMPenPrefBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>247</width> 14 <width>247</width>
15 <height>280</height> 15 <height>280</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Form1</string> 20 <string>Form1</string>
21 </property> 21 </property>
22 <vbox> 22 <vbox>
23 <property stdset="1"> 23 <property stdset="1">
24 <name>margin</name> 24 <name>margin</name>
25 <number>11</number> 25 <number>11</number>
26 </property> 26 </property>
27 <property stdset="1"> 27 <property stdset="1">
28 <name>spacing</name> 28 <name>spacing</name>
29 <number>6</number> 29 <number>6</number>
30 </property> 30 </property>
31 <widget> 31 <widget>
32 <class>QLabel</class> 32 <class>QLabel</class>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>name</name> 34 <name>name</name>
35 <cstring>TextLabel1</cstring> 35 <cstring>TextLabel1</cstring>
36 </property> 36 </property>
37 <property stdset="1"> 37 <property stdset="1">
38 <name>text</name> 38 <name>text</name>
39 <string>Multi-stroke character timeout:</string> 39 <string>Multi-stroke character timeout:</string>
40 </property> 40 </property>
41 </widget> 41 </widget>
42 <widget> 42 <widget>
43 <class>QLayoutWidget</class> 43 <class>QLayoutWidget</class>
44 <property stdset="1"> 44 <property stdset="1">
45 <name>name</name> 45 <name>name</name>
46 <cstring>Layout2</cstring> 46 <cstring>Layout2</cstring>
47 </property> 47 </property>
48 <hbox> 48 <hbox>
49 <property stdset="1"> 49 <property stdset="1">
50 <name>margin</name> 50 <name>margin</name>
51 <number>0</number> 51 <number>0</number>
52 </property> 52 </property>
53 <property stdset="1"> 53 <property stdset="1">
54 <name>spacing</name> 54 <name>spacing</name>
55 <number>6</number> 55 <number>6</number>
56 </property> 56 </property>
57 <widget> 57 <widget>
58 <class>QSlider</class> 58 <class>QSlider</class>
59 <property stdset="1"> 59 <property stdset="1">
60 <name>name</name> 60 <name>name</name>
61 <cstring>multiStrokeSlider</cstring> 61 <cstring>multiStrokeSlider</cstring>
62 </property> 62 </property>
63 <property stdset="1"> 63 <property stdset="1">
64 <name>minValue</name>
65 <number>250</number>
66 </property>
67 <property stdset="1">
68 <name>maxValue</name> 64 <name>maxValue</name>
69 <number>1000</number> 65 <number>1000</number>
70 </property> 66 </property>
71 <property stdset="1"> 67 <property stdset="1">
68 <name>minValue</name>
69 <number>250</number>
70 </property>
71 <property stdset="1">
72 <name>lineStep</name> 72 <name>lineStep</name>
73 <number>10</number> 73 <number>10</number>
74 </property> 74 </property>
75 <property stdset="1"> 75 <property stdset="1">
76 <name>pageStep</name> 76 <name>pageStep</name>
77 <number>50</number> 77 <number>50</number>
78 </property> 78 </property>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>value</name> 80 <name>value</name>
81 <number>500</number> 81 <number>500</number>
82 </property> 82 </property>
83 <property stdset="1"> 83 <property stdset="1">
84 <name>orientation</name> 84 <name>orientation</name>
85 <enum>Horizontal</enum> 85 <enum>Horizontal</enum>
86 </property> 86 </property>
87 <property stdset="1"> 87 <property stdset="1">
88 <name>tickmarks</name> 88 <name>tickmarks</name>
89 <enum>Right</enum> 89 <enum>Right</enum>
90 </property> 90 </property>
91 </widget> 91 </widget>
92 <widget> 92 <widget>
93 <class>QLabel</class> 93 <class>QLabel</class>
94 <property stdset="1"> 94 <property stdset="1">
95 <name>name</name> 95 <name>name</name>
96 <cstring>multiStrokeLabel</cstring> 96 <cstring>multiStrokeLabel</cstring>
97 </property> 97 </property>
98 <property stdset="1"> 98 <property stdset="1">
99 <name>minimumSize</name> 99 <name>minimumSize</name>
100 <size> 100 <size>
101 <width>45</width> 101 <width>45</width>
102 <height>0</height> 102 <height>0</height>
103 </size> 103 </size>
104 </property> 104 </property>
105 <property stdset="1"> 105 <property stdset="1">
106 <name>text</name> 106 <name>text</name>
107 <string>ms</string> 107 <string>ms</string>
108 </property> 108 </property>
109 <property stdset="1"> 109 <property stdset="1">
110 <name>alignment</name> 110 <name>alignment</name>
111 <set>AlignVCenter|AlignRight</set> 111 <set>AlignVCenter|AlignRight</set>
112 </property> 112 </property>
113 <property> 113 <property>
114 <name>hAlign</name> 114 <name>hAlign</name>
115 </property> 115 </property>
116 </widget> 116 </widget>
117 </hbox> 117 </hbox>
118 </widget> 118 </widget>
119 <widget> 119 <widget>
120 <class>QButtonGroup</class> 120 <class>QButtonGroup</class>
121 <property stdset="1"> 121 <property stdset="1">
122 <name>name</name> 122 <name>name</name>
123 <cstring>inputStyle</cstring> 123 <cstring>inputStyle</cstring>
124 </property> 124 </property>
125 <property stdset="1"> 125 <property stdset="1">
126 <name>title</name> 126 <name>title</name>
127 <string>Input areas displayed</string> 127 <string>Input areas displayed</string>
128 </property> 128 </property>
129 <vbox> 129 <vbox>
130 <property stdset="1"> 130 <property stdset="1">
131 <name>margin</name> 131 <name>margin</name>
132 <number>11</number> 132 <number>11</number>
133 </property> 133 </property>
134 <property stdset="1"> 134 <property stdset="1">
135 <name>spacing</name> 135 <name>spacing</name>
136 <number>6</number> 136 <number>6</number>
137 </property> 137 </property>
138 <widget> 138 <widget>
139 <class>QRadioButton</class> 139 <class>QRadioButton</class>
140 <property stdset="1"> 140 <property stdset="1">
141 <name>name</name> 141 <name>name</name>
142 <cstring>bothCasesRadio</cstring> 142 <cstring>bothCasesRadio</cstring>
143 </property> 143 </property>
144 <property stdset="1"> 144 <property stdset="1">
145 <name>text</name> 145 <name>text</name>
146 <string>Upper and lower case areas</string> 146 <string>Upper and lower case areas</string>
147 </property> 147 </property>
148 </widget> 148 </widget>
149 <widget> 149 <widget>
150 <class>QRadioButton</class> 150 <class>QRadioButton</class>
151 <property stdset="1"> 151 <property stdset="1">
152 <name>name</name> 152 <name>name</name>
153 <cstring>toggleCaseRadio</cstring> 153 <cstring>toggleCaseRadio</cstring>
154 </property> 154 </property>
155 <property stdset="1"> 155 <property stdset="1">
156 <name>text</name> 156 <name>text</name>
157 <string>Lower case (toggle Upper case)</string> 157 <string>Lower case (toggle Upper case)</string>
158 </property> 158 </property>
159 </widget> 159 </widget>
160 </vbox> 160 </vbox>
161 </widget> 161 </widget>
162 <spacer> 162 <spacer>
163 <property> 163 <property>
164 <name>name</name> 164 <name>name</name>
165 <cstring>Spacer2</cstring> 165 <cstring>Spacer2</cstring>
166 </property> 166 </property>
167 <property stdset="1"> 167 <property stdset="1">
diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp
index 5d49e03..10c136d 100644
--- a/inputmethods/handwriting/qimpensetup.cpp
+++ b/inputmethods/handwriting/qimpensetup.cpp
@@ -1,192 +1,192 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. 2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of the Qtopia Environment. 4** This file is part of the Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information. 14** See http://www.trolltech.com/gpl/ for GPL licensing information.
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 39
40 40
41/* XPM */ 41/* XPM */
42static const char * const left_xpm[] = { 42static const char * const left_xpm[] = {
43"16 16 2 1", 43"16 16 2 1",
44 " c None", 44 " c None",
45 ".c #000000", 45 ".c #000000",
46" ", 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 63
64/* XPM */ 64/* XPM */
65static const char * const right_xpm[] = { 65static const char * const right_xpm[] = {
66"16 16 2 1", 66"16 16 2 1",
67 " c None", 67 " c None",
68 ".c #000000", 68 ".c #000000",
69" ", 69" ",
70" ", 70" ",
71" ", 71" ",
72" . ", 72" . ",
73" .. ", 73" .. ",
74" ... ", 74" ... ",
75" .... ", 75" .... ",
76" ..... ", 76" ..... ",
77" ...... ", 77" ...... ",
78" ..... ", 78" ..... ",
79" .... ", 79" .... ",
80" ... ", 80" ... ",
81" .. ", 81" .. ",
82" . ", 82" . ",
83" ", 83" ",
84" "}; 84" "};
85 85
86 86
87 87
88QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent, 88QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent,
89 const char *name, bool modal, int WFlags ) 89 const char *name, bool modal, int WFlags )
90 : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p) 90 : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p)
91{ 91{
92 setCaption( tr("Setup Handwriting Input") ); 92 setCaption( tr("Setup Handwriting Input") );
93 93
94 QVBoxLayout *vb = new QVBoxLayout( this ); 94 QVBoxLayout *vb = new QVBoxLayout( this );
95 95
96#if 1 96#if 0
97 profileList.setAutoDelete( true ); 97 profileList.setAutoDelete( true );
98 QHBoxLayout *hb = new QHBoxLayout( vb ); 98 QHBoxLayout *hb = new QHBoxLayout( vb );
99 hb->setMargin( 6 ); 99 hb->setMargin( 6 );
100 QLabel *l = new QLabel( tr("Character Profile:"), this ); 100 QLabel *l = new QLabel( tr("Character Profile:"), this );
101 hb->addWidget( l ); 101 hb->addWidget( l );
102 profileCombo = new QComboBox( this ); 102 profileCombo = new QComboBox( this );
103 connect( profileCombo, SIGNAL(activated(const QString &)), 103 connect( profileCombo, SIGNAL(activated(const QString &)),
104 this, SLOT(selectProfile(const QString &)) ); 104 this, SLOT(selectProfile(const QString &)) );
105 hb->addWidget( profileCombo ); 105 hb->addWidget( profileCombo );
106 loadProfiles(); 106 loadProfiles();
107#else 107#else
108 profileList.append( profile ); 108 profileList.append( profile );
109#endif 109#endif
110 110
111 QTabWidget *tw = new QTabWidget( this ); 111 QTabWidget *tw = new QTabWidget( this );
112 vb->addWidget( tw ); 112 vb->addWidget( tw );
113 113
114 pref = new QIMPenPrefBase( this ); 114 pref = new QIMPenPrefBase( this );
115 tw->addTab( pref, tr("Preferences") ); 115 tw->addTab( pref, tr("Preferences") );
116 116
117 pref->inputStyle->setExclusive( TRUE ); 117 pref->inputStyle->setExclusive( TRUE );
118 118
119 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; 119 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0;
120 pref->inputStyle->setButton( style ); 120 pref->inputStyle->setButton( style );
121 connect( pref->inputStyle, SIGNAL(clicked(int)), 121 connect( pref->inputStyle, SIGNAL(clicked(int)),
122 this, SLOT(styleClicked(int)) ); 122 this, SLOT(styleClicked(int)) );
123 pref->inputStyle->setEnabled( profile->canSelectStyle() ); 123 pref->inputStyle->setEnabled( profile->canSelectStyle() );
124 124
125 multiTimeout = profile->multiStrokeTimeout(); 125 multiTimeout = profile->multiStrokeTimeout();
126 pref->multiStrokeSlider->setValue( multiTimeout ); 126 pref->multiStrokeSlider->setValue( multiTimeout );
127 multiTimeoutChanged( multiTimeout ); 127 multiTimeoutChanged( multiTimeout );
128 connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)), 128 connect( pref->multiStrokeSlider, SIGNAL(valueChanged(int)),
129 this, SLOT(multiTimeoutChanged(int)) ); 129 this, SLOT(multiTimeoutChanged(int)) );
130 130
131 edit = new QIMPenEdit( p, tw ); 131 edit = new QIMPenEdit( p, tw );
132 tw->addTab( edit, tr("Customize") ); 132 tw->addTab( edit, tr("Customize") );
133} 133}
134 134
135void QIMPenSetup::loadProfiles() 135void QIMPenSetup::loadProfiles()
136{ 136{
137 QString path = QPEApplication::qpeDir() + "etc/qimpen"; 137 QString path = QPEApplication::qpeDir() + "etc/qimpen";
138 QDir dir( path, "*.conf" ); 138 QDir dir( path, "*.conf" );
139 QStringList list = dir.entryList(); 139 QStringList list = dir.entryList();
140 QStringList::Iterator it; 140 QStringList::Iterator it;
141 for ( it = list.begin(); it != list.end(); ++it ) { 141 for ( it = list.begin(); it != list.end(); ++it ) {
142 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it ); 142 QIMPenProfile *p = new QIMPenProfile( path + "/" + *it );
143 profileList.append( p ); 143 profileList.append( p );
144 profileCombo->insertItem( p->name() ); 144 profileCombo->insertItem( p->name() );
145 if ( p->name() == profile->name() ) { 145 if ( p->name() == profile->name() ) {
146 profileCombo->setCurrentItem( profileCombo->count()-1 ); 146 profileCombo->setCurrentItem( profileCombo->count()-1 );
147 profile = p; 147 profile = p;
148 } 148 }
149 } 149 }
150} 150}
151 151
152void QIMPenSetup::styleClicked( int id ) 152void QIMPenSetup::styleClicked( int id )
153{ 153{
154 style = id; 154 style = id;
155} 155}
156 156
157void QIMPenSetup::multiTimeoutChanged( int v ) 157void QIMPenSetup::multiTimeoutChanged( int v )
158{ 158{
159 multiTimeout = v; 159 multiTimeout = v;
160 pref->multiStrokeLabel->setText( tr("%1 ms").arg(v) ); 160 pref->multiStrokeLabel->setText( tr("%1 ms").arg(v) );
161} 161}
162 162
163void QIMPenSetup::selectProfile( const QString &p ) 163void QIMPenSetup::selectProfile( const QString &p )
164{ 164{
165 if ( p == profile->name() ) 165 if ( p == profile->name() )
166 return; 166 return;
167 167
168 profile->setStyle( style ? QIMPenProfile::ToggleCases : QIMPenProfile::BothCases ); 168 profile->setStyle( style ? QIMPenProfile::ToggleCases : QIMPenProfile::BothCases );
169 profile->setMultiStrokeTimeout( multiTimeout ); 169 profile->setMultiStrokeTimeout( multiTimeout );
170 170
171 for ( int i = 0; i < (int)profileList.count(); i++ ) { 171 for ( int i = 0; i < (int)profileList.count(); i++ ) {
172 if ( profileList.at(i)->name() == p ) { 172 if ( profileList.at(i)->name() == p ) {
173 profile = profileList.at(i); 173 profile = profileList.at(i);
174 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; 174 style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0;
175 pref->inputStyle->setButton( style ); 175 pref->inputStyle->setButton( style );
176 pref->inputStyle->setEnabled( profile->canSelectStyle() ); 176 pref->inputStyle->setEnabled( profile->canSelectStyle() );
177 multiTimeout = profile->multiStrokeTimeout(); 177 multiTimeout = profile->multiStrokeTimeout();
178 pref->multiStrokeSlider->setValue( multiTimeout ); 178 pref->multiStrokeSlider->setValue( multiTimeout );
179 multiTimeoutChanged( multiTimeout ); 179 multiTimeoutChanged( multiTimeout );
180 edit->setProfile( profile ); 180 edit->setProfile( profile );
181 break; 181 break;
182 } 182 }
183 } 183 }
184} 184}
185 185
186void QIMPenSetup::accept() 186void QIMPenSetup::accept()
187{ 187{
188 profile->setStyle( style ? QIMPenProfile::ToggleCases : QIMPenProfile::BothCases ); 188 profile->setStyle( style ? QIMPenProfile::ToggleCases : QIMPenProfile::BothCases );
189 profile->setMultiStrokeTimeout( multiTimeout ); 189 profile->setMultiStrokeTimeout( multiTimeout );
190 // Save current profile 190 // Save current profile
191 if ( profileCombo ) { 191 if ( profileCombo ) {
192 Config config( "handwriting" ); 192 Config config( "handwriting" );