summaryrefslogtreecommitdiffabout
path: root/kmicromail/main.cpp
authorzautrix <zautrix>2004-07-03 16:33:12 (UTC)
committer zautrix <zautrix>2004-07-03 16:33:12 (UTC)
commite3b89230f065c48c84b48c88edb6eb088374c487 (patch) (side-by-side diff)
tree162ea2ef909a6f82ccfcedf45d80d6c821174912 /kmicromail/main.cpp
parent2dd6ac0b2d24c91d35ce674a6c26351352df2b15 (diff)
downloadkdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.zip
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.gz
kdepimpi-e3b89230f065c48c84b48c88edb6eb088374c487.tar.bz2
Initial revision
Diffstat (limited to 'kmicromail/main.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kmicromail/main.cpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/kmicromail/main.cpp b/kmicromail/main.cpp
new file mode 100644
index 0000000..f2879e8
--- a/dev/null
+++ b/kmicromail/main.cpp
@@ -0,0 +1,55 @@
+
+#ifndef DESKTOP_VERSION
+#include <qpe/qpeapplication.h>
+#include <stdlib.h>
+#else
+#include <qapplication.h>
+#include <qstring.h>
+#include <qwindowsstyle.h>
+#include <qplatinumstyle.h>
+#include <qsgistyle.h>
+#endif
+#include "opiemail.h"
+#include <qdir.h>
+#include <kstandarddirs.h>
+#include <kglobal.h>
+#include <stdio.h>
+#include "mainwindow.h"
+
+using namespace Opie::Core;
+int main( int argc, char **argv ) {
+
+#ifndef DESKTOP_VERSION
+ QPEApplication a( argc, argv );
+ a.setKeepRunning ();
+#else
+ QApplication a( argc, argv );
+ QApplication::setStyle( new QPlatinumStyle ());
+#endif
+
+ KGlobal::setAppName( "kmicromail" );
+ QString fileName ;
+#ifndef DESKTOP_VERSION
+ fileName = getenv("QPEDIR");
+ KGlobal::iconLoader()->setIconPath( fileName +"/pics/kdepim/kmicromail/");
+#else
+ fileName = qApp->applicationDirPath () + "/kdepim/kmicromail/";
+ KGlobal::iconLoader()->setIconPath(QDir::convertSeparators(fileName));
+#endif
+ KStandardDirs::setAppDir( QDir::convertSeparators(locateLocal("data", "kmicromail")));
+ OpieMail* mw = new OpieMail();
+#ifndef DESKTOP_VERSION
+ //qDebug("CONNECT ");
+ QObject::connect( &a, SIGNAL (appMessage ( const QCString &, const QByteArray & )),mw, SLOT(message( const QCString&, const QByteArray& )));
+ a.showMainWidget(mw );
+#else
+ a.setMainWidget(mw );
+ m.show();
+ //m.resize( 800, 600 );
+#endif
+ QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+ int rv = a.exec();
+ delete mw;
+ return rv;
+
+}