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 @@ -21,4 +21,5 @@ #include <libkcal/event.h> +#include <qtimer.h> #include <qpushbutton.h> @@ -40,5 +41,5 @@ KOEventViewerDialog::KOEventViewerDialog(QWidget *parent,const char *name) i18n("Event Viewer"),Ok|User1|Close,Close, false, i18n("Agenda")) { - + sendSignalViewerClosed = true; mEventViewer = new KOEventViewer(this); mEventViewer->setFont( KOPrefs::instance()->mEventViewFont ); @@ -190,4 +191,5 @@ void KOEventViewerDialog::addText(QString text) void KOEventViewerDialog::editIncidence() { + sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 2; @@ -204,5 +206,5 @@ void KOEventViewerDialog::editIncidence() void KOEventViewerDialog::showIncidence() { - + sendSignalViewerClosed = false; if ( mSyncMode ) { mSyncResult = 1; @@ -265,2 +267,17 @@ 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; +} + |