Diffstat (limited to 'noncore/apps/opie-reader/Prefs.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Prefs.h | 190 |
1 files changed, 117 insertions, 73 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 @@ #define CPREFS_H -#include "useqpe.h" + #include <qvariant.h> @@ -17,12 +17,13 @@ #include <qcheckbox.h> -#include <qcombobox.h> #include <qlineedit.h> -#ifdef USEQPE
+ +#define USECOMBO + +#ifdef USECOMBO +#include <qcombobox.h> +#else #include <qpe/menubutton.h>
#endif -//#include "opie.h" -//#ifdef OPIE -#define USECOMBO -//#endif +#include "orkey.h" @@ -34,2 +35,3 @@ class QLabel; //class QSpinBox; +class QListViewItem; @@ -37,3 +39,3 @@ class CLayoutPrefs : public QWidget { - Q_OBJECT + public: @@ -54,2 +56,9 @@ public: QCheckBox* FullJustify; + QCheckBox* FixGraphics; + QCheckBox* hyphenate; + // QCheckBox* customhyphen; + QCheckBox* prepalm; + QCheckBox* pkern; + // QCheckBox* Inverse; + // QCheckBox* Negative; }; @@ -58,3 +67,3 @@ class CLayoutPrefs2 : public QWidget { - Q_OBJECT + public: @@ -63,3 +72,3 @@ public: - CLayoutPrefs2( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CLayoutPrefs2( int w, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~CLayoutPrefs2(); @@ -69,7 +78,7 @@ public: QSpinBox* Indent; - QSpinBox* Margin, *gfxzoom, *pageoverlap; + QSpinBox *TopMargin, *BottomMargin, *LeftMargin, *RightMargin, *gfxzoom, *pageoverlap; #ifdef USECOMBO - QComboBox *Markup, *fontselector; + QComboBox *Markup, *fontselector, *fgsel, *bgsel; #else - MenuButton *Markup, *fontselector; + MenuButton *Markup, *fontselector, *fgsel, *bgsel; #endif @@ -101,3 +110,3 @@ class CMiscPrefs : public QWidget { - Q_OBJECT + public: @@ -111,3 +120,14 @@ public: QCheckBox *Depluck, *Dejpluck, *Continuous; + + QSpinBox *scrollstep; + +#ifdef USECOMBO + QComboBox *scrollcolor, *bgtype, *scrolltype, *minibarcol; +#else + MenuButton *scrollcolor, *bgtype, *scrolltype, *minibarcol; +#endif }; +/* +class QListView; +class QListViewItem; @@ -116,2 +136,6 @@ class CButtonPrefs : public QWidget Q_OBJECT + QMap<orKey, int> *kmap; + QMap<orKey, QListViewItem*> listmap; + QListView* lb; + void keyPressEvent(QKeyEvent* e); #ifdef USECOMBO @@ -125,3 +149,3 @@ public: - CButtonPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); + CButtonPrefs( QMap<orKey, int>*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); ~CButtonPrefs(); @@ -129,12 +153,16 @@ public: #ifdef USECOMBO - QComboBox *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; + QComboBox *action; #else - MenuButton *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; + MenuButton *action; #endif - QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; -}; + QSpinBox* debounce; + // QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; + private slots: + void erasemapping(QListViewItem*); +}; +*/ class CInterPrefs : public QWidget { - Q_OBJECT + public: @@ -163,3 +191,3 @@ Q_OBJECT CMiscPrefs* misc; - CButtonPrefs* button; + // CButtonPrefs* button; CInterPrefs* inter; @@ -184,3 +212,3 @@ Q_OBJECT public: - CPrefs(bool fs = true, QWidget* parent = 0, const char* name = 0); + CPrefs(int w, bool fs = true, QWidget* parent = 0, const char* name = 0); ~CPrefs() @@ -188,3 +216,11 @@ Q_OBJECT } + bool hyphenate() { return layout->hyphenate->isChecked(); } + void hyphenate(bool _v) { layout->hyphenate->setChecked(_v); } + /* + bool customhyphen() { return layout->customhyphen->isChecked(); } + void customhyphen(bool _v) { layout->customhyphen->setChecked(_v); } + */ bool StripCR() { return layout->StripCR->isChecked(); } + bool repalm() { return layout->prepalm->isChecked(); } + bool kern() { return layout->pkern->isChecked(); } bool Dehyphen() { return layout->Dehyphen->isChecked(); } @@ -197,5 +233,11 @@ Q_OBJECT bool FullJustify() { return layout->FullJustify->isChecked(); } + // bool Inverse() { return layout->Inverse->isChecked(); } + // bool Negative() { return layout->Negative->isChecked(); } + bool FixGraphics() { return layout->FixGraphics->isChecked(); } int ParaLead() { return layout2->ParaLead->value(); } int LineLead() { return layout2->LineLead->value(); } - int Margin() { return layout2->Margin->value(); } + int TopMargin() { return layout2->TopMargin->value(); } + int BottomMargin() { return layout2->BottomMargin->value(); } + int LeftMargin() { return layout2->LeftMargin->value(); } + int RightMargin() { return layout2->RightMargin->value(); } int Indent() { return layout2->Indent->value(); } @@ -206,2 +248,4 @@ Q_OBJECT void StripCR(bool v) { layout->StripCR->setChecked(v); } + void repalm(bool v) { layout->prepalm->setChecked(v); } + void kern(bool v) { layout->pkern->setChecked(v); } void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); } @@ -214,5 +258,11 @@ Q_OBJECT void FullJustify(bool v) { layout->FullJustify->setChecked(v); } + // void Negative(bool v) { layout->Negative->setChecked(v); } + // void Inverse(bool v) { layout->Inverse->setChecked(v); } + void FixGraphics(bool v) { layout->FixGraphics->setChecked(v); } void ParaLead(int v) { layout2->ParaLead->setValue(v); } void LineLead(int v) { layout2->LineLead->setValue(v); } - void Margin(int v) { layout2->Margin->setValue(v); } + void TopMargin(int v) { layout2->TopMargin->setValue(v); } + void BottomMargin(int v) { layout2->BottomMargin->setValue(v); } + void LeftMargin(int v) { layout2->LeftMargin->setValue(v); } + void RightMargin(int v) { layout2->RightMargin->setValue(v); } void Indent(int v) { layout2->Indent->setValue(v); } @@ -224,2 +274,32 @@ Q_OBJECT #ifdef USECOMBO + void bgtype(int v) { misc->bgtype->setCurrentItem(v); } + void scrollcolor(int v) { misc->scrollcolor->setCurrentItem(v); } + void minibarcol(int v) { misc->minibarcol->setCurrentItem(v); } +#else + void bgtype(int v) { misc->bgtype->select(v); } + void scrollcolor(int v) { misc->scrollcolor->select(v); } + void minibarcol(int v) { misc->minibarcol->select(v); } +#endif + int bgtype() { return misc->bgtype->currentItem(); } + int scrollcolor() { return misc->scrollcolor->currentItem(); } + int minibarcol() { return misc->minibarcol->currentItem(); } + + +#ifdef USECOMBO + void foreground(int v) { layout2->fgsel->setCurrentItem(v); } +#else + void foreground(int v) { layout2->fgsel->select(v); } +#endif + int foreground() { return layout2->fgsel->currentItem(); } + +#ifdef USECOMBO + void background(int v) { layout2->bgsel->setCurrentItem(v); } +#else + void background(int v) { layout2->bgsel->select(v); } +#endif + int background() { return layout2->bgsel->currentItem(); } + + + +#ifdef USECOMBO void Font(QString& s) @@ -260,45 +340,7 @@ Q_OBJECT bool miscclipboard() { return misc->clipboard->isChecked(); } - - int spaceAction() { return button->spaceAction->currentItem(); } -#ifdef USECOMBO - void spaceAction(int v) { button->spaceAction->setCurrentItem(v); } -#else - void spaceAction(int v) { button->spaceAction->select(v); } -#endif - int escapeAction() { return button->escapeAction->currentItem(); } -#ifdef USECOMBO - void escapeAction(int v) { button->escapeAction->setCurrentItem(v); } -#else - void escapeAction(int v) { button->escapeAction->select(v); } -#endif - int returnAction() { return button->returnAction->currentItem(); } -#ifdef USECOMBO - void returnAction(int v) { button->returnAction->setCurrentItem(v); } -#else - void returnAction(int v) { button->returnAction->select(v); } -#endif - int leftAction() { return button->leftAction->currentItem(); } -#ifdef USECOMBO - void leftAction(int v) { button->leftAction->setCurrentItem(v); } -#else - void leftAction(int v) { button->leftAction->select(v); } -#endif - int rightAction() { return button->rightAction->currentItem(); } -#ifdef USECOMBO - void rightAction(int v) { button->rightAction->setCurrentItem(v); } -#else - void rightAction(int v) { button->rightAction->select(v); } -#endif - int upAction() { return button->upAction->currentItem(); } -#ifdef USECOMBO - void upAction(int v) { button->upAction->setCurrentItem(v); } -#else - void upAction(int v) { button->upAction->select(v); } -#endif - int downAction() { return button->downAction->currentItem(); } -#ifdef USECOMBO - void downAction(int v) { button->downAction->setCurrentItem(v); } -#else - void downAction(int v) { button->downAction->select(v); } -#endif + /* + int Debounce() { return button->debounce->value(); } + void Debounce(int v) { button->debounce->setValue(v); } + */ + /* bool leftScroll() { return button->leftScroll->isChecked(); } @@ -311,6 +353,6 @@ Q_OBJECT void downScroll(bool v) { button->downScroll->setChecked(v); } + */ - - int gfxsize() { return layout2->gfxzoom->value(); } - void gfxsize(int v) { layout2->gfxzoom->setValue(v); } + int gfxsize() { return layout2->gfxzoom->value()/10; } + void gfxsize(int v) { layout2->gfxzoom->setValue(10*v); } int pageoverlap() { return layout2->pageoverlap->value(); } @@ -331,10 +373,12 @@ Q_OBJECT int encoding() { return inter->encoding->currentItem(); } + int scrolltype() { return misc->scrolltype->currentItem(); } #ifdef USECOMBO void encoding(int v) { inter->encoding->setCurrentItem(v); } + void scrolltype(int v) { misc->scrolltype->setCurrentItem(v); } #else void encoding(int v) { inter->encoding->select(v); } + void scrolltype(int v) { misc->scrolltype->select(v); } #endif - - - + void scrollstep(int v) { misc->scrollstep->setValue(v); } + int scrollstep() { return misc->scrollstep->value(); } }; |