summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-write
Unidiff
Diffstat (limited to 'noncore/apps/opie-write') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-write/main.cpp13
-rw-r--r--noncore/apps/opie-write/mainwindow.cpp4
-rw-r--r--noncore/apps/opie-write/mainwindow.h4
-rw-r--r--noncore/apps/opie-write/opie-write.pro23
4 files changed, 9 insertions, 35 deletions
diff --git a/noncore/apps/opie-write/main.cpp b/noncore/apps/opie-write/main.cpp
index 027af38..2cdfa55 100644
--- a/noncore/apps/opie-write/main.cpp
+++ b/noncore/apps/opie-write/main.cpp
@@ -11,27 +11,18 @@
11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR 11** THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
12** PURPOSE. 12** PURPOSE.
13** 13**
14** email sales@trolltech.com for information about Qtopia License 14** email sales@trolltech.com for information about Qtopia License
15** Agreements. 15** Agreements.
16** 16**
17** Contact info@trolltech.com if any conditions of this licensing are 17** Contact info@trolltech.com if any conditions of this licensing are
18** not clear to you. 18** not clear to you.
19** 19**
20**********************************************************************/ 20**********************************************************************/
21 21
22#include <qpe/qpeapplication.h> 22#include <qpe/qpeapplication.h>
23#include <qpe/fileselector.h> 23#include <opie/oapplicationfactory.h>
24#include "mainwindow.h" 24#include "mainwindow.h"
25 25
26int main( int argc, char ** argv ) 26OPIE_EXPORT_APP( OApplicationFactory<MainWindow> )
27{
28 QPEApplication a( argc, argv );
29 27
30 MainWindow e;
31 a.showMainDocumentWidget(&e);
32 28
33 QObject::connect( &a, SIGNAL( lastWindowClosed() ),
34 &a, SLOT( quit() ) );
35
36 a.exec();
37}
diff --git a/noncore/apps/opie-write/mainwindow.cpp b/noncore/apps/opie-write/mainwindow.cpp
index 4a49abf..6bb524f 100644
--- a/noncore/apps/opie-write/mainwindow.cpp
+++ b/noncore/apps/opie-write/mainwindow.cpp
@@ -91,26 +91,26 @@ protected:
91 virtual void drawButtonLabel( QPainter *p ) { 91 virtual void drawButtonLabel( QPainter *p ) {
92 p->translate( -4, 0 ); 92 p->translate( -4, 0 );
93 QToolButton::drawButtonLabel( p ); 93 QToolButton::drawButtonLabel( p );
94 p->translate( 4, 0 ); 94 p->translate( 4, 0 );
95 } 95 }
96 96
97private: 97private:
98 int current; 98 int current;
99}; 99};
100 100
101//=========================================================================== 101//===========================================================================
102 102
103MainWindow::MainWindow( QWidget *parent, const char *name ) 103MainWindow::MainWindow( QWidget *parent, const char *name, WFlags fl )
104 : QMainWindow( parent, name ), 104 : QMainWindow( parent, name, fl ),
105 doc( 0 ) 105 doc( 0 )
106{ 106{
107 setRightJustification(TRUE); 107 setRightJustification(TRUE);
108 108
109 editorStack = new QWidgetStack( this ); 109 editorStack = new QWidgetStack( this );
110 110
111 fileSelector = new FileSelector( "text/html", 111 fileSelector = new FileSelector( "text/html",
112 editorStack, "fileselector" ); 112 editorStack, "fileselector" );
113 113
114 114
115 fileSelector->setCloseVisible( FALSE ); 115 fileSelector->setCloseVisible( FALSE );
116 editorStack->addWidget( fileSelector, 0 ); 116 editorStack->addWidget( fileSelector, 0 );
diff --git a/noncore/apps/opie-write/mainwindow.h b/noncore/apps/opie-write/mainwindow.h
index 565ad05..17713d8 100644
--- a/noncore/apps/opie-write/mainwindow.h
+++ b/noncore/apps/opie-write/mainwindow.h
@@ -36,27 +36,29 @@ class ButtonMenu;
36 36
37namespace Qt3 { 37namespace Qt3 {
38 38
39class QTextEdit; 39class QTextEdit;
40 40
41} 41}
42 42
43class MainWindow : public QMainWindow 43class MainWindow : public QMainWindow
44{ 44{
45 Q_OBJECT 45 Q_OBJECT
46 46
47public: 47public:
48 MainWindow( QWidget *parent = 0, const char *name = 0 ); 48 MainWindow( QWidget *parent = 0, const char *name = 0 , WFlags fl = 0);
49 ~MainWindow(); 49 ~MainWindow();
50 50
51 static QString appName() { return QString::fromLatin1("opie-write"); }
52
51protected: 53protected:
52 void closeEvent( QCloseEvent *e ); 54 void closeEvent( QCloseEvent *e );
53 55
54private slots: 56private slots:
55 // new file functions 57 // new file functions
56 void fileOpen(); 58 void fileOpen();
57 void fileRevert(); 59 void fileRevert();
58 void fileNew(); 60 void fileNew();
59 61
60 void editUndo(); 62 void editUndo();
61 void editRedo(); 63 void editRedo();
62 void editCut(); 64 void editCut();
diff --git a/noncore/apps/opie-write/opie-write.pro b/noncore/apps/opie-write/opie-write.pro
index 21a3c3a..bbaacd3 100644
--- a/noncore/apps/opie-write/opie-write.pro
+++ b/noncore/apps/opie-write/opie-write.pro
@@ -1,46 +1,27 @@
1 TEMPLATE= app
2 CONFIG += qt warn_on release
3 1
4 DESTDIR = $(OPIEDIR)/bin 2 CONFIG += qt warn on release quick-app
3
5 4
6 HEADERS =qcleanuphandler.h \ 5 HEADERS =qcleanuphandler.h \
7 qcomplextext_p.h \ 6 qcomplextext_p.h \
8 qrichtext_p.h \ 7 qrichtext_p.h \
9 qstylesheet.h \ 8 qstylesheet.h \
10 qtextedit.h \ 9 qtextedit.h \
11 mainwindow.h 10 mainwindow.h
12 11
13 SOURCES =qcomplextext.cpp \ 12 SOURCES =qcomplextext.cpp \
14 qstylesheet.cpp \ 13 qstylesheet.cpp \
15 qrichtext_p.cpp \ 14 qrichtext_p.cpp \
16 qrichtext.cpp \ 15 qrichtext.cpp \
17 qtextedit.cpp \ 16 qtextedit.cpp \
18 main.cpp \ 17 main.cpp \
19 mainwindow.cpp 18 mainwindow.cpp
20 19
21 INCLUDEPATH+= $(OPIEDIR)/include 20 INCLUDEPATH+= $(OPIEDIR)/include
22 DEPENDPATH+= $(OPIEDIR)/include 21 DEPENDPATH+= $(OPIEDIR)/include
23LIBS += -lqpe 22LIBS += -lqpe
24 23
25 TARGET = opie-write 24 TARGET = opie-write
26 25
27TRANSLATIONS = ../../../i18n/de/opie-write.ts \
28 ../../../i18n/nl/opie-write.ts \
29 ../../../i18n/da/opie-write.ts \
30 ../../../i18n/xx/opie-write.ts \
31 ../../../i18n/en/opie-write.ts \
32 ../../../i18n/es/opie-write.ts \
33 ../../../i18n/fr/opie-write.ts \
34 ../../../i18n/hu/opie-write.ts \
35 ../../../i18n/ja/opie-write.ts \
36 ../../../i18n/ko/opie-write.ts \
37 ../../../i18n/no/opie-write.ts \
38 ../../../i18n/pl/opie-write.ts \
39 ../../../i18n/pt/opie-write.ts \
40 ../../../i18n/pt_BR/opie-write.ts \
41 ../../../i18n/sl/opie-write.ts \
42 ../../../i18n/zh_CN/opie-write.ts \
43 ../../../i18n/zh_TW/opie-write.ts
44
45 26
46include ( $(OPIEDIR)/include.pro ) 27include ( $(OPIEDIR)/include.pro )