Diffstat (limited to 'noncore/apps/opie-reader/Prefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Prefs.h | 75 |
1 files changed, 60 insertions, 15 deletions
diff --git a/noncore/apps/opie-reader/Prefs.h b/noncore/apps/opie-reader/Prefs.h index cf12b70..103484e 100644 --- a/noncore/apps/opie-reader/Prefs.h +++ b/noncore/apps/opie-reader/Prefs.h | |||
@@ -58,12 +58,14 @@ public: | |||
58 | QCheckBox* hyphenate; | 58 | QCheckBox* hyphenate; |
59 | // QCheckBox* customhyphen; | 59 | // QCheckBox* customhyphen; |
60 | QCheckBox* prepalm; | 60 | QCheckBox* prepalm; |
61 | QCheckBox* pkern; | 61 | QCheckBox* pkern; |
62 | // QCheckBox* Inverse; | 62 | // QCheckBox* Inverse; |
63 | // QCheckBox* Negative; | 63 | // QCheckBox* Negative; |
64 | QCheckBox* InlineTables; | ||
65 | QCheckBox* Underlinelinks; | ||
64 | }; | 66 | }; |
65 | 67 | ||
66 | class CLayoutPrefs2 : public QWidget | 68 | class CLayoutPrefs2 : public QWidget |
67 | { | 69 | { |
68 | 70 | ||
69 | public: | 71 | public: |
@@ -95,12 +97,13 @@ public: | |||
95 | CPluckerPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 97 | CPluckerPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
96 | ~CPluckerPrefs(); | 98 | ~CPluckerPrefs(); |
97 | 99 | ||
98 | QCheckBox* Depluck; | 100 | QCheckBox* Depluck; |
99 | QCheckBox* Dejpluck; | 101 | QCheckBox* Dejpluck; |
100 | QCheckBox* Continuous; | 102 | QCheckBox* Continuous; |
103 | QCheckBox* DoubleBuffer; | ||
101 | protected: | 104 | protected: |
102 | 105 | ||
103 | QHBoxLayout* Layout5; | 106 | QHBoxLayout* Layout5; |
104 | QVBoxLayout* Layout11; | 107 | QVBoxLayout* Layout11; |
105 | QGridLayout* Layout4; | 108 | QGridLayout* Layout4; |
106 | 109 | ||
@@ -113,28 +116,45 @@ public: | |||
113 | 116 | ||
114 | friend class CPrefs; | 117 | friend class CPrefs; |
115 | 118 | ||
116 | CMiscPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 119 | CMiscPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
117 | ~CMiscPrefs(); | 120 | ~CMiscPrefs(); |
118 | 121 | ||
119 | QCheckBox *annotation, *dictionary, *clipboard; | 122 | QCheckBox *annotation, *dictionary, *clipboard, *boutput; |
120 | QCheckBox *Depluck, *Dejpluck, *Continuous; | 123 | QCheckBox *Depluck, *Dejpluck, *Continuous, *DoubleBuffer; |
124 | |||
125 | #ifdef USECOMBO | ||
126 | QComboBox *bgtype, *minibarcol; | ||
127 | #else | ||
128 | MenuButton *bgtype, *minibarcol; | ||
129 | #endif | ||
130 | }; | ||
131 | |||
132 | class CScrollPrefs : public QWidget | ||
133 | { | ||
134 | |||
135 | public: | ||
136 | |||
137 | friend class CPrefs; | ||
138 | |||
139 | CScrollPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
140 | ~CScrollPrefs(); | ||
121 | 141 | ||
122 | QSpinBox *scrollstep; | 142 | QSpinBox *scrollstep; |
123 | 143 | ||
124 | #ifdef USECOMBO | 144 | #ifdef USECOMBO |
125 | QComboBox *scrollcolor, *bgtype, *scrolltype, *minibarcol; | 145 | QComboBox *scrollcolor, *scrolltype, *outcodec; |
126 | #else | 146 | #else |
127 | MenuButton *scrollcolor, *bgtype, *scrolltype, *minibarcol; | 147 | MenuButton *scrollcolor, *scrolltype, *outcodec; |
128 | #endif | 148 | #endif |
129 | }; | 149 | }; |
130 | /* | 150 | /* |
131 | class QListView; | 151 | class QListView; |
132 | class QListViewItem; | 152 | class QListViewItem; |
133 | 153 | ||
134 | class CButtonPrefs : public QWidget | 154 | sclass CButtonPrefs : public QWidget |
135 | { | 155 | { |
136 | Q_OBJECT | 156 | Q_OBJECT |
137 | QMap<orKey, int> *kmap; | 157 | QMap<orKey, int> *kmap; |
138 | QMap<orKey, QListViewItem*> listmap; | 158 | QMap<orKey, QListViewItem*> listmap; |
139 | QListView* lb; | 159 | QListView* lb; |
140 | void keyPressEvent(QKeyEvent* e); | 160 | void keyPressEvent(QKeyEvent* e); |
@@ -186,13 +206,13 @@ public: | |||
186 | class CPrefs : public QDialog | 206 | class CPrefs : public QDialog |
187 | { | 207 | { |
188 | Q_OBJECT | 208 | Q_OBJECT |
189 | CLayoutPrefs* layout; | 209 | CLayoutPrefs* layout; |
190 | CLayoutPrefs2* layout2; | 210 | CLayoutPrefs2* layout2; |
191 | CMiscPrefs* misc; | 211 | CMiscPrefs* misc; |
192 | // CButtonPrefs* button; | 212 | CScrollPrefs* scroll; |
193 | CInterPrefs* inter; | 213 | CInterPrefs* inter; |
194 | 214 | ||
195 | void keyPressEvent(QKeyEvent* e) | 215 | void keyPressEvent(QKeyEvent* e) |
196 | { | 216 | { |
197 | switch (e->key()) | 217 | switch (e->key()) |
198 | { | 218 | { |
@@ -218,13 +238,15 @@ Q_OBJECT | |||
218 | void hyphenate(bool _v) { layout->hyphenate->setChecked(_v); } | 238 | void hyphenate(bool _v) { layout->hyphenate->setChecked(_v); } |
219 | /* | 239 | /* |
220 | bool customhyphen() { return layout->customhyphen->isChecked(); } | 240 | bool customhyphen() { return layout->customhyphen->isChecked(); } |
221 | void customhyphen(bool _v) { layout->customhyphen->setChecked(_v); } | 241 | void customhyphen(bool _v) { layout->customhyphen->setChecked(_v); } |
222 | */ | 242 | */ |
223 | bool StripCR() { return layout->StripCR->isChecked(); } | 243 | bool StripCR() { return layout->StripCR->isChecked(); } |
244 | bool InlineTables() { return layout->InlineTables->isChecked(); } | ||
224 | bool repalm() { return layout->prepalm->isChecked(); } | 245 | bool repalm() { return layout->prepalm->isChecked(); } |
246 | bool UnderlineLink() { return layout->Underlinelinks->isChecked(); } | ||
225 | bool kern() { return layout->pkern->isChecked(); } | 247 | bool kern() { return layout->pkern->isChecked(); } |
226 | bool Dehyphen() { return layout->Dehyphen->isChecked(); } | 248 | bool Dehyphen() { return layout->Dehyphen->isChecked(); } |
227 | bool SingleSpace() { return layout->SingleSpace->isChecked(); } | 249 | bool SingleSpace() { return layout->SingleSpace->isChecked(); } |
228 | bool Unindent() { return layout->Unindent->isChecked(); } | 250 | bool Unindent() { return layout->Unindent->isChecked(); } |
229 | bool Reparagraph() { return layout->Reparagraph->isChecked(); } | 251 | bool Reparagraph() { return layout->Reparagraph->isChecked(); } |
230 | bool DoubleSpace() { return layout->DoubleSpace->isChecked(); } | 252 | bool DoubleSpace() { return layout->DoubleSpace->isChecked(); } |
@@ -243,13 +265,15 @@ Q_OBJECT | |||
243 | int Indent() { return layout2->Indent->value(); } | 265 | int Indent() { return layout2->Indent->value(); } |
244 | int Markup() { return layout2->Markup->currentItem(); } | 266 | int Markup() { return layout2->Markup->currentItem(); } |
245 | QString Font() { return layout2->fontselector->currentText(); } | 267 | QString Font() { return layout2->fontselector->currentText(); } |
246 | 268 | ||
247 | 269 | ||
248 | void StripCR(bool v) { layout->StripCR->setChecked(v); } | 270 | void StripCR(bool v) { layout->StripCR->setChecked(v); } |
271 | void InlineTables(bool v) { layout->InlineTables->setChecked(v); } | ||
249 | void repalm(bool v) { layout->prepalm->setChecked(v); } | 272 | void repalm(bool v) { layout->prepalm->setChecked(v); } |
273 | void UnderlineLink(bool v) { layout->Underlinelinks->setChecked(v); } | ||
250 | void kern(bool v) { layout->pkern->setChecked(v); } | 274 | void kern(bool v) { layout->pkern->setChecked(v); } |
251 | void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); } | 275 | void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); } |
252 | void SingleSpace(bool v) { layout->SingleSpace->setChecked(v); } | 276 | void SingleSpace(bool v) { layout->SingleSpace->setChecked(v); } |
253 | void Unindent(bool v) { layout->Unindent->setChecked(v); } | 277 | void Unindent(bool v) { layout->Unindent->setChecked(v); } |
254 | void Reparagraph(bool v) { layout->Reparagraph->setChecked(v); } | 278 | void Reparagraph(bool v) { layout->Reparagraph->setChecked(v); } |
255 | void DoubleSpace(bool v) { layout->DoubleSpace->setChecked(v); } | 279 | void DoubleSpace(bool v) { layout->DoubleSpace->setChecked(v); } |
@@ -270,21 +294,21 @@ Q_OBJECT | |||
270 | void Markup(int v) { layout2->Markup->setCurrentItem(v); } | 294 | void Markup(int v) { layout2->Markup->setCurrentItem(v); } |
271 | #else | 295 | #else |
272 | void Markup(int v) { layout2->Markup->select(v); } | 296 | void Markup(int v) { layout2->Markup->select(v); } |
273 | #endif | 297 | #endif |
274 | #ifdef USECOMBO | 298 | #ifdef USECOMBO |
275 | void bgtype(int v) { misc->bgtype->setCurrentItem(v); } | 299 | void bgtype(int v) { misc->bgtype->setCurrentItem(v); } |
276 | void scrollcolor(int v) { misc->scrollcolor->setCurrentItem(v); } | 300 | void scrollcolor(int v) { scroll->scrollcolor->setCurrentItem(v); } |
277 | void minibarcol(int v) { misc->minibarcol->setCurrentItem(v); } | 301 | void minibarcol(int v) { misc->minibarcol->setCurrentItem(v); } |
278 | #else | 302 | #else |
279 | void bgtype(int v) { misc->bgtype->select(v); } | 303 | void bgtype(int v) { misc->bgtype->select(v); } |
280 | void scrollcolor(int v) { misc->scrollcolor->select(v); } | 304 | void scrollcolor(int v) { scroll->scrollcolor->select(v); } |
281 | void minibarcol(int v) { misc->minibarcol->select(v); } | 305 | void minibarcol(int v) { misc->minibarcol->select(v); } |
282 | #endif | 306 | #endif |
283 | int bgtype() { return misc->bgtype->currentItem(); } | 307 | int bgtype() { return misc->bgtype->currentItem(); } |
284 | int scrollcolor() { return misc->scrollcolor->currentItem(); } | 308 | int scrollcolor() { return scroll->scrollcolor->currentItem(); } |
285 | int minibarcol() { return misc->minibarcol->currentItem(); } | 309 | int minibarcol() { return misc->minibarcol->currentItem(); } |
286 | 310 | ||
287 | 311 | ||
288 | #ifdef USECOMBO | 312 | #ifdef USECOMBO |
289 | void foreground(int v) { layout2->fgsel->setCurrentItem(v); } | 313 | void foreground(int v) { layout2->fgsel->setCurrentItem(v); } |
290 | #else | 314 | #else |
@@ -297,13 +321,12 @@ Q_OBJECT | |||
297 | #else | 321 | #else |
298 | void background(int v) { layout2->bgsel->select(v); } | 322 | void background(int v) { layout2->bgsel->select(v); } |
299 | #endif | 323 | #endif |
300 | int background() { return layout2->bgsel->currentItem(); } | 324 | int background() { return layout2->bgsel->currentItem(); } |
301 | 325 | ||
302 | 326 | ||
303 | |||
304 | #ifdef USECOMBO | 327 | #ifdef USECOMBO |
305 | void Font(QString& s) | 328 | void Font(QString& s) |
306 | { | 329 | { |
307 | for (int i = 1; i <= layout2->fontselector->count(); i++) | 330 | for (int i = 1; i <= layout2->fontselector->count(); i++) |
308 | { | 331 | { |
309 | if (layout2->fontselector->text(i) == s) | 332 | if (layout2->fontselector->text(i) == s) |
@@ -314,18 +337,40 @@ Q_OBJECT | |||
314 | } | 337 | } |
315 | } | 338 | } |
316 | #else | 339 | #else |
317 | void Font(QString& s) { layout2->fontselector->select(s); } | 340 | void Font(QString& s) { layout2->fontselector->select(s); } |
318 | #endif | 341 | #endif |
319 | 342 | ||
343 | #ifdef USECOMBO | ||
344 | void outcodec(QString& s) | ||
345 | { | ||
346 | for (int i = 1; i <= scroll->outcodec->count(); i++) | ||
347 | { | ||
348 | if (scroll->outcodec->text(i) == s) | ||
349 | { | ||
350 | scroll->outcodec->setCurrentItem(i); | ||
351 | break; | ||
352 | } | ||
353 | } | ||
354 | } | ||
355 | #else | ||
356 | void outcodec(QString& s) { scroll->outcodec->select(s); } | ||
357 | #endif | ||
358 | QString outcodec() { return scroll->outcodec->currentText(); } | ||
359 | |||
360 | void miscoutput(bool v) { return misc->boutput->setChecked(v); } | ||
361 | bool miscoutput() { return misc->boutput->isChecked(); } | ||
362 | |||
320 | bool Depluck() { return misc->Depluck->isChecked(); } | 363 | bool Depluck() { return misc->Depluck->isChecked(); } |
321 | void Depluck(bool v) { misc->Depluck->setChecked(v); } | 364 | void Depluck(bool v) { misc->Depluck->setChecked(v); } |
322 | bool Dejpluck() { return misc->Dejpluck->isChecked(); } | 365 | bool Dejpluck() { return misc->Dejpluck->isChecked(); } |
323 | void Dejpluck(bool v) { misc->Dejpluck->setChecked(v); } | 366 | void Dejpluck(bool v) { misc->Dejpluck->setChecked(v); } |
324 | bool Continuous() { return misc->Continuous->isChecked(); } | 367 | bool Continuous() { return misc->Continuous->isChecked(); } |
325 | void Continuous(bool v) { misc->Continuous->setChecked(v); } | 368 | void Continuous(bool v) { misc->Continuous->setChecked(v); } |
369 | bool DoubleBuffer() { return misc->DoubleBuffer->isChecked(); } | ||
370 | void DoubleBuffer(bool v) { misc->DoubleBuffer->setChecked(v); } | ||
326 | bool SwapMouse() { return inter->SwapMouse->isChecked(); } | 371 | bool SwapMouse() { return inter->SwapMouse->isChecked(); } |
327 | void SwapMouse(bool v) { inter->SwapMouse->setChecked(v); } | 372 | void SwapMouse(bool v) { inter->SwapMouse->setChecked(v); } |
328 | 373 | ||
329 | 374 | ||
330 | void dictApplication(const QString& v) { inter->application->setText(v); } | 375 | void dictApplication(const QString& v) { inter->application->setText(v); } |
331 | QString dictApplication() { return inter->application->text(); } | 376 | QString dictApplication() { return inter->application->text(); } |
@@ -368,18 +413,18 @@ Q_OBJECT | |||
368 | void ideogramwidth(int v) { inter->ideogramwidth->setValue(v); } | 413 | void ideogramwidth(int v) { inter->ideogramwidth->setValue(v); } |
369 | 414 | ||
370 | bool propfontchange() { return inter->propfontchange->isChecked(); } | 415 | bool propfontchange() { return inter->propfontchange->isChecked(); } |
371 | void propfontchange(bool v) { inter->propfontchange->setChecked(v); } | 416 | void propfontchange(bool v) { inter->propfontchange->setChecked(v); } |
372 | 417 | ||
373 | int encoding() { return inter->encoding->currentItem(); } | 418 | int encoding() { return inter->encoding->currentItem(); } |
374 | int scrolltype() { return misc->scrolltype->currentItem(); } | 419 | int scrolltype() { return scroll->scrolltype->currentItem(); } |
375 | #ifdef USECOMBO | 420 | #ifdef USECOMBO |
376 | void encoding(int v) { inter->encoding->setCurrentItem(v); } | 421 | void encoding(int v) { inter->encoding->setCurrentItem(v); } |
377 | void scrolltype(int v) { misc->scrolltype->setCurrentItem(v); } | 422 | void scrolltype(int v) { scroll->scrolltype->setCurrentItem(v); } |
378 | #else | 423 | #else |
379 | void encoding(int v) { inter->encoding->select(v); } | 424 | void encoding(int v) { inter->encoding->select(v); } |
380 | void scrolltype(int v) { misc->scrolltype->select(v); } | 425 | void scrolltype(int v) { scroll->scrolltype->select(v); } |
381 | #endif | 426 | #endif |
382 | void scrollstep(int v) { misc->scrollstep->setValue(v); } | 427 | void scrollstep(int v) { scroll->scrollstep->setValue(v); } |
383 | int scrollstep() { return misc->scrollstep->value(); } | 428 | int scrollstep() { return scroll->scrollstep->value(); } |
384 | }; | 429 | }; |
385 | #endif // CPREFS_H | 430 | #endif // CPREFS_H |