Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.h | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h index ab6f60e..fe3eebf 100644 --- a/noncore/apps/opie-reader/QTReaderApp.h +++ b/noncore/apps/opie-reader/QTReaderApp.h | |||
@@ -40,15 +40,15 @@ | |||
40 | //#include "Queue.h" | 40 | //#include "Queue.h" |
41 | 41 | ||
42 | class QWidgetStack; | 42 | class QWidgetStack; |
43 | class QToolButton; | 43 | class QToolButton; |
44 | class QPopupMenu; | 44 | class QPopupMenu; |
45 | class QToolBar; | 45 | class QToolBar; |
46 | #ifdef USEQPE | 46 | #ifdef USEQPE |
47 | class QToolBar; | 47 | class QToolBar; |
48 | class QMenuBar; | 48 | class QMenuBar; |
49 | #endif | 49 | #endif |
50 | class CBkmkSelector; | 50 | class CBkmkSelector; |
51 | class QProgressBar; | 51 | class QProgressBar; |
52 | class QAction; | 52 | class QAction; |
53 | class CAnnoEdit; | 53 | class CAnnoEdit; |
54 | class QFloatBar; | 54 | class QFloatBar; |
@@ -137,30 +137,30 @@ class infowin; | |||
137 | class GraphicWin; | 137 | class GraphicWin; |
138 | 138 | ||
139 | class QTReaderApp : public QMainWindow | 139 | class QTReaderApp : public QMainWindow |
140 | { | 140 | { |
141 | Q_OBJECT | 141 | Q_OBJECT |
142 | 142 | ||
143 | unsigned long m_savedpos; | 143 | unsigned long m_savedpos; |
144 | int m_debounce; | 144 | int m_debounce; |
145 | timeb m_lastkeytime; | 145 | timeb m_lastkeytime; |
146 | bool m_annoIsEditing; | 146 | bool m_annoIsEditing; |
147 | bool m_propogatefontchange, m_bFloatingDialog; | 147 | bool m_propogatefontchange, m_bFloatingDialog; |
148 | bool m_url_clipboard, m_url_localfile, m_url_globalfile; | 148 | bool m_url_clipboard, m_url_localfile, m_url_globalfile; |
149 | fontselector_action m_fontAction; | 149 | fontselector_action m_fontAction; |
150 | void doAction(ActionTypes a, QKeyEvent* e); | 150 | void doAction(ActionTypes a, QKeyEvent* e); |
151 | 151 | ||
152 | public: | 152 | public: |
153 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 153 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
154 | ~QTReaderApp(); | 154 | ~QTReaderApp(); |
155 | 155 | ||
156 | void handlekey(QKeyEvent* e); | 156 | void handlekey(QKeyEvent* e); |
157 | void hideEvent(QHideEvent*) | 157 | void hideEvent(QHideEvent*) |
158 | { | 158 | { |
159 | suspend(); | 159 | suspend(); |
160 | } | 160 | } |
161 | 161 | ||
162 | void suspend(); | 162 | void suspend(); |
163 | void openFile( const QString & ); | 163 | void openFile( const QString & ); |
164 | 164 | ||
165 | void setScrollState(bool _b); | 165 | void setScrollState(bool _b); |
166 | 166 | ||
@@ -168,30 +168,30 @@ class QTReaderApp : public QMainWindow | |||
168 | void setfontHelper(const QString& lcn, int size = 0); | 168 | void setfontHelper(const QString& lcn, int size = 0); |
169 | QAction* m_bkmkAvail, *m_actFullscreen; | 169 | QAction* m_bkmkAvail, *m_actFullscreen; |
170 | CAnnoEdit* m_annoWin; | 170 | CAnnoEdit* m_annoWin; |
171 | Bkmk* m_anno; | 171 | Bkmk* m_anno; |
172 | // void resizeEvent(QResizeEvent* e); | 172 | // void resizeEvent(QResizeEvent* e); |
173 | void closeEvent( QCloseEvent *e ); | 173 | void closeEvent( QCloseEvent *e ); |
174 | void readbkmks(); | 174 | void readbkmks(); |
175 | void do_mono(const QString&); | 175 | void do_mono(const QString&); |
176 | void do_jump(const QString&); | 176 | void do_jump(const QString&); |
177 | void do_settarget(const QString&); | 177 | void do_settarget(const QString&); |
178 | #ifdef _SCROLLPIPE | 178 | #ifdef _SCROLLPIPE |
179 | //void do_setpipetarget(const QString&); | 179 | // void do_setpipetarget(const QString&); |
180 | #endif | 180 | #endif |
181 | void do_saveconfig(const QString&, bool); | 181 | void do_saveconfig(const QString&, bool); |
182 | bool readconfig(const QString&, bool); | 182 | bool readconfig(const QString&, bool); |
183 | bool PopulateConfig(const char*); | 183 | bool PopulateConfig(const char*); |
184 | ActionTypes ActNameToInt(const QString&); | 184 | ActionTypes ActNameToInt(const QString&); |
185 | bool m_doAnnotation; | 185 | bool m_doAnnotation; |
186 | bool m_doDictionary; | 186 | bool m_doDictionary; |
187 | bool m_doClipboard; | 187 | bool m_doClipboard; |
188 | bool m_fullscreen; | 188 | bool m_fullscreen; |
189 | bool m_loadedconfig; | 189 | bool m_loadedconfig; |
190 | public: | 190 | public: |
191 | void saveprefs(); | 191 | void saveprefs(); |
192 | public slots: | 192 | public slots: |
193 | void setDocument(const QString&); | 193 | void setDocument(const QString&); |
194 | private slots: | 194 | private slots: |
195 | #ifdef _SCRIPT | 195 | #ifdef _SCRIPT |
196 | // void RunScript(); | 196 | // void RunScript(); |
197 | #endif | 197 | #endif |
@@ -204,55 +204,55 @@ private slots: | |||
204 | void chooseencoding(); | 204 | void chooseencoding(); |
205 | void setfullscreen(bool sfs); | 205 | void setfullscreen(bool sfs); |
206 | // void setcontinuous(bool sfs); | 206 | // void setcontinuous(bool sfs); |
207 | void setTwoTouch(bool _b); | 207 | void setTwoTouch(bool _b); |
208 | void restoreFocus(); | 208 | void restoreFocus(); |
209 | void OnAnnotation(bool _b) | 209 | void OnAnnotation(bool _b) |
210 | { | 210 | { |
211 | m_doAnnotation = _b; | 211 | m_doAnnotation = _b; |
212 | } | 212 | } |
213 | void OnDictionary(bool _b) | 213 | void OnDictionary(bool _b) |
214 | { | 214 | { |
215 | m_doDictionary = _b; | 215 | m_doDictionary = _b; |
216 | } | 216 | } |
217 | void OnClipboard(bool _b) | 217 | void OnClipboard(bool _b) |
218 | { | 218 | { |
219 | m_doClipboard = _b; | 219 | m_doClipboard = _b; |
220 | } | 220 | } |
221 | void OnWordSelected(const QString&, size_t, const QString&); | 221 | void OnWordSelected(const QString&, size_t, const QString&); |
222 | void OnURLSelected(const QString& href); | 222 | void OnURLSelected(const QString& href); |
223 | void showgraphic(QImage&); | 223 | void showgraphic(QImage&); |
224 | void addAnno(const QString&, const QString&, size_t); | 224 | void addAnno(const QString&, const QString&, size_t); |
225 | void addAnno(const QString&, const QString&); | 225 | void addAnno(const QString&, const QString&); |
226 | void addanno(); | 226 | void addanno(); |
227 | void showAnnotation(); | 227 | void showAnnotation(); |
228 | void do_setencoding(int i); | 228 | void do_setencoding(int i); |
229 | void do_setfont(const QString&); | 229 | void do_setfont(const QString&); |
230 | void buttonActionSelected(QAction*); | 230 | void buttonActionSelected(QAction*); |
231 | //void msgHandler(const QCString&, const QByteArray&); | 231 | // void msgHandler(const QCString&, const QByteArray&); |
232 | void monospace(bool); | 232 | void monospace(bool); |
233 | void jump(); | 233 | void jump(); |
234 | void settarget(); | 234 | void settarget(); |
235 | #ifdef _SCROLLPIPE | 235 | #ifdef _SCROLLPIPE |
236 | //void setpipetarget(); | 236 | // void setpipetarget(); |
237 | //void setpause(bool); | 237 | // void setpause(bool); |
238 | #endif | 238 | #endif |
239 | //void setspacing(); | 239 | // void setspacing(); |
240 | void setfont(); | 240 | void setfont(); |
241 | void clearBkmkList(); | 241 | void clearBkmkList(); |
242 | void listBkmkFiles(); | 242 | void listBkmkFiles(); |
243 | void editMark(); | 243 | void editMark(); |
244 | void autoScroll(bool); | 244 | void autoScroll(bool); |
245 | void addbkmk(); | 245 | void addbkmk(); |
246 | void savebkmks(); | 246 | void savebkmks(); |
247 | //void importFiles(); | 247 | // void importFiles(); |
248 | void showprefs(); | 248 | void showprefs(); |
249 | void showtoolbarprefs(); | 249 | void showtoolbarprefs(); |
250 | void infoClose(); | 250 | void infoClose(); |
251 | // void oldFile(); | 251 | // void oldFile(); |
252 | void showinfo(); | 252 | void showinfo(); |
253 | 253 | ||
254 | // void indentplus(); | 254 | // void indentplus(); |
255 | // void indentminus(); | 255 | // void indentminus(); |
256 | 256 | ||
257 | void fileOpen(); | 257 | void fileOpen(); |
258 | void fileClose(); | 258 | void fileClose(); |
@@ -364,13 +364,13 @@ private slots: | |||
364 | 364 | ||
365 | QAction* m_buttonAction[MAX_ACTIONS]; | 365 | QAction* m_buttonAction[MAX_ACTIONS]; |
366 | 366 | ||
367 | CBkmkSelector* bkmkselector; | 367 | CBkmkSelector* bkmkselector; |
368 | 368 | ||
369 | ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget, | 369 | ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget, |
370 | m_upTarget, m_downTarget; | 370 | m_upTarget, m_downTarget; |
371 | bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll; | 371 | bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll; |
372 | bool m_bcloseDisabled, m_disableesckey; | 372 | bool m_bcloseDisabled, m_disableesckey; |
373 | size_t searchStart; | 373 | size_t searchStart; |
374 | #ifdef __ISEARCH | 374 | #ifdef __ISEARCH |
375 | QStack<searchrecord>* searchStack; | 375 | QStack<searchrecord>* searchStack; |
376 | bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); | 376 | bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); |
@@ -379,31 +379,31 @@ private slots: | |||
379 | #endif | 379 | #endif |
380 | QWidgetStack *editorStack; | 380 | QWidgetStack *editorStack; |
381 | QTReader* reader; | 381 | QTReader* reader; |
382 | QComboBox* m_fontSelector; | 382 | QComboBox* m_fontSelector; |
383 | // QToolBar /* *menu,*/ *fileBar; | 383 | // QToolBar /* *menu,*/ *fileBar; |
384 | QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar; | 384 | QToolBar *menubar, *fileBar, *navBar, *viewBar, *markBar; |
385 | #ifdef USEQPE | 385 | #ifdef USEQPE |
386 | QMenuBar *mb; | 386 | QMenuBar *mb; |
387 | #else | 387 | #else |
388 | QMenuBar *mb; | 388 | QMenuBar *mb; |
389 | #endif | 389 | #endif |
390 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; | 390 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; |
391 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; | 391 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; |
392 | QLineEdit *searchEdit, *regEdit; | 392 | QLineEdit *searchEdit, *regEdit; |
393 | bool searchVisible; | 393 | bool searchVisible; |
394 | bool regVisible; | 394 | bool regVisible; |
395 | bool m_fontVisible, m_twoTouch; | 395 | bool m_fontVisible, m_twoTouch; |
396 | bool bFromDocView; | 396 | bool bFromDocView; |
397 | static unsigned long m_uid; | 397 | static unsigned long m_uid; |
398 | long unsigned get_unique_id() { return m_uid++; } | 398 | long unsigned get_unique_id() { return m_uid++; } |
399 | /* | 399 | /* |
400 | void resizeEvent( QResizeEvent * r) | 400 | void resizeEvent( QResizeEvent * r) |
401 | { | 401 | { |
402 | // qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height()); | 402 | // odebug << "resize:(" << r->oldSize().width() << "," << r->oldSize().height() << ")" << oendl; |
403 | // qDebug("resize:(%u,%u)", r->size().width(), r->size().height()); | 403 | // odebug << "resize:(" << r->size().width() << "," << r->size().height() << ")" << oendl; |
404 | // bgroup->move( width()-bgroup->width(), 0 ); | 404 | // bgroup->move( width()-bgroup->width(), 0 ); |
405 | } | 405 | } |
406 | */ | 406 | */ |
407 | CList<Bkmk>* pBkmklist; | 407 | CList<Bkmk>* pBkmklist; |
408 | CList<Bkmk>* pOpenlist; | 408 | CList<Bkmk>* pOpenlist; |
409 | infowin* m_infoWin; | 409 | infowin* m_infoWin; |