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 | |||
@@ -32,354 +32,399 @@ class QHBoxLayout; | |||
32 | class QGridLayout; | 32 | class QGridLayout; |
33 | //class QCheckBox; | 33 | //class QCheckBox; |
34 | class QLabel; | 34 | class QLabel; |
35 | //class QSpinBox; | 35 | //class QSpinBox; |
36 | class QListViewItem; | 36 | class QListViewItem; |
37 | 37 | ||
38 | class CLayoutPrefs : public QWidget | 38 | class CLayoutPrefs : public QWidget |
39 | { | 39 | { |
40 | 40 | ||
41 | public: | 41 | public: |
42 | 42 | ||
43 | friend class CPrefs; | 43 | friend class CPrefs; |
44 | 44 | ||
45 | CLayoutPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 45 | CLayoutPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
46 | ~CLayoutPrefs(); | 46 | ~CLayoutPrefs(); |
47 | 47 | ||
48 | QCheckBox* StripCR; | 48 | QCheckBox* StripCR; |
49 | QCheckBox* Dehyphen; | 49 | QCheckBox* Dehyphen; |
50 | QCheckBox* SingleSpace; | 50 | QCheckBox* SingleSpace; |
51 | QCheckBox* Unindent; | 51 | QCheckBox* Unindent; |
52 | QCheckBox* Reparagraph; | 52 | QCheckBox* Reparagraph; |
53 | QCheckBox* DoubleSpace; | 53 | QCheckBox* DoubleSpace; |
54 | QCheckBox* Remap; | 54 | QCheckBox* Remap; |
55 | QCheckBox* Embolden; | 55 | QCheckBox* Embolden; |
56 | QCheckBox* FullJustify; | 56 | QCheckBox* FullJustify; |
57 | QCheckBox* FixGraphics; | 57 | QCheckBox* FixGraphics; |
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: |
70 | 72 | ||
71 | friend class CPrefs; | 73 | friend class CPrefs; |
72 | 74 | ||
73 | CLayoutPrefs2( int w, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 75 | CLayoutPrefs2( int w, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
74 | ~CLayoutPrefs2(); | 76 | ~CLayoutPrefs2(); |
75 | 77 | ||
76 | QSpinBox* ParaLead; | 78 | QSpinBox* ParaLead; |
77 | QSpinBox* LineLead; | 79 | QSpinBox* LineLead; |
78 | QSpinBox* Indent; | 80 | QSpinBox* Indent; |
79 | QSpinBox *TopMargin, *BottomMargin, *LeftMargin, *RightMargin, *gfxzoom, *pageoverlap; | 81 | QSpinBox *TopMargin, *BottomMargin, *LeftMargin, *RightMargin, *gfxzoom, *pageoverlap; |
80 | #ifdef USECOMBO | 82 | #ifdef USECOMBO |
81 | QComboBox *Markup, *fontselector, *fgsel, *bgsel; | 83 | QComboBox *Markup, *fontselector, *fgsel, *bgsel; |
82 | #else | 84 | #else |
83 | MenuButton *Markup, *fontselector, *fgsel, *bgsel; | 85 | MenuButton *Markup, *fontselector, *fgsel, *bgsel; |
84 | #endif | 86 | #endif |
85 | }; | 87 | }; |
86 | 88 | ||
87 | /* | 89 | /* |
88 | class CPluckerPrefs : public QWidget | 90 | class CPluckerPrefs : public QWidget |
89 | { | 91 | { |
90 | 92 | ||
91 | public: | 93 | public: |
92 | 94 | ||
93 | friend class CPrefs; | 95 | friend class CPrefs; |
94 | 96 | ||
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 | ||
107 | }; | 110 | }; |
108 | */ | 111 | */ |
109 | class CMiscPrefs : public QWidget | 112 | class CMiscPrefs : public QWidget |
110 | { | 113 | { |
111 | 114 | ||
112 | public: | 115 | 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); |
141 | #ifdef USECOMBO | 161 | #ifdef USECOMBO |
142 | void populate(QComboBox*); | 162 | void populate(QComboBox*); |
143 | #else | 163 | #else |
144 | void populate(MenuButton*); | 164 | void populate(MenuButton*); |
145 | #endif | 165 | #endif |
146 | public: | 166 | public: |
147 | 167 | ||
148 | friend class CPrefs; | 168 | friend class CPrefs; |
149 | 169 | ||
150 | CButtonPrefs( QMap<orKey, int>*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 170 | CButtonPrefs( QMap<orKey, int>*, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
151 | ~CButtonPrefs(); | 171 | ~CButtonPrefs(); |
152 | 172 | ||
153 | #ifdef USECOMBO | 173 | #ifdef USECOMBO |
154 | QComboBox *action; | 174 | QComboBox *action; |
155 | #else | 175 | #else |
156 | MenuButton *action; | 176 | MenuButton *action; |
157 | #endif | 177 | #endif |
158 | QSpinBox* debounce; | 178 | QSpinBox* debounce; |
159 | 179 | ||
160 | // QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; | 180 | // QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; |
161 | private slots: | 181 | private slots: |
162 | void erasemapping(QListViewItem*); | 182 | void erasemapping(QListViewItem*); |
163 | }; | 183 | }; |
164 | */ | 184 | */ |
165 | class CInterPrefs : public QWidget | 185 | class CInterPrefs : public QWidget |
166 | { | 186 | { |
167 | 187 | ||
168 | public: | 188 | public: |
169 | 189 | ||
170 | friend class CPrefs; | 190 | friend class CPrefs; |
171 | 191 | ||
172 | CInterPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 192 | CInterPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
173 | ~CInterPrefs(); | 193 | ~CInterPrefs(); |
174 | 194 | ||
175 | QCheckBox *ideogram, *propfontchange, *SwapMouse, *twotouch; | 195 | QCheckBox *ideogram, *propfontchange, *SwapMouse, *twotouch; |
176 | #ifdef USECOMBO | 196 | #ifdef USECOMBO |
177 | QComboBox* encoding; | 197 | QComboBox* encoding; |
178 | #else | 198 | #else |
179 | MenuButton* encoding; | 199 | MenuButton* encoding; |
180 | #endif | 200 | #endif |
181 | QSpinBox* ideogramwidth; | 201 | QSpinBox* ideogramwidth; |
182 | QLineEdit *application, *message; | 202 | QLineEdit *application, *message; |
183 | }; | 203 | }; |
184 | 204 | ||
185 | 205 | ||
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 | { |
199 | case Key_Escape: | 219 | case Key_Escape: |
200 | e->accept(); | 220 | e->accept(); |
201 | reject(); | 221 | reject(); |
202 | break; | 222 | break; |
203 | case Key_Space: | 223 | case Key_Space: |
204 | case Key_Return: | 224 | case Key_Return: |
205 | e->accept(); | 225 | e->accept(); |
206 | accept(); | 226 | accept(); |
207 | break; | 227 | break; |
208 | default: | 228 | default: |
209 | QWidget::keyPressEvent(e); | 229 | QWidget::keyPressEvent(e); |
210 | } | 230 | } |
211 | } | 231 | } |
212 | public: | 232 | public: |
213 | CPrefs(int w, bool fs = true, QWidget* parent = 0, const char* name = 0); | 233 | CPrefs(int w, bool fs = true, QWidget* parent = 0, const char* name = 0); |
214 | ~CPrefs() | 234 | ~CPrefs() |
215 | { | 235 | { |
216 | } | 236 | } |
217 | bool hyphenate() { return layout->hyphenate->isChecked(); } | 237 | bool hyphenate() { return layout->hyphenate->isChecked(); } |
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(); } |
231 | bool Remap() { return layout->Remap->isChecked(); } | 253 | bool Remap() { return layout->Remap->isChecked(); } |
232 | bool Embolden() { return layout->Embolden->isChecked(); } | 254 | bool Embolden() { return layout->Embolden->isChecked(); } |
233 | bool FullJustify() { return layout->FullJustify->isChecked(); } | 255 | bool FullJustify() { return layout->FullJustify->isChecked(); } |
234 | // bool Inverse() { return layout->Inverse->isChecked(); } | 256 | // bool Inverse() { return layout->Inverse->isChecked(); } |
235 | // bool Negative() { return layout->Negative->isChecked(); } | 257 | // bool Negative() { return layout->Negative->isChecked(); } |
236 | bool FixGraphics() { return layout->FixGraphics->isChecked(); } | 258 | bool FixGraphics() { return layout->FixGraphics->isChecked(); } |
237 | int ParaLead() { return layout2->ParaLead->value(); } | 259 | int ParaLead() { return layout2->ParaLead->value(); } |
238 | int LineLead() { return layout2->LineLead->value(); } | 260 | int LineLead() { return layout2->LineLead->value(); } |
239 | int TopMargin() { return layout2->TopMargin->value(); } | 261 | int TopMargin() { return layout2->TopMargin->value(); } |
240 | int BottomMargin() { return layout2->BottomMargin->value(); } | 262 | int BottomMargin() { return layout2->BottomMargin->value(); } |
241 | int LeftMargin() { return layout2->LeftMargin->value(); } | 263 | int LeftMargin() { return layout2->LeftMargin->value(); } |
242 | int RightMargin() { return layout2->RightMargin->value(); } | 264 | int RightMargin() { return layout2->RightMargin->value(); } |
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); } |
256 | void Remap(bool v) { layout->Remap->setChecked(v); } | 280 | void Remap(bool v) { layout->Remap->setChecked(v); } |
257 | void Embolden(bool v) { layout->Embolden->setChecked(v); } | 281 | void Embolden(bool v) { layout->Embolden->setChecked(v); } |
258 | void FullJustify(bool v) { layout->FullJustify->setChecked(v); } | 282 | void FullJustify(bool v) { layout->FullJustify->setChecked(v); } |
259 | // void Negative(bool v) { layout->Negative->setChecked(v); } | 283 | // void Negative(bool v) { layout->Negative->setChecked(v); } |
260 | // void Inverse(bool v) { layout->Inverse->setChecked(v); } | 284 | // void Inverse(bool v) { layout->Inverse->setChecked(v); } |
261 | void FixGraphics(bool v) { layout->FixGraphics->setChecked(v); } | 285 | void FixGraphics(bool v) { layout->FixGraphics->setChecked(v); } |
262 | void ParaLead(int v) { layout2->ParaLead->setValue(v); } | 286 | void ParaLead(int v) { layout2->ParaLead->setValue(v); } |
263 | void LineLead(int v) { layout2->LineLead->setValue(v); } | 287 | void LineLead(int v) { layout2->LineLead->setValue(v); } |
264 | void TopMargin(int v) { layout2->TopMargin->setValue(v); } | 288 | void TopMargin(int v) { layout2->TopMargin->setValue(v); } |
265 | void BottomMargin(int v) { layout2->BottomMargin->setValue(v); } | 289 | void BottomMargin(int v) { layout2->BottomMargin->setValue(v); } |
266 | void LeftMargin(int v) { layout2->LeftMargin->setValue(v); } | 290 | void LeftMargin(int v) { layout2->LeftMargin->setValue(v); } |
267 | void RightMargin(int v) { layout2->RightMargin->setValue(v); } | 291 | void RightMargin(int v) { layout2->RightMargin->setValue(v); } |
268 | void Indent(int v) { layout2->Indent->setValue(v); } | 292 | void Indent(int v) { layout2->Indent->setValue(v); } |
269 | #ifdef USECOMBO | 293 | #ifdef USECOMBO |
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 |
291 | void foreground(int v) { layout2->fgsel->select(v); } | 315 | void foreground(int v) { layout2->fgsel->select(v); } |
292 | #endif | 316 | #endif |
293 | int foreground() { return layout2->fgsel->currentItem(); } | 317 | int foreground() { return layout2->fgsel->currentItem(); } |
294 | 318 | ||
295 | #ifdef USECOMBO | 319 | #ifdef USECOMBO |
296 | void background(int v) { layout2->bgsel->setCurrentItem(v); } | 320 | void background(int v) { layout2->bgsel->setCurrentItem(v); } |
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) |
310 | { | 333 | { |
311 | layout2->fontselector->setCurrentItem(i); | 334 | layout2->fontselector->setCurrentItem(i); |
312 | break; | 335 | break; |
313 | } | 336 | } |
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(); } |
332 | void dictMessage(const QString& v) { inter->message->setText(v); } | 377 | void dictMessage(const QString& v) { inter->message->setText(v); } |
333 | QString dictMessage() { return inter->message->text(); } | 378 | QString dictMessage() { return inter->message->text(); } |
334 | 379 | ||
335 | void miscannotation(bool v) { misc->annotation->setChecked(v); } | 380 | void miscannotation(bool v) { misc->annotation->setChecked(v); } |
336 | void miscdictionary(bool v) { misc->dictionary->setChecked(v); } | 381 | void miscdictionary(bool v) { misc->dictionary->setChecked(v); } |
337 | void miscclipboard(bool v) { misc->clipboard->setChecked(v); } | 382 | void miscclipboard(bool v) { misc->clipboard->setChecked(v); } |
338 | bool miscannotation() { return misc->annotation->isChecked(); } | 383 | bool miscannotation() { return misc->annotation->isChecked(); } |
339 | bool miscdictionary() { return misc->dictionary->isChecked(); } | 384 | bool miscdictionary() { return misc->dictionary->isChecked(); } |
340 | bool miscclipboard() { return misc->clipboard->isChecked(); } | 385 | bool miscclipboard() { return misc->clipboard->isChecked(); } |
341 | /* | 386 | /* |
342 | int Debounce() { return button->debounce->value(); } | 387 | int Debounce() { return button->debounce->value(); } |
343 | void Debounce(int v) { button->debounce->setValue(v); } | 388 | void Debounce(int v) { button->debounce->setValue(v); } |
344 | */ | 389 | */ |
345 | /* | 390 | /* |
346 | bool leftScroll() { return button->leftScroll->isChecked(); } | 391 | bool leftScroll() { return button->leftScroll->isChecked(); } |
347 | void leftScroll(bool v) { button->leftScroll->setChecked(v); } | 392 | void leftScroll(bool v) { button->leftScroll->setChecked(v); } |
348 | bool rightScroll() { return button->rightScroll->isChecked(); } | 393 | bool rightScroll() { return button->rightScroll->isChecked(); } |
349 | void rightScroll(bool v) { button->rightScroll->setChecked(v); } | 394 | void rightScroll(bool v) { button->rightScroll->setChecked(v); } |
350 | bool upScroll() { return button->upScroll->isChecked(); } | 395 | bool upScroll() { return button->upScroll->isChecked(); } |
351 | void upScroll(bool v) { button->upScroll->setChecked(v); } | 396 | void upScroll(bool v) { button->upScroll->setChecked(v); } |
352 | bool downScroll() { return button->downScroll->isChecked(); } | 397 | bool downScroll() { return button->downScroll->isChecked(); } |
353 | void downScroll(bool v) { button->downScroll->setChecked(v); } | 398 | void downScroll(bool v) { button->downScroll->setChecked(v); } |
354 | */ | 399 | */ |
355 | 400 | ||
356 | int gfxsize() { return layout2->gfxzoom->value()/10; } | 401 | int gfxsize() { return layout2->gfxzoom->value()/10; } |
357 | void gfxsize(int v) { layout2->gfxzoom->setValue(10*v); } | 402 | void gfxsize(int v) { layout2->gfxzoom->setValue(10*v); } |
358 | int pageoverlap() { return layout2->pageoverlap->value(); } | 403 | int pageoverlap() { return layout2->pageoverlap->value(); } |
359 | void pageoverlap(int v) { layout2->pageoverlap->setValue(v); } | 404 | void pageoverlap(int v) { layout2->pageoverlap->setValue(v); } |
360 | 405 | ||
361 | bool twotouch() { return inter->twotouch->isChecked(); } | 406 | bool twotouch() { return inter->twotouch->isChecked(); } |
362 | void twotouch(bool v) { inter->twotouch->setChecked(v); } | 407 | void twotouch(bool v) { inter->twotouch->setChecked(v); } |
363 | 408 | ||
364 | bool ideogram() { return inter->ideogram->isChecked(); } | 409 | bool ideogram() { return inter->ideogram->isChecked(); } |
365 | void ideogram(bool v) { inter->ideogram->setChecked(v); } | 410 | void ideogram(bool v) { inter->ideogram->setChecked(v); } |
366 | 411 | ||
367 | int ideogramwidth() { return inter->ideogramwidth->value(); } | 412 | int ideogramwidth() { return inter->ideogramwidth->value(); } |
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 |