-rw-r--r-- | korganizer/mainwindow.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6c0aa9b..4b00062 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -10,8 +10,9 @@ #include <qdir.h> #include <qapp.h> #include <qfileinfo.h> #include <qlabel.h> +#include <qmap.h> #include <qwmatrix.h> #include <qtextbrowser.h> #include <qtextstream.h> #ifndef DESKTOP_VERSION @@ -50,8 +51,10 @@ #include "kglobal.h" #include "klocale.h" #include "kconfig.h" #include "simplealarmclient.h" +#include "externalapphandler.h" + using namespace KCal; #ifndef _WIN32_ #include <unistd.h> #else @@ -196,8 +199,11 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : "You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information"); qApp->processEvents(); mView->dialogManager()->showSyncOptions(); } + + //US listen for result adressed from Ka/Pi + connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & ))); } MainWindow::~MainWindow() { //qDebug("MainWindow::~MainWindow() "); @@ -247,8 +253,18 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); //QString datamess; //qDebug("message "); qDebug("KO: QCOP message received: %s ", cmsg.data() ); + + if ( cmsg == "-writeFile" ) { + // I made from the "-writeFile" an "-writeAlarm" + mView->viewManager()->showWhatsNextView(); + mCalendar->checkAlarmForIncidence( 0, true); + showMaximized(); + raise(); + return; + } + if ( cmsg == "-writeFile" ) { // I made from the "-writeFile" an "-writeAlarm" mView->viewManager()->showWhatsNextView(); mCalendar->checkAlarmForIncidence( 0, true); |