From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: 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 --- karbon/plugins/zoomtool/vzoomtool.cc | 24 ++++++++++++------------ karbon/plugins/zoomtool/vzoomtool.h | 14 +++++++------- karbon/plugins/zoomtool/zoomtoolplugin.cc | 8 ++++---- karbon/plugins/zoomtool/zoomtoolplugin.h | 5 +++-- 4 files changed, 26 insertions(+), 25 deletions(-) (limited to 'karbon/plugins/zoomtool') 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 -#include +#include +#include #include @@ -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( "Zoom tool:
" ); + TQString s = i18n( "Zoom tool:
" ); s += i18n( "Click and drag to zoom into a rectangular area.
" ); s += i18n( "Right click to zoom out of canvas.
" ); s += i18n( "Pressing +/- keys
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 +#include #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 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()); 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 +#include #include @@ -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(); }; -- cgit v1.2.1