diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kivio/kiviopart/kivio_canvas.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kivio/kiviopart/kivio_canvas.cpp')
-rw-r--r-- | kivio/kiviopart/kivio_canvas.cpp | 200 |
1 files changed, 100 insertions, 100 deletions
diff --git a/kivio/kiviopart/kivio_canvas.cpp b/kivio/kiviopart/kivio_canvas.cpp index 162f076f..0b78a70c 100644 --- a/kivio/kiviopart/kivio_canvas.cpp +++ b/kivio/kiviopart/kivio_canvas.cpp @@ -47,16 +47,16 @@ #include <assert.h> #include <stdio.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qscrollbar.h> -#include <qtimer.h> -#include <qsize.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqscrollbar.h> +#include <tqtimer.h> +#include <tqsize.h> using namespace Kivio; -KivioCanvas::KivioCanvas( QWidget *par, KivioView* view, KivioDoc* doc, QScrollBar* vs, QScrollBar* hs) -: QWidget(par, "KivioCanvas", WResizeNoErase | WRepaintNoErase), +KivioCanvas::KivioCanvas( TQWidget *par, KivioView* view, KivioDoc* doc, TQScrollBar* vs, TQScrollBar* hs) +: TQWidget(par, "KivioCanvas", WResizeNoErase | WRepaintNoErase), m_pView(view), m_pDoc(doc), m_pVertScrollBar(vs), @@ -66,7 +66,7 @@ KivioCanvas::KivioCanvas( QWidget *par, KivioView* view, KivioDoc* doc, QScrollB setBackgroundMode(NoBackground); setAcceptDrops(true); setMouseTracking(true); - setFocusPolicy(StrongFocus); + setFocusPolicy(TQ_StrongFocus); setFocus(); m_showConnectorTargets = false; @@ -79,8 +79,8 @@ KivioCanvas::KivioCanvas( QWidget *par, KivioView* view, KivioDoc* doc, QScrollB m_pVertScrollBar->setPageStep(10); m_pHorzScrollBar->setPageStep(10); - connect(m_pVertScrollBar, SIGNAL(valueChanged(int)), SLOT(scrollV(int))); - connect( m_pHorzScrollBar, SIGNAL(valueChanged(int)), SLOT(scrollH(int))); + connect(m_pVertScrollBar, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollV(int))); + connect( m_pHorzScrollBar, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(scrollH(int))); m_iXOffset = 0; m_iYOffset = 0; @@ -93,14 +93,14 @@ KivioCanvas::KivioCanvas( QWidget *par, KivioView* view, KivioDoc* doc, QScrollB m_pasteMoving = false; - m_buffer = new QPixmap(); + m_buffer = new TQPixmap(); m_pDragStencil = 0L; unclippedSpawnerPainter = 0L; unclippedPainter = 0L; - m_borderTimer = new QTimer(this); - connect(m_borderTimer,SIGNAL(timeout()),SLOT(borderTimerTimeout())); + m_borderTimer = new TQTimer(this); + connect(m_borderTimer,TQT_SIGNAL(timeout()),TQT_SLOT(borderTimerTimeout())); } KivioCanvas::~KivioCanvas() @@ -110,7 +110,7 @@ KivioCanvas::~KivioCanvas() delete unclippedPainter; } -KivioPage* KivioCanvas::findPage( const QString& _name ) +KivioPage* KivioCanvas::findPage( const TQString& _name ) { return m_pDoc->map()->findPage( _name ); } @@ -169,7 +169,7 @@ void KivioCanvas::scrollDy( int dy ) m_pVertScrollBar->setValue(value); } -void KivioCanvas::resizeEvent( QResizeEvent* ) +void KivioCanvas::resizeEvent( TQResizeEvent* ) { m_buffer->resize(size()); updateScrollBars(); @@ -177,7 +177,7 @@ void KivioCanvas::resizeEvent( QResizeEvent* ) emit visibleAreaChanged(); } -void KivioCanvas::wheelEvent( QWheelEvent* ev ) +void KivioCanvas::wheelEvent( TQWheelEvent* ev ) { ev->accept(); @@ -207,7 +207,7 @@ void KivioCanvas::setUpdatesEnabled( bool isUpdate ) { static int i = 0; - QWidget::setUpdatesEnabled(isUpdate); + TQWidget::setUpdatesEnabled(isUpdate); if (isUpdate) { --i; if (i == 0) { @@ -224,18 +224,18 @@ void KivioCanvas::setUpdatesEnabled( bool isUpdate ) } } -void KivioCanvas::zoomIn(const QPoint &p) +void KivioCanvas::zoomIn(const TQPoint &p) { setUpdatesEnabled(false); KoPoint p0 = mapFromScreen(p); m_pView->viewZoom(m_pView->zoomHandler()->zoom() + 25); - QPoint p1 = mapToScreen(p0); + TQPoint p1 = mapToScreen(p0); scrollDx(-p1.x()+p.x()); scrollDy(-p1.y()+p.y()); setUpdatesEnabled(true); } -void KivioCanvas::zoomOut(const QPoint &p) +void KivioCanvas::zoomOut(const TQPoint &p) { setUpdatesEnabled(false); KoPoint p0 = mapFromScreen(p); @@ -243,29 +243,29 @@ void KivioCanvas::zoomOut(const QPoint &p) if(newZoom > 0) { m_pView->viewZoom(newZoom); - QPoint p1 = mapToScreen(p0); + TQPoint p1 = mapToScreen(p0); scrollDx(-p1.x()+p.x()); scrollDy(-p1.y()+p.y()); } setUpdatesEnabled(true); } -void KivioCanvas::paintEvent( QPaintEvent* ev ) +void KivioCanvas::paintEvent( TQPaintEvent* ev ) { if ( m_pDoc->isLoading() || !activePage() ) return; KivioPage* page = activePage(); - QPainter painter; + TQPainter painter; painter.begin(m_buffer); KoPageLayout pl = page->paperLayout(); int pw = m_pView->zoomHandler()->zoomItX(pl.ptWidth); int ph = m_pView->zoomHandler()->zoomItY(pl.ptHeight); - QRect fillRect(0, 0, pw, ph); - QRect paintRect = ev->rect(); - QRegion grayRegion(paintRect); + TQRect fillRect(0, 0, pw, ph); + TQRect paintRect = ev->rect(); + TQRegion grayRegion(paintRect); grayRegion.translate(m_iXOffset - m_pageOffsetX, m_iYOffset - m_pageOffsetY); grayRegion -= fillRect; grayRegion.translate(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY); @@ -273,9 +273,9 @@ void KivioCanvas::paintEvent( QPaintEvent* ev ) // This code comes from KPresenter's kprcanvas.cpp // Copyright (C) 1998, 1999 Reginald Stadlbauer <[email protected]> painter.save(); - painter.setClipRegion(grayRegion, QPainter::CoordPainter); - painter.setPen(Qt::NoPen); - painter.fillRect(grayRegion.boundingRect(), KApplication::palette().active().brush(QColorGroup::Mid)); + painter.setClipRegion(grayRegion, TQPainter::CoordPainter); + painter.setPen(TQt::NoPen); + painter.fillRect(grayRegion.boundingRect(), KApplication::tqpalette().active().brush(TQColorGroup::Mid)); painter.restore(); // end of copy... @@ -286,14 +286,14 @@ void KivioCanvas::paintEvent( QPaintEvent* ev ) if(m_pDoc->grid().isShow) { KoPoint topLeft(0, 0); KoPoint bottomRight(pl.ptWidth, pl.ptHeight); - QPoint zoomedTL = m_pView->zoomHandler()->zoomPoint(topLeft); - QPoint zoomedBR = m_pView->zoomHandler()->zoomPoint(bottomRight); + TQPoint zoomedTL = m_pView->zoomHandler()->zoomPoint(topLeft); + TQPoint zoomedBR = m_pView->zoomHandler()->zoomPoint(bottomRight); KoSize freq = m_pDoc->grid().freq; painter.setPen(m_pDoc->grid().color); - double x = qRound(topLeft.x() / freq.width()) * freq.width(); + double x = tqRound(topLeft.x() / freq.width()) * freq.width(); int zoomed = 0; while(x <= bottomRight.x()) { @@ -302,7 +302,7 @@ void KivioCanvas::paintEvent( QPaintEvent* ev ) x += freq.width(); } - double y = qRound(topLeft.y() / freq.height()) * freq.height(); + double y = tqRound(topLeft.y() / freq.height()) * freq.height(); while(y <= bottomRight.y()) { zoomed = m_pView->zoomHandler()->zoomItY(y); @@ -318,7 +318,7 @@ void KivioCanvas::paintEvent( QPaintEvent* ev ) int mb = m_pView->zoomHandler()->zoomItY(pl.ptBottom); painter.save(); - painter.setPen(QPen("#C7C7C7",1,SolidLine)); + painter.setPen(TQPen("#C7C7C7",1,SolidLine)); painter.drawRect(ml,mt,pw-ml-mr,ph-mt-mb); painter.restore(); } @@ -331,9 +331,9 @@ void KivioCanvas::paintEvent( QPaintEvent* ev ) // Draw content KivioScreenPainter kpainter; - kpainter.start(m_buffer); + kpainter.start(TQT_TQPAINTDEVICE(m_buffer)); kpainter.translateBy(-m_iXOffset + m_pageOffsetX, -m_iYOffset + m_pageOffsetY); - m_pDoc->paintContent(kpainter, paintRect, false, page, QPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true); + m_pDoc->paintContent(kpainter, paintRect, false, page, TQPoint(0, 0), m_pView->zoomHandler(), showConnectorTargets(), true); kpainter.stop(); if(m_pView->isShowGuides()) { @@ -356,8 +356,8 @@ void KivioCanvas::updateScrollBars() int pw = m_pView->zoomHandler()->zoomItX(pl.ptWidth); int ph = m_pView->zoomHandler()->zoomItY(pl.ptHeight); - m_pScrollX = QMAX(pw - width(), 0); - m_pScrollY = QMAX(ph - height(), 0); + m_pScrollX = TQMAX(pw - width(), 0); + m_pScrollY = TQMAX(ph - height(), 0); m_pHorzScrollBar->setRange(0, m_pScrollX); if ( m_pHorzScrollBar->value() > m_pHorzScrollBar->maxValue() || @@ -389,14 +389,14 @@ void KivioCanvas::updateScrollBars() } } -QSize KivioCanvas::actualSize() const +TQSize KivioCanvas::actualSize() const { - return QSize(m_pScrollX, m_pScrollY); + return TQSize(m_pScrollX, m_pScrollY); } -bool KivioCanvas::event( QEvent* e ) +bool KivioCanvas::event( TQEvent* e ) { - bool f = QWidget::event(e); + bool f = TQWidget::event(e); if (m_pView->pluginManager() && delegateThisEvent) { f = m_pView->pluginManager()->delegateEvent(e); @@ -406,16 +406,16 @@ bool KivioCanvas::event( QEvent* e ) return f; } -void KivioCanvas::enterEvent( QEvent* ) +void KivioCanvas::enterEvent( TQEvent* ) { } -void KivioCanvas::leaveEvent( QEvent* ) +void KivioCanvas::leaveEvent( TQEvent* ) { m_pView->setMousePos(-1, -1); } -void KivioCanvas::mousePressEvent(QMouseEvent* e) +void KivioCanvas::mousePressEvent(TQMouseEvent* e) { if(!m_pDoc->isReadWrite()) return; @@ -435,7 +435,7 @@ void KivioCanvas::mousePressEvent(QMouseEvent* e) } } -void KivioCanvas::mouseReleaseEvent(QMouseEvent* e) +void KivioCanvas::mouseReleaseEvent(TQMouseEvent* e) { if(!m_pDoc->isReadWrite()) return; @@ -450,7 +450,7 @@ void KivioCanvas::mouseReleaseEvent(QMouseEvent* e) } } -void KivioCanvas::mouseMoveEvent(QMouseEvent* e) +void KivioCanvas::mouseMoveEvent(TQMouseEvent* e) { if(!m_pDoc->isReadWrite()) return; @@ -469,9 +469,9 @@ void KivioCanvas::mouseMoveEvent(QMouseEvent* e) view()->setMousePos(lastPoint.x(), lastPoint.y()); } -QPoint KivioCanvas::mapToScreen(const KoPoint& pos) +TQPoint KivioCanvas::mapToScreen(const KoPoint& pos) { - QPoint p; + TQPoint p; int x = m_pView->zoomHandler()->zoomItX(pos.x()); int y = m_pView->zoomHandler()->zoomItY(pos.y()); @@ -481,7 +481,7 @@ QPoint KivioCanvas::mapToScreen(const KoPoint& pos) return p; } -KoPoint KivioCanvas::mapFromScreen( const QPoint & pos ) +KoPoint KivioCanvas::mapFromScreen( const TQPoint & pos ) { int x = pos.x() + m_iXOffset - m_pageOffsetX; int y = pos.y() + m_iYOffset - m_pageOffsetY; @@ -492,24 +492,24 @@ KoPoint KivioCanvas::mapFromScreen( const QPoint & pos ) return p; } -void KivioCanvas::startRectDraw( const QPoint &p, RectType ) +void KivioCanvas::startRectDraw( const TQPoint &p, RectType ) { - currRect = QRect( 0, 0, -1, -1 ); + currRect = TQRect( 0, 0, -1, -1 ); - QPoint pos( p ); + TQPoint pos( p ); oldRectValid = false; beginUnclippedPainter(); rectAnchor = pos; - currRect = QRect( rectAnchor, QPoint(0,0) ); + currRect = TQRect( rectAnchor, TQPoint(0,0) ); m_borderTimer->start(100); } -void KivioCanvas::continueRectDraw( const QPoint &p, RectType ) +void KivioCanvas::continueRectDraw( const TQPoint &p, RectType ) { - QPoint pos = p; - QPoint p2 = pos; - QRect r( rectAnchor, p2 ); + TQPoint pos = p; + TQPoint p2 = pos; + TQRect r( rectAnchor, p2 ); r = r.normalize(); if ( oldRectValid ) @@ -544,9 +544,9 @@ void KivioCanvas::endRectDraw() * This will allocate a new KivioStencil for drawing with and * set some class variables used during redraws. */ -void KivioCanvas::startSpawnerDragDraw( const QPoint &p ) +void KivioCanvas::startSpawnerDragDraw( const TQPoint &p ) { - currRect = QRect( 0, 0, -1, -1 ); + currRect = TQRect( 0, 0, -1, -1 ); KivioStencilSpawner *pSpawner = KivioIconView::curDragSpawner(); if( !pSpawner ) @@ -593,7 +593,7 @@ void KivioCanvas::startSpawnerDragDraw( const QPoint &p ) /** * Undraws the old stencil outline, draws the new one */ -void KivioCanvas::continueSpawnerDragDraw( const QPoint &p ) +void KivioCanvas::continueSpawnerDragDraw( const TQPoint &p ) { bool snappedX, snappedY; @@ -706,7 +706,7 @@ void KivioCanvas::beginUnclippedSpawnerPainter() unclippedSpawnerPainter = new KivioScreenPainter(); // Tell it to start (allocates a Qpainter object) - unclippedSpawnerPainter->start(this); + unclippedSpawnerPainter->start(TQT_TQPAINTDEVICE(this)); // Uhhhhh?? if( !unclipped ) @@ -715,7 +715,7 @@ void KivioCanvas::beginUnclippedSpawnerPainter() // Make sure it's doing NOT drawing. unclippedSpawnerPainter->painter()->setRasterOp( NotROP ); - unclippedSpawnerPainter->painter()->setPen( QColor(0,0,250) ); + unclippedSpawnerPainter->painter()->setPen( TQColor(0,0,250) ); } @@ -739,14 +739,14 @@ void KivioCanvas::beginUnclippedPainter() bool unclipped = testWFlags( WPaintUnclipped ); setWFlags( WPaintUnclipped ); - unclippedPainter = new QPainter; + unclippedPainter = new TQPainter; unclippedPainter->begin( this ); if ( !unclipped ) clearWFlags( WPaintUnclipped ); unclippedPainter->setRasterOp( NotROP ); - unclippedPainter->setPen( QPen(blue,1,DotLine) ); + unclippedPainter->setPen( TQPen(blue,1,DotLine) ); } void KivioCanvas::endUnclippedPainter() @@ -761,12 +761,12 @@ void KivioCanvas::endUnclippedPainter() void KivioCanvas::borderTimerTimeout() { - QPoint p = mapFromGlobal(QCursor::pos()); + TQPoint p = mapFromGlobal(TQCursor::pos()); int dx = 0; int dy = 0; int d = 10; - QRect r(currRect); + TQRect r(currRect); int vpos = m_pVertScrollBar->value(); int vmax = m_pVertScrollBar->maxValue(); int vmin = m_pVertScrollBar->minValue(); @@ -776,25 +776,25 @@ void KivioCanvas::borderTimerTimeout() int hmin = m_pHorzScrollBar->minValue(); if ( p.x() < 0 && hpos > hmin ) { - dx = QMIN(d,hpos-hmin); + dx = TQMIN(d,hpos-hmin); r.setRight(r.right()+dx); rectAnchor.setX(rectAnchor.x()+dx); } if ( p.y() < 0 && vpos > vmin ) { - dy = QMIN(d,vpos-vmin); + dy = TQMIN(d,vpos-vmin); r.setBottom(r.bottom()+dy); rectAnchor.setY(rectAnchor.y()+dy); } if ( p.x() > width() && hpos < hmax ) { - dx = -QMIN(d,hmax-hpos); + dx = -TQMIN(d,hmax-hpos); r.setLeft(r.left()+dx); rectAnchor.setX(rectAnchor.x()+dx); } if ( p.y() > height() && vpos < vmax ) { - dy = -QMIN(d,vmax-vpos); + dy = -TQMIN(d,vmax-vpos); r.setTop(r.top()+dy); rectAnchor.setY(rectAnchor.y()+dy); } @@ -819,7 +819,7 @@ void KivioCanvas::borderTimerTimeout() * allocate a new drawing object and set some class variables for future * drawing. */ -void KivioCanvas::dragEnterEvent( QDragEnterEvent *e ) +void KivioCanvas::dragEnterEvent( TQDragEnterEvent *e ) { if( e->provides("kivio/stencilSpawner") ) { @@ -841,7 +841,7 @@ void KivioCanvas::dragEnterEvent( QDragEnterEvent *e ) * are currently the only type of mime-types accepted. If so, it accepts the * event, and then tells the drawing object to update itself with a new position. */ -void KivioCanvas::dragMoveEvent( QDragMoveEvent *e ) +void KivioCanvas::dragMoveEvent( TQDragMoveEvent *e ) { // Does it speak our language? if( e->provides("kivio/stencilSpawner") ) @@ -862,7 +862,7 @@ void KivioCanvas::dragMoveEvent( QDragMoveEvent *e ) * to the active page of the document (which actually adds it to the active layer * of the active page). */ -void KivioCanvas::dropEvent( QDropEvent *e ) +void KivioCanvas::dropEvent( TQDropEvent *e ) { // Terminate the drawing object endSpawnerDragDraw(); @@ -873,7 +873,7 @@ void KivioCanvas::dropEvent( QDropEvent *e ) if( !pSpawner ) return; - QPoint pos = e->pos(); + TQPoint pos = e->pos(); KoPoint pagePoint = snapToGrid(mapFromScreen( pos )); view()->addStencilFromSpawner(pSpawner, pagePoint.x(), pagePoint.y()); @@ -889,7 +889,7 @@ void KivioCanvas::dropEvent( QDropEvent *e ) * This will call endSpawnerDragDraw() which terminates the drawing * object and ends interaction with the drag. */ -void KivioCanvas::dragLeaveEvent( QDragLeaveEvent * ) +void KivioCanvas::dragLeaveEvent( TQDragLeaveEvent * ) { endSpawnerDragDraw(); } @@ -944,7 +944,7 @@ void KivioCanvas::drawStencilXOR( KivioStencil *pStencil ) unclippedSpawnerPainter->painter()->restore(); } -void KivioCanvas::keyPressEvent( QKeyEvent *e ) +void KivioCanvas::keyPressEvent( TQKeyEvent *e ) { if(view()->isShowGuides() && m_guides.keyPressEvent(e)) { return; @@ -981,11 +981,11 @@ KoPoint KivioCanvas::snapToGrid(const KoPoint& point) KoSize dist = m_pDoc->grid().snap; KoSize freq = m_pDoc->grid().freq; - double dx = qRound(p.x() / freq.width()); - double dy = qRound(p.y() / freq.height()); + double dx = tqRound(p.x() / freq.width()); + double dy = tqRound(p.y() / freq.height()); - double distx = QABS(p.x() - (freq.width() * dx)); - double disty = QABS(p.y() - (freq.height() * dy)); + double distx = TQABS(p.x() - (freq.width() * dx)); + double disty = TQABS(p.y() - (freq.height() * dy)); if(distx < dist.width()) { p.setX(freq.width() * dx); @@ -1006,7 +1006,7 @@ KoPoint KivioCanvas::snapToGuides(const KoPoint& point, bool &snappedX, bool &sn if (m_pView->isSnapGuides()) { - KoGuides::SnapStatus status = KoGuides::SNAP_NONE; + KoGuides::SnaptqStatus status = KoGuides::SNAP_NONE; KoPoint diff; m_guides.snapToGuideLines(p, 4, status, diff); p += diff; @@ -1018,7 +1018,7 @@ KoPoint KivioCanvas::snapToGuides(const KoPoint& point, bool &snappedX, bool &sn snappedX = true; } - m_guides.repaintSnapping(p, status); + m_guides.tqrepaintSnapping(p, status); } return p; @@ -1030,8 +1030,8 @@ void KivioCanvas::setViewCenterPoint(const KoPoint &p) KoRect va = visibleArea(); - double x = QMAX(0.0, p.x() - (va.width() / 2.0)); - double y = QMAX(0.0, p.y() - (va.height() / 2.0)); + double x = TQMAX(0.0, p.x() - (va.width() / 2.0)); + double y = TQMAX(0.0, p.y() - (va.height() / 2.0)); m_pVertScrollBar->setValue(m_pView->zoomHandler()->zoomItY(y)); m_pHorzScrollBar->setValue(m_pView->zoomHandler()->zoomItX(x)); @@ -1041,8 +1041,8 @@ void KivioCanvas::setViewCenterPoint(const KoPoint &p) KoRect KivioCanvas::visibleArea() { - KoPoint p0 = mapFromScreen(QPoint(0,0)); - KoPoint p1 = mapFromScreen(QPoint(width()-1,height()-1)); + KoPoint p0 = mapFromScreen(TQPoint(0,0)); + KoPoint p1 = mapFromScreen(TQPoint(width()-1,height()-1)); return KoRect(p0.x(), p0.y(), p1.x() - p0.x(), p1.y() - p0.y()); } @@ -1059,9 +1059,9 @@ void KivioCanvas::setVisibleArea(KoRect r, int margin) float zw = cw / (float)zoom.zoomItX(r.width()); float zh = ch / (float)zoom.zoomItY(r.height()); - float z = QMIN(zw, zh); + float z = TQMIN(zw, zh); - m_pView->viewZoom(qRound(z * 100)); + m_pView->viewZoom(tqRound(z * 100)); KoPoint c = r.center(); @@ -1079,7 +1079,7 @@ void KivioCanvas::setVisibleAreaByWidth(KoRect r, int margin) float cw = width() - 2*margin; float z = cw / (float)zoom.zoomItX(r.width()); - m_pView->viewZoom(qRound(z * 100)); + m_pView->viewZoom(tqRound(z * 100)); KoPoint c = r.center(); @@ -1097,7 +1097,7 @@ void KivioCanvas::setVisibleAreaByHeight(KoRect r, int margin) float ch = height() - 2*margin; float z = ch / (float)zoom.zoomItY(r.height()); - m_pView->viewZoom(qRound(z * 100)); + m_pView->viewZoom(tqRound(z * 100)); KoPoint c = r.center(); @@ -1115,7 +1115,7 @@ void KivioCanvas::startPasteMoving() beginUnclippedSpawnerPainter(); drawSelectedStencilsXOR(); - // Build the list of old geometry + // Build the list of old tqgeometry KoRect *pData; m_lstOldGeometry.clear(); KivioStencil* pStencil = activePage()->selectedStencils()->first(); @@ -1134,7 +1134,7 @@ void KivioCanvas::startPasteMoving() setEnabled(true); } -void KivioCanvas::continuePasteMoving(const QPoint &pos) +void KivioCanvas::continuePasteMoving(const TQPoint &pos) { KoPoint pagePoint = mapFromScreen( pos ); @@ -1245,20 +1245,20 @@ void KivioCanvas::endPasteMoving() endUnclippedSpawnerPainter(); - // Clear the list of old geometry + // Clear the list of old tqgeometry m_lstOldGeometry.clear(); m_pasteMoving = false; } void KivioCanvas::updateAutoGuideLines() { - QValueList<double> hGuideLines; - QValueList<double> vGuideLines; - QPtrList<KivioLayer> layerList = *(activePage()->layers()); - QPtrListIterator<KivioLayer> layerIt(layerList); + TQValueList<double> hGuideLines; + TQValueList<double> vGuideLines; + TQPtrList<KivioLayer> layerList = *(activePage()->layers()); + TQPtrListIterator<KivioLayer> layerIt(layerList); KivioLayer* layer = 0; - QPtrList<KivioStencil> stencilList; - QPtrListIterator<KivioStencil> stencilIt(stencilList); + TQPtrList<KivioStencil> stencilList; + TQPtrListIterator<KivioStencil> stencilIt(stencilList); KivioStencil* stencil = 0; while((layer = layerIt.current()) != 0) { |