-rw-r--r-- | korganizer/koagenda.cpp | 169 |
1 files changed, 90 insertions, 79 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index 1d4d6de..fe59787 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -28,14 +28,25 @@ #define protected public #include <qwidget.h> #undef protected #endif -#include <qintdict.h> +#include <q3intdict.h> #include <qdatetime.h> #include <qapplication.h> -#include <qpopupmenu.h> +#include <q3popupmenu.h> #include <qcursor.h> #include <qpainter.h> +#include <QDesktopWidget> +//Added by qt3to4: +#include <QResizeEvent> +#include <QLabel> +#include <QPixmap> +#include <QMouseEvent> +#include <QKeyEvent> +#include <Q3MemArray> +#include <QEvent> +#include <Q3Frame> +#include <Q3PtrList> #include <kdebug.h> #include <klocale.h> #include <kiconloader.h> @@ -62,9 +73,9 @@ extern int globalFlagBlockStartup; //////////////////////////////////////////////////////////////////////////// MarcusBains::MarcusBains(KOAgenda *_agenda,const char *name) - : QFrame(_agenda->viewport(),name), agenda(_agenda) + : Q3Frame(_agenda->viewport(),name), agenda(_agenda) { setLineWidth(0); setMargin(0); setBackgroundColor(Qt::red); @@ -168,10 +179,10 @@ void MarcusBains::updateLocation(bool recalculate) /* Create an agenda widget with rows rows and columns columns. */ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, - const char *name,WFlags f) : - QScrollView(parent,name,f) + const char *name,Qt::WFlags f) : + Q3ScrollView(parent,name,f) { mAllAgendaPopup = 0; mColumns = columns; @@ -189,10 +200,10 @@ KOAgenda::KOAgenda(int columns,int rows,int rowSize,QWidget *parent, /* Create an agenda widget with columns columns and one row. This is used for all-day events. */ -KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,WFlags f) : - QScrollView(parent,name,f) +KOAgenda::KOAgenda(int columns,QWidget *parent,const char *name,Qt::WFlags f) : + Q3ScrollView(parent,name,f) { mAllAgendaPopup = 0; blockResize = false; mColumns = columns; @@ -230,29 +241,29 @@ void KOAgenda::init() { mPopupTimer = new QTimer(this); connect(mPopupTimer , SIGNAL(timeout()), this, SLOT(popupMenu())); - mNewItemPopup = new QPopupMenu( this ); + mNewItemPopup = new Q3PopupMenu( this ); connect ( mNewItemPopup, SIGNAL (activated ( int ) ), this, SLOT ( newItem(int)) ); QString pathString = ""; if ( !KOPrefs::instance()->mToolBarMiniIcons ) { if ( QApplication::desktop()->width() < 480 ) pathString += "icons16/"; } else pathString += "iconsmini/"; - mNewItemPopup->insertItem ( SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newevent" ), i18n("New Event..."), 1 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"newtodo" ), i18n("New Todo..."),2 ); mNewItemPopup->insertSeparator ( ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next week"),4 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("This month"),6 ); - mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"day" ), i18n("Day view"),3 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"xdays" ), i18n("Next days"),8 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next week"),4 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"week" ), i18n("Next two weeks"),5 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"month" ), i18n("This month"),6 ); + mNewItemPopup->insertItem ( (QIcon)SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); #ifndef _WIN32_ - int wflags = viewport()-> getWFlags() |WRepaintNoErase;//WResizeNoErase - viewport()->setWFlags ( wflags); + Qt::WindowFlags wflags = viewport()-> windowFlags() |Qt::WRepaintNoErase;//WResizeNoErase + viewport()->setWindowFlags ( wflags); #endif mGridSpacingX = 80; mResizeBorderWidth = 8; mScrollBorderWidth = 8; @@ -262,9 +273,9 @@ void KOAgenda::init() //enableClipper(true); // Grab key strokes for keyboard navigation of agenda. Seems to have no // effect. Has to be fixed. - setFocusPolicy(WheelFocus); + setFocusPolicy(Qt::WheelFocus); connect(&mScrollUpTimer,SIGNAL(timeout()),SLOT(scrollUp())); connect(&mScrollDownTimer,SIGNAL(timeout()),SLOT(scrollDown())); connect(&mResizeTimer,SIGNAL(timeout()),SLOT(finishResize())); @@ -394,13 +405,13 @@ bool KOAgenda::eventFilter ( QObject *object, QEvent *event ) return eventFilter_mouse(object, static_cast<QMouseEvent *>(event)); case (QEvent::Leave): if (!mActionItem) - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); return true; default: - return QScrollView::eventFilter(object,event); + return Q3ScrollView::eventFilter(object,event); } } void KOAgenda::popupMenu() { @@ -504,13 +515,13 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } bool objIsNotViewport = (object != viewport()); bool leftButt = false; #ifdef DESKTOP_VERSION - leftButt = (me->button() == LeftButton); + leftButt = (me->button() == Qt::LeftButton); #endif switch (me->type()) { case QEvent::MouseButtonPress: - if (me->button() == LeftButton) { + if (me->button() == Qt::LeftButton) { mPopupTimer->start( 600 ); mLeftMouseDown = true; } blockMoving = true; @@ -577,12 +588,12 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } if ( objIsNotViewport ) { mPopupItem = (KOAgendaItem *)object; mPopupKind = 1; - if (me->button() == RightButton) { + if (me->button() == Qt::RightButton) { mPopupKind = 3; popupMenu(); - } else if (me->button() == LeftButton) { + } else if (me->button() == Qt::LeftButton) { mActionItem = (KOAgendaItem *)object; if (mActionItem) { emit signalClearSelection(); slotClearSelection(); @@ -599,9 +610,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mPopupItem = 0; mPopupKind = 2; selectItem(0); mActionItem = 0; - if (me->button() == RightButton) { + if (me->button() == Qt::RightButton) { int x,y; viewportToContents(viewportPos.x(),viewportPos.y(),x,y); int gx,gy; contentsToGrid(x,y,gx,gy); @@ -610,21 +621,21 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mStartCellX = gx; mStartCellY = gy; mPopupKind = 4; popupMenu(); - } else if (me->button() == LeftButton) { - setCursor(arrowCursor); + } else if (me->button() == Qt::LeftButton) { + setCursor(Qt::arrowCursor); startSelectAction(viewportPos); } } break; case QEvent::MouseButtonRelease: - if (me->button() == LeftButton ) { + if (me->button() == Qt::LeftButton ) { mPopupTimer->stop(); } if (object != viewport()) { - if (me->button() == LeftButton && mLeftMouseDown) { + if (me->button() == Qt::LeftButton && mLeftMouseDown) { if (mActionItem) { QPoint clipperPos = clipper()->mapFromGlobal(viewport()->mapToGlobal(viewportPos)); //qDebug(" %d %d %d ",clipperPos.y(),visibleHeight() , 9 ); if ( mActionType == MOVE && (clipperPos.y() > visibleHeight()-2 ||clipperPos.y() < 0 ) ) { @@ -632,9 +643,9 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) mScrollDownTimer.stop(); mActionItem->resetMove(); placeSubCells( mActionItem ); // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; mItemMoved = 0; mLeftMouseDown = false; @@ -644,13 +655,13 @@ bool KOAgenda::eventFilter_mouse(QObject *object, QMouseEvent *me) } } } else { // ---------- viewport() - if (me->button() == LeftButton && mLeftMouseDown ) { //left click + if (me->button() == Qt::LeftButton && mLeftMouseDown ) { //left click endSelectAction( true ); // emit new event signal } } - if (me->button() == LeftButton) + if (me->button() == Qt::LeftButton) mLeftMouseDown = false; break; @@ -849,34 +860,34 @@ void KOAgenda::startItemAction(QPoint viewportPos) int gridDistanceX = (x - gx * mGridSpacingX); if ( allowResize && gridDistanceX < mResizeBorderWidth && mActionItem->cellX() == mCurrentCellX) { mActionType = RESIZELEFT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else if ( allowResize && (mGridSpacingX - gridDistanceX) < mResizeBorderWidth && mActionItem->cellXWidth() == mCurrentCellX) { mActionType = RESIZERIGHT; - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else { mActionType = MOVE; mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } } else { int gridDistanceY = (y - gy * mGridSpacingY); if (allowResize && gridDistanceY < mResizeBorderWidth && mActionItem->cellYTop() == mCurrentCellY && !mActionItem->firstMultiItem()) { mActionType = RESIZETOP; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if (allowResize &&(mGridSpacingY - gridDistanceY) < mResizeBorderWidth && mActionItem->cellYBottom() == mCurrentCellY && !mActionItem->lastMultiItem()) { mActionType = RESIZEBOTTOM; - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { mActionType = MOVE; mActionItem->startMove(); - setCursor(sizeAllCursor); + setCursor(Qt::sizeAllCursor); } } } @@ -905,29 +916,29 @@ void KOAgenda::performItemAction(QPoint viewportPos) mScrollDownTimer.stop(); mActionItem->resetMove(); placeSubCells( mActionItem ); // emit startDragSignal( mActionItem->incidence() ); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; mItemMoved = 0; return; } } else { switch ( mActionType ) { case MOVE: - setCursor( sizeAllCursor ); + setCursor( Qt::sizeAllCursor ); break; case RESIZETOP: case RESIZEBOTTOM: - setCursor( sizeVerCursor ); + setCursor( Qt::sizeVerCursor ); break; case RESIZELEFT: case RESIZERIGHT: - setCursor( sizeHorCursor ); + setCursor( Qt::sizeHorCursor ); break; default: - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); } } // Scroll if item was moved to upper or lower end of agenda. @@ -970,9 +981,9 @@ void KOAgenda::performItemAction(QPoint viewportPos) mGridSpacingY * mActionItem->cellHeight()); int x,y; gridToContents(mCurrentCellX,mActionItem->cellYTop(),x,y); //moveChild(mActionItem,childX(mActionItem),y); - QScrollView::moveChild( mActionItem,childX(mActionItem),y ); + Q3ScrollView::moveChild( mActionItem,childX(mActionItem),y ); } } else if (mActionType == RESIZEBOTTOM) { if (mCurrentCellY >= mActionItem->cellYTop()) { mActionItem->expandBottom(gy - mCurrentCellY); @@ -1018,9 +1029,9 @@ void KOAgenda::endItemAction() if ( mAllDayMode ) type = -1; KOAgendaItem *modifiedItem = placeItem; //emit itemModified( placeItem, mActionType /*KOGlobals::EVENTEDITED */); - QPtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems ;//= placeItem->conflictItems(); KOAgendaItem *item; if ( placeItem->incidence()->typeID() == todoID ) { mSelectedItem = 0; @@ -1109,9 +1120,9 @@ void KOAgenda::endItemAction() if ( mActionItem ) emit incidenceSelected( mActionItem->incidence() ); mScrollUpTimer.stop(); mScrollDownTimer.stop(); - setCursor( arrowCursor ); + setCursor( Qt::arrowCursor ); mActionItem = 0; mActionType = NOP; mItemMoved = 0; @@ -1135,27 +1146,27 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) if (mAllDayMode) { int gridDistanceX = (x - gx * mGridSpacingX); if (gridDistanceX < mResizeBorderWidth && moveItem->cellX() == gx) { - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else if ((mGridSpacingX - gridDistanceX) < mResizeBorderWidth && moveItem->cellXWidth() == gx) { - setCursor(sizeHorCursor); + setCursor(Qt::sizeHorCursor); } else { - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } } else { int gridDistanceY = (y - gy * mGridSpacingY); if (gridDistanceY < mResizeBorderWidth && moveItem->cellYTop() == gy && !moveItem->firstMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else if ((mGridSpacingY - gridDistanceY) < mResizeBorderWidth && moveItem->cellYBottom() == gy && !moveItem->lastMultiItem()) { - setCursor(sizeVerCursor); + setCursor(Qt::sizeVerCursor); } else { - setCursor(arrowCursor); + setCursor(Qt::arrowCursor); } } } @@ -1172,11 +1183,11 @@ void KOAgenda::setNoActionCursor(KOAgendaItem *moveItem,QPoint viewportPos) */ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) { - QPtrList<KOAgendaItem> conflictItems; + Q3PtrList<KOAgendaItem> conflictItems; int maxSubCells = 0; - QIntDict<KOAgendaItem> subCellDict(7); + Q3IntDict<KOAgendaItem> subCellDict(7); KOAgendaItem *item; for ( item=mItems.first(); item != 0; item=mItems.next() ) { if (item != placeItem) { @@ -1239,9 +1250,9 @@ void KOAgenda::placeSubCells(KOAgendaItem *placeItem) for ( item=conflictItems.first(); item != 0; item=conflictItems.next() ) { if ( placeItem != item ) { KOAgendaItem *item2; - QPtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); + Q3PtrList<KOAgendaItem> conflictItems2 = item->conflictItems(); for ( item2=conflictItems2.first(); item2 != 0; item2=conflictItems2.next() ) { if ( item2->subCells() != maxSubCells) { item2->setSubCells(maxSubCells); @@ -1324,11 +1335,11 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) int off = mSelectionHeight; if ( vySel < 0 ) off += vySel; //qDebug("OFF %d %d %d", off,vySel, vy ); - bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,CopyROP); + bitBlt ( pd, vx, vy+off, &mPaintPixmap, cx, cy+off, cw , ch-off ,QPainter::CompositionMode_Source); } else { - bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); + bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source); } } if ( mSelectionHeight > 0 ) { //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); @@ -1341,9 +1352,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) while ( hei > 0 ) { int p_hei = 5; if ( hei < 5 ) p_hei = hei; hei -= 5; - bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); + bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source); offset += 5; } } } @@ -1364,9 +1375,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) mSelectionCellX * mGridSpacingX; contentsToViewport ( cx, cy, vx,vy); // qDebug(" %d %d %d %d ", cx, cy, cw,ch) ; if ( !(selectionX == cx && cy == mSelectionYTop && cw ==mGridSpacingX && ch == mSelectionHeight ) ) - bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,CopyROP); + bitBlt ( pd, vx, vy, &mPaintPixmap, cx, cy, cw, ch ,QPainter::CompositionMode_Source); if ( mSelectionHeight > 0 ) { //qDebug("---- %d %d %d %d ", selectionX, mSelectionYTop, mGridSpacingX, mSelectionHeight ); if ( ( cx + cw ) >= selectionX && cx <= ( selectionX + mGridSpacingX ) && @@ -1378,9 +1389,9 @@ void KOAgenda::drawContents(QPainter* p, int cx, int cy, int cw, int ch) while ( hei > 0 ) { int p_hei = 5; if ( hei < 5 ) p_hei = hei; hei -= 5; - bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,CopyROP); + bitBlt ( pd, vx+1, vy+offset, &mHighlightPixmap, 0, 0, mGridSpacingX-1, p_hei ,QPainter::CompositionMode_Source); offset += 5; } } } @@ -1575,16 +1586,16 @@ void KOAgenda::drawContentsToPainter( QPainter* paint, bool backgroundOnly )// i // Draw horizontal lines of grid int y = ((int)(cy/lGridSpacingY))*lGridSpacingY; if ( lGridSpacingY > 0 ) { while (y < cy + ch) { - p->setPen( SolidLine ); + p->setPen( Qt::SolidLine ); p->drawLine(cx,y,cx+cw,y); y+=lGridSpacingY; - p->setPen( DotLine ); + p->setPen( Qt::DotLine ); p->drawLine(cx,y,cx+cw,y); y+=lGridSpacingY; } - p->setPen( SolidLine ); + p->setPen( Qt::SolidLine ); } mPixPainter.end() ; } @@ -1716,9 +1727,9 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) item->setCellX(-2, -1 ); item->select(false); mUnusedItems.append( item ); mItems.remove( item ); - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; //globalFlagBlockAgendaItemPaint = 1; for ( itemit=oldconflictItems.first(); itemit != 0; itemit=oldconflictItems.next() ) { @@ -1746,9 +1757,9 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) if ( todo->hasCompletedDate() && !KOPrefs::instance()->mShowCompletedTodoInAgenda ) return; //qDebug("updateTodo+++++++++++++++++++++++++++++++++++++ "); QDate currentDate = QDate::currentDate(); - bool overdue = (!todo->isCompleted()) && (todo->dtDue() < currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); + bool overdue = (!todo->isCompleted()) && (todo->dtDue() < (QDateTime)currentDate)&& ( KOPrefs::instance()->mShowTodoInAgenda ); QDateTime dt; if ( todo->hasCompletedDate() ) dt = todo->completed(); else @@ -1778,9 +1789,9 @@ void KOAgenda::updateTodo( Todo * todo, int days, bool remove) item->show(); } qApp->processEvents(); globalFlagBlockAgendaItemPaint = 0; - QPtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); + Q3PtrList<KOAgendaItem> oldconflictItems = item->conflictItems(); KOAgendaItem *itemit; for ( itemit=oldconflictItems.first(); itemit != 0; itemit=oldconflictItems.next() ) { globalFlagBlockAgendaItemUpdate = 0; @@ -1866,9 +1877,9 @@ void KOAgenda::insertMultiItem (Event *event,QDate qd,int XBegin,int XEnd, QString newtext; int width = XEnd - XBegin + 1; int count = 0; KOAgendaItem *current = 0; - QPtrList<KOAgendaItem> multiItems; + Q3PtrList<KOAgendaItem> multiItems; for (cellX = XBegin;cellX <= XEnd;++cellX) { if (cellX == XBegin) cellYTop = YTop; else cellYTop = 0; if (cellX == XEnd) cellYBottom = YBottom; @@ -1926,9 +1937,9 @@ void KOAgenda::resizeEvent ( QResizeEvent *ev ) { mSelectionHeight = 0; mResizeTimer.start( 150 , true ); computeSizes(); - QScrollView::resizeEvent( ev ); + Q3ScrollView::resizeEvent( ev ); return; } void KOAgenda::computeSizes() @@ -2015,9 +2026,9 @@ void KOAgenda::popupAlarm() return; } // TODO: deal correctly with multiple alarms Alarm* alarm; - QPtrList<Alarm> list(mClickedItem->incidence()->alarms()); + Q3PtrList<Alarm> list(mClickedItem->incidence()->alarms()); for(alarm=list.first();alarm;alarm=list.next()) { alarm->toggleAlarm(); } emit itemModified( mClickedItem , KOGlobals::EVENTEDITED ); @@ -2106,18 +2117,18 @@ void KOAgenda::selectItem(KOAgendaItem *item) // This function seems never be called. void KOAgenda::keyPressEvent( QKeyEvent *kev ) { switch(kev->key()) { - case Key_PageDown: + case Qt::Key_PageDown: verticalScrollBar()->addPage(); break; - case Key_PageUp: + case Qt::Key_PageUp: verticalScrollBar()->subtractPage(); break; - case Key_Down: + case Qt::Key_Down: verticalScrollBar()->addLine(); break; - case Key_Up: + case Qt::Key_Up: verticalScrollBar()->subtractLine(); break; default: ; @@ -2145,9 +2156,9 @@ void KOAgenda::setDateList(const DateList &selectedDates) { mSelectedDates = selectedDates; } -void KOAgenda::setHolidayMask(QMemArray<bool> *mask) +void KOAgenda::setHolidayMask(Q3MemArray<bool> *mask) { mHolidayMask = mask; /* @@ -2161,9 +2172,9 @@ void KOAgenda::setHolidayMask(QMemArray<bool> *mask) void KOAgenda::contentsMousePressEvent ( QMouseEvent *event ) { - QScrollView::contentsMousePressEvent(event); + Q3ScrollView::contentsMousePressEvent(event); } void KOAgenda::storePosition() { @@ -2195,15 +2206,15 @@ void KOAgenda::restorePosition() } void KOAgenda::moveChild( QWidget *w, int x , int y ) { ++x; - QScrollView::moveChild( w, x , y ); + Q3ScrollView::moveChild( w, x , y ); } #include <qmessagebox.h> #ifdef DESKTOP_VERSION #include <qprinter.h> #include <qpainter.h> -#include <qpaintdevicemetrics.h> +#include <q3paintdevicemetrics.h> #endif void KOAgenda::printSelection() { @@ -2230,9 +2241,9 @@ void KOAgenda::printSelection() delete printer; return; } QPainter p( printer ); - QPaintDeviceMetrics m = QPaintDeviceMetrics ( printer ); + Q3PaintDeviceMetrics m = Q3PaintDeviceMetrics ( printer ); QString date = i18n("Date range: ")+KGlobal::locale()->formatDate( mSelectedDates.first() )+" - "+KGlobal::locale()->formatDate( mSelectedDates.last() ); //date += " --- printing time: " + KGlobal::locale()->formatDateTime(QDateTime::currentDateTime(), true ); int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); // p.drawText( 0, 0, date ); |