diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-09 10:37:12 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-09 10:56:59 +0900 |
commit | 98876ba8c52c0fc2f38c258476bc9637f055d576 (patch) | |
tree | c603affd2b47d424507127e5bff9231bb06fc020 /kdgantt | |
parent | f46438dda23948d5a4732428a1df913b3246fed8 (diff) | |
download | tdepim-98876ba8c52c0fc2f38c258476bc9637f055d576.tar.gz tdepim-98876ba8c52c0fc2f38c258476bc9637f055d576.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 | 24 | ||||
-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 | 58 | ||||
-rw-r--r-- | kdgantt/KDGanttViewTaskLink.cpp | 4 | ||||
-rw-r--r-- | kdgantt/KDGanttXMLTools.cpp | 100 | ||||
-rw-r--r-- | kdgantt/KDGanttXMLTools.h | 8 |
10 files changed, 151 insertions, 151 deletions
diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index ef40a626e..22eace451 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -55,7 +55,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 ) { @@ -69,11 +69,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 ); @@ -84,7 +84,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) @@ -104,7 +104,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) @@ -119,7 +119,7 @@ void KDGanttSplitterHandle::updateCursor( const TQPoint& p) setCursor( arrowCursor ); } else { - if ( orient == Qt::Horizontal ) + if ( orient == TQt::Horizontal ) setCursor( splitHCursor ); else setCursor( splitVCursor ); @@ -158,7 +158,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 ); @@ -384,7 +384,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(); } @@ -392,7 +392,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; @@ -412,7 +412,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) ); @@ -424,15 +424,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 TQt: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 ) ); @@ -562,7 +562,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() ); @@ -602,7 +602,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)); } @@ -644,9 +644,9 @@ void KDGanttMinimizeSplitter::moveSplitter( TQCOORD p, int id ) p = adjustPos( p, id ); TQSplitterLayoutStruct *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 @@ -661,8 +661,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 @@ -688,7 +688,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 { @@ -704,7 +704,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; @@ -741,7 +741,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 { @@ -758,7 +758,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; @@ -836,7 +836,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; @@ -975,7 +975,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 { @@ -1127,7 +1127,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 ); } @@ -1157,7 +1157,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 ); } @@ -1531,7 +1531,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 e9e993fa7..3dfa659a4 100644 --- a/kdgantt/KDGanttMinimizeSplitter.h +++ b/kdgantt/KDGanttMinimizeSplitter.h @@ -53,11 +53,11 @@ public: enum Direction { Left, Right, Up, Down }; KDGanttMinimizeSplitter( TQWidget* parent=0, const char* name=0 ); - KDGanttMinimizeSplitter( Qt::Orientation, TQWidget* parent=0, const char* name=0 ); + KDGanttMinimizeSplitter( TQt::Orientation, TQWidget* parent=0, const char* name=0 ); ~KDGanttMinimizeSplitter(); - virtual void setOrientation( Qt::Orientation ); - Qt::Orientation orientation() const { return orient; } + virtual void setOrientation( TQt::Orientation ); + TQt::Orientation orientation() const { return orient; } void setMinimizeDirection( Direction ); Direction minimizeDirection() const; @@ -106,19 +106,19 @@ 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; private: - Qt::Orientation orient; + TQt::Orientation orient; Direction _direction; #ifndef DOXYGEN_SKIP_INTERNAL friend class KDGanttSplitterHandle; @@ -140,10 +140,10 @@ class KDGanttSplitterHandle : public TQWidget TQ_OBJECT public: - KDGanttSplitterHandle( Qt::Orientation o, + KDGanttSplitterHandle( TQt::Orientation o, KDGanttMinimizeSplitter *parent, const char* name=0 ); - void setOrientation( Qt::Orientation o ); - Qt::Orientation orientation() const { return orient; } + void setOrientation( TQt::Orientation o ); + TQt::Orientation orientation() const { return orient; } bool opaque() const { return s->opaqueResize(); } @@ -162,7 +162,7 @@ protected: void updateCursor( const TQPoint& p ); private: - Qt::Orientation orient; + TQt::Orientation orient; bool opaq; int myId; diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp index 879d25e55..86268e870 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 d5a09b46e..a6d29e54c 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 d490da85d..5df5248b4 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), mFixedHorizon( false ) @@ -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 70cfcedf0..a3648a64b 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 2ad05c103..f3dd9c405 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; @@ -230,7 +230,7 @@ void KDTimeTableWidget::computeVerticalGrid() */ itcol.current()->setPen( TQPen(TQPen::NoPen) ); - itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + itcol.current()->setBrush( TQBrush( colcol, TQt::SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); @@ -244,7 +244,7 @@ void KDTimeTableWidget::computeVerticalGrid() */ temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); temprect->setPen( TQPen(TQPen::NoPen) ); - temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -276,7 +276,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+(cw/2),0,i+(cw/2),h); */ itcol.current()->setPen( TQPen(TQPen::NoPen) ); - itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + itcol.current()->setBrush( TQBrush( colcol, TQt::SolidPattern) ); itcol.current()->setSize(cw ,h ); itcol.current()->move( i, 0 ); itcol.current()->show(); @@ -284,7 +284,7 @@ void KDTimeTableWidget::computeVerticalGrid() } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); temprect->setPen( TQPen(TQPen::NoPen) ); - temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) ); temprect->setSize(cw ,h ); temprect->move( i, 0 ); temprect->setZ(-20); @@ -332,7 +332,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+mid,0,mid,h); */ itcol.current()->setPen( TQPen(TQPen::NoPen) ); - itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + itcol.current()->setBrush( TQBrush( colcol, TQt::SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); @@ -340,7 +340,7 @@ void KDTimeTableWidget::computeVerticalGrid() } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); temprect->setPen( TQPen(TQPen::NoPen) ); - temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) ); temprect->setSize(mid,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -386,7 +386,7 @@ void KDTimeTableWidget::computeVerticalGrid() itcol.current()->setPoints(i+mid,0,mid,h); */ itcol.current()->setPen( TQPen(TQPen::NoPen) ); - itcol.current()->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + itcol.current()->setBrush( TQBrush( colcol, TQt::SolidPattern) ); itcol.current()->setSize(mid ,h ); itcol.current()->move( left, 0 ); itcol.current()->show(); @@ -394,7 +394,7 @@ void KDTimeTableWidget::computeVerticalGrid() } else { temprect = new KDCanvasRectangle(this,0,Type_is_KDGanttGridItem); temprect->setPen( TQPen(TQPen::NoPen) ); - temprect->setBrush( TQBrush( colcol, Qt::SolidPattern) ); + temprect->setBrush( TQBrush( colcol, TQt::SolidPattern) ); temprect->setSize(mid ,h ); temprect->move( left, 0 ); temprect->setZ(-20); @@ -2447,16 +2447,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; @@ -2539,7 +2539,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; @@ -2645,9 +2645,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 ); @@ -3516,7 +3516,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) currentItem = 0; movingItem = 0; mouseDown = true; - 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() ) { @@ -3537,7 +3537,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); @@ -3590,7 +3590,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case Qt::RightButton: + case TQt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3602,7 +3602,7 @@ void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) break; } break; - case Qt::MidButton: + case TQt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: currentItem = getItem(*it); @@ -3618,10 +3618,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); } } @@ -3643,7 +3643,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) // if ( currentLink || currentItem ) { switch ( e->button() ) { - case Qt::LeftButton: + case TQt::LeftButton: myScrollTimer->stop(); { mySignalSender->itemLeftClicked( currentItem ); @@ -3675,7 +3675,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) movingGVItem = 0; } break; - case Qt::RightButton: + case TQt::RightButton: { mySignalSender->itemRightClicked( currentItem ); mySignalSender->gvItemRightClicked( currentItem ); @@ -3684,7 +3684,7 @@ void KDGanttCanvasView::contentsMouseReleaseEvent ( TQMouseEvent * e ) if ( currentLink ) mySignalSender->taskLinkRightClicked( currentLink ); break; - case Qt::MidButton: + case TQt::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() == Qt::LeftButton ) { + if ( il.isEmpty() && e->button() == TQt::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 Qt::LeftButton: + case TQt::LeftButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: if ( getItem(*it)->enabled() ) @@ -3739,7 +3739,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) } break; /* - case Qt::RightButton: + case TQt::RightButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: mySignalSender->itemRightClicked(getItem(*it)); @@ -3751,7 +3751,7 @@ void KDGanttCanvasView::contentsMouseDoubleClickEvent ( TQMouseEvent * e ) break; } break; - case Qt::MidButton: + case TQt::MidButton: switch (getType(*it)) { case Type_is_KDGanttViewItem: mySignalSender->itemMidClicked(getItem(*it)); @@ -4025,7 +4025,7 @@ void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int heigh if ( right == left ) ++right; setPen( TQPen(TQPen::NoPen) ); - setBrush( TQBrush(mColor, Qt::SolidPattern) ); + setBrush( TQBrush(mColor, TQt::SolidPattern) ); setSize( right - left, height ); move( left, 0 ); show(); diff --git a/kdgantt/KDGanttViewTaskLink.cpp b/kdgantt/KDGanttViewTaskLink.cpp index f6fa68833..9b044fc4b 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 5f181934d..02c3537aa 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 8a7067c0b..a7a61c1dc 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 ); |