From f4fae92b6768541e2952173c3d4b09040f95bf7e Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 16 Feb 2011 20:17:18 +0000 Subject: Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdgantt/KDGanttMinimizeSplitter.cpp | 160 ++++++++++++++--------------- kdgantt/KDGanttMinimizeSplitter.h | 6 +- kdgantt/KDGanttSemiSizingControl.cpp | 32 +++--- kdgantt/KDGanttSemiSizingControl.h | 2 +- kdgantt/KDGanttView.cpp | 192 +++++++++++++++++------------------ kdgantt/KDGanttView.h | 12 +-- kdgantt/KDGanttViewEventItem.cpp | 2 +- kdgantt/KDGanttViewItem.cpp | 126 +++++++++++------------ kdgantt/KDGanttViewItem.h | 6 +- kdgantt/KDGanttViewItemDrag.cpp | 6 +- kdgantt/KDGanttViewItemDrag.h | 2 +- kdgantt/KDGanttViewSubwidgets.cpp | 86 ++++++++-------- kdgantt/KDGanttViewSubwidgets.h | 8 +- kdgantt/KDGanttViewSummaryItem.cpp | 2 +- kdgantt/KDGanttViewTaskItem.cpp | 4 +- kdgantt/itemAttributeDialog.ui | 10 +- kdgantt/itemAttributeDialog.ui.h | 22 ++-- kdgantt/qlayoutengine_p.h | 14 +-- 18 files changed, 346 insertions(+), 346 deletions(-) (limited to 'kdgantt') diff --git a/kdgantt/KDGanttMinimizeSplitter.cpp b/kdgantt/KDGanttMinimizeSplitter.cpp index bdd166c5e..79d7e18d3 100644 --- a/kdgantt/KDGanttMinimizeSplitter.cpp +++ b/kdgantt/KDGanttMinimizeSplitter.cpp @@ -46,7 +46,7 @@ #define TQPtrList QList #define TQMemArray QArray #endif -#include "qlayoutengine_p.h" +#include "tqlayoutengine_p.h" #include "tqobjectlist.h" #include "tqstyle.h" #include "tqapplication.h" //sendPostedEvents @@ -73,7 +73,7 @@ KDGanttSplitterHandle::KDGanttSplitterHandle( Qt::Orientation o, setMouseTracking( true ); } -TQSize KDGanttSplitterHandle::sizeHint() const +TQSize KDGanttSplitterHandle::tqsizeHint() const { return TQSize(8,8); } @@ -99,7 +99,7 @@ void KDGanttSplitterHandle::mouseMoveEvent( TQMouseEvent *e ) if ( _activeButton != 0) return; - QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) + QCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; if ( opaque() ) { s->moveSplitter( pos, id() ); @@ -117,7 +117,7 @@ void KDGanttSplitterHandle::mousePressEvent( TQMouseEvent *e ) _activeButton = onButton( e->pos() ); mouseOffset = s->pick(e->pos()); if ( _activeButton != 0) - repaint(); + tqrepaint(); updateCursor( e->pos() ); } } @@ -168,13 +168,13 @@ void KDGanttSplitterHandle::mouseReleaseEvent( TQMouseEvent *e ) } else { if ( !opaque() && e->button() == LeftButton ) { - QCOORD pos = s->pick(parentWidget()->mapFromGlobal(e->globalPos())) + QCOORD pos = s->pick(tqparentWidget()->mapFromGlobal(e->globalPos())) - mouseOffset; s->setRubberband( -1 ); s->moveSplitter( pos, id() ); } } - repaint(); + tqrepaint(); } int KDGanttSplitterHandle::onButton( const TQPoint& p ) @@ -187,7 +187,7 @@ int KDGanttSplitterHandle::onButton( const TQPoint& p ) rect.setRight( rect.right() + 4); rect.setTop( rect.top()- 4 ); rect.setBottom( rect.bottom() + 4); - if ( rect.contains( p ) ) { + if ( rect.tqcontains( p ) ) { return index; } index++; @@ -247,16 +247,16 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * ) TQPainter p( &buffer ); // Draw the splitter rectangle - p.setBrush( colorGroup().background() ); - p.setPen( colorGroup().foreground() ); + p.setBrush( tqcolorGroup().background() ); + p.setPen( tqcolorGroup().foreground() ); p.drawRect( rect() ); - parentWidget()->style().drawPrimitive( TQStyle::PE_Panel, &p, rect(), - parentWidget()->colorGroup()); + tqparentWidget()->style().drawPrimitive( TQStyle::PE_Panel, &p, rect(), + tqparentWidget()->tqcolorGroup()); int sw = 8; // Hardcoded, given I didn't use styles anymore, I didn't like to use their size // arrow color - TQColor col = colorGroup().background().dark( 200 ); + TQColor col = tqcolorGroup().background().dark( 200 ); p.setBrush( col ); p.setPen( col ); @@ -265,8 +265,8 @@ void KDGanttSplitterHandle::paintEvent( TQPaintEvent * ) for ( TQValueList::Iterator it = list.begin(); it != list.end(); ++it ) { if ( index == _activeButton ) { p.save(); - p.translate( parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ), - parentWidget()->style().pixelMetric( TQStyle::PM_ButtonShiftVertical ) ); + p.translate( tqparentWidget()->style().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ), + tqparentWidget()->style().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) ); p.drawPolygon( *it, true ); p.restore(); } @@ -374,10 +374,10 @@ static TQSize minSize( const TQWidget* /*w*/ ) // This is the original version of minSize static TQSize minSizeHint( const TQWidget* w ) { - TQSize min = w->minimumSize(); + TQSize min = w->tqminimumSize(); TQSize s; if ( min.height() <= 0 || min.width() <= 0 ) - s = w->minimumSizeHint(); + s = w->tqminimumSizeHint(); if ( min.height() > 0 ) s.setHeight( min.height() ); if ( min.width() > 0 ) @@ -430,9 +430,9 @@ void KDGanttMinimizeSplitter::init() { data = new QSplitterData; if ( orient == Horizontal ) - setSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) ); + tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Expanding,TQSizePolicy::Minimum) ); else - setSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) ); + tqsetSizePolicy( TQSizePolicy(TQSizePolicy::Minimum,TQSizePolicy::Expanding) ); } #endif @@ -452,9 +452,9 @@ void KDGanttMinimizeSplitter::setOrientation( Orientation o ) orient = o; if ( orient == Horizontal ) - setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Minimum ) ); else - setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); + tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Expanding ) ); QSplitterLayoutStruct *s = data->list.first(); while ( s ) { @@ -499,7 +499,7 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fir s->wid = newHandle; newHandle->setId(data->list.count()); s->isSplitter = TRUE; - s->sizer = pick( newHandle->sizeHint() ); + s->sizer = pick( newHandle->tqsizeHint() ); if ( first ) data->list.insert( 0, s ); else @@ -508,8 +508,8 @@ QSplitterLayoutStruct *KDGanttMinimizeSplitter::addWidget( TQWidget *w, bool fir s = new QSplitterLayoutStruct; s->mode = Stretch; s->wid = w; - if ( !testWState( WState_Resized ) && w->sizeHint().isValid() ) - s->sizer = pick( w->sizeHint() ); + if ( !testWState( WState_Resized ) && w->tqsizeHint().isValid() ) + s->sizer = pick( w->tqsizeHint() ); else s->sizer = pick( w->size() ); s->isSplitter = FALSE; @@ -582,7 +582,7 @@ void KDGanttMinimizeSplitter::setRubberband( int p ) paint.setRasterOp( XorROP ); TQRect r = contentsRect(); const int rBord = 3; //Themable???? - int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this); + int sw = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this); if ( orient == Horizontal ) { if ( opaqueOldPos >= 0 ) paint.drawRect( opaqueOldPos + sw/2 - rBord , r.y(), @@ -622,7 +622,7 @@ bool KDGanttMinimizeSplitter::event( TQEvent *e ) void KDGanttMinimizeSplitter::drawSplitter( TQPainter *p, QCOORD x, QCOORD y, QCOORD w, QCOORD h ) { - style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), colorGroup(), + style().drawPrimitive(TQStyle::PE_Splitter, p, TQRect(x, y, w, h), tqcolorGroup(), (orientation() == Qt::Horizontal ? TQStyle::Style_Horizontal : 0)); } @@ -653,7 +653,7 @@ int KDGanttMinimizeSplitter::idAfter( TQWidget* w ) const close as possible to position \a p, which is the distance from the left (or top) edge of the widget. - For Arabic and Hebrew the layout is reversed, and using this + For Arabic and Hebrew the tqlayout is reversed, and using this function to set the position of the splitter might lead to unexpected results, since in Arabic and Hebrew the position of splitter one is to the left of the position of splitter zero. @@ -726,13 +726,13 @@ void KDGanttMinimizeSplitter::moveBefore( int pos, int id, bool upLeft ) } else { int dd, newLeft, nextPos; if( TQApplication::reverseLayout() && orient == Horizontal ) { - dd = w->geometry().right() - pos; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = w->tqgeometry().right() - pos; + dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos+1; nextPos = newLeft + dd; } else { dd = pos - pick( w->pos() ) + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } @@ -781,13 +781,13 @@ void KDGanttMinimizeSplitter::moveAfter( int pos, int id, bool upLeft ) int right, dd,/* newRight,*/ newLeft, nextPos; if ( TQApplication::reverseLayout() && orient == Horizontal ) { dd = pos - left + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); newLeft = pos-dd+1; nextPos = newLeft - 1; } else { - right = pick( w->geometry().bottomRight() ); + right = pick( w->tqgeometry().bottomRight() ); dd = right - pos + 1; - dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->maximumSize()))); + dd = QMAX( pick(minSize(w)), QMIN(dd, pick(w->tqmaximumSize()))); /*newRight = pos+dd-1;*/ newLeft = pos; nextPos = newLeft + dd; @@ -841,7 +841,7 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) maxB += s->sizer; } else { minB += pick( minSize(s->wid) ); - maxB += pick( s->wid->maximumSize() ); + maxB += pick( s->wid->tqmaximumSize() ); } } for ( i = id; i < n; i++ ) { @@ -853,12 +853,12 @@ void KDGanttMinimizeSplitter::getRange( int id, int *min, int *max ) maxA += s->sizer; } else { minA += pick( minSize(s->wid) ); - maxA += pick( s->wid->maximumSize() ); + maxA += pick( s->wid->tqmaximumSize() ); } } TQRect r = contentsRect(); if ( orient == Horizontal && TQApplication::reverseLayout() ) { - int splitterWidth = style().pixelMetric(TQStyle::PM_SplitterWidth, this); + int splitterWidth = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this); if ( min ) *min = pick(r.topRight()) - QMIN( maxB, pick(r.size())-minA ) - splitterWidth; if ( max ) @@ -900,27 +900,27 @@ void KDGanttMinimizeSplitter::doResize() QSplitterLayoutStruct *s = data->list.at(i); if ( s->wid->isHidden() ) { a[i].stretch = 0; - a[i].sizeHint = a[i].minimumSize = 0; - a[i].maximumSize = 0; + a[i].tqsizeHint = a[i].tqminimumSize = 0; + a[i].tqmaximumSize = 0; } else if ( s->isSplitter ) { a[i].stretch = 0; - a[i].sizeHint = a[i].minimumSize = a[i].maximumSize = s->sizer; + a[i].tqsizeHint = a[i].tqminimumSize = a[i].tqmaximumSize = s->sizer; a[i].empty = FALSE; } else if ( s->mode == KeepSize ) { a[i].stretch = 0; - a[i].minimumSize = pick( minSize(s->wid) ); - a[i].sizeHint = s->sizer; - a[i].maximumSize = pick( s->wid->maximumSize() ); + a[i].tqminimumSize = pick( minSize(s->wid) ); + a[i].tqsizeHint = s->sizer; + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); a[i].empty = FALSE; } else if ( s->mode == FollowSizeHint ) { a[i].stretch = 0; - a[i].minimumSize = a[i].sizeHint = pick( s->wid->sizeHint() ); - a[i].maximumSize = pick( s->wid->maximumSize() ); + a[i].tqminimumSize = a[i].tqsizeHint = pick( s->wid->tqsizeHint() ); + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); a[i].empty = FALSE; } else { //proportional a[i].stretch = s->sizer; - a[i].maximumSize = pick( s->wid->maximumSize() ); - a[i].sizeHint = a[i].minimumSize = pick( minSize(s->wid) ); + a[i].tqmaximumSize = pick( s->wid->tqmaximumSize() ); + a[i].tqsizeHint = a[i].tqminimumSize = pick( minSize(s->wid) ); a[i].empty = FALSE; } } @@ -974,16 +974,16 @@ void KDGanttMinimizeSplitter::recalc( bool update ) } else { TQSize minS = minSize(s->wid); minl += pick( minS ); - maxl += pick( s->wid->maximumSize() ); + maxl += pick( s->wid->tqmaximumSize() ); mint = QMAX( mint, trans( minS )); - int tm = trans( s->wid->maximumSize() ); + int tm = trans( s->wid->tqmaximumSize() ); if ( tm > 0 ) maxt = QMIN( maxt, tm ); } } } if ( empty ) { - if ( parentWidget() != 0 && parentWidget()->inherits("KDGanttMinimizeSplitter") ) { + if ( tqparentWidget() != 0 && tqparentWidget()->inherits("KDGanttMinimizeSplitter") ) { // nested splitters; be nice maxl = maxt = 0; } else { @@ -1126,7 +1126,7 @@ void KDGanttMinimizeSplitter::recalcId() /*! Reimplemented from superclass. */ -TQSize KDGanttMinimizeSplitter::sizeHint() const +TQSize KDGanttMinimizeSplitter::tqsizeHint() const { constPolish(); int l = 0; @@ -1140,7 +1140,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const ++it; if ( o->isWidgetType() && !((TQWidget*)o)->isHidden() ) { - TQSize s = ((TQWidget*)o)->sizeHint(); + TQSize s = ((TQWidget*)o)->tqsizeHint(); if ( s.isValid() ) { l += pick( s ); t = QMAX( t, trans( s ) ); @@ -1156,7 +1156,7 @@ TQSize KDGanttMinimizeSplitter::sizeHint() const \reimp */ -TQSize KDGanttMinimizeSplitter::minimumSizeHint() const +TQSize KDGanttMinimizeSplitter::tqminimumSizeHint() const { constPolish(); int l = 0; @@ -1250,7 +1250,7 @@ bool KDGanttMinimizeSplitter::isHidden( TQWidget *w ) const splitter. Giving the values to another splitter's setSizes() function will - produce a splitter with the same layout as this one. + produce a splitter with the same tqlayout as this one. Note that if you want to iterate over the list, you should iterate over a copy, e.g. @@ -1291,7 +1291,7 @@ TQValueList KDGanttMinimizeSplitter::sizes() const top to bottom. Extra values in \a list are ignored. - If \a list contains too few values, the result is undefined + If \a list tqcontains too few values, the result is undefined but the program will still be well-behaved. \sa sizes() @@ -1330,7 +1330,7 @@ void KDGanttMinimizeSplitter::processChildEvents() void KDGanttMinimizeSplitter::styleChange( TQStyle& old ) { - int sw = style().pixelMetric(TQStyle::PM_SplitterWidth, this); + int sw = style().tqpixelMetric(TQStyle::PM_SplitterWidth, this); QSplitterLayoutStruct *s = data->list.first(); while ( s ) { if ( s->isSplitter ) @@ -1364,7 +1364,7 @@ KDGanttMinimizeSplitter::Direction KDGanttMinimizeSplitter::minimizeDirection() } /* - This is a copy of qGeomCalc() in qlayoutengine.cpp which + This is a copy of qGeomCalc() in qtqlayoutengine.cpp which unfortunately isn't exported. */ static inline int toFixed( int i ) { return i * 256; } @@ -1387,9 +1387,9 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in int i; for ( i = start; i < start + count; i++ ) { chain[i].done = FALSE; - cHint += chain[i].sizeHint; - cMin += chain[i].minimumSize; - cMax += chain[i].maximumSize; + cHint += chain[i].tqsizeHint; + cMin += chain[i].tqminimumSize; + cMax += chain[i].tqmaximumSize; sumStretch += chain[i].stretch; if ( !chain[i].empty ) spacerCount++; @@ -1402,11 +1402,11 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in if ( space < cMin + spacerCount * spacer ) { // qDebug("not enough space"); for ( i = start; i < start+count; i++ ) { - chain[i].size = chain[i].minimumSize; + chain[i].size = chain[i].tqminimumSize; chain[i].done = TRUE; } } else if ( space < cHint + spacerCount*spacer ) { - // Less space than sizeHint, but more than minimum. + // Less space than tqsizeHint, but more than minimum. // Currently take space equally from each, like in Qt 2.x. // Commented-out lines will give more space to stretchier items. int n = count; @@ -1414,10 +1414,10 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in int overdraft = cHint - space_left; //first give to the fixed ones: for ( i = start; i < start+count; i++ ) { - if ( !chain[i].done && chain[i].minimumSize >= chain[i].sizeHint) { - chain[i].size = chain[i].sizeHint; + if ( !chain[i].done && chain[i].tqminimumSize >= chain[i].tqsizeHint) { + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; // sumStretch -= chain[i].stretch; n--; } @@ -1436,13 +1436,13 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in // else // fp_w += (fp_over * chain[i].stretch) / sumStretch; int w = fRound( fp_w ); - chain[i].size = chain[i].sizeHint - w; + chain[i].size = chain[i].tqsizeHint - w; fp_w -= toFixed( w ); //give the difference to the next - if ( chain[i].size < chain[i].minimumSize ) { + if ( chain[i].size < chain[i].tqminimumSize ) { chain[i].done = TRUE; - chain[i].size = chain[i].minimumSize; + chain[i].size = chain[i].tqminimumSize; finished = FALSE; - overdraft -= chain[i].sizeHint - chain[i].minimumSize; + overdraft -= chain[i].tqsizeHint - chain[i].tqminimumSize; // sumStretch -= chain[i].stretch; n--; break; @@ -1454,11 +1454,11 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in int space_left = space - spacerCount*spacer; // first give to the fixed ones, and handle non-expansiveness for ( i = start; i < start + count; i++ ) { - if ( !chain[i].done && (chain[i].maximumSize <= chain[i].sizeHint + if ( !chain[i].done && (chain[i].tqmaximumSize <= chain[i].tqsizeHint || wannaGrow && !chain[i].expansive) ) { - chain[i].size = chain[i].sizeHint; + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; sumStretch -= chain[i].stretch; n--; } @@ -1490,20 +1490,20 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in int w = fRound( fp_w ); chain[i].size = w; fp_w -= toFixed( w ); // give the difference to the next - if ( w < chain[i].sizeHint ) { - deficit += chain[i].sizeHint - w; - } else if ( w > chain[i].maximumSize ) { - surplus += w - chain[i].maximumSize; + if ( w < chain[i].tqsizeHint ) { + deficit += chain[i].tqsizeHint - w; + } else if ( w > chain[i].tqmaximumSize ) { + surplus += w - chain[i].tqmaximumSize; } } if ( deficit > 0 && surplus <= deficit ) { // give to the ones that have too little for ( i = start; i < start+count; i++ ) { if ( !chain[i].done && - chain[i].size < chain[i].sizeHint ) { - chain[i].size = chain[i].sizeHint; + chain[i].size < chain[i].tqsizeHint ) { + chain[i].size = chain[i].tqsizeHint; chain[i].done = TRUE; - space_left -= chain[i].sizeHint; + space_left -= chain[i].tqsizeHint; sumStretch -= chain[i].stretch; n--; } @@ -1513,10 +1513,10 @@ void kdganttGeomCalc( TQMemArray &chain, int start, int count, in // take from the ones that have too much for ( i = start; i < start+count; i++ ) { if ( !chain[i].done && - chain[i].size > chain[i].maximumSize ) { - chain[i].size = chain[i].maximumSize; + chain[i].size > chain[i].tqmaximumSize ) { + chain[i].size = chain[i].tqmaximumSize; chain[i].done = TRUE; - space_left -= chain[i].maximumSize; + space_left -= chain[i].tqmaximumSize; sumStretch -= chain[i].stretch; n--; } diff --git a/kdgantt/KDGanttMinimizeSplitter.h b/kdgantt/KDGanttMinimizeSplitter.h index 801fc0112..15429e5a9 100644 --- a/kdgantt/KDGanttMinimizeSplitter.h +++ b/kdgantt/KDGanttMinimizeSplitter.h @@ -74,8 +74,8 @@ public: void moveToLast( TQWidget * ); void refresh() { recalc( TRUE ); } - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; TQValueList sizes() const; void setSizes( TQValueList ); @@ -152,7 +152,7 @@ public: bool opaque() const { return s->opaqueResize(); } - TQSize sizeHint() const; + TQSize tqsizeHint() const; int id() const { return myId; } // data->list.at(id())->wid == this void setId( int i ) { myId = i; } diff --git a/kdgantt/KDGanttSemiSizingControl.cpp b/kdgantt/KDGanttSemiSizingControl.cpp index e81b77817..47d089506 100644 --- a/kdgantt/KDGanttSemiSizingControl.cpp +++ b/kdgantt/KDGanttSemiSizingControl.cpp @@ -247,9 +247,9 @@ KDGanttSemiSizingControl::ArrowPosition KDGanttSemiSizingControl::arrowPosition( void KDGanttSemiSizingControl::init() { _but = new TQPushButton( this ); - _but->setSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); + _but->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ) ); connect( _but, TQT_SIGNAL( clicked() ), this, TQT_SLOT(changeState()) ); - _layout = 0; + _tqlayout = 0; TQWhatsThis::add( _but, "Click on this button to show the \nlegend at the bottom of the widget"); TQToolTip::add( _but, "Show / hide legend"); @@ -258,19 +258,19 @@ void KDGanttSemiSizingControl::init() void KDGanttSemiSizingControl::setup() { - //-------------------------------------------------- Setup layout - delete _layout; - TQBoxLayout* butLayout; // _layout will delete me + //-------------------------------------------------- Setup tqlayout + delete _tqlayout; + TQBoxLayout* butLayout; // _tqlayout will delete me if ( _orient == Horizontal || isMinimized() ) - _layout = new TQHBoxLayout( this ); + _tqlayout = new TQHBoxLayout( this ); else - _layout = new TQVBoxLayout( this ); + _tqlayout = new TQVBoxLayout( this ); if ( _orient == Vertical && !isMinimized() ) - butLayout = new TQHBoxLayout( _layout ); + butLayout = new TQHBoxLayout( _tqlayout ); else - butLayout = new TQVBoxLayout( _layout ); + butLayout = new TQVBoxLayout( _tqlayout ); @@ -306,9 +306,9 @@ void KDGanttSemiSizingControl::setup() widget = _maximizedWidget; if( widget ) { if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) - _layout->addWidget( widget, 1 ); + _tqlayout->addWidget( widget, 1 ); else - _layout->insertWidget( 0, widget, 1 ); + _tqlayout->insertWidget( 0, widget, 1 ); } ************************************************** */ // hack for the usage in KDGantt as pop-up legend widget @@ -319,16 +319,16 @@ void KDGanttSemiSizingControl::setup() widget = _minimizedWidget; if( widget ) { if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) - _layout->addWidget( widget, 1 ); + _tqlayout->addWidget( widget, 1 ); else - _layout->insertWidget( 0, widget, 1 ); + _tqlayout->insertWidget( 0, widget, 1 ); } } else { if ( _arrowPos == Before || _orient == Vertical && !isMinimized() ) - _layout->addStretch( 1 ); + _tqlayout->addStretch( 1 ); else - _layout->insertStretch( 0, 1 ); + _tqlayout->insertStretch( 0, 1 ); widget = _maximizedWidget; // the following is only the special case // arrowPos == Before and _orient == Vertical @@ -395,7 +395,7 @@ TQPixmap KDGanttSemiSizingControl::pixmap( Direction direction ) { TQPainter p( &pix ); p.setPen( black ); - p.setBrush( colorGroup().button() ); + p.setBrush( tqcolorGroup().button() ); p.drawPolygon( arr ); TQBitmap bit( s, s ); bit.fill( color0 ); diff --git a/kdgantt/KDGanttSemiSizingControl.h b/kdgantt/KDGanttSemiSizingControl.h index ad7569951..6b43f7c2e 100644 --- a/kdgantt/KDGanttSemiSizingControl.h +++ b/kdgantt/KDGanttSemiSizingControl.h @@ -82,7 +82,7 @@ private: ArrowPosition _arrowPos; TQWidget* _minimizedWidget; TQWidget* _maximizedWidget; - TQBoxLayout* _layout; + TQBoxLayout* _tqlayout; TQPushButton* _but; }; diff --git a/kdgantt/KDGanttView.cpp b/kdgantt/KDGanttView.cpp index 9403c10ff..6e2e4b4b6 100644 --- a/kdgantt/KDGanttView.cpp +++ b/kdgantt/KDGanttView.cpp @@ -69,7 +69,7 @@ In order to set up a Gantt view, create an object of this class, and populate it with a number of \a KDGanttViewItem objects. - If you experience problems with the repainting of the content of the + If you experience problems with the tqrepainting of the content of the Gantt View after scrolling, call \a setRepaintMode(). */ @@ -186,7 +186,7 @@ KDGanttView::KDGanttView( TQWidget* parent, const char* name ) fDropEnabled = false; closingBlocked = false; myTimeHeader->computeTicks(); - centerTimelineAfterShow( TQDateTime::currentDateTime () ); + centerTimelineAfterShow( TQDateTime::tqcurrentDateTime () ); setDisplayEmptyTasksAsLine( false ); TQValueList list; list.append(240); @@ -296,7 +296,7 @@ void KDGanttView::show() } /*! Closes the widget. - The closing is rejected, if a repainting is currently being done. + The closing is rejected, if a tqrepainting is currently being done. \param alsoDelete if true, the widget is deleted \return true, if the widget was closed */ @@ -313,12 +313,12 @@ bool KDGanttView::close ( bool alsoDelete ) /*! Returns a useful size for the view. Returned width: - sizeHint().width() of the list view + width of TimeTable + tqsizeHint().width() of the list view + width of TimeTable Returned height: height() of TimeHeader + height() of TimeTable + height() of Legend (if shown) */ -TQSize KDGanttView::sizeHint() const +TQSize KDGanttView::tqsizeHint() const { bool block = myTimeTable->blockUpdating(); myTimeTable->setBlockUpdating( false ); @@ -328,7 +328,7 @@ TQSize KDGanttView::sizeHint() const * there is a legitimate gui updating issue here somewhere, it will need * to be solved differently. */ - //qApp->processEvents(); + //tqApp->processEvents(); int hintHeight = myTimeHeader->height(); int legendHeight = 0; if ( showLegendButton() ) @@ -342,9 +342,9 @@ TQSize KDGanttView::sizeHint() const if ( myLegend->isShown() ) hintHeight += myLegend->legendSizeHint().height() +10; hintHeight += myTimeTable->minimumHeight+myListView->frameWidth()*2+2; - int hintWid = myListView->sizeHint().width(); + int hintWid = myListView->tqsizeHint().width(); //hintWid += myTimeHeader->mySizeHint+myCanvasView->verticalScrollBar()->width(); - hintWid += myCanvasView->sizeHint().width(); + hintWid += myCanvasView->tqsizeHint().width(); // add 10 for the splitter-bars // qDebug("sizehint %d %d ",hintWid+10, hintHeight ); myTimeTable->setBlockUpdating( block ); @@ -525,14 +525,14 @@ void KDGanttView::slotMouseButtonPressed ( int button, TQListViewItem * item, /*! - Specifies whether the content should be repainted after scrolling or + Specifies whether the content should be tqrepainted after scrolling or not. - \param mode If No, there is no repainting after scrolling. This is + \param mode If No, there is no tqrepainting after scrolling. This is the fastest mode. - If Medium, there is extra repainting after releasing the + If Medium, there is extra tqrepainting after releasing the scrollbar. This provides fast scrolling with updated content - after scrolling. Recommended, when repaint problems occur. + after scrolling. Recommended, when tqrepaint problems occur. This is the default value after startup. If Always, there is an extra update after every move of the scrollbar. This entails slow scrolling with updated @@ -615,7 +615,7 @@ void KDGanttView::slotHeaderSizeChanged() // legend is cleared - reinit legend with list legendItem* li; for ( li = myLegendItems->first(); li; li = myLegendItems->next() ) { - myLegend->addLegendItem(li->shape, li->color, li->text ); + myLegend->addLegendItem(li->tqshape, li->color, li->text ); } } } @@ -691,9 +691,9 @@ void KDGanttView::setShowListView( bool show ) if(listViewIsVisible == show) return; listViewIsVisible = show; if (listViewIsVisible) - myListView->parentWidget()->show(); + myListView->tqparentWidget()->show(); else - myListView->parentWidget()->hide(); + myListView->tqparentWidget()->hide(); } @@ -868,7 +868,7 @@ void KDGanttView::print( TQPrinter* printer , TQSize size = drawContents( 0, printListView, printTimeLine, printLegend ); // at the top, we want to print current time/date - TQString date = "Printing Time: " + TQDateTime::currentDateTime().toString(); + TQString date = "Printing Time: " + TQDateTime::tqcurrentDateTime().toString(); int hei = p.boundingRect(0,0, 5, 5, Qt::AlignLeft, date ).height(); p.drawText( 0, 0, date ); @@ -979,7 +979,7 @@ TQSize KDGanttView::drawContents( TQPainter* p, } if ( drawTimeLine ) { p->translate( myCanvasView->frameWidth(), 0); - myTimeHeader->repaintMe( 0, myTimeHeader->width(), p ); + myTimeHeader->tqrepaintMe( 0, myTimeHeader->width(), p ); p->translate( -myCanvasView->frameWidth(), thY); myCanvasView->drawToPainter( p ); if ( drawListView ) @@ -1209,7 +1209,7 @@ bool KDGanttView::showTaskLinks() const void KDGanttView::setFont(const TQFont& font) { myListView->setFont(font); - myListView->repaint(); + myListView->tqrepaint(); myTimeHeader->setFont(font); myLegend->setFont( font ); TQWidget::setFont( font ); @@ -1299,21 +1299,21 @@ bool KDGanttView::showTimeTablePopupMenu() const /*! - Sets the shapes for a certain type of Gantt item. Not all items use - all three shapes (e.g., only summary items use the middle shape). + Sets the tqshapes for a certain type of Gantt item. Not all items use + all three tqshapes (e.g., only summary items use the middle tqshape). - This setting overrides any shape settings made on individual items. + This setting overrides any tqshape settings made on individual items. These settings will be taken as initial values of any newly created item of this certain type. See also the documentation of the KDGanttViewItem class. - \param type the type of Gantt items for which to set the shapes - \param start the shape to use for the beginning of the item - \param middle the shape to use for the middle of the item - \param end the shape to use for the end of the item - \param overwriteExisting if true, overwrites existing shape settings + \param type the type of Gantt items for which to set the tqshapes + \param start the tqshape to use for the beginning of the item + \param middle the tqshape to use for the middle of the item + \param end the tqshape to use for the end of the item + \param overwriteExisting if true, overwrites existing tqshape settings in the individual items - \sa shapes() + \sa tqshapes() */ void KDGanttView::setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, @@ -1337,18 +1337,18 @@ void KDGanttView::setShapes( KDGanttViewItem::Type type, /*! - Queries the shapes for a particular type of Gantt item. + Queries the tqshapes for a particular type of Gantt item. - \param type the type of Gantt items for which to query the shapes - \param start the start shape is returned in this parameter - \param middle the middle shape is returned in this parameter - \param end the end shape is returned in this parameter - \return true if there was a general shape set for the specified - type. If the return value is false, the values of the three shape + \param type the type of Gantt items for which to query the tqshapes + \param start the start tqshape is returned in this parameter + \param middle the middle tqshape is returned in this parameter + \param end the end tqshape is returned in this parameter + \return true if there was a general tqshape set for the specified + type. If the return value is false, the values of the three tqshape parameters are undefined. \sa setShapes() */ -bool KDGanttView::shapes( KDGanttViewItem::Type type, +bool KDGanttView::tqshapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const @@ -1562,19 +1562,19 @@ void KDGanttView::clearLegend( ) /*! Adds an item to the legend. - \param shape the shape to display - \param shapeColor the color in which to display the shape + \param tqshape the tqshape to display + \param tqshapeColor the color in which to display the tqshape \param text the text to display \sa clearLegend() */ -void KDGanttView::addLegendItem( KDGanttViewItem::Shape shape, - const TQColor& shapeColor, +void KDGanttView::addLegendItem( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, const TQString& text ) { - myLegend->addLegendItem( shape,shapeColor,text ); + myLegend->addLegendItem( tqshape,tqshapeColor,text ); legendItem* item = new legendItem; - item->shape = shape; - item->color = shapeColor; + item->tqshape = tqshape; + item->color = tqshapeColor; item->text = text; myLegendItems->append( item ); } @@ -2341,7 +2341,7 @@ KDGanttViewItem* KDGanttView::firstChild() const /*! This method turns calendar mode on and off. In calendar mode, only those items can be opened which have subitems which have - subitems. I.e., if an item contains multiple calendars, it can be + subitems. I.e., if an item tqcontains multiple calendars, it can be opened, but not a calendar item itself. If you want to use this GanttView as a calendar view, you have to call setDisplaySubitemsAsGroup( true ); to use the root items as calendar @@ -3415,58 +3415,58 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const showTimeTablePopupMenu() ); // the Shapes element - TQDomElement shapesElement = doc.createElement( "Shapes" ); - docRoot.appendChild( shapesElement ); - TQDomElement shapesEventElement = doc.createElement( "Event" ); - shapesElement.appendChild( shapesEventElement ); + TQDomElement tqshapesElement = doc.createElement( "Shapes" ); + docRoot.appendChild( tqshapesElement ); + TQDomElement tqshapesEventElement = doc.createElement( "Event" ); + tqshapesElement.appendChild( tqshapesEventElement ); KDGanttViewItem::Shape start, middle, end; - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", - KDGanttViewItem::shapeToString( end ) ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesEventElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesEventElement, "End", + KDGanttXML::createStringNode( doc, tqshapesEventElement, "End", "Undefined" ); } - TQDomElement shapesTaskElement = doc.createElement( "Task" ); - shapesElement.appendChild( shapesTaskElement ); - if( shapes( KDGanttViewItem::Task, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesTaskElement = doc.createElement( "Task" ); + tqshapesElement.appendChild( tqshapesTaskElement ); + if( tqshapes( KDGanttViewItem::Task, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesTaskElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesTaskElement, "End", + KDGanttXML::createStringNode( doc, tqshapesTaskElement, "End", "Undefined" ); } - TQDomElement shapesSummaryElement = doc.createElement( "Summary" ); - shapesElement.appendChild( shapesSummaryElement ); - if( shapes( KDGanttViewItem::Event, start, middle, end ) ) { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", - KDGanttViewItem::shapeToString( start ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", - KDGanttViewItem::shapeToString( middle ) ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", - KDGanttViewItem::shapeToString( end ) ); + TQDomElement tqshapesSummaryElement = doc.createElement( "Summary" ); + tqshapesElement.appendChild( tqshapesSummaryElement ); + if( tqshapes( KDGanttViewItem::Event, start, middle, end ) ) { + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", + KDGanttViewItem::tqshapeToString( start ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", + KDGanttViewItem::tqshapeToString( middle ) ); + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", + KDGanttViewItem::tqshapeToString( end ) ); } else { - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Start", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Start", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "Middle", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "Middle", "Undefined" ); - KDGanttXML::createStringNode( doc, shapesSummaryElement, "End", + KDGanttXML::createStringNode( doc, tqshapesSummaryElement, "End", "Undefined" ); } @@ -3604,7 +3604,7 @@ TQDomDocument KDGanttView::saveXML( bool withPI ) const TQDomElement legendItemElement = doc.createElement( "LegendItem" ); legendItemsElement.appendChild( legendItemElement ); KDGanttXML::createStringNode( doc, legendItemElement, "Shape", - KDGanttViewItem::shapeToString( current->shape ) ); + KDGanttViewItem::tqshapeToString( current->tqshape ) ); KDGanttXML::createColorNode( doc, legendItemElement, "Color", current->color ); KDGanttXML::createStringNode( doc, legendItemElement, "Text", @@ -3757,17 +3757,17 @@ void KDGanttView::editItem( KDGanttViewItem* item) /*! - This method returns the pixmap used for a certain shape, in the + This method returns the pixmap used for a certain tqshape, in the selected color and size. - \param shape the shape to generate - \param shapeColor the foreground color of the shape - \param backgroundColor the background color of the shape - \param itemSize the size of the shape - \return the generated shape pixmap + \param tqshape the tqshape to generate + \param tqshapeColor the foreground color of the tqshape + \param backgroundColor the background color of the tqshape + \param itemSize the size of the tqshape + \return the generated tqshape pixmap */ -TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, - const TQColor& shapeColor, +TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape tqshape, + const TQColor& tqshapeColor, const TQColor& backgroundColor, int itemSize) { // 10 is a good value as size @@ -3777,11 +3777,11 @@ TQPixmap KDGanttView::getPixmap( KDGanttViewItem::Shape shape, p.fill( backgroundColor ); TQPainter paint (&p); TQBrush b = TQBrush ( Qt::SolidPattern ); - b.setColor( shapeColor ); + b.setColor( tqshapeColor ); paint.setBrush( b ); TQPen pen( Qt::black, 1 ) ; paint.setPen( pen ); - switch (shape) { + switch (tqshape) { case KDGanttViewItem::TriangleDown:{ TQPointArray arr = TQPointArray(3); arr.setPoint(0,-size/2,-hei); @@ -3864,8 +3864,8 @@ void KDGanttView::initDefaults() myDefaultColor [ getIndex( KDGanttViewItem::Summary ) ] = Qt::cyan;//summary myDefaultColorHL [ getIndex( KDGanttViewItem::Summary ) ] = Qt::red; - // setting the default shape types - // currently, we take for each item for all three shapes (start, middle, end) the same default shape + // setting the default tqshape types + // currently, we take for each item for all three tqshapes (start, middle, end) the same default tqshape for (i = 0;i<3;++i) { myDefaultShape [3*getIndex( KDGanttViewItem::Event )+ i] = KDGanttViewItem::Diamond; //event myDefaultShape [3*getIndex( KDGanttViewItem::Task ) +i] = KDGanttViewItem::Square; //task @@ -4239,7 +4239,7 @@ TQColor KDGanttView::legendHeaderBackgroundColor () const may add as many widgets as you want. They are ordered horizontally from left to right. To remove a widget from the spacer widget, call widget->reparent(newParent,...) or delete the widget. Since the spacer - is a TQHBox, the layout of the added widgets is managed by this + is a TQHBox, the tqlayout of the added widgets is managed by this TQHBox. \param w A pointer to the widget to be added. @@ -4800,7 +4800,7 @@ bool KDGanttView::isLinkItemsEnabled() const const TQString& text ) This signal is emitted whenever the user changes the name of an item - in the list view using in-place editing. \a text contains the new + in the list view using in-place editing. \a text tqcontains the new text in the list view. */ diff --git a/kdgantt/KDGanttView.h b/kdgantt/KDGanttView.h index 4e6b338a6..0f135e5a4 100644 --- a/kdgantt/KDGanttView.h +++ b/kdgantt/KDGanttView.h @@ -192,7 +192,7 @@ public: KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end, bool overwriteExisting = true ); - bool shapes( KDGanttViewItem::Type type, + bool tqshapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape& start, KDGanttViewItem::Shape& middle, KDGanttViewItem::Shape& end ) const; @@ -227,7 +227,7 @@ public: TQPtrList taskLinkGroups() const; // Legend-related stuff - void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text ); + void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ); void clearLegend(); // Header-related stuff void setHorizonStart( const TQDateTime& start ); @@ -261,7 +261,7 @@ public: Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); #if 0 - // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor + // This API has been tqreplaced with KDIntervalColorRectangle and addIntervalBackgroundColor void setIntervalBackgroundColor( const TQDateTime& start, const TQDateTime& end, const TQColor& color, @@ -297,7 +297,7 @@ public: void setWeekendDays( int start, int end ); void weekendDays( int& start, int& end ) const; - static TQPixmap getPixmap( KDGanttViewItem::Shape shape, const TQColor& shapeColor,const TQColor& backgroundColor, int itemSize); + static TQPixmap getPixmap( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor,const TQColor& backgroundColor, int itemSize); void setHeaderVisible( bool ); bool headerVisible() const; @@ -329,7 +329,7 @@ public: virtual void lvStartDrag (KDGanttViewItem*); virtual bool lvDragMoveEvent (TQDragMoveEvent * e,KDGanttViewItem*, KDGanttViewItem*); virtual void lvDragEnterEvent (TQDragEnterEvent * e ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; KDGanttViewItem* getItemByName( const TQString& name ) const; TQDateTime getDateTimeForCoordX(int coordX, bool global = true ) const; KDGanttViewItem* getItemByListViewPos( const TQPoint& pos ) const; @@ -421,7 +421,7 @@ private slots: void slot_lvDropped(TQDropEvent* e, KDGanttViewItem* droppedItem, KDGanttViewItem* itemBelowMouse ); private: struct legendItem { - KDGanttViewItem::Shape shape; + KDGanttViewItem::Shape tqshape; TQColor color; TQString text; }; diff --git a/kdgantt/KDGanttViewEventItem.cpp b/kdgantt/KDGanttViewEventItem.cpp index 19bfaeb90..eadef6a1b 100644 --- a/kdgantt/KDGanttViewEventItem.cpp +++ b/kdgantt/KDGanttViewEventItem.cpp @@ -209,7 +209,7 @@ void KDGanttViewEventItem::hideMe() void KDGanttViewEventItem::showItem(bool show, int coordY) { isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; diff --git a/kdgantt/KDGanttViewItem.cpp b/kdgantt/KDGanttViewItem.cpp index 3d36683b2..c250d22f6 100644 --- a/kdgantt/KDGanttViewItem.cpp +++ b/kdgantt/KDGanttViewItem.cpp @@ -52,20 +52,20 @@ directly. Instead, you should create items of one of the subclasses. This class provides methods common to all Gantt items. - The initialization of the shapes/colors of the item works as follows: + The initialization of the tqshapes/colors of the item works as follows: Shapes: - When a new item is created, the shapes are set to the default values + When a new item is created, the tqshapes are set to the default values for items of the type of this item, defined in the KDGanttView class with void setShapes( KDGanttViewItem::Type type, KDGanttViewItem::Shape start, KDGanttViewItem::Shape middle, KDGanttViewItem::Shape end ); If there is no default value defined for this type, - the shapes are set as follows: - For TaskViewItems all three shapes are set to Square. - For SummaryViewItems all three shapes are set to TriangleDown. - For EventViewItems all three shapes are set to Diamond. + the tqshapes are set as follows: + For TaskViewItems all three tqshapes are set to Square. + For SummaryViewItems all three tqshapes are set to TriangleDown. + For EventViewItems all three tqshapes are set to Diamond. Colors: When a new item is created, the colors are set to the default values @@ -75,7 +75,7 @@ const TQColor& middle, const TQColor& end ); If there is no default value defined for this type, - the colors of the shapes are set to the default color for items of this type, + the colors of the tqshapes are set to the default color for items of this type, defined in the KDGanttView class with: void setDefaultColor( KDGanttViewItem::Type type, const TQColor& ); The initial default color in the KDGanttView class is set to @@ -92,7 +92,7 @@ const TQColor& middle, const TQColor& end ); If there is no default value defined for this type, - the highlight colors of the shapes are set to the default color for + the highlight colors of the tqshapes are set to the default color for items of this type, defined in the KDGanttView class with: void setDefaultHighlightColor( KDGanttViewItem::Type type, const TQColor& ); The initial default highlight color in the KDGanttView class is set to red @@ -138,7 +138,7 @@ Example 1, Color: If you create an instance of a KDGanttView class and add a SummaryViewItem - without setting any color/shape values, you get an item with three shapes + without setting any color/tqshape values, you get an item with three tqshapes of the form TriangleDown in the color magenta. If the item is highlighted, the color will change to the highlight color red. @@ -773,16 +773,16 @@ bool KDGanttViewItem::highlight() const /*! - Specifies the shapes to be used for this item. + Specifies the tqshapes to be used for this item. - It is advisable not to use this method, but rather set the shapes + It is advisable not to use this method, but rather set the tqshapes for all items of a type with KDGanttView::setShapes() in order to get a uniform Gantt view. - \param start the start shape - \param middle the middle shape - \param end the end shape - \sa shapes(), setColors(), colors() + \param start the start tqshape + \param middle the middle tqshape + \param end the end tqshape + \sa tqshapes(), setColors(), colors() */ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end ) { @@ -799,20 +799,20 @@ void KDGanttViewItem::setShapes( Shape start, Shape middle, Shape end ) /*! - Creates shapes of the specified type \a shape. - The background shape color is set to black and the background shape - is slightly bit bigger than the foreground shape to have a black border - around the foreground shape. + Creates tqshapes of the specified type \a tqshape. + The background tqshape color is set to black and the background tqshape + is slightly bit bigger than the foreground tqshape to have a black border + around the foreground tqshape. - \param itemShape the foreground shape - \param middle itemShapeBack the background shape - \param shape the type of the shape + \param itemShape the foreground tqshape + \param middle itemShapeBack the background tqshape + \param tqshape the type of the tqshape (may be TriangleDown, TriangleUp, Diamond, Square, Circle) - \sa shapes(), setColors(), colors() + \sa tqshapes(), setColors(), colors() */ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, KDCanvasPolygonItem* &itemShapeBack, - Shape shape ) + Shape tqshape ) { if ( itemShape && type() == Task ) return; @@ -823,7 +823,7 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, TQCanvasPolygonalItem * itemBack; int size = myItemSize+2; int hei = (myItemSize/3)/2; - switch (shape) { + switch (tqshape) { case TriangleDown: { item = new KDCanvasPolygon(myGanttView->myTimeTable, this,Type_is_KDGanttViewItem); @@ -912,8 +912,8 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, break; } default: - // Uninitialized shape, can e.g. be the case with free-busy - // items which don't have any shapes + // Uninitialized tqshape, can e.g. be the case with free-busy + // items which don't have any tqshapes return; } item->setBrush(Qt::SolidPattern); @@ -927,14 +927,14 @@ void KDGanttViewItem::createShape( KDCanvasPolygonItem* &itemShape, /*! - Returns the shapes used for this item + Returns the tqshapes used for this item - \param start returns the start shape - \param middle returns the middle shape - \param end returns the end shape + \param start returns the start tqshape + \param middle returns the middle tqshape + \param end returns the end tqshape \sa setShapes(), setColors(), colors() */ -void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const +void KDGanttViewItem::tqshapes( Shape& start, Shape& middle, Shape& end ) const { start = myStartShape; middle = myMiddleShape; @@ -943,16 +943,16 @@ void KDGanttViewItem::shapes( Shape& start, Shape& middle, Shape& end ) const /*! - Specifies the colors in which to draw the shapes of this item. + Specifies the colors in which to draw the tqshapes of this item. It is advisable not to use this method, but rather set the colors for all items of a type with KDGanttView::setColors() in order to get a uniform Gantt view. - \param start the color for the start shape - \param middle the color for the middle shape - \param end the color for the end shape - \sa colors(), setShapes(), shapes(), setDefaultColor(), defaultColor() + \param start the color for the start tqshape + \param middle the color for the middle tqshape + \param end the color for the end tqshape + \sa colors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor() */ void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle, const TQColor& end ) @@ -980,7 +980,7 @@ void KDGanttViewItem::setColors( const TQColor& start, const TQColor& middle, \param start returns the start color \param middle returns the middle color \param end returns the end color - \sa setColors(), setShapes(), shapes(), setDefaultColor(), defaultColor() + \sa setColors(), setShapes(), tqshapes(), setDefaultColor(), defaultColor() */ void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) const { @@ -992,7 +992,7 @@ void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) co /*! - Specifies the highlight colors in which to draw the shapes of this item. + Specifies the highlight colors in which to draw the tqshapes of this item. It is advisable not to use this method, but rather set the highlight colors for all items of a type with @@ -1003,10 +1003,10 @@ void KDGanttViewItem::colors( TQColor& start, TQColor& middle, TQColor& end ) co (displaySubitemsAsGroup() == true) all changes apply to all subitems as well. - \param start the highlight color for the start shape - \param middle the highlight color for the middle shape - \param end the highlight color for the end shape - \sa highlightColors(), setShapes(), shapes() + \param start the highlight color for the start tqshape + \param middle the highlight color for the middle tqshape + \param end the highlight color for the end tqshape + \sa highlightColors(), setShapes(), tqshapes() */ void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& middle, const TQColor& end ) { @@ -1032,7 +1032,7 @@ void KDGanttViewItem::setHighlightColors( const TQColor& start, const TQColor& m \param start returns the start highlight color \param middle returns the middle highlight color \param end returns the end highlight color - \sa setHighlightColors(), setShapes(), shapes() + \sa setHighlightColors(), setShapes(), tqshapes() */ void KDGanttViewItem::highlightColors( TQColor& start, TQColor& middle, TQColor& end ) const { @@ -1086,7 +1086,7 @@ TQColor KDGanttViewItem::textColor() const /*! \enum KDGanttViewItem::Shape - This enum is used in order to specify the shapes of a Gantt chart + This enum is used in order to specify the tqshapes of a Gantt chart item. */ @@ -1469,10 +1469,10 @@ void KDGanttViewItem::initColorAndShapes(Type t) setDefaultColor( myGanttView->defaultColor(myType)); // set default highlight color setDefaultHighlightColor(myGanttView->defaultHighlightColor(myType)); - // set shapes - if (!( shapeDefined = (myGanttView->shapes(myType,myStartShape,myMiddleShape,myEndShape)))) { + // set tqshapes + if (!( tqshapeDefined = (myGanttView->tqshapes(myType,myStartShape,myMiddleShape,myEndShape)))) { - //qDebug("KDGantt::KDGanttViewItem created with not user defined shapes"); + //qDebug("KDGantt::KDGanttViewItem created with not user defined tqshapes"); }; setShapes(myStartShape,myMiddleShape,myEndShape); @@ -1486,12 +1486,12 @@ void KDGanttViewItem::initColorAndShapes(Type t) floatStartShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); floatEndShape = (KDCanvasPolygonItem*)new KDCanvasRectangle(myGanttView->myTimeTable,this,Type_is_KDGanttViewItem); - // set color of shapes + // set color of tqshapes if (!( colorDefined = (myGanttView->colors(myType,myStartColor,myMiddleColor,myEndColor)))) { }; setColors(defaultColor(),defaultColor(), defaultColor()); - // set highlight color of shapes + // set highlight color of tqshapes if (!( colorHLDefined = (myGanttView->highlightColors(myType,myStartColorHL,myMiddleColorHL,myEndColorHL)))) { }; @@ -1508,9 +1508,9 @@ void KDGanttViewItem::initColorAndShapes(Type t) } -TQString KDGanttViewItem::shapeToString( Shape shape ) +TQString KDGanttViewItem::tqshapeToString( Shape tqshape ) { - switch( shape ) { + switch( tqshape ) { case TriangleDown: return "TriangleDown"; case TriangleUp: @@ -1571,13 +1571,13 @@ void KDGanttViewItem::createNode( TQDomDocument& doc, KDGanttXML::createBoolNode( doc, itemElement, "Open", isOpen() ); KDGanttXML::createBoolNode( doc, itemElement, "Highlight", highlight() ); Shape startShape, middleShape, endShape; - shapes( startShape, middleShape, endShape ); + tqshapes( startShape, middleShape, endShape ); KDGanttXML::createStringNode( doc, itemElement, "StartShape", - shapeToString( startShape ) ); + tqshapeToString( startShape ) ); KDGanttXML::createStringNode( doc, itemElement, "MiddleShape", - shapeToString( middleShape ) ); + tqshapeToString( middleShape ) ); KDGanttXML::createStringNode( doc, itemElement, "EndShape", - shapeToString( endShape ) ); + tqshapeToString( endShape ) ); KDGanttXML::createColorNode( doc, itemElement, "DefaultColor", defaultColor() ); TQColor startColor, middleColor, endColor; colors( startColor, middleColor, endColor ); @@ -2294,7 +2294,7 @@ void KDGanttViewItem::resetSubitemVisibility() In calendar mode, only those items can be opened which have subitems which have subitems. An item which has subitems which have no subitems is called a calendar. - I.e., an item that contains + I.e., an item that tqcontains multiple calendars can be opened, while a calendar item itself cannot. But if all calendars of an item do not have any subitem (e.g at startup), the program cannot detect automatically that it should be possible to open @@ -2365,37 +2365,37 @@ bool KDGanttViewItem::isCalendar( ) const /*! \var KDGanttViewItem::startShape - the shape at the beginning of the item + the tqshape at the beginning of the item */ /*! \var KDGanttViewItem::midShape - the shape in the middle of the item + the tqshape in the middle of the item */ /*! \var KDGanttViewItem::endShape - the shape at the end of the item + the tqshape at the end of the item */ /*! \var KDGanttViewItem::startShapeBack - the background shape at the beginning of the item + the background tqshape at the beginning of the item */ /*! \var KDGanttViewItem::midShapeBack - the background shape in the middle of the item + the background tqshape in the middle of the item */ /*! \var KDGanttViewItem::endShapeBack - the background shape at the end of the item + the background tqshape at the end of the item */ diff --git a/kdgantt/KDGanttViewItem.h b/kdgantt/KDGanttViewItem.h index cebced302..80cc258d4 100644 --- a/kdgantt/KDGanttViewItem.h +++ b/kdgantt/KDGanttViewItem.h @@ -146,7 +146,7 @@ public: //bool isCalendar( ) const; void setShapes( Shape start, Shape middle, Shape end ); - void shapes( Shape& start, Shape& middle, Shape& end ) const; + void tqshapes( Shape& start, Shape& middle, Shape& end ) const; void setDefaultColor( const TQColor& ); TQColor defaultColor() const; void setColors( const TQColor& start, const TQColor& middle, @@ -202,7 +202,7 @@ private: friend class KDGanttViewItemDrag; friend class itemAttributeDialog; - static TQString shapeToString( Shape shape ); + static TQString tqshapeToString( Shape tqshape ); static Shape stringToShape( const TQString& string ); static TQString typeToString( Type type ); @@ -242,7 +242,7 @@ private: bool isMyTextCanvas(TQCanvasItem *tc); TQPoint myTextOffset; TQString _name; - bool shapeDefined; + bool tqshapeDefined; int _priority; static TQDict sItemDict; diff --git a/kdgantt/KDGanttViewItemDrag.cpp b/kdgantt/KDGanttViewItemDrag.cpp index 23bf90ac9..5ced61b38 100644 --- a/kdgantt/KDGanttViewItemDrag.cpp +++ b/kdgantt/KDGanttViewItemDrag.cpp @@ -63,7 +63,7 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *sour pix = *(item->pixmap()) ; else { KDGanttViewItem::Shape start, middle, end; - item->shapes( start, middle, end ); + item->tqshapes( start, middle, end ); TQColor st, mi, en; item->colors( st, mi, en ); pix =item->myGanttView->getPixmap( start, st, item->myGanttView->lvBackgroundColor(), 11 ); @@ -86,7 +86,7 @@ KDGanttViewItemDrag::KDGanttViewItemDrag( KDGanttViewItem* item , TQWidget *sour \param c the format of the data \return the encoded data of the drag object */ -TQByteArray KDGanttViewItemDrag::encodedData( const char * c) const +TQByteArray KDGanttViewItemDrag::tqencodedData( const char * c) const { TQString s ( c ); if ( s == "x-application/x-KDGanttViewItemDrag" ) { @@ -132,7 +132,7 @@ bool KDGanttViewItemDrag::canDecode ( const TQMimeSource * e ) bool KDGanttViewItemDrag::decode ( const TQMimeSource * e , TQString & string) { TQByteArray arr; - arr = e->encodedData( "x-application/x-KDGanttViewItemDrag"); + arr = e->tqencodedData( "x-application/x-KDGanttViewItemDrag"); TQDataStream s( arr, IO_ReadOnly ); s >> string; return true; diff --git a/kdgantt/KDGanttViewItemDrag.h b/kdgantt/KDGanttViewItemDrag.h index 2512711ea..d29ec2143 100644 --- a/kdgantt/KDGanttViewItemDrag.h +++ b/kdgantt/KDGanttViewItemDrag.h @@ -44,7 +44,7 @@ class KDGanttViewItemDrag :public QStoredDrag public: KDGanttViewItemDrag(KDGanttViewItem* item, TQWidget *source, const char * name ) ; - TQByteArray encodedData( const char * c) const; + TQByteArray tqencodedData( const char * c) const; KDGanttViewItem* getItem(); static bool canDecode ( const TQMimeSource * e ); static bool decode ( const TQMimeSource * e, TQString & ); diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index ffec65282..daabcb593 100644 --- a/kdgantt/KDGanttViewSubwidgets.cpp +++ b/kdgantt/KDGanttViewSubwidgets.cpp @@ -140,14 +140,14 @@ void KDTimeTableWidget::removeItemFromTasklinks( KDGanttViewItem* item) void KDTimeTableWidget::expandItem( TQListViewItem * item) { - item->invalidateHeight () ; - //qApp->processEvents(); + item->tqinvalidateHeight () ; + //tqApp->processEvents(); updateMyContent(); } void KDTimeTableWidget::collapseItem( TQListViewItem * item) { - item->invalidateHeight () ; - //qApp->processEvents(); + item->tqinvalidateHeight () ; + //tqApp->processEvents(); updateMyContent(); } @@ -160,7 +160,7 @@ void KDTimeTableWidget::highlightItem( TQListViewItem * item ) highlightedItem = ( KDGanttViewItem*)item; itemwashighlighted = highlightedItem->highlight(); highlightedItem->setHighlight(true); - item->invalidateHeight () ; + item->tqinvalidateHeight () ; myGanttView->myListView->contentsY(); updateMyContent(); } @@ -702,12 +702,12 @@ KDTimeHeaderWidget:: KDTimeHeaderWidget( TQWidget* parent,KDGanttView* gant ) mySizeHint = 0; myGanttView = gant; flagDoNotRecomputeAfterChange = true; - TQDateTime start = (TQDateTime::currentDateTime ()).addSecs(-3600); + TQDateTime start = (TQDateTime::tqcurrentDateTime ()).addSecs(-3600); setHorizonStart(start); setHorizonEnd( start.addSecs(3600*2)); flagStartTimeSet = false; flagEndTimeSet = false; - myCenterDateTime = TQDateTime::currentDateTime (); + myCenterDateTime = TQDateTime::tqcurrentDateTime (); setScale(KDGanttView::Auto); //setScale(KDGanttView::Hour); myMaxScale = KDGanttView::Month; @@ -830,14 +830,14 @@ void KDTimeHeaderWidget::addTickRight( int num ) { int secs = ((num*getTickTime())-30); setHorizonEnd(getDateTimeForIndex(width()).addSecs(secs)); - //qApp->processEvents(); + //tqApp->processEvents(); } void KDTimeHeaderWidget::addTickLeft( int num ) { int secs = ((num*getTickTime())-30); setHorizonStart(getDateTimeForIndex(0).addSecs(-secs)); - //qApp->processEvents(); + //tqApp->processEvents(); } // the time in secs of one minor grid tick int KDTimeHeaderWidget::getTickTime() @@ -1140,7 +1140,7 @@ void KDTimeHeaderWidget::zoomToSelection( TQDateTime start, TQDateTime end) } flagDoNotRepaintAfterChange = false; updateTimeTable(); - repaint(); + tqrepaint(); moveTimeLineTo((getCoordX(start)-(viewWid-timeWid)/2)); // Since we have disconnected autoupdate of scrollbars, we must do it ourselves if (myGanttView && myGanttView->myCanvasView) @@ -1436,7 +1436,7 @@ void KDTimeHeaderWidget::setShowMinorTicks( bool show ) flagShowMinorTicks = show; if (show) setShowMajorTicks(false ); - //repaintMe(); + //tqrepaintMe(); updateTimeTable(); } @@ -1487,7 +1487,7 @@ void KDTimeHeaderWidget::computeIntervals( int height ) { IntervalColorList::const_iterator it; for ( it = icList.begin(); it != icList.end(); ++it ) { - (*it)->layout( this, height ); + (*it)->tqlayout( this, height ); } } @@ -1861,7 +1861,7 @@ int KDTimeHeaderWidget::autoScaleMinorTickCount() } -void KDTimeHeaderWidget::repaintMe(int left,int paintwid, TQPainter* painter) +void KDTimeHeaderWidget::tqrepaintMe(int left,int paintwid, TQPainter* painter) { if (flagDoNotRecomputeAfterChange) return; TQColorGroup qcg =TQColorGroup( white, black,white, darkGray,black,gray,gray) ; @@ -2086,7 +2086,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) TQPainter p(this); int Width, Height; TQString testTextMinor,testTextMajor, tempStr; - TQRect itemRectMinor, itemRectMajor; + TQRect tqitemRectMinor, tqitemRectMajor; TQDate tempDate = myRealStart.date(); myRealEnd = myRealStart; // preparing the testtext for the differennt scales @@ -2109,25 +2109,25 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) testTextMinor = "12 AM"; testTextMajor = "Mon Aug 30, x"; if ( yearFormat() != KDGanttView::NoDate ) - testTextMajor += getYear(TQDate::currentDate()); + testTextMajor += getYear(TQDate::tqcurrentDate()); minorPerMajor = 2400; break; case KDGanttView::Day: minorItems = minorItems/(60*24); testTextMinor = "88"; - testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate()); + testTextMajor = "Aug 30, x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 700; break; case KDGanttView::Week: minorItems = minorItems/(60*24*7); testTextMinor = "88"; - testTextMajor = "Aug x"+getYear(TQDate::currentDate()); + testTextMajor = "Aug x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 435; // 435 = 365days/12months/7days * 100 break; case KDGanttView::Month: minorItems = (minorItems*12)/(60*24*365); testTextMinor = "M"; - testTextMajor = "x"+getYear(TQDate::currentDate()); + testTextMajor = "x"+getYear(TQDate::tqcurrentDate()); minorPerMajor = 1200; break; case KDGanttView::Auto: @@ -2135,12 +2135,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) qDebug(" RealScale == Auto : This may not be! "); break; } - itemRectMinor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMinor); - itemRectMajor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMajor); + tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMinor); + tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, Qt::AlignLeft,testTextMajor); p.end(); //qDebug(" tempMinorScaleCount %d ", tempMinorScaleCount); - Height = itemRectMinor.height()+itemRectMajor.height()+11; - Width = (itemRectMinor.width()+5); + Height = tqitemRectMinor.height()+tqitemRectMajor.height()+11; + Width = (tqitemRectMinor.width()+5); if (Width < minimumColumnWidth()) Width = minimumColumnWidth(); // if the desired width is greater than the maximum width of this widget // increase the minorscalecount @@ -2197,7 +2197,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) // checking, if enough space for majorscale // if not, increasing MajorScaleCount - while ((minorPerMajor*Width)/100 < itemRectMajor.width()) { + while ((minorPerMajor*Width)/100 < tqitemRectMajor.width()) { minorPerMajor = minorPerMajor/tempMajorScaleCount; ++tempMajorScaleCount; minorPerMajor = minorPerMajor*tempMajorScaleCount; @@ -2207,13 +2207,13 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) myGridMinorWidth = Width; // the width of this widget is the gridwidth * the amount of items Width *= minorItems; - // if size changed, reset geometry + // if size changed, reset tqgeometry if (width() != Width || height() != Height ) { resize( Width, Height ); emit sizeChanged( Width ); } - myMajorGridHeight = itemRectMajor.height()+5; + myMajorGridHeight = tqitemRectMajor.height()+5; TQTime tempTime = myRealStart.time(); TQDateTime tempDateTime; int i; @@ -2343,7 +2343,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) myGanttView->myTimeTable->setBlockUpdating( block ); updateTimeTable(); centerDateTime(myCenterDateTime); - repaint(); + tqrepaint(); } @@ -2371,7 +2371,7 @@ void KDTimeHeaderWidget::centerDateTime( const TQDateTime& center ) void KDTimeHeaderWidget::paintEvent(TQPaintEvent *p) { - repaintMe(p->rect().x(),p->rect().width()); + tqrepaintMe(p->rect().x(),p->rect().width()); } @@ -2489,7 +2489,7 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * ) //zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) ); } mouseDown = false; - repaint(); + tqrepaint(); } @@ -2504,11 +2504,11 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) if ( mouseDown ) { if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) { mouseDown = false; - repaint(); + tqrepaint(); return; } endMouseDown = e->pos().x(); - //repaint; + //tqrepaint; int val = -1; if (endMouseDown < -x() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->value() - @@ -2517,19 +2517,19 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e ) val = 0; } } - if (endMouseDown > -x() +parentWidget()->width() ) { + if (endMouseDown > -x() +tqparentWidget()->width() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->value() + myGanttView->myCanvasView->horizontalScrollBar()->lineStep(); } - repaintMe(-x(),parentWidget()->width()); + tqrepaintMe(-x(),tqparentWidget()->width()); if ( val > -1 ) { if ( val > myGanttView->myCanvasView->horizontalScrollBar()->maxValue() ) { val = myGanttView->myCanvasView->horizontalScrollBar()->maxValue(); } myGanttView->myCanvasView->horizontalScrollBar()->setValue( val ); } - //qDebug("mousemove %d %d %d %d",endMouseDown, -x(),parentWidget()->width() , e->pos().y()); + //qDebug("mousemove %d %d %d %d",endMouseDown, -x(),tqparentWidget()->width() , e->pos().y()); } } @@ -2631,7 +2631,7 @@ TQSize KDLegendWidget::legendSize() TQSize KDLegendWidget::legendSizeHint() { TQApplication::sendPostedEvents( 0, TQEvent::LayoutHint ); - return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height()); + return TQSize( myLegend->tqsizeHint().width(), myLegend->tqsizeHint().height()+scroll->horizontalScrollBar()->height()); } @@ -2652,7 +2652,7 @@ void KDLegendWidget::clearLegend ( ) myLegend->setFont( font() ); scroll->addChild( myLegend ); scroll->setResizePolicy( TQScrollView::AutoOneFit ); - myLegend->layout()->setMargin( 11 ); + myLegend->tqlayout()->setMargin( 11 ); myLegend->setFrameStyle( TQFrame::NoFrame ); if ( dock ) scroll->setMaximumHeight( 32000 ); @@ -2661,10 +2661,10 @@ void KDLegendWidget::clearLegend ( ) } -void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text ) +void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ) { TQLabel * temp; - TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, Qt::white, 10); + TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, Qt::white, 10); TQWidget *w = new TQWidget( myLegend ); w->setBackgroundColor( Qt::white ); TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6); @@ -2949,7 +2949,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) p->translate( rleft, crtop ); //kdDebug()<i->text(0)<i->paintBranches( p, colorGroup(), treeStepSize(), + current->i->paintBranches( p, tqcolorGroup(), treeStepSize(), rtop - crtop, r.height() ); p->restore(); } @@ -3510,7 +3510,7 @@ KDGanttCanvasView::MovingOperation KDGanttCanvasView::gvItemHitTest( KDGanttView void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) { //qDebug("mousepress! %d ", this); - //qDebug("focus %d ",qApp->focusWidget()); + //qDebug("focus %d ",tqApp->tqfocusWidget()); setFocus(); currentLink = 0; currentItem = 0; @@ -3819,14 +3819,14 @@ void KDGanttCanvasView::contentsMouseMoveEvent ( TQMouseEvent *e ) const TQPoint p = e->pos(); if ( movingItem ) { - int x = qRound( movingItem->x() ); + int x = tqRound( movingItem->x() ); int width = movingItem->width(); switch( movingOperation ) { case Moving: x += p.x() - movingStart.x(); break; case ResizingLeft: { - width = qRound( movingItem->x() + movingItem->width() - p.x() ); + width = tqRound( movingItem->x() + movingItem->width() - p.x() ); x = p.x(); break; } @@ -4003,7 +4003,7 @@ void KDIntervalColorRectangle::setDateTimes( const TQDateTime& start, mStart = start; mEnd = end; if ( mEnd < mStart ) - qSwap( mStart, mEnd ); + tqSwap( mStart, mEnd ); } /*! @@ -4018,7 +4018,7 @@ void KDIntervalColorRectangle::setColor( const TQColor& color ) /*! \internal */ -void KDIntervalColorRectangle::layout( KDTimeHeaderWidget* timeHeader, int height ) +void KDIntervalColorRectangle::tqlayout( KDTimeHeaderWidget* timeHeader, int height ) { int left = timeHeader->getCoordX(mStart); int right = timeHeader->getCoordX(mEnd); diff --git a/kdgantt/KDGanttViewSubwidgets.h b/kdgantt/KDGanttViewSubwidgets.h index 1a88411a3..de771800e 100644 --- a/kdgantt/KDGanttViewSubwidgets.h +++ b/kdgantt/KDGanttViewSubwidgets.h @@ -138,7 +138,7 @@ public: Scale mini = KDGanttView::Minute , Scale maxi = KDGanttView::Month); #if 0 - // This API has been replaced with KDIntervalColorRectangle and addIntervalBackgroundColor + // This API has been tqreplaced with KDIntervalColorRectangle and addIntervalBackgroundColor void setIntervalBackgroundColor( const TQDateTime& start, const TQDateTime& end, const TQColor& color, @@ -174,7 +174,7 @@ public: return ccList; } TQColor weekdayColor[8]; - void repaintMe(int left, int wid, TQPainter *p = 0); + void tqrepaintMe(int left, int wid, TQPainter *p = 0); void centerDateTime( const TQDateTime& center ); @@ -334,7 +334,7 @@ public: KDLegendWidget ( TQWidget* parent, KDGanttMinimizeSplitter* legendParent ); void showMe(bool); bool isShown(); - void addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text ); + void addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text ); void clearLegend(); void setFont( TQFont ); void drawToPainter( TQPainter *p ); @@ -467,7 +467,7 @@ public: enum HitTest { Start, Middle, End }; HitTest hitTest( KDTimeHeaderWidget* timeHeader, const TQPoint& pos ) const; - void layout( KDTimeHeaderWidget* timeHeader, int height ); + void tqlayout( KDTimeHeaderWidget* timeHeader, int height ); static const int RTTI = 0x0c58; /*reimp*/ int rtti() const { return RTTI; } diff --git a/kdgantt/KDGanttViewSummaryItem.cpp b/kdgantt/KDGanttViewSummaryItem.cpp index cb7e2893c..95ca682d2 100644 --- a/kdgantt/KDGanttViewSummaryItem.cpp +++ b/kdgantt/KDGanttViewSummaryItem.cpp @@ -267,7 +267,7 @@ void KDGanttViewSummaryItem::hideMe() void KDGanttViewSummaryItem::showItem( bool show, int coordY ) { isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; diff --git a/kdgantt/KDGanttViewTaskItem.cpp b/kdgantt/KDGanttViewTaskItem.cpp index 1bcb96a65..f2ba122c1 100644 --- a/kdgantt/KDGanttViewTaskItem.cpp +++ b/kdgantt/KDGanttViewTaskItem.cpp @@ -43,7 +43,7 @@ This class represents calendar items in Gantt charts. - A calendar item in a Gantt chart has no start/end shape, + A calendar item in a Gantt chart has no start/end tqshape, it is displayed as a rectangle. You can set the colors as usual, where only the first argument of setColors( col, col, col ) @@ -201,7 +201,7 @@ void KDGanttViewTaskItem::showItem(bool show, int coordY) //qDebug("KDGanttViewTaskItem::showItem() %d %s ", (int) show, listViewText().latin1()); isVisibleInGanttView = show; - invalidateHeight () ; + tqinvalidateHeight () ; if (!show) { hideMe(); return; diff --git a/kdgantt/itemAttributeDialog.ui b/kdgantt/itemAttributeDialog.ui index 8b8d5518e..10fac5d62 100644 --- a/kdgantt/itemAttributeDialog.ui +++ b/kdgantt/itemAttributeDialog.ui @@ -4,7 +4,7 @@ itemAttributeDialog - + 0 0 @@ -64,7 +64,7 @@ Expanding - + 0 16 @@ -383,7 +383,7 @@ Expanding - + 0 16 @@ -462,7 +462,7 @@ Text color: - + AlignVCenter|AlignRight @@ -733,5 +733,5 @@ PrioSlider_valueChanged( int val ) getItem() - + diff --git a/kdgantt/itemAttributeDialog.ui.h b/kdgantt/itemAttributeDialog.ui.h index 2ca8b6718..348b3e972 100644 --- a/kdgantt/itemAttributeDialog.ui.h +++ b/kdgantt/itemAttributeDialog.ui.h @@ -54,7 +54,7 @@ void itemAttributeDialog::ChangeText_clicked() myItem->setTextColor( c ); TQPixmap * pix = (TQPixmap *)ChangeText->pixmap(); pix->fill( myItem->textColor() ); - ChangeText->repaint(); + ChangeText->tqrepaint(); } @@ -62,7 +62,7 @@ void itemAttributeDialog::ChangeStart_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); TQColor c = QColorDialog::getColor( st, this ); @@ -79,7 +79,7 @@ void itemAttributeDialog::ChangeMiddle_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); TQColor c = QColorDialog::getColor( mi, this ); @@ -95,7 +95,7 @@ void itemAttributeDialog::ChangeEnd_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->colors( st, mi, en ); TQColor c = QColorDialog::getColor( en, this ); @@ -244,7 +244,7 @@ void itemAttributeDialog::reset( KDGanttViewItem * item ) // DateEdit3->setRange(item->startTime().date(), item->endTime().date().addYears(10)); LineEdit1->setText( item->text() ); KDGanttViewItem::Shape start, middle, end; - item->shapes( start, middle, end ); + item->tqshapes( start, middle, end ); TQColor st, mi, en; item->colors( st, mi, en ); ChangeStart->setPixmap( KDGanttView::getPixmap( start, st, backgroundColor(), 10 ) ); @@ -272,7 +272,7 @@ void itemAttributeDialog::HighStart_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); TQColor c = QColorDialog::getColor( st, this ); @@ -289,7 +289,7 @@ void itemAttributeDialog::HighMiddle_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); TQColor c = QColorDialog::getColor( mi, this ); @@ -306,7 +306,7 @@ void itemAttributeDialog::HighEnd_clicked() { if ( !myItem) return; KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); TQColor st, mi, en; myItem->highlightColors( st, mi, en ); TQColor c = QColorDialog::getColor( en, this ); @@ -409,7 +409,7 @@ void itemAttributeDialog::LineEdit1_textChanged( const TQString & ) void itemAttributeDialog::StartBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); start = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); @@ -419,7 +419,7 @@ void itemAttributeDialog::StartBox_activated( const TQString & s ) void itemAttributeDialog::MiddleBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); middle = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); @@ -430,7 +430,7 @@ void itemAttributeDialog::MiddleBox_activated( const TQString & s ) void itemAttributeDialog::EndBox_activated( const TQString & s ) { KDGanttViewItem::Shape start, middle, end; - myItem->shapes( start, middle, end ); + myItem->tqshapes( start, middle, end ); end = KDGanttViewItem::stringToShape( s ); myItem->setShapes( start, middle, end ); reset( myItem ); diff --git a/kdgantt/qlayoutengine_p.h b/kdgantt/qlayoutengine_p.h index fed046aeb..2681ff733 100644 --- a/kdgantt/qlayoutengine_p.h +++ b/kdgantt/qlayoutengine_p.h @@ -46,7 +46,7 @@ // ------------- // // This file is not part of the Qt API. It exists for the convenience -// of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. +// of qtqlayout.cpp, qtqlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. // This header file may change from version to version without notice, // or even be removed. // @@ -56,21 +56,21 @@ #ifndef QT_H -#include "tqabstractlayout.h" +#include "tqabstractqlayout.h" #endif // QT_H #ifndef QT_NO_LAYOUT struct QLayoutStruct { - void initParameters() { minimumSize = sizeHint = 0; - maximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } + void initParameters() { tqminimumSize = tqsizeHint = 0; + tqmaximumSize = QWIDGETSIZE_MAX; expansive = FALSE; empty = TRUE; } void init() { stretch = 0; initParameters(); } //permanent storage: int stretch; //parameters: - QCOORD sizeHint; - QCOORD maximumSize; - QCOORD minimumSize; + QCOORD tqsizeHint; + QCOORD tqmaximumSize; + QCOORD tqminimumSize; bool expansive; bool empty; //temporary storage: -- cgit v1.2.1