author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/kotodoview.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-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 @@ -21,17 +21,33 @@ without including the source code for Qt in the source distribution. */ +#include <QDesktopWidget> + #include <qlayout.h> -#include <qheader.h> +#include <q3header.h> #include <qcursor.h> -#include <qwhatsthis.h> +#include <q3whatsthis.h> #include <qdialog.h> #include <qlabel.h> #include <qpushbutton.h> #include <qinputdialog.h> -#include <qvbox.h> +#include <q3vbox.h> +//Added by qt3to4: +#include <QWheelEvent> +#include <QFocusEvent> +#include <QDragLeaveEvent> +#include <QMouseEvent> +#include <QDragEnterEvent> +#include <QKeyEvent> +#include <Q3HBoxLayout> +#include <Q3VBoxLayout> +#include <QDropEvent> +#include <QDragMoveEvent> +#include <QPaintEvent> +#include <Q3PopupMenu> +#include <Q3PtrList> #include <kdebug.h> #include "koprefs.h" #include <klocale.h> @@ -68,12 +84,12 @@ KOStartTodoPrefs::KOStartTodoPrefs( QString sum, QWidget *parent, const char *na { mStopAll = true; setCaption( i18n("Start todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( sum ), this ); lay->addWidget( lab ); - lab->setAlignment( AlignCenter ); + lab->setAlignment( Qt::AlignCenter ); QPushButton * ok = new QPushButton( i18n("Start this todo\nand stop all running"), this ); lay->addWidget( ok ); @@ -98,20 +114,20 @@ KOStopTodoPrefs::KOStopTodoPrefs( Todo* todo, QWidget *parent, const char *name { mTodo = todo; setCaption( i18n("Stop todo") ); - QVBoxLayout* lay = new QVBoxLayout( this ); + Q3VBoxLayout* lay = new Q3VBoxLayout( this ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QLabel * lab = new QLabel( i18n("<b>%1\n</b>").arg( todo->summary() ), this ); lay->addWidget( lab ); - lab->setAlignment( AlignHCenter ); + lab->setAlignment( Qt::AlignHCenter ); lab = new QLabel( i18n("Additional Comment:"), this ); lay->addWidget( lab ); mComment = new QLineEdit( this ); lay->addWidget( mComment ); - QHBox * start = new QHBox ( this ); + Q3HBox * start = new Q3HBox ( this ); lay->addWidget( start ); lab = new QLabel( i18n("Start:"), start ); - QHBox * end = new QHBox ( this ); + Q3HBox * end = new Q3HBox ( this ); lay->addWidget( end ); lab = new QLabel( i18n("End:"), end ); sde = new KDateEdit( start ); @@ -173,10 +189,10 @@ void KOStopTodoPrefs::doNotSave() } -class KOTodoViewWhatsThis :public QWhatsThis +class KOTodoViewWhatsThis :public Q3WhatsThis { public: - KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; + KOTodoViewWhatsThis( QWidget *wid, KOTodoView* view ) : Q3WhatsThis( wid ), _wid(wid),_view (view) { }; protected: virtual QString text( const QPoint& p) @@ -214,7 +230,7 @@ void KOTodoListView::contentsDragEnterEvent(QDragEnterEvent *e) #ifndef KORG_NODND // kdDebug() << "KOTodoListView::contentsDragEnterEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; } @@ -230,7 +246,7 @@ void KOTodoListView::contentsDragMoveEvent(QDragMoveEvent *e) // kdDebug() << "KOTodoListView::contentsDragMoveEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; } @@ -255,7 +271,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) // kdDebug() << "KOTodoListView::contentsDropEvent" << endl; if ( !ICalDrag::canDecode( e ) && !VCalDrag::canDecode( e ) && - !QTextDrag::canDecode( e ) ) { + !Q3TextDrag::canDecode( e ) ) { e->ignore(); return; } @@ -300,7 +316,7 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) } else { QString text; - if (QTextDrag::decode(e,text)) { + if (Q3TextDrag::decode(e,text)) { //QListViewItem *qlvi = itemAt( contentsToViewport(e->pos()) ); KOTodoViewItem *todoi = static_cast<KOTodoViewItem *>(itemAt( contentsToViewport(e->pos()) )); qDebug("Dropped : " + text); @@ -323,14 +339,14 @@ void KOTodoListView::contentsDropEvent(QDropEvent *e) } void KOTodoListView::wheelEvent (QWheelEvent *e) { - QListView::wheelEvent (e); + Q3ListView::wheelEvent (e); } void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) { QPoint p(contentsToViewport(e->pos())); - QListViewItem *i = itemAt(p); + Q3ListViewItem *i = itemAt(p); bool rootClicked = true; if (i) { // if the user clicked into the root decoration of the item, don't @@ -348,7 +364,7 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) } #ifndef KORG_NODND mMousePressed = false; - if (! rootClicked && !( e->button() == RightButton) ) { + if (! rootClicked && !( e->button() == Qt::RightButton) ) { mPressPos = e->pos(); mMousePressed = true; } else { @@ -358,15 +374,15 @@ void KOTodoListView::contentsMousePressEvent(QMouseEvent* e) //qDebug("KOTodoListView::contentsMousePressEvent %d", rootClicked); #ifndef DESKTOP_VERSION if (!( e->button() == RightButton && rootClicked) ) - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #else - QListView::contentsMousePressEvent(e); + Q3ListView::contentsMousePressEvent(e); #endif } void KOTodoListView::paintEvent(QPaintEvent* e) { emit paintNeeded(); - QListView::paintEvent( e); + Q3ListView::paintEvent( e); } void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) { @@ -376,7 +392,7 @@ void KOTodoListView::contentsMouseMoveEvent(QMouseEvent* e) if (mMousePressed && (mPressPos - e->pos()).manhattanLength() > QApplication::startDragDistance()*3) { mMousePressed = false; - QListViewItem *item = itemAt(contentsToViewport(mPressPos)); + Q3ListViewItem *item = itemAt(contentsToViewport(mPressPos)); if (item) { DndFactory factory( mCalendar ); ICalDrag *vd = factory.createDrag( @@ -422,13 +438,13 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) } if (! e->isAutoRepeat() ) mFlagKeyPressed = true; - QListViewItem* cn; + Q3ListViewItem* cn; if ( (e->key() == Qt::Key_Return || e->key() == Qt::Key_Enter) && mName != "todolistsmall") { cn = currentItem(); if ( cn ) { KOTodoViewItem* ci = (KOTodoViewItem*)( cn ); if ( ci ){ - if ( e->state() == ShiftButton ) + if ( e->state() == Qt::ShiftButton ) ci->setOn( false ); else ci->setOn( true ); @@ -449,12 +465,12 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) switch ( e->key() ) { case Qt::Key_Down: case Qt::Key_Up: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); break; case Qt::Key_Left: case Qt::Key_Right: - QListView::keyPressEvent ( e ); + Q3ListView::keyPressEvent ( e ); e->accept(); return; break; @@ -468,7 +484,7 @@ void KOTodoListView::keyPressEvent ( QKeyEvent * e ) } void KOTodoListView::contentsMouseReleaseEvent(QMouseEvent *e) { - QListView::contentsMouseReleaseEvent(e); + Q3ListView::contentsMouseReleaseEvent(e); mMousePressed = false; } @@ -478,7 +494,7 @@ void KOTodoListView::contentsMouseDoubleClickEvent(QMouseEvent *e) QPoint vp = contentsToViewport(e->pos()); - QListViewItem *item = itemAt(vp); + Q3ListViewItem *item = itemAt(vp); emit double_Clicked(item); if (!item) return; @@ -492,7 +508,7 @@ KOQuickTodo::KOQuickTodo(QWidget *parent) : QLineEdit(parent) { setText(i18n("Click to add new Todo")); - setFocusPolicy ( QWidget::ClickFocus ); + setFocusPolicy ( Qt::ClickFocus ); } void KOQuickTodo::focusInEvent(QFocusEvent *ev) @@ -523,14 +539,14 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mPendingUpdateBeforeRepaint = false; isFlatDisplay = false; mNavigator = 0; - QBoxLayout *topLayout = new QVBoxLayout(this); + Q3BoxLayout *topLayout = new Q3VBoxLayout(this); mName = QString ( name ); mBlockUpdate = false; mQuickBar = new QWidget( this ); topLayout->addWidget(mQuickBar); mQuickAdd = new KOQuickTodo(mQuickBar); - QBoxLayout *quickLayout = new QHBoxLayout(mQuickBar); + Q3BoxLayout *quickLayout = new Q3HBoxLayout(mQuickBar); quickLayout->addWidget( mQuickAdd ); mNewSubBut = new QPushButton( "sub",mQuickBar ); QPushButton * s_done = new QPushButton( "D",mQuickBar ); @@ -568,19 +584,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : s_run->setFixedHeight(fixhei ); mNewSubBut->setFixedHeight(fixhei ); - flat->setFocusPolicy( NoFocus ); - s_done->setFocusPolicy( NoFocus ); - allopen->setFocusPolicy( NoFocus ); - allclose->setFocusPolicy( NoFocus ); - s_run->setFocusPolicy( NoFocus ); - mNewSubBut->setFocusPolicy( NoFocus ); + flat->setFocusPolicy( Qt::NoFocus ); + s_done->setFocusPolicy( Qt::NoFocus ); + allopen->setFocusPolicy( Qt::NoFocus ); + allclose->setFocusPolicy( Qt::NoFocus ); + s_run->setFocusPolicy( Qt::NoFocus ); + mNewSubBut->setFocusPolicy( Qt::NoFocus ); - QWhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); - QWhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); - QWhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); - QWhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); - QWhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); - QWhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); + Q3WhatsThis::add( flat, i18n("Click this button to display all todos in a <b>flat</b> hierarchy" ) ); + Q3WhatsThis::add( allopen, i18n("Click this button to display all todos <b>openend</b>" ) ); + Q3WhatsThis::add( allclose, i18n("Click this button to display all todos <b>closed</b>" ) ); + Q3WhatsThis::add( s_run, i18n("Click this button to toggle show/hide <b>running</b> todos" ) ); + Q3WhatsThis::add( mNewSubBut, i18n("Click this button to add a new subtodo to the currently selected todo" ) ); + Q3WhatsThis::add( s_done, i18n("Click this button to toggle show/hide <b>completed</b> todos" ) ); quickLayout->addWidget( mNewSubBut ); quickLayout->addWidget( s_done ); @@ -601,19 +617,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->addColumn(i18n("Todo")); mTodoListView->addColumn(i18n("Prio")); - mTodoListView->setColumnAlignment(1,AlignHCenter); + mTodoListView->setColumnAlignment(1,Qt::AlignHCenter); mTodoListView->addColumn(i18n("Complete")); - mTodoListView->setColumnAlignment(2,AlignCenter); + mTodoListView->setColumnAlignment(2,Qt::AlignCenter); mTodoListView->addColumn(i18n("Due Date")); - mTodoListView->setColumnAlignment(3,AlignLeft); + mTodoListView->setColumnAlignment(3,Qt::AlignLeft); mTodoListView->addColumn(i18n("Due Time")); - mTodoListView->setColumnAlignment(4,AlignHCenter); + mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); mTodoListView->addColumn(i18n("Start Date")); - mTodoListView->setColumnAlignment(5,AlignLeft); + mTodoListView->setColumnAlignment(5,Qt::AlignLeft); mTodoListView->addColumn(i18n("Start Time")); - mTodoListView->setColumnAlignment(6,AlignHCenter); + mTodoListView->setColumnAlignment(6,Qt::AlignHCenter); //mTodoListView->addColumn(i18n("Cancelled")); mTodoListView->addColumn(i18n("Categories")); @@ -623,7 +639,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->addColumn(i18n("Last Modified Sub")); #if 0 mTodoListView->addColumn(i18n("Sort Id")); - mTodoListView->setColumnAlignment(4,AlignHCenter); + mTodoListView->setColumnAlignment(4,Qt::AlignHCenter); #endif mTodoListView->setMinimumHeight( 60 ); @@ -632,19 +648,19 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : mTodoListView->setColumnWidth( 0, 120 ); int iii = 0; for ( iii = 0; iii< 12 ; ++iii ) - mTodoListView->setColumnWidthMode( iii, QListView::Manual ); + mTodoListView->setColumnWidthMode( iii, Q3ListView::Manual ); mKOTodoViewWhatsThis = new KOTodoViewWhatsThis(mTodoListView->viewport(),this); - mPriorityPopupMenu = new QPopupMenu(this); + mPriorityPopupMenu = new Q3PopupMenu(this); for (int i = 1; i <= 5; i++) { QString label = QString ("%1").arg (i); mPriority[mPriorityPopupMenu->insertItem (label)] = i; } connect (mPriorityPopupMenu, SIGNAL(activated (int)), SLOT (setNewPriority(int))); - mPercentageCompletedPopupMenu = new QPopupMenu(this); + mPercentageCompletedPopupMenu = new Q3PopupMenu(this); for (int i = 0; i <= 100; i+=20) { QString label = QString ("%1 %").arg (i); mPercentage[mPercentageCompletedPopupMenu->insertItem (label)] = i; @@ -652,12 +668,12 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : connect (mPercentageCompletedPopupMenu, SIGNAL (activated (int)), SLOT (setNewPercentage (int))); - mCategoryPopupMenu = new QPopupMenu (this); + mCategoryPopupMenu = new Q3PopupMenu (this); mCategoryPopupMenu->setCheckable (true); connect (mCategoryPopupMenu, SIGNAL (activated (int)), SLOT (changedCategories (int))); connect (mCategoryPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCategories ())); - mCalPopupMenu = new QPopupMenu (this); + mCalPopupMenu = new Q3PopupMenu (this); mCalPopupMenu->setCheckable (true); connect (mCalPopupMenu, SIGNAL (activated (int)), SLOT (changedCal (int))); connect (mCalPopupMenu, SIGNAL (aboutToShow ()), SLOT (fillCal ())); @@ -665,7 +681,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : - mItemPopupMenu = new QPopupMenu(this); + mItemPopupMenu = new Q3PopupMenu(this); mItemPopupMenu->insertItem(i18n("Show"), this, SLOT (showTodo())); mItemPopupMenu->insertItem(i18n("Edit..."), this, @@ -710,7 +726,7 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : this, SLOT( toggleRunning() ),0, 35 ); #endif - mPopupMenu = new QPopupMenu(this); + mPopupMenu = new Q3PopupMenu(this); mPopupMenu->insertItem(SmallIconSet("todo"), i18n("New Todo..."), this, SLOT (newTodo()),0,1); mPopupMenu->insertItem(i18n("delete completed To-Dos","Purge Completed..."), @@ -746,38 +762,38 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : // Double clicking conflicts with opening/closing the subtree - connect( mTodoListView, SIGNAL( doubleClicked( QListViewItem *) ), - SLOT( editItem( QListViewItem *) ) ); + connect( mTodoListView, SIGNAL( doubleClicked( Q3ListViewItem *) ), + SLOT( editItem( Q3ListViewItem *) ) ); /* connect( mTodoListView, SIGNAL( rightButtonClicked ( QListViewItem *, const QPoint &,int ) ), SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); */ - connect( mTodoListView, SIGNAL( contextRequest ( QListViewItem *, + connect( mTodoListView, SIGNAL( contextRequest ( Q3ListViewItem *, const QPoint &,int ) ), - SLOT( popupMenu( QListViewItem *, const QPoint & ,int) ) ); - connect( mTodoListView, SIGNAL( clicked( QListViewItem * ) ), - SLOT( itemClicked( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( double_Clicked( QListViewItem * ) ), - SLOT( itemDoubleClicked( QListViewItem * ) ) ); + SLOT( popupMenu( Q3ListViewItem *, const QPoint & ,int) ) ); + connect( mTodoListView, SIGNAL( clicked( Q3ListViewItem * ) ), + SLOT( itemClicked( Q3ListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( double_Clicked( Q3ListViewItem * ) ), + SLOT( itemDoubleClicked( Q3ListViewItem * ) ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), SLOT( updateView() ) ); connect( mTodoListView, SIGNAL( todoDropped( Todo *, int ) ), SLOT( todoModified(Todo *, int) ) ); - connect( mTodoListView, SIGNAL( expanded( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); - connect( mTodoListView, SIGNAL( collapsed( QListViewItem * ) ), - SLOT( itemStateChanged( QListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( expanded( Q3ListViewItem * ) ), + SLOT( itemStateChanged( Q3ListViewItem * ) ) ); + connect( mTodoListView, SIGNAL( collapsed( Q3ListViewItem * ) ), + SLOT( itemStateChanged( Q3ListViewItem * ) ) ); connect( mTodoListView, SIGNAL( paintNeeded() ), SLOT( paintNeeded()) ); #if 0 - connect(mTodoListView,SIGNAL(selectionChanged(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(clicked(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); - connect(mTodoListView,SIGNAL(pressed(QListViewItem *)), - SLOT(selectionChanged(QListViewItem *))); + connect(mTodoListView,SIGNAL(selectionChanged(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); + connect(mTodoListView,SIGNAL(clicked(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); + connect(mTodoListView,SIGNAL(pressed(Q3ListViewItem *)), + SLOT(selectionChanged(Q3ListViewItem *))); #endif connect( mTodoListView, SIGNAL(reparentTodoSignal( Todo *,Todo * ) ), SIGNAL(reparentTodoSignal( Todo *,Todo * ) )); @@ -881,7 +897,7 @@ void KOTodoView::updateView() mTodoListView->setFont( fo ); // QFontMetrics fm ( KOPrefs::instance()->mTodoViewFont ); //mTodoListView->header()->setMaximumHeight(fm.height()); - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); /* kdDebug() << "KOTodoView::updateView(): Todo List:" << endl; @@ -1044,7 +1060,7 @@ bool KOTodoView::checkTodo( Todo * todo ) return true; } -void KOTodoView::restoreItemState( QListViewItem *item ) +void KOTodoView::restoreItemState( Q3ListViewItem *item ) { pendingSubtodo = 0; while( item ) { @@ -1096,9 +1112,9 @@ void KOTodoView::updateConfig() mTodoListView->repaintContents(); } -QPtrList<Incidence> KOTodoView::selectedIncidences() +Q3PtrList<Incidence> KOTodoView::selectedIncidences() { - QPtrList<Incidence> selected; + Q3PtrList<Incidence> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; @@ -1107,9 +1123,9 @@ QPtrList<Incidence> KOTodoView::selectedIncidences() return selected; } -QPtrList<Todo> KOTodoView::selectedTodos() +Q3PtrList<Todo> KOTodoView::selectedTodos() { - QPtrList<Todo> selected; + Q3PtrList<Todo> selected; KOTodoViewItem *item = (KOTodoViewItem *)(mTodoListView->selectedItem()); // if (!item) item = mActiveItem; @@ -1127,7 +1143,7 @@ void KOTodoView::showDates(const QDate &, const QDate &) { } -void KOTodoView::showEvents(QPtrList<Event>) +void KOTodoView::showEvents(Q3PtrList<Event>) { kdDebug() << "KOTodoView::selectEvents(): not yet implemented" << endl; } @@ -1140,19 +1156,19 @@ void KOTodoView::printPreview(CalPrinter *calPrinter, const QDate &fd, #endif } -void KOTodoView::editItem(QListViewItem *item ) +void KOTodoView::editItem(Q3ListViewItem *item ) { if ( item ) emit editTodoSignal(((KOTodoViewItem *)item)->todo()); } -void KOTodoView::showItem(QListViewItem *item,const QPoint &,int) +void KOTodoView::showItem(Q3ListViewItem *item,const QPoint &,int) { if ( item ) emit showTodoSignal(((KOTodoViewItem *)item)->todo()); } -void KOTodoView::popupMenu(QListViewItem *item,const QPoint &p,int column) +void KOTodoView::popupMenu(Q3ListViewItem *item,const QPoint &p,int column) { pendingSubtodo = 0; mActiveItem = (KOTodoViewItem *)item; @@ -1361,7 +1377,7 @@ void KOTodoView::toggleRunningItemQuick() topLevelWidget()->setCaption(i18n("Todo started! Double click again to stop!")); } } -void KOTodoView::itemDoubleClicked(QListViewItem *item) +void KOTodoView::itemDoubleClicked(Q3ListViewItem *item) { if ( pendingSubtodo != 0 ) { topLevelWidget()->setCaption(i18n("Reparenting aborted!")); @@ -1428,7 +1444,7 @@ void KOTodoView::toggleRunningItem() } } -void KOTodoView::itemClicked(QListViewItem *item) +void KOTodoView::itemClicked(Q3ListViewItem *item) { //qDebug("KOTodoView::itemClicked %d", item); if (!item) { @@ -1441,7 +1457,7 @@ void KOTodoView::itemClicked(QListViewItem *item) KOTodoViewItem *todoItem = (KOTodoViewItem *)item; if ( pendingSubtodo != 0 ) { bool allowReparent = true; - QListViewItem *par = item; + Q3ListViewItem *par = item; while ( par ) { if ( par == pendingSubtodo ) { allowReparent = false; @@ -1469,7 +1485,7 @@ void KOTodoView::setDocumentId( const QString &id ) mDocPrefs->setDoc( id ); } -void KOTodoView::itemStateChanged( QListViewItem *item ) +void KOTodoView::itemStateChanged( Q3ListViewItem *item ) { if (!item) return; @@ -1542,7 +1558,7 @@ void KOTodoView::setAllClose() setOpen(mTodoListView->firstChild(), false); resetCurrentItem(); } -void KOTodoView::setOpen( QListViewItem* item, bool setOpenI) +void KOTodoView::setOpen( Q3ListViewItem* item, bool setOpenI) { while ( item ) { @@ -1563,7 +1579,7 @@ void KOTodoView::displayAllFlat() clearList (); mPopupMenu->setItemChecked( 8,true ); isFlatDisplay = true; - QPtrList<Todo> todoList = calendar()->todos(); + Q3PtrList<Todo> todoList = calendar()->todos(); Todo *todo; for(todo = todoList.first(); todo; todo = todoList.next()) { if ( checkTodo( todo ) ) { |