summaryrefslogtreecommitdiffabout
path: root/korganizer/kotodoview.cpp
authorzautrix <zautrix>2005-01-22 10:18:16 (UTC)
committer zautrix <zautrix>2005-01-22 10:18:16 (UTC)
commit6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452 (patch) (unidiff)
tree006248579ca44ad2e0c1a67db55b1a8013180ed7 /korganizer/kotodoview.cpp
parentb715b109b70b8cd24a2d9da1d4863c44d79fb2a4 (diff)
downloadkdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.zip
kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.gz
kdepimpi-6946f6ab0ee6eeafee0c8ff5d33fffc0826c7452.tar.bz2
some small fixes
Diffstat (limited to 'korganizer/kotodoview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kotodoview.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp
index 97b4a03..30adb06 100644
--- a/korganizer/kotodoview.cpp
+++ b/korganizer/kotodoview.cpp
@@ -797,54 +797,49 @@ void KOTodoView::cancelTodo()
797void KOTodoView::moveTodo() 797void KOTodoView::moveTodo()
798{ 798{
799 if (mActiveItem) { 799 if (mActiveItem) {
800 emit moveTodoSignal((Incidence*)mActiveItem->todo()); 800 emit moveTodoSignal((Incidence*)mActiveItem->todo());
801 } 801 }
802} 802}
803void KOTodoView::beamTodo() 803void KOTodoView::beamTodo()
804{ 804{
805 if (mActiveItem) { 805 if (mActiveItem) {
806 emit beamTodoSignal((Incidence*)mActiveItem->todo()); 806 emit beamTodoSignal((Incidence*)mActiveItem->todo());
807 } 807 }
808} 808}
809 809
810 810
811void KOTodoView::showTodo() 811void KOTodoView::showTodo()
812{ 812{
813 if (mActiveItem) { 813 if (mActiveItem) {
814 emit showTodoSignal(mActiveItem->todo()); 814 emit showTodoSignal(mActiveItem->todo());
815 } 815 }
816} 816}
817 817
818void KOTodoView::deleteTodo() 818void KOTodoView::deleteTodo()
819{ 819{
820 if (mActiveItem) { 820 if (mActiveItem) {
821 if (mActiveItem->childCount()) {
822 KMessageBox::sorry(this,i18n("Cannot delete To-Do which has children."),
823 i18n("Delete To-Do"));
824 } else {
825 emit deleteTodoSignal(mActiveItem->todo()); 821 emit deleteTodoSignal(mActiveItem->todo());
826 }
827 } 822 }
828} 823}
829 824
830void KOTodoView::setNewPriority(int index) 825void KOTodoView::setNewPriority(int index)
831{ 826{
832 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 827 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
833 mActiveItem->todo()->setPriority(mPriority[index]); 828 mActiveItem->todo()->setPriority(mPriority[index]);
834 mActiveItem->construct(); 829 mActiveItem->construct();
835 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED); 830 todoModified (mActiveItem->todo(), KOGlobals::PRIORITY_MODIFIED);
836 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 ); 831 mActiveItem->todo()->setRevision( mActiveItem->todo()->revision()+1 );
837 } 832 }
838} 833}
839 834
840void KOTodoView::setNewPercentage(int index) 835void KOTodoView::setNewPercentage(int index)
841{ 836{
842 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) { 837 if (mActiveItem && !mActiveItem->todo()->isReadOnly ()) {
843 if (mPercentage[index] == 100) { 838 if (mPercentage[index] == 100) {
844 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime()); 839 mActiveItem->todo()->setCompleted(QDateTime::currentDateTime());
845 } else { 840 } else {
846 mActiveItem->todo()->setCompleted(false); 841 mActiveItem->todo()->setCompleted(false);
847 } 842 }
848 mActiveItem->todo()->setPercentComplete(mPercentage[index]); 843 mActiveItem->todo()->setPercentComplete(mPercentage[index]);
849 mActiveItem->construct(); 844 mActiveItem->construct();
850 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED); 845 todoModified (mActiveItem->todo (), KOGlobals::COMPLETION_MODIFIED);