summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-reader/ToolbarPrefs.h
Unidiff
Diffstat (limited to 'noncore/apps/opie-reader/ToolbarPrefs.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/ToolbarPrefs.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/noncore/apps/opie-reader/ToolbarPrefs.h b/noncore/apps/opie-reader/ToolbarPrefs.h
index 9571c28..a2686e5 100644
--- a/noncore/apps/opie-reader/ToolbarPrefs.h
+++ b/noncore/apps/opie-reader/ToolbarPrefs.h
@@ -95,49 +95,49 @@ class CNavBarPrefs : public QWidget
95/* 95/*
96class CBarPrefs2 : public QWidget 96class CBarPrefs2 : public QWidget
97{ 97{
98 Q_OBJECT 98 Q_OBJECT
99 Config& config; 99 Config& config;
100 QCheckBox *fullscreen, *zoom, *setfont, *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *block, *indannotate, *encoding, *ideogram; 100 QCheckBox *fullscreen, *zoom, *setfont, *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *block, *indannotate, *encoding, *ideogram;
101 101
102 bool m_isChanged; 102 bool m_isChanged;
103 103
104 private slots: 104 private slots:
105 void isChanged(int _v) { m_isChanged = true; } 105 void isChanged(int _v) { m_isChanged = true; }
106 106
107 public: 107 public:
108 CBarPrefs2( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 108 CBarPrefs2( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
109 ~CBarPrefs2(); 109 ~CBarPrefs2();
110 void saveall(); 110 void saveall();
111 bool isChanged() { return m_isChanged; } 111 bool isChanged() { return m_isChanged; }
112 112
113}; 113};
114*/ 114*/
115class CViewBarPrefs : public QWidget 115class CViewBarPrefs : public QWidget
116{ 116{
117 Q_OBJECT 117 Q_OBJECT
118 Config& config; 118 Config& config;
119 QCheckBox *fullscreen, *zoomin, *zoomout, *setfont, *encoding, *ideogram; 119 QCheckBox *fullscreen, *rotate, *zoomin, *zoomout, *setfont, *encoding, *ideogram, *invert;
120 120
121 bool m_isChanged; 121 bool m_isChanged;
122 122
123 private slots: 123 private slots:
124 void isChanged(int _v) { m_isChanged = true; } 124 void isChanged(int _v) { m_isChanged = true; }
125 125
126 public: 126 public:
127 CViewBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 127 CViewBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
128 ~CViewBarPrefs(); 128 ~CViewBarPrefs();
129 void saveall(); 129 void saveall();
130 bool isChanged() { return m_isChanged; } 130 bool isChanged() { return m_isChanged; }
131 131
132}; 132};
133 133
134class CMarkBarPrefs : public QWidget 134class CMarkBarPrefs : public QWidget
135{ 135{
136 Q_OBJECT 136 Q_OBJECT
137 Config& config; 137 Config& config;
138 QCheckBox *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *startblock, *copyblock; 138 QCheckBox *mark, *annotate, *go_to, *Delete, *autogen, *clear, *save, *tidy, *startblock, *copyblock;
139 139
140 bool m_isChanged; 140 bool m_isChanged;
141 141
142 private slots: 142 private slots:
143 void isChanged(int _v) { m_isChanged = true; } 143 void isChanged(int _v) { m_isChanged = true; }
@@ -150,58 +150,58 @@ class CMarkBarPrefs : public QWidget
150 150
151}; 151};
152 152
153class CIndBarPrefs : public QWidget 153class CIndBarPrefs : public QWidget
154{ 154{
155 Q_OBJECT 155 Q_OBJECT
156 Config& config; 156 Config& config;
157 QCheckBox *indannotate; 157 QCheckBox *indannotate;
158 158
159 bool m_isChanged; 159 bool m_isChanged;
160 160
161 private slots: 161 private slots:
162 void isChanged(int _v) { m_isChanged = true; } 162 void isChanged(int _v) { m_isChanged = true; }
163 163
164 public: 164 public:
165 CIndBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 165 CIndBarPrefs( Config&, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
166 ~CIndBarPrefs(); 166 ~CIndBarPrefs();
167 void saveall(); 167 void saveall();
168 bool isChanged() { return m_isChanged; } 168 bool isChanged() { return m_isChanged; }
169 169
170}; 170};
171 171
172class CMiscBarPrefs : public QWidget 172class CMiscBarPrefs : public QWidget
173{ 173{
174 Q_OBJECT 174
175public: 175public:
176 176
177 CMiscBarPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 177 CMiscBarPrefs( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
178 ~CMiscBarPrefs(); 178 ~CMiscBarPrefs();
179 179
180#ifdef USECOMBO 180#ifdef USECOMBO
181 QComboBox *tbpolicy, *tbposition; 181 QComboBox *tbpolicy, *tbposition, *qtscroll, *localscroll;
182#else 182#else
183 MenuButton *tbpolicy, *tbposition; 183 MenuButton *tbpolicy, *tbposition, *qtscroll, *localscroll;
184#endif 184#endif
185 QCheckBox *tbmovable, *floating; 185 QCheckBox *tbmovable, *floating;
186}; 186};
187 187
188class CBarPrefs : public QDialog 188class CBarPrefs : public QDialog
189{ 189{
190 Q_OBJECT 190 Q_OBJECT
191 ; 191 ;
192 CMiscBarPrefs* misc; 192 CMiscBarPrefs* misc;
193 CFileBarPrefs* filebar; 193 CFileBarPrefs* filebar;
194 CNavBarPrefs* navbar; 194 CNavBarPrefs* navbar;
195 CViewBarPrefs* viewbar; 195 CViewBarPrefs* viewbar;
196 CMarkBarPrefs* markbar; 196 CMarkBarPrefs* markbar;
197 CIndBarPrefs* indbar; 197 CIndBarPrefs* indbar;
198 Config config; 198 Config config;
199 199
200 void keyPressEvent(QKeyEvent* e) 200 void keyPressEvent(QKeyEvent* e)
201 { 201 {
202 switch (e->key()) 202 switch (e->key())
203 { 203 {
204 case Key_Escape: 204 case Key_Escape:
205 e->accept(); 205 e->accept();
206 reject(); 206 reject();
207 break; 207 break;
@@ -224,40 +224,46 @@ class CBarPrefs : public QDialog
224 if (filebar->isChanged()) filebar->saveall(); 224 if (filebar->isChanged()) filebar->saveall();
225 if (viewbar->isChanged()) viewbar->saveall(); 225 if (viewbar->isChanged()) viewbar->saveall();
226 if (markbar->isChanged()) markbar->saveall(); 226 if (markbar->isChanged()) markbar->saveall();
227 if (indbar->isChanged()) indbar->saveall(); 227 if (indbar->isChanged()) indbar->saveall();
228 } 228 }
229 } 229 }
230 bool isChanged() 230 bool isChanged()
231 { 231 {
232 return 232 return
233 ( 233 (
234 filebar->isChanged() 234 filebar->isChanged()
235 || 235 ||
236 navbar->isChanged() 236 navbar->isChanged()
237 || 237 ||
238 viewbar->isChanged() 238 viewbar->isChanged()
239 || 239 ||
240 markbar->isChanged() 240 markbar->isChanged()
241 || 241 ||
242 indbar->isChanged() 242 indbar->isChanged()
243 ); 243 );
244 } 244 }
245 bool floating() { return misc->floating->isChecked(); } 245 bool floating() { return misc->floating->isChecked(); }
246 void floating(bool v) { misc->floating->setChecked(v); } 246 void floating(bool v) { misc->floating->setChecked(v); }
247 int tbpolicy() { return misc->tbpolicy->currentItem(); } 247 int tbpolicy() { return misc->tbpolicy->currentItem(); }
248 int qtscroll() { return misc->qtscroll->currentItem(); }
249 int localscroll() { return misc->localscroll->currentItem(); }
248#ifdef USECOMBO 250#ifdef USECOMBO
249 void tbpolicy(int v) { misc->tbpolicy->setCurrentItem(v); } 251 void tbpolicy(int v) { misc->tbpolicy->setCurrentItem(v); }
252 void qtscroll(int v) { misc->qtscroll->setCurrentItem(v); }
253 void localscroll(int v) { misc->localscroll->setCurrentItem(v); }
250#else 254#else
251 void tbpolicy(int v) { misc->tbpolicy->select(v); } 255 void tbpolicy(int v) { misc->tbpolicy->select(v); }
256 void qtscroll(int v) { misc->qtscroll->select(v); }
257 void localscroll(int v) { misc->localscroll->select(v); }
252#endif 258#endif
253 bool tbmovable() { return misc->tbmovable->isChecked(); } 259 bool tbmovable() { return misc->tbmovable->isChecked(); }
254 void tbmovable(bool v) { misc->tbmovable->setChecked(v); } 260 void tbmovable(bool v) { misc->tbmovable->setChecked(v); }
255 int tbposition() { return misc->tbposition->currentItem(); } 261 int tbposition() { return misc->tbposition->currentItem(); }
256#ifdef USECOMBO 262#ifdef USECOMBO
257 void tbposition(int v) { misc->tbposition->setCurrentItem(v); } 263 void tbposition(int v) { misc->tbposition->setCurrentItem(v); }
258#else 264#else
259 void tbposition(int v) { misc->tbposition->select(v); } 265 void tbposition(int v) { misc->tbposition->select(v); }
260#endif 266#endif
261 267
262}; 268};
263#endif // CPREFS_H 269#endif // CPREFS_H