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 | |||
@@ -25,5 +25,6 @@ | |||
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> |
@@ -34,3 +35,3 @@ | |||
34 | #include <qlistbox.h> | 35 | #include <qlistbox.h> |
35 | #include "Queue.h" | 36 | //#include "Queue.h" |
36 | 37 | ||
@@ -40,2 +41,3 @@ class QPopupMenu; | |||
40 | class QToolBar; | 41 | class QToolBar; |
42 | class QPEToolBar; | ||
41 | class CBkmkSelector; | 43 | class CBkmkSelector; |
@@ -43,2 +45,13 @@ 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 | ||
@@ -60,2 +73,3 @@ class QTReaderApp : public QMainWindow | |||
60 | unsigned long m_savedpos; | 73 | unsigned long m_savedpos; |
74 | bool m_annoIsEditing; | ||
61 | 75 | ||
@@ -70,2 +84,6 @@ class QTReaderApp : public QMainWindow | |||
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 ); |
@@ -77,7 +95,32 @@ class QTReaderApp : public QMainWindow | |||
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&); |
@@ -129,2 +172,7 @@ private slots: | |||
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); |
@@ -133,3 +181,2 @@ private slots: | |||
133 | void repara(bool); | 181 | void repara(bool); |
134 | void setbold(bool); | ||
135 | void dblspce(bool); | 182 | void dblspce(bool); |
@@ -143,4 +190,7 @@ private slots: | |||
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(); |
@@ -152,2 +202,3 @@ private slots: | |||
152 | void do_addbkmk(const QString&); | 202 | void do_addbkmk(const QString&); |
203 | bool findNextBookmark(size_t start); | ||
153 | 204 | ||
@@ -159,4 +210,7 @@ private slots: | |||
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; |
@@ -164,5 +218,5 @@ private slots: | |||
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 |
@@ -171,3 +225,5 @@ private slots: | |||
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; |
@@ -176,3 +232,3 @@ private slots: | |||
176 | bool regVisible; | 232 | bool regVisible; |
177 | bool m_fontVisible; | 233 | bool m_fontVisible, m_twoTouch; |
178 | bool bFromDocView; | 234 | bool bFromDocView; |
@@ -194,2 +250,3 @@ private slots: | |||
194 | QString m_autogenstr; | 250 | QString m_autogenstr; |
251 | bool m_dontSave; | ||
195 | }; | 252 | }; |