summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp19
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
@@ -483,20 +483,24 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
connect(mAgenda->verticalScrollBar(),SIGNAL(valueChanged(int)),
mTimeLabels, SLOT(positionChanged()));
connect(mTimeLabels->verticalScrollBar(),SIGNAL(valueChanged(int)),
SLOT(setContentsPos(int)));
// Create/Show/Edit/Delete Event
connect(mAgenda,SIGNAL(newEventSignal(int,int)),
SLOT(newEvent(int,int)));
+ connect(mAgenda,SIGNAL(newTodoSignal(int,int)),
+ SLOT(newTodo(int,int)));
connect(mAgenda,SIGNAL(newEventSignal(int,int,int,int)),
SLOT(newEvent(int,int,int,int)));
connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int)),
SLOT(newEventAllDay(int,int)));
+ connect(mAllDayAgenda,SIGNAL(newTodoSignal(int,int)),
+ SLOT(newTodoAllDay(int,int)));
connect(mAllDayAgenda,SIGNAL(newEventSignal(int,int,int,int)),
SLOT(newEventAllDay(int,int)));
connect(mAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
SLOT(newTimeSpanSelected(int,int,int,int)));
connect(mAllDayAgenda,SIGNAL(newTimeSpanSignal(int,int,int,int)),
SLOT(newTimeSpanSelectedAllDay(int,int,int,int)));
connect(mAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
connect(mAllDayAgenda,SIGNAL(newStartSelectSignal()),SLOT(updateView()));
@@ -1278,16 +1282,31 @@ void KOAgendaView::newEvent(int gxStart, int gyStart, int gxEnd, int gyEnd)
void KOAgendaView::newEventAllDay(int gx, int )
{
if (!mSelectedDates.count()) return;
QDate day = mSelectedDates[gx];
emit newEventSignal(day);
}
+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 );
+}
void KOAgendaView::updateEventIndicatorTop(int newY)
{
uint i;
for(i=0;i<mMinY.size();++i) {
if (newY >= mMinY.at(i)) mEventIndicatorTop->enableColumn(i,true);
else mEventIndicatorTop->enableColumn(i,false);
}