summaryrefslogtreecommitdiff
path: root/core/apps/textedit/textedit.h
Unidiff
Diffstat (limited to 'core/apps/textedit/textedit.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/apps/textedit/textedit.h102
1 files changed, 102 insertions, 0 deletions
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h
new file mode 100644
index 0000000..f7d1052
--- a/dev/null
+++ b/core/apps/textedit/textedit.h
@@ -0,0 +1,102 @@
1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3**
4** This file is part of Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef TEXTEDIT_H
22#define TEXTEDIT_H
23
24#define QTEXTEDIT_OPEN_API
25
26#include <qpe/filemanager.h>
27
28#include <qmainwindow.h>
29#include <qmultilineedit.h>
30#include <qlist.h>
31#include <qmap.h>
32
33class QWidgetStack;
34class QToolButton;
35class QPopupMenu;
36class QToolBar;
37class QLineEdit;
38class QAction;
39class FileSelector;
40class QpeEditor;
41
42class TextEdit : public QMainWindow
43{
44 Q_OBJECT
45
46public:
47 TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
48 ~TextEdit();
49
50 void openFile( const QString & );
51
52protected:
53 void closeEvent( QCloseEvent *e );
54
55private slots:
56 void setDocument(const QString&);
57
58 void fileNew();
59 void fileRevert();
60 void fileOpen();
61
62 void editCut();
63 void editCopy();
64 void editPaste();
65 void editFind();
66
67 void findNext();
68 void findClose();
69
70 void search();
71 void accept();
72
73 void newFile( const DocLnk & );
74 void openFile( const DocLnk & );
75 void showEditTools();
76
77 void zoomIn();
78 void zoomOut();
79 void setBold(bool y);
80 void setItalic(bool y);
81 void setWordWrap(bool y);
82
83private:
84 void colorChanged( const QColor &c );
85 bool save();
86 void clear();
87 void updateCaption( const QString &name=QString::null );
88 void setFontSize(int sz, bool round_down_not_up);
89
90private:
91 QWidgetStack *editorStack;
92 FileSelector *fileSelector;
93 QpeEditor* editor;
94 QToolBar *menu, *editBar, *searchBar;
95 QLineEdit *searchEdit;
96 DocLnk *doc;
97 bool searchVisible;
98 bool bFromDocView;
99 QAction *zin, *zout;
100};
101
102#endif