author | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-09-14 02:19:09 (UTC) |
commit | 2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975 (patch) (side-by-side diff) | |
tree | eeed16b5f80dd5883991a7a06133f5f7a6936256 /noncore/apps/opie-reader/QTReaderApp.h | |
parent | 5a95ed6a000a56849b8f093deea500214856c626 (diff) | |
download | opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.zip opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.gz opie-2d0c1ffcb39f9fac8193ed2e9e93794de0bd7975.tar.bz2 |
update by Tim
Diffstat (limited to 'noncore/apps/opie-reader/QTReaderApp.h') (more/less context) (ignore 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 @@ -22,26 +22,39 @@ //#define __ISEARCH #define MAX_ENCODING 6 +#define MAX_ACTIONS 3 #include <qmainwindow.h> -#include "QTReader.h" +#include "CExpander.h" #include <qlist.h> #include <qpe/filemanager.h> #include <qmap.h> #include <qlineedit.h> #include <qstack.h> #include <qlistbox.h> -#include "Queue.h" +//#include "Queue.h" class QWidgetStack; class QToolButton; class QPopupMenu; class QToolBar; +class QPEToolBar; class CBkmkSelector; class QProgressBar; class QAction; +class CAnnoEdit; +class QFloatBar; +class CDrawBuffer; +class QTReader; + +enum ActionTypes +{ + cesOpenFile = 0, + cesAutoScroll, + cesActionMark +}; #ifdef __ISEARCH struct searchrecord { @@ -57,8 +70,9 @@ class QTReaderApp : public QMainWindow { Q_OBJECT unsigned long m_savedpos; + bool m_annoIsEditing; public: QTReaderApp( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); ~QTReaderApp(); @@ -67,20 +81,49 @@ class QTReaderApp : public QMainWindow void setScrollState(bool _b); protected: + void setfontHelper(const QString& lcn, int size = 0); + QAction* m_bkmkAvail; + CAnnoEdit* m_annoWin; + Bkmk* m_anno; void closeEvent( QCloseEvent *e ); void readbkmks(); void do_mono(const QString&); void do_jump(const QString&); void do_overlap(const QString&); void do_settarget(const QString&); int EncNameToInt(const QString&); - void saveprefs(); + ActionTypes ActNameToInt(const QString&); + bool m_doAnnotation; + bool m_doDictionary; + bool m_doClipboard; + public: + void saveprefs(); private slots: + void setTwoTouch(bool _b); + void restoreFocus(); + void OnAnnotation(bool _b) + { + m_doAnnotation = _b; + } + void OnDictionary(bool _b) + { + m_doDictionary = _b; + } + void OnClipboard(bool _b) + { + m_doClipboard = _b; + } + void OnWordSelected(const QString&, size_t, const QString&); + void addAnno(const QString&, const QString&, size_t); + void addAnno(const QString&, const QString&); + void addanno(); + void showAnnotation(); void do_setfont(const QString&); void encodingSelected(QAction*); + void buttonActionSelected(QAction*); void msgHandler(const QCString&, const QByteArray&); void monospace(bool); void jump(); void setoverlap(); @@ -126,13 +169,17 @@ private slots: void openFile( const DocLnk & ); void showEditTools(); void stripcr(bool); + void peanut(bool _b); + void remap(bool); + void embolden(bool); + void autofmt(bool); + void textfmt(bool); void striphtml(bool); void dehyphen(bool); void unindent(bool); void repara(bool); - void setbold(bool); void dblspce(bool); void pagemode(bool); // void gotobkmk(const QString& bm); void gotobkmk(int); @@ -140,42 +187,51 @@ private slots: void do_gotomark(); void do_delmark(); void do_autogen(); void do_regaction(); + void OnRedraw(); + void OnActionPressed(); private: + QString m_targetapp, m_targetmsg; void listbkmk(); void do_regedit(); void colorChanged( const QColor &c ); void clear(); void updateCaption(); void do_autogen(const QString&); void do_addbkmk(const QString&); + bool findNextBookmark(size_t start); private: QAction* m_scrollButton; QAction* m_EncodingAction[MAX_ENCODING]; + QAction* m_buttonAction[MAX_ACTIONS]; + CBkmkSelector* bkmkselector; + ActionTypes m_spaceTarget; size_t searchStart; #ifdef __ISEARCH QStack<searchrecord>* searchStack; - bool dosearch(size_t start, CBuffer& test, const QString& arg); + bool dosearch(size_t start, CDrawBuffer& test, const QString& arg); #else - bool dosearch(size_t start, CBuffer& test, const QRegExp& arg); + bool dosearch(size_t start, CDrawBuffer& test, const QRegExp& arg); #endif QWidgetStack *editorStack; QTReader* reader; QComboBox* m_fontSelector; - QToolBar *menu, *editBar, *searchBar, *regBar, *m_fontBar; + QPEToolBar /* *menu,*/ *editBar; + QFloatBar *searchBar, *regBar/*, *m_fontBar*/; + QToolBar /* *searchBar, *regBar,*/ *m_fontBar; QLineEdit *searchEdit, *regEdit; DocLnk *doc; bool searchVisible; bool regVisible; - bool m_fontVisible; + bool m_fontVisible, m_twoTouch; bool bFromDocView; static unsigned long m_uid; long unsigned get_unique_id() { return m_uid++; } /* @@ -191,8 +247,9 @@ private slots: QProgressBar* pbar; bool m_fBkmksChanged; int m_nRegAction; QString m_autogenstr; + bool m_dontSave; }; const int cAutoGen = 0; const int cAddBkmk = 1; |