summaryrefslogtreecommitdiffstats
path: root/kdgantt/KDGanttViewSubwidgets.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:32:11 -0600
commit94844816550ad672ccfcdc25659c625546239998 (patch)
treee35fc60fd736c645d59f6408af032774ad8023d3 /kdgantt/KDGanttViewSubwidgets.cpp
parent2a811c38c74c03648ecf857e566c44483cbad706 (diff)
downloadkoffice-94844816550ad672ccfcdc25659c625546239998.tar.gz
koffice-94844816550ad672ccfcdc25659c625546239998.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kdgantt/KDGanttViewSubwidgets.cpp')
-rw-r--r--kdgantt/KDGanttViewSubwidgets.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kdgantt/KDGanttViewSubwidgets.cpp b/kdgantt/KDGanttViewSubwidgets.cpp
index d158c75a..f44b8fb5 100644
--- a/kdgantt/KDGanttViewSubwidgets.cpp
+++ b/kdgantt/KDGanttViewSubwidgets.cpp
@@ -48,7 +48,7 @@
#include <tqtooltip.h>
#include <tqapplication.h>
#include <tqdrawutil.h>
-#include <tqpalette.h>
+#include <palette.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::tqcurrentDateTime ()).addSecs(-3600);
+ TQDateTime start = (TQDateTime::currentDateTime ()).addSecs(-3600);
setHorizonStart(start);
setHorizonEnd( start.addSecs(3600*2));
flagStartTimeSet = false;
flagEndTimeSet = false;
- myCenterDateTime = TQDateTime::tqcurrentDateTime ();
+ myCenterDateTime = TQDateTime::currentDateTime ();
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)").tqarg( TQString::number( zoomFactor(), 'f',3) ) );
+ myPopupMenu->changeItem( 1, i18n("Zoom (%1)").arg( 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();
- tqrepaint();
+ repaint();
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 tqitemRectMinor, tqitemRectMajor;
+ TQRect itemRectMinor, itemRectMajor;
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::tqcurrentDate());
+ testTextMajor += getYear(TQDate::currentDate());
minorPerMajor = 2400;
break;
case KDGanttView::Day:
minorItems = minorItems/(60*24);
testTextMinor = "88";
- testTextMajor = "Aug 30, x"+getYear(TQDate::tqcurrentDate());
+ testTextMajor = "Aug 30, x"+getYear(TQDate::currentDate());
minorPerMajor = 700;
break;
case KDGanttView::Week:
minorItems = minorItems/(60*24*7);
testTextMinor = "88";
- testTextMajor = "Aug x"+getYear(TQDate::tqcurrentDate());
+ testTextMajor = "Aug x"+getYear(TQDate::currentDate());
minorPerMajor = 435; // 435 = 365days/12months/7days * 100
break;
case KDGanttView::Month:
minorItems = (minorItems*12)/(60*24*365);
testTextMinor = "M";
- testTextMajor = "x"+getYear(TQDate::tqcurrentDate());
+ testTextMajor = "x"+getYear(TQDate::currentDate());
minorPerMajor = 1200;
break;
case KDGanttView::Auto:
@@ -2147,12 +2147,12 @@ void KDTimeHeaderWidget::computeTicks(bool doNotComputeRealScale)
qDebug(" RealScale == Auto : This may not be! ");
break;
}
- tqitemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
- tqitemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
+ itemRectMinor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMinor);
+ itemRectMajor = p.boundingRect ( 10, 10, 2, 2, TQt::AlignLeft,testTextMajor);
p.end();
//qDebug(" tempMinorScaleCount %d ", tempMinorScaleCount);
- Height = tqitemRectMinor.height()+tqitemRectMajor.height()+11;
- Width = (tqitemRectMinor.width()+5);
+ Height = itemRectMinor.height()+itemRectMajor.height()+11;
+ Width = (itemRectMinor.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 < tqitemRectMajor.width()) {
+ while ((minorPerMajor*Width)/100 < itemRectMajor.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 tqgeometry
+ // if size changed, reset geometry
if (width() != Width || height() != Height )
{
resize( Width, Height );
emit sizeChanged( Width );
}
- myMajorGridHeight = tqitemRectMajor.height()+5;
+ myMajorGridHeight = itemRectMajor.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);
- tqrepaint();
+ repaint();
}
@@ -2501,7 +2501,7 @@ void KDTimeHeaderWidget::mouseReleaseEvent ( TQMouseEvent * )
//zoomToSelection( getDateTimeForIndex(start),getDateTimeForIndex(end) );
}
mouseDown = false;
- tqrepaint();
+ repaint();
}
@@ -2516,11 +2516,11 @@ void KDTimeHeaderWidget::mouseMoveEvent ( TQMouseEvent * e )
if ( mouseDown ) {
if ( e->pos().y() < -height() || e->pos().y() > 2* height() ) {
mouseDown = false;
- tqrepaint();
+ repaint();
return;
}
endMouseDown = e->pos().x();
- //tqrepaint;
+ //repaint;
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->tqsizeHint().width(), myLegend->tqsizeHint().height()+scroll->horizontalScrollBar()->height());
+ return TQSize( myLegend->sizeHint().width(), myLegend->sizeHint().height()+scroll->horizontalScrollBar()->height());
}
@@ -2664,7 +2664,7 @@ void KDLegendWidget::clearLegend ( )
myLegend->setFont( font() );
scroll->addChild( myLegend );
scroll->setResizePolicy( TQScrollView::AutoOneFit );
- myLegend->tqlayout()->setMargin( 11 );
+ myLegend->layout()->setMargin( 11 );
myLegend->setFrameStyle( TQFrame::NoFrame );
if ( dock )
scroll->setMaximumHeight( 32000 );
@@ -2673,10 +2673,10 @@ void KDLegendWidget::clearLegend ( )
}
-void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape tqshape, const TQColor& tqshapeColor, const TQString& text )
+void KDLegendWidget::addLegendItem( KDGanttViewItem::Shape shape, const TQColor& shapeColor, const TQString& text )
{
TQLabel * temp;
- TQPixmap p = KDGanttView::getPixmap( tqshape, tqshapeColor, TQt::white, 10);
+ TQPixmap p = KDGanttView::getPixmap( shape, shapeColor, 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 = ( tqpalette().inactive() );
+ const TQColorGroup &cg = ( palette().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 tqchildren of current need to be painted?
+ // do any children 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, tqcolorGroup(), treeStepSize(),
+ current->i->paintBranches( p, colorGroup(), 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->tqfocusWidget());
+ //qDebug("focus %d ",tqApp->focusWidget());
setFocus();
currentLink = 0;
currentItem = 0;