author | groucho <groucho> | 2003-05-07 14:07:19 (UTC) |
---|---|---|
committer | groucho <groucho> | 2003-05-07 14:07:19 (UTC) |
commit | b836e3690fbe639b95041999c800d86280985451 (patch) (unidiff) | |
tree | d5a23427be56e4276a8b2ad8409c1ed22ac2c30a /noncore/apps/opie-reader/ToolbarPrefs.h | |
parent | 4619398b4712062e65d1919156edea38785c590e (diff) | |
download | opie-b836e3690fbe639b95041999c800d86280985451.zip opie-b836e3690fbe639b95041999c800d86280985451.tar.gz opie-b836e3690fbe639b95041999c800d86280985451.tar.bz2 |
*** empty log message ***
Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/ToolbarPrefs.h | 263 |
1 files changed, 0 insertions, 263 deletions
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.h b/noncore/apps/opie-reader/ToolbarPrefs.h deleted file mode 100644 index 297d63a..0000000 --- a/noncore/apps/opie-reader/ToolbarPrefs.h +++ b/dev/null | |||
@@ -1,263 +0,0 @@ | |||
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 CTOOLBARPREFS_H | ||
10 | #define CTOOLBARPREFS_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 | #include <qpe/config.h> | ||
23 | #else | ||
24 | #include "preferences.h" | ||
25 | #endif | ||
26 | //#include "opie.h" | ||
27 | //#ifdef OPIE | ||
28 | #define USECOMBO | ||
29 | //#endif | ||
30 | |||
31 | class QVBoxLayout; | ||
32 | class QHBoxLayout; | ||
33 | class QGridLayout; | ||
34 | //class QCheckBox; | ||
35 | class QLabel; | ||
36 | //class QSpinBox; | ||
37 | /* | ||
38 | class CBarPrefs1 : public QWidget | ||
39 | { | ||
40 | Q_OBJECT | ||
41 | |||
42 | Config& config; | ||
43 | QCheckBox *open, *close, *info, *twotouch,*find,*scroll,*navigation,*page,*startend,*jump,*pageline; | ||
44 | |||
45 | bool m_isChanged; | ||
46 | |||
47 | private slots: | ||
48 | void isChanged(int _v) { m_isChanged = true; } | ||
49 | |||
50 | public: | ||
51 | CBarPrefs1( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
52 | ~CBarPrefs1(); | ||
53 | void saveall(); | ||
54 | bool isChanged() { return m_isChanged; } | ||
55 | }; | ||
56 | */ | ||
57 | class CFileBarPrefs : public QWidget | ||
58 | { | ||
59 | Q_OBJECT | ||
60 | |||
61 | Config& config; | ||
62 | QCheckBox *open, *close, *info, *twotouch, *find, *scroll; | ||
63 | |||
64 | bool m_isChanged; | ||
65 | |||
66 | private slots: | ||
67 | void isChanged(int _v) { m_isChanged = true; } | ||
68 | |||
69 | public: | ||
70 | CFileBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
71 | ~CFileBarPrefs(); | ||
72 | void saveall(); | ||
73 | bool isChanged() { return m_isChanged; } | ||
74 | }; | ||
75 | |||
76 | class CNavBarPrefs : public QWidget | ||
77 | { | ||
78 | Q_OBJECT | ||
79 | |||
80 | Config& config; | ||
81 | QCheckBox *scroll, *navback, *navhome, *navforward; | ||
82 | QCheckBox *pageup, *pagedown, *gotostart, *gotoend, *jump, *pageline; | ||
83 | |||
84 | bool m_isChanged; | ||
85 | |||
86 | private slots: | ||
87 | void isChanged(int _v) { m_isChanged = true; } | ||
88 | |||
89 | public: | ||
90 | CNavBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
91 | ~CNavBarPrefs(); | ||
92 | void saveall(); | ||
93 | bool isChanged() { return m_isChanged; } | ||
94 | }; | ||
95 | /* | ||
96 | class CBarPrefs2 : public QWidget | ||
97 | { | ||
98 | Q_OBJECT | ||
99 | Config& config; | ||
100 | QCheckBox *fullscreen, *zoom, *setfont, *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *block, *indannotate, *encoding, *ideogram; | ||
101 | |||
102 | bool m_isChanged; | ||
103 | |||
104 | private slots: | ||
105 | void isChanged(int _v) { m_isChanged = true; } | ||
106 | |||
107 | public: | ||
108 | CBarPrefs2( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
109 | ~CBarPrefs2(); | ||
110 | void saveall(); | ||
111 | bool isChanged() { return m_isChanged; } | ||
112 | |||
113 | }; | ||
114 | */ | ||
115 | class CViewBarPrefs : public QWidget | ||
116 | { | ||
117 | Q_OBJECT | ||
118 | Config& config; | ||
119 | QCheckBox *fullscreen, *zoomin, *zoomout, *setfont, *encoding, *ideogram; | ||
120 | |||
121 | bool m_isChanged; | ||
122 | |||
123 | private slots: | ||
124 | void isChanged(int _v) { m_isChanged = true; } | ||
125 | |||
126 | public: | ||
127 | CViewBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
128 | ~CViewBarPrefs(); | ||
129 | void saveall(); | ||
130 | bool isChanged() { return m_isChanged; } | ||
131 | |||
132 | }; | ||
133 | |||
134 | class CMarkBarPrefs : public QWidget | ||
135 | { | ||
136 | Q_OBJECT | ||
137 | Config& config; | ||
138 | QCheckBox *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *startblock, *copyblock; | ||
139 | |||
140 | bool m_isChanged; | ||
141 | |||
142 | private slots: | ||
143 | void isChanged(int _v) { m_isChanged = true; } | ||
144 | |||
145 | public: | ||
146 | CMarkBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
147 | ~CMarkBarPrefs(); | ||
148 | void saveall(); | ||
149 | bool isChanged() { return m_isChanged; } | ||
150 | |||
151 | }; | ||
152 | |||
153 | class CIndBarPrefs : public QWidget | ||
154 | { | ||
155 | Q_OBJECT | ||
156 | Config& config; | ||
157 | QCheckBox *indannotate; | ||
158 | |||
159 | bool m_isChanged; | ||
160 | |||
161 | private slots: | ||
162 | void isChanged(int _v) { m_isChanged = true; } | ||
163 | |||
164 | public: | ||
165 | CIndBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
166 | ~CIndBarPrefs(); | ||
167 | void saveall(); | ||
168 | bool isChanged() { return m_isChanged; } | ||
169 | |||
170 | }; | ||
171 | |||
172 | class CMiscBarPrefs : public QWidget | ||
173 | { | ||
174 | |||
175 | public: | ||
176 | |||
177 | CMiscBarPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | ||
178 | ~CMiscBarPrefs(); | ||
179 | |||
180 | #ifdef USECOMBO | ||
181 | QComboBox *tbpolicy, *tbposition; | ||
182 | #else | ||
183 | MenuButton *tbpolicy, *tbposition; | ||
184 | #endif | ||
185 | QCheckBox *tbmovable, *floating; | ||
186 | }; | ||
187 | |||
188 | class CBarPrefs : public QDialog | ||
189 | { | ||
190 | Q_OBJECT | ||
191 | ; | ||
192 | CMiscBarPrefs* misc; | ||
193 | CFileBarPrefs* filebar; | ||
194 | CNavBarPrefs* navbar; | ||
195 | CViewBarPrefs* viewbar; | ||
196 | CMarkBarPrefs* markbar; | ||
197 | CIndBarPrefs* indbar; | ||
198 | Config config; | ||
199 | |||
200 | void keyPressEvent(QKeyEvent* e) | ||
201 | { | ||
202 | switch (e->key()) | ||
203 | { | ||
204 | case Key_Escape: | ||
205 | e->accept(); | ||
206 | reject(); | ||
207 | break; | ||
208 | case Key_Space: | ||
209 | case Key_Return: | ||
210 | e->accept(); | ||
211 | accept(); | ||
212 | break; | ||
213 | default: | ||
214 | QWidget::keyPressEvent(e); | ||
215 | } | ||
216 | } | ||
217 | public: | ||
218 | CBarPrefs(const QString& appdir, bool fs = true, QWidget* parent = 0, const char* name = 0); | ||
219 | ~CBarPrefs() | ||
220 | { | ||
221 | if (result()) | ||
222 | { | ||
223 | if (navbar->isChanged()) navbar->saveall(); | ||
224 | if (filebar->isChanged()) filebar->saveall(); | ||
225 | if (viewbar->isChanged()) viewbar->saveall(); | ||
226 | if (markbar->isChanged()) markbar->saveall(); | ||
227 | if (indbar->isChanged()) indbar->saveall(); | ||
228 | } | ||
229 | } | ||
230 | bool isChanged() | ||
231 | { | ||
232 | return | ||
233 | ( | ||
234 | filebar->isChanged() | ||
235 | || | ||
236 | navbar->isChanged() | ||
237 | || | ||
238 | viewbar->isChanged() | ||
239 | || | ||
240 | markbar->isChanged() | ||
241 | || | ||
242 | indbar->isChanged() | ||
243 | ); | ||
244 | } | ||
245 | bool floating() { return misc->floating->isChecked(); } | ||
246 | void floating(bool v) { misc->floating->setChecked(v); } | ||
247 | int tbpolicy() { return misc->tbpolicy->currentItem(); } | ||
248 | #ifdef USECOMBO | ||
249 | void tbpolicy(int v) { misc->tbpolicy->setCurrentItem(v); } | ||
250 | #else | ||
251 | void tbpolicy(int v) { misc->tbpolicy->select(v); } | ||
252 | #endif | ||
253 | bool tbmovable() { return misc->tbmovable->isChecked(); } | ||
254 | void tbmovable(bool v) { misc->tbmovable->setChecked(v); } | ||
255 | int tbposition() { return misc->tbposition->currentItem(); } | ||
256 | #ifdef USECOMBO | ||
257 | void tbposition(int v) { misc->tbposition->setCurrentItem(v); } | ||
258 | #else | ||
259 | void tbposition(int v) { misc->tbposition->select(v); } | ||
260 | #endif | ||
261 | |||
262 | }; | ||
263 | #endif // CPREFS_H | ||