Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h index ad47fc9..ab1b7ad 100644 --- a/noncore/apps/opie-reader/QTReaderApp.h +++ b/noncore/apps/opie-reader/QTReaderApp.h | |||
@@ -146,97 +146,98 @@ class QTReaderApp : public QMainWindow | |||
146 | QLabel* m_prog; | 146 | QLabel* m_prog; |
147 | bool m_annoIsEditing; | 147 | bool m_annoIsEditing; |
148 | bool m_propogatefontchange, m_bFloatingDialog; | 148 | bool m_propogatefontchange, m_bFloatingDialog; |
149 | bool m_url_clipboard, m_url_localfile, m_url_globalfile; | 149 | bool m_url_clipboard, m_url_localfile, m_url_globalfile; |
150 | CButtonPrefs* m_buttonprefs; | 150 | CButtonPrefs* m_buttonprefs; |
151 | fontselector_action m_fontAction; | 151 | fontselector_action m_fontAction; |
152 | void doAction(QKeyEvent* e); | 152 | void doAction(QKeyEvent* e); |
153 | 153 | ||
154 | public: | 154 | public: |
155 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 155 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
156 | ~QTReaderApp(); | 156 | ~QTReaderApp(); |
157 | 157 | ||
158 | void hideEvent(QHideEvent*) | 158 | void hideEvent(QHideEvent*) |
159 | { | 159 | { |
160 | #ifdef USEQPE | 160 | #ifdef USEQPE |
161 | if (m_grabkeyboard) | 161 | if (m_grabkeyboard) |
162 | { | 162 | { |
163 | ((QPEApplication*)qApp)->ungrabKeyboard(); | 163 | ((QPEApplication*)qApp)->ungrabKeyboard(); |
164 | } | 164 | } |
165 | #endif | 165 | #endif |
166 | suspend(); | 166 | suspend(); |
167 | } | 167 | } |
168 | #ifdef USEQPE | 168 | #ifdef USEQPE |
169 | void showEvent(QShowEvent*) | 169 | void showEvent(QShowEvent*) |
170 | { | 170 | { |
171 | if (m_grabkeyboard) | 171 | if (m_grabkeyboard) |
172 | { | 172 | { |
173 | ((QPEApplication*)qApp)->grabKeyboard(); | 173 | ((QPEApplication*)qApp)->grabKeyboard(); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | #endif | 176 | #endif |
177 | void suspend(); | 177 | void suspend(); |
178 | void openFile( const QString & ); | 178 | void openFile( const QString &, unsigned int loc = 0 ); |
179 | 179 | ||
180 | 180 | ||
181 | protected: | 181 | protected: |
182 | void setfontHelper(const QString& lcn, int size = 0); | 182 | void setfontHelper(const QString& lcn, int size = 0); |
183 | QAction* m_bkmkAvail, *m_actFullscreen; | 183 | QAction* m_bkmkAvail, *m_actFullscreen; |
184 | CAnnoEdit* m_annoWin; | 184 | CAnnoEdit* m_annoWin; |
185 | Bkmk* m_anno; | 185 | Bkmk* m_anno; |
186 | int m_scrollcolor, m_scrollbarcolor, m_background, m_foreground; | 186 | int m_scrollcolor, m_scrollbarcolor, m_background, m_foreground; |
187 | // void resizeEvent(QResizeEvent* e); | 187 | // void resizeEvent(QResizeEvent* e); |
188 | void closeEvent( QCloseEvent *e ); | 188 | void closeEvent( QCloseEvent *e ); |
189 | #ifdef NEWFULLSCREEN | 189 | #if defined(USEQPE) && defined(USENEWFULLSCREEN) |
190 | bool m_usenewfullscreen; | ||
190 | void resizeEvent(QResizeEvent *); | 191 | void resizeEvent(QResizeEvent *); |
191 | void focusInEvent(QFocusEvent*); | 192 | void focusInEvent(QFocusEvent*); |
192 | void enableFullscreen(); | ||
193 | #endif | 193 | #endif |
194 | void readbkmks(); | 194 | void readbkmks(); |
195 | void do_mono(const QString&); | 195 | void do_mono(const QString&); |
196 | void do_jump(const QString&); | 196 | void do_jump(const QString&); |
197 | void do_reparastring(const QString&); | 197 | void do_reparastring(const QString&); |
198 | void do_settarget(const QString&); | 198 | void do_settarget(const QString&); |
199 | #ifdef _SCROLLPIPE | 199 | #ifdef _SCROLLPIPE |
200 | //void do_setpipetarget(const QString&); | 200 | //void do_setpipetarget(const QString&); |
201 | #endif | 201 | #endif |
202 | void do_saveconfig(const QString&, bool); | 202 | void do_saveconfig(const QString&, bool); |
203 | bool readconfig(const QString&, const QString&, bool); | 203 | bool readconfig(const QString&, const QString&, bool); |
204 | bool PopulateConfig(const char*, bool usedirs = false); | 204 | bool PopulateConfig(const char*, bool usedirs = false); |
205 | ActionTypes ActNameToInt(const QString&); | 205 | ActionTypes ActNameToInt(const QString&); |
206 | #ifdef USEQPE | 206 | #ifdef USEQPE |
207 | bool m_grabkeyboard; | 207 | bool m_grabkeyboard; |
208 | #endif | 208 | #endif |
209 | bool m_doAnnotation; | 209 | bool m_doAnnotation; |
210 | bool m_doDictionary; | 210 | bool m_doDictionary; |
211 | bool m_doOutput; | ||
211 | bool m_doClipboard; | 212 | bool m_doClipboard; |
212 | bool m_fullscreen; | 213 | bool m_fullscreen; |
213 | bool m_loadedconfig; | 214 | bool m_loadedconfig; |
214 | public: | 215 | public: |
215 | void saveprefs(); | 216 | void saveprefs(); |
216 | public slots: | 217 | public slots: |
217 | void setBackgroundBitmap(); | 218 | void setBackgroundBitmap(); |
218 | void UpdateStatus(); | 219 | void UpdateStatus(); |
219 | void setScrollState(bool _b); | 220 | void setScrollState(bool _b); |
220 | void handlekey(QKeyEvent* e); | 221 | void handlekey(QKeyEvent* e); |
221 | void forceopen(const QString& filename); | 222 | void forceopen(const QString& filename); |
222 | void setDocument(const QString&); | 223 | void setDocument(const QString&); |
223 | private slots: | 224 | private slots: |
224 | #ifdef _SCRIPT | 225 | #ifdef _SCRIPT |
225 | // void RunScript(); | 226 | // void RunScript(); |
226 | #endif | 227 | #endif |
227 | void actionscroll(int v); | 228 | void actionscroll(int v); |
228 | void SaveConfig(); | 229 | void SaveConfig(); |
229 | void LoadTheme(); | 230 | void LoadTheme(); |
230 | void LoadConfig(); | 231 | void LoadConfig(); |
231 | void TidyConfig(); | 232 | void TidyConfig(); |
232 | void ExportLinks(); | 233 | void ExportLinks(); |
233 | void zoomin(); | 234 | void zoomin(); |
234 | void zoomout(); | 235 | void zoomout(); |
235 | void chooseencoding(); | 236 | void chooseencoding(); |
236 | void setfullscreen(bool sfs); | 237 | void setfullscreen(bool sfs); |
237 | void setrotated(bool sfs); | 238 | void setrotated(bool sfs); |
238 | void setinverted(bool sfs); | 239 | void setinverted(bool sfs); |
239 | void setgrab(bool sfs); | 240 | void setgrab(bool sfs); |
240 | // void setcontinuous(bool sfs); | 241 | // void setcontinuous(bool sfs); |
241 | void setTwoTouch(bool _b); | 242 | void setTwoTouch(bool _b); |
242 | void restoreFocus(); | 243 | void restoreFocus(); |
@@ -359,102 +360,102 @@ private slots: | |||
359 | QAction *m_exportlinks_action, *m_rotate_action, *m_buttonprefs_action, *m_inverse_action; | 360 | QAction *m_exportlinks_action, *m_rotate_action, *m_buttonprefs_action, *m_inverse_action; |
360 | QAction *m_repara_action; | 361 | QAction *m_repara_action; |
361 | #ifdef USEQPE | 362 | #ifdef USEQPE |
362 | QAction *m_grab_action; | 363 | QAction *m_grab_action; |
363 | #endif | 364 | #endif |
364 | void addtoolbars(Config* config); | 365 | void addtoolbars(Config* config); |
365 | ToolbarPolicy m_tbpol, m_tbpolsave; | 366 | ToolbarPolicy m_tbpol, m_tbpolsave; |
366 | ToolBarDock m_tbposition; | 367 | ToolBarDock m_tbposition; |
367 | bool m_tbmove, m_tbmovesave; | 368 | bool m_tbmove, m_tbmovesave; |
368 | QToolBar* filebar(); | 369 | QToolBar* filebar(); |
369 | QToolBar* viewbar(); | 370 | QToolBar* viewbar(); |
370 | QToolBar* navbar(); | 371 | QToolBar* navbar(); |
371 | QToolBar* markbar(); | 372 | QToolBar* markbar(); |
372 | void hidetoolbars(); | 373 | void hidetoolbars(); |
373 | void addfilebar(Config* _config, const QString& key, QAction* a); | 374 | void addfilebar(Config* _config, const QString& key, QAction* a); |
374 | void addviewbar(Config* _config, const QString& key, QAction* a); | 375 | void addviewbar(Config* _config, const QString& key, QAction* a); |
375 | void addnavbar(Config* _config, const QString& key, QAction* a); | 376 | void addnavbar(Config* _config, const QString& key, QAction* a); |
376 | void addmarkbar(Config* _config, const QString& key, QAction* a); | 377 | void addmarkbar(Config* _config, const QString& key, QAction* a); |
377 | bool checkbar(Config* _config, const QString& key); | 378 | bool checkbar(Config* _config, const QString& key); |
378 | #ifdef _SCRIPT | 379 | #ifdef _SCRIPT |
379 | void SaveScript(const char* sname); | 380 | void SaveScript(const char* sname); |
380 | #endif | 381 | #endif |
381 | /* | 382 | /* |
382 | void setstate(unsigned char* _sd, unsigned short _sdlen); | 383 | void setstate(unsigned char* _sd, unsigned short _sdlen); |
383 | void getstate(unsigned char*& data, unsigned short& len); | 384 | void getstate(unsigned char*& data, unsigned short& len); |
384 | */ | 385 | */ |
385 | void fileOpen2(); | 386 | void fileOpen2(); |
386 | void readfilelist(); | 387 | void readfilelist(); |
387 | void savefilelist(); | 388 | void savefilelist(); |
388 | void updatefileinfo(); | 389 | void updatefileinfo(); |
389 | bool openfrombkmk(Bkmk*); | 390 | bool openfrombkmk(Bkmk*); |
390 | QString m_targetapp, m_targetmsg, m_statusstring, m_themename; | 391 | QString m_targetapp, m_targetmsg, m_statusstring, m_themename; |
391 | bool listbkmk(CList<Bkmk>*, const QString& _lab = QString::null); | 392 | bool listbkmk(CList<Bkmk>*, const QString& _lab = QString::null, bool presel=false); |
392 | QString usefilebrowser(); | 393 | QString usefilebrowser(); |
393 | void do_regedit(); | 394 | void do_regedit(); |
394 | void colorChanged( const QColor &c ); | 395 | void colorChanged( const QColor &c ); |
395 | void clear(); | 396 | void clear(); |
396 | void updateCaption(); | 397 | void updateCaption(); |
397 | void do_autogen(const QString&); | 398 | void do_autogen(const QString&); |
398 | void do_addbkmk(const QString&); | 399 | void do_addbkmk(const QString&); |
399 | bool findNextBookmark(size_t start); | 400 | bool findNextBookmark(size_t start); |
400 | 401 | ||
401 | private: | 402 | private: |
402 | 403 | ||
403 | QAction* m_scrollButton; | 404 | QAction* m_scrollButton; |
404 | 405 | ||
405 | QAction* m_buttonAction[MAX_ACTIONS]; | 406 | QAction* m_buttonAction[MAX_ACTIONS]; |
406 | 407 | ||
407 | CBkmkSelector* bkmkselector; | 408 | CBkmkSelector* bkmkselector; |
408 | 409 | ||
409 | // ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget, | 410 | // ActionTypes m_spaceTarget, m_escapeTarget, m_returnTarget, m_leftTarget, m_rightTarget, |
410 | //m_upTarget, m_downTarget; | 411 | //m_upTarget, m_downTarget; |
411 | //bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll; | 412 | //bool m_leftScroll, m_rightScroll, m_upScroll, m_downScroll; |
412 | bool m_bcloseDisabled, m_disableesckey; | 413 | bool m_bcloseDisabled, m_disableesckey; |
413 | size_t searchStart; | 414 | size_t searchStart; |
414 | #ifdef __ISEARCH | 415 | #ifdef __ISEARCH |
415 | QStack<searchrecord>* searchStack; | 416 | QStack<searchrecord>* searchStack; |
416 | bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); | 417 | bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); |
417 | #else | 418 | #else |
418 | bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg); | 419 | bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg); |
419 | #endif | 420 | #endif |
420 | QWidgetStack *editorStack; | 421 | QWidgetStack *editorStack; |
421 | QTReader* reader; | 422 | QTReader* reader; |
422 | QComboBox* m_fontSelector; | 423 | QComboBox* m_fontSelector; |
423 | // QPEToolBar /* *menu,*/ *fileBar; | 424 | // QPEToolBar /* *menu,*/ *fileBar; |
424 | #ifdef USEQPE | 425 | #if defined(USEQPE) |
425 | QToolBar *menubar; | 426 | QToolBar *menubar; |
426 | #endif | 427 | #endif |
427 | QToolBar *fileBar, *navBar, *viewBar, *markBar; | 428 | QToolBar *fileBar, *navBar, *viewBar, *markBar; |
428 | #ifdef USEQPE | 429 | #if defined(USEQPE) |
429 | QPEMenuBar *mb; | 430 | QPEMenuBar *mb; |
430 | #else | 431 | #else |
431 | QMenuBar *mb; | 432 | QMenuBar *mb; |
432 | #endif | 433 | #endif |
433 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; | 434 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; |
434 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; | 435 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; |
435 | QLineEdit *searchEdit, *regEdit; | 436 | QLineEdit *searchEdit, *regEdit; |
436 | bool searchVisible; | 437 | bool searchVisible; |
437 | bool regVisible; | 438 | bool regVisible; |
438 | bool m_fontVisible, m_twoTouch; | 439 | bool m_fontVisible, m_twoTouch; |
439 | static unsigned long m_uid; | 440 | static unsigned long m_uid; |
440 | long unsigned get_unique_id() { return m_uid++; } | 441 | long unsigned get_unique_id() { return m_uid++; } |
441 | /* | 442 | /* |
442 | void resizeEvent( QResizeEvent * r) | 443 | void resizeEvent( QResizeEvent * r) |
443 | { | 444 | { |
444 | // qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height()); | 445 | // qDebug("resize:(%u,%u)", r->oldSize().width(), r->oldSize().height()); |
445 | // qDebug("resize:(%u,%u)", r->size().width(), r->size().height()); | 446 | // qDebug("resize:(%u,%u)", r->size().width(), r->size().height()); |
446 | // bgroup->move( width()-bgroup->width(), 0 ); | 447 | // bgroup->move( width()-bgroup->width(), 0 ); |
447 | } | 448 | } |
448 | */ | 449 | */ |
449 | CList<Bkmk>* pBkmklist; | 450 | CList<Bkmk>* pBkmklist; |
450 | CList<Bkmk>* pOpenlist; | 451 | CList<Bkmk>* pOpenlist; |
451 | infowin* m_infoWin; | 452 | infowin* m_infoWin; |
452 | GraphicWin* m_graphicwin; | 453 | GraphicWin* m_graphicwin; |
453 | QProgressBar* pbar; | 454 | QProgressBar* pbar; |
454 | bool m_fBkmksChanged; | 455 | bool m_fBkmksChanged; |
455 | // int m_nRegAction; | 456 | // int m_nRegAction; |
456 | regedit_type m_nRegAction; | 457 | regedit_type m_nRegAction; |
457 | bkmk_action m_nBkmkAction; | 458 | bkmk_action m_nBkmkAction; |
458 | QString m_autogenstr; | 459 | QString m_autogenstr; |
459 | bool m_dontSave; | 460 | bool m_dontSave; |
460 | }; | 461 | }; |