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
@@ -2643,13 +2643,16 @@ void CalendarView::newEvent(QDateTime fh)
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();
mEventEditor->newEvent(fromHint,toHint,allDay);
if ( mFilterView->filtersEnabled() ) {
@@ -2681,28 +2684,32 @@ void CalendarView::todoDeleted()
{
//qDebug(" 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(",") );
}
if ( filter )
mTodoEditor->setSecrecy( filter->getSecrecy() );
}
}
+void CalendarView::newTodo()
+{
+ newTodoDateTime( QDateTime(),true );
+}
+
void CalendarView::newSubTodo()
{
Todo *todo = selectedTodo();
if ( todo ) newSubTodo( todo );
}