Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/QTReaderApp.h | 73 |
1 files changed, 65 insertions, 8 deletions
diff --git a/noncore/apps/opie-reader/QTReaderApp.h b/noncore/apps/opie-reader/QTReaderApp.h index 48575e9..22c57e4 100644 --- a/noncore/apps/opie-reader/QTReaderApp.h +++ b/noncore/apps/opie-reader/QTReaderApp.h | |||
@@ -24,7 +24,8 @@ | |||
24 | 24 | ||
25 | #define MAX_ENCODING 6 | 25 | #define MAX_ENCODING 6 |
26 | #define MAX_ACTIONS 3 | ||
26 | 27 | ||
27 | #include <qmainwindow.h> | 28 | #include <qmainwindow.h> |
28 | #include "QTReader.h" | 29 | #include "CExpander.h" |
29 | #include <qlist.h> | 30 | #include <qlist.h> |
30 | #include <qpe/filemanager.h> | 31 | #include <qpe/filemanager.h> |
@@ -33,5 +34,5 @@ | |||
33 | #include <qstack.h> | 34 | #include <qstack.h> |
34 | #include <qlistbox.h> | 35 | #include <qlistbox.h> |
35 | #include "Queue.h" | 36 | //#include "Queue.h" |
36 | 37 | ||
37 | class QWidgetStack; | 38 | class QWidgetStack; |
@@ -39,7 +40,19 @@ class QToolButton; | |||
39 | class QPopupMenu; | 40 | class QPopupMenu; |
40 | class QToolBar; | 41 | class QToolBar; |
42 | class QPEToolBar; | ||
41 | class CBkmkSelector; | 43 | class CBkmkSelector; |
42 | class QProgressBar; | 44 | class QProgressBar; |
43 | class QAction; | 45 | class QAction; |
46 | class CAnnoEdit; | ||
47 | class QFloatBar; | ||
48 | class CDrawBuffer; | ||
49 | class QTReader; | ||
50 | |||
51 | enum ActionTypes | ||
52 | { | ||
53 | cesOpenFile = 0, | ||
54 | cesAutoScroll, | ||
55 | cesActionMark | ||
56 | }; | ||
44 | 57 | ||
45 | #ifdef __ISEARCH | 58 | #ifdef __ISEARCH |
@@ -59,4 +72,5 @@ class QTReaderApp : public QMainWindow | |||
59 | 72 | ||
60 | unsigned long m_savedpos; | 73 | unsigned long m_savedpos; |
74 | bool m_annoIsEditing; | ||
61 | 75 | ||
62 | public: | 76 | public: |
@@ -69,4 +83,8 @@ class QTReaderApp : public QMainWindow | |||
69 | 83 | ||
70 | protected: | 84 | protected: |
85 | void setfontHelper(const QString& lcn, int size = 0); | ||
86 | QAction* m_bkmkAvail; | ||
87 | CAnnoEdit* m_annoWin; | ||
88 | Bkmk* m_anno; | ||
71 | void closeEvent( QCloseEvent *e ); | 89 | void closeEvent( QCloseEvent *e ); |
72 | void readbkmks(); | 90 | void readbkmks(); |
@@ -76,9 +94,34 @@ class QTReaderApp : public QMainWindow | |||
76 | void do_settarget(const QString&); | 94 | void do_settarget(const QString&); |
77 | int EncNameToInt(const QString&); | 95 | int EncNameToInt(const QString&); |
78 | void saveprefs(); | 96 | ActionTypes ActNameToInt(const QString&); |
97 | bool m_doAnnotation; | ||
98 | bool m_doDictionary; | ||
99 | bool m_doClipboard; | ||
79 | 100 | ||
101 | public: | ||
102 | void saveprefs(); | ||
80 | private slots: | 103 | private slots: |
104 | void setTwoTouch(bool _b); | ||
105 | void restoreFocus(); | ||
106 | void OnAnnotation(bool _b) | ||
107 | { | ||
108 | m_doAnnotation = _b; | ||
109 | } | ||
110 | void OnDictionary(bool _b) | ||
111 | { | ||
112 | m_doDictionary = _b; | ||
113 | } | ||
114 | void OnClipboard(bool _b) | ||
115 | { | ||
116 | m_doClipboard = _b; | ||
117 | } | ||
118 | void OnWordSelected(const QString&, size_t, const QString&); | ||
119 | void addAnno(const QString&, const QString&, size_t); | ||
120 | void addAnno(const QString&, const QString&); | ||
121 | void addanno(); | ||
122 | void showAnnotation(); | ||
81 | void do_setfont(const QString&); | 123 | void do_setfont(const QString&); |
82 | void encodingSelected(QAction*); | 124 | void encodingSelected(QAction*); |
125 | void buttonActionSelected(QAction*); | ||
83 | void msgHandler(const QCString&, const QByteArray&); | 126 | void msgHandler(const QCString&, const QByteArray&); |
84 | void monospace(bool); | 127 | void monospace(bool); |
@@ -128,9 +171,13 @@ private slots: | |||
128 | 171 | ||
129 | void stripcr(bool); | 172 | void stripcr(bool); |
173 | void peanut(bool _b); | ||
174 | void remap(bool); | ||
175 | void embolden(bool); | ||
176 | void autofmt(bool); | ||
177 | void textfmt(bool); | ||
130 | void striphtml(bool); | 178 | void striphtml(bool); |
131 | void dehyphen(bool); | 179 | void dehyphen(bool); |
132 | void unindent(bool); | 180 | void unindent(bool); |
133 | void repara(bool); | 181 | void repara(bool); |
134 | void setbold(bool); | ||
135 | void dblspce(bool); | 182 | void dblspce(bool); |
136 | void pagemode(bool); | 183 | void pagemode(bool); |
@@ -142,6 +189,9 @@ private slots: | |||
142 | void do_autogen(); | 189 | void do_autogen(); |
143 | void do_regaction(); | 190 | void do_regaction(); |
191 | void OnRedraw(); | ||
192 | void OnActionPressed(); | ||
144 | 193 | ||
145 | private: | 194 | private: |
195 | QString m_targetapp, m_targetmsg; | ||
146 | void listbkmk(); | 196 | void listbkmk(); |
147 | void do_regedit(); | 197 | void do_regedit(); |
@@ -151,4 +201,5 @@ private slots: | |||
151 | void do_autogen(const QString&); | 201 | void do_autogen(const QString&); |
152 | void do_addbkmk(const QString&); | 202 | void do_addbkmk(const QString&); |
203 | bool findNextBookmark(size_t start); | ||
153 | 204 | ||
154 | private: | 205 | private: |
@@ -158,22 +209,27 @@ private slots: | |||
158 | QAction* m_EncodingAction[MAX_ENCODING]; | 209 | QAction* m_EncodingAction[MAX_ENCODING]; |
159 | 210 | ||
211 | QAction* m_buttonAction[MAX_ACTIONS]; | ||
212 | |||
160 | CBkmkSelector* bkmkselector; | 213 | CBkmkSelector* bkmkselector; |
161 | 214 | ||
215 | ActionTypes m_spaceTarget; | ||
162 | size_t searchStart; | 216 | size_t searchStart; |
163 | #ifdef __ISEARCH | 217 | #ifdef __ISEARCH |
164 | QStack<searchrecord>* searchStack; | 218 | QStack<searchrecord>* searchStack; |
165 | bool dosearch(size_t start, CBuffer& test, const QString& arg); | 219 | bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); |
166 | #else | 220 | #else |
167 | bool dosearch(size_t start, CBuffer& test, const QRegExp& arg); | 221 | bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg); |
168 | #endif | 222 | #endif |
169 | QWidgetStack *editorStack; | 223 | QWidgetStack *editorStack; |
170 | QTReader* reader; | 224 | QTReader* reader; |
171 | QComboBox* m_fontSelector; | 225 | QComboBox* m_fontSelector; |
172 | QToolBar *menu, *editBar, *searchBar, *regBar, *m_fontBar; | 226 | QPEToolBar /* *menu,*/ *editBar; |
227 | QFloatBar *searchBar, *regBar/*, *m_fontBar*/; | ||
228 | QToolBar /* *searchBar, *regBar,*/ *m_fontBar; | ||
173 | QLineEdit *searchEdit, *regEdit; | 229 | QLineEdit *searchEdit, *regEdit; |
174 | DocLnk *doc; | 230 | DocLnk *doc; |
175 | bool searchVisible; | 231 | bool searchVisible; |
176 | bool regVisible; | 232 | bool regVisible; |
177 | bool m_fontVisible; | 233 | bool m_fontVisible, m_twoTouch; |
178 | bool bFromDocView; | 234 | bool bFromDocView; |
179 | static unsigned long m_uid; | 235 | static unsigned long m_uid; |
@@ -193,4 +249,5 @@ private slots: | |||
193 | int m_nRegAction; | 249 | int m_nRegAction; |
194 | QString m_autogenstr; | 250 | QString m_autogenstr; |
251 | bool m_dontSave; | ||
195 | }; | 252 | }; |
196 | 253 | ||