diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
commit | 1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch) | |
tree | f2defe163a805a9e34a2142dfde4cdb5e49241e7 /kdgantt/KDGanttViewSubwidgets.cpp | |
parent | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff) | |
download | tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip |
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect.
A third and final kdepim commit will repair Qt3 compilation shortly.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.cpp')
-rw-r--r-- | kdgantt/KDGanttViewSubwidgets.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index 197ba18ba..88591e887 100644 --- a/kdgantt/KDGanttViewSubwidgets.cpp +++ b/kdgantt/KDGanttViewSubwidgets.cpp @@ -59,13 +59,13 @@ #include <kdebug.h> KDTimeTableWidget:: KDTimeTableWidget( TQWidget* tqparent,KDGanttView* myGantt) - : TQCanvas (tqparent) + : TQCanvas (TQT_TQOBJECT(tqparent)) { myGanttView = myGantt; taskLinksVisible = true; flag_blockUpdating = false; int_blockUpdating = 0; - gridPen.setStyle(TQt::DotLine); + gridPen.setStyle(Qt::DotLine); gridPen.setColor(TQColor(100,100,100)); maximumComputedGridHeight = 0; denseLineCount = 0; @@ -229,8 +229,8 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( TQPen::NoPen ); - itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); + itcol.current()->setPen( TQPen(TQPen::NoPen) ); + itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); @@ -243,8 +243,8 @@ void KDTimeTableWidget::computeVerticalGrid() templine->setPoints(i+(cw/2),0,i+(cw/2),h); */ temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( TQPen::NoPen ); - temprect->setBrush( TQBrush( colcol, SolidPattern) ); + temprect->setPen( TQPen(TQPen::NoPen) ); + temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -275,16 +275,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( TQPen::NoPen ); - itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); + itcol.current()->setPen( TQPen(TQPen::NoPen) ); + itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( TQPen::NoPen ); - temprect->setBrush( TQBrush( colcol, SolidPattern) ); + temprect->setPen( TQPen(TQPen::NoPen) ); + temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -331,16 +331,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( TQPen::NoPen ); - itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); + itcol.current()->setPen( TQPen(TQPen::NoPen) ); + itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( TQPen::NoPen ); - temprect->setBrush( TQBrush( colcol, SolidPattern) ); + temprect->setPen( TQPen(TQPen::NoPen) ); + temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); temprect->setSize(mid,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -385,16 +385,16 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( TQPen::NoPen ); - itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); + itcol.current()->setPen( TQPen(TQPen::NoPen) ); + itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( TQPen::NoPen ); - temprect->setBrush( TQBrush( colcol, SolidPattern) ); + temprect->setPen( TQPen(TQPen::NoPen) ); + temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); temprect->setSize(mid ,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu() if (flagZoomToFit) myPopupMenu->changeItem( 1, i18n("Zoom (Fit)")); else - myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( TQString::number( zoomFactor(), 'f',3) ) ); + myPopupMenu->changeItem( 1, i18n("Zoom (%1)").tqarg( TQString::number( zoomFactor(), 'f',3) ) ); int i = 0; int id; while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) { @@ -2447,16 +2447,16 @@ void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e ) { mouseDown = false; switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: mouseDown = true; beginMouseDown = e->pos().x(); endMouseDown = e->pos().x(); break; - case RightButton: + case Qt::RightButton: if (flagShowPopupMenu) myPopupMenu->popup(e->globalPos()); break; - case MidButton: + case Qt::MidButton: break; default: break; @@ -2539,7 +2539,7 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) ***************************************************************** */ KDLegendWidget:: KDLegendWidget( TQWidget* tqparent, KDGanttMinimizeSplitter* legendParent ) : - KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Vertical, + KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before, Qt::Vertical, tqparent) { myLegendParent = legendParent; @@ -2645,9 +2645,9 @@ void KDLegendWidget::clearLegend ( ) { if ( myLegend ) delete myLegend; if ( dock ) - myLegend = new TQGroupBox( 1, TQt::Horizontal, scroll->viewport() ); + myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() ); else - myLegend = new TQGroupBox( 1, TQt::Horizontal, i18n( "Legend" ), scroll->viewport() ); + myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() ); myLegend->setBackgroundColor( TQt::white ); myLegend->setFont( font() ); scroll->addChild( myLegend ); @@ -2884,7 +2884,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) c = fc; // draw to last interesting column - const TQColorGroup &cg = ( palette().inactive() ); + const TQColorGroup &cg = ( tqpalette().inactive() ); while ( c < lc && !drawables.isEmpty() ) { int i = header()->mapToLogical( c ); @@ -3516,7 +3516,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) currentItem = 0; movingItem = 0; mouseDown = true; - if (e->button() == RightButton && mySignalSender->editable()) { + if (e->button() == Qt::RightButton && mySignalSender->editable()) { lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y())); if ( lastClickedItem ) { if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) { @@ -3537,7 +3537,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3590,7 +3590,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case RightButton: + case Qt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3602,7 +3602,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case MidButton: + case Qt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3618,10 +3618,10 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } } - if (e->button() == RightButton ) { + if (e->button() == Qt::RightButton ) { mySignalSender->gvContextMenuRequested( currentItem, e->globalPos() ); } - if (autoScrollEnabled && e->button() == LeftButton) { + if (autoScrollEnabled && e->button() == Qt::LeftButton) { myScrollTimer->start(50); } } @@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) // if ( currentLink || currentItem ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: myScrollTimer->stop(); { mySignalSender->itemLeftClicked( currentItem ); @@ -3675,7 +3675,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) movingGVItem = 0; } break; - case RightButton: + case Qt::RightButton: { mySignalSender->itemRightClicked( currentItem ); mySignalSender->gvItemRightClicked( currentItem ); @@ -3684,7 +3684,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) if ( currentLink ) mySignalSender->taskLinkRightClicked( currentLink ); break; - case MidButton: + case Qt::MidButton: { mySignalSender->itemMidClicked( currentItem ); mySignalSender->gvItemMidClicked( currentItem ); @@ -3713,7 +3713,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) { TQCanvasItemList il = canvas() ->collisions ( e->pos() ); - if ( il.isEmpty() && e->button() == LeftButton ) { + if ( il.isEmpty() && e->button() == Qt::LeftButton ) { //not directly sending a signal here (encapsulation and whatnot) mySignalSender->emptySpaceDoubleClicked(e); return; @@ -3722,7 +3722,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case LeftButton: + case Qt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: if ( getItem(*it)->enabled() ) @@ -3739,7 +3739,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) } break; /* - case RightButton: + case Qt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: mySignalSender->itemRightClicked(getItem(*it)); @@ -3751,7 +3751,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) break; } break; - case MidButton: + case Qt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: mySignalSender->itemMidClicked(getItem(*it)); @@ -4024,8 +4024,8 @@ void KDIntervalColorRectangle::tqlayout( KDTimeHeaderWidget* timeHeader, int hei int right = timeHeader->getCoordX(mEnd); if ( right == left ) ++right; - setPen( TQPen::NoPen ); - setBrush( TQBrush(mColor, SolidPattern) ); + setPen( TQPen(TQPen::NoPen) ); + setBrush( TQBrush(mColor, Qt::SolidPattern) ); setSize( right - left, height ); move( left, 0 ); show(); |