-rw-r--r-- | korganizer/kotodoview.cpp | 198 |
1 files changed, 107 insertions, 91 deletions
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index ba94057..2b8fbd3 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -22,8 +22,10 @@ | |||
22 | */ | 22 | */ |
23 | 23 | ||
24 | #include <QDesktopWidget> | ||
25 | |||
24 | #include <qlayout.h> | 26 | #include <qlayout.h> |
25 | #include <qheader.h> | 27 | #include <q3header.h> |
26 | #include <qcursor.h> | 28 | #include <qcursor.h> |
27 | #include <qwhatsthis.h> | 29 | #include <q3whatsthis.h> |
28 | #include <qdialog.h> | 30 | #include <qdialog.h> |
29 | #include <qlabel.h> | 31 | #include <qlabel.h> |
@@ -32,5 +34,19 @@ | |||
32 | #include <qinputdialog.h> | 34 | #include <qinputdialog.h> |
33 | 35 | ||
34 | #include <qvbox.h> | 36 | #include <q3vbox.h> |
37 | //Added by qt3to4: | ||
38 | #include <QWheelEvent> | ||
39 | #include <QFocusEvent> | ||
40 | #include <QDragLeaveEvent> | ||
41 | #include <QMouseEvent> | ||
42 | #include <QDragEnterEvent> | ||
43 | #include <QKeyEvent> | ||
44 | #include <Q3HBoxLayout> | ||
45 | #include <Q3VBoxLayout> | ||
46 | #include <QDropEvent> | ||
47 | #include <QDragMoveEvent> | ||
48 | #include <QPaintEvent> | ||
49 | #include <Q3PopupMenu> | ||
50 | #include <Q3PtrList> | ||
35 | #include <kdebug.h> | 51 | #include <kdebug.h> |
36 | #include "koprefs.h" | 52 | #include "koprefs.h" |
@@ -69,10 +85,10 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na | |||
69 | mStopAll = true; | 85 | mStopAll = true; |
70 | setCaption( i18n("Start todo") ); | 86 | setCaption( i18n("Start todo") ); |
71 | QVBoxLayout* lay = new QVBoxLayout( this ); | 87 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
72 | lay->setSpacing( 3 ); | 88 | lay->setSpacing( 3 ); |
73 | lay->setMargin( 3 ); | 89 | lay->setMargin( 3 ); |
74 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); | 90 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); |
75 | lay->addWidget( lab ); | 91 | lay->addWidget( lab ); |
76 | lab->setAlignment( AlignCenter ); | 92 | lab->setAlignment( Qt::AlignCenter ); |
77 | 93 | ||
78 | QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); | 94 | QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); |
@@ -99,18 +115,18 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name | |||
99 | mTodo = todo; | 115 | mTodo = todo; |
100 | setCaption( i18n("Stop todo") ); | 116 | setCaption( i18n("Stop todo") ); |
101 | QVBoxLayout* lay = new QVBoxLayout( this ); | 117 | Q3VBoxLayout* lay = new Q3VBoxLayout( this ); |
102 | lay->setSpacing( 3 ); | 118 | lay->setSpacing( 3 ); |
103 | lay->setMargin( 3 ); | 119 | lay->setMargin( 3 ); |
104 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); | 120 | QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); |
105 | lay->addWidget( lab ); | 121 | lay->addWidget( lab ); |
106 | lab->setAlignment( AlignHCenter ); | 122 | lab->setAlignment( Qt::AlignHCenter ); |
107 | lab = new QLabel( i18n("Additional Comment:"), this ); | 123 | lab = new QLabel( i18n("Additional Comment:"), this ); |
108 | lay->addWidget( lab ); | 124 | lay->addWidget( lab ); |
109 | mComment = new QLineEdit( this ); | 125 | mComment = new QLineEdit( this ); |
110 | lay->addWidget( mComment ); | 126 | lay->addWidget( mComment ); |
111 | QHBox * start = new QHBox ( this ); | 127 | Q3HBox * start = new Q3HBox ( this ); |
112 | lay->addWidget( start ); | 128 | lay->addWidget( start ); |
113 | lab = new QLabel( i18n("Start:"), start ); | 129 | lab = new QLabel( i18n("Start:"), start ); |
114 | QHBox * end = new QHBox ( this ); | 130 | Q3HBox * end = new Q3HBox ( this ); |
115 | lay->addWidget( end ); | 131 | lay->addWidget( end ); |
116 | lab = new QLabel( i18n("End:"), end ); | 132 | lab = new QLabel( i18n("End:"), end ); |
@@ -174,8 +190,8 @@ void KOStopTodoPrefs::doNotSave() | |||
174 | 190 | ||
175 | 191 | ||
176 | class KOTodoViewWhatsThis :public QWhatsThis | 192 | class KOTodoViewWhatsThis :public Q3WhatsThis |
177 | { | 193 | { |
178 | public: | 194 | public: |
179 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; | 195 | KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { }; |
180 | 196 | ||
181 | protected: | 197 | protected: |
@@ -215,5 +231,5 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) | |||
215 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; | 231 | // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; |
216 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 232 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
217 | !QTextDrag::canDecode( e ) ) { | 233 | !Q3TextDrag::canDecode( e ) ) { |
218 | e->ignore(); | 234 | e->ignore(); |
219 | return; | 235 | return; |
@@ -231,5 +247,5 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) | |||
231 | 247 | ||
232 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 248 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
233 | !QTextDrag::canDecode( e ) ) { | 249 | !Q3TextDrag::canDecode( e ) ) { |
234 | e->ignore(); | 250 | e->ignore(); |
235 | return; | 251 | return; |
@@ -256,5 +272,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
256 | 272 | ||
257 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && | 273 | if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && |
258 | !QTextDrag::canDecode( e ) ) { | 274 | !Q3TextDrag::canDecode( e ) ) { |
259 | e->ignore(); | 275 | e->ignore(); |
260 | return; | 276 | return; |
@@ -301,5 +317,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
301 | else { | 317 | else { |
302 | QString text; | 318 | QString text; |
303 | if (QTextDrag::decode(e,text)) { | 319 | if (Q3TextDrag::decode(e,text)) { |
304 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); | 320 | //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); |
305 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); | 321 | KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); |
@@ -324,5 +340,5 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) | |||
324 | void KOTodoListView::wheelEvent (QWheelEvent *e) | 340 | void KOTodoListView::wheelEvent (QWheelEvent *e) |
325 | { | 341 | { |
326 | QListView::wheelEvent (e); | 342 | Q3ListView::wheelEvent (e); |
327 | } | 343 | } |
328 | 344 | ||
@@ -331,5 +347,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | |||
331 | 347 | ||
332 | QPoint p(contentsToViewport(e->pos())); | 348 | QPoint p(contentsToViewport(e->pos())); |
333 | QListViewItem *i = itemAt(p); | 349 | Q3ListViewItem *i = itemAt(p); |
334 | bool rootClicked = true; | 350 | bool rootClicked = true; |
335 | if (i) { | 351 | if (i) { |
@@ -349,5 +365,5 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | |||
349 | #ifndef KORG_NODND | 365 | #ifndef KORG_NODND |
350 | mMousePressed = false; | 366 | mMousePressed = false; |
351 | if (! rootClicked && !( e->button() == RightButton) ) { | 367 | if (! rootClicked && !( e->button() == Qt::RightButton) ) { |
352 | mPressPos = e->pos(); | 368 | mPressPos = e->pos(); |
353 | mMousePressed = true; | 369 | mMousePressed = true; |
@@ -359,7 +375,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) | |||
359 | #ifndef DESKTOP_VERSION | 375 | #ifndef DESKTOP_VERSION |
360 | if (!( e->button() == RightButton && rootClicked) ) | 376 | if (!( e->button() == RightButton && rootClicked) ) |
361 | QListView::contentsMousePressEvent(e); | 377 | Q3ListView::contentsMousePressEvent(e); |
362 | #else | 378 | #else |
363 | QListView::contentsMousePressEvent(e); | 379 | Q3ListView::contentsMousePressEvent(e); |
364 | #endif | 380 | #endif |
365 | } | 381 | } |
@@ -367,5 +383,5 @@ void KOTodoListView::paintEvent(QPaintEvent* e) | |||
367 | { | 383 | { |
368 | emit paintNeeded(); | 384 | emit paintNeeded(); |
369 | QListView::paintEvent( e); | 385 | Q3ListView::paintEvent( e); |
370 | } | 386 | } |
371 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | 387 | void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) |
@@ -377,5 +393,5 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) | |||
377 | QApplication::startDragDistance()*3) { | 393 | QApplication::startDragDistance()*3) { |
378 | mMousePressed = false; | 394 | mMousePressed = false; |
379 | QListViewItem *item = itemAt(contentsToViewport(mPressPos)); | 395 | Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos)); |
380 | if (item) { | 396 | if (item) { |
381 | DndFactory factory( mCalendar ); | 397 | DndFactory factory( mCalendar ); |
@@ -423,5 +439,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
423 | if (! e->isAutoRepeat() ) | 439 | if (! e->isAutoRepeat() ) |
424 | mFlagKeyPressed = true; | 440 | mFlagKeyPressed = true; |
425 | QListViewItem* cn; | 441 | Q3ListViewItem* cn; |
426 | if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { | 442 | if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { |
427 | cn = currentItem(); | 443 | cn = currentItem(); |
@@ -429,5 +445,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
429 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); | 445 | KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); |
430 | if ( ci ){ | 446 | if ( ci ){ |
431 | if ( e->state() == ShiftButton ) | 447 | if ( e->state() == Qt::ShiftButton ) |
432 | ci->setOn( false ); | 448 | ci->setOn( false ); |
433 | else | 449 | else |
@@ -450,10 +466,10 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
450 | case Qt::Key_Down: | 466 | case Qt::Key_Down: |
451 | case Qt::Key_Up: | 467 | case Qt::Key_Up: |
452 | QListView::keyPressEvent ( e ); | 468 | Q3ListView::keyPressEvent ( e ); |
453 | e->accept(); | 469 | e->accept(); |
454 | break; | 470 | break; |
455 | case Qt::Key_Left: | 471 | case Qt::Key_Left: |
456 | case Qt::Key_Right: | 472 | case Qt::Key_Right: |
457 | QListView::keyPressEvent ( e ); | 473 | Q3ListView::keyPressEvent ( e ); |
458 | e->accept(); | 474 | e->accept(); |
459 | return; | 475 | return; |
@@ -469,5 +485,5 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) | |||
469 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) | 485 | void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) |
470 | { | 486 | { |
471 | QListView::contentsMouseReleaseEvent(e); | 487 | Q3ListView::contentsMouseReleaseEvent(e); |
472 | mMousePressed = false; | 488 | mMousePressed = false; |
473 | } | 489 | } |
@@ -479,5 +495,5 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) | |||
479 | QPoint vp = contentsToViewport(e->pos()); | 495 | QPoint vp = contentsToViewport(e->pos()); |
480 | 496 | ||
481 | QListViewItem *item = itemAt(vp); | 497 | Q3ListViewItem *item = itemAt(vp); |
482 | 498 | ||
483 | emit double_Clicked(item); | 499 | emit double_Clicked(item); |
@@ -493,5 +509,5 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) : | |||
493 | { | 509 | { |
494 | setText(i18n("Click to add new Todo")); | 510 | setText(i18n("Click to add new Todo")); |
495 | setFocusPolicy ( QWidget::ClickFocus ); | 511 | setFocusPolicy ( Qt::ClickFocus ); |
496 | } | 512 | } |
497 | 513 | ||
@@ -524,5 +540,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
524 | isFlatDisplay = false; | 540 | isFlatDisplay = false; |
525 | mNavigator = 0; | 541 | mNavigator = 0; |
526 | QBoxLayout *topLayout = new QVBoxLayout(this); | 542 | Q3BoxLayout *topLayout = new Q3VBoxLayout(this); |
527 | mName = QString ( name ); | 543 | mName = QString ( name ); |
528 | mBlockUpdate = false; | 544 | mBlockUpdate = false; |
@@ -531,5 +547,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
531 | 547 | ||
532 | mQuickAdd = new KOQuickTodo(mQuickBar); | 548 | mQuickAdd = new KOQuickTodo(mQuickBar); |
533 | QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); | 549 | Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar); |
534 | quickLayout->addWidget( mQuickAdd ); | 550 | quickLayout->addWidget( mQuickAdd ); |
535 | mNewSubBut = new QPushButton( "sub",mQuickBar ); | 551 | mNewSubBut = new QPushButton( "sub",mQuickBar ); |
@@ -569,17 +585,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
569 | mNewSubBut->setFixedHeight(fixhei ); | 585 | mNewSubBut->setFixedHeight(fixhei ); |
570 | 586 | ||
571 | flat->setFocusPolicy( NoFocus ); | 587 | flat->setFocusPolicy( Qt::NoFocus ); |
572 | s_done->setFocusPolicy( NoFocus ); | 588 | s_done->setFocusPolicy( Qt::NoFocus ); |
573 | allopen->setFocusPolicy( NoFocus ); | 589 | allopen->setFocusPolicy( Qt::NoFocus ); |
574 | allclose->setFocusPolicy( NoFocus ); | 590 | allclose->setFocusPolicy( Qt::NoFocus ); |
575 | s_run->setFocusPolicy( NoFocus ); | 591 | s_run->setFocusPolicy( Qt::NoFocus ); |
576 | mNewSubBut->setFocusPolicy( NoFocus ); | 592 | mNewSubBut->setFocusPolicy( Qt::NoFocus ); |
577 | 593 | ||
578 | QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); | 594 | Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); |
579 | QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); | 595 | Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); |
580 | QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); | 596 | Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); |
581 | QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); | 597 | Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); |
582 | QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); | 598 | Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); |
583 | QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); | 599 | Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); |
584 | 600 | ||
585 | quickLayout->addWidget( mNewSubBut ); | 601 | quickLayout->addWidget( mNewSubBut ); |
@@ -602,17 +618,17 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
602 | mTodoListView->addColumn(i18n("Todo")); | 618 | mTodoListView->addColumn(i18n("Todo")); |
603 | mTodoListView->addColumn(i18n("Prio")); | 619 | mTodoListView->addColumn(i18n("Prio")); |
604 | mTodoListView->setColumnAlignment(1,AlignHCenter); | 620 | mTodoListView->setColumnAlignment(1,Qt::AlignHCenter); |
605 | mTodoListView->addColumn(i18n("Complete")); | 621 | mTodoListView->addColumn(i18n("Complete")); |
606 | mTodoListView->setColumnAlignment(2,AlignCenter); | 622 | mTodoListView->setColumnAlignment(2,Qt::AlignCenter); |
607 | 623 | ||
608 | mTodoListView->addColumn(i18n("Due Date")); | 624 | mTodoListView->addColumn(i18n("Due Date")); |
609 | mTodoListView->setColumnAlignment(3,AlignLeft); | 625 | mTodoListView->setColumnAlignment(3,Qt::AlignLeft); |
610 | mTodoListView->addColumn(i18n("Due Time")); | 626 | mTodoListView->addColumn(i18n("Due Time")); |
611 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 627 | mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); |
612 | 628 | ||
613 | mTodoListView->addColumn(i18n("Start Date")); | 629 | mTodoListView->addColumn(i18n("Start Date")); |
614 | mTodoListView->setColumnAlignment(5,AlignLeft); | 630 | mTodoListView->setColumnAlignment(5,Qt::AlignLeft); |
615 | mTodoListView->addColumn(i18n("Start Time")); | 631 | mTodoListView->addColumn(i18n("Start Time")); |
616 | mTodoListView->setColumnAlignment(6,AlignHCenter); | 632 | mTodoListView->setColumnAlignment(6,Qt::AlignHCenter); |
617 | 633 | ||
618 | //mTodoListView->addColumn(i18n("Cancelled")); | 634 | //mTodoListView->addColumn(i18n("Cancelled")); |
@@ -624,5 +640,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
624 | #if 0 | 640 | #if 0 |
625 | mTodoListView->addColumn(i18n("Sort Id")); | 641 | mTodoListView->addColumn(i18n("Sort Id")); |
626 | mTodoListView->setColumnAlignment(4,AlignHCenter); | 642 | mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); |
627 | #endif | 643 | #endif |
628 | 644 | ||
@@ -633,10 +649,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
633 | int iii = 0; | 649 | int iii = 0; |
634 | for ( iii = 0; iii< 12 ; ++iii ) | 650 | for ( iii = 0; iii< 12 ; ++iii ) |
635 | mTodoListView->setColumnWidthMode( iii, QListView::Manual ); | 651 | mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual ); |
636 | 652 | ||
637 | 653 | ||
638 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); | 654 | mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); |
639 | 655 | ||
640 | mPriorityPopupMenu = new QPopupMenu(this); | 656 | mPriorityPopupMenu = new Q3PopupMenu(this); |
641 | for (int i = 1; i <= 5; i++) { | 657 | for (int i = 1; i <= 5; i++) { |
642 | QString label = QString ("%1").arg (i); | 658 | QString label = QString ("%1").arg (i); |
@@ -645,5 +661,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
645 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); | 661 | connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); |
646 | 662 | ||
647 | mPercentageCompletedPopupMenu = new QPopupMenu(this); | 663 | mPercentageCompletedPopupMenu = new Q3PopupMenu(this); |
648 | for (int i = 0; i <= 100; i+=20) { | 664 | for (int i = 0; i <= 100; i+=20) { |
649 | QString label = QString ("%1 %").arg (i); | 665 | QString label = QString ("%1 %").arg (i); |
@@ -653,10 +669,10 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
653 | 669 | ||
654 | 670 | ||
655 | mCategoryPopupMenu = new QPopupMenu (this); | 671 | mCategoryPopupMenu = new Q3PopupMenu (this); |
656 | mCategoryPopupMenu->setCheckable (true); | 672 | mCategoryPopupMenu->setCheckable (true); |
657 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); | 673 | connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); |
658 | connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); | 674 | connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); |
659 | 675 | ||
660 | mCalPopupMenu = new QPopupMenu (this); | 676 | mCalPopupMenu = new Q3PopupMenu (this); |
661 | mCalPopupMenu->setCheckable (true); | 677 | mCalPopupMenu->setCheckable (true); |
662 | connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); | 678 | connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); |
@@ -666,5 +682,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
666 | 682 | ||
667 | 683 | ||
668 | mItemPopupMenu = new QPopupMenu(this); | 684 | mItemPopupMenu = new Q3PopupMenu(this); |
669 | mItemPopupMenu->insertItem(i18n("Show"), this, | 685 | mItemPopupMenu->insertItem(i18n("Show"), this, |
670 | SLOT (showTodo())); | 686 | SLOT (showTodo())); |
@@ -711,5 +727,5 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
711 | 727 | ||
712 | #endif | 728 | #endif |
713 | mPopupMenu = new QPopupMenu(this); | 729 | mPopupMenu = new Q3PopupMenu(this); |
714 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, | 730 | mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, |
715 | SLOT (newTodo()),0,1); | 731 | SLOT (newTodo()),0,1); |
@@ -747,6 +763,6 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
747 | 763 | ||
748 | // Double clicking conflicts with opening/closing the subtree | 764 | // Double clicking conflicts with opening/closing the subtree |
749 | connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), | 765 | connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ), |
750 | SLOT( editItem( QListViewItem *) ) ); | 766 | SLOT( editItem( Q3ListViewItem *) ) ); |
751 | /* | 767 | /* |
752 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, | 768 | connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, |
@@ -754,29 +770,29 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
754 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 770 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); |
755 | */ | 771 | */ |
756 | connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, | 772 | connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *, |
757 | const QPoint &,int ) ), | 773 | const QPoint &,int ) ), |
758 | SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); | 774 | SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) ); |
759 | connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), | 775 | connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ), |
760 | SLOT( itemClicked( QListViewItem * ) ) ); | 776 | SLOT( itemClicked( Q3ListViewItem * ) ) ); |
761 | connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), | 777 | connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ), |
762 | SLOT( itemDoubleClicked( QListViewItem * ) ) ); | 778 | SLOT( itemDoubleClicked( Q3ListViewItem * ) ) ); |
763 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 779 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
764 | SLOT( updateView() ) ); | 780 | SLOT( updateView() ) ); |
765 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), | 781 | connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), |
766 | SLOT( todoModified(Todo *, int) ) ); | 782 | SLOT( todoModified(Todo *, int) ) ); |
767 | connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), | 783 | connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ), |
768 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 784 | SLOT( itemStateChanged( Q3ListViewItem * ) ) ); |
769 | connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), | 785 | connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ), |
770 | SLOT( itemStateChanged( QListViewItem * ) ) ); | 786 | SLOT( itemStateChanged( Q3ListViewItem * ) ) ); |
771 | connect( mTodoListView, SIGNAL( paintNeeded() ), | 787 | connect( mTodoListView, SIGNAL( paintNeeded() ), |
772 | SLOT( paintNeeded()) ); | 788 | SLOT( paintNeeded()) ); |
773 | 789 | ||
774 | #if 0 | 790 | #if 0 |
775 | connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), | 791 | connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)), |
776 | SLOT(selectionChanged(QListViewItem *))); | 792 | SLOT(selectionChanged(Q3ListViewItem *))); |
777 | connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), | 793 | connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)), |
778 | SLOT(selectionChanged(QListViewItem *))); | 794 | SLOT(selectionChanged(Q3ListViewItem *))); |
779 | connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), | 795 | connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)), |
780 | SLOT(selectionChanged(QListViewItem *))); | 796 | SLOT(selectionChanged(Q3ListViewItem *))); |
781 | #endif | 797 | #endif |
782 | 798 | ||
@@ -882,5 +898,5 @@ void KOTodoView::updateView() | |||
882 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); | 898 | // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); |
883 | //mTodoListView->header()->setMaximumHeight(fm.height()); | 899 | //mTodoListView->header()->setMaximumHeight(fm.height()); |
884 | QPtrList<Todo> todoList = calendar()->todos(); | 900 | Q3PtrList<Todo> todoList = calendar()->todos(); |
885 | 901 | ||
886 | /* | 902 | /* |
@@ -1045,5 +1061,5 @@ bool KOTodoView::checkTodo( Todo * todo ) | |||
1045 | } | 1061 | } |
1046 | 1062 | ||
1047 | void KOTodoView::restoreItemState( QListViewItem *item ) | 1063 | void KOTodoView::restoreItemState( Q3ListViewItem *item ) |
1048 | { | 1064 | { |
1049 | pendingSubtodo = 0; | 1065 | pendingSubtodo = 0; |
@@ -1097,7 +1113,7 @@ void KOTodoView::updateConfig() | |||
1097 | } | 1113 | } |
1098 | 1114 | ||
1099 | QPtrList<Incidence> KOTodoView::selectedIncidences() | 1115 | Q3PtrList<Incidence> KOTodoView::selectedIncidences() |
1100 | { | 1116 | { |
1101 | QPtrList<Incidence> selected; | 1117 | Q3PtrList<Incidence> selected; |
1102 | 1118 | ||
1103 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 1119 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
@@ -1108,7 +1124,7 @@ QPtrList<Incidence> KOTodoView::selectedIncidences() | |||
1108 | } | 1124 | } |
1109 | 1125 | ||
1110 | QPtrList<Todo> KOTodoView::selectedTodos() | 1126 | Q3PtrList<Todo> KOTodoView::selectedTodos() |
1111 | { | 1127 | { |
1112 | QPtrList<Todo> selected; | 1128 | Q3PtrList<Todo> selected; |
1113 | 1129 | ||
1114 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); | 1130 | KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); |
@@ -1128,5 +1144,5 @@ void KOTodoView::showDates(const QDate &, const QDate &) | |||
1128 | } | 1144 | } |
1129 | 1145 | ||
1130 | void KOTodoView::showEvents(QPtrList<Event>) | 1146 | void KOTodoView::showEvents(Q3PtrList<Event>) |
1131 | { | 1147 | { |
1132 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; | 1148 | kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; |
@@ -1141,5 +1157,5 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, | |||
1141 | } | 1157 | } |
1142 | 1158 | ||
1143 | void KOTodoView::editItem(QListViewItem *item ) | 1159 | void KOTodoView::editItem(Q3ListViewItem *item ) |
1144 | { | 1160 | { |
1145 | if ( item ) | 1161 | if ( item ) |
@@ -1147,5 +1163,5 @@ void KOTodoView::editItem(QListViewItem *item ) | |||
1147 | } | 1163 | } |
1148 | 1164 | ||
1149 | void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | 1165 | void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int) |
1150 | { | 1166 | { |
1151 | if ( item ) | 1167 | if ( item ) |
@@ -1153,5 +1169,5 @@ void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) | |||
1153 | } | 1169 | } |
1154 | 1170 | ||
1155 | void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) | 1171 | void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column) |
1156 | { | 1172 | { |
1157 | pendingSubtodo = 0; | 1173 | pendingSubtodo = 0; |
@@ -1362,5 +1378,5 @@ void KOTodoView::toggleRunningItemQuick() | |||
1362 | } | 1378 | } |
1363 | } | 1379 | } |
1364 | void KOTodoView::itemDoubleClicked(QListViewItem *item) | 1380 | void KOTodoView::itemDoubleClicked(Q3ListViewItem *item) |
1365 | { | 1381 | { |
1366 | if ( pendingSubtodo != 0 ) { | 1382 | if ( pendingSubtodo != 0 ) { |
@@ -1429,5 +1445,5 @@ void KOTodoView::toggleRunningItem() | |||
1429 | } | 1445 | } |
1430 | 1446 | ||
1431 | void KOTodoView::itemClicked(QListViewItem *item) | 1447 | void KOTodoView::itemClicked(Q3ListViewItem *item) |
1432 | { | 1448 | { |
1433 | //qDebug("KOTodoView::itemClicked %d", item); | 1449 | //qDebug("KOTodoView::itemClicked %d", item); |
@@ -1442,5 +1458,5 @@ void KOTodoView::itemClicked(QListViewItem *item) | |||
1442 | if ( pendingSubtodo != 0 ) { | 1458 | if ( pendingSubtodo != 0 ) { |
1443 | bool allowReparent = true; | 1459 | bool allowReparent = true; |
1444 | QListViewItem *par = item; | 1460 | Q3ListViewItem *par = item; |
1445 | while ( par ) { | 1461 | while ( par ) { |
1446 | if ( par == pendingSubtodo ) { | 1462 | if ( par == pendingSubtodo ) { |
@@ -1470,5 +1486,5 @@ void KOTodoView::setDocumentId( const QString &id ) | |||
1470 | } | 1486 | } |
1471 | 1487 | ||
1472 | void KOTodoView::itemStateChanged( QListViewItem *item ) | 1488 | void KOTodoView::itemStateChanged( Q3ListViewItem *item ) |
1473 | { | 1489 | { |
1474 | if (!item) return; | 1490 | if (!item) return; |
@@ -1543,5 +1559,5 @@ void KOTodoView::setAllClose() | |||
1543 | resetCurrentItem(); | 1559 | resetCurrentItem(); |
1544 | } | 1560 | } |
1545 | void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) | 1561 | void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI) |
1546 | { | 1562 | { |
1547 | 1563 | ||
@@ -1564,5 +1580,5 @@ void KOTodoView::displayAllFlat() | |||
1564 | mPopupMenu->setItemChecked( 8,true ); | 1580 | mPopupMenu->setItemChecked( 8,true ); |
1565 | isFlatDisplay = true; | 1581 | isFlatDisplay = true; |
1566 | QPtrList<Todo> todoList = calendar()->todos(); | 1582 | Q3PtrList<Todo> todoList = calendar()->todos(); |
1567 | Todo *todo; | 1583 | Todo *todo; |
1568 | for(todo = todoList.first(); todo; todo = todoList.next()) { | 1584 | for(todo = todoList.first(); todo; todo = todoList.next()) { |