summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Unidiff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 363dc32..378c7d4 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2681,96 +2681,98 @@ void CalendarView::newFloatingEvent()
2681 QDate date = tmpList.first(); 2681 QDate date = tmpList.first();
2682 2682
2683 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ), 2683 newEvent( QDateTime( date, QTime( 12, 0, 0 ) ),
2684 QDateTime( date, QTime( 12, 0, 0 ) ), true ); 2684 QDateTime( date, QTime( 12, 0, 0 ) ), true );
2685} 2685}
2686 2686
2687 2687
2688void CalendarView::editEvent( Event *event ) 2688void CalendarView::editEvent( Event *event )
2689{ 2689{
2690 2690
2691 if ( !event ) return; 2691 if ( !event ) return;
2692 if ( event->isReadOnly() ) { 2692 if ( event->isReadOnly() ) {
2693 showEvent( event ); 2693 showEvent( event );
2694 return; 2694 return;
2695 } 2695 }
2696 showEventEditor(); 2696 showEventEditor();
2697 mEventEditor->editEvent( event , mFlagEditDescription); 2697 mEventEditor->editEvent( event , mFlagEditDescription);
2698} 2698}
2699void CalendarView::editJournal( Journal *jour ) 2699void CalendarView::editJournal( Journal *jour )
2700{ 2700{
2701 if ( !jour ) return; 2701 if ( !jour ) return;
2702 mDialogManager->hideSearchDialog(); 2702 mDialogManager->hideSearchDialog();
2703 mViewManager->showJournalView(); 2703 mViewManager->showJournalView();
2704 mNavigator->slotDaySelect( jour->dtStart().date() ); 2704 mNavigator->slotDaySelect( jour->dtStart().date() );
2705} 2705}
2706void CalendarView::editTodo( Todo *todo ) 2706void CalendarView::editTodo( Todo *todo )
2707{ 2707{
2708 if ( !todo ) return; 2708 if ( !todo ) return;
2709 2709
2710 if ( todo->isReadOnly() ) { 2710 if ( todo->isReadOnly() ) {
2711 showTodo( todo ); 2711 showTodo( todo );
2712 return; 2712 return;
2713 } 2713 }
2714 showTodoEditor(); 2714 showTodoEditor();
2715 mTodoEditor->editTodo( todo ,mFlagEditDescription); 2715 mTodoEditor->editTodo( todo ,mFlagEditDescription);
2716 2716
2717} 2717}
2718 2718
2719KOEventViewerDialog* CalendarView::getEventViewerDialog() 2719KOEventViewerDialog* CalendarView::getEventViewerDialog()
2720{ 2720{
2721 if ( !mEventViewerDialog ) { 2721 if ( !mEventViewerDialog ) {
2722 mEventViewerDialog = new KOEventViewerDialog(this); 2722 mEventViewerDialog = new KOEventViewerDialog(this);
2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) ); 2723 connect( mEventViewerDialog, SIGNAL( editIncidence( Incidence* )), this, SLOT(editIncidence( Incidence* ) ) );
2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig())); 2724 connect( this, SIGNAL(configChanged()), mEventViewerDialog, SLOT(updateConfig()));
2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)), 2725 connect( mEventViewerDialog, SIGNAL(jumpToTime( const QDate &)),
2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) ); 2726 dateNavigator(), SLOT( selectWeek( const QDate & ) ) );
2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ), 2727 connect( mEventViewerDialog, SIGNAL(showAgendaView( bool ) ),
2728 viewManager(), SLOT( showAgendaView( bool ) ) ); 2728 viewManager(), SLOT( showAgendaView( bool ) ) );
2729 connect( mEventViewerDialog, SIGNAL( todoCompleted(Todo *) ),
2730 this, SLOT( todoChanged(Todo *) ) );
2729 mEventViewerDialog->resize( 640, 480 ); 2731 mEventViewerDialog->resize( 640, 480 );
2730 2732
2731 } 2733 }
2732 return mEventViewerDialog; 2734 return mEventViewerDialog;
2733} 2735}
2734void CalendarView::showEvent(Event *event) 2736void CalendarView::showEvent(Event *event)
2735{ 2737{
2736 getEventViewerDialog()->setEvent(event); 2738 getEventViewerDialog()->setEvent(event);
2737 getEventViewerDialog()->showMe(); 2739 getEventViewerDialog()->showMe();
2738} 2740}
2739 2741
2740void CalendarView::showTodo(Todo *event) 2742void CalendarView::showTodo(Todo *event)
2741{ 2743{
2742 getEventViewerDialog()->setTodo(event); 2744 getEventViewerDialog()->setTodo(event);
2743 getEventViewerDialog()->showMe(); 2745 getEventViewerDialog()->showMe();
2744} 2746}
2745void CalendarView::showJournal( Journal *jour ) 2747void CalendarView::showJournal( Journal *jour )
2746{ 2748{
2747 getEventViewerDialog()->setJournal(jour); 2749 getEventViewerDialog()->setJournal(jour);
2748 getEventViewerDialog()->showMe(); 2750 getEventViewerDialog()->showMe();
2749 2751
2750} 2752}
2751// void CalendarView::todoModified (Todo *event, int changed) 2753// void CalendarView::todoModified (Todo *event, int changed)
2752// { 2754// {
2753// // if (mDialogList.find (event) != mDialogList.end ()) { 2755// // if (mDialogList.find (event) != mDialogList.end ()) {
2754// // kdDebug() << "Todo modified and open" << endl; 2756// // kdDebug() << "Todo modified and open" << endl;
2755// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event]; 2757// // KOTodoEditor* temp = (KOTodoEditor *) mDialogList[event];
2756// // temp->modified (changed); 2758// // temp->modified (changed);
2757 2759
2758// // } 2760// // }
2759 2761
2760// mViewManager->updateView(); 2762// mViewManager->updateView();
2761// } 2763// }
2762 2764
2763void CalendarView::appointment_show() 2765void CalendarView::appointment_show()
2764{ 2766{
2765 Event *anEvent = 0; 2767 Event *anEvent = 0;
2766 2768
2767 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); 2769 Incidence *incidence = mViewManager->currentView()->selectedIncidences().first();
2768 2770
2769 if (mViewManager->currentView()->isEventView()) { 2771 if (mViewManager->currentView()->isEventView()) {
2770 if ( incidence && incidence->type() == "Event" ) { 2772 if ( incidence && incidence->type() == "Event" ) {
2771 anEvent = static_cast<Event *>(incidence); 2773 anEvent = static_cast<Event *>(incidence);
2772 } 2774 }
2773 } 2775 }
2774 2776
2775 if (!anEvent) { 2777 if (!anEvent) {
2776 KNotifyClient::beep(); 2778 KNotifyClient::beep();