diff options
Diffstat (limited to 'src/gui/probepositioner.cpp')
-rw-r--r-- | src/gui/probepositioner.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/probepositioner.cpp b/src/gui/probepositioner.cpp index 1ea2606..5cf8ee2 100644 --- a/src/gui/probepositioner.cpp +++ b/src/gui/probepositioner.cpp @@ -13,15 +13,15 @@ #include "oscilloscopeview.h" #include "probepositioner.h" -#include <qevent.h> -#include <qpainter.h> -#include <qpointarray.h> +#include <tqevent.h> +#include <tqpainter.h> +#include <tqpointarray.h> #include <algorithm> #include <cmath> -ProbePositioner::ProbePositioner(QWidget *parent, const char *name) - : QWidget( parent, name, WNoAutoErase ) +ProbePositioner::ProbePositioner(TQWidget *tqparent, const char *name) + : TQWidget( tqparent, name, WNoAutoErase ) { m_probePosOffset = 0; p_draggedProbe = 0l; @@ -41,7 +41,7 @@ ProbePositioner::~ProbePositioner() void ProbePositioner::forceRepaint() { b_needRedraw = true; - repaint(false); + tqrepaint(false); } @@ -91,7 +91,7 @@ void ProbePositioner::setProbePosition( ProbeData *probeData, int position ) } -ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos ) +ProbeData* ProbePositioner::probeAtPosition( const TQPoint &pos ) { int relativeArrowHeight = int( probeArrowHeight * ( 1. - float(pos.x()/probeArrowWidth) ) ); @@ -112,9 +112,9 @@ ProbeData* ProbePositioner::probeAtPosition( const QPoint &pos ) void ProbePositioner::slotProbeDataRegistered( int id, ProbeData *probe ) { m_probeDataMap[id] = probe; - connect( probe, SIGNAL(displayAttributeChanged()), this, SLOT(forceRepaint()) ); + connect( probe, TQT_SIGNAL(displayAttributeChanged()), this, TQT_SLOT(forceRepaint()) ); // This connect doesn't really belong here, but it save a lot of code - connect( probe, SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, SLOT(updateView()) ); + connect( probe, TQT_SIGNAL(displayAttributeChanged()), Oscilloscope::self()->oscilloscopeView, TQT_SLOT(updateView()) ); forceRepaint(); Oscilloscope::self()->oscilloscopeView->updateView(); } @@ -133,16 +133,16 @@ void ProbePositioner::slotProbeDataUnregistered( int id ) } -void ProbePositioner::resizeEvent( QResizeEvent *e ) +void ProbePositioner::resizeEvent( TQResizeEvent *e ) { delete m_pixmap; - m_pixmap = new QPixmap( e->size() ); - QWidget::resizeEvent(e); + m_pixmap = new TQPixmap( e->size() ); + TQWidget::resizeEvent(e); forceRepaint(); } -void ProbePositioner::mousePressEvent( QMouseEvent * e ) +void ProbePositioner::mousePressEvent( TQMouseEvent * e ) { p_draggedProbe = probeAtPosition(e->pos()); if (p_draggedProbe) @@ -152,7 +152,7 @@ void ProbePositioner::mousePressEvent( QMouseEvent * e ) } -void ProbePositioner::mouseReleaseEvent( QMouseEvent * e ) +void ProbePositioner::mouseReleaseEvent( TQMouseEvent * e ) { if (p_draggedProbe) e->accept(); @@ -161,7 +161,7 @@ void ProbePositioner::mouseReleaseEvent( QMouseEvent * e ) } -void ProbePositioner::mouseMoveEvent( QMouseEvent * e ) +void ProbePositioner::mouseMoveEvent( TQMouseEvent * e ) { if (!p_draggedProbe) { @@ -175,13 +175,13 @@ void ProbePositioner::mouseMoveEvent( QMouseEvent * e ) } -void ProbePositioner::paintEvent( QPaintEvent *e ) +void ProbePositioner::paintEvent( TQPaintEvent *e ) { - QRect r = e->rect(); + TQRect r = e->rect(); if (b_needRedraw) { - QPainter p; + TQPainter p; m_pixmap->fill( paletteBackgroundColor() ); p.begin(m_pixmap); p.setClipRegion(e->region()); @@ -193,10 +193,10 @@ void ProbePositioner::paintEvent( QPaintEvent *e ) p.setBrush( probeData->color() ); int currentPos = probePosition(probeData); - QPointArray pa(3); - pa[0] = QPoint( 0, int(currentPos-(probeArrowHeight/2)) ); - pa[1] = QPoint( int(probeArrowWidth), currentPos ); - pa[2] = QPoint( 0, int(currentPos+(probeArrowHeight/2)) ); + TQPointArray pa(3); + pa[0] = TQPoint( 0, int(currentPos-(probeArrowHeight/2)) ); + pa[1] = TQPoint( int(probeArrowWidth), currentPos ); + pa[2] = TQPoint( 0, int(currentPos+(probeArrowHeight/2)) ); p.drawPolygon(pa); } |