summaryrefslogtreecommitdiffstats
path: root/kivio/plugins/kiviotargettool
diff options
context:
space:
mode:
Diffstat (limited to 'kivio/plugins/kiviotargettool')
-rw-r--r--kivio/plugins/kiviotargettool/kiviotargettool.cpp26
-rw-r--r--kivio/plugins/kiviotargettool/kiviotargettool.h11
-rw-r--r--kivio/plugins/kiviotargettool/kiviotargettoolfactory.cpp10
-rw-r--r--kivio/plugins/kiviotargettool/kiviotargettoolfactory.h11
4 files changed, 30 insertions, 28 deletions
diff --git a/kivio/plugins/kiviotargettool/kiviotargettool.cpp b/kivio/plugins/kiviotargettool/kiviotargettool.cpp
index 95958d2a..672c0a43 100644
--- a/kivio/plugins/kiviotargettool/kiviotargettool.cpp
+++ b/kivio/plugins/kiviotargettool/kiviotargettool.cpp
@@ -18,7 +18,7 @@
*/
#include "kiviotargettool.h"
-#include <qcursor.h>
+#include <tqcursor.h>
#include <klocale.h>
@@ -32,12 +32,12 @@
#include "kivio_command.h"
namespace Kivio {
- TargetTool::TargetTool(KivioView* parent) : MouseTool(parent, "Add Target Mouse Tool")
+ TargetTool::TargetTool(KivioView* tqparent) : MouseTool(tqparent, "Add Target Mouse Tool")
{
m_targetAction = new Kivio::MouseToolAction(i18n("Add Connector Target"),
"add_target", 0, actionCollection(), "addTargetTool");
- connect(m_targetAction, SIGNAL(toggled(bool)), this, SLOT(setActivated(bool)));
- connect(m_targetAction, SIGNAL(doubleClicked()), this, SLOT(makePermanent()));
+ connect(m_targetAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setActivated(bool)));
+ connect(m_targetAction, TQT_SIGNAL(doubleClicked()), this, TQT_SLOT(makePermanent()));
m_permanent = false;
}
@@ -46,13 +46,13 @@ namespace Kivio {
{
}
- bool TargetTool::processEvent(QEvent* e)
+ bool TargetTool::processEvent(TQEvent* e)
{
- if(e->type() == QEvent::MouseButtonPress) {
- mousePress(static_cast<QMouseEvent*>(e));
+ if(e->type() == TQEvent::MouseButtonPress) {
+ mousePress(TQT_TQMOUSEEVENT(e));
return true;
- } else if(e->type() == QEvent::MouseMove) {
- mouseMove(static_cast<QMouseEvent*>(e));
+ } else if(e->type() == TQEvent::MouseMove) {
+ mouseMove(TQT_TQMOUSEEVENT(e));
return true;
}
@@ -77,7 +77,7 @@ namespace Kivio {
view()->doc()->addCommand(command);
}
- void TargetTool::mousePress(QMouseEvent* e)
+ void TargetTool::mousePress(TQMouseEvent* e)
{
KoPoint p = view()->canvasWidget()->mapFromScreen(e->pos());
int colType;
@@ -92,15 +92,15 @@ namespace Kivio {
}
}
- void TargetTool::mouseMove(QMouseEvent* e)
+ void TargetTool::mouseMove(TQMouseEvent* e)
{
KoPoint p = view()->canvasWidget()->mapFromScreen(e->pos());
int colType;
if(view()->canvasWidget()->activePage()->checkForStencil(&p, &colType, 0, false)) {
- view()->canvasWidget()->setCursor(Qt::CrossCursor);
+ view()->canvasWidget()->setCursor(TQt::CrossCursor);
} else {
- view()->canvasWidget()->setCursor(Qt::ForbiddenCursor);
+ view()->canvasWidget()->setCursor(TQt::ForbiddenCursor);
}
}
diff --git a/kivio/plugins/kiviotargettool/kiviotargettool.h b/kivio/plugins/kiviotargettool/kiviotargettool.h
index 5a1fb787..52286f82 100644
--- a/kivio/plugins/kiviotargettool/kiviotargettool.h
+++ b/kivio/plugins/kiviotargettool/kiviotargettool.h
@@ -23,7 +23,7 @@
#include "kivio_mousetool.h"
-class QMouseEvent;
+class TQMouseEvent;
namespace Kivio {
class MouseToolAction;
@@ -36,11 +36,12 @@ namespace Kivio {
class TargetTool : public MouseTool
{
Q_OBJECT
+ TQ_OBJECT
public:
- TargetTool(KivioView* parent);
+ TargetTool(KivioView* tqparent);
~TargetTool();
- virtual bool processEvent(QEvent* e);
+ virtual bool processEvent(TQEvent* e);
public slots:
virtual void setActivated(bool);
@@ -50,8 +51,8 @@ namespace Kivio {
void makePermanent();
protected:
- void mousePress(QMouseEvent* e);
- void mouseMove(QMouseEvent* e);
+ void mousePress(TQMouseEvent* e);
+ void mouseMove(TQMouseEvent* e);
private:
Kivio::MouseToolAction* m_targetAction;
diff --git a/kivio/plugins/kiviotargettool/kiviotargettoolfactory.cpp b/kivio/plugins/kiviotargettool/kiviotargettoolfactory.cpp
index b80e9734..599c3a01 100644
--- a/kivio/plugins/kiviotargettool/kiviotargettoolfactory.cpp
+++ b/kivio/plugins/kiviotargettool/kiviotargettoolfactory.cpp
@@ -24,8 +24,8 @@ K_EXPORT_COMPONENT_FACTORY( libkiviotargettool, KivioTargetToolFactory )
KInstance* KivioTargetToolFactory::s_global = 0;
-KivioTargetToolFactory::KivioTargetToolFactory(QObject *parent, const char *name)
- : KLibFactory(parent, name)
+KivioTargetToolFactory::KivioTargetToolFactory(TQObject *tqparent, const char *name)
+ : KLibFactory(tqparent, name)
{
s_global = new KInstance("kivio");
}
@@ -35,12 +35,12 @@ KivioTargetToolFactory::~KivioTargetToolFactory()
delete s_global;
}
-QObject* KivioTargetToolFactory::createObject( QObject* parent, const char*, const char*, const QStringList& )
+TQObject* KivioTargetToolFactory::createObject( TQObject* tqparent, const char*, const char*, const TQStringList& )
{
- if ( !parent->inherits("KivioView") )
+ if ( !tqparent->inherits("KivioView") )
return 0;
- QObject *obj = new Kivio::TargetTool(static_cast<KivioView*>(parent));
+ TQObject *obj = new Kivio::TargetTool(static_cast<KivioView*>(TQT_TQWIDGET(tqparent)));
return obj;
}
diff --git a/kivio/plugins/kiviotargettool/kiviotargettoolfactory.h b/kivio/plugins/kiviotargettool/kiviotargettoolfactory.h
index abe028ea..e1ba4521 100644
--- a/kivio/plugins/kiviotargettool/kiviotargettoolfactory.h
+++ b/kivio/plugins/kiviotargettool/kiviotargettoolfactory.h
@@ -19,8 +19,8 @@
#ifndef KIVIOTARGETTOOLFACTORY_H
#define KIVIOTARGETTOOLFACTORY_H
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include <klibloader.h>
@@ -29,12 +29,13 @@ class KInstance;
class KivioTargetToolFactory : public KLibFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KivioTargetToolFactory(QObject *parent = 0, const char *name = 0);
+ KivioTargetToolFactory(TQObject *tqparent = 0, const char *name = 0);
~KivioTargetToolFactory();
- virtual QObject* createObject( QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject", const QStringList &args = QStringList() );
+ virtual TQObject* createObject( TQObject* tqparent = 0, const char* name = 0,
+ const char* classname = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() );
static KInstance* global();