author | zautrix <zautrix> | 2004-10-16 13:36:11 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-16 13:36:11 (UTC) |
commit | c3325ebbb92a2814fcb622caaf71316cfa0c2908 (patch) (unidiff) | |
tree | b53545c39f84fc6ce694f371509b4a9fe2ddd743 /korganizer | |
parent | 023b3c542a6dd4d1c4b53dba6bb2c68f605a7917 (diff) | |
download | kdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.zip kdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.tar.gz kdepimpi-c3325ebbb92a2814fcb622caaf71316cfa0c2908.tar.bz2 |
made todos reparentable
-rw-r--r-- | korganizer/calendarview.cpp | 16 | ||||
-rw-r--r-- | korganizer/calendarview.h | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 88 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 3 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 2 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 3 |
6 files changed, 109 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index e4a11f5..1f8ad5b 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -374,96 +374,98 @@ void CalendarView::init() | |||
374 | mNavigator, SLOT( selectPrevious() ) ); | 374 | mNavigator, SLOT( selectPrevious() ) ); |
375 | connect( mDateNavigator, SIGNAL( goNext() ), | 375 | connect( mDateNavigator, SIGNAL( goNext() ), |
376 | mNavigator, SLOT( selectNext() ) ); | 376 | mNavigator, SLOT( selectNext() ) ); |
377 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 377 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
378 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 378 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
379 | connect( mNavigatorBar, SIGNAL( monthSelected ( int ) ), | 379 | connect( mNavigatorBar, SIGNAL( monthSelected ( int ) ), |
380 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 380 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
381 | 381 | ||
382 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 382 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
383 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 383 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
384 | 384 | ||
385 | connect( mDateNavigator, SIGNAL( eventDropped( Event * ) ), | 385 | connect( mDateNavigator, SIGNAL( eventDropped( Event * ) ), |
386 | SLOT( eventAdded( Event *) ) ); | 386 | SLOT( eventAdded( Event *) ) ); |
387 | 387 | ||
388 | connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); | 388 | connect(mDateNavigator,SIGNAL(dayPassed(QDate)),SLOT(updateView())); |
389 | 389 | ||
390 | connect( this, SIGNAL( configChanged() ), | 390 | connect( this, SIGNAL( configChanged() ), |
391 | mDateNavigator, SLOT( updateConfig() ) ); | 391 | mDateNavigator, SLOT( updateConfig() ) ); |
392 | 392 | ||
393 | connect( mTodoList, SIGNAL( newTodoSignal() ), | 393 | connect( mTodoList, SIGNAL( newTodoSignal() ), |
394 | SLOT( newTodo() ) ); | 394 | SLOT( newTodo() ) ); |
395 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), | 395 | connect( mTodoList, SIGNAL( newSubTodoSignal( Todo *) ), |
396 | SLOT( newSubTodo( Todo * ) ) ); | 396 | SLOT( newSubTodo( Todo * ) ) ); |
397 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), | 397 | connect( mTodoList, SIGNAL( editTodoSignal( Todo * ) ), |
398 | SLOT( editTodo( Todo * ) ) ); | 398 | SLOT( editTodo( Todo * ) ) ); |
399 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), | 399 | connect( mTodoList, SIGNAL( showTodoSignal( Todo * ) ), |
400 | SLOT( showTodo( Todo *) ) ); | 400 | SLOT( showTodo( Todo *) ) ); |
401 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), | 401 | connect( mTodoList, SIGNAL( deleteTodoSignal( Todo *) ), |
402 | SLOT( deleteTodo( Todo *) ) ); | 402 | SLOT( deleteTodo( Todo *) ) ); |
403 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); | 403 | connect( this, SIGNAL( configChanged()), mTodoList, SLOT( updateConfig() ) ); |
404 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), | 404 | connect( mTodoList, SIGNAL( purgeCompletedSignal() ), |
405 | SLOT( purgeCompleted() ) ); | 405 | SLOT( purgeCompleted() ) ); |
406 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 406 | connect( mTodoList, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
407 | SIGNAL( todoModified( Todo *, int ) ) ); | 407 | SIGNAL( todoModified( Todo *, int ) ) ); |
408 | 408 | ||
409 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), | 409 | connect( mTodoList, SIGNAL( cloneTodoSignal( Incidence * ) ), |
410 | this, SLOT ( cloneIncidence( Incidence * ) ) ); | 410 | this, SLOT ( cloneIncidence( Incidence * ) ) ); |
411 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), | 411 | connect( mTodoList, SIGNAL( cancelTodoSignal( Incidence * ) ), |
412 | this, SLOT (cancelIncidence( Incidence * ) ) ); | 412 | this, SLOT (cancelIncidence( Incidence * ) ) ); |
413 | 413 | ||
414 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), | 414 | connect( mTodoList, SIGNAL( moveTodoSignal( Incidence * ) ), |
415 | this, SLOT ( moveIncidence( Incidence * ) ) ); | 415 | this, SLOT ( moveIncidence( Incidence * ) ) ); |
416 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), | 416 | connect( mTodoList, SIGNAL( beamTodoSignal( Incidence * ) ), |
417 | this, SLOT ( beamIncidence( Incidence * ) ) ); | 417 | this, SLOT ( beamIncidence( Incidence * ) ) ); |
418 | 418 | ||
419 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), | 419 | connect( mTodoList, SIGNAL( unparentTodoSignal( Todo * ) ), |
420 | this, SLOT ( todo_unsub( Todo * ) ) ); | 420 | this, SLOT ( todo_unsub( Todo * ) ) ); |
421 | 421 | ||
422 | connect( mTodoList, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | ||
423 | this, SLOT ( todo_resub( Todo *,Todo * ) ) ); | ||
422 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, | 424 | connect( this, SIGNAL( todoModified( Todo *, int )), mTodoList, |
423 | SLOT( updateTodo( Todo *, int ) ) ); | 425 | SLOT( updateTodo( Todo *, int ) ) ); |
424 | connect( this, SIGNAL( todoModified( Todo *, int )), this, | 426 | connect( this, SIGNAL( todoModified( Todo *, int )), this, |
425 | SLOT( changeTodoDisplay( Todo *, int ) ) ); | 427 | SLOT( changeTodoDisplay( Todo *, int ) ) ); |
426 | 428 | ||
427 | 429 | ||
428 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); | 430 | connect( mFilterView, SIGNAL( filterChanged() ), SLOT( updateFilter() ) ); |
429 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); | 431 | connect( mFilterView, SIGNAL( editFilters() ), SLOT( editFilters() ) ); |
430 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); | 432 | connect( mCalendar, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addAlarm(const QDateTime &, const QString & ) ) ); |
431 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); | 433 | connect( mCalendar, SIGNAL( removeAlarm(const QDateTime &, const QString & ) ), SLOT( removeAlarm(const QDateTime &, const QString & ) ) ); |
432 | 434 | ||
433 | 435 | ||
434 | 436 | ||
435 | 437 | ||
436 | 438 | ||
437 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), | 439 | connect(QApplication::clipboard(),SIGNAL(dataChanged()), |
438 | SLOT(checkClipboard())); | 440 | SLOT(checkClipboard())); |
439 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), | 441 | connect( mTodoList,SIGNAL( incidenceSelected( Incidence * ) ), |
440 | SLOT( processTodoListSelection( Incidence * ) ) ); | 442 | SLOT( processTodoListSelection( Incidence * ) ) ); |
441 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); | 443 | connect(mTodoList,SIGNAL(isModified(bool)),SLOT(setModified(bool))); |
442 | 444 | ||
443 | // kdDebug() << "CalendarView::CalendarView() done" << endl; | 445 | // kdDebug() << "CalendarView::CalendarView() done" << endl; |
444 | 446 | ||
445 | mDateFrame = new QVBox(0,0,WType_Popup); | 447 | mDateFrame = new QVBox(0,0,WType_Popup); |
446 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); | 448 | //mDateFrame->setFrameStyle(QFrame::PopupPanel | QFrame::Raised); |
447 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); | 449 | mDateFrame->setFrameStyle( QFrame::WinPanel |QFrame::Raised ); |
448 | mDateFrame->setLineWidth(3); | 450 | mDateFrame->setLineWidth(3); |
449 | mDateFrame->hide(); | 451 | mDateFrame->hide(); |
450 | mDateFrame->setCaption( i18n( "Pick a date to display")); | 452 | mDateFrame->setCaption( i18n( "Pick a date to display")); |
451 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); | 453 | mDatePicker = new KDatePicker ( mDateFrame , QDate::currentDate() ); |
452 | 454 | ||
453 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); | 455 | connect(mDatePicker,SIGNAL(dateSelected(QDate)),SLOT(slotSelectPickerDate(QDate))); |
454 | 456 | ||
455 | mEventEditor = mDialogManager->getEventEditor(); | 457 | mEventEditor = mDialogManager->getEventEditor(); |
456 | mTodoEditor = mDialogManager->getTodoEditor(); | 458 | mTodoEditor = mDialogManager->getTodoEditor(); |
457 | 459 | ||
458 | mFlagEditDescription = false; | 460 | mFlagEditDescription = false; |
459 | 461 | ||
460 | mSuspendTimer = new QTimer( this ); | 462 | mSuspendTimer = new QTimer( this ); |
461 | mAlarmTimer = new QTimer( this ); | 463 | mAlarmTimer = new QTimer( this ); |
462 | mRecheckAlarmTimer = new QTimer( this ); | 464 | mRecheckAlarmTimer = new QTimer( this ); |
463 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); | 465 | connect( mRecheckAlarmTimer, SIGNAL( timeout () ), SLOT( recheckTimerAlarm() ) ); |
464 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); | 466 | connect( mSuspendTimer, SIGNAL( timeout () ), SLOT( suspendAlarm() ) ); |
465 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); | 467 | connect( mAlarmTimer, SIGNAL( timeout () ), SLOT( timerAlarm() ) ); |
466 | mAlarmDialog = new AlarmDialog( this ); | 468 | mAlarmDialog = new AlarmDialog( this ); |
467 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); | 469 | connect( mAlarmDialog, SIGNAL( addAlarm(const QDateTime &, const QString & ) ), SLOT( addSuspendAlarm(const QDateTime &, const QString & ) ) ); |
468 | mAlarmDialog->setServerNotification( false ); | 470 | mAlarmDialog->setServerNotification( false ); |
469 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); | 471 | mAlarmDialog->setSuspendTime( KOPrefs::instance()->mAlarmSuspendTime ); |
@@ -2701,96 +2703,110 @@ void CalendarView::appointment_show() | |||
2701 | if (!anEvent) { | 2703 | if (!anEvent) { |
2702 | KNotifyClient::beep(); | 2704 | KNotifyClient::beep(); |
2703 | return; | 2705 | return; |
2704 | } | 2706 | } |
2705 | 2707 | ||
2706 | showEvent(anEvent); | 2708 | showEvent(anEvent); |
2707 | } | 2709 | } |
2708 | 2710 | ||
2709 | void CalendarView::appointment_edit() | 2711 | void CalendarView::appointment_edit() |
2710 | { | 2712 | { |
2711 | Event *anEvent = 0; | 2713 | Event *anEvent = 0; |
2712 | 2714 | ||
2713 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2715 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2714 | 2716 | ||
2715 | if (mViewManager->currentView()->isEventView()) { | 2717 | if (mViewManager->currentView()->isEventView()) { |
2716 | if ( incidence && incidence->type() == "Event" ) { | 2718 | if ( incidence && incidence->type() == "Event" ) { |
2717 | anEvent = static_cast<Event *>(incidence); | 2719 | anEvent = static_cast<Event *>(incidence); |
2718 | } | 2720 | } |
2719 | } | 2721 | } |
2720 | 2722 | ||
2721 | if (!anEvent) { | 2723 | if (!anEvent) { |
2722 | KNotifyClient::beep(); | 2724 | KNotifyClient::beep(); |
2723 | return; | 2725 | return; |
2724 | } | 2726 | } |
2725 | 2727 | ||
2726 | editEvent(anEvent); | 2728 | editEvent(anEvent); |
2727 | } | 2729 | } |
2728 | 2730 | ||
2729 | void CalendarView::appointment_delete() | 2731 | void CalendarView::appointment_delete() |
2730 | { | 2732 | { |
2731 | Event *anEvent = 0; | 2733 | Event *anEvent = 0; |
2732 | 2734 | ||
2733 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); | 2735 | Incidence *incidence = mViewManager->currentView()->selectedIncidences().first(); |
2734 | 2736 | ||
2735 | if (mViewManager->currentView()->isEventView()) { | 2737 | if (mViewManager->currentView()->isEventView()) { |
2736 | if ( incidence && incidence->type() == "Event" ) { | 2738 | if ( incidence && incidence->type() == "Event" ) { |
2737 | anEvent = static_cast<Event *>(incidence); | 2739 | anEvent = static_cast<Event *>(incidence); |
2738 | } | 2740 | } |
2739 | } | 2741 | } |
2740 | 2742 | ||
2741 | if (!anEvent) { | 2743 | if (!anEvent) { |
2742 | KNotifyClient::beep(); | 2744 | KNotifyClient::beep(); |
2743 | return; | 2745 | return; |
2744 | } | 2746 | } |
2745 | 2747 | ||
2746 | deleteEvent(anEvent); | 2748 | deleteEvent(anEvent); |
2747 | } | 2749 | } |
2748 | 2750 | ||
2751 | void CalendarView::todo_resub( Todo * parent, Todo * sub ) | ||
2752 | { | ||
2753 | if (!sub) return; | ||
2754 | if (!parent) return; | ||
2755 | if ( sub->relatedTo() ) | ||
2756 | sub->relatedTo()->removeRelation(sub); | ||
2757 | sub->setRelatedTo(parent); | ||
2758 | sub->setRelatedToUid(parent->uid()); | ||
2759 | parent->addRelation(sub); | ||
2760 | sub->updated(); | ||
2761 | parent->updated(); | ||
2762 | setModified(true); | ||
2763 | updateView(); | ||
2764 | } | ||
2749 | void CalendarView::todo_unsub(Todo *anTodo ) | 2765 | void CalendarView::todo_unsub(Todo *anTodo ) |
2750 | { | 2766 | { |
2751 | // Todo *anTodo = selectedTodo(); | 2767 | // Todo *anTodo = selectedTodo(); |
2752 | if (!anTodo) return; | 2768 | if (!anTodo) return; |
2753 | if (!anTodo->relatedTo()) return; | 2769 | if (!anTodo->relatedTo()) return; |
2754 | anTodo->relatedTo()->removeRelation(anTodo); | 2770 | anTodo->relatedTo()->removeRelation(anTodo); |
2755 | anTodo->setRelatedTo(0); | 2771 | anTodo->setRelatedTo(0); |
2756 | anTodo->updated(); | 2772 | anTodo->updated(); |
2757 | anTodo->setRelatedToUid(""); | 2773 | anTodo->setRelatedToUid(""); |
2758 | setModified(true); | 2774 | setModified(true); |
2759 | updateView(); | 2775 | updateView(); |
2760 | } | 2776 | } |
2761 | 2777 | ||
2762 | void CalendarView::deleteTodo(Todo *todo) | 2778 | void CalendarView::deleteTodo(Todo *todo) |
2763 | { | 2779 | { |
2764 | if (!todo) { | 2780 | if (!todo) { |
2765 | KNotifyClient::beep(); | 2781 | KNotifyClient::beep(); |
2766 | return; | 2782 | return; |
2767 | } | 2783 | } |
2768 | if (KOPrefs::instance()->mConfirm) { | 2784 | if (KOPrefs::instance()->mConfirm) { |
2769 | switch (msgItemDelete()) { | 2785 | switch (msgItemDelete()) { |
2770 | case KMessageBox::Continue: // OK | 2786 | case KMessageBox::Continue: // OK |
2771 | if (!todo->relations().isEmpty()) { | 2787 | if (!todo->relations().isEmpty()) { |
2772 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), | 2788 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), |
2773 | i18n("Delete To-Do")); | 2789 | i18n("Delete To-Do")); |
2774 | } else { | 2790 | } else { |
2775 | checkExternalId( todo ); | 2791 | checkExternalId( todo ); |
2776 | calendar()->deleteTodo(todo); | 2792 | calendar()->deleteTodo(todo); |
2777 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 2793 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
2778 | updateView(); | 2794 | updateView(); |
2779 | } | 2795 | } |
2780 | break; | 2796 | break; |
2781 | } // switch | 2797 | } // switch |
2782 | } else { | 2798 | } else { |
2783 | if (!todo->relations().isEmpty()) { | 2799 | if (!todo->relations().isEmpty()) { |
2784 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), | 2800 | KMessageBox::sorry(this,i18n("Cannot delete To-Do\nwhich has children."), |
2785 | i18n("Delete To-Do")); | 2801 | i18n("Delete To-Do")); |
2786 | } else { | 2802 | } else { |
2787 | checkExternalId( todo ); | 2803 | checkExternalId( todo ); |
2788 | mCalendar->deleteTodo(todo); | 2804 | mCalendar->deleteTodo(todo); |
2789 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); | 2805 | changeTodoDisplay( todo,KOGlobals::EVENTDELETED ); |
2790 | updateView(); | 2806 | updateView(); |
2791 | } | 2807 | } |
2792 | } | 2808 | } |
2793 | emit updateSearchDialog(); | 2809 | emit updateSearchDialog(); |
2794 | } | 2810 | } |
2795 | void CalendarView::deleteJournal(Journal *jour) | 2811 | void CalendarView::deleteJournal(Journal *jour) |
2796 | { | 2812 | { |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 660cce7..9f56cc8 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -309,96 +309,97 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
309 | 309 | ||
310 | void updateUnmanagedViews(); | 310 | void updateUnmanagedViews(); |
311 | 311 | ||
312 | /** cut the current appointment to the clipboard */ | 312 | /** cut the current appointment to the clipboard */ |
313 | void edit_cut(); | 313 | void edit_cut(); |
314 | 314 | ||
315 | /** copy the current appointment(s) to the clipboard */ | 315 | /** copy the current appointment(s) to the clipboard */ |
316 | void edit_copy(); | 316 | void edit_copy(); |
317 | 317 | ||
318 | /** paste the current vobject(s) in the clipboard buffer into calendar */ | 318 | /** paste the current vobject(s) in the clipboard buffer into calendar */ |
319 | void edit_paste(); | 319 | void edit_paste(); |
320 | 320 | ||
321 | /** edit viewing and configuration options. */ | 321 | /** edit viewing and configuration options. */ |
322 | void edit_options(); | 322 | void edit_options(); |
323 | /** | 323 | /** |
324 | Functions for printing, previewing a print, and setting up printing | 324 | Functions for printing, previewing a print, and setting up printing |
325 | parameters. | 325 | parameters. |
326 | */ | 326 | */ |
327 | void print(); | 327 | void print(); |
328 | void printSetup(); | 328 | void printSetup(); |
329 | void printPreview(); | 329 | void printPreview(); |
330 | 330 | ||
331 | /** Export as iCalendar file */ | 331 | /** Export as iCalendar file */ |
332 | void exportICalendar(); | 332 | void exportICalendar(); |
333 | 333 | ||
334 | /** Export as vCalendar file */ | 334 | /** Export as vCalendar file */ |
335 | bool exportVCalendar( QString fn); | 335 | bool exportVCalendar( QString fn); |
336 | 336 | ||
337 | /** pop up a dialog to show an existing appointment. */ | 337 | /** pop up a dialog to show an existing appointment. */ |
338 | void appointment_show(); | 338 | void appointment_show(); |
339 | /** | 339 | /** |
340 | * pop up an Appointment Dialog to edit an existing appointment.Get | 340 | * pop up an Appointment Dialog to edit an existing appointment.Get |
341 | * information on the appointment from the list of unique IDs that is | 341 | * information on the appointment from the list of unique IDs that is |
342 | * currently in the View, called currIds. | 342 | * currently in the View, called currIds. |
343 | */ | 343 | */ |
344 | void appointment_edit(); | 344 | void appointment_edit(); |
345 | /** | 345 | /** |
346 | * pop up dialog confirming deletion of currently selected event in the | 346 | * pop up dialog confirming deletion of currently selected event in the |
347 | * View. | 347 | * View. |
348 | */ | 348 | */ |
349 | void appointment_delete(); | 349 | void appointment_delete(); |
350 | 350 | ||
351 | /** mails the currently selected event to a particular user as a vCalendar | 351 | /** mails the currently selected event to a particular user as a vCalendar |
352 | attachment. */ | 352 | attachment. */ |
353 | void action_mail(); | 353 | void action_mail(); |
354 | 354 | ||
355 | /* frees a subtodo from it's relation */ | 355 | /* frees a subtodo from it's relation */ |
356 | void todo_unsub( Todo * ); | 356 | void todo_unsub( Todo * ); |
357 | void todo_resub( Todo * parent, Todo * sub ); | ||
357 | 358 | ||
358 | /** Take ownership of selected event. */ | 359 | /** Take ownership of selected event. */ |
359 | void takeOverEvent(); | 360 | void takeOverEvent(); |
360 | 361 | ||
361 | /** Take ownership of all events in calendar. */ | 362 | /** Take ownership of all events in calendar. */ |
362 | void takeOverCalendar(); | 363 | void takeOverCalendar(); |
363 | 364 | ||
364 | /** query whether or not the calendar is "dirty". */ | 365 | /** query whether or not the calendar is "dirty". */ |
365 | bool isModified(); | 366 | bool isModified(); |
366 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ | 367 | /** set the state of calendar. Modified means "dirty", i.e. needing a save. */ |
367 | void setModified(bool modified=true); | 368 | void setModified(bool modified=true); |
368 | 369 | ||
369 | /** query if the calendar is read-only. */ | 370 | /** query if the calendar is read-only. */ |
370 | bool isReadOnly(); | 371 | bool isReadOnly(); |
371 | /** set state of calendar to read-only */ | 372 | /** set state of calendar to read-only */ |
372 | void setReadOnly(bool readOnly=true); | 373 | void setReadOnly(bool readOnly=true); |
373 | 374 | ||
374 | void eventUpdated(Incidence *); | 375 | void eventUpdated(Incidence *); |
375 | 376 | ||
376 | /* iTIP scheduling actions */ | 377 | /* iTIP scheduling actions */ |
377 | void schedule_publish(Incidence *incidence = 0); | 378 | void schedule_publish(Incidence *incidence = 0); |
378 | void schedule_request(Incidence *incidence = 0); | 379 | void schedule_request(Incidence *incidence = 0); |
379 | void schedule_refresh(Incidence *incidence = 0); | 380 | void schedule_refresh(Incidence *incidence = 0); |
380 | void schedule_cancel(Incidence *incidence = 0); | 381 | void schedule_cancel(Incidence *incidence = 0); |
381 | void schedule_add(Incidence *incidence = 0); | 382 | void schedule_add(Incidence *incidence = 0); |
382 | void schedule_reply(Incidence *incidence = 0); | 383 | void schedule_reply(Incidence *incidence = 0); |
383 | void schedule_counter(Incidence *incidence = 0); | 384 | void schedule_counter(Incidence *incidence = 0); |
384 | void schedule_declinecounter(Incidence *incidence = 0); | 385 | void schedule_declinecounter(Incidence *incidence = 0); |
385 | void schedule_publish_freebusy(int daysToPublish = 30); | 386 | void schedule_publish_freebusy(int daysToPublish = 30); |
386 | 387 | ||
387 | void openAddressbook(); | 388 | void openAddressbook(); |
388 | 389 | ||
389 | void editFilters(); | 390 | void editFilters(); |
390 | void toggleFilerEnabled(); | 391 | void toggleFilerEnabled(); |
391 | QPtrList<CalFilter> filters(); | 392 | QPtrList<CalFilter> filters(); |
392 | void toggleFilter(); | 393 | void toggleFilter(); |
393 | void showFilter(bool visible); | 394 | void showFilter(bool visible); |
394 | void updateFilter(); | 395 | void updateFilter(); |
395 | void filterEdited(); | 396 | void filterEdited(); |
396 | void selectFilter( int ); | 397 | void selectFilter( int ); |
397 | KOFilterView *filterView(); | 398 | KOFilterView *filterView(); |
398 | 399 | ||
399 | void showIntro(); | 400 | void showIntro(); |
400 | 401 | ||
401 | /** Move the curdatepient view date to today */ | 402 | /** Move the curdatepient view date to today */ |
402 | void goToday(); | 403 | void goToday(); |
403 | 404 | ||
404 | /** Move to the next date(s) in the current view */ | 405 | /** Move to the next date(s) in the current view */ |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ca5eadd..a8143a0 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -166,159 +166,162 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
166 | QString text; | 166 | QString text; |
167 | if (QTextDrag::decode(e,text)) { | 167 | if (QTextDrag::decode(e,text)) { |
168 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 168 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
169 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 169 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
170 | kdDebug() << "Dropped : " << text << endl; | 170 | kdDebug() << "Dropped : " << text << endl; |
171 | QStringList emails = QStringList::split(",",text); | 171 | QStringList emails = QStringList::split(",",text); |
172 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { | 172 | for(QStringList::ConstIterator it = emails.begin();it!=emails.end();++it) { |
173 | kdDebug() << " Email: " << (*it) << endl; | 173 | kdDebug() << " Email: " << (*it) << endl; |
174 | int pos = (*it).find("<"); | 174 | int pos = (*it).find("<"); |
175 | QString name = (*it).left(pos); | 175 | QString name = (*it).left(pos); |
176 | QString email = (*it).mid(pos); | 176 | QString email = (*it).mid(pos); |
177 | if (!email.isEmpty() && todoi) { | 177 | if (!email.isEmpty() && todoi) { |
178 | todoi->todo()->addAttendee(new Attendee(name,email)); | 178 | todoi->todo()->addAttendee(new Attendee(name,email)); |
179 | } | 179 | } |
180 | } | 180 | } |
181 | } | 181 | } |
182 | else { | 182 | else { |
183 | kdDebug() << "KOTodoListView::contentsDropEvent(): Todo from drop not decodable" << endl; | 183 | kdDebug() << "KOTodoListView::contentsDropEvent(): Todo from drop not decodable" << endl; |
184 | e->ignore(); | 184 | e->ignore(); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | #endif | 187 | #endif |
188 | } | 188 | } |
189 | 189 | ||
190 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | 190 | void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) |
191 | { | 191 | { |
192 | QListView::contentsMousePressEvent(e); | 192 | QListView::contentsMousePressEvent(e); |
193 | #ifndef KORG_NODND | 193 | #ifndef KORG_NODND |
194 | QPoint p(contentsToViewport(e->pos())); | 194 | QPoint p(contentsToViewport(e->pos())); |
195 | QListViewItem *i = itemAt(p); | 195 | QListViewItem *i = itemAt(p); |
196 | if (i) { | 196 | if (i) { |
197 | // if the user clicked into the root decoration of the item, don't | 197 | // if the user clicked into the root decoration of the item, don't |
198 | // try to start a drag! | 198 | // try to start a drag! |
199 | if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + | 199 | if (p.x() > header()->sectionPos(header()->mapToIndex(0)) + |
200 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + | 200 | treeStepSize() * (i->depth() + (rootIsDecorated() ? 1 : 0)) + |
201 | itemMargin() || | 201 | itemMargin() || |
202 | p.x() < header()->sectionPos(header()->mapToIndex(0))) { | 202 | p.x() < header()->sectionPos(header()->mapToIndex(0))) { |
203 | if (e->button()==Qt::LeftButton) { | 203 | if (e->button()==Qt::LeftButton) { |
204 | mPressPos = e->pos(); | 204 | mPressPos = e->pos(); |
205 | mMousePressed = true; | 205 | mMousePressed = true; |
206 | } | 206 | } |
207 | } | 207 | } |
208 | } | 208 | } |
209 | #endif | 209 | #endif |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 212 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
213 | { | 213 | { |
214 | |||
214 | #ifndef KORG_NODND | 215 | #ifndef KORG_NODND |
215 | // kdDebug() << "KOTodoListView::contentsMouseMoveEvent()" << endl; | 216 | // kdDebug() << "KOTodoListView::contentsMouseMoveEvent()" << endl; |
216 | QListView::contentsMouseMoveEvent(e); | 217 | QListView::contentsMouseMoveEvent(e); |
217 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > | 218 | if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > |
218 | QApplication::startDragDistance()) { | 219 | QApplication::startDragDistance()) { |
219 | mMousePressed = false; | 220 | mMousePressed = false; |
220 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 221 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
221 | if (item) { | 222 | if (item) { |
222 | // kdDebug() << "Start Drag for item " << item->text(0) << endl; | 223 | // kdDebug() << "Start Drag for item " << item->text(0) << endl; |
223 | DndFactory factory( mCalendar ); | 224 | DndFactory factory( mCalendar ); |
224 | ICalDrag *vd = factory.createDragTodo( | 225 | ICalDrag *vd = factory.createDragTodo( |
225 | ((KOTodoViewItem *)item)->todo(),viewport()); | 226 | ((KOTodoViewItem *)item)->todo(),viewport()); |
226 | if (vd->drag()) { | 227 | if (vd->drag()) { |
227 | kdDebug() << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl; | 228 | kdDebug() << "KOTodoListView::contentsMouseMoveEvent(): Delete drag source" << endl; |
228 | } | 229 | } |
229 | /* | 230 | /* |
230 | QString source = fullPath(item); | 231 | QString source = fullPath(item); |
231 | if ( QFile::exists(source) ) { | 232 | if ( QFile::exists(source) ) { |
232 | QUriDrag* ud = new QUriDrag(viewport()); | 233 | QUriDrag* ud = new QUriDrag(viewport()); |
233 | ud->setFilenames( source ); | 234 | ud->setFilenames( source ); |
234 | if ( ud->drag() ) | 235 | if ( ud->drag() ) |
235 | QMessageBox::information( this, "Drag source", | 236 | QMessageBox::information( this, "Drag source", |
236 | QString("Delete ")+source, "Not implemented" ); | 237 | QString("Delete ")+source, "Not implemented" ); |
237 | */ | 238 | */ |
238 | } | 239 | } |
239 | } | 240 | } |
240 | #endif | 241 | #endif |
241 | } | 242 | } |
242 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | 243 | void KOTodoListView::keyPressEvent ( QKeyEvent * e ) |
243 | { | 244 | { |
244 | 245 | ||
245 | QListViewItem* cn; | 246 | QListViewItem* cn; |
246 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { | 247 | if ( e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter ) { |
247 | cn = currentItem(); | 248 | cn = currentItem(); |
248 | if ( cn ) { | 249 | if ( cn ) { |
249 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 250 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
250 | if ( ci ){ | 251 | if ( ci ){ |
251 | if ( e->state() == ShiftButton ) | 252 | if ( e->state() == ShiftButton ) |
252 | ci->setOn( false ); | 253 | ci->setOn( false ); |
253 | else | 254 | else |
254 | ci->setOn( true ); | 255 | ci->setOn( true ); |
255 | cn = cn->nextSibling(); | 256 | cn = cn->nextSibling(); |
256 | if ( cn ) { | 257 | if ( cn ) { |
257 | setCurrentItem ( cn ); | 258 | setCurrentItem ( cn ); |
258 | ensureItemVisible ( cn ); | 259 | ensureItemVisible ( cn ); |
259 | } | 260 | } |
260 | 261 | ||
261 | } | 262 | } |
262 | } | 263 | } |
263 | 264 | ||
264 | return; | 265 | return; |
265 | } | 266 | } |
266 | 267 | ||
267 | // qDebug("KOTodoListView::keyPressEvent "); | 268 | // qDebug("KOTodoListView::keyPressEvent "); |
268 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { | 269 | if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton || mName != "todolistsmall" ) { |
269 | switch ( e->key() ) { | 270 | switch ( e->key() ) { |
270 | case Qt::Key_Down: | 271 | case Qt::Key_Down: |
271 | case Qt::Key_Up: | 272 | case Qt::Key_Up: |
272 | QListView::keyPressEvent ( e ); | 273 | QListView::keyPressEvent ( e ); |
273 | break; | 274 | break; |
274 | case Qt::Key_Left: | 275 | case Qt::Key_Left: |
275 | case Qt::Key_Right: | 276 | case Qt::Key_Right: |
276 | QListView::keyPressEvent ( e ); | 277 | QListView::keyPressEvent ( e ); |
278 | e->accept(); | ||
279 | return; | ||
277 | break; | 280 | break; |
278 | default: | 281 | default: |
279 | e->ignore(); | 282 | e->ignore(); |
280 | break; | 283 | break; |
281 | } | 284 | } |
282 | return; | 285 | return; |
283 | } | 286 | } |
284 | e->ignore(); | 287 | e->ignore(); |
285 | } | 288 | } |
286 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 289 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
287 | { | 290 | { |
288 | QListView::contentsMouseReleaseEvent(e); | 291 | QListView::contentsMouseReleaseEvent(e); |
289 | mMousePressed = false; | 292 | mMousePressed = false; |
290 | } | 293 | } |
291 | 294 | ||
292 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | 295 | void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) |
293 | { | 296 | { |
294 | if (!e) return; | 297 | if (!e) return; |
295 | 298 | ||
296 | QPoint vp = contentsToViewport(e->pos()); | 299 | QPoint vp = contentsToViewport(e->pos()); |
297 | 300 | ||
298 | QListViewItem *item = itemAt(vp); | 301 | QListViewItem *item = itemAt(vp); |
299 | 302 | ||
300 | emit double_Clicked(item); | 303 | emit double_Clicked(item); |
301 | if (!item) return; | 304 | if (!item) return; |
302 | 305 | ||
303 | emit doubleClicked(item,vp,0); | 306 | emit doubleClicked(item,vp,0); |
304 | } | 307 | } |
305 | 308 | ||
306 | ///////////////////////////////////////////////////////////////////////////// | 309 | ///////////////////////////////////////////////////////////////////////////// |
307 | 310 | ||
308 | KOQuickTodo::KOQuickTodo(QWidget *parent) : | 311 | KOQuickTodo::KOQuickTodo(QWidget *parent) : |
309 | QLineEdit(parent) | 312 | QLineEdit(parent) |
310 | { | 313 | { |
311 | setText(i18n("Click to add a new Todo")); | 314 | setText(i18n("Click to add a new Todo")); |
312 | } | 315 | } |
313 | 316 | ||
314 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) | 317 | void KOQuickTodo::focusInEvent(QFocusEvent *ev) |
315 | { | 318 | { |
316 | if ( text()==i18n("Click to add a new Todo") ) | 319 | if ( text()==i18n("Click to add a new Todo") ) |
317 | setText(""); | 320 | setText(""); |
318 | QLineEdit::focusInEvent(ev); | 321 | QLineEdit::focusInEvent(ev); |
319 | } | 322 | } |
320 | 323 | ||
321 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 324 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
322 | { | 325 | { |
323 | setText(i18n("Click to add a new Todo")); | 326 | setText(i18n("Click to add a new Todo")); |
324 | QLineEdit::focusOutEvent(ev); | 327 | QLineEdit::focusOutEvent(ev); |
@@ -369,124 +372,131 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
369 | mTodoListView->setColumnWidthMode(1, QListView::Manual); | 372 | mTodoListView->setColumnWidthMode(1, QListView::Manual); |
370 | mTodoListView->setColumnWidthMode(2, QListView::Manual); | 373 | mTodoListView->setColumnWidthMode(2, QListView::Manual); |
371 | mTodoListView->setColumnWidthMode(3, QListView::Manual); | 374 | mTodoListView->setColumnWidthMode(3, QListView::Manual); |
372 | mTodoListView->setColumnWidthMode(4, QListView::Manual); | 375 | mTodoListView->setColumnWidthMode(4, QListView::Manual); |
373 | mTodoListView->setColumnWidthMode(5, QListView::Manual); | 376 | mTodoListView->setColumnWidthMode(5, QListView::Manual); |
374 | mTodoListView->setColumnAlignment( 2, AlignCenter ); | 377 | mTodoListView->setColumnAlignment( 2, AlignCenter ); |
375 | #if 0 | 378 | #if 0 |
376 | mTodoListView->setColumnWidthMode(6, QListView::Manual); | 379 | mTodoListView->setColumnWidthMode(6, QListView::Manual); |
377 | #endif | 380 | #endif |
378 | 381 | ||
379 | mPriorityPopupMenu = new QPopupMenu(this); | 382 | mPriorityPopupMenu = new QPopupMenu(this); |
380 | for (int i = 1; i <= 5; i++) { | 383 | for (int i = 1; i <= 5; i++) { |
381 | QString label = QString ("%1").arg (i); | 384 | QString label = QString ("%1").arg (i); |
382 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 385 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
383 | } | 386 | } |
384 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 387 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
385 | 388 | ||
386 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 389 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
387 | for (int i = 0; i <= 100; i+=20) { | 390 | for (int i = 0; i <= 100; i+=20) { |
388 | QString label = QString ("%1 %").arg (i); | 391 | QString label = QString ("%1 %").arg (i); |
389 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 392 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
390 | } | 393 | } |
391 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 394 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
392 | 395 | ||
393 | 396 | ||
394 | 397 | ||
395 | mItemPopupMenu = new QPopupMenu(this); | 398 | mItemPopupMenu = new QPopupMenu(this); |
396 | mItemPopupMenu->insertItem(i18n("Show..."), this, | 399 | mItemPopupMenu->insertItem(i18n("Show..."), this, |
397 | SLOT (showTodo())); | 400 | SLOT (showTodo())); |
398 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 401 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
399 | SLOT (editTodo())); | 402 | SLOT (editTodo())); |
400 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 403 | mItemPopupMenu->insertItem( i18n("Delete"), this, |
401 | SLOT (deleteTodo())); | 404 | SLOT (deleteTodo())); |
402 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 405 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
403 | SLOT (cloneTodo())); | 406 | SLOT (cloneTodo())); |
404 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 407 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
405 | SLOT (moveTodo())); | 408 | SLOT (moveTodo())); |
406 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 409 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
407 | SLOT (beamTodo())); | 410 | SLOT (beamTodo())); |
408 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 411 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
409 | SLOT (cancelTodo())); | 412 | SLOT (cancelTodo())); |
410 | mItemPopupMenu->insertSeparator(); | 413 | mItemPopupMenu->insertSeparator(); |
411 | 414 | ||
412 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 415 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
413 | SLOT (newTodo())); | 416 | SLOT (newTodo())); |
414 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 417 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
415 | SLOT (newSubTodo())); | 418 | SLOT (newSubTodo())); |
416 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 419 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
417 | SLOT (unparentTodo())); | 420 | SLOT (unparentTodo()),0,21); |
421 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | ||
422 | SLOT (reparentTodo()),0,22); | ||
418 | mItemPopupMenu->insertSeparator(); | 423 | mItemPopupMenu->insertSeparator(); |
419 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), | 424 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed"), |
420 | this, SLOT( purgeCompleted() ) ); | 425 | this, SLOT( purgeCompleted() ) ); |
421 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 426 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
422 | this, SLOT( toggleCompleted() ),0, 33 ); | 427 | this, SLOT( toggleCompleted() ),0, 33 ); |
423 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 428 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
424 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 429 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
425 | 430 | ||
426 | mPopupMenu = new QPopupMenu(this); | 431 | mPopupMenu = new QPopupMenu(this); |
427 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 432 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
428 | SLOT (newTodo()),0,1); | 433 | SLOT (newTodo()),0,1); |
429 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), | 434 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed"), |
430 | this, SLOT(purgeCompleted()),0,2); | 435 | this, SLOT(purgeCompleted()),0,2); |
431 | mPopupMenu->insertItem(i18n("Show Completed"), | 436 | mPopupMenu->insertItem(i18n("Show Completed"), |
432 | this, SLOT( toggleCompleted() ),0,3 ); | 437 | this, SLOT( toggleCompleted() ),0,3 ); |
433 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 438 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
434 | this, SLOT( toggleQuickTodo() ),0,4 ); | 439 | this, SLOT( toggleQuickTodo() ),0,4 ); |
435 | mDocPrefs = new DocPrefs( name ); | 440 | mDocPrefs = new DocPrefs( name ); |
436 | 441 | ||
437 | mPopupMenu->setCheckable( true ); | 442 | mPopupMenu->setCheckable( true ); |
438 | mItemPopupMenu->setCheckable( true ); | 443 | mItemPopupMenu->setCheckable( true ); |
439 | // Double clicking conflicts with opening/closing the subtree | 444 | // Double clicking conflicts with opening/closing the subtree |
440 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 445 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
441 | SLOT( editItem( QListViewItem *) ) ); | 446 | SLOT( editItem( QListViewItem *) ) ); |
447 | /* | ||
442 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 448 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
443 | const QPoint &,int ) ), | 449 | const QPoint &,int ) ), |
444 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 450 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
451 | */ | ||
452 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | ||
453 | const QPoint &,int ) ), | ||
454 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | ||
445 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 455 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
446 | SLOT( itemClicked( QListViewItem * ) ) ); | 456 | SLOT( itemClicked( QListViewItem * ) ) ); |
447 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 457 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
448 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 458 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
449 | connect( mTodoListView, SIGNAL( todoDropped( Todo * ) ), | 459 | connect( mTodoListView, SIGNAL( todoDropped( Todo * ) ), |
450 | SLOT( updateView() ) ); | 460 | SLOT( updateView() ) ); |
451 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 461 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
452 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 462 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
453 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 463 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |
454 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 464 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
455 | 465 | ||
456 | #if 0 | 466 | #if 0 |
457 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 467 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), |
458 | SLOT(selectionChanged(QListViewItem *))); | 468 | SLOT(selectionChanged(QListViewItem *))); |
459 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 469 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), |
460 | SLOT(selectionChanged(QListViewItem *))); | 470 | SLOT(selectionChanged(QListViewItem *))); |
461 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 471 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), |
462 | SLOT(selectionChanged(QListViewItem *))); | 472 | SLOT(selectionChanged(QListViewItem *))); |
463 | #endif | 473 | #endif |
464 | connect( mTodoListView, SIGNAL(selectionChanged() ), | 474 | connect( mTodoListView, SIGNAL(selectionChanged() ), |
465 | SLOT( processSelectionChange() ) ); | 475 | SLOT( processSelectionChange() ) ); |
466 | connect( mQuickAdd, SIGNAL( returnPressed () ), | 476 | connect( mQuickAdd, SIGNAL( returnPressed () ), |
467 | SLOT( addQuickTodo() ) ); | 477 | SLOT( addQuickTodo() ) ); |
468 | // if ( QApplication::desktop()->width() < 480 ) { | 478 | // if ( QApplication::desktop()->width() < 480 ) { |
469 | // setNarrow(); | 479 | // setNarrow(); |
470 | // mTodoListView->setColumnWidth( 0, 100 ); | 480 | // mTodoListView->setColumnWidth( 0, 100 ); |
471 | 481 | ||
472 | // } | 482 | // } |
473 | 483 | ||
474 | } | 484 | } |
475 | 485 | ||
476 | KOTodoView::~KOTodoView() | 486 | KOTodoView::~KOTodoView() |
477 | { | 487 | { |
478 | delete mDocPrefs; | 488 | delete mDocPrefs; |
479 | } | 489 | } |
480 | 490 | ||
481 | void KOTodoView::jumpToDate () | 491 | void KOTodoView::jumpToDate () |
482 | { | 492 | { |
483 | // if (mActiveItem) { | 493 | // if (mActiveItem) { |
484 | // mActiveItem->todo()); | 494 | // mActiveItem->todo()); |
485 | // if ( mActiveItem->todo()->hasDueDate() ) | 495 | // if ( mActiveItem->todo()->hasDueDate() ) |
486 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 496 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
487 | } | 497 | } |
488 | 498 | ||
489 | void KOTodoView::setNarrow() | 499 | void KOTodoView::setNarrow() |
490 | { | 500 | { |
491 | //mTodoListView->setColumnWidth( 0, 120 ); | 501 | //mTodoListView->setColumnWidth( 0, 120 ); |
492 | mTodoListView->setColumnWidth( 1, 35 ); | 502 | mTodoListView->setColumnWidth( 1, 35 ); |
@@ -650,131 +660,139 @@ QPtrList<Incidence> KOTodoView::selectedIncidences() | |||
650 | } | 660 | } |
651 | 661 | ||
652 | QPtrList<Todo> KOTodoView::selectedTodos() | 662 | QPtrList<Todo> KOTodoView::selectedTodos() |
653 | { | 663 | { |
654 | QPtrList<Todo> selected; | 664 | QPtrList<Todo> selected; |
655 | 665 | ||
656 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 666 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
657 | // if (!item) item = mActiveItem; | 667 | // if (!item) item = mActiveItem; |
658 | if (item) selected.append(item->todo()); | 668 | if (item) selected.append(item->todo()); |
659 | 669 | ||
660 | return selected; | 670 | return selected; |
661 | } | 671 | } |
662 | 672 | ||
663 | void KOTodoView::changeEventDisplay(Event *, int) | 673 | void KOTodoView::changeEventDisplay(Event *, int) |
664 | { | 674 | { |
665 | updateView(); | 675 | updateView(); |
666 | } | 676 | } |
667 | 677 | ||
668 | void KOTodoView::showDates(const QDate &, const QDate &) | 678 | void KOTodoView::showDates(const QDate &, const QDate &) |
669 | { | 679 | { |
670 | } | 680 | } |
671 | 681 | ||
672 | void KOTodoView::showEvents(QPtrList<Event>) | 682 | void KOTodoView::showEvents(QPtrList<Event>) |
673 | { | 683 | { |
674 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 684 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
675 | } | 685 | } |
676 | 686 | ||
677 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 687 | void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
678 | const QDate &td) | 688 | const QDate &td) |
679 | { | 689 | { |
680 | #ifndef KORG_NOPRINTER | 690 | #ifndef KORG_NOPRINTER |
681 | calPrinter->preview(CalPrinter::Todolist, fd, td); | 691 | calPrinter->preview(CalPrinter::Todolist, fd, td); |
682 | #endif | 692 | #endif |
683 | } | 693 | } |
684 | 694 | ||
685 | void KOTodoView::editItem(QListViewItem *item ) | 695 | void KOTodoView::editItem(QListViewItem *item ) |
686 | { | 696 | { |
687 | // qDebug("editItem(QListViewItem *item ) "); | 697 | // qDebug("editItem(QListViewItem *item ) "); |
688 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); | 698 | emit editTodoSignal(((KOTodoViewItem *)item)->todo()); |
689 | } | 699 | } |
690 | 700 | ||
691 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 701 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) |
692 | { | 702 | { |
693 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); | 703 | emit showTodoSignal(((KOTodoViewItem *)item)->todo()); |
694 | } | 704 | } |
695 | 705 | ||
696 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) | 706 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &,int column) |
697 | { | 707 | { |
698 | |||
699 | mActiveItem = (KOTodoViewItem *)item; | 708 | mActiveItem = (KOTodoViewItem *)item; |
700 | if (item) { | 709 | if (item) { |
701 | switch (column){ | 710 | switch (column){ |
702 | case 1: | 711 | case 1: |
703 | mPriorityPopupMenu->popup(QCursor::pos ()); break; | 712 | mPriorityPopupMenu->popup(QCursor::pos ()); break; |
704 | case 2: | 713 | case 2: |
705 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; | 714 | mPercentageCompletedPopupMenu->popup(QCursor::pos ()); break; |
706 | case 3: | 715 | case 3: |
707 | moveTodo(); | 716 | moveTodo(); |
708 | break; | 717 | break; |
709 | case 6: | 718 | case 6: |
710 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; | 719 | getCategoryPopupMenu((KOTodoViewItem *)item)->popup(QCursor::pos ()); break; |
711 | default: | 720 | default: |
712 | mItemPopupMenu->popup(QCursor::pos()); | 721 | mItemPopupMenu->popup(QCursor::pos()); |
713 | } | 722 | } |
714 | } else mPopupMenu->popup(QCursor::pos()); | 723 | } else mPopupMenu->popup(QCursor::pos()); |
715 | } | 724 | } |
716 | void KOTodoView::newTodo() | 725 | void KOTodoView::newTodo() |
717 | { | 726 | { |
718 | emit newTodoSignal(); | 727 | emit newTodoSignal(); |
719 | } | 728 | } |
720 | 729 | ||
721 | void KOTodoView::newSubTodo() | 730 | void KOTodoView::newSubTodo() |
722 | { | 731 | { |
723 | if (mActiveItem) { | 732 | if (mActiveItem) { |
724 | emit newSubTodoSignal(mActiveItem->todo()); | 733 | emit newSubTodoSignal(mActiveItem->todo()); |
725 | } | 734 | } |
726 | } | 735 | } |
727 | void KOTodoView::unparentTodo() | 736 | void KOTodoView::unparentTodo() |
728 | { | 737 | { |
729 | if (mActiveItem) { | 738 | if (mActiveItem) { |
730 | emit unparentTodoSignal(mActiveItem->todo()); | 739 | emit unparentTodoSignal(mActiveItem->todo()); |
731 | } | 740 | } |
732 | } | 741 | } |
742 | |||
743 | void KOTodoView::reparentTodo() | ||
744 | { | ||
745 | if (mActiveItem) { | ||
746 | qDebug("KOTodoView::reparentTodo() "); | ||
747 | topLevelWidget()->setCaption(i18n("Click on new parent item")); | ||
748 | pendingSubtodo = mActiveItem; | ||
749 | } | ||
750 | } | ||
733 | void KOTodoView::editTodo() | 751 | void KOTodoView::editTodo() |
734 | { | 752 | { |
735 | if (mActiveItem) { | 753 | if (mActiveItem) { |
736 | emit editTodoSignal(mActiveItem->todo()); | 754 | emit editTodoSignal(mActiveItem->todo()); |
737 | } | 755 | } |
738 | } | 756 | } |
739 | void KOTodoView::cloneTodo() | 757 | void KOTodoView::cloneTodo() |
740 | { | 758 | { |
741 | if (mActiveItem) { | 759 | if (mActiveItem) { |
742 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); | 760 | emit cloneTodoSignal((Incidence*)mActiveItem->todo()); |
743 | } | 761 | } |
744 | } | 762 | } |
745 | void KOTodoView::cancelTodo() | 763 | void KOTodoView::cancelTodo() |
746 | { | 764 | { |
747 | if (mActiveItem) { | 765 | if (mActiveItem) { |
748 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); | 766 | emit cancelTodoSignal((Incidence*)mActiveItem->todo()); |
749 | } | 767 | } |
750 | } | 768 | } |
751 | void KOTodoView::moveTodo() | 769 | void KOTodoView::moveTodo() |
752 | { | 770 | { |
753 | if (mActiveItem) { | 771 | if (mActiveItem) { |
754 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); | 772 | emit moveTodoSignal((Incidence*)mActiveItem->todo()); |
755 | } | 773 | } |
756 | } | 774 | } |
757 | void KOTodoView::beamTodo() | 775 | void KOTodoView::beamTodo() |
758 | { | 776 | { |
759 | if (mActiveItem) { | 777 | if (mActiveItem) { |
760 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); | 778 | emit beamTodoSignal((Incidence*)mActiveItem->todo()); |
761 | } | 779 | } |
762 | } | 780 | } |
763 | 781 | ||
764 | 782 | ||
765 | void KOTodoView::showTodo() | 783 | void KOTodoView::showTodo() |
766 | { | 784 | { |
767 | if (mActiveItem) { | 785 | if (mActiveItem) { |
768 | emit showTodoSignal(mActiveItem->todo()); | 786 | emit showTodoSignal(mActiveItem->todo()); |
769 | } | 787 | } |
770 | } | 788 | } |
771 | 789 | ||
772 | void KOTodoView::deleteTodo() | 790 | void KOTodoView::deleteTodo() |
773 | { | 791 | { |
774 | if (mActiveItem) { | 792 | if (mActiveItem) { |
775 | if (mActiveItem->childCount()) { | 793 | if (mActiveItem->childCount()) { |
776 | KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."), | 794 | KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."), |
777 | i18n("Delete To-Do")); | 795 | i18n("Delete To-Do")); |
778 | } else { | 796 | } else { |
779 | emit deleteTodoSignal(mActiveItem->todo()); | 797 | emit deleteTodoSignal(mActiveItem->todo()); |
780 | } | 798 | } |
@@ -798,112 +816,142 @@ void KOTodoView::setNewPercentage(int index) | |||
798 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); | 816 | mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); |
799 | } else { | 817 | } else { |
800 | mActiveItem->todo()->setCompleted(false); | 818 | mActiveItem->todo()->setCompleted(false); |
801 | } | 819 | } |
802 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); | 820 | mActiveItem->todo()->setPercentComplete(mPercentage[index]); |
803 | mActiveItem->construct(); | 821 | mActiveItem->construct(); |
804 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); | 822 | todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); |
805 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 823 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
806 | } | 824 | } |
807 | } | 825 | } |
808 | 826 | ||
809 | 827 | ||
810 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) | 828 | QPopupMenu * KOTodoView::getCategoryPopupMenu (KOTodoViewItem *todoItem) |
811 | { | 829 | { |
812 | QPopupMenu* tempMenu = new QPopupMenu (this); | 830 | QPopupMenu* tempMenu = new QPopupMenu (this); |
813 | QStringList checkedCategories = todoItem->todo()->categories (); | 831 | QStringList checkedCategories = todoItem->todo()->categories (); |
814 | 832 | ||
815 | tempMenu->setCheckable (true); | 833 | tempMenu->setCheckable (true); |
816 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); | 834 | for (QStringList::Iterator it = KOPrefs::instance()->mCustomCategories.begin (); |
817 | it != KOPrefs::instance()->mCustomCategories.end (); | 835 | it != KOPrefs::instance()->mCustomCategories.end (); |
818 | ++it) { | 836 | ++it) { |
819 | int index = tempMenu->insertItem (*it); | 837 | int index = tempMenu->insertItem (*it); |
820 | mCategory[index] = *it; | 838 | mCategory[index] = *it; |
821 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); | 839 | if (checkedCategories.find (*it) != checkedCategories.end ()) tempMenu->setItemChecked (index, true); |
822 | } | 840 | } |
823 | 841 | ||
824 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 842 | connect (tempMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
825 | return tempMenu; | 843 | return tempMenu; |
826 | 844 | ||
827 | 845 | ||
828 | } | 846 | } |
829 | void KOTodoView::changedCategories(int index) | 847 | void KOTodoView::changedCategories(int index) |
830 | { | 848 | { |
831 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { | 849 | if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { |
832 | QStringList categories = mActiveItem->todo()->categories (); | 850 | QStringList categories = mActiveItem->todo()->categories (); |
833 | if (categories.find (mCategory[index]) != categories.end ()) | 851 | if (categories.find (mCategory[index]) != categories.end ()) |
834 | categories.remove (mCategory[index]); | 852 | categories.remove (mCategory[index]); |
835 | else | 853 | else |
836 | categories.insert (categories.end(), mCategory[index]); | 854 | categories.insert (categories.end(), mCategory[index]); |
837 | categories.sort (); | 855 | categories.sort (); |
838 | mActiveItem->todo()->setCategories (categories); | 856 | mActiveItem->todo()->setCategories (categories); |
839 | mActiveItem->construct(); | 857 | mActiveItem->construct(); |
840 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); | 858 | mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); |
841 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); | 859 | todoModified (mActiveItem->todo (), KOGlobals::CATEGORY_MODIFIED); |
842 | } | 860 | } |
843 | } | 861 | } |
844 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 862 | void KOTodoView::itemDoubleClicked(QListViewItem *item) |
845 | { | 863 | { |
864 | if ( pendingSubtodo != 0 ) { | ||
865 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | ||
866 | } | ||
867 | pendingSubtodo = 0; | ||
846 | if (!item) { | 868 | if (!item) { |
847 | newTodo(); | 869 | newTodo(); |
848 | return; | 870 | return; |
849 | } | 871 | } |
850 | if ( KOPrefs::instance()->mEditOnDoubleClick ) | 872 | if ( KOPrefs::instance()->mEditOnDoubleClick ) |
851 | editItem( item ); | 873 | editItem( item ); |
852 | else | 874 | else |
853 | showItem( item , QPoint(), 0 ); | 875 | showItem( item , QPoint(), 0 ); |
854 | } | 876 | } |
855 | void KOTodoView::itemClicked(QListViewItem *item) | 877 | void KOTodoView::itemClicked(QListViewItem *item) |
856 | { | 878 | { |
879 | |||
857 | if (!item) { | 880 | if (!item) { |
881 | if ( pendingSubtodo != 0 ) { | ||
882 | topLevelWidget()->setCaption(i18n("Reparenting aborted!")); | ||
883 | } | ||
884 | pendingSubtodo = 0; | ||
858 | return; | 885 | return; |
859 | } | 886 | } |
860 | |||
861 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 887 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
888 | if ( pendingSubtodo != 0 ) { | ||
889 | bool allowReparent = true; | ||
890 | QListViewItem *par = item; | ||
891 | while ( par ) { | ||
892 | if ( par == pendingSubtodo ) { | ||
893 | allowReparent = false; | ||
894 | break; | ||
895 | } | ||
896 | par = par->parent(); | ||
897 | } | ||
898 | if ( !allowReparent ) { | ||
899 | topLevelWidget()->setCaption(i18n("Recursive reparenting not possible!")); | ||
900 | qDebug("Recursive reparenting not possible "); | ||
901 | pendingSubtodo = 0; | ||
902 | } else { | ||
903 | Todo* newParent = todoItem->todo(); | ||
904 | Todo* newSub = pendingSubtodo->todo(); | ||
905 | pendingSubtodo = 0; | ||
906 | emit reparentTodoSignal( newParent,newSub ); | ||
907 | return; | ||
908 | } | ||
909 | } | ||
862 | int completed = todoItem->todo()->isCompleted(); // Completed or not? | 910 | int completed = todoItem->todo()->isCompleted(); // Completed or not? |
863 | 911 | ||
864 | if (todoItem->isOn()) { | 912 | if (todoItem->isOn()) { |
865 | if (!completed) { | 913 | if (!completed) { |
866 | todoItem->todo()->setCompleted(QDateTime::currentDateTime()); | 914 | todoItem->todo()->setCompleted(QDateTime::currentDateTime()); |
867 | } | 915 | } |
868 | } else { | 916 | } else { |
869 | if (completed) { | 917 | if (completed) { |
870 | todoItem->todo()->setCompleted(false); | 918 | todoItem->todo()->setCompleted(false); |
871 | } | 919 | } |
872 | } | 920 | } |
873 | } | 921 | } |
874 | 922 | ||
875 | void KOTodoView::setDocumentId( const QString &id ) | 923 | void KOTodoView::setDocumentId( const QString &id ) |
876 | { | 924 | { |
877 | kdDebug() << "KOTodoView::setDocumentId()" << endl; | 925 | kdDebug() << "KOTodoView::setDocumentId()" << endl; |
878 | 926 | ||
879 | mDocPrefs->setDoc( id ); | 927 | mDocPrefs->setDoc( id ); |
880 | } | 928 | } |
881 | 929 | ||
882 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 930 | void KOTodoView::itemStateChanged( QListViewItem *item ) |
883 | { | 931 | { |
884 | if (!item) return; | 932 | if (!item) return; |
885 | 933 | ||
886 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; | 934 | KOTodoViewItem *todoItem = (KOTodoViewItem *)item; |
887 | 935 | ||
888 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; | 936 | // kdDebug() << "KOTodoView::itemStateChanged(): " << todoItem->todo()->summary() << endl; |
889 | 937 | ||
890 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); | 938 | if( mDocPrefs ) mDocPrefs->writeEntry( todoItem->todo()->uid(), todoItem->isOpen() ); |
891 | } | 939 | } |
892 | 940 | ||
893 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const | 941 | void KOTodoView::saveLayout(KConfig *config, const QString &group) const |
894 | { | 942 | { |
895 | mTodoListView->saveLayout(config,group); | 943 | mTodoListView->saveLayout(config,group); |
896 | } | 944 | } |
897 | 945 | ||
898 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) | 946 | void KOTodoView::restoreLayout(KConfig *config, const QString &group) |
899 | { | 947 | { |
900 | mTodoListView->restoreLayout(config,group); | 948 | mTodoListView->restoreLayout(config,group); |
901 | } | 949 | } |
902 | 950 | ||
903 | void KOTodoView::processSelectionChange() | 951 | void KOTodoView::processSelectionChange() |
904 | { | 952 | { |
905 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; | 953 | // kdDebug() << "KOTodoView::processSelectionChange()" << endl; |
906 | 954 | ||
907 | KOTodoViewItem *item = | 955 | KOTodoViewItem *item = |
908 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); | 956 | static_cast<KOTodoViewItem *>( mTodoListView->selectedItem() ); |
909 | 957 | ||
@@ -929,106 +977,138 @@ void KOTodoView::clearSelection() | |||
929 | 977 | ||
930 | void KOTodoView::purgeCompleted() | 978 | void KOTodoView::purgeCompleted() |
931 | { | 979 | { |
932 | emit purgeCompletedSignal(); | 980 | emit purgeCompletedSignal(); |
933 | } | 981 | } |
934 | void KOTodoView::toggleQuickTodo() | 982 | void KOTodoView::toggleQuickTodo() |
935 | { | 983 | { |
936 | if ( mQuickAdd->isVisible() ) { | 984 | if ( mQuickAdd->isVisible() ) { |
937 | mQuickAdd->hide(); | 985 | mQuickAdd->hide(); |
938 | KOPrefs::instance()->mEnableQuickTodo = false; | 986 | KOPrefs::instance()->mEnableQuickTodo = false; |
939 | } | 987 | } |
940 | else { | 988 | else { |
941 | mQuickAdd->show(); | 989 | mQuickAdd->show(); |
942 | KOPrefs::instance()->mEnableQuickTodo = true; | 990 | KOPrefs::instance()->mEnableQuickTodo = true; |
943 | } | 991 | } |
944 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 992 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
945 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 993 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
946 | } | 994 | } |
947 | void KOTodoView::toggleCompleted() | 995 | void KOTodoView::toggleCompleted() |
948 | { | 996 | { |
949 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; | 997 | KOPrefs::instance()->mShowCompletedTodo = !KOPrefs::instance()->mShowCompletedTodo; |
950 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 998 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
951 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 999 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
952 | updateView(); | 1000 | updateView(); |
953 | } | 1001 | } |
954 | 1002 | ||
955 | void KOTodoView::addQuickTodo() | 1003 | void KOTodoView::addQuickTodo() |
956 | { | 1004 | { |
957 | Todo *todo = new Todo(); | 1005 | Todo *todo = new Todo(); |
958 | todo->setSummary(mQuickAdd->text()); | 1006 | todo->setSummary(mQuickAdd->text()); |
959 | todo->setOrganizer(KOPrefs::instance()->email()); | 1007 | todo->setOrganizer(KOPrefs::instance()->email()); |
960 | CalFilter * cf = mCalendar->filter(); | 1008 | CalFilter * cf = mCalendar->filter(); |
961 | if ( cf ) { | 1009 | if ( cf ) { |
962 | if ( cf->isEnabled()&& cf->showCategories()) { | 1010 | if ( cf->isEnabled()&& cf->showCategories()) { |
963 | todo->setCategories(cf->categoryList()); | 1011 | todo->setCategories(cf->categoryList()); |
964 | } | 1012 | } |
965 | if ( cf->isEnabled() ) | 1013 | if ( cf->isEnabled() ) |
966 | todo->setSecrecy( cf->getSecrecy()); | 1014 | todo->setSecrecy( cf->getSecrecy()); |
967 | } | 1015 | } |
968 | mCalendar->addTodo(todo); | 1016 | mCalendar->addTodo(todo); |
969 | mQuickAdd->setText(""); | 1017 | mQuickAdd->setText(""); |
970 | todoModified (todo, KOGlobals::EVENTADDED ); | 1018 | todoModified (todo, KOGlobals::EVENTADDED ); |
971 | updateView(); | 1019 | updateView(); |
972 | } | 1020 | } |
973 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) | 1021 | void KOTodoView::keyPressEvent ( QKeyEvent * e ) |
974 | { | 1022 | { |
975 | // e->ignore(); | 1023 | // e->ignore(); |
976 | //return; | 1024 | //return; |
1025 | //qDebug("KOTodoView::keyPressEvent "); | ||
977 | switch ( e->key() ) { | 1026 | switch ( e->key() ) { |
978 | case Qt::Key_Down: | 1027 | case Qt::Key_Down: |
979 | case Qt::Key_Up: | 1028 | case Qt::Key_Up: |
980 | QWidget::keyPressEvent ( e ); | 1029 | QWidget::keyPressEvent ( e ); |
981 | break; | 1030 | break; |
982 | 1031 | ||
983 | case Qt::Key_Q: | 1032 | case Qt::Key_Q: |
984 | toggleQuickTodo(); | 1033 | toggleQuickTodo(); |
985 | break; | 1034 | break; |
986 | 1035 | case Qt::Key_U: | |
1036 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1037 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1038 | unparentTodo(); | ||
1039 | e->accept(); | ||
1040 | } else | ||
1041 | e->ignore(); | ||
1042 | break; | ||
1043 | case Qt::Key_S: | ||
1044 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1045 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1046 | reparentTodo(); | ||
1047 | e->accept(); | ||
1048 | } else | ||
1049 | e->ignore(); | ||
1050 | break; | ||
1051 | case Qt::Key_P: | ||
1052 | if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) { | ||
1053 | mActiveItem = (KOTodoViewItem*)mTodoListView->currentItem(); | ||
1054 | if ( pendingSubtodo ) | ||
1055 | itemClicked(mActiveItem); | ||
1056 | e->accept(); | ||
1057 | } else | ||
1058 | e->ignore(); | ||
1059 | break; | ||
1060 | case Qt::Key_Escape: | ||
1061 | if ( pendingSubtodo ) { | ||
1062 | itemClicked(0); | ||
1063 | e->accept(); | ||
1064 | } else | ||
1065 | e->ignore(); | ||
1066 | break; | ||
987 | default: | 1067 | default: |
988 | e->ignore(); | 1068 | e->ignore(); |
989 | } | 1069 | } |
990 | 1070 | ||
991 | if ( true ) { | 1071 | if ( true ) { |
992 | if ( e->key() == Qt::Key_I ) { | 1072 | if ( e->key() == Qt::Key_I ) { |
993 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); | 1073 | KOTodoViewItem*cn = (KOTodoViewItem*)mTodoListView->currentItem(); |
994 | if ( cn ) { | 1074 | if ( cn ) { |
995 | mActiveItem = cn; | 1075 | mActiveItem = cn; |
996 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 1076 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
997 | if ( ci ){ | 1077 | if ( ci ){ |
998 | showTodo(); | 1078 | showTodo(); |
999 | cn = (KOTodoViewItem*)cn->itemBelow(); | 1079 | cn = (KOTodoViewItem*)cn->itemBelow(); |
1000 | if ( cn ) { | 1080 | if ( cn ) { |
1001 | mTodoListView->setCurrentItem ( cn ); | 1081 | mTodoListView->setCurrentItem ( cn ); |
1002 | mTodoListView->ensureItemVisible ( cn ); | 1082 | mTodoListView->ensureItemVisible ( cn ); |
1003 | } | 1083 | } |
1004 | 1084 | ||
1005 | } | 1085 | } |
1006 | } | 1086 | } |
1007 | e->accept(); | 1087 | e->accept(); |
1008 | 1088 | ||
1009 | } | 1089 | } |
1010 | 1090 | ||
1011 | } | 1091 | } |
1012 | 1092 | ||
1013 | } | 1093 | } |
1014 | void KOTodoView::updateTodo( Todo * t, int type ) | 1094 | void KOTodoView::updateTodo( Todo * t, int type ) |
1015 | { | 1095 | { |
1016 | if ( mBlockUpdate) | 1096 | if ( mBlockUpdate) |
1017 | return; | 1097 | return; |
1018 | 1098 | ||
1019 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; | 1099 | QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator; |
1020 | itemIterator = mTodoMap.find(t); | 1100 | itemIterator = mTodoMap.find(t); |
1021 | if (itemIterator != mTodoMap.end()) { | 1101 | if (itemIterator != mTodoMap.end()) { |
1022 | (*itemIterator)->construct(); | 1102 | (*itemIterator)->construct(); |
1023 | } else { | 1103 | } else { |
1024 | if ( type == KOGlobals::EVENTADDED ) { | 1104 | if ( type == KOGlobals::EVENTADDED ) { |
1025 | insertTodoItem( t ); | 1105 | insertTodoItem( t ); |
1026 | } | 1106 | } |
1027 | } | 1107 | } |
1028 | 1108 | ||
1029 | } | 1109 | } |
1030 | 1110 | ||
1031 | void KOTodoView::todoModified(Todo * t , int p ) | 1111 | void KOTodoView::todoModified(Todo * t , int p ) |
1032 | { | 1112 | { |
1033 | mBlockUpdate = true; | 1113 | mBlockUpdate = true; |
1034 | emit todoModifiedSignal ( t, p ); | 1114 | emit todoModifiedSignal ( t, p ); |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 6bf0203..0c08677 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -102,130 +102,133 @@ class KOQuickTodo : public QLineEdit | |||
102 | @short multi-column list view of todo events. | 102 | @short multi-column list view of todo events. |
103 | @author Cornelius Schumacher <schumacher@kde.org> | 103 | @author Cornelius Schumacher <schumacher@kde.org> |
104 | */ | 104 | */ |
105 | class KOTodoView : public KOrg::BaseView | 105 | class KOTodoView : public KOrg::BaseView |
106 | { | 106 | { |
107 | Q_OBJECT | 107 | Q_OBJECT |
108 | public: | 108 | public: |
109 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); | 109 | KOTodoView(Calendar *, QWidget* parent=0, const char* name=0 ); |
110 | ~KOTodoView(); | 110 | ~KOTodoView(); |
111 | 111 | ||
112 | QPtrList<Incidence> selectedIncidences(); | 112 | QPtrList<Incidence> selectedIncidences(); |
113 | QPtrList<Todo> selectedTodos(); | 113 | QPtrList<Todo> selectedTodos(); |
114 | 114 | ||
115 | DateList selectedDates() | 115 | DateList selectedDates() |
116 | {DateList q; | 116 | {DateList q; |
117 | return q;} | 117 | return q;} |
118 | 118 | ||
119 | /** Return number of shown dates. TodoView does not show dates, */ | 119 | /** Return number of shown dates. TodoView does not show dates, */ |
120 | int currentDateCount() { return 0; } | 120 | int currentDateCount() { return 0; } |
121 | void setNarrow(); | 121 | void setNarrow(); |
122 | 122 | ||
123 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); | 123 | void printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td); |
124 | 124 | ||
125 | void setDocumentId( const QString & ); | 125 | void setDocumentId( const QString & ); |
126 | 126 | ||
127 | void saveLayout(KConfig *config, const QString &group) const; | 127 | void saveLayout(KConfig *config, const QString &group) const; |
128 | void restoreLayout(KConfig *config, const QString &group); | 128 | void restoreLayout(KConfig *config, const QString &group); |
129 | /** Create a popup menu to set categories */ | 129 | /** Create a popup menu to set categories */ |
130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); | 130 | QPopupMenu *getCategoryPopupMenu (KOTodoViewItem *todoItem); |
131 | 131 | ||
132 | public slots: | 132 | public slots: |
133 | void updateView(); | 133 | void updateView(); |
134 | void updateConfig(); | 134 | void updateConfig(); |
135 | 135 | ||
136 | void changeEventDisplay(Event *, int); | 136 | void changeEventDisplay(Event *, int); |
137 | 137 | ||
138 | void showDates(const QDate &start, const QDate &end); | 138 | void showDates(const QDate &start, const QDate &end); |
139 | void showEvents(QPtrList<Event> eventList); | 139 | void showEvents(QPtrList<Event> eventList); |
140 | 140 | ||
141 | void clearSelection(); | 141 | void clearSelection(); |
142 | void jumpToDate (); | 142 | void jumpToDate (); |
143 | 143 | ||
144 | void editItem(QListViewItem *item); | 144 | void editItem(QListViewItem *item); |
145 | void showItem(QListViewItem *item,const QPoint &,int); | 145 | void showItem(QListViewItem *item,const QPoint &,int); |
146 | void popupMenu(QListViewItem *item,const QPoint &,int); | 146 | void popupMenu(QListViewItem *item,const QPoint &,int); |
147 | void newTodo(); | 147 | void newTodo(); |
148 | void newSubTodo(); | 148 | void newSubTodo(); |
149 | void unparentTodo(); | 149 | void unparentTodo(); |
150 | void reparentTodo(); | ||
150 | void showTodo(); | 151 | void showTodo(); |
151 | void editTodo(); | 152 | void editTodo(); |
152 | void cloneTodo(); | 153 | void cloneTodo(); |
153 | void cancelTodo(); | 154 | void cancelTodo(); |
154 | void moveTodo(); | 155 | void moveTodo(); |
155 | void beamTodo(); | 156 | void beamTodo(); |
156 | void deleteTodo(); | 157 | void deleteTodo(); |
157 | 158 | ||
158 | void setNewPriority(int); | 159 | void setNewPriority(int); |
159 | void setNewPercentage(int); | 160 | void setNewPercentage(int); |
160 | void changedCategories(int); | 161 | void changedCategories(int); |
161 | 162 | ||
162 | void purgeCompleted(); | 163 | void purgeCompleted(); |
163 | void toggleCompleted(); | 164 | void toggleCompleted(); |
164 | void toggleQuickTodo(); | 165 | void toggleQuickTodo(); |
165 | void updateTodo( Todo *, int ); | 166 | void updateTodo( Todo *, int ); |
166 | 167 | ||
167 | void itemClicked(QListViewItem *); | 168 | void itemClicked(QListViewItem *); |
168 | void itemStateChanged(QListViewItem *); | 169 | void itemStateChanged(QListViewItem *); |
169 | void modified(bool); | 170 | void modified(bool); |
170 | void itemDoubleClicked(QListViewItem *item); | 171 | void itemDoubleClicked(QListViewItem *item); |
171 | 172 | ||
172 | signals: | 173 | signals: |
173 | void newTodoSignal(); | 174 | void newTodoSignal(); |
174 | void newSubTodoSignal(Todo *); | 175 | void newSubTodoSignal(Todo *); |
175 | void unparentTodoSignal(Todo *); | 176 | void unparentTodoSignal(Todo *); |
177 | void reparentTodoSignal( Todo *,Todo * ); | ||
176 | void showTodoSignal(Todo *); | 178 | void showTodoSignal(Todo *); |
177 | 179 | ||
178 | void editTodoSignal(Todo *); | 180 | void editTodoSignal(Todo *); |
179 | void deleteTodoSignal(Todo *); | 181 | void deleteTodoSignal(Todo *); |
180 | void todoModifiedSignal (Todo *, int); | 182 | void todoModifiedSignal (Todo *, int); |
181 | 183 | ||
182 | void isModified(bool); | 184 | void isModified(bool); |
183 | void cloneTodoSignal( Incidence * ); | 185 | void cloneTodoSignal( Incidence * ); |
184 | void cancelTodoSignal( Incidence * ); | 186 | void cancelTodoSignal( Incidence * ); |
185 | void moveTodoSignal( Incidence * ); | 187 | void moveTodoSignal( Incidence * ); |
186 | void beamTodoSignal( Incidence * ); | 188 | void beamTodoSignal( Incidence * ); |
187 | void purgeCompletedSignal(); | 189 | void purgeCompletedSignal(); |
188 | 190 | ||
189 | protected slots: | 191 | protected slots: |
190 | void processSelectionChange(); | 192 | void processSelectionChange(); |
191 | void addQuickTodo(); | 193 | void addQuickTodo(); |
192 | 194 | ||
193 | private: | 195 | private: |
194 | /* | 196 | /* |
195 | * the TodoEditor approach is rather unscaling in the long | 197 | * the TodoEditor approach is rather unscaling in the long |
196 | * run. | 198 | * run. |
197 | * Korganizer keeps it in memory and we need to update | 199 | * Korganizer keeps it in memory and we need to update |
198 | * 1. make KOTodoViewItem a QObject again? | 200 | * 1. make KOTodoViewItem a QObject again? |
199 | * 2. add a public method for setting one todo modified? | 201 | * 2. add a public method for setting one todo modified? |
200 | * 3. add a private method for setting a todo modified + friend here? | 202 | * 3. add a private method for setting a todo modified + friend here? |
201 | * -- zecke 2002-07-08 | 203 | * -- zecke 2002-07-08 |
202 | */ | 204 | */ |
203 | friend class KOTodoViewItem; | 205 | friend class KOTodoViewItem; |
204 | void setTodoModified( Todo* ); | 206 | void setTodoModified( Todo* ); |
205 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 207 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
206 | void restoreItemState( QListViewItem * ); | 208 | void restoreItemState( QListViewItem * ); |
207 | 209 | ||
208 | KOTodoListView *mTodoListView; | 210 | KOTodoListView *mTodoListView; |
209 | QPopupMenu *mItemPopupMenu; | 211 | QPopupMenu *mItemPopupMenu; |
210 | QPopupMenu *mPopupMenu; | 212 | QPopupMenu *mPopupMenu; |
211 | QPopupMenu *mPriorityPopupMenu; | 213 | QPopupMenu *mPriorityPopupMenu; |
212 | QPopupMenu *mPercentageCompletedPopupMenu; | 214 | QPopupMenu *mPercentageCompletedPopupMenu; |
213 | QPopupMenu *mCategoryPopupMenu; | 215 | QPopupMenu *mCategoryPopupMenu; |
214 | 216 | ||
215 | QMap<int, int> mPercentage; | 217 | QMap<int, int> mPercentage; |
216 | QMap<int, int> mPriority; | 218 | QMap<int, int> mPriority; |
217 | QMap<int, QString> mCategory; | 219 | QMap<int, QString> mCategory; |
218 | KOTodoViewItem *mActiveItem; | 220 | KOTodoViewItem *mActiveItem; |
219 | 221 | ||
220 | QMap<Todo *,KOTodoViewItem *> mTodoMap; | 222 | QMap<Todo *,KOTodoViewItem *> mTodoMap; |
221 | QString mName; | 223 | QString mName; |
222 | 224 | ||
223 | DocPrefs *mDocPrefs; | 225 | DocPrefs *mDocPrefs; |
224 | QString mCurrentDoc; | 226 | QString mCurrentDoc; |
225 | KOQuickTodo *mQuickAdd; | 227 | KOQuickTodo *mQuickAdd; |
226 | bool mBlockUpdate; | 228 | bool mBlockUpdate; |
227 | void todoModified(Todo *, int ); | 229 | void todoModified(Todo *, int ); |
228 | void keyPressEvent ( QKeyEvent * ) ; | 230 | void keyPressEvent ( QKeyEvent * ) ; |
231 | KOTodoViewItem * pendingSubtodo; | ||
229 | }; | 232 | }; |
230 | 233 | ||
231 | #endif | 234 | #endif |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 8e6cc53..391f98c 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -453,96 +453,98 @@ void KOViewManager::showMonthView() | |||
453 | // if(mMonthView == mCurrentView) return; | 453 | // if(mMonthView == mCurrentView) return; |
454 | mMainView->dateNavigator()->selectMonth(); | 454 | mMainView->dateNavigator()->selectMonth(); |
455 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); | 455 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); |
456 | //mMonthView->showDates(tmpList.first(), tmpList.last()); | 456 | //mMonthView->showDates(tmpList.first(), tmpList.last()); |
457 | 457 | ||
458 | showView(mMonthView, true ); | 458 | showView(mMonthView, true ); |
459 | 459 | ||
460 | } | 460 | } |
461 | 461 | ||
462 | void KOViewManager::showTodoView() | 462 | void KOViewManager::showTodoView() |
463 | { | 463 | { |
464 | //mFlagShowNextxDays = false; | 464 | //mFlagShowNextxDays = false; |
465 | if ( !mTodoView ) { | 465 | if ( !mTodoView ) { |
466 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 466 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |
467 | "KOViewManager::TodoView" ); | 467 | "KOViewManager::TodoView" ); |
468 | 468 | ||
469 | addView( mTodoView ); | 469 | addView( mTodoView ); |
470 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); | 470 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); |
471 | 471 | ||
472 | // SIGNALS/SLOTS FOR TODO VIEW | 472 | // SIGNALS/SLOTS FOR TODO VIEW |
473 | connect( mTodoView, SIGNAL( newTodoSignal() ), | 473 | connect( mTodoView, SIGNAL( newTodoSignal() ), |
474 | mMainView, SLOT( newTodo() ) ); | 474 | mMainView, SLOT( newTodo() ) ); |
475 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), | 475 | connect( mTodoView, SIGNAL( newSubTodoSignal( Todo * ) ), |
476 | mMainView, SLOT( newSubTodo( Todo *) ) ); | 476 | mMainView, SLOT( newSubTodo( Todo *) ) ); |
477 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), | 477 | connect( mTodoView, SIGNAL( showTodoSignal( Todo *) ), |
478 | mMainView, SLOT( showTodo( Todo * ) ) ); | 478 | mMainView, SLOT( showTodo( Todo * ) ) ); |
479 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), | 479 | connect( mTodoView, SIGNAL( editTodoSignal( Todo * ) ), |
480 | mMainView, SLOT( editTodo( Todo * ) ) ); | 480 | mMainView, SLOT( editTodo( Todo * ) ) ); |
481 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), | 481 | connect( mTodoView, SIGNAL( deleteTodoSignal( Todo * ) ), |
482 | mMainView, SLOT( deleteTodo( Todo * ) ) ); | 482 | mMainView, SLOT( deleteTodo( Todo * ) ) ); |
483 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), | 483 | connect( mTodoView, SIGNAL( purgeCompletedSignal() ), |
484 | mMainView, SLOT( purgeCompleted() ) ); | 484 | mMainView, SLOT( purgeCompleted() ) ); |
485 | 485 | ||
486 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), | 486 | connect( mTodoView, SIGNAL( incidenceSelected( Incidence * ) ), |
487 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 487 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
488 | 488 | ||
489 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, | 489 | connect( mMainView, SIGNAL( configChanged() ), mTodoView, |
490 | SLOT( updateConfig() ) ); | 490 | SLOT( updateConfig() ) ); |
491 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, | 491 | connect( mMainView, SIGNAL( todoModified( Todo *, int )), mTodoView, |
492 | SLOT( updateTodo( Todo *, int ) ) ); | 492 | SLOT( updateTodo( Todo *, int ) ) ); |
493 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), | 493 | connect( mTodoView, SIGNAL( todoModifiedSignal( Todo *, int ) ), |
494 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); | 494 | mMainView, SIGNAL ( todoModified( Todo *, int ) ) ); |
495 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), | 495 | connect( mTodoView, SIGNAL( cloneTodoSignal( Incidence * ) ), |
496 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 496 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
497 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), | 497 | connect( mTodoView, SIGNAL( cancelTodoSignal( Incidence * ) ), |
498 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 498 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
499 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), | 499 | connect( mTodoView, SIGNAL( unparentTodoSignal( Todo * ) ), |
500 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); | 500 | mMainView, SLOT ( todo_unsub( Todo * ) ) ); |
501 | connect( mTodoView, SIGNAL( reparentTodoSignal( Todo *,Todo * ) ), | ||
502 | mMainView, SLOT ( todo_resub( Todo *, Todo *) ) ); | ||
501 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), | 503 | connect( mTodoView, SIGNAL( moveTodoSignal( Incidence * ) ), |
502 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 504 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
503 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), | 505 | connect( mTodoView, SIGNAL( beamTodoSignal( Incidence * ) ), |
504 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 506 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
505 | KConfig *config = KOGlobals::config(); | 507 | KConfig *config = KOGlobals::config(); |
506 | mTodoView->restoreLayout(config,"Todo View"); | 508 | mTodoView->restoreLayout(config,"Todo View"); |
507 | } | 509 | } |
508 | 510 | ||
509 | globalFlagBlockAgenda = 1; | 511 | globalFlagBlockAgenda = 1; |
510 | showView( mTodoView, true ); | 512 | showView( mTodoView, true ); |
511 | 513 | ||
512 | } | 514 | } |
513 | 515 | ||
514 | void KOViewManager::showJournalView() | 516 | void KOViewManager::showJournalView() |
515 | { | 517 | { |
516 | //mFlagShowNextxDays = false; | 518 | //mFlagShowNextxDays = false; |
517 | if (!mJournalView) { | 519 | if (!mJournalView) { |
518 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), | 520 | mJournalView = new KOJournalView(mMainView->calendar(),mMainView->viewStack(), |
519 | "KOViewManager::JournalView"); | 521 | "KOViewManager::JournalView"); |
520 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, | 522 | connect( mMainView, SIGNAL( configChanged() ), mJournalView, |
521 | SLOT( updateConfig() ) ); | 523 | SLOT( updateConfig() ) ); |
522 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); | 524 | connect(mJournalView, SIGNAL(deleteJournal(Journal *) ), mMainView,SLOT(deleteJournal(Journal *)) ); |
523 | addView(mJournalView); | 525 | addView(mJournalView); |
524 | } | 526 | } |
525 | 527 | ||
526 | showView(mJournalView); | 528 | showView(mJournalView); |
527 | } | 529 | } |
528 | 530 | ||
529 | void KOViewManager::showTimeSpanView() | 531 | void KOViewManager::showTimeSpanView() |
530 | { | 532 | { |
531 | //mFlagShowNextxDays = false; | 533 | //mFlagShowNextxDays = false; |
532 | if (!mTimeSpanView) { | 534 | if (!mTimeSpanView) { |
533 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), | 535 | mTimeSpanView = new KOTimeSpanView(mMainView->calendar(),mMainView->viewStack(), |
534 | "KOViewManager::TimeSpanView"); | 536 | "KOViewManager::TimeSpanView"); |
535 | addView(mTimeSpanView); | 537 | addView(mTimeSpanView); |
536 | 538 | ||
537 | mTimeSpanView->readSettings(); | 539 | mTimeSpanView->readSettings(); |
538 | } | 540 | } |
539 | 541 | ||
540 | showView(mTimeSpanView); | 542 | showView(mTimeSpanView); |
541 | } | 543 | } |
542 | 544 | ||
543 | Incidence *KOViewManager::currentSelection() | 545 | Incidence *KOViewManager::currentSelection() |
544 | { | 546 | { |
545 | if (!mCurrentView) return 0; | 547 | if (!mCurrentView) return 0; |
546 | if ( mCurrentView == mListView ) { | 548 | if ( mCurrentView == mListView ) { |
547 | if ( mListView->currentItem() ) | 549 | if ( mListView->currentItem() ) |
548 | return mListView->currentItem(); | 550 | return mListView->currentItem(); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8daacc7..06470b8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -1102,96 +1102,99 @@ void MainWindow::whatsNew() | |||
1102 | } | 1102 | } |
1103 | void MainWindow::licence() | 1103 | void MainWindow::licence() |
1104 | { | 1104 | { |
1105 | KApplication::showLicence(); | 1105 | KApplication::showLicence(); |
1106 | 1106 | ||
1107 | } | 1107 | } |
1108 | void MainWindow::about() | 1108 | void MainWindow::about() |
1109 | { | 1109 | { |
1110 | QString version; | 1110 | QString version; |
1111 | #include <../version> | 1111 | #include <../version> |
1112 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), | 1112 | QMessageBox::about( this, i18n("About KOrganizer/Pi"), |
1113 | i18n("KOrganizer/Platform-independent\n") + | 1113 | i18n("KOrganizer/Platform-independent\n") + |
1114 | "(KO/Pi) " + version + " - " + | 1114 | "(KO/Pi) " + version + " - " + |
1115 | 1115 | ||
1116 | #ifdef DESKTOP_VERSION | 1116 | #ifdef DESKTOP_VERSION |
1117 | i18n("Desktop Edition\n") + | 1117 | i18n("Desktop Edition\n") + |
1118 | #else | 1118 | #else |
1119 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + | 1119 | i18n("PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n") + |
1120 | #endif | 1120 | #endif |
1121 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); | 1121 | i18n("(c) 2004 Lutz Rogowski\nEmail:lutz@pi-sync.net\nKO/Pi is based on KOrganizer\n(c) 2002,2003 Cornelius Schumacher\nEmail: schumacher@kde.org\nKOrganizer/Pi is licensed\nunder the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.korganizer.org\nwww.pi-sync.net\n") ); |
1122 | } | 1122 | } |
1123 | void MainWindow::keyBindings() | 1123 | void MainWindow::keyBindings() |
1124 | { | 1124 | { |
1125 | QString cap = i18n("Key bindings KOrganizer/Pi"); | 1125 | QString cap = i18n("Key bindings KOrganizer/Pi"); |
1126 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + | 1126 | QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + |
1127 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ | 1127 | i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ |
1128 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + | 1128 | i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + |
1129 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ | 1129 | i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ |
1130 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ | 1130 | i18n("<p><b>F</b>: Toggle filterview |<b>F+ctrl</b>: Edit filter </p>\n")+ |
1131 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ | 1131 | i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ |
1132 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ | 1132 | i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ |
1133 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ | 1133 | i18n("<p><b>N</b>: Next days view| <b>W</b>: What's next view\n ")+ |
1134 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ | 1134 | i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ |
1135 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ | 1135 | i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ |
1136 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ | 1136 | i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ |
1137 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ | 1137 | i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ |
1138 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ | 1138 | i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ |
1139 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ | 1139 | i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X</b>: Toggle datenavigator</p>\n")+ |
1140 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ | 1140 | i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ |
1141 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ | 1141 | i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ |
1142 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ | 1142 | i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ |
1143 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ | 1143 | i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ |
1144 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ | 1144 | i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ |
1145 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ | 1145 | i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ |
1146 | i18n("<p><h3>In agenda view:</h3></p>\n") + | 1146 | i18n("<p><h3>In agenda view:</h3></p>\n") + |
1147 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ | 1147 | i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ |
1148 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ | 1148 | i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ |
1149 | i18n("<p><h3>In todo view:</h3></p>\n") + | 1149 | i18n("<p><h3>In todo view:</h3></p>\n") + |
1150 | i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ | ||
1151 | i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ | ||
1152 | i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ | ||
1150 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ | 1153 | i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ |
1151 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1154 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1152 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ | 1155 | i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ |
1153 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ | 1156 | i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ |
1154 | i18n("<p><h3>In list view:</h3></p>\n") + | 1157 | i18n("<p><h3>In list view:</h3></p>\n") + |
1155 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ | 1158 | i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ |
1156 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ | 1159 | i18n("<p><b>return</b>: Select item+one step down</p>\n")+ |
1157 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ | 1160 | i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ |
1158 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ | 1161 | i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ |
1159 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ | 1162 | i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ |
1160 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ | 1163 | i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ |
1161 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + | 1164 | i18n("<p><h3>In event/todo viewer:</h3></p>\n") + |
1162 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ | 1165 | i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ |
1163 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ | 1166 | i18n("<p><b>A</b>: Show agenda view.</p>\n")+ |
1164 | i18n("<p><b>E</b>: Edit item</p>\n") + | 1167 | i18n("<p><b>E</b>: Edit item</p>\n") + |
1165 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + | 1168 | i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + |
1166 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + | 1169 | i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + |
1167 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ | 1170 | i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ |
1168 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ | 1171 | i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ |
1169 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ | 1172 | i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ |
1170 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ | 1173 | i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ |
1171 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ | 1174 | i18n("<p><b>Black</b>: Event/todo with attendees. You are the organizer!</p>\n")+ |
1172 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + | 1175 | i18n("<p><b>Dark yellow</b>: Event/todo with attendees.</p>\n") + |
1173 | i18n("<p><b>White</b>: Item readonly</p>\n"); | 1176 | i18n("<p><b>White</b>: Item readonly</p>\n"); |
1174 | displayText( text, cap); | 1177 | displayText( text, cap); |
1175 | 1178 | ||
1176 | } | 1179 | } |
1177 | void MainWindow::aboutAutoSaving() | 1180 | void MainWindow::aboutAutoSaving() |
1178 | { | 1181 | { |
1179 | QMessageBox* msg; | 1182 | QMessageBox* msg; |
1180 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), | 1183 | msg = new QMessageBox( i18n("Auto Saving in KOrganizer/Pi"), |
1181 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, | 1184 | i18n("After changing something, the data is\nautomatically saved to the file\n~/kdepim/apps/korganizer/mycalendar.ics\nafter (configureable) three minutes.\nFor safety reasons there is one autosaving\nafter 10 minutes (of idle time) again. The \ndata is saved automatically when closing KO/Pi\nYou can create a backup file \nwith: File - Save Calendar Backup\n"), QMessageBox::NoIcon, |
1182 | QMessageBox::Ok, | 1185 | QMessageBox::Ok, |
1183 | QMessageBox::NoButton, | 1186 | QMessageBox::NoButton, |
1184 | QMessageBox::NoButton); | 1187 | QMessageBox::NoButton); |
1185 | msg->exec(); | 1188 | msg->exec(); |
1186 | delete msg; | 1189 | delete msg; |
1187 | 1190 | ||
1188 | 1191 | ||
1189 | } | 1192 | } |
1190 | void MainWindow::aboutKnownBugs() | 1193 | void MainWindow::aboutKnownBugs() |
1191 | { | 1194 | { |
1192 | QMessageBox* msg; | 1195 | QMessageBox* msg; |
1193 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), | 1196 | msg = new QMessageBox( i18n("Known Problems in KOrganizer/Pi"), |
1194 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ | 1197 | i18n("1) Importing *.vcs or *.ics files from\nother applications may not work properly,\nif there are events with properties\nKO/Pi does not support.\n")+ |
1195 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ | 1198 | i18n("2) Audio alarm daemon\nfor Zaurus is available!\nas an additional small application\n")+ |
1196 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + | 1199 | i18n("\nPlease report unexpected behaviour to\nlutz@pi-sync.net\n") + |
1197 | i18n("\nor report them in the bugtracker on\n") + | 1200 | i18n("\nor report them in the bugtracker on\n") + |