-rw-r--r-- | korganizer/koagendaview.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index f54f7bc..60ae41f 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp @@ -490,2 +490,4 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : SLOT(newEvent(int,int))); + connect(mAgenda,SIGNAL(newTodoSignal(int,int)), + SLOT(newTodo(int,int))); connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)), @@ -494,2 +496,4 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : SLOT(newEventAllDay(int,int))); + connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)), + SLOT(newTodoAllDay(int,int))); connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)), @@ -1285,2 +1289,17 @@ void KOAgendaView::newEventAllDay(int gx, int ) } +void KOAgendaView::newTodoAllDay(int gx, int ) +{ + if (!mSelectedDates.count()) return; + + QDateTime day (mSelectedDates[gx] ); + emit newTodoSignal(day, true); +} +void KOAgendaView::newTodo(int gx, int gy ) +{ + if (!mSelectedDates.count()) return; + QDate dayStart = mSelectedDates[gx]; + QTime timeStart = mAgenda->gyToTime(gy); + QDateTime dt (dayStart,timeStart); + emit newTodoSignal( dt, false ); +} |