author | zautrix <zautrix> | 2004-09-07 22:51:29 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-07 22:51:29 (UTC) |
commit | 2676646d4744ccceab1063dc02d772a26a203c61 (patch) (unidiff) | |
tree | 0a0d5261b9a804a29b61a38f68339979051282e2 /kmicromail/main.cpp | |
parent | 64a8ef1629f523df3006de5cb2b9882a50d96a05 (diff) | |
download | kdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.zip kdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.tar.gz kdepimpi-2676646d4744ccceab1063dc02d772a26a203c61.tar.bz2 |
Implemented Ompi - kapi connection
-rw-r--r-- | kmicromail/main.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp index 22f1200..a3e1b86 100644 --- a/kmicromail/main.cpp +++ b/kmicromail/main.cpp | |||
@@ -1,58 +1,61 @@ | |||
1 | // CHANGED 2004-08-06 Lutz Rogowski | 1 | // CHANGED 2004-08-06 Lutz Rogowski |
2 | 2 | ||
3 | |||
3 | #ifndef DESKTOP_VERSION | 4 | #ifndef DESKTOP_VERSION |
4 | #include <qpe/qpeapplication.h> | 5 | #include <qpe/qpeapplication.h> |
6 | #include <libkdepim/externalapphandler.h> | ||
5 | #include <stdlib.h> | 7 | #include <stdlib.h> |
6 | #else | 8 | #else |
7 | #include <qapplication.h> | 9 | #include <qapplication.h> |
8 | #include <qstring.h> | 10 | #include <qstring.h> |
9 | #include <qwindowsstyle.h> | 11 | #include <qwindowsstyle.h> |
10 | #include <qplatinumstyle.h> | 12 | #include <qplatinumstyle.h> |
11 | #include <qsgistyle.h> | 13 | #include <qsgistyle.h> |
12 | #endif | 14 | #endif |
13 | #include "opiemail.h" | 15 | #include "opiemail.h" |
14 | #include <qdir.h> | 16 | #include <qdir.h> |
15 | #include <kstandarddirs.h> | 17 | #include <kstandarddirs.h> |
16 | #include <kglobal.h> | 18 | #include <kglobal.h> |
17 | #include <stdio.h> | 19 | #include <stdio.h> |
18 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
19 | 21 | ||
20 | using namespace Opie::Core; | 22 | using namespace Opie::Core; |
21 | int main( int argc, char **argv ) { | 23 | int main( int argc, char **argv ) { |
22 | 24 | ||
23 | #ifndef DESKTOP_VERSION | 25 | #ifndef DESKTOP_VERSION |
24 | QPEApplication a( argc, argv ); | 26 | QPEApplication a( argc, argv ); |
25 | a.setKeepRunning (); | 27 | a.setKeepRunning (); |
26 | #else | 28 | #else |
27 | QApplication a( argc, argv ); | 29 | QApplication a( argc, argv ); |
28 | QApplication::setStyle( new QPlatinumStyle ()); | 30 | QApplication::setStyle( new QPlatinumStyle ()); |
29 | #endif | 31 | #endif |
30 | 32 | ||
31 | KGlobal::setAppName( "kmicromail" ); | 33 | KGlobal::setAppName( "kmicromail" ); |
32 | QString fileName ; | 34 | QString fileName ; |
33 | #ifndef DESKTOP_VERSION | 35 | #ifndef DESKTOP_VERSION |
34 | fileName = getenv("QPEDIR"); | 36 | fileName = getenv("QPEDIR"); |
35 | if ( QApplication::desktop()->width() > 320 ) | 37 | if ( QApplication::desktop()->width() > 320 ) |
36 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); | 38 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/icons22/"); |
37 | else | 39 | else |
38 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); | 40 | KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/"); |
39 | #else | 41 | #else |
40 | fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; | 42 | fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/"; |
41 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); | 43 | KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName)); |
42 | #endif | 44 | #endif |
43 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); | 45 | KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail"))); |
44 | OpieMail mw; | 46 | OpieMail mw; |
45 | #ifndef DESKTOP_VERSION | 47 | #ifndef DESKTOP_VERSION |
46 | //qDebug("CONNECT "); | 48 | //qDebug("CONNECT "); |
47 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); | 49 | QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),&mw, SLOT(message( const QCString&, const QByteArray& ))); |
50 | QObject::connect(&a, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); | ||
48 | a.showMainWidget(&mw ); | 51 | a.showMainWidget(&mw ); |
49 | #else | 52 | #else |
50 | a.setMainWidget(&mw ); | 53 | a.setMainWidget(&mw ); |
51 | mw.show(); | 54 | mw.show(); |
52 | //m.resize( 800, 600 ); | 55 | //m.resize( 800, 600 ); |
53 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); | 56 | QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit())); |
54 | #endif | 57 | #endif |
55 | int rv = a.exec(); | 58 | int rv = a.exec(); |
56 | return rv; | 59 | return rv; |
57 | 60 | ||
58 | } | 61 | } |