summaryrefslogtreecommitdiffstats
path: root/libkdeedu/kdeeduplot/kplotwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /libkdeedu/kdeeduplot/kplotwidget.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdeedu/kdeeduplot/kplotwidget.cpp')
-rw-r--r--libkdeedu/kdeeduplot/kplotwidget.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/libkdeedu/kdeeduplot/kplotwidget.cpp b/libkdeedu/kdeeduplot/kplotwidget.cpp
index 99e9b321..22fba3b0 100644
--- a/libkdeedu/kdeeduplot/kplotwidget.cpp
+++ b/libkdeedu/kdeeduplot/kplotwidget.cpp
@@ -23,8 +23,8 @@
#include "kplotwidget.h"
#include "kplotwidget.moc"
-KPlotWidget::KPlotWidget( double x1, double x2, double y1, double y2, TQWidget *parent, const char* name )
- : TQWidget( parent, name, WNoAutoErase ),
+KPlotWidget::KPlotWidget( double x1, double x2, double y1, double y2, TQWidget *tqparent, const char* name )
+ : TQWidget( tqparent, name, WNoAutoErase ),
dXtick(0.0), dYtick(0.0),
nmajX(0), nminX(0), nmajY(0), nminY(0),
ShowTickMarks( true ), ShowTickLabels( true ), ShowGrid( false )
@@ -178,7 +178,7 @@ void KPlotWidget::drawObjects( TQPainter *p ) {
}
}
- p->setBrush( Qt::NoBrush );
+ p->setBrush( TQt::NoBrush );
break;
}
@@ -195,14 +195,14 @@ void KPlotWidget::drawObjects( TQPainter *p ) {
case KPlotObject::LABEL : //draw label centered at point in x, and slightly below point in y.
{
TQPoint q = po->points()->first()->qpoint( PixRect, DataRect );
- p->drawText( q.x()-20, q.y()+6, 40, 10, Qt::AlignCenter | Qt::DontClip, po->name() );
+ p->drawText( q.x()-20, q.y()+6, 40, 10, TQt::AlignCenter | TQt::DontClip, po->name() );
break;
}
case KPlotObject::POLYGON :
{
p->setPen( TQPen( TQColor( po->color() ), po->size(), (TQPen::PenStyle)po->param() ) );
- p->setBrush( po->color() );
+ p->setBrush( TQColor( po->color() ) );
TQPointArray a( po->count() );
@@ -223,7 +223,7 @@ void KPlotWidget::drawObjects( TQPainter *p ) {
double KPlotWidget::dmod( double a, double b ) { return ( b * ( ( a / b ) - int( a / b ) ) ); }
void KPlotWidget::drawBox( TQPainter *p ) {
- //First, fill in padding region with bgColor() to mask out-of-bounds plot data
+ //First, fill in padding region with bgColor() to tqmask out-of-bounds plot data
p->setPen( bgColor() );
p->setBrush( bgColor() );
@@ -259,7 +259,7 @@ void KPlotWidget::drawBox( TQPainter *p ) {
}
p->setPen( fgColor() );
- p->setBrush( Qt::NoBrush );
+ p->setBrush( TQt::NoBrush );
if (BottomAxis.isVisible() || LeftAxis.isVisible()) p->drawRect( PixRect ); //box outline
@@ -294,10 +294,10 @@ void KPlotWidget::drawBox( TQPainter *p ) {
double lab = x0 + ix*dXtick;
if ( fabs(lab)/dXtick < 0.00001 ) lab = 0.0; //fix occassional roundoff error with "0.0" label
- TQString str = TQString( "%1" ).arg( lab, BottomAxis.labelFieldWidth(), BottomAxis.labelFmt(), BottomAxis.labelPrec() );
+ TQString str = TQString( "%1" ).tqarg( lab, BottomAxis.labelFieldWidth(), BottomAxis.labelFmt(), BottomAxis.labelPrec() );
if ( px > 0 && px < PixRect.width() ) {
TQRect r( px - BIGTICKSIZE, PixRect.height()+BIGTICKSIZE, 2*BIGTICKSIZE, BIGTICKSIZE );
- p->drawText( r, Qt::AlignCenter | Qt::DontClip, str );
+ p->drawText( r, TQt::AlignCenter | TQt::DontClip, str );
}
}
@@ -316,7 +316,7 @@ void KPlotWidget::drawBox( TQPainter *p ) {
// Draw X Axis Label
if ( ! BottomAxis.label().isEmpty() ) {
TQRect r( 0, PixRect.height() + 2*YPADDING, PixRect.width(), YPADDING );
- p->drawText( r, Qt::AlignCenter, BottomAxis.label() );
+ p->drawText( r, TQt::AlignCenter, BottomAxis.label() );
}
}
@@ -340,10 +340,10 @@ void KPlotWidget::drawBox( TQPainter *p ) {
double lab = y0 + iy*dYtick;
if ( fabs(lab)/dYtick < 0.00001 ) lab = 0.0; //fix occassional roundoff error with "0.0" label
- TQString str = TQString( "%1" ).arg( lab, LeftAxis.labelFieldWidth(), LeftAxis.labelFmt(), LeftAxis.labelPrec() );
+ TQString str = TQString( "%1" ).tqarg( lab, LeftAxis.labelFieldWidth(), LeftAxis.labelFmt(), LeftAxis.labelPrec() );
if ( py > 0 && py < PixRect.height() ) {
TQRect r( -2*BIGTICKSIZE, py-SMALLTICKSIZE, 2*BIGTICKSIZE, 2*SMALLTICKSIZE );
- p->drawText( r, Qt::AlignCenter | Qt::DontClip, str );
+ p->drawText( r, TQt::AlignCenter | TQt::DontClip, str );
}
}
@@ -368,7 +368,7 @@ void KPlotWidget::drawBox( TQPainter *p ) {
p->rotate( -90.0 );
TQRect r( 0, 0, PixRect.height(), XPADDING );
- p->drawText( r, Qt::AlignCenter, LeftAxis.label() ); //draw the label, now that we are sideways
+ p->drawText( r, TQt::AlignCenter, LeftAxis.label() ); //draw the label, now that we are sideways
p->restore(); //restore translation/rotation state
}