diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 11:54:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-16 23:37:57 +0900 |
commit | ef06f14f2475bd08d3ea2ceec54a7b2238f3554e (patch) | |
tree | 03df826633e4ba084d133ca977c4fc37c74f21ac /kdgantt | |
parent | 895081803a715ee89f4a90cfbf63d558ef2b2ebc (diff) | |
download | koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.tar.gz koffice-ef06f14f2475bd08d3ea2ceec54a7b2238f3554e.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kdgantt')
-rw-r--r-- | kdgantt/KDGanttMinimizeSplitter.cpp | 56 | ||||
-rw-r--r-- | kdgantt/KDGanttMinimizeSplitter.h | 8 | ||||
-rw-r--r-- | kdgantt/KDGanttSemiSizingControl.cpp | 24 | ||||
-rw-r--r-- | kdgantt/KDGanttSemiSizingControl.h | 10 | ||||
-rw-r--r-- | kdgantt/KDGanttView.cpp | 6 | ||||
-rw-r--r-- | kdgantt/KDGanttViewItem.cpp | 12 | ||||
-rw-r--r-- | kdgantt/KDGanttViewSubwidgets.cpp | 52 | ||||
-rw-r--r-- | kdgantt/KDGanttViewTaskLink.cpp | 4 | ||||
-rw-r--r-- | kdgantt/KDGanttXMLTools.cpp | 100 | ||||
-rw-r--r-- | kdgantt/KDGanttXMLTools.h | 8 |
10 files changed, 140 insertions, 140 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index bf70e678..1f772e69 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -57,7 +57,7 @@ static int mouseOffset; static int opaqueOldPos = -1; //### there's only one mouse, but this is a bit risky -KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, +KDGanttSplitterHandle::KDGanttSplitterHandle( TQt::Orientation o, KDGanttMinimizeSplitter *parent, const char * name ) : TQWidget( parent, name ), _activeButton( 0 ), _collapsed( false ) { @@ -71,11 +71,11 @@ TQSize KDGanttSplitterHandle::sizeHint() const return TQSize(8,8); } -void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) +void KDGanttSplitterHandle::setOrientation( TQt::Orientation o ) { orient = o; #ifndef TQT_NO_CURSOR - if ( o == Qt::Horizontal ) + if ( o == TQt::Horizontal ) setCursor( splitHCursor ); else setCursor( splitVCursor ); @@ -86,7 +86,7 @@ void KDGanttSplitterHandle::setOrientation( Qt::Orientation o ) void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e ) { updateCursor( e->pos() ); - if ( !(e->state()&Qt::LeftButton) ) + if ( !(e->state()&TQt::LeftButton) ) return; if ( _activeButton != 0) @@ -106,7 +106,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e ) void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::LeftButton ) { + if ( e->button() == TQt::LeftButton ) { _activeButton = onButton( e->pos() ); mouseOffset = s->pick(e->pos()); if ( _activeButton != 0) @@ -121,7 +121,7 @@ void KDGanttSplitterHandle::updateCursor( const TQPoint& p) setCursor( arrowCursor ); } else { - if ( orient == Qt::Horizontal ) + if ( orient == TQt::Horizontal ) setCursor( splitHCursor ); else setCursor( splitVCursor ); @@ -160,7 +160,7 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e ) updateCursor( e->pos() ); } else { - if ( !opaque() && e->button() == Qt::LeftButton ) { + if ( !opaque() && e->button() == TQt::LeftButton ) { TQCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; s->setRubberband( -1 ); @@ -386,7 +386,7 @@ static TQSize minSizeHint( const TQWidget* w ) KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *parent, const char *name ) :TQFrame(parent,name,WPaintUnclipped) { - orient =Qt::Horizontal; + orient =TQt::Horizontal; init(); } @@ -394,7 +394,7 @@ KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQWidget *parent, const char * Constructs a splitter with orientation \a o with the \a parent and \a name arguments being passed on to the TQFrame constructor. */ -KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( Qt::Orientation o, TQWidget *parent, const char *name ) +KDGanttMinimizeSplitter::KDGanttMinimizeSplitter( TQt::Orientation o, TQWidget *parent, const char *name ) :TQFrame(parent,name,WPaintUnclipped) { orient = o; @@ -414,7 +414,7 @@ KDGanttMinimizeSplitter::~KDGanttMinimizeSplitter() void KDGanttMinimizeSplitter::init() { data = new TQSplitterData; - if ( orient ==Qt::Horizontal ) + if ( orient ==TQt::Horizontal ) setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) ); else setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) ); @@ -426,15 +426,15 @@ void KDGanttMinimizeSplitter::init() \brief the orientation of the splitter By default the orientation is horizontal (the widgets are side by side). - The possible orientations are Qt::Vertical and Qt::Horizontal (the default). + The possible orientations are TQt::Vertical and TQt::Horizontal (the default). */ -void KDGanttMinimizeSplitter::setOrientation( Qt::Orientation o ) +void KDGanttMinimizeSplitter::setOrientation( TQt::Orientation o ) { if ( orient == o ) return; orient = o; - if ( orient ==Qt::Horizontal ) + if ( orient ==TQt::Horizontal ) setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); else setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); @@ -564,7 +564,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) TQRect r = contentsRect(); const int rBord = 3; //Themable???? int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this); - if ( orient ==Qt::Horizontal ) { + if ( orient ==TQt::Horizontal ) { if ( opaqueOldPos >= 0 ) paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), 2*rBord, r.height() ); @@ -604,7 +604,7 @@ void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p, TQCOORD x, TQCOORD y, TQCOORD w, TQCOORD h ) { style().tqdrawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), colorGroup(), - (orientation() == Qt::Horizontal ? + (orientation() == TQt::Horizontal ? TQStyle::Style_Horizontal : 0)); } @@ -646,9 +646,9 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id ) p = adjustPos( p, id ); KDGanttSplitterLayoutStruct *s = data->list.at(id); - int oldP = orient ==Qt::Horizontal ? s->wid->x() : s->wid->y(); + int oldP = orient ==TQt::Horizontal ? s->wid->x() : s->wid->y(); bool upLeft; - if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==TQt::Horizontal ) { p += s->wid->width(); upLeft = p > oldP; } else @@ -663,8 +663,8 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id ) void KDGanttMinimizeSplitter::setG( TQWidget *w, int p, int s, bool isSplitter ) { - if ( orient ==Qt::Horizontal ) { - if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal && !isSplitter ) + if ( orient ==TQt::Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==TQt::Horizontal && !isSplitter ) p = contentsRect().width() - p - s; w->setGeometry( p, contentsRect().y(), s, contentsRect().height() ); } else @@ -690,7 +690,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) } else if ( s->isSplitter ) { int pos1, pos2; int dd = s->sizer; - if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + if( TQApplication::reverseLayout() && orient ==TQt::Horizontal ) { pos1 = pos; pos2 = pos + dd; } else { @@ -706,7 +706,7 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) } } else { int dd, newLeft, nextPos; - if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + if( TQApplication::reverseLayout() && orient ==TQt::Horizontal ) { dd = w->geometry().right() - pos; dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize()))); newLeft = pos+1; @@ -743,7 +743,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) } else if ( s->isSplitter ) { int dd = s->sizer; int pos1, pos2; - if( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + if( TQApplication::reverseLayout() && orient ==TQt::Horizontal ) { pos2 = pos - dd; pos1 = pos2 + 1; } else { @@ -760,7 +760,7 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) } else { int left = pick( w->pos() ); int right, dd,/* newRight,*/ newLeft, nextPos; - if ( TQApplication::reverseLayout() && orient ==Qt::Horizontal ) { + if ( TQApplication::reverseLayout() && orient ==TQt::Horizontal ) { dd = pos - left + 1; dd = TQMAX( pick(minSize(w)), TQMIN(dd, pick(w->maximumSize()))); newLeft = pos-dd+1; @@ -838,7 +838,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) } } TQRect r = contentsRect(); - if ( orient ==Qt::Horizontal && TQApplication::reverseLayout() ) { + if ( orient ==TQt::Horizontal && TQApplication::reverseLayout() ) { int splitterWidth = style().pixelMetric(TQStyle::PM_SplitterWidth, this); if ( min ) *min = pick(r.topRight()) - TQMIN( maxB, pick(r.size())-minA ) - splitterWidth; @@ -977,7 +977,7 @@ void KDGanttMinimizeSplitter::recalc( bool update ) if ( maxt < mint ) maxt = mint; - if ( orient ==Qt::Horizontal ) { + if ( orient ==TQt::Horizontal ) { setMaximumSize( maxl, maxt ); setMinimumSize( minl, mint ); } else { @@ -1129,7 +1129,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const } } } - return orientation() ==Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); + return orientation() ==TQt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); } @@ -1159,7 +1159,7 @@ TQSize KDGanttMinimizeSplitter::minimumSizeHint() const } } } - return orientation() ==Qt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); + return orientation() ==TQt::Horizontal ? TQSize( l, t ) : TQSize( t, l ); } @@ -1533,7 +1533,7 @@ void kdganttGeomCalc( TQMemArray<TQLayoutStruct> &chain, int start, int count, i */ /*! - \fn Qt::Orientation KDGanttMinimizeSplitter::orientation() const + \fn TQt::Orientation KDGanttMinimizeSplitter::orientation() const Returns the orientation of the splitter. */ diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h index 7afa7547..b70c5181 100644 --- a/kdgantt/KDGanttMinimizeSplitter.h +++ b/kdgantt/KDGanttMinimizeSplitter.h @@ -108,14 +108,14 @@ private: void setG( TQWidget *w, int p, int s, bool isSplitter = FALSE ); TQCOORD pick( const TQPoint &p ) const - { return orient ==Qt::Horizontal ? p.x() : p.y(); } + { return orient ==TQt::Horizontal ? p.x() : p.y(); } TQCOORD pick( const TQSize &s ) const - { return orient ==Qt::Horizontal ? s.width() : s.height(); } + { return orient ==TQt::Horizontal ? s.width() : s.height(); } TQCOORD trans( const TQPoint &p ) const - { return orient ==Qt::Vertical ? p.x() : p.y(); } + { return orient ==TQt::Vertical ? p.x() : p.y(); } TQCOORD trans( const TQSize &s ) const - { return orient ==Qt::Vertical ? s.width() : s.height(); } + { return orient ==TQt::Vertical ? s.width() : s.height(); } TQSplitterData *data; diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp index 16fa3b7b..6de8d0a4 100644 --- a/kdgantt/KDGanttSemiSizingControl.cpp +++ b/kdgantt/KDGanttSemiSizingControl.cpp @@ -65,7 +65,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* parent, const char* name ) : - KDGanttSizingControl( parent, name ), _orient(Qt::Horizontal ), + KDGanttSizingControl( parent, name ), _orient(TQt::Horizontal ), _arrowPos( Before ), _minimizedWidget(0), _maximizedWidget(0) { init(); @@ -84,7 +84,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQWidget* parent, the base class. */ -KDGanttSemiSizingControl::KDGanttSemiSizingControl( Qt::Orientation orientation, +KDGanttSemiSizingControl::KDGanttSemiSizingControl( TQt::Orientation orientation, TQWidget* parent, const char* name ) : KDGanttSizingControl( parent, name ), _orient( orientation ), @@ -108,7 +108,7 @@ KDGanttSemiSizingControl::KDGanttSemiSizingControl( Qt::Orientation orientation, */ KDGanttSemiSizingControl::KDGanttSemiSizingControl( ArrowPosition arrowPosition, - Qt::Orientation orientation, + TQt::Orientation orientation, TQWidget* parent, const char* name ) : KDGanttSizingControl( parent, name ), _orient( orientation ), @@ -186,7 +186,7 @@ TQWidget* KDGanttSemiSizingControl::maximizedWidget() const \sa orientation() */ -void KDGanttSemiSizingControl::setOrientation( Qt::Orientation orientation ) +void KDGanttSemiSizingControl::setOrientation( TQt::Orientation orientation ) { if ( _orient != orientation ) { _orient = orientation; @@ -201,7 +201,7 @@ void KDGanttSemiSizingControl::setOrientation( Qt::Orientation orientation ) \sa setOrientation() */ -Qt::Orientation KDGanttSemiSizingControl::orientation() const +TQt::Orientation KDGanttSemiSizingControl::orientation() const { return _orient; } @@ -262,12 +262,12 @@ void KDGanttSemiSizingControl::setup() delete _layout; TQBoxLayout* butLayout; // _layout will delete me - if ( _orient ==Qt::Horizontal || isMinimized() ) + if ( _orient ==TQt::Horizontal || isMinimized() ) _layout = new TQHBoxLayout( this ); else _layout = new TQVBoxLayout( this ); - if ( _orient ==Qt::Vertical && !isMinimized() ) + if ( _orient ==TQt::Vertical && !isMinimized() ) butLayout = new TQHBoxLayout( _layout ); else butLayout = new TQVBoxLayout( _layout ); @@ -288,7 +288,7 @@ void KDGanttSemiSizingControl::setup() } //------------------------------ Setup the button at the correct possition - if ( _arrowPos == After && _orient ==Qt::Vertical && !isMinimized() ) { + if ( _arrowPos == After && _orient ==TQt::Vertical && !isMinimized() ) { butLayout->addStretch( 1 ); butLayout->addWidget( _but, 0, TQt::AlignLeft ); } @@ -305,7 +305,7 @@ void KDGanttSemiSizingControl::setup() else widget = _maximizedWidget; if( widget ) { - if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==TQt::Vertical && !isMinimized() ) _layout->addWidget( widget, 1 ); else _layout->insertWidget( 0, widget, 1 ); @@ -318,20 +318,20 @@ void KDGanttSemiSizingControl::setup() if ( isMinimized() ) { widget = _minimizedWidget; if( widget ) { - if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==TQt::Vertical && !isMinimized() ) _layout->addWidget( widget, 1 ); else _layout->insertWidget( 0, widget, 1 ); } } else { - if ( _arrowPos == Before || _orient ==Qt::Vertical && !isMinimized() ) + if ( _arrowPos == Before || _orient ==TQt::Vertical && !isMinimized() ) _layout->addStretch( 1 ); else _layout->insertStretch( 0, 1 ); widget = _maximizedWidget; // the following is only the special case - // arrowPos == Before and _orient ==Qt::Vertical + // arrowPos == Before and _orient ==TQt::Vertical //widget->move( 0+x(), _but->height()+y()); } } diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h index d5a09b46..a6d29e54 100644 --- a/kdgantt/KDGanttSemiSizingControl.h +++ b/kdgantt/KDGanttSemiSizingControl.h @@ -51,10 +51,10 @@ public: enum ArrowPosition { Before, After }; KDGanttSemiSizingControl( TQWidget* parent = 0, const char* name = 0 ); - KDGanttSemiSizingControl( Qt::Orientation orientation, TQWidget* parent = 0, + KDGanttSemiSizingControl( TQt::Orientation orientation, TQWidget* parent = 0, const char* name = 0 ); KDGanttSemiSizingControl( ArrowPosition arrowPosition, - Qt::Orientation orientation, TQWidget* parent = 0, + TQt::Orientation orientation, TQWidget* parent = 0, const char* name = 0 ); void setMinimizedWidget( TQWidget* widget ); @@ -62,8 +62,8 @@ public: TQWidget* minimizedWidget() const; TQWidget* maximizedWidget() const; - void setOrientation( Qt::Orientation orientation ); - Qt::Orientation orientation() const; + void setOrientation( TQt::Orientation orientation ); + TQt::Orientation orientation() const; void setArrowPosition( ArrowPosition arrowPosition ); ArrowPosition arrowPosition() const; @@ -79,7 +79,7 @@ protected: TQPixmap pixmap( Direction ); private: - Qt::Orientation _orient; + TQt::Orientation _orient; ArrowPosition _arrowPos; TQWidget* _minimizedWidget; TQWidget* _maximizedWidget; diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 4269e533..1d1a3e4d 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -81,7 +81,7 @@ */ KDGanttView::KDGanttView( TQWidget* parent, const char* name ) - : KDGanttMinimizeSplitter( Qt::Vertical, parent, name ), + : KDGanttMinimizeSplitter( TQt::Vertical, parent, name ), myCanvasView(0), myTimeHeaderScroll(0) { @@ -458,11 +458,11 @@ void KDGanttView::slotmouseButtonClicked ( int button, TQListViewItem * item, //emit mouseButtonClicked ( button , gItem, pos, c ); { switch ( button ) { - case Qt::LeftButton: + case TQt::LeftButton: emit lvItemLeftClicked( gItem ); emit itemLeftClicked( gItem ); break; - case Qt::MidButton: + case TQt::MidButton: emit lvItemMidClicked( gItem ); emit itemMidClicked( gItem ); break; diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index 5c3825a3..e7a550de 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.cpp @@ -916,10 +916,10 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, // items which don't have any shapes return; } - item->setBrush(Qt::SolidPattern); + item->setBrush(TQt::SolidPattern); item->setZ(5); itemShape = (KDCanvasPolygonItem*) item; - itemBack->setBrush(Qt::SolidPattern); + itemBack->setBrush(TQt::SolidPattern); itemBack->setZ(3); itemShapeBack = (KDCanvasPolygonItem*) itemBack; @@ -1306,11 +1306,11 @@ void KDGanttViewItem::updateCanvasItems() if (blockUpdating) return; TQPen p,pBack; TQBrush b; - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if ( enabled() ) { textCanvas->setColor(myTextColor); if (isHighlighted) { - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(myStartColorHL); startShape->setBrush(b); b.setColor(myMiddleColorHL); @@ -1323,7 +1323,7 @@ void KDGanttViewItem::updateCanvasItems() p.setColor(myEndColorHL); endLine->setPen(p); } else { - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(myStartColor); // tqDebug("update color %s %s", listViewText().latin1(),myStartColor.name().latin1() ); startShape->setBrush(b); @@ -1341,7 +1341,7 @@ void KDGanttViewItem::updateCanvasItems() //TQColor discol = TQt::lightGray; TQColor discol = TQColor(232,232,232); textCanvas->setColor( TQColor(150,150,150) ); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); b.setColor(discol); startShape->setBrush(b); midShape->setBrush(b); diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index 027e1b81..443eeb74 100644 --- a/kdgantt/KDGanttViewSubwidgets.cpp +++ b/kdgantt/KDGanttViewSubwidgets.cpp @@ -65,7 +65,7 @@ KDTimeTableWidget:: KDTimeTableWidget( TQWidget* parent,KDGanttView* myGantt) taskLinksVisible = true; flag_blockUpdating = false; int_blockUpdating = 0; - gridPen.setStyle(Qt::DotLine); + gridPen.setStyle(TQt::DotLine); gridPen.setColor(TQColor(100,100,100)); maximumComputedGridHeight = 0; denseLineCount = 0; @@ -229,7 +229,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setPen( TQt::NoPen ); itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); @@ -243,7 +243,7 @@ void KDTimeTableWidget::computeVerticalGrid() templine->setPoints(i+(cw/2),0,i+(cw/2),h); */ temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( Qt::NoPen ); + temprect->setPen( TQt::NoPen ); temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); @@ -275,7 +275,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ - itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setPen( TQt::NoPen ); itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); @@ -283,7 +283,7 @@ void KDTimeTableWidget::computeVerticalGrid() ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( Qt::NoPen ); + temprect->setPen( TQt::NoPen ); temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); @@ -331,7 +331,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setPen( TQt::NoPen ); itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); @@ -339,7 +339,7 @@ void KDTimeTableWidget::computeVerticalGrid() ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( Qt::NoPen ); + temprect->setPen( TQt::NoPen ); temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(mid,h ); temprect->move( left, 0 ); @@ -385,7 +385,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPen(colPen); itcol.current()->setPoints(i+mid,0,mid,h); */ - itcol.current()->setPen( Qt::NoPen ); + itcol.current()->setPen( TQt::NoPen ); itcol.current()->setBrush( TQBrush( colcol, SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); @@ -393,7 +393,7 @@ void KDTimeTableWidget::computeVerticalGrid() ++itcol; } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); - temprect->setPen( Qt::NoPen ); + temprect->setPen( TQt::NoPen ); temprect->setBrush( TQBrush( colcol, SolidPattern) ); temprect->setSize(mid ,h ); temprect->move( left, 0 ); @@ -1494,7 +1494,7 @@ void KDTimeHeaderWidget::computeIntervals( int height ) right = getCoordX((*it).end); if ( right == left ) ++right; - (*it).canvasRect->setPen( Qt::NoPen ); + (*it).canvasRect->setPen( TQt::NoPen ); (*it).canvasRect->setBrush( TQBrush( (*it).color, SolidPattern) ); (*it).canvasRect->setSize( right - left ,height ); (*it).canvasRect->move( left,0 ); @@ -2459,16 +2459,16 @@ void KDTimeHeaderWidget::mousePressEvent ( TQMouseEvent * e ) { mouseDown = false; switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: mouseDown = true; beginMouseDown = e->pos().x(); endMouseDown = e->pos().x(); break; - case Qt::RightButton: + case TQt::RightButton: if (flagShowPopupMenu) myPopupMenu->popup(e->globalPos()); break; - case Qt::MidButton: + case TQt::MidButton: break; default: break; @@ -2551,7 +2551,7 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) ***************************************************************** */ KDLegendWidget:: KDLegendWidget( TQWidget* parent, KDGanttMinimizeSplitter* legendParent ) : - KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before,Qt::Vertical, + KDGanttSemiSizingControl ( KDGanttSemiSizingControl::Before,TQt::Vertical, parent) { myLegendParent = legendParent; @@ -2657,9 +2657,9 @@ void KDLegendWidget::clearLegend ( ) { if ( myLegend ) delete myLegend; if ( dock ) - myLegend = new TQGroupBox( 1, Qt::Horizontal, scroll->viewport() ); + myLegend = new TQGroupBox( 1, TQt::Horizontal, scroll->viewport() ); else - myLegend = new TQGroupBox( 1, Qt::Horizontal, i18n( "Legend" ), scroll->viewport() ); + myLegend = new TQGroupBox( 1, TQt::Horizontal, i18n( "Legend" ), scroll->viewport() ); myLegend->setBackgroundColor( TQt::white ); myLegend->setFont( font() ); scroll->addChild( myLegend ); @@ -3510,7 +3510,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) setFocus(); currentLink = 0; currentItem = 0; - if (e->button() == Qt::RightButton && mySignalSender->editable()) { + if (e->button() == TQt::RightButton && mySignalSender->editable()) { lastClickedItem = (KDGanttViewItem*) mySignalSender->myListView->itemAt( TQPoint(2,e->pos().y())); if ( lastClickedItem ) { if ( lastClickedItem->displaySubitemsAsGroup() && ! lastClickedItem->isOpen() ) { @@ -3531,7 +3531,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3554,7 +3554,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case Qt::RightButton: + case TQt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3566,7 +3566,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case Qt::MidButton: + case TQt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3582,10 +3582,10 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } } - if (e->button() == Qt::RightButton ) { + if (e->button() == TQt::RightButton ) { mySignalSender->gvContextMenuRequested( currentItem, e->globalPos() ); } - if (autoScrollEnabled && e->button() == Qt::LeftButton) { + if (autoScrollEnabled && e->button() == TQt::LeftButton) { myScrollTimer->start(50); } } @@ -3606,7 +3606,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) // if ( currentLink || currentItem ) { switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: myScrollTimer->stop(); { mySignalSender->itemLeftClicked( currentItem ); @@ -3634,7 +3634,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) } fromItem = 0; break; - case Qt::RightButton: + case TQt::RightButton: { mySignalSender->itemRightClicked( currentItem ); mySignalSender->gvItemRightClicked( currentItem ); @@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) if ( currentLink ) mySignalSender->taskLinkRightClicked( currentLink ); break; - case Qt::MidButton: + case TQt::MidButton: { mySignalSender->itemMidClicked( currentItem ); mySignalSender->gvItemMidClicked( currentItem ); @@ -3674,7 +3674,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) TQCanvasItemList::Iterator it; for ( it = il.begin(); it != il.end(); ++it ) { switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: if ( getItem(*it)->enabled() ) diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index fdf4e7ec..6409370a 100644 --- a/kdgantt/KDGanttViewTaskLink.cpp +++ b/kdgantt/KDGanttViewTaskLink.cpp @@ -268,7 +268,7 @@ void KDGanttViewTaskLink::showMe( bool visible ) TQPen p; TQBrush b; p.setWidth(wid); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if (ishighlighted) { b.setColor(myColorHL); p.setColor(myColorHL); @@ -333,7 +333,7 @@ void KDGanttViewTaskLink::showMeType( bool visible ) TQPen p; TQBrush b; p.setWidth(wid); - b.setStyle(Qt::SolidPattern); + b.setStyle(TQt::SolidPattern); if (ishighlighted) { b.setColor(myColorHL); p.setColor(myColorHL); diff --git a/kdgantt/KDGanttXMLTools.cpp b/kdgantt/KDGanttXMLTools.cpp index f2868ed9..78b25ea3 100644 --- a/kdgantt/KDGanttXMLTools.cpp +++ b/kdgantt/KDGanttXMLTools.cpp @@ -266,20 +266,20 @@ void createTimeNode( TQDomDocument& doc, TQDomNode& parent, } -TQString penStyleToString( Qt::PenStyle style ) +TQString penStyleToString( TQt::PenStyle style ) { switch( style ) { - case Qt::NoPen: + case TQt::NoPen: return "NoPen"; - case Qt::SolidLine: + case TQt::SolidLine: return "SolidLine"; - case Qt::DashLine: + case TQt::DashLine: return "DashLine"; - case Qt::DotLine: + case TQt::DotLine: return "DotLine"; - case Qt::DashDotLine: + case TQt::DashDotLine: return "DashDotLine"; - case Qt::DashDotDotLine: + case TQt::DashDotDotLine: return "DashDotDotLine"; default: // should not happen return "SolidLine"; @@ -288,39 +288,39 @@ TQString penStyleToString( Qt::PenStyle style ) -TQString brushStyleToString( Qt::BrushStyle style ) +TQString brushStyleToString( TQt::BrushStyle style ) { // PENDING(kalle) Support custom patterns switch( style ) { - case Qt::NoBrush: + case TQt::NoBrush: return "NoBrush"; - case Qt::SolidPattern: + case TQt::SolidPattern: return "SolidPattern"; - case Qt::Dense1Pattern: + case TQt::Dense1Pattern: return "Dense1Pattern"; - case Qt::Dense2Pattern: + case TQt::Dense2Pattern: return "Dense2Pattern"; - case Qt::Dense3Pattern: + case TQt::Dense3Pattern: return "Dense3Pattern"; - case Qt::Dense4Pattern: + case TQt::Dense4Pattern: return "Dense4Pattern"; - case Qt::Dense5Pattern: + case TQt::Dense5Pattern: return "Dense5Pattern"; - case Qt::Dense6Pattern: + case TQt::Dense6Pattern: return "Dense6Pattern"; - case Qt::Dense7Pattern: + case TQt::Dense7Pattern: return "Dense7Pattern"; - case Qt::HorPattern: + case TQt::HorPattern: return "HorPattern"; - case Qt::VerPattern: + case TQt::VerPattern: return "VerPattern"; - case Qt::CrossPattern: + case TQt::CrossPattern: return "CrossPattern"; - case Qt::BDiagPattern: + case TQt::BDiagPattern: return "BDiagPattern"; - case Qt::FDiagPattern: + case TQt::FDiagPattern: return "FDiagPattern"; - case Qt::DiagCrossPattern: + case TQt::DiagCrossPattern: return "DiagCrossPattern"; default: // should not happen (but can for a custom pattern) return "SolidPattern"; @@ -399,7 +399,7 @@ bool readBrushNode( const TQDomElement& element, TQBrush& brush ) { bool ok = true; TQColor tempColor; - Qt::BrushStyle tempStyle; + TQt::BrushStyle tempStyle; TQPixmap tempPixmap; TQDomNode node = element.firstChild(); while( !node.isNull() ) { @@ -506,7 +506,7 @@ bool readPenNode( const TQDomElement& element, TQPen& pen ) bool ok = true; int tempWidth; TQColor tempColor; - Qt::PenStyle tempStyle; + TQt::PenStyle tempStyle; TQDomNode node = element.firstChild(); while( !node.isNull() ) { TQDomElement element = node.toElement(); @@ -705,60 +705,60 @@ bool readTimeNode( const TQDomElement& element, TQTime& value ) -Qt::PenStyle stringToPenStyle( const TQString& style ) +TQt::PenStyle stringToPenStyle( const TQString& style ) { if( style == "NoPen" ) - return Qt::NoPen; + return TQt::NoPen; else if( style == "SolidLine" ) - return Qt::SolidLine; + return TQt::SolidLine; else if( style == "DashLine" ) - return Qt::DashLine; + return TQt::DashLine; else if( style == "DotLine" ) - return Qt::DotLine; + return TQt::DotLine; else if( style == "DashDotLine" ) - return Qt::DashDotLine; + return TQt::DashDotLine; else if( style == "DashDotDotLine" ) - return Qt::DashDotDotLine; + return TQt::DashDotDotLine; else // should not happen - return Qt::SolidLine; + return TQt::SolidLine; } -Qt::BrushStyle stringToBrushStyle( const TQString& style ) +TQt::BrushStyle stringToBrushStyle( const TQString& style ) { // PENDING(kalle) Support custom patterns if( style == "NoBrush" ) - return Qt::NoBrush; + return TQt::NoBrush; else if( style == "SolidPattern" ) - return Qt::SolidPattern; + return TQt::SolidPattern; else if( style == "Dense1Pattern" ) - return Qt::Dense1Pattern; + return TQt::Dense1Pattern; else if( style == "Dense2Pattern" ) - return Qt::Dense2Pattern; + return TQt::Dense2Pattern; else if( style == "Dense3Pattern" ) - return Qt::Dense3Pattern; + return TQt::Dense3Pattern; else if( style == "Dense4Pattern" ) - return Qt::Dense4Pattern; + return TQt::Dense4Pattern; else if( style == "Dense5Pattern" ) - return Qt::Dense5Pattern; + return TQt::Dense5Pattern; else if( style == "Dense6Pattern" ) - return Qt::Dense6Pattern; + return TQt::Dense6Pattern; else if( style == "Dense7Pattern" ) - return Qt::Dense7Pattern; + return TQt::Dense7Pattern; else if( style == "HorPattern" ) - return Qt::HorPattern; + return TQt::HorPattern; else if( style == "VerPattern" ) - return Qt::VerPattern; + return TQt::VerPattern; else if( style == "CrossPattern" ) - return Qt::CrossPattern; + return TQt::CrossPattern; else if( style == "BDiagPattern" ) - return Qt::BDiagPattern; + return TQt::BDiagPattern; else if( style == "FDiagPattern" ) - return Qt::FDiagPattern; + return TQt::FDiagPattern; else if( style == "DiagCrossPattern" ) - return Qt::DiagCrossPattern; + return TQt::DiagCrossPattern; else // should not happen (but can with custom patterns) - return Qt::SolidPattern; + return TQt::SolidPattern; } } diff --git a/kdgantt/KDGanttXMLTools.h b/kdgantt/KDGanttXMLTools.h index 992daba3..f3304559 100644 --- a/kdgantt/KDGanttXMLTools.h +++ b/kdgantt/KDGanttXMLTools.h @@ -45,10 +45,10 @@ #include <tqdatetime.h> namespace KDGanttXML { - TQString penStyleToString( Qt::PenStyle style ); - Qt::PenStyle stringToPenStyle( const TQString& style ); - TQString brushStyleToString( Qt::BrushStyle style ); - Qt::BrushStyle stringToBrushStyle( const TQString& style ); + TQString penStyleToString( TQt::PenStyle style ); + TQt::PenStyle stringToPenStyle( const TQString& style ); + TQString brushStyleToString( TQt::BrushStyle style ); + TQt::BrushStyle stringToBrushStyle( const TQString& style ); void createBoolNode( TQDomDocument& doc, TQDomNode& parent, const TQString& elementName, bool value ); |