Diffstat (limited to 'core/apps/textedit/textedit.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | core/apps/textedit/textedit.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index f9eb241..781061a 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h | |||
@@ -3,105 +3,112 @@ | |||
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | // additions made by L.J. Potter Sun 02-17-2002 22:27:46 | 20 | // additions made by L.J. Potter Sun 02-17-2002 22:27:46 |
21 | 21 | ||
22 | #ifndef TEXTEDIT_H | 22 | #ifndef TEXTEDIT_H |
23 | #define TEXTEDIT_H | 23 | #define TEXTEDIT_H |
24 | 24 | ||
25 | #define QTEXTEDIT_OPEN_API | 25 | #define QTEXTEDIT_OPEN_API |
26 | 26 | ||
27 | #include "fileBrowser.h" | ||
28 | #include "fileSaver.h" | ||
29 | |||
27 | #include <qpe/filemanager.h> | 30 | #include <qpe/filemanager.h> |
28 | 31 | ||
29 | #include <qmainwindow.h> | 32 | #include <qmainwindow.h> |
30 | #include <qmultilineedit.h> | 33 | #include <qmultilineedit.h> |
31 | #include <qlist.h> | 34 | #include <qlist.h> |
32 | #include <qmap.h> | 35 | #include <qmap.h> |
33 | 36 | ||
34 | class QWidgetStack; | 37 | class QWidgetStack; |
35 | class QToolButton; | 38 | class QToolButton; |
36 | class QPopupMenu; | 39 | class QPopupMenu; |
37 | class QToolBar; | 40 | class QToolBar; |
38 | class QLineEdit; | 41 | class QLineEdit; |
39 | class QAction; | 42 | class QAction; |
40 | class FileSelector; | 43 | class FileSelector; |
41 | class QpeEditor; | 44 | class QpeEditor; |
42 | 45 | ||
43 | class TextEdit : public QMainWindow | 46 | class TextEdit : public QMainWindow |
44 | { | 47 | { |
45 | Q_OBJECT | 48 | Q_OBJECT |
46 | 49 | ||
47 | public: | 50 | public: |
48 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 51 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
49 | ~TextEdit(); | 52 | ~TextEdit(); |
50 | 53 | ||
51 | void openFile( const QString & ); | 54 | void openFile( const QString & ); |
52 | 55 | ||
53 | protected: | 56 | protected: |
54 | void closeEvent( QCloseEvent *e ); | 57 | void closeEvent( QCloseEvent *e ); |
55 | 58 | ||
56 | private slots: | 59 | private slots: |
57 | void setDocument(const QString&); | 60 | void setDocument(const QString&); |
58 | void changeFont(); | 61 | void changeFont(); |
59 | void fileNew(); | 62 | void fileNew(); |
60 | void fileRevert(); | 63 | void fileRevert(); |
61 | void fileOpen(); | 64 | void fileOpen(); |
62 | void newFileOpen(); | 65 | void newFileOpen(); |
63 | bool save(); | 66 | bool save(); |
64 | bool saveAs(); | 67 | bool saveAs(); |
65 | 68 | ||
66 | 69 | ||
67 | void editCut(); | 70 | void editCut(); |
68 | void editCopy(); | 71 | void editCopy(); |
69 | void editPaste(); | 72 | void editPaste(); |
70 | void editFind(); | 73 | void editFind(); |
74 | void editDelete(); | ||
71 | 75 | ||
72 | void findNext(); | 76 | void findNext(); |
73 | void findClose(); | 77 | void findClose(); |
74 | 78 | ||
75 | void search(); | 79 | void search(); |
76 | void accept(); | 80 | void accept(); |
77 | 81 | ||
78 | void newFile( const DocLnk & ); | 82 | void newFile( const DocLnk & ); |
79 | void openFile( const DocLnk & ); | 83 | void openFile( const DocLnk & ); |
80 | void showEditTools(); | 84 | void showEditTools(); |
81 | 85 | ||
82 | void zoomIn(); | 86 | void zoomIn(); |
83 | void zoomOut(); | 87 | void zoomOut(); |
84 | void setBold(bool y); | 88 | void setBold(bool y); |
85 | void setItalic(bool y); | 89 | void setItalic(bool y); |
86 | void setWordWrap(bool y); | 90 | void setWordWrap(bool y); |
87 | 91 | ||
88 | private: | 92 | private: |
89 | void colorChanged( const QColor &c ); | 93 | void colorChanged( const QColor &c ); |
90 | void clear(); | 94 | void clear(); |
91 | void updateCaption( const QString &name=QString::null ); | 95 | void updateCaption( const QString &name=QString::null ); |
92 | void setFontSize(int sz, bool round_down_not_up); | 96 | void setFontSize(int sz, bool round_down_not_up); |
93 | 97 | ||
94 | private: | 98 | private: |
95 | QWidgetStack *editorStack; | 99 | QWidgetStack *editorStack; |
96 | FileSelector *fileSelector; | 100 | FileSelector *fileSelector; |
101 | fileSaver *fileSaveDlg; | ||
102 | fileBrowser *browseForFiles; | ||
103 | |||
97 | QpeEditor* editor; | 104 | QpeEditor* editor; |
98 | QToolBar *menu, *editBar, *searchBar; | 105 | QToolBar *menu, *editBar, *searchBar; |
99 | QLineEdit *searchEdit; | 106 | QLineEdit *searchEdit; |
100 | DocLnk *doc; | 107 | DocLnk *doc; |
101 | bool searchVisible; | 108 | bool searchVisible; |
102 | bool bFromDocView; | 109 | bool bFromDocView; |
103 | QAction *zin, *zout; | 110 | QAction *zin, *zout; |
104 | QString currentFileName; | 111 | QString currentFileName; |
105 | }; | 112 | }; |
106 | 113 | ||
107 | #endif | 114 | #endif |