summaryrefslogtreecommitdiffstats
path: root/libkdeedu/kdeeduplot
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
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')
-rw-r--r--libkdeedu/kdeeduplot/kplotaxis.h2
-rw-r--r--libkdeedu/kdeeduplot/kplotobject.h6
-rw-r--r--libkdeedu/kdeeduplot/kplotwidget.cpp26
-rw-r--r--libkdeedu/kdeeduplot/kplotwidget.h9
4 files changed, 22 insertions, 21 deletions
diff --git a/libkdeedu/kdeeduplot/kplotaxis.h b/libkdeedu/kdeeduplot/kplotaxis.h
index 107620b8..3209b18c 100644
--- a/libkdeedu/kdeeduplot/kplotaxis.h
+++ b/libkdeedu/kdeeduplot/kplotaxis.h
@@ -77,7 +77,7 @@ public:
private:
bool m_visible; ///< Property "visible" defines if Axis is drawn or not.
- QString m_label; ///< The label of the axis.
+ TQString m_label; ///< The label of the axis.
int m_labelFieldWidth; ///< Field width for number labels, see TQString::arg().
char m_labelFmt; ///< Number format for number labels, see TQString::arg().
int m_labelPrec; ///< Number precision for number labels, see TQString::arg().
diff --git a/libkdeedu/kdeeduplot/kplotobject.h b/libkdeedu/kdeeduplot/kplotobject.h
index 2474fc32..f1074cb6 100644
--- a/libkdeedu/kdeeduplot/kplotobject.h
+++ b/libkdeedu/kdeeduplot/kplotobject.h
@@ -82,7 +82,7 @@ private:
*@short Encapsulates an object to be plotted in a KPlotWidget.
*@author Jason Harris
*@version 1.0
- *Each KPlotObject consists of a list of QPoints, an object type, a color, a size,
+ *Each KPlotObject consists of a list of TQPoints, an object type, a color, a size,
*and a TQString name. An additional integer (param) specifies something further
*about the object's appearance, depending on its type. There is a draw function
*for plotting the object on a KPlotWidget's TQPainter.
@@ -101,7 +101,7 @@ public:
/**@enum CPARAM
*Parameter specifying the kind of line. These are numerically equal to
- *the Qt::PenStyle enum values.
+ *the TQt::PenStyle enum values.
*/
enum CPARAM { NO_LINE=0, SOLID=1, DASHED=2, DOTTED=3, DASHDOTTED=4, DASHDOTDOTTED=5, UNKNOWN_CURVE };
@@ -187,7 +187,7 @@ public:
*/
void removePoint( unsigned int index );
-/**@return the number of QPoints currently in the list
+/**@return the number of TQPoints currently in the list
*/
unsigned int count() const { return pList.count(); }
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
}
diff --git a/libkdeedu/kdeeduplot/kplotwidget.h b/libkdeedu/kdeeduplot/kplotwidget.h
index 5ed550ec..2545ff83 100644
--- a/libkdeedu/kdeeduplot/kplotwidget.h
+++ b/libkdeedu/kdeeduplot/kplotwidget.h
@@ -40,16 +40,17 @@ class TQPixmap;
class KDE_EXPORT KPlotWidget : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public:
/**@short Constructor. Sets the primary x and y limits in data units.
*@param x1 the minimum X value in data units
*@param x2 the maximum X value in data units
*@param y1 the minimum Y value in data units
*@param y2 the maximum Y value in data units
- *@param parent the parent widget
+ *@param tqparent the tqparent widget
*@param name name label for the KPlotWidget
*/
- KPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, TQWidget *parent=0, const char* name=0 );
+ KPlotWidget( double x1=0.0, double x2=1.0, double y1=0.0, double y2=1.0, TQWidget *tqparent=0, const char* name=0 );
/**Destructor (empty)
*/
@@ -99,7 +100,7 @@ public:
*@param i the index of th item to be replaced
*@param o pointer to the replacement KPlotObject
*/
- virtual void replaceObject( int i, KPlotObject *o ) { ObjectList.replace( i, o ); }
+ virtual void replaceObject( int i, KPlotObject *o ) { ObjectList.tqreplace( i, o ); }
/**@return the number of KPlotObjects in the list
*/
@@ -212,7 +213,7 @@ public:
KPlotAxis LeftAxis;
protected:
- /**@short the paint event handler, executed when update() or repaint() is called.
+ /**@short the paint event handler, executed when update() or tqrepaint() is called.
*/
virtual void paintEvent( TQPaintEvent* /* e */ );