diff options
Diffstat (limited to 'kivio/plugins/kivioconnectortool/tool_connector.cpp')
-rw-r--r-- | kivio/plugins/kivioconnectortool/tool_connector.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/kivio/plugins/kivioconnectortool/tool_connector.cpp b/kivio/plugins/kivioconnectortool/tool_connector.cpp index 87ec4729e..435962401 100644 --- a/kivio/plugins/kivioconnectortool/tool_connector.cpp +++ b/kivio/plugins/kivioconnectortool/tool_connector.cpp @@ -19,7 +19,7 @@ */ #include "tool_connector.h" -#include <qcursor.h> +#include <tqcursor.h> #include <kdebug.h> #include <kiconloader.h> #include <kstandarddirs.h> @@ -47,20 +47,20 @@ #include "polylineconnectorspawner.h" #include "mousetoolaction.h" -ConnectorTool::ConnectorTool( KivioView* parent ) : Kivio::MouseTool(parent, "Connector Mouse Tool") +ConnectorTool::ConnectorTool( KivioView* tqparent ) : Kivio::MouseTool(tqparent, "Connector Mouse Tool") { m_connectorAction = new Kivio::MouseToolAction(i18n("Straight Connector"), "kivio_connector", 0, actionCollection(), "connector"); - connect(m_connectorAction, SIGNAL(toggled(bool)), this, SLOT(setActivated(bool))); - connect(m_connectorAction, SIGNAL(activated()), this, SLOT(activateStraight())); - connect(m_connectorAction, SIGNAL(doubleClicked()), this, SLOT(makePermanent())); + connect(m_connectorAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setActivated(bool))); + connect(m_connectorAction, TQT_SIGNAL(activated()), this, TQT_SLOT(activateStraight())); + connect(m_connectorAction, TQT_SIGNAL(doubleClicked()), this, TQT_SLOT(makePermanent())); m_connectorAction->setExclusiveGroup("ConnectorTool"); m_polyLineAction = new Kivio::MouseToolAction(i18n("Polyline Connector"), "kivio_connector", 0, actionCollection(), "polyLineConnector"); - connect(m_polyLineAction, SIGNAL(toggled(bool)), this, SLOT(setActivated(bool))); - connect(m_polyLineAction, SIGNAL(activated()), this, SLOT(activatePolyline())); - connect(m_connectorAction, SIGNAL(doubleClicked()), this, SLOT(makePermanent())); + connect(m_polyLineAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setActivated(bool))); + connect(m_polyLineAction, TQT_SIGNAL(activated()), this, TQT_SLOT(activatePolyline())); + connect(m_connectorAction, TQT_SIGNAL(doubleClicked()), this, TQT_SLOT(makePermanent())); m_polyLineAction->setExclusiveGroup("ConnectorTool"); m_permanent = false; @@ -69,8 +69,8 @@ ConnectorTool::ConnectorTool( KivioView* parent ) : Kivio::MouseTool(parent, "Co m_mode = stmNone; m_pDragData = 0; - m_pConnectorCursor1 = new QCursor(BarIcon("kivio_connector_cursor1",KivioFactory::global()),2,2); - m_pConnectorCursor2 = new QCursor(BarIcon("kivio_connector_cursor2",KivioFactory::global()),2,2); + m_pConnectorCursor1 = new TQCursor(BarIcon("kivio_connector_cursor1",KivioFactory::global()),2,2); + m_pConnectorCursor2 = new TQCursor(BarIcon("kivio_connector_cursor2",KivioFactory::global()),2,2); } ConnectorTool::~ConnectorTool() @@ -88,22 +88,22 @@ ConnectorTool::~ConnectorTool() * @param e The event to be identified and processed * */ -bool ConnectorTool::processEvent(QEvent* e) +bool ConnectorTool::processEvent(TQEvent* e) { switch (e->type()) { - case QEvent::MouseButtonPress: - mousePress( static_cast<QMouseEvent*>(e) ); + case TQEvent::MouseButtonPress: + mousePress( TQT_TQMOUSEEVENT(e) ); return true; break; - case QEvent::MouseButtonRelease: - mouseRelease( static_cast<QMouseEvent*>(e) ); + case TQEvent::MouseButtonRelease: + mouseRelease( TQT_TQMOUSEEVENT(e) ); return true; break; - case QEvent::MouseMove: - mouseMove( static_cast<QMouseEvent*>(e) ); + case TQEvent::MouseMove: + mouseMove( TQT_TQMOUSEEVENT(e) ); return true; break; @@ -122,7 +122,7 @@ void ConnectorTool::setActivated(bool a) m_pStencil = 0; m_pDragData = 0; view()->canvasWidget()->setShowConnectorTargets(true); - view()->canvasWidget()->repaint(); + view()->canvasWidget()->tqrepaint(); emit activated(this); } else { if(m_pStencil && (m_mode == stmDrawRubber) && (m_type == PolyLineConnector)) { @@ -138,7 +138,7 @@ void ConnectorTool::setActivated(bool a) polyconnector = 0; } - view()->canvasWidget()->guideLines().repaintAfterSnapping(); + view()->canvasWidget()->guideLines().tqrepaintAfterSnapping(); } m_pStencil = 0; @@ -150,11 +150,11 @@ void ConnectorTool::setActivated(bool a) m_permanent = false; view()->setStatusBarInfo(""); view()->canvasWidget()->setShowConnectorTargets(false); - view()->canvasWidget()->repaint(); + view()->canvasWidget()->tqrepaint(); } } -void ConnectorTool::connector(QRect) +void ConnectorTool::connector(TQRect) { if (!m_pStencil) return; @@ -169,9 +169,9 @@ void ConnectorTool::connector(QRect) doc->updateView(page); } -void ConnectorTool::mousePress( QMouseEvent *e ) +void ConnectorTool::mousePress( TQMouseEvent *e ) { - if(e->button() == LeftButton) { + if(e->button() == Qt::LeftButton) { bool ok = true; if(!m_pStencil || (m_type == StraightConnector)) { ok = startRubberBanding(e); @@ -200,7 +200,7 @@ void ConnectorTool::mousePress( QMouseEvent *e ) } else { m_mode = stmNone; } - } else if(e->button() == RightButton) { + } else if(e->button() == Qt::RightButton) { if(m_type == PolyLineConnector) { if(m_mode == stmDrawRubber) { endRubberBanding(e); @@ -216,12 +216,12 @@ void ConnectorTool::mousePress( QMouseEvent *e ) /** * Tests if we should start rubber banding (always returns true). */ -bool ConnectorTool::startRubberBanding( QMouseEvent *e ) +bool ConnectorTool::startRubberBanding( TQMouseEvent *e ) { KivioCanvas* canvas = view()->canvasWidget(); KivioDoc* doc = view()->doc(); KivioPage* pPage = canvas->activePage(); - QString spawnerId; + TQString spawnerId; if(m_type == StraightConnector) { spawnerId = "Dave Marotti - Straight Connector"; @@ -278,12 +278,12 @@ bool ConnectorTool::startRubberBanding( QMouseEvent *e ) m_pStencil->customDrag(m_pDragData); - canvas->repaint(); + canvas->tqrepaint(); canvas->setCursor(*m_pConnectorCursor2); return true; } -void ConnectorTool::mouseMove( QMouseEvent * e ) +void ConnectorTool::mouseMove( TQMouseEvent * e ) { switch( m_mode ) { @@ -296,7 +296,7 @@ void ConnectorTool::mouseMove( QMouseEvent * e ) } } -void ConnectorTool::continueRubberBanding( QMouseEvent *e ) +void ConnectorTool::continueRubberBanding( TQMouseEvent *e ) { KivioCanvas* canvas = view()->canvasWidget(); KivioPage* pPage = view()->activePage(); @@ -322,10 +322,10 @@ void ConnectorTool::continueRubberBanding( QMouseEvent *e ) m_pStencil->customDrag(m_pDragData); m_pStencil->updateGeometry(); - canvas->repaint(); + canvas->tqrepaint(); } -void ConnectorTool::mouseRelease( QMouseEvent *e ) +void ConnectorTool::mouseRelease( TQMouseEvent *e ) { if(m_type == StraightConnector) { switch( m_mode ) @@ -340,12 +340,12 @@ void ConnectorTool::mouseRelease( QMouseEvent *e ) } } -void ConnectorTool::endRubberBanding(QMouseEvent *) +void ConnectorTool::endRubberBanding(TQMouseEvent *) { connector(view()->canvasWidget()->rect()); m_pStencil = 0; m_mode = stmNone; - view()->canvasWidget()->guideLines().repaintAfterSnapping(); + view()->canvasWidget()->guideLines().tqrepaintAfterSnapping(); if(!m_permanent) { view()->pluginManager()->activateDefaultTool(); |