Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.h | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h index 22c57e4..cb33e4a 100644 --- a/noncore/apps/opie-reader/QTReaderApp.h +++ b/noncore/apps/opie-reader/QTReaderApp.h | |||
@@ -23,7 +23,7 @@ | |||
23 | //#define __ISEARCH | 23 | //#define __ISEARCH |
24 | 24 | ||
25 | #define MAX_ENCODING 6 | 25 | #define MAX_ENCODING 6 |
26 | #define MAX_ACTIONS 3 | 26 | #define MAX_ACTIONS 4 |
27 | 27 | ||
28 | #include <qmainwindow.h> | 28 | #include <qmainwindow.h> |
29 | #include "CExpander.h" | 29 | #include "CExpander.h" |
@@ -39,7 +39,7 @@ class QWidgetStack; | |||
39 | class QToolButton; | 39 | class QToolButton; |
40 | class QPopupMenu; | 40 | class QPopupMenu; |
41 | class QToolBar; | 41 | class QToolBar; |
42 | class QPEToolBar; | 42 | //class QPEToolBar; |
43 | class CBkmkSelector; | 43 | class CBkmkSelector; |
44 | class QProgressBar; | 44 | class QProgressBar; |
45 | class QAction; | 45 | class QAction; |
@@ -47,12 +47,14 @@ class CAnnoEdit; | |||
47 | class QFloatBar; | 47 | class QFloatBar; |
48 | class CDrawBuffer; | 48 | class CDrawBuffer; |
49 | class QTReader; | 49 | class QTReader; |
50 | class QPixmap; | ||
50 | 51 | ||
51 | enum ActionTypes | 52 | enum ActionTypes |
52 | { | 53 | { |
53 | cesOpenFile = 0, | 54 | cesOpenFile = 0, |
54 | cesAutoScroll, | 55 | cesAutoScroll, |
55 | cesActionMark | 56 | cesActionMark, |
57 | cesFullScreen | ||
56 | }; | 58 | }; |
57 | 59 | ||
58 | #ifdef __ISEARCH | 60 | #ifdef __ISEARCH |
@@ -65,6 +67,7 @@ struct searchrecord | |||
65 | #endif | 67 | #endif |
66 | 68 | ||
67 | class infowin; | 69 | class infowin; |
70 | class GraphicWin; | ||
68 | 71 | ||
69 | class QTReaderApp : public QMainWindow | 72 | class QTReaderApp : public QMainWindow |
70 | { | 73 | { |
@@ -76,16 +79,18 @@ class QTReaderApp : public QMainWindow | |||
76 | public: | 79 | public: |
77 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 80 | QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
78 | ~QTReaderApp(); | 81 | ~QTReaderApp(); |
79 | 82 | void suspend(); | |
80 | void openFile( const QString & ); | 83 | void openFile( const QString & ); |
81 | 84 | ||
82 | void setScrollState(bool _b); | 85 | void setScrollState(bool _b); |
83 | 86 | ||
84 | protected: | 87 | protected: |
85 | void setfontHelper(const QString& lcn, int size = 0); | 88 | void setfontHelper(const QString& lcn, int size = 0); |
86 | QAction* m_bkmkAvail; | 89 | QAction* m_bkmkAvail, *m_actFullscreen; |
87 | CAnnoEdit* m_annoWin; | 90 | CAnnoEdit* m_annoWin; |
88 | Bkmk* m_anno; | 91 | Bkmk* m_anno; |
92 | // void resizeEvent(QResizeEvent* e); | ||
93 | void keyPressEvent(QKeyEvent* e); | ||
89 | void closeEvent( QCloseEvent *e ); | 94 | void closeEvent( QCloseEvent *e ); |
90 | void readbkmks(); | 95 | void readbkmks(); |
91 | void do_mono(const QString&); | 96 | void do_mono(const QString&); |
@@ -97,10 +102,15 @@ class QTReaderApp : public QMainWindow | |||
97 | bool m_doAnnotation; | 102 | bool m_doAnnotation; |
98 | bool m_doDictionary; | 103 | bool m_doDictionary; |
99 | bool m_doClipboard; | 104 | bool m_doClipboard; |
105 | bool m_fullscreen; | ||
100 | 106 | ||
101 | public: | 107 | public: |
102 | void saveprefs(); | 108 | void saveprefs(); |
103 | private slots: | 109 | private slots: |
110 | void zoomin(); | ||
111 | void zoomout(); | ||
112 | void setfullscreen(bool sfs); | ||
113 | void setcontinuous(bool sfs); | ||
104 | void setTwoTouch(bool _b); | 114 | void setTwoTouch(bool _b); |
105 | void restoreFocus(); | 115 | void restoreFocus(); |
106 | void OnAnnotation(bool _b) | 116 | void OnAnnotation(bool _b) |
@@ -116,6 +126,7 @@ private slots: | |||
116 | m_doClipboard = _b; | 126 | m_doClipboard = _b; |
117 | } | 127 | } |
118 | void OnWordSelected(const QString&, size_t, const QString&); | 128 | void OnWordSelected(const QString&, size_t, const QString&); |
129 | void showgraphic(QPixmap&); | ||
119 | void addAnno(const QString&, const QString&, size_t); | 130 | void addAnno(const QString&, const QString&, size_t); |
120 | void addAnno(const QString&, const QString&); | 131 | void addAnno(const QString&, const QString&); |
121 | void addanno(); | 132 | void addanno(); |
@@ -141,13 +152,12 @@ private slots: | |||
141 | // void oldFile(); | 152 | // void oldFile(); |
142 | void showinfo(); | 153 | void showinfo(); |
143 | void setDocument(const QString&); | 154 | void setDocument(const QString&); |
144 | void TBD(); | ||
145 | void TBDzoom(); | ||
146 | 155 | ||
147 | void indentplus(); | 156 | void indentplus(); |
148 | void indentminus(); | 157 | void indentminus(); |
149 | 158 | ||
150 | void fileOpen(); | 159 | void fileOpen(); |
160 | void fileClose(); | ||
151 | 161 | ||
152 | void editCopy(); | 162 | void editCopy(); |
153 | void editFind(); | 163 | void editFind(); |
@@ -166,10 +176,13 @@ private slots: | |||
166 | void search(); | 176 | void search(); |
167 | #endif | 177 | #endif |
168 | 178 | ||
169 | void openFile( const DocLnk & ); | ||
170 | void showEditTools(); | 179 | void showEditTools(); |
171 | 180 | ||
172 | void stripcr(bool); | 181 | void stripcr(bool); |
182 | void onespace(bool); | ||
183 | #ifdef REPALM | ||
184 | // void repalm(bool); | ||
185 | #endif | ||
173 | void peanut(bool _b); | 186 | void peanut(bool _b); |
174 | void remap(bool); | 187 | void remap(bool); |
175 | void embolden(bool); | 188 | void embolden(bool); |
@@ -181,6 +194,7 @@ private slots: | |||
181 | void repara(bool); | 194 | void repara(bool); |
182 | void dblspce(bool); | 195 | void dblspce(bool); |
183 | void pagemode(bool); | 196 | void pagemode(bool); |
197 | void navkeys(bool); | ||
184 | // void gotobkmk(const QString& bm); | 198 | // void gotobkmk(const QString& bm); |
185 | void gotobkmk(int); | 199 | void gotobkmk(int); |
186 | void cancelbkmk(); | 200 | void cancelbkmk(); |
@@ -192,8 +206,18 @@ private slots: | |||
192 | void OnActionPressed(); | 206 | void OnActionPressed(); |
193 | 207 | ||
194 | private: | 208 | private: |
209 | /* | ||
210 | void setstate(unsigned char* _sd, unsigned short _sdlen); | ||
211 | void getstate(unsigned char*& data, unsigned short& len); | ||
212 | */ | ||
213 | void fileOpen2(); | ||
214 | void readfilelist(); | ||
215 | void savefilelist(); | ||
216 | void updatefileinfo(); | ||
217 | bool openfrombkmk(Bkmk*); | ||
195 | QString m_targetapp, m_targetmsg; | 218 | QString m_targetapp, m_targetmsg; |
196 | void listbkmk(); | 219 | void listbkmk(CList<Bkmk>*, const QString& _lab = QString::null); |
220 | QString usefilebrowser(); | ||
197 | void do_regedit(); | 221 | void do_regedit(); |
198 | void colorChanged( const QColor &c ); | 222 | void colorChanged( const QColor &c ); |
199 | void clear(); | 223 | void clear(); |
@@ -223,11 +247,11 @@ private slots: | |||
223 | QWidgetStack *editorStack; | 247 | QWidgetStack *editorStack; |
224 | QTReader* reader; | 248 | QTReader* reader; |
225 | QComboBox* m_fontSelector; | 249 | QComboBox* m_fontSelector; |
226 | QPEToolBar /* *menu,*/ *editBar; | 250 | // QPEToolBar /* *menu,*/ *editBar; |
251 | QToolBar /* *menu,*/ *editBar; | ||
227 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; | 252 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; |
228 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; | 253 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; |
229 | QLineEdit *searchEdit, *regEdit; | 254 | QLineEdit *searchEdit, *regEdit; |
230 | DocLnk *doc; | ||
231 | bool searchVisible; | 255 | bool searchVisible; |
232 | bool regVisible; | 256 | bool regVisible; |
233 | bool m_fontVisible, m_twoTouch; | 257 | bool m_fontVisible, m_twoTouch; |
@@ -243,7 +267,9 @@ private slots: | |||
243 | } | 267 | } |
244 | */ | 268 | */ |
245 | CList<Bkmk>* pBkmklist; | 269 | CList<Bkmk>* pBkmklist; |
270 | CList<Bkmk>* pOpenlist; | ||
246 | infowin* m_infoWin; | 271 | infowin* m_infoWin; |
272 | GraphicWin* m_graphicwin; | ||
247 | QProgressBar* pbar; | 273 | QProgressBar* pbar; |
248 | bool m_fBkmksChanged; | 274 | bool m_fBkmksChanged; |
249 | int m_nRegAction; | 275 | int m_nRegAction; |
@@ -260,4 +286,6 @@ const int cJump = 5; | |||
260 | const int cMonoSpace = 6; | 286 | const int cMonoSpace = 6; |
261 | const int cOverlap = 7; | 287 | const int cOverlap = 7; |
262 | const int cSetTarget = 8; | 288 | const int cSetTarget = 8; |
289 | const int cOpenFile = 9; | ||
290 | |||
263 | #endif | 291 | #endif |