author | mickeyl <mickeyl> | 2003-11-06 10:26:22 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-11-06 10:26:22 (UTC) |
commit | 8c283be8e455571a03f11035b23f649e49de726c (patch) (unidiff) | |
tree | 8213d1c2cbf06881649af936362d4035ee63ceed /core/apps/textedit | |
parent | 55ea6367fba8a82fbdca74599422717e4b3c3ec6 (diff) | |
download | opie-8c283be8e455571a03f11035b23f649e49de726c.zip opie-8c283be8e455571a03f11035b23f649e49de726c.tar.gz opie-8c283be8e455571a03f11035b23f649e49de726c.tar.bz2 |
merge core/apps/*
-rw-r--r-- | core/apps/textedit/main.cpp | 13 | ||||
-rw-r--r-- | core/apps/textedit/textedit.h | 3 | ||||
-rw-r--r-- | core/apps/textedit/textedit.pro | 4 |
3 files changed, 5 insertions, 15 deletions
diff --git a/core/apps/textedit/main.cpp b/core/apps/textedit/main.cpp index f80c5d8..edab73d 100644 --- a/core/apps/textedit/main.cpp +++ b/core/apps/textedit/main.cpp | |||
@@ -1,35 +1,26 @@ | |||
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 | 20 | ||
21 | #include "textedit.h" | 21 | #include "textedit.h" |
22 | 22 | ||
23 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
24 | #include <opie/oapplicationfactory.h> | ||
24 | 25 | ||
25 | int main( int argc, char **argv ) | 26 | OPIE_EXPORT_APP( OApplicationFactory<TextEdit> ) |
26 | { | ||
27 | QPEApplication a( argc, argv ); | ||
28 | |||
29 | TextEdit e; | ||
30 | a.showMainDocumentWidget(&e); | ||
31 | // if ( argc == 3 && argv[1] == QCString("-f") ) | ||
32 | // e.openFile(argv[2]); | ||
33 | |||
34 | return a.exec(); | ||
35 | } | ||
diff --git a/core/apps/textedit/textedit.h b/core/apps/textedit/textedit.h index e0cbea2..303b707 100644 --- a/core/apps/textedit/textedit.h +++ b/core/apps/textedit/textedit.h | |||
@@ -33,68 +33,69 @@ | |||
33 | #include <opie/ofileselector.h> | 33 | #include <opie/ofileselector.h> |
34 | 34 | ||
35 | #include <qmainwindow.h> | 35 | #include <qmainwindow.h> |
36 | #include <qmultilineedit.h> | 36 | #include <qmultilineedit.h> |
37 | #include <qlist.h> | 37 | #include <qlist.h> |
38 | #include <qmap.h> | 38 | #include <qmap.h> |
39 | 39 | ||
40 | class QAction; | 40 | class QAction; |
41 | class QWidgetStack; | 41 | class QWidgetStack; |
42 | class QToolButton; | 42 | class QToolButton; |
43 | class QPopupMenu; | 43 | class QPopupMenu; |
44 | class QToolBar; | 44 | class QToolBar; |
45 | class QLineEdit; | 45 | class QLineEdit; |
46 | class QAction; | 46 | class QAction; |
47 | class FileSelector; | 47 | class FileSelector; |
48 | class QpeEditor; | 48 | class QpeEditor; |
49 | class QPopupMenu; | 49 | class QPopupMenu; |
50 | class QTimer; | 50 | class QTimer; |
51 | 51 | ||
52 | class TextEdit : public QMainWindow | 52 | class TextEdit : public QMainWindow |
53 | { | 53 | { |
54 | Q_OBJECT | 54 | Q_OBJECT |
55 | 55 | ||
56 | public: | 56 | public: |
57 | static QString appName() { return QString::fromLatin1("textedit"); } | ||
57 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | 58 | TextEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); |
58 | ~TextEdit(); | 59 | ~TextEdit(); |
59 | 60 | ||
60 | protected: | 61 | protected: |
61 | QPopupMenu *font; | 62 | QPopupMenu *font; |
62 | QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave; | 63 | QAction *nStart, *nFileDlgOpt, *nAdvanced, *desktopAction, *filePermAction, *searchBarAction, *nAutoSave; |
63 | bool edited, edited1; | 64 | bool edited, edited1; |
64 | void openFile( const QString & ); | 65 | void openFile( const QString & ); |
65 | QCopChannel * channel; | 66 | QCopChannel * channel; |
66 | 67 | ||
67 | bool featureAutoSave; | 68 | bool featureAutoSave; |
68 | void closeEvent( QCloseEvent *e ); | 69 | void closeEvent( QCloseEvent *e ); |
69 | void doSearchBar(); | 70 | void doSearchBar(); |
70 | int savePrompt(); | 71 | int savePrompt(); |
71 | void setTimer(); | 72 | void setTimer(); |
72 | private slots: | 73 | private slots: |
73 | void editorChanged(); | 74 | void editorChanged(); |
74 | void receive(const QCString&, const QByteArray&); | 75 | void receive(const QCString&, const QByteArray&); |
75 | void timerCrank(); | 76 | void timerCrank(); |
76 | void doTimer(bool); | 77 | void doTimer(bool); |
77 | void editPasteTimeDate(); | 78 | void editPasteTimeDate(); |
78 | void doPrompt(bool); | 79 | void doPrompt(bool); |
79 | void doDesktop(bool); | 80 | void doDesktop(bool); |
80 | void doFilePerms(bool); | 81 | void doFilePerms(bool); |
81 | void doAbout(); | 82 | void doAbout(); |
82 | void setDocument(const QString&); | 83 | void setDocument(const QString&); |
83 | void changeFont(); | 84 | void changeFont(); |
84 | void fileNew(); | 85 | void fileNew(); |
85 | void fileRevert(); | 86 | void fileRevert(); |
86 | void fileOpen(); | 87 | void fileOpen(); |
87 | void changeStartConfig(bool); | 88 | void changeStartConfig(bool); |
88 | bool save(); | 89 | bool save(); |
89 | bool saveAs(); | 90 | bool saveAs(); |
90 | void cleanUp(); | 91 | void cleanUp(); |
91 | 92 | ||
92 | void gotoLine(); | 93 | void gotoLine(); |
93 | void doGoto(); | 94 | void doGoto(); |
94 | 95 | ||
95 | 96 | ||
96 | void editCut(); | 97 | void editCut(); |
97 | void editCopy(); | 98 | void editCopy(); |
98 | void editPaste(); | 99 | void editPaste(); |
99 | void editFind(); | 100 | void editFind(); |
100 | void editDelete(); | 101 | void editDelete(); |
diff --git a/core/apps/textedit/textedit.pro b/core/apps/textedit/textedit.pro index 2577340..b958ff5 100644 --- a/core/apps/textedit/textedit.pro +++ b/core/apps/textedit/textedit.pro | |||
@@ -1,27 +1,25 @@ | |||
1 | TEMPLATE = app | 1 | CONFIG += qt warn_on release quick-app |
2 | CONFIG += qt warn_on release | ||
3 | DESTDIR = $(OPIEDIR)/bin | ||
4 | HEADERS = textedit.h filePermissions.h | 2 | HEADERS = textedit.h filePermissions.h |
5 | SOURCES = main.cpp textedit.cpp filePermissions.cpp | 3 | SOURCES = main.cpp textedit.cpp filePermissions.cpp |
6 | INCLUDEPATH += $(OPIEDIR)/include | 4 | INCLUDEPATH += $(OPIEDIR)/include |
7 | DEPENDPATH += $(OPIEDIR)/include | 5 | DEPENDPATH += $(OPIEDIR)/include |
8 | LIBS += -lqpe -lopie | 6 | LIBS += -lqpe -lopie |
9 | TARGET = textedit | 7 | TARGET = textedit |
10 | 8 | ||
11 | TRANSLATIONS = ../../../i18n/de/textedit.ts \ | 9 | TRANSLATIONS = ../../../i18n/de/textedit.ts \ |
12 | ../../../i18n/nl/textedit.ts \ | 10 | ../../../i18n/nl/textedit.ts \ |
13 | ../../../i18n/da/textedit.ts \ | 11 | ../../../i18n/da/textedit.ts \ |
14 | ../../../i18n/xx/textedit.ts \ | 12 | ../../../i18n/xx/textedit.ts \ |
15 | ../../../i18n/en/textedit.ts \ | 13 | ../../../i18n/en/textedit.ts \ |
16 | ../../../i18n/es/textedit.ts \ | 14 | ../../../i18n/es/textedit.ts \ |
17 | ../../../i18n/fr/textedit.ts \ | 15 | ../../../i18n/fr/textedit.ts \ |
18 | ../../../i18n/hu/textedit.ts \ | 16 | ../../../i18n/hu/textedit.ts \ |
19 | ../../../i18n/ja/textedit.ts \ | 17 | ../../../i18n/ja/textedit.ts \ |
20 | ../../../i18n/ko/textedit.ts \ | 18 | ../../../i18n/ko/textedit.ts \ |
21 | ../../../i18n/no/textedit.ts \ | 19 | ../../../i18n/no/textedit.ts \ |
22 | ../../../i18n/pl/textedit.ts \ | 20 | ../../../i18n/pl/textedit.ts \ |
23 | ../../../i18n/pt/textedit.ts \ | 21 | ../../../i18n/pt/textedit.ts \ |
24 | ../../../i18n/pt_BR/textedit.ts \ | 22 | ../../../i18n/pt_BR/textedit.ts \ |
25 | ../../../i18n/sl/textedit.ts \ | 23 | ../../../i18n/sl/textedit.ts \ |
26 | ../../../i18n/zh_CN/textedit.ts \ | 24 | ../../../i18n/zh_CN/textedit.ts \ |
27 | ../../../i18n/zh_TW/textedit.ts | 25 | ../../../i18n/zh_TW/textedit.ts |