diff options
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.cpp')
-rw-r--r-- | kdgantt/KDGanttViewSubwidgets.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp index f44b8fb5..d158c75a 100644 --- a/kdgantt/KDGanttViewSubwidgets.cpp +++ b/kdgantt/KDGanttViewSubwidgets.cpp @@ -48,7 +48,7 @@ #include <tqtooltip.h> #include <tqapplication.h> #include <tqdrawutil.h> -#include <palette.h> +#include <tqpalette.h> #include <tqdragobject.h> #include <tqptrlist.h> #include <tqpen.h> @@ -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; @@ -792,7 +792,7 @@ void KDTimeHeaderWidget::preparePopupMenu() if (flagZoomToFit) myPopupMenu->changeItem( 1, i18n("Zoom (Fit)")); else - myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( TQString::number( zoomFactor(), 'f',3) ) ); + myPopupMenu->changeItem( 1, i18n("Zoom (%1)").tqarg( TQString::number( zoomFactor(), 'f',3) ) ); int i = 0; int id; while ( ( id = scalePopupMenu->idAt( i++ )) >= 0 ) { @@ -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) @@ -2098,7 +2098,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 @@ -2121,25 +2121,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: @@ -2147,12 +2147,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) qDebug(" RealScale == Auto : This may not be! "); break; } - itemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor); - itemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor); + tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor); + tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::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 @@ -2209,7 +2209,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; @@ -2219,13 +2219,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; @@ -2355,7 +2355,7 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale) myGanttView->myTimeTable->setBlockUpdating( block ); updateTimeTable(); centerDateTime(myCenterDateTime); - repaint(); + tqrepaint(); } @@ -2501,7 +2501,7 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * ) //zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) ); } mouseDown = false; - repaint(); + tqrepaint(); } @@ -2516,11 +2516,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() - @@ -2643,7 +2643,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()); } @@ -2664,7 +2664,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 ); @@ -2673,10 +2673,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, TQt::white, 10); + TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10); TQWidget *w = new TQWidget( myLegend ); w->setBackgroundColor( TQt::white ); TQHBoxLayout *lay = new TQHBoxLayout( w ,0, 6); @@ -2896,7 +2896,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) c = fc; // draw to last interesting column - const TQColorGroup &cg = ( palette().inactive() ); + const TQColorGroup &cg = ( tqpalette().inactive() ); while ( c < lc && !drawables.isEmpty() ) { int i = header()->mapToLogical( c ); @@ -2933,7 +2933,7 @@ void KDListView::drawAllContents(TQPainter * p, int cx, int cy, int cw, int ch) if ( tx < 0 ) tx = header()->cellPos( cell ); - // do any children of current need to be painted? + // do any tqchildren of current need to be painted? /* FIXME: painting branches doesn't work for some reason... if ( ih != ith && rootIsDecorated() && @@ -2961,7 +2961,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(); } @@ -3506,7 +3506,7 @@ TQString KDGanttCanvasView::getWhatsThisText(TQPoint p) void KDGanttCanvasView::contentsMousePressEvent ( TQMouseEvent * e ) { //qDebug("mousepress! %d ", this); - //qDebug("focus %d ",tqApp->focusWidget()); + //qDebug("focus %d ",tqApp->tqfocusWidget()); setFocus(); currentLink = 0; currentItem = 0; |