author | zautrix <zautrix> | 2005-07-03 16:29:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-07-03 16:29:54 (UTC) |
commit | fede36a3c30dd88b7a41bd0eb2f87414bb574e6e (patch) (unidiff) | |
tree | 5b46ad7cef0ea61022edff382326ef7fb46a5215 | |
parent | 9be5bd1c7e9ee829dd73f5b4a36a2f4331edf68e (diff) | |
download | kdepimpi-fede36a3c30dd88b7a41bd0eb2f87414bb574e6e.zip kdepimpi-fede36a3c30dd88b7a41bd0eb2f87414bb574e6e.tar.gz kdepimpi-fede36a3c30dd88b7a41bd0eb2f87414bb574e6e.tar.bz2 |
ggg
-rw-r--r-- | korganizer/kotodoview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 4f42c83..86e1bd9 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -492,193 +492,193 @@ void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | |||
492 | QLineEdit::focusOutEvent(ev); | 492 | QLineEdit::focusOutEvent(ev); |
493 | } | 493 | } |
494 | 494 | ||
495 | ///////////////////////////////////////////////////////////////////////////// | 495 | ///////////////////////////////////////////////////////////////////////////// |
496 | 496 | ||
497 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 497 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
498 | KOrg::BaseView(calendar,parent,name) | 498 | KOrg::BaseView(calendar,parent,name) |
499 | { | 499 | { |
500 | mCategoryPopupMenu = 0; | 500 | mCategoryPopupMenu = 0; |
501 | mPendingUpdateBeforeRepaint = false; | 501 | mPendingUpdateBeforeRepaint = false; |
502 | isFlatDisplay = false; | 502 | isFlatDisplay = false; |
503 | mNavigator = 0; | 503 | mNavigator = 0; |
504 | QBoxLayout *topLayout = new QVBoxLayout(this); | 504 | QBoxLayout *topLayout = new QVBoxLayout(this); |
505 | mName = QString ( name ); | 505 | mName = QString ( name ); |
506 | mBlockUpdate = false; | 506 | mBlockUpdate = false; |
507 | mQuickAdd = new KOQuickTodo(this); | 507 | mQuickAdd = new KOQuickTodo(this); |
508 | topLayout->addWidget(mQuickAdd); | 508 | topLayout->addWidget(mQuickAdd); |
509 | 509 | ||
510 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 510 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
511 | 511 | ||
512 | mTodoListView = new KOTodoListView(calendar,this, name ); | 512 | mTodoListView = new KOTodoListView(calendar,this, name ); |
513 | topLayout->addWidget(mTodoListView); | 513 | topLayout->addWidget(mTodoListView); |
514 | //mTodoListView->header()->setMaximumHeight(30); | 514 | //mTodoListView->header()->setMaximumHeight(30); |
515 | mTodoListView->setRootIsDecorated(true); | 515 | mTodoListView->setRootIsDecorated(true); |
516 | mTodoListView->setAllColumnsShowFocus(true); | 516 | mTodoListView->setAllColumnsShowFocus(true); |
517 | 517 | ||
518 | mTodoListView->setShowSortIndicator(true); | 518 | mTodoListView->setShowSortIndicator(true); |
519 | 519 | ||
520 | mTodoListView->addColumn(i18n("Todo")); | 520 | mTodoListView->addColumn(i18n("Todo")); |
521 | mTodoListView->addColumn(i18n("Prio")); | 521 | mTodoListView->addColumn(i18n("Prio")); |
522 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 522 | mTodoListView->setColumnAlignment(1,AlignHCenter); |
523 | mTodoListView->addColumn(i18n("Complete")); | 523 | mTodoListView->addColumn(i18n("Complete")); |
524 | mTodoListView->setColumnAlignment(2,AlignCenter); | 524 | mTodoListView->setColumnAlignment(2,AlignCenter); |
525 | 525 | ||
526 | mTodoListView->addColumn(i18n("Due Date")); | 526 | mTodoListView->addColumn(i18n("Due Date")); |
527 | mTodoListView->setColumnAlignment(3,AlignLeft); | 527 | mTodoListView->setColumnAlignment(3,AlignLeft); |
528 | mTodoListView->addColumn(i18n("Due Time")); | 528 | mTodoListView->addColumn(i18n("Due Time")); |
529 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 529 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
530 | 530 | ||
531 | mTodoListView->addColumn(i18n("Start Date")); | 531 | mTodoListView->addColumn(i18n("Start Date")); |
532 | mTodoListView->setColumnAlignment(5,AlignLeft); | 532 | mTodoListView->setColumnAlignment(5,AlignLeft); |
533 | mTodoListView->addColumn(i18n("Start Time")); | 533 | mTodoListView->addColumn(i18n("Start Time")); |
534 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 534 | mTodoListView->setColumnAlignment(6,AlignHCenter); |
535 | 535 | ||
536 | mTodoListView->addColumn(i18n("Cancelled")); | 536 | mTodoListView->addColumn(i18n("Cancelled")); |
537 | mTodoListView->addColumn(i18n("Categories")); | 537 | mTodoListView->addColumn(i18n("Categories")); |
538 | mTodoListView->addColumn(i18n("Calendar")); | 538 | mTodoListView->addColumn(i18n("Calendar")); |
539 | #if 0 | 539 | #if 0 |
540 | mTodoListView->addColumn(i18n("Sort Id")); | 540 | mTodoListView->addColumn(i18n("Sort Id")); |
541 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 541 | mTodoListView->setColumnAlignment(4,AlignHCenter); |
542 | #endif | 542 | #endif |
543 | 543 | ||
544 | mTodoListView->setMinimumHeight( 60 ); | 544 | mTodoListView->setMinimumHeight( 60 ); |
545 | mTodoListView->setItemsRenameable( true ); | 545 | mTodoListView->setItemsRenameable( true ); |
546 | mTodoListView->setRenameable( 0 ); | 546 | mTodoListView->setRenameable( 0 ); |
547 | mTodoListView->setColumnWidth( 0, 120 ); | 547 | mTodoListView->setColumnWidth( 0, 120 ); |
548 | int iii = 0; | 548 | int iii = 0; |
549 | for ( iii = 0; iii< 10 ; ++iii ) | 549 | for ( iii = 0; iii< 10 ; ++iii ) |
550 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); | 550 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); |
551 | 551 | ||
552 | 552 | ||
553 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 553 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
554 | 554 | ||
555 | mPriorityPopupMenu = new QPopupMenu(this); | 555 | mPriorityPopupMenu = new QPopupMenu(this); |
556 | for (int i = 1; i <= 5; i++) { | 556 | for (int i = 1; i <= 5; i++) { |
557 | QString label = QString ("%1").arg (i); | 557 | QString label = QString ("%1").arg (i); |
558 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; | 558 | mPriority[mPriorityPopupMenu->insertItem (label)] = i; |
559 | } | 559 | } |
560 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 560 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
561 | 561 | ||
562 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 562 | mPercentageCompletedPopupMenu = new QPopupMenu(this); |
563 | for (int i = 0; i <= 100; i+=20) { | 563 | for (int i = 0; i <= 100; i+=20) { |
564 | QString label = QString ("%1 %").arg (i); | 564 | QString label = QString ("%1 %").arg (i); |
565 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; | 565 | mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; |
566 | } | 566 | } |
567 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); | 567 | connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); |
568 | 568 | ||
569 | 569 | ||
570 | mCategoryPopupMenu = new QPopupMenu (this); | 570 | mCategoryPopupMenu = new QPopupMenu (this); |
571 | mCategoryPopupMenu->setCheckable (true); | 571 | mCategoryPopupMenu->setCheckable (true); |
572 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 572 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
573 | connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); | 573 | connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); |
574 | 574 | ||
575 | mCalPopupMenu = new QPopupMenu (this); | 575 | mCalPopupMenu = new QPopupMenu (this); |
576 | mCalPopupMenu->setCheckable (true); | 576 | mCalPopupMenu->setCheckable (true); |
577 | connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); | 577 | connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); |
578 | connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); | 578 | connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); |
579 | 579 | ||
580 | 580 | ||
581 | 581 | ||
582 | 582 | ||
583 | mItemPopupMenu = new QPopupMenu(this); | 583 | mItemPopupMenu = new QPopupMenu(this); |
584 | mItemPopupMenu->insertItem(i18n("Show"), this, | 584 | mItemPopupMenu->insertItem(i18n("Show"), this, |
585 | SLOT (showTodo())); | 585 | SLOT (showTodo())); |
586 | mItemPopupMenu->insertItem(i18n("Edit..."), this, | 586 | mItemPopupMenu->insertItem(i18n("Edit..."), this, |
587 | SLOT (editTodo())); | 587 | SLOT (editTodo())); |
588 | mItemPopupMenu->insertItem( i18n("Delete"), this, | 588 | mItemPopupMenu->insertItem( i18n("Delete..."), this, |
589 | SLOT (deleteTodo())); | 589 | SLOT (deleteTodo())); |
590 | mItemPopupMenu->insertItem( i18n("Clone..."), this, | 590 | mItemPopupMenu->insertItem( i18n("Clone..."), this, |
591 | SLOT (cloneTodo())); | 591 | SLOT (cloneTodo())); |
592 | mItemPopupMenu->insertItem( i18n("Move..."), this, | 592 | mItemPopupMenu->insertItem( i18n("Move..."), this, |
593 | SLOT (moveTodo())); | 593 | SLOT (moveTodo())); |
594 | #ifndef DESKTOP_VERSION | 594 | #ifndef DESKTOP_VERSION |
595 | mItemPopupMenu->insertItem( i18n("Beam..."), this, | 595 | mItemPopupMenu->insertItem( i18n("Beam..."), this, |
596 | SLOT (beamTodo())); | 596 | SLOT (beamTodo())); |
597 | #endif | 597 | #endif |
598 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, | 598 | mItemPopupMenu->insertItem( i18n("Toggle Cancel"), this, |
599 | SLOT (cancelTodo())); | 599 | SLOT (cancelTodo())); |
600 | mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu); | 600 | mItemPopupMenu->insertItem( i18n("Categories"), mCategoryPopupMenu); |
601 | mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu); | 601 | mItemPopupMenu->insertItem( i18n("Calendar"), mCalPopupMenu); |
602 | mItemPopupMenu->insertSeparator(); | 602 | mItemPopupMenu->insertSeparator(); |
603 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, | 603 | mItemPopupMenu->insertItem( i18n("Start/Stop todo..."), this, |
604 | SLOT (toggleRunningItem())); | 604 | SLOT (toggleRunningItem())); |
605 | mItemPopupMenu->insertSeparator(); | 605 | mItemPopupMenu->insertSeparator(); |
606 | /* | 606 | /* |
607 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, | 607 | mItemPopupMenu->insertItem( i18n("New Todo..."), this, |
608 | SLOT (newTodo())); | 608 | SLOT (newTodo())); |
609 | */ | 609 | */ |
610 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, | 610 | mItemPopupMenu->insertItem(i18n("New Sub-Todo..."), this, |
611 | SLOT (newSubTodo())); | 611 | SLOT (newSubTodo())); |
612 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, | 612 | mItemPopupMenu->insertItem(i18n("Unparent Todo"), this, |
613 | SLOT (unparentTodo()),0,21); | 613 | SLOT (unparentTodo()),0,21); |
614 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, | 614 | mItemPopupMenu->insertItem(i18n("Reparent Todo"), this, |
615 | SLOT (reparentTodo()),0,22); | 615 | SLOT (reparentTodo()),0,22); |
616 | mItemPopupMenu->insertSeparator(); | 616 | mItemPopupMenu->insertSeparator(); |
617 | #if 0 | 617 | #if 0 |
618 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."), | 618 | mItemPopupMenu->insertItem(i18n("Delete completed To-Dos","Purge Completed..."), |
619 | this, SLOT( purgeCompleted() ) ); | 619 | this, SLOT( purgeCompleted() ) ); |
620 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), | 620 | mItemPopupMenu->insertItem(i18n("toggle completed To-Dos","Show Completed"), |
621 | this, SLOT( toggleCompleted() ),0, 33 ); | 621 | this, SLOT( toggleCompleted() ),0, 33 ); |
622 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 622 | mItemPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
623 | this, SLOT( toggleQuickTodo() ),0, 34 ); | 623 | this, SLOT( toggleQuickTodo() ),0, 34 ); |
624 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 624 | mItemPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
625 | this, SLOT( toggleRunning() ),0, 35 ); | 625 | this, SLOT( toggleRunning() ),0, 35 ); |
626 | 626 | ||
627 | #endif | 627 | #endif |
628 | mPopupMenu = new QPopupMenu(this); | 628 | mPopupMenu = new QPopupMenu(this); |
629 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 629 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
630 | SLOT (newTodo()),0,1); | 630 | SLOT (newTodo()),0,1); |
631 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), | 631 | mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), |
632 | this, SLOT(purgeCompleted()),0,2); | 632 | this, SLOT(purgeCompleted()),0,2); |
633 | mPopupMenu->insertItem(i18n("Show Completed"), | 633 | mPopupMenu->insertItem(i18n("Show Completed"), |
634 | this, SLOT( toggleCompleted() ),0,3 ); | 634 | this, SLOT( toggleCompleted() ),0,3 ); |
635 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), | 635 | mPopupMenu->insertItem(i18n("toggle running todo","Hide not Running"), |
636 | this, SLOT( toggleRunning() ),0,5 ); | 636 | this, SLOT( toggleRunning() ),0,5 ); |
637 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), | 637 | mPopupMenu->insertItem(i18n(" set all open","Display all opened"), |
638 | this, SLOT( setAllOpen() ),0,6 ); | 638 | this, SLOT( setAllOpen() ),0,6 ); |
639 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), | 639 | mPopupMenu->insertItem(i18n(" set all close","Display all closed"), |
640 | this, SLOT( setAllClose() ),0,7 ); | 640 | this, SLOT( setAllClose() ),0,7 ); |
641 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), | 641 | mPopupMenu->insertItem(i18n(" set all flat","Display all flat"), |
642 | this, SLOT( setAllFlat() ),0,8 ); | 642 | this, SLOT( setAllFlat() ),0,8 ); |
643 | mPopupMenu->insertSeparator(); | 643 | mPopupMenu->insertSeparator(); |
644 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), | 644 | mPopupMenu->insertItem(i18n("toggle quick todo","Show Quick Todo"), |
645 | this, SLOT( toggleQuickTodo() ),0,4 ); | 645 | this, SLOT( toggleQuickTodo() ),0,4 ); |
646 | mDocPrefs = new DocPrefs( name ); | 646 | mDocPrefs = new DocPrefs( name ); |
647 | 647 | ||
648 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); | 648 | mItemPopupMenu->insertItem(i18n("Todo View"),mPopupMenu ); |
649 | mPopupMenu->setCheckable( true ); | 649 | mPopupMenu->setCheckable( true ); |
650 | mItemPopupMenu->setCheckable( true ); | 650 | mItemPopupMenu->setCheckable( true ); |
651 | 651 | ||
652 | 652 | ||
653 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); | 653 | mPopupMenu->setItemChecked( 3,KOPrefs::instance()->mShowCompletedTodo ); |
654 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); | 654 | mItemPopupMenu->setItemChecked( 33 , KOPrefs::instance()->mShowCompletedTodo ); |
655 | 655 | ||
656 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); | 656 | mPopupMenu->setItemChecked(4,KOPrefs::instance()->mEnableQuickTodo); |
657 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); | 657 | mItemPopupMenu->setItemChecked( 34 , KOPrefs::instance()->mEnableQuickTodo ); |
658 | 658 | ||
659 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); | 659 | mPopupMenu->setItemChecked(5,KOPrefs::instance()->mHideNonStartedTodos); |
660 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); | 660 | mItemPopupMenu->setItemChecked( 35 , KOPrefs::instance()->mHideNonStartedTodos ); |
661 | 661 | ||
662 | 662 | ||
663 | // Double clicking conflicts with opening/closing the subtree | 663 | // Double clicking conflicts with opening/closing the subtree |
664 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 664 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), |
665 | SLOT( editItem( QListViewItem *) ) ); | 665 | SLOT( editItem( QListViewItem *) ) ); |
666 | /* | 666 | /* |
667 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 667 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
668 | const QPoint &,int ) ), | 668 | const QPoint &,int ) ), |
669 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 669 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
670 | */ | 670 | */ |
671 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 671 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, |
672 | const QPoint &,int ) ), | 672 | const QPoint &,int ) ), |
673 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 673 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
674 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 674 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), |
675 | SLOT( itemClicked( QListViewItem * ) ) ); | 675 | SLOT( itemClicked( QListViewItem * ) ) ); |
676 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 676 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), |
677 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 677 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); |
678 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 678 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
679 | SLOT( updateView() ) ); | 679 | SLOT( updateView() ) ); |
680 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 680 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
681 | SLOT( todoModified(Todo *, int) ) ); | 681 | SLOT( todoModified(Todo *, int) ) ); |
682 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 682 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), |
683 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 683 | SLOT( itemStateChanged( QListViewItem * ) ) ); |
684 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 684 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), |