summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-17 00:13:25 (UTC)
committer ulf69 <ulf69>2004-08-17 00:13:25 (UTC)
commitf3875aba68f175e8da32462f64b12fc46bc31102 (patch) (side-by-side diff)
treec17a6e839a27ddfdc80699739e9934327a4a8610
parentab3b10a5018152dedbdb64d0d5a4bd8ec752ccdb (diff)
downloadkdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.zip
kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.gz
kdepimpi-f3875aba68f175e8da32462f64b12fc46bc31102.tar.bz2
added listener for reults of Ka/Pi
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp16
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
@@ -6,16 +6,17 @@
#include <qwhatsthis.h>
#include <qmessagebox.h>
#include <qlineedit.h>
#include <qfile.h>
#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
#include <qpe/global.h>
#include <qpe/qpemenubar.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
@@ -46,16 +47,18 @@
#include "kstandarddirs.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "koglobals.h"
#include "kglobal.h"
#include "klocale.h"
#include "kconfig.h"
#include "simplealarmclient.h"
+#include "externalapphandler.h"
+
using namespace KCal;
#ifndef _WIN32_
#include <unistd.h>
#else
#include "koimportoldialog.h"
#endif
#include "mainwindow.h"
@@ -192,16 +195,19 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
KMessageBox::information( this,
"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() ");
//save toolbar location
delete mCalendar;
delete KOPrefs::instance();
@@ -243,16 +249,26 @@ void MainWindow::closeEvent( QCloseEvent* ce )
void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
{
QDataStream stream( data, IO_ReadOnly );
// 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);
showMaximized();
raise();
return;