summaryrefslogtreecommitdiffabout
path: root/korganizer/calendarview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/calendarview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 257a4dd..035d630 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2645,9 +2645,12 @@ void CalendarView::newEvent(QDate dt)
{
newEvent(QDateTime(dt, QTime(0,0,0)),
QDateTime(dt, QTime(0,0,0)), true);
}
-
+void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint)
+{
+ newEvent(fromHint, toHint, false);
+}
void CalendarView::newEvent(QDateTime fromHint, QDateTime toHint, bool allDay)
{
showEventEditor();
@@ -2683,14 +2686,13 @@ void CalendarView::todoDeleted()
updateTodoViews();
}
-
-void CalendarView::newTodo()
+void CalendarView::newTodoDateTime( QDateTime dt, bool allday )
{
-
+ qDebug("datetime ");
showTodoEditor();
- mTodoEditor->newTodo(QDateTime::currentDateTime().addDays(7),0,true);
+ mTodoEditor->newTodo(dt,0,allday);
if ( mFilterView->filtersEnabled() ) {
CalFilter *filter = mFilterView->selectedFilter();
if (filter && filter->showCategories()) {
mTodoEditor->setCategories(filter->categoryList().join(",") );
@@ -2699,8 +2701,13 @@ void CalendarView::newTodo()
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
}
+void CalendarView::newTodo()
+{
+ newTodoDateTime( QDateTime(),true );
+}
+
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );