-rw-r--r-- | korganizer/calendarview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 72221fd..1785b8a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -3304,96 +3304,97 @@ void CalendarView::editEvent( Event *event ) | |||
3304 | 3304 | ||
3305 | if ( !event ) return; | 3305 | if ( !event ) return; |
3306 | if ( event->isReadOnly() ) { | 3306 | if ( event->isReadOnly() ) { |
3307 | showEvent( event ); | 3307 | showEvent( event ); |
3308 | return; | 3308 | return; |
3309 | } | 3309 | } |
3310 | showEventEditor(); | 3310 | showEventEditor(); |
3311 | mEventEditor->editEvent( event , mFlagEditDescription); | 3311 | mEventEditor->editEvent( event , mFlagEditDescription); |
3312 | mEventEditor->exec(); | 3312 | mEventEditor->exec(); |
3313 | setActiveWindow(); | 3313 | setActiveWindow(); |
3314 | 3314 | ||
3315 | } | 3315 | } |
3316 | void CalendarView::editJournal( Journal *jour ) | 3316 | void CalendarView::editJournal( Journal *jour ) |
3317 | { | 3317 | { |
3318 | if ( !jour ) return; | 3318 | if ( !jour ) return; |
3319 | mDialogManager->hideSearchDialog(); | 3319 | mDialogManager->hideSearchDialog(); |
3320 | mViewManager->showJournalView(); | 3320 | mViewManager->showJournalView(); |
3321 | mNavigator->slotDaySelect( jour->dtStart().date() ); | 3321 | mNavigator->slotDaySelect( jour->dtStart().date() ); |
3322 | } | 3322 | } |
3323 | void CalendarView::editTodo( Todo *todo ) | 3323 | void CalendarView::editTodo( Todo *todo ) |
3324 | { | 3324 | { |
3325 | if ( !todo ) return; | 3325 | if ( !todo ) return; |
3326 | 3326 | ||
3327 | if ( todo->isReadOnly() ) { | 3327 | if ( todo->isReadOnly() ) { |
3328 | showTodo( todo ); | 3328 | showTodo( todo ); |
3329 | return; | 3329 | return; |
3330 | } | 3330 | } |
3331 | showTodoEditor(); | 3331 | showTodoEditor(); |
3332 | mTodoEditor->editTodo( todo ,mFlagEditDescription); | 3332 | mTodoEditor->editTodo( todo ,mFlagEditDescription); |
3333 | mTodoEditor->exec(); | 3333 | mTodoEditor->exec(); |
3334 | setActiveWindow(); | 3334 | setActiveWindow(); |
3335 | 3335 | ||
3336 | } | 3336 | } |
3337 | 3337 | ||
3338 | KOEventViewerDialog* CalendarView::getEventViewerDialog() | 3338 | KOEventViewerDialog* CalendarView::getEventViewerDialog() |
3339 | { | 3339 | { |
3340 | if ( !mEventViewerDialog ) { | 3340 | if ( !mEventViewerDialog ) { |
3341 | mEventViewerDialog = new KOEventViewerDialog(0); | 3341 | mEventViewerDialog = new KOEventViewerDialog(0); |
3342 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); | 3342 | connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); |
3343 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); | 3343 | connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); |
3344 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), | 3344 | connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), |
3345 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); | 3345 | dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); |
3346 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), | 3346 | connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), |
3347 | viewManager(), SLOT( showAgendaView( bool ) ) ); | 3347 | viewManager(), SLOT( showAgendaView( bool ) ) ); |
3348 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), | 3348 | connect( mEventViewerDialog, SIGNAL(signalViewerClosed()), |
3349 | this, SLOT( slotViewerClosed() ) ); | 3349 | this, SLOT( slotViewerClosed() ) ); |
3350 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), | 3350 | connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ), |
3351 | this, SLOT( todoChanged(Todo *) ) ); | 3351 | this, SLOT( todoChanged(Todo *) ) ); |
3352 | connect( mEventViewerDialog, SIGNAL( showIncidence( QString ) ),SLOT( showIncidence( QString ) )); | ||
3352 | mEventViewerDialog->resize( 640, 480 ); | 3353 | mEventViewerDialog->resize( 640, 480 ); |
3353 | 3354 | ||
3354 | } | 3355 | } |
3355 | return mEventViewerDialog; | 3356 | return mEventViewerDialog; |
3356 | } | 3357 | } |
3357 | void CalendarView::showEvent(Event *event) | 3358 | void CalendarView::showEvent(Event *event) |
3358 | { | 3359 | { |
3359 | getEventViewerDialog()->setEvent(event); | 3360 | getEventViewerDialog()->setEvent(event); |
3360 | getEventViewerDialog()->showMe(); | 3361 | getEventViewerDialog()->showMe(); |
3361 | } | 3362 | } |
3362 | 3363 | ||
3363 | void CalendarView::showTodo(Todo *event) | 3364 | void CalendarView::showTodo(Todo *event) |
3364 | { | 3365 | { |
3365 | getEventViewerDialog()->setTodo(event); | 3366 | getEventViewerDialog()->setTodo(event); |
3366 | getEventViewerDialog()->showMe(); | 3367 | getEventViewerDialog()->showMe(); |
3367 | } | 3368 | } |
3368 | void CalendarView::showJournal( Journal *jour ) | 3369 | void CalendarView::showJournal( Journal *jour ) |
3369 | { | 3370 | { |
3370 | getEventViewerDialog()->setJournal(jour); | 3371 | getEventViewerDialog()->setJournal(jour); |
3371 | getEventViewerDialog()->showMe(); | 3372 | getEventViewerDialog()->showMe(); |
3372 | 3373 | ||
3373 | } | 3374 | } |
3374 | // void CalendarView::todoModified (Todo *event, int changed) | 3375 | // void CalendarView::todoModified (Todo *event, int changed) |
3375 | // { | 3376 | // { |
3376 | // // if (mDialogList.find (event) != mDialogList.end ()) { | 3377 | // // if (mDialogList.find (event) != mDialogList.end ()) { |
3377 | // // kdDebug() << "Todo modified and open" << endl; | 3378 | // // kdDebug() << "Todo modified and open" << endl; |
3378 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; | 3379 | // // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; |
3379 | // // temp->modified (changed); | 3380 | // // temp->modified (changed); |
3380 | 3381 | ||
3381 | // // } | 3382 | // // } |
3382 | 3383 | ||
3383 | // mViewManager->updateView(); | 3384 | // mViewManager->updateView(); |
3384 | // } | 3385 | // } |
3385 | 3386 | ||
3386 | void CalendarView::appointment_show() | 3387 | void CalendarView::appointment_show() |
3387 | { | 3388 | { |
3388 | Event *anEvent = 0; | 3389 | Event *anEvent = 0; |
3389 | 3390 | ||
3390 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 3391 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
3391 | 3392 | ||
3392 | if (mViewManager->currentView()->isEventView()) { | 3393 | if (mViewManager->currentView()->isEventView()) { |
3393 | if ( incidence && incidence->typeID() == eventID ) { | 3394 | if ( incidence && incidence->typeID() == eventID ) { |
3394 | anEvent = static_cast<Event *>(incidence); | 3395 | anEvent = static_cast<Event *>(incidence); |
3395 | } | 3396 | } |
3396 | } | 3397 | } |
3397 | 3398 | ||
3398 | if (!anEvent) { | 3399 | if (!anEvent) { |
3399 | KNotifyClient::beep(); | 3400 | KNotifyClient::beep(); |