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.h182
1 files changed, 93 insertions, 89 deletions
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h
index 643ea68..e0cbea2 100644
--- a/core/apps/textedit/textedit.h
+++ b/core/apps/textedit/textedit.h
@@ -1,25 +1,25 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2 ** Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -48,91 +48,95 @@ class FileSelector;
48class QpeEditor; 48class QpeEditor;
49class QPopupMenu; 49class QPopupMenu;
50class QTimer; 50class QTimer;
51 51
52class TextEdit : public QMainWindow 52class TextEdit : public QMainWindow
53{ 53{
54 Q_OBJECT 54 Q_OBJECT
55 55
56public: 56public:
57 TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); 57 TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 );
58 ~TextEdit(); 58 ~TextEdit();
59 59
60protected: 60protected:
61 QPopupMenu *font; 61 QPopupMenu *font;
62 QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave; 62 QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave;
63 bool edited, edited1; 63 bool edited, edited1;
64 void openFile( const QString & ); 64 void openFile( const QString & );
65 QCopChannel * channel; 65 QCopChannel * channel;
66 66
67 bool featureAutoSave; 67 bool featureAutoSave;
68 void closeEvent( QCloseEvent *e ); 68 void closeEvent( QCloseEvent *e );
69 void doSearchBar(); 69 void doSearchBar();
70 int savePrompt(); 70 int savePrompt();
71 void setTimer(); 71 void setTimer();
72private slots: 72private slots:
73 void editorChanged(); 73 void editorChanged();
74 void receive(const QCString&, const QByteArray&); 74 void receive(const QCString&, const QByteArray&);
75 void timerCrank(); 75 void timerCrank();
76 void doTimer(bool); 76 void doTimer(bool);
77 void editPasteTimeDate(); 77 void editPasteTimeDate();
78 void doPrompt(bool); 78 void doPrompt(bool);
79 void doDesktop(bool); 79 void doDesktop(bool);
80 void doFilePerms(bool); 80 void doFilePerms(bool);
81 void doAbout(); 81 void doAbout();
82 void setDocument(const QString&); 82 void setDocument(const QString&);
83 void changeFont(); 83 void changeFont();
84 void fileNew(); 84 void fileNew();
85 void fileRevert(); 85 void fileRevert();
86 void fileOpen(); 86 void fileOpen();
87 void changeStartConfig(bool); 87 void changeStartConfig(bool);
88 bool save(); 88 bool save();
89 bool saveAs(); 89 bool saveAs();
90 void cleanUp(); 90 void cleanUp();
91 91
92 92 void gotoLine();
93 void editCut(); 93 void doGoto();
94 void editCopy(); 94
95 void editPaste(); 95
96 void editFind(); 96 void editCut();
97 void editDelete(); 97 void editCopy();
98 98 void editPaste();
99 void findNext(); 99 void editFind();
100 void findClose(); 100 void editDelete();
101 101
102 void search(); 102 void findNext();
103 void accept(); 103 void findClose();
104 104
105 void newFile( const DocLnk & ); 105 void search();
106 void openFile( const DocLnk & ); 106 void accept();
107 void showEditTools(); 107
108 108 void newFile( const DocLnk & );
109 void zoomIn(); 109 void openFile( const DocLnk & );
110 void zoomOut(); 110 void showEditTools();
111 void setBold(bool y); 111
112 void setItalic(bool y); 112 void zoomIn();
113 void setWordWrap(bool y); 113 void zoomOut();
114 void setSearchBar(bool); 114 void setBold(bool y);
115 void setItalic(bool y);
116 void setWordWrap(bool y);
117 void setSearchBar(bool);
115 118
116private: 119private:
117 void openDotFile(const QString &); 120 void openDotFile(const QString &);
118 void colorChanged( const QColor &c ); 121 void colorChanged( const QColor &c );
119 void clear(); 122 void clear();
120 void updateCaption( const QString &name=QString::null ); 123 void updateCaption( const QString &name=QString::null );
121 void setFontSize(int sz, bool round_down_not_up); 124 void setFontSize(int sz, bool round_down_not_up);
122private: 125private:
123// fileSaver *fileSaveDlg; 126// fileSaver *fileSaveDlg;
124// fileBrowser *browseForFiles; 127// fileBrowser *browseForFiles;
125 bool fromSetDocument; 128 bool fromSetDocument;
126 QpeEditor* editor; 129 QpeEditor* editor;
127 QToolBar *menu, *editBar, *searchBar; 130 QToolBar *menu, *editBar, *searchBar;
128 QPopupMenu *advancedMenu; 131 QPopupMenu *advancedMenu;
129 QLineEdit *searchEdit; 132 QLineEdit *gotoEdit;
130 DocLnk *doc; 133 QLineEdit *searchEdit;
131 bool fileIs, useAdvancedFeatures, promptExit, openDesktop, filePerms, useSearchBar, startWithNew; 134 DocLnk *doc;
132 bool bFromDocView; 135 bool fileIs, useAdvancedFeatures, promptExit, openDesktop, filePerms, useSearchBar, startWithNew;
136 bool bFromDocView;
133 int viewSelection; 137 int viewSelection;
134 QAction *zin, *zout; 138 QAction *zin, *zout;
135 QString currentFileName; 139 QString currentFileName;
136}; 140};
137 141
138#endif 142#endif