author | brad <brad> | 2004-07-03 07:07:40 (UTC) |
---|---|---|
committer | brad <brad> | 2004-07-03 07:07:40 (UTC) |
commit | 88c9b1b2bbc64bae352eb7ddb7eabf9fbaca416d (patch) (unidiff) | |
tree | b2f5bf2b2bf4ab8638708c6e2228e6c3f9fe83e7 | |
parent | 0b0cc8ff22fdae62b8f40dc2a77a4de9a6fd0cb6 (diff) | |
download | opie-88c9b1b2bbc64bae352eb7ddb7eabf9fbaca416d.zip opie-88c9b1b2bbc64bae352eb7ddb7eabf9fbaca416d.tar.gz opie-88c9b1b2bbc64bae352eb7ddb7eabf9fbaca416d.tar.bz2 |
Don't display hidden sets in trainer.
-rw-r--r-- | inputmethods/handwriting/qimpenhelp.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inputmethods/handwriting/qimpenhelp.cpp b/inputmethods/handwriting/qimpenhelp.cpp index 0727931..d0ccd55 100644 --- a/inputmethods/handwriting/qimpenhelp.cpp +++ b/inputmethods/handwriting/qimpenhelp.cpp | |||
@@ -99,97 +99,98 @@ protected: | |||
99 | 99 | ||
100 | HandwritingHelp::HandwritingHelp( QIMPenProfile *p, QWidget *parent, const char *name, WFlags f ) | 100 | HandwritingHelp::HandwritingHelp( QIMPenProfile *p, QWidget *parent, const char *name, WFlags f ) |
101 | : QTabWidget( parent, name, f ) | 101 | : QTabWidget( parent, name, f ) |
102 | { | 102 | { |
103 | setCaption( tr("Handwriting Help") ); | 103 | setCaption( tr("Handwriting Help") ); |
104 | QTextView *help = new QTextView( this ); | 104 | QTextView *help = new QTextView( this ); |
105 | help->setFrameStyle( QFrame::NoFrame ); | 105 | help->setFrameStyle( QFrame::NoFrame ); |
106 | help->setText( | 106 | help->setText( |
107 | tr( "<ul><li>When you start to use the handwriting recogniser " | 107 | tr( "<ul><li>When you start to use the handwriting recogniser " |
108 | "write slowly, accurately and firmly." | 108 | "write slowly, accurately and firmly." |
109 | "<li>Use the guide lines when drawing your characters." | 109 | "<li>Use the guide lines when drawing your characters." |
110 | "<li>When drawing a character with multiple strokes, each " | 110 | "<li>When drawing a character with multiple strokes, each " |
111 | "successive stroke must be drawn before the grayed strokes are erased." | 111 | "successive stroke must be drawn before the grayed strokes are erased." |
112 | "<li>Practice your handwriting using the handwriting trainer." | 112 | "<li>Practice your handwriting using the handwriting trainer." |
113 | "<li>When adding your own character templates make sure they " | 113 | "<li>When adding your own character templates make sure they " |
114 | "are sufficiently different from other characters' templates." | 114 | "are sufficiently different from other characters' templates." |
115 | "</ul>") ); | 115 | "</ul>") ); |
116 | 116 | ||
117 | addTab( help, tr("Tips") ); | 117 | addTab( help, tr("Tips") ); |
118 | 118 | ||
119 | HandwritingTrainer *trainer = new HandwritingTrainer( p, this ); | 119 | HandwritingTrainer *trainer = new HandwritingTrainer( p, this ); |
120 | addTab( trainer, tr("Trainer") ); | 120 | addTab( trainer, tr("Trainer") ); |
121 | } | 121 | } |
122 | 122 | ||
123 | void HandwritingHelp::showEvent( QShowEvent * ) | 123 | void HandwritingHelp::showEvent( QShowEvent * ) |
124 | { | 124 | { |
125 | Global::hideInputMethod(); | 125 | Global::hideInputMethod(); |
126 | } | 126 | } |
127 | 127 | ||
128 | void HandwritingHelp::hideEvent( QHideEvent * ) | 128 | void HandwritingHelp::hideEvent( QHideEvent * ) |
129 | { | 129 | { |
130 | Global::showInputMethod(); | 130 | Global::showInputMethod(); |
131 | } | 131 | } |
132 | 132 | ||
133 | //--------------------------------------------------------------------------- | 133 | //--------------------------------------------------------------------------- |
134 | 134 | ||
135 | HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const char *name ) | 135 | HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const char *name ) |
136 | : QWidget( parent, name ), profile(p) | 136 | : QWidget( parent, name ), profile(p) |
137 | { | 137 | { |
138 | QGridLayout *gl = new QGridLayout( this, 4, 2, 0, 4 ); | 138 | QGridLayout *gl = new QGridLayout( this, 4, 2, 0, 4 ); |
139 | gl->setColStretch( 1, 1 ); | 139 | gl->setColStretch( 1, 1 ); |
140 | gl->setRowStretch(3, 1); | 140 | gl->setRowStretch(3, 1); |
141 | 141 | ||
142 | charSetCombo = new QComboBox( this ); | 142 | charSetCombo = new QComboBox( this ); |
143 | gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); | 143 | gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); |
144 | connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); | 144 | connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); |
145 | QIMPenCharSetIterator it( profile->charSets() ); | 145 | QIMPenCharSetIterator it( profile->charSets() ); |
146 | for ( ; it.current(); ++it ) { | 146 | for ( ; it.current(); ++it ) { |
147 | charSetCombo->insertItem( it.current()->description() ); | 147 | if ( ! it.current()->hidden() ) |
148 | charSetCombo->insertItem( it.current()->description() ); | ||
148 | } | 149 | } |
149 | 150 | ||
150 | charList = new QListBox( this ); | 151 | charList = new QListBox( this ); |
151 | charList->setHScrollBarMode( QListBox::AlwaysOff ); | 152 | charList->setHScrollBarMode( QListBox::AlwaysOff ); |
152 | charList->setFixedWidth(80); | 153 | charList->setFixedWidth(80); |
153 | connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); | 154 | connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); |
154 | gl->addWidget(charList, 1, 0); | 155 | gl->addWidget(charList, 1, 0); |
155 | 156 | ||
156 | result = new QLabel( this ); | 157 | result = new QLabel( this ); |
157 | result->setAlignment(AlignLeft | AlignVCenter | WordBreak); | 158 | result->setAlignment(AlignLeft | AlignVCenter | WordBreak); |
158 | result->setText( | 159 | result->setText( |
159 | tr( "Select a reference character from the list. Practice writing in " | 160 | tr( "Select a reference character from the list. Practice writing in " |
160 | "the area on the right.")); | 161 | "the area on the right.")); |
161 | gl->addMultiCellWidget(result, 1, 2, 1, 1); | 162 | gl->addMultiCellWidget(result, 1, 2, 1, 1); |
162 | 163 | ||
163 | matcher = new QIMPenMatch( this ); | 164 | matcher = new QIMPenMatch( this ); |
164 | matcher->setCharSet( currentSet ); | 165 | matcher->setCharSet( currentSet ); |
165 | connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) ); | 166 | connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) ); |
166 | connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)), | 167 | connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)), |
167 | this, SLOT(matched(const QIMPenCharMatchList&)) ); | 168 | this, SLOT(matched(const QIMPenCharMatchList&)) ); |
168 | 169 | ||
169 | QHBoxLayout *hb = new QHBoxLayout(); | 170 | QHBoxLayout *hb = new QHBoxLayout(); |
170 | gl->addLayout( hb, 2, 0 ); | 171 | gl->addLayout( hb, 2, 0 ); |
171 | prevBtn = new QPushButton( this ); | 172 | prevBtn = new QPushButton( this ); |
172 | prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); | 173 | prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); |
173 | connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); | 174 | connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); |
174 | hb->addWidget( prevBtn ); | 175 | hb->addWidget( prevBtn ); |
175 | 176 | ||
176 | nextBtn = new QPushButton( this ); | 177 | nextBtn = new QPushButton( this ); |
177 | nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); | 178 | nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); |
178 | connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); | 179 | connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); |
179 | hb->addWidget( nextBtn ); | 180 | hb->addWidget( nextBtn ); |
180 | 181 | ||
181 | refPw = new QIMPenWidget( this ); | 182 | refPw = new QIMPenWidget( this ); |
182 | refPw->setReadOnly( TRUE ); | 183 | refPw->setReadOnly( TRUE ); |
183 | gl->addWidget( refPw, 3, 0 ); | 184 | gl->addWidget( refPw, 3, 0 ); |
184 | 185 | ||
185 | pracPw = new QIMPenWidget( this ); | 186 | pracPw = new QIMPenWidget( this ); |
186 | connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); | 187 | connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); |
187 | connect( pracPw, SIGNAL(beginStroke()), | 188 | connect( pracPw, SIGNAL(beginStroke()), |
188 | this, SLOT(beginStroke()) ); | 189 | this, SLOT(beginStroke()) ); |
189 | connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), | 190 | connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), |
190 | this, SLOT(strokeEntered(QIMPenStroke*)) ); | 191 | this, SLOT(strokeEntered(QIMPenStroke*)) ); |
191 | connect( pracPw, SIGNAL(beginStroke()), | 192 | connect( pracPw, SIGNAL(beginStroke()), |
192 | matcher, SLOT(beginStroke()) ); | 193 | matcher, SLOT(beginStroke()) ); |
193 | connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), | 194 | connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), |
194 | matcher, SLOT(strokeEntered(QIMPenStroke*)) ); | 195 | matcher, SLOT(strokeEntered(QIMPenStroke*)) ); |
195 | gl->addWidget( pracPw, 3, 1 ); | 196 | gl->addWidget( pracPw, 3, 1 ); |