diff options
Diffstat (limited to 'karbon/plugins/zoomtool')
-rw-r--r-- | karbon/plugins/zoomtool/vzoomtool.cc | 24 | ||||
-rw-r--r-- | karbon/plugins/zoomtool/vzoomtool.h | 14 | ||||
-rw-r--r-- | karbon/plugins/zoomtool/zoomtoolplugin.cc | 8 | ||||
-rw-r--r-- | karbon/plugins/zoomtool/zoomtoolplugin.h | 5 |
4 files changed, 26 insertions, 25 deletions
diff --git a/karbon/plugins/zoomtool/vzoomtool.cc b/karbon/plugins/zoomtool/vzoomtool.cc index 60142481..01a80aaa 100644 --- a/karbon/plugins/zoomtool/vzoomtool.cc +++ b/karbon/plugins/zoomtool/vzoomtool.cc @@ -18,8 +18,8 @@ */ -#include <qcursor.h> -#include <qevent.h> +#include <tqcursor.h> +#include <tqevent.h> #include <klocale.h> @@ -34,7 +34,7 @@ VZoomTool::VZoomTool(KarbonView *view ): VTool( view, "tool_zoom_plugin" ) { - m_plusCursor = new QCursor( VCursor::createCursor( VCursor::ZoomPlus ) ); + m_plusCursor = new TQCursor( VCursor::createCursor( VCursor::ZoomPlus ) ); registerTool( this ); } @@ -44,10 +44,10 @@ VZoomTool::~VZoomTool() delete m_plusCursor; } -QString +TQString VZoomTool::contextHelp() { - QString s = i18n( "<qt><b>Zoom tool:</b><br>" ); + TQString s = i18n( "<qt><b>Zoom tool:</b><br>" ); s += i18n( "<i>Click and drag</i> to zoom into a rectangular area.<br>" ); s += i18n( "<i>Right click</i> to zoom out of canvas.<br>" ); s += i18n( "<i>Pressing +/- keys</i><br>to zoom into/out of canvas." ); @@ -61,7 +61,7 @@ VZoomTool::activate() view()->setCursor( *m_plusCursor ); } -QString +TQString VZoomTool::statusText() { return i18n( "Zoom Tool" ); @@ -76,11 +76,11 @@ void VZoomTool::draw() { VPainter *painter = view()->painterFactory()->editpainter(); - painter->setRasterOp( Qt::NotROP ); + painter->setRasterOp( TQt::NotROP ); if( isDragging() ) { - painter->setPen( Qt::DotLine ); + painter->setPen( TQt::DotLine ); painter->newPath(); painter->moveTo( KoPoint( first().x(), first().y() ) ); painter->lineTo( KoPoint( m_current.x(), first().y() ) ); @@ -132,12 +132,12 @@ VZoomTool::mouseDragRelease() } bool -VZoomTool::keyReleased( Qt::Key key ) +VZoomTool::keyReleased( TQt::Key key ) { double zoomChange = 0; - if( key == Qt::Key_Minus ) + if( key == TQt::Key_Minus ) zoomChange = 0.75; - else if( key == Qt::Key_Plus ) + else if( key == TQt::Key_Plus ) zoomChange = 1.50; if( zoomChange != 0 ) @@ -161,7 +161,7 @@ VZoomTool::setup( KActionCollection *collection ) if( m_action == 0 ) { - m_action = new KRadioAction( i18n( "Zoom Tool" ), "14_zoom", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() ); + m_action = new KRadioAction( i18n( "Zoom Tool" ), "14_zoom", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() ); m_action->setToolTip( i18n( "Zoom" ) ); m_action->setExclusiveGroup( "misc" ); //m_ownAction = true; diff --git a/karbon/plugins/zoomtool/vzoomtool.h b/karbon/plugins/zoomtool/vzoomtool.h index 2616c03f..c6f1ffcd 100644 --- a/karbon/plugins/zoomtool/vzoomtool.h +++ b/karbon/plugins/zoomtool/vzoomtool.h @@ -22,11 +22,11 @@ #define __VZOOMTOOL_H__ #include "KoPoint.h" -#include <qstring.h> +#include <tqstring.h> #include "vtool.h" -class QCursor; +class TQCursor; class KarbonView; @@ -40,9 +40,9 @@ public: virtual void deactivate(); virtual void setup( KActionCollection *collection ); - virtual QString uiname() { return i18n( "Zoom Tool" ); } - virtual QString contextHelp(); - virtual QString statusText(); + virtual TQString uiname() { return i18n( "Zoom Tool" ); } + virtual TQString contextHelp(); + virtual TQString statusText(); protected: void draw(); @@ -52,7 +52,7 @@ protected: virtual void mouseDrag(); virtual void mouseDragRelease(); - virtual bool keyReleased( Qt::Key key ); + virtual bool keyReleased( TQt::Key key ); virtual void rightMouseButtonRelease(); @@ -61,7 +61,7 @@ protected: KoPoint m_current; private: - QCursor* m_plusCursor; + TQCursor* m_plusCursor; }; diff --git a/karbon/plugins/zoomtool/zoomtoolplugin.cc b/karbon/plugins/zoomtool/zoomtoolplugin.cc index fefec1d9..5a9a0115 100644 --- a/karbon/plugins/zoomtool/zoomtoolplugin.cc +++ b/karbon/plugins/zoomtool/zoomtoolplugin.cc @@ -30,18 +30,18 @@ typedef KGenericFactory<ZoomToolPlugin> ZoomToolPluginFactory; K_EXPORT_COMPONENT_FACTORY( karbon_zoomtoolplugin, ZoomToolPluginFactory( "karbonzoomtoolplugin" ) ) -ZoomToolPlugin::ZoomToolPlugin(QObject *parent, const char *name, const QStringList &) - : KParts::Plugin(parent, name) +ZoomToolPlugin::ZoomToolPlugin(TQObject *tqparent, const char *name, const TQStringList &) + : KParts::Plugin(tqparent, name) { setInstance(ZoomToolPluginFactory::instance()); kdDebug() << "Zoom tool plugin. Class: " << className() << ", Parent: " - << parent -> className() + << tqparent -> className() << "\n"; - if ( parent->inherits("KarbonFactory") ) + if ( tqparent->inherits("KarbonFactory") ) { KarbonToolRegistry* r = KarbonToolRegistry::instance(); r -> add(new KarbonToolFactory<VZoomTool>()); diff --git a/karbon/plugins/zoomtool/zoomtoolplugin.h b/karbon/plugins/zoomtool/zoomtoolplugin.h index 488526c7..9501832f 100644 --- a/karbon/plugins/zoomtool/zoomtoolplugin.h +++ b/karbon/plugins/zoomtool/zoomtoolplugin.h @@ -21,7 +21,7 @@ #ifndef __ZOOMTOOLPLUGIN_H__ #define __ZOOMTOOLPLUGIN_H__ -#include <qstring.h> +#include <tqstring.h> #include <kparts/plugin.h> @@ -31,8 +31,9 @@ class ZoomToolPlugin : public KParts::Plugin { Q_OBJECT + TQ_OBJECT public: - ZoomToolPlugin(QObject *parent, const char *name, const QStringList &); + ZoomToolPlugin(TQObject *tqparent, const char *name, const TQStringList &); virtual ~ZoomToolPlugin(); }; |