summaryrefslogtreecommitdiffstats
path: root/arts/gui/kde/kgraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arts/gui/kde/kgraph.cpp')
-rw-r--r--arts/gui/kde/kgraph.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/arts/gui/kde/kgraph.cpp b/arts/gui/kde/kgraph.cpp
index 80541b96..21d3d8cf 100644
--- a/arts/gui/kde/kgraph.cpp
+++ b/arts/gui/kde/kgraph.cpp
@@ -23,7 +23,7 @@
#include "kgraph.h"
#include "kgraph.moc"
#include "kgraphline_impl.h"
-#include "qpainter.h"
+#include "tqpainter.h"
#include <cstdlib>
#include <math.h>
@@ -31,8 +31,8 @@
using namespace Arts;
using namespace std;
-KGraph::KGraph( QWidget * parent, const char * name )
- : QWidget( parent, name )
+KGraph::KGraph( TQWidget * parent, const char * name )
+ : TQWidget( parent, name )
{
setBackgroundColor(white);
@@ -65,21 +65,21 @@ void KGraph::removeLine(Arts::KGraphLine_impl *line)
lines.remove(line);
}
-inline QPoint KGraph::g2qPoint(const GraphPoint &gp)
+inline TQPoint KGraph::g2qPoint(const GraphPoint &gp)
{
- return QPoint(int(((gp.x - minx)/(maxx-minx)) * (width()-1)),
+ return TQPoint(int(((gp.x - minx)/(maxx-minx)) * (width()-1)),
int((1.0 - (gp.y - miny)/(maxy-miny)) * (height()-1)));
}
-inline GraphPoint KGraph::q2gPoint(const QPoint &qp)
+inline GraphPoint KGraph::q2gPoint(const TQPoint &qp)
{
return GraphPoint((float(qp.x())/float(width()-1)) * (maxx-minx) + minx,
(1.0 - (float(qp.y())/float(height()-1))) * (maxy-miny) + miny);
}
-void KGraph::paintEvent( QPaintEvent *e )
+void KGraph::paintEvent( TQPaintEvent *e )
{
- QPainter painter(this);
+ TQPainter painter(this);
painter.setClipRect(e->rect());
std::list<KGraphLine_impl *>::iterator li;
@@ -88,14 +88,14 @@ void KGraph::paintEvent( QPaintEvent *e )
KGraphLine_impl *gline = *li;
vector<GraphPoint>::iterator pi;
- QPoint lastp;
+ TQPoint lastp;
bool first = true;
painter.setPen(gline->_color.c_str());
for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++)
{
- QPoint p = g2qPoint(*pi);
+ TQPoint p = g2qPoint(*pi);
if(!first)
painter.drawLine(lastp,p);
@@ -109,7 +109,7 @@ void KGraph::paintEvent( QPaintEvent *e )
}
}
-void KGraph::mousePressEvent(QMouseEvent *e)
+void KGraph::mousePressEvent(TQMouseEvent *e)
{
if(e->button() == LeftButton || e->button() == RightButton)
{
@@ -122,7 +122,7 @@ void KGraph::mousePressEvent(QMouseEvent *e)
int index = 0;
for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++, index++)
{
- QPoint p = g2qPoint(*pi);
+ TQPoint p = g2qPoint(*pi);
int dx = e->x() - p.x();
int dy = e->y() - p.y();
@@ -167,14 +167,14 @@ void KGraph::mousePressEvent(QMouseEvent *e)
{
KGraphLine_impl *gline = *li;
- QPoint lastp;
+ TQPoint lastp;
bool first = true;
vector<GraphPoint>::iterator pi;
int index = 0;
for(pi = gline->_points.begin(); pi != gline->_points.end(); pi++, index++)
{
- QPoint p = g2qPoint(*pi);
+ TQPoint p = g2qPoint(*pi);
if(!first && (e->x() > lastp.x()+2) && (e->x() < p.x()-2))
{
@@ -183,7 +183,7 @@ void KGraph::mousePressEvent(QMouseEvent *e)
if(abs(y-e->y()) < 5)
{
- GraphPoint gp = q2gPoint(QPoint(e->x(),y));
+ GraphPoint gp = q2gPoint(TQPoint(e->x(),y));
vector<GraphPoint> newPoints;
for(int i=0;i<( int )gline->_points.size();i++)
@@ -208,9 +208,9 @@ void KGraph::mousePressEvent(QMouseEvent *e)
}
}
-void KGraph::mouseMoveEvent(QMouseEvent *e)
+void KGraph::mouseMoveEvent(TQMouseEvent *e)
{
- QPoint pos = e->pos();
+ TQPoint pos = e->pos();
if(pos.x() < 0) pos.setX(0);
if(pos.y() < 0) pos.setY(0);
@@ -257,7 +257,7 @@ void KGraph::mouseMoveEvent(QMouseEvent *e)
}
}
-void KGraph::mouseReleaseEvent(QMouseEvent *)
+void KGraph::mouseReleaseEvent(TQMouseEvent *)
{
selectedIndex = -1;
selectedLine = 0;