summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/Prefs.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/Prefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/Prefs.h196
1 files changed, 120 insertions, 76 deletions
diff --git a/noncore/apps/opie-reader/Prefs.h b/noncore/apps/opie-reader/Prefs.h
index 8fef2f5..cf12b70 100644
--- a/noncore/apps/opie-reader/Prefs.h
+++ b/noncore/apps/opie-reader/Prefs.h
@@ -10,3 +10,3 @@
10#define CPREFS_H 10#define CPREFS_H
11#include "useqpe.h" 11
12#include <qvariant.h> 12#include <qvariant.h>
@@ -17,12 +17,13 @@
17#include <qcheckbox.h> 17#include <qcheckbox.h>
18#include <qcombobox.h>
19#include <qlineedit.h> 18#include <qlineedit.h>
20#ifdef USEQPE
21#include <qpe/menubutton.h>
22#endif
23//#include "opie.h"
24 19
25//#ifdef OPIE
26#define USECOMBO 20#define USECOMBO
27//#endif 21
22#ifdef USECOMBO
23#include <qcombobox.h>
24#else
25#include <qpe/menubutton.h>
26#endif
27
28#include "orkey.h"
28 29
@@ -34,2 +35,3 @@ class QLabel;
34//class QSpinBox; 35//class QSpinBox;
36class QListViewItem;
35 37
@@ -37,3 +39,3 @@ class CLayoutPrefs : public QWidget
37{ 39{
38 Q_OBJECT 40
39public: 41public:
@@ -54,2 +56,9 @@ public:
54 QCheckBox* FullJustify; 56 QCheckBox* FullJustify;
57 QCheckBox* FixGraphics;
58 QCheckBox* hyphenate;
59 // QCheckBox* customhyphen;
60 QCheckBox* prepalm;
61 QCheckBox* pkern;
62 // QCheckBox* Inverse;
63 // QCheckBox* Negative;
55}; 64};
@@ -58,3 +67,3 @@ class CLayoutPrefs2 : public QWidget
58{ 67{
59 Q_OBJECT 68
60public: 69public:
@@ -63,3 +72,3 @@ public:
63 72
64 CLayoutPrefs2( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 73 CLayoutPrefs2( int w, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
65 ~CLayoutPrefs2(); 74 ~CLayoutPrefs2();
@@ -69,7 +78,7 @@ public:
69 QSpinBox* Indent; 78 QSpinBox* Indent;
70 QSpinBox* Margin, *gfxzoom, *pageoverlap; 79 QSpinBox *TopMargin, *BottomMargin, *LeftMargin, *RightMargin, *gfxzoom, *pageoverlap;
71#ifdef USECOMBO 80#ifdef USECOMBO
72 QComboBox *Markup, *fontselector; 81 QComboBox *Markup, *fontselector, *fgsel, *bgsel;
73#else 82#else
74 MenuButton *Markup, *fontselector; 83 MenuButton *Markup, *fontselector, *fgsel, *bgsel;
75#endif 84#endif
@@ -101,3 +110,3 @@ class CMiscPrefs : public QWidget
101{ 110{
102 Q_OBJECT 111
103public: 112public:
@@ -111,7 +120,22 @@ public:
111 QCheckBox *Depluck, *Dejpluck, *Continuous; 120 QCheckBox *Depluck, *Dejpluck, *Continuous;
121
122 QSpinBox *scrollstep;
123
124#ifdef USECOMBO
125 QComboBox *scrollcolor, *bgtype, *scrolltype, *minibarcol;
126#else
127 MenuButton *scrollcolor, *bgtype, *scrolltype, *minibarcol;
128#endif
112}; 129};
130/*
131class QListView;
132class QListViewItem;
113 133
114class CButtonPrefs : public QWidget 134class CButtonPrefs : public QWidget
115{ 135{
116 Q_OBJECT 136Q_OBJECT
137 QMap<orKey, int> *kmap;
138 QMap<orKey, QListViewItem*> listmap;
139 QListView* lb;
140 void keyPressEvent(QKeyEvent* e);
117#ifdef USECOMBO 141#ifdef USECOMBO
@@ -125,3 +149,3 @@ public:
125 149
126 CButtonPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 150 CButtonPrefs( QMap<orKey, int>*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
127 ~CButtonPrefs(); 151 ~CButtonPrefs();
@@ -129,12 +153,16 @@ public:
129#ifdef USECOMBO 153#ifdef USECOMBO
130 QComboBox *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; 154 QComboBox *action;
131#else 155#else
132 MenuButton *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; 156 MenuButton *action;
133#endif 157#endif
134 QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; 158 QSpinBox* debounce;
135};
136 159
160 // QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll;
161 private slots:
162 void erasemapping(QListViewItem*);
163};
164*/
137class CInterPrefs : public QWidget 165class CInterPrefs : public QWidget
138{ 166{
139 Q_OBJECT 167
140public: 168public:
@@ -163,3 +191,3 @@ Q_OBJECT
163 CMiscPrefs* misc; 191 CMiscPrefs* misc;
164 CButtonPrefs* button; 192 // CButtonPrefs* button;
165 CInterPrefs* inter; 193 CInterPrefs* inter;
@@ -184,3 +212,3 @@ Q_OBJECT
184 public: 212 public:
185 CPrefs(bool fs = true, QWidget* parent = 0, const char* name = 0); 213 CPrefs(int w, bool fs = true, QWidget* parent = 0, const char* name = 0);
186 ~CPrefs() 214 ~CPrefs()
@@ -188,3 +216,11 @@ Q_OBJECT
188 } 216 }
217 bool hyphenate() { return layout->hyphenate->isChecked(); }
218 void hyphenate(bool _v) { layout->hyphenate->setChecked(_v); }
219 /*
220 bool customhyphen() { return layout->customhyphen->isChecked(); }
221 void customhyphen(bool _v) { layout->customhyphen->setChecked(_v); }
222 */
189 bool StripCR() { return layout->StripCR->isChecked(); } 223 bool StripCR() { return layout->StripCR->isChecked(); }
224 bool repalm() { return layout->prepalm->isChecked(); }
225 bool kern() { return layout->pkern->isChecked(); }
190 bool Dehyphen() { return layout->Dehyphen->isChecked(); } 226 bool Dehyphen() { return layout->Dehyphen->isChecked(); }
@@ -197,5 +233,11 @@ Q_OBJECT
197 bool FullJustify() { return layout->FullJustify->isChecked(); } 233 bool FullJustify() { return layout->FullJustify->isChecked(); }
234 // bool Inverse() { return layout->Inverse->isChecked(); }
235 // bool Negative() { return layout->Negative->isChecked(); }
236 bool FixGraphics() { return layout->FixGraphics->isChecked(); }
198 int ParaLead() { return layout2->ParaLead->value(); } 237 int ParaLead() { return layout2->ParaLead->value(); }
199 int LineLead() { return layout2->LineLead->value(); } 238 int LineLead() { return layout2->LineLead->value(); }
200 int Margin() { return layout2->Margin->value(); } 239 int TopMargin() { return layout2->TopMargin->value(); }
240 int BottomMargin() { return layout2->BottomMargin->value(); }
241 int LeftMargin() { return layout2->LeftMargin->value(); }
242 int RightMargin() { return layout2->RightMargin->value(); }
201 int Indent() { return layout2->Indent->value(); } 243 int Indent() { return layout2->Indent->value(); }
@@ -206,2 +248,4 @@ Q_OBJECT
206 void StripCR(bool v) { layout->StripCR->setChecked(v); } 248 void StripCR(bool v) { layout->StripCR->setChecked(v); }
249 void repalm(bool v) { layout->prepalm->setChecked(v); }
250 void kern(bool v) { layout->pkern->setChecked(v); }
207 void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); } 251 void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); }
@@ -214,5 +258,11 @@ Q_OBJECT
214 void FullJustify(bool v) { layout->FullJustify->setChecked(v); } 258 void FullJustify(bool v) { layout->FullJustify->setChecked(v); }
259 // void Negative(bool v) { layout->Negative->setChecked(v); }
260 // void Inverse(bool v) { layout->Inverse->setChecked(v); }
261 void FixGraphics(bool v) { layout->FixGraphics->setChecked(v); }
215 void ParaLead(int v) { layout2->ParaLead->setValue(v); } 262 void ParaLead(int v) { layout2->ParaLead->setValue(v); }
216 void LineLead(int v) { layout2->LineLead->setValue(v); } 263 void LineLead(int v) { layout2->LineLead->setValue(v); }
217 void Margin(int v) { layout2->Margin->setValue(v); } 264 void TopMargin(int v) { layout2->TopMargin->setValue(v); }
265 void BottomMargin(int v) { layout2->BottomMargin->setValue(v); }
266 void LeftMargin(int v) { layout2->LeftMargin->setValue(v); }
267 void RightMargin(int v) { layout2->RightMargin->setValue(v); }
218 void Indent(int v) { layout2->Indent->setValue(v); } 268 void Indent(int v) { layout2->Indent->setValue(v); }
@@ -224,2 +274,32 @@ Q_OBJECT
224#ifdef USECOMBO 274#ifdef USECOMBO
275 void bgtype(int v) { misc->bgtype->setCurrentItem(v); }
276 void scrollcolor(int v) { misc->scrollcolor->setCurrentItem(v); }
277 void minibarcol(int v) { misc->minibarcol->setCurrentItem(v); }
278#else
279 void bgtype(int v) { misc->bgtype->select(v); }
280 void scrollcolor(int v) { misc->scrollcolor->select(v); }
281 void minibarcol(int v) { misc->minibarcol->select(v); }
282#endif
283 int bgtype() { return misc->bgtype->currentItem(); }
284 int scrollcolor() { return misc->scrollcolor->currentItem(); }
285 int minibarcol() { return misc->minibarcol->currentItem(); }
286
287
288#ifdef USECOMBO
289 void foreground(int v) { layout2->fgsel->setCurrentItem(v); }
290#else
291 void foreground(int v) { layout2->fgsel->select(v); }
292#endif
293 int foreground() { return layout2->fgsel->currentItem(); }
294
295#ifdef USECOMBO
296 void background(int v) { layout2->bgsel->setCurrentItem(v); }
297#else
298 void background(int v) { layout2->bgsel->select(v); }
299#endif
300 int background() { return layout2->bgsel->currentItem(); }
301
302
303
304#ifdef USECOMBO
225 void Font(QString& s) 305 void Font(QString& s)
@@ -260,45 +340,7 @@ Q_OBJECT
260 bool miscclipboard() { return misc->clipboard->isChecked(); } 340 bool miscclipboard() { return misc->clipboard->isChecked(); }
261 341 /*
262 int spaceAction() { return button->spaceAction->currentItem(); } 342 int Debounce() { return button->debounce->value(); }
263#ifdef USECOMBO 343 void Debounce(int v) { button->debounce->setValue(v); }
264 void spaceAction(int v) { button->spaceAction->setCurrentItem(v); } 344 */
265#else 345 /*
266 void spaceAction(int v) { button->spaceAction->select(v); }
267#endif
268 int escapeAction() { return button->escapeAction->currentItem(); }
269#ifdef USECOMBO
270 void escapeAction(int v) { button->escapeAction->setCurrentItem(v); }
271#else
272 void escapeAction(int v) { button->escapeAction->select(v); }
273#endif
274 int returnAction() { return button->returnAction->currentItem(); }
275#ifdef USECOMBO
276 void returnAction(int v) { button->returnAction->setCurrentItem(v); }
277#else
278 void returnAction(int v) { button->returnAction->select(v); }
279#endif
280 int leftAction() { return button->leftAction->currentItem(); }
281#ifdef USECOMBO
282 void leftAction(int v) { button->leftAction->setCurrentItem(v); }
283#else
284 void leftAction(int v) { button->leftAction->select(v); }
285#endif
286 int rightAction() { return button->rightAction->currentItem(); }
287#ifdef USECOMBO
288 void rightAction(int v) { button->rightAction->setCurrentItem(v); }
289#else
290 void rightAction(int v) { button->rightAction->select(v); }
291#endif
292 int upAction() { return button->upAction->currentItem(); }
293#ifdef USECOMBO
294 void upAction(int v) { button->upAction->setCurrentItem(v); }
295#else
296 void upAction(int v) { button->upAction->select(v); }
297#endif
298 int downAction() { return button->downAction->currentItem(); }
299#ifdef USECOMBO
300 void downAction(int v) { button->downAction->setCurrentItem(v); }
301#else
302 void downAction(int v) { button->downAction->select(v); }
303#endif
304 bool leftScroll() { return button->leftScroll->isChecked(); } 346 bool leftScroll() { return button->leftScroll->isChecked(); }
@@ -311,6 +353,6 @@ Q_OBJECT
311 void downScroll(bool v) { button->downScroll->setChecked(v); } 353 void downScroll(bool v) { button->downScroll->setChecked(v); }
354 */
312 355
313 356 int gfxsize() { return layout2->gfxzoom->value()/10; }
314 int gfxsize() { return layout2->gfxzoom->value(); } 357 void gfxsize(int v) { layout2->gfxzoom->setValue(10*v); }
315 void gfxsize(int v) { layout2->gfxzoom->setValue(v); }
316 int pageoverlap() { return layout2->pageoverlap->value(); } 358 int pageoverlap() { return layout2->pageoverlap->value(); }
@@ -331,10 +373,12 @@ Q_OBJECT
331 int encoding() { return inter->encoding->currentItem(); } 373 int encoding() { return inter->encoding->currentItem(); }
374 int scrolltype() { return misc->scrolltype->currentItem(); }
332#ifdef USECOMBO 375#ifdef USECOMBO
333 void encoding(int v) { inter->encoding->setCurrentItem(v); } 376 void encoding(int v) { inter->encoding->setCurrentItem(v); }
377 void scrolltype(int v) { misc->scrolltype->setCurrentItem(v); }
334#else 378#else
335 void encoding(int v) { inter->encoding->select(v); } 379 void encoding(int v) { inter->encoding->select(v); }
380 void scrolltype(int v) { misc->scrolltype->select(v); }
336#endif 381#endif
337 382 void scrollstep(int v) { misc->scrollstep->setValue(v); }
338 383 int scrollstep() { return misc->scrollstep->value(); }
339
340}; 384};