author | groucho <groucho> | 2003-05-07 14:10:02 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 14:10:02 (UTC) |
commit | 6bfdfc1c4fab71196b0d40f08c209d7819874686 (patch) (unidiff) | |
tree | 2fbb90c597135de21d3ec997203a3ffe92f9aeb5 /noncore/apps/opie-reader/Prefs.h | |
parent | b836e3690fbe639b95041999c800d86280985451 (diff) | |
download | opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.zip opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.tar.gz opie-6bfdfc1c4fab71196b0d40f08c209d7819874686.tar.bz2 |
Hopefully things are now fixed in CVS
Diffstat (limited to 'noncore/apps/opie-reader/Prefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/Prefs.h | 340 |
1 files changed, 340 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/Prefs.h b/noncore/apps/opie-reader/Prefs.h new file mode 100644 index 0000000..37d8c9e --- a/dev/null +++ b/noncore/apps/opie-reader/Prefs.h | |||
@@ -0,0 +1,340 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Form interface generated from reading ui file 'Prefs.ui' | ||
3 | ** | ||
4 | ** Created: Tue Feb 11 23:53:32 2003 | ||
5 | ** by: The User Interface Compiler (uic) | ||
6 | ** | ||
7 | ** WARNING! All changes made in this file will be lost! | ||
8 | ****************************************************************************/ | ||
9 | #ifndef CPREFS_H | ||
10 | #define CPREFS_H | ||
11 | #include "useqpe.h" | ||
12 | #include <qvariant.h> | ||
13 | #include <qwidget.h> | ||
14 | #include <qtabdialog.h> | ||
15 | #include <qtabwidget.h> | ||
16 | #include <qspinbox.h> | ||
17 | #include <qcheckbox.h> | ||
18 | #include <qcombobox.h> | ||
19 | #include <qlineedit.h> | ||
20 | #ifdef USEQPE | ||
21 | #include <qpe/menubutton.h> | ||
22 | #endif | ||
23 | //#include "opie.h" | ||
24 | |||
25 | //#ifdef OPIE | ||
26 | #define USECOMBO | ||
27 | //#endif | ||
28 | |||
29 | class QVBoxLayout; | ||
30 | class QHBoxLayout; | ||
31 | class QGridLayout; | ||
32 | //class QCheckBox; | ||
33 | class QLabel; | ||
34 | //class QSpinBox; | ||
35 | |||
36 | class CLayoutPrefs : public QWidget | ||
37 | { | ||
38 | |||
39 | public: | ||
40 | |||
41 | friend class CPrefs; | ||
42 | |||
43 | CLayoutPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
44 | ~CLayoutPrefs(); | ||
45 | |||
46 | QCheckBox* StripCR; | ||
47 | QCheckBox* Dehyphen; | ||
48 | QCheckBox* SingleSpace; | ||
49 | QCheckBox* Unindent; | ||
50 | QCheckBox* Reparagraph; | ||
51 | QCheckBox* DoubleSpace; | ||
52 | QCheckBox* Remap; | ||
53 | QCheckBox* Embolden; | ||
54 | QCheckBox* FullJustify; | ||
55 | }; | ||
56 | |||
57 | class CLayoutPrefs2 : public QWidget | ||
58 | { | ||
59 | |||
60 | public: | ||
61 | |||
62 | friend class CPrefs; | ||
63 | |||
64 | CLayoutPrefs2( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
65 | ~CLayoutPrefs2(); | ||
66 | |||
67 | QSpinBox* ParaLead; | ||
68 | QSpinBox* LineLead; | ||
69 | QSpinBox* Indent; | ||
70 | QSpinBox* Margin, *gfxzoom, *pageoverlap; | ||
71 | #ifdef USECOMBO | ||
72 | QComboBox *Markup, *fontselector; | ||
73 | #else | ||
74 | MenuButton *Markup, *fontselector; | ||
75 | #endif | ||
76 | }; | ||
77 | |||
78 | /* | ||
79 | class CPluckerPrefs : public QWidget | ||
80 | { | ||
81 | |||
82 | public: | ||
83 | |||
84 | friend class CPrefs; | ||
85 | |||
86 | CPluckerPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
87 | ~CPluckerPrefs(); | ||
88 | |||
89 | QCheckBox* Depluck; | ||
90 | QCheckBox* Dejpluck; | ||
91 | QCheckBox* Continuous; | ||
92 | protected: | ||
93 | |||
94 | QHBoxLayout* Layout5; | ||
95 | QVBoxLayout* Layout11; | ||
96 | QGridLayout* Layout4; | ||
97 | |||
98 | }; | ||
99 | */ | ||
100 | class CMiscPrefs : public QWidget | ||
101 | { | ||
102 | |||
103 | public: | ||
104 | |||
105 | friend class CPrefs; | ||
106 | |||
107 | CMiscPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
108 | ~CMiscPrefs(); | ||
109 | |||
110 | QCheckBox *annotation, *dictionary, *clipboard; | ||
111 | QCheckBox *Depluck, *Dejpluck, *Continuous; | ||
112 | }; | ||
113 | |||
114 | class CButtonPrefs : public QWidget | ||
115 | { | ||
116 | #ifdef USECOMBO | ||
117 | void populate(QComboBox*); | ||
118 | #else | ||
119 | void populate(MenuButton*); | ||
120 | #endif | ||
121 | public: | ||
122 | |||
123 | friend class CPrefs; | ||
124 | |||
125 | CButtonPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
126 | ~CButtonPrefs(); | ||
127 | |||
128 | #ifdef USECOMBO | ||
129 | QComboBox *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; | ||
130 | #else | ||
131 | MenuButton *returnAction, *spaceAction, *escapeAction, *leftAction, *rightAction, *upAction, *downAction; | ||
132 | #endif | ||
133 | QCheckBox *leftScroll, *rightScroll, *upScroll, *downScroll; | ||
134 | }; | ||
135 | |||
136 | class CInterPrefs : public QWidget | ||
137 | { | ||
138 | |||
139 | public: | ||
140 | |||
141 | friend class CPrefs; | ||
142 | |||
143 | CInterPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
144 | ~CInterPrefs(); | ||
145 | |||
146 | QCheckBox *ideogram, *propfontchange, *SwapMouse, *twotouch; | ||
147 | #ifdef USECOMBO | ||
148 | QComboBox* encoding; | ||
149 | #else | ||
150 | MenuButton* encoding; | ||
151 | #endif | ||
152 | QSpinBox* ideogramwidth; | ||
153 | QLineEdit *application, *message; | ||
154 | }; | ||
155 | |||
156 | |||
157 | class CPrefs : public QDialog | ||
158 | { | ||
159 | Q_OBJECT | ||
160 | CLayoutPrefs* layout; | ||
161 | CLayoutPrefs2* layout2; | ||
162 | CMiscPrefs* misc; | ||
163 | CButtonPrefs* button; | ||
164 | CInterPrefs* inter; | ||
165 | |||
166 | void keyPressEvent(QKeyEvent* e) | ||
167 | { | ||
168 | switch (e->key()) | ||
169 | { | ||
170 | case Key_Escape: | ||
171 | e->accept(); | ||
172 | reject(); | ||
173 | break; | ||
174 | case Key_Space: | ||
175 | case Key_Return: | ||
176 | e->accept(); | ||
177 | accept(); | ||
178 | break; | ||
179 | default: | ||
180 | QWidget::keyPressEvent(e); | ||
181 | } | ||
182 | } | ||
183 | public: | ||
184 | CPrefs(bool fs = true, QWidget* parent = 0, const char* name = 0); | ||
185 | ~CPrefs() | ||
186 | { | ||
187 | } | ||
188 | bool StripCR() { return layout->StripCR->isChecked(); } | ||
189 | bool Dehyphen() { return layout->Dehyphen->isChecked(); } | ||
190 | bool SingleSpace() { return layout->SingleSpace->isChecked(); } | ||
191 | bool Unindent() { return layout->Unindent->isChecked(); } | ||
192 | bool Reparagraph() { return layout->Reparagraph->isChecked(); } | ||
193 | bool DoubleSpace() { return layout->DoubleSpace->isChecked(); } | ||
194 | bool Remap() { return layout->Remap->isChecked(); } | ||
195 | bool Embolden() { return layout->Embolden->isChecked(); } | ||
196 | bool FullJustify() { return layout->FullJustify->isChecked(); } | ||
197 | int ParaLead() { return layout2->ParaLead->value(); } | ||
198 | int LineLead() { return layout2->LineLead->value(); } | ||
199 | int Margin() { return layout2->Margin->value(); } | ||
200 | int Indent() { return layout2->Indent->value(); } | ||
201 | int Markup() { return layout2->Markup->currentItem(); } | ||
202 | QString Font() { return layout2->fontselector->currentText(); } | ||
203 | |||
204 | |||
205 | void StripCR(bool v) { layout->StripCR->setChecked(v); } | ||
206 | void Dehyphen(bool v) { layout->Dehyphen->setChecked(v); } | ||
207 | void SingleSpace(bool v) { layout->SingleSpace->setChecked(v); } | ||
208 | void Unindent(bool v) { layout->Unindent->setChecked(v); } | ||
209 | void Reparagraph(bool v) { layout->Reparagraph->setChecked(v); } | ||
210 | void DoubleSpace(bool v) { layout->DoubleSpace->setChecked(v); } | ||
211 | void Remap(bool v) { layout->Remap->setChecked(v); } | ||
212 | void Embolden(bool v) { layout->Embolden->setChecked(v); } | ||
213 | void FullJustify(bool v) { layout->FullJustify->setChecked(v); } | ||
214 | void ParaLead(int v) { layout2->ParaLead->setValue(v); } | ||
215 | void LineLead(int v) { layout2->LineLead->setValue(v); } | ||
216 | void Margin(int v) { layout2->Margin->setValue(v); } | ||
217 | void Indent(int v) { layout2->Indent->setValue(v); } | ||
218 | #ifdef USECOMBO | ||
219 | void Markup(int v) { layout2->Markup->setCurrentItem(v); } | ||
220 | #else | ||
221 | void Markup(int v) { layout2->Markup->select(v); } | ||
222 | #endif | ||
223 | #ifdef USECOMBO | ||
224 | void Font(QString& s) | ||
225 | { | ||
226 | for (int i = 1; i <= layout2->fontselector->count(); i++) | ||
227 | { | ||
228 | if (layout2->fontselector->text(i) == s) | ||
229 | { | ||
230 | layout2->fontselector->setCurrentItem(i); | ||
231 | break; | ||
232 | } | ||
233 | } | ||
234 | } | ||
235 | #else | ||
236 | void Font(QString& s) { layout2->fontselector->select(s); } | ||
237 | #endif | ||
238 | |||
239 | bool Depluck() { return misc->Depluck->isChecked(); } | ||
240 | void Depluck(bool v) { misc->Depluck->setChecked(v); } | ||
241 | bool Dejpluck() { return misc->Dejpluck->isChecked(); } | ||
242 | void Dejpluck(bool v) { misc->Dejpluck->setChecked(v); } | ||
243 | bool Continuous() { return misc->Continuous->isChecked(); } | ||
244 | void Continuous(bool v) { misc->Continuous->setChecked(v); } | ||
245 | bool SwapMouse() { return inter->SwapMouse->isChecked(); } | ||
246 | void SwapMouse(bool v) { inter->SwapMouse->setChecked(v); } | ||
247 | |||
248 | |||
249 | void dictApplication(const QString& v) { inter->application->setText(v); } | ||
250 | QString dictApplication() { return inter->application->text(); } | ||
251 | void dictMessage(const QString& v) { inter->message->setText(v); } | ||
252 | QString dictMessage() { return inter->message->text(); } | ||
253 | |||
254 | void miscannotation(bool v) { misc->annotation->setChecked(v); } | ||
255 | void miscdictionary(bool v) { misc->dictionary->setChecked(v); } | ||
256 | void miscclipboard(bool v) { misc->clipboard->setChecked(v); } | ||
257 | bool miscannotation() { return misc->annotation->isChecked(); } | ||
258 | bool miscdictionary() { return misc->dictionary->isChecked(); } | ||
259 | bool miscclipboard() { return misc->clipboard->isChecked(); } | ||
260 | |||
261 | int spaceAction() { return button->spaceAction->currentItem(); } | ||
262 | #ifdef USECOMBO | ||
263 | void spaceAction(int v) { button->spaceAction->setCurrentItem(v); } | ||
264 | #else | ||
265 | void spaceAction(int v) { button->spaceAction->select(v); } | ||
266 | #endif | ||
267 | int escapeAction() { return button->escapeAction->currentItem(); } | ||
268 | #ifdef USECOMBO | ||
269 | void escapeAction(int v) { button->escapeAction->setCurrentItem(v); } | ||
270 | #else | ||
271 | void escapeAction(int v) { button->escapeAction->select(v); } | ||
272 | #endif | ||
273 | int returnAction() { return button->returnAction->currentItem(); } | ||
274 | #ifdef USECOMBO | ||
275 | void returnAction(int v) { button->returnAction->setCurrentItem(v); } | ||
276 | #else | ||
277 | void returnAction(int v) { button->returnAction->select(v); } | ||
278 | #endif | ||
279 | int leftAction() { return button->leftAction->currentItem(); } | ||
280 | #ifdef USECOMBO | ||
281 | void leftAction(int v) { button->leftAction->setCurrentItem(v); } | ||
282 | #else | ||
283 | void leftAction(int v) { button->leftAction->select(v); } | ||
284 | #endif | ||
285 | int rightAction() { return button->rightAction->currentItem(); } | ||
286 | #ifdef USECOMBO | ||
287 | void rightAction(int v) { button->rightAction->setCurrentItem(v); } | ||
288 | #else | ||
289 | void rightAction(int v) { button->rightAction->select(v); } | ||
290 | #endif | ||
291 | int upAction() { return button->upAction->currentItem(); } | ||
292 | #ifdef USECOMBO | ||
293 | void upAction(int v) { button->upAction->setCurrentItem(v); } | ||
294 | #else | ||
295 | void upAction(int v) { button->upAction->select(v); } | ||
296 | #endif | ||
297 | int downAction() { return button->downAction->currentItem(); } | ||
298 | #ifdef USECOMBO | ||
299 | void downAction(int v) { button->downAction->setCurrentItem(v); } | ||
300 | #else | ||
301 | void downAction(int v) { button->downAction->select(v); } | ||
302 | #endif | ||
303 | bool leftScroll() { return button->leftScroll->isChecked(); } | ||
304 | void leftScroll(bool v) { button->leftScroll->setChecked(v); } | ||
305 | bool rightScroll() { return button->rightScroll->isChecked(); } | ||
306 | void rightScroll(bool v) { button->rightScroll->setChecked(v); } | ||
307 | bool upScroll() { return button->upScroll->isChecked(); } | ||
308 | void upScroll(bool v) { button->upScroll->setChecked(v); } | ||
309 | bool downScroll() { return button->downScroll->isChecked(); } | ||
310 | void downScroll(bool v) { button->downScroll->setChecked(v); } | ||
311 | |||
312 | |||
313 | int gfxsize() { return layout2->gfxzoom->value(); } | ||
314 | void gfxsize(int v) { layout2->gfxzoom->setValue(v); } | ||
315 | int pageoverlap() { return layout2->pageoverlap->value(); } | ||
316 | void pageoverlap(int v) { layout2->pageoverlap->setValue(v); } | ||
317 | |||
318 | bool twotouch() { return inter->twotouch->isChecked(); } | ||
319 | void twotouch(bool v) { inter->twotouch->setChecked(v); } | ||
320 | |||
321 | bool ideogram() { return inter->ideogram->isChecked(); } | ||
322 | void ideogram(bool v) { inter->ideogram->setChecked(v); } | ||
323 | |||
324 | int ideogramwidth() { return inter->ideogramwidth->value(); } | ||
325 | void ideogramwidth(int v) { inter->ideogramwidth->setValue(v); } | ||
326 | |||
327 | bool propfontchange() { return inter->propfontchange->isChecked(); } | ||
328 | void propfontchange(bool v) { inter->propfontchange->setChecked(v); } | ||
329 | |||
330 | int encoding() { return inter->encoding->currentItem(); } | ||
331 | #ifdef USECOMBO | ||
332 | void encoding(int v) { inter->encoding->setCurrentItem(v); } | ||
333 | #else | ||
334 | void encoding(int v) { inter->encoding->select(v); } | ||
335 | #endif | ||
336 | |||
337 | |||
338 | |||
339 | }; | ||
340 | #endif // CPREFS_H | ||