Diffstat (limited to 'korganizer/koeventviewerdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koeventviewerdialog.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/korganizer/koeventviewerdialog.cpp b/korganizer/koeventviewerdialog.cpp index 23e62d3..8bada3b 100644 --- a/korganizer/koeventviewerdialog.cpp +++ b/korganizer/koeventviewerdialog.cpp @@ -20,6 +20,7 @@ #include <klocale.h> #include <libkcal/event.h> +#include <qtimer.h> #include <qpushbutton.h> #include "koeventviewer.h" @@ -39,7 +40,7 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) #endif i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) { - + sendSignalViewerClosed = true; mEventViewer = new KOEventViewer(this); mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); setMainWidget(mEventViewer); @@ -189,6 +190,7 @@ void KOEventViewerDialog::addText(QString text) } void KOEventViewerDialog::editIncidence() { + sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 2; accept(); @@ -203,7 +205,7 @@ void KOEventViewerDialog::editIncidence() } void KOEventViewerDialog::showIncidence() { - + sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 1; accept(); @@ -264,3 +266,18 @@ void KOEventViewerDialog::keyPressEvent ( QKeyEvent * e ) } } +void KOEventViewerDialog::hideEvent ( QHideEvent * e ) +{ + KDialogBase::hideEvent ( e ); + QTimer::singleShot( 1, this, SLOT (slotViewerClosed() ) ); +} + +void KOEventViewerDialog::slotViewerClosed() +{ + if ( sendSignalViewerClosed ) { + //qDebug("KOEventViewerDialog::hideEvent "); + emit signalViewerClosed(); + } + sendSignalViewerClosed = true; +} + |