summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewSubwidgets.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.cpp')
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp62
1 files changed, 31 insertions, 31 deletions
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index bb0756f38..bd83feb14 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)
@@ -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 );
}
}
@@ -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, 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
@@ -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();
}
@@ -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() -
@@ -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, 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);
@@ -2884,7 +2884,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 );
@@ -2921,7 +2921,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() &&
@@ -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 ",tqApp->focusWidget());
+ //qDebug("focus %d ",tqApp->tqfocusWidget());
setFocus();
currentLink = 0;
currentItem = 0;
@@ -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);