summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewSubwidgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.cpp')
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp86
1 files changed, 43 insertions, 43 deletions
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()<<k_funcinfo<<"paintBranches: "<<current->i->text(0)<<endl;
- current->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);