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 /karbon/commands | |
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 'karbon/commands')
30 files changed, 126 insertions, 125 deletions
diff --git a/karbon/commands/valigncmd.cc b/karbon/commands/valigncmd.cc index 9e6392a1..47665eb5 100644 --- a/karbon/commands/valigncmd.cc +++ b/karbon/commands/valigncmd.cc @@ -79,7 +79,7 @@ VAlignCmd::execute() void VAlignCmd::unexecute() { - QPtrListIterator<VTranslateCmd> itr( m_trafoCmds ); + TQPtrListIterator<VTranslateCmd> itr( m_trafoCmds ); for( ; itr.current() ; ++itr ) itr.current()->unexecute(); setSuccess( false ); diff --git a/karbon/commands/valigncmd.h b/karbon/commands/valigncmd.h index 9fd8bf09..e447ef35 100644 --- a/karbon/commands/valigncmd.h +++ b/karbon/commands/valigncmd.h @@ -47,7 +47,7 @@ public: protected: Align m_align; - QPtrList<VTranslateCmd> m_trafoCmds; + TQPtrList<VTranslateCmd> m_trafoCmds; }; #endif diff --git a/karbon/commands/vbooleancmd.cc b/karbon/commands/vbooleancmd.cc index a97fefe9..e04676f7 100644 --- a/karbon/commands/vbooleancmd.cc +++ b/karbon/commands/vbooleancmd.cc @@ -19,8 +19,8 @@ */ -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <klocale.h> diff --git a/karbon/commands/vbooleancmd.h b/karbon/commands/vbooleancmd.h index 4320f0d2..3a3478d3 100644 --- a/karbon/commands/vbooleancmd.h +++ b/karbon/commands/vbooleancmd.h @@ -22,7 +22,7 @@ #define __VBOOLEANCMD_H__ -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "vcommand.h" @@ -37,8 +37,8 @@ public: enum VBooleanType { intersect, - shape_union, - shape_xor, + tqshape_union, + tqshape_xor, substract }; @@ -62,7 +62,7 @@ public: virtual void visitVSubpath( VSubpath& path ); protected: - typedef QValueList<double> VParamList; + typedef TQValueList<double> VParamList; void recursiveSubdivision( const VSegment& segment1, double t0_1, double t1_1, diff --git a/karbon/commands/vclipartcmd.cc b/karbon/commands/vclipartcmd.cc index 42ce3a1d..a9465e4e 100644 --- a/karbon/commands/vclipartcmd.cc +++ b/karbon/commands/vclipartcmd.cc @@ -22,7 +22,7 @@ #include "vdocument.h" #include "vselection.h" -VClipartCmd::VClipartCmd( VDocument* doc, const QString& name, VObject* clipart ) +VClipartCmd::VClipartCmd( VDocument* doc, const TQString& name, VObject* clipart ) : VCommand( doc, name ), m_clipart( clipart->clone() ), m_executed( false ) { } diff --git a/karbon/commands/vclipartcmd.h b/karbon/commands/vclipartcmd.h index 37e809a2..fa4cf06d 100644 --- a/karbon/commands/vclipartcmd.h +++ b/karbon/commands/vclipartcmd.h @@ -25,7 +25,7 @@ class VClipartCmd : public VCommand { public: - VClipartCmd( VDocument* doc, const QString& name, VObject* clipart ); + VClipartCmd( VDocument* doc, const TQString& name, VObject* clipart ); virtual ~VClipartCmd() {} virtual void execute(); diff --git a/karbon/commands/vcommand.cc b/karbon/commands/vcommand.cc index 7ba4c4be..97da53b5 100644 --- a/karbon/commands/vcommand.cc +++ b/karbon/commands/vcommand.cc @@ -31,8 +31,8 @@ VCommandHistory::VCommandHistory( KarbonPart* part ) { m_commands.setAutoDelete( true ); - m_undo = KStdAction::undo( this, SLOT( undo() ), m_part->actionCollection(), "koffice_undo" ); - m_redo = KStdAction::redo( this, SLOT( redo() ), m_part->actionCollection(), "koffice_redo" ); + m_undo = KStdAction::undo( this, TQT_SLOT( undo() ), m_part->actionCollection(), "koffice_undo" ); + m_redo = KStdAction::redo( this, TQT_SLOT( redo() ), m_part->actionCollection(), "koffice_redo" ); clear(); } @@ -82,7 +82,7 @@ VCommandHistory::addCommand( VCommand* command, bool execute ) } m_commands.append( command ); - kdDebug(38000) << "History: new command: " << m_commands.findRef( command ) << endl; + kdDebug(38000) << "History: new command: " << m_commands.tqfindRef( command ) << endl; if( execute ) { @@ -137,7 +137,7 @@ VCommandHistory::undo() updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void @@ -170,13 +170,13 @@ VCommandHistory::redo() updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void VCommandHistory::undo( VCommand* command ) { - if( ( m_commands.findRef( command ) == -1 ) || ( !command->success() ) ) + if( ( m_commands.tqfindRef( command ) == -1 ) || ( !command->success() ) ) return; command->unexecute(); @@ -186,13 +186,13 @@ VCommandHistory::undo( VCommand* command ) updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void VCommandHistory::redo( VCommand* command ) { - if( ( m_commands.findRef( command ) == -1 ) || ( command->success() ) ) + if( ( m_commands.tqfindRef( command ) == -1 ) || ( command->success() ) ) return; command->execute(); @@ -202,7 +202,7 @@ VCommandHistory::redo( VCommand* command ) updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void @@ -210,7 +210,7 @@ VCommandHistory::undoAllTo( VCommand* command ) { int to; - if( ( to = m_commands.findRef( command ) ) == -1 ) + if( ( to = m_commands.tqfindRef( command ) ) == -1 ) return; int i = m_commands.count() - 1; @@ -231,7 +231,7 @@ VCommandHistory::undoAllTo( VCommand* command ) emit commandExecuted(); updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void @@ -239,7 +239,7 @@ VCommandHistory::redoAllTo( VCommand* command ) { int to; - if( ( to = m_commands.findRef( command ) ) == -1 ) + if( ( to = m_commands.tqfindRef( command ) ) == -1 ) return; int i = 0; @@ -260,7 +260,7 @@ VCommandHistory::redoAllTo( VCommand* command ) emit commandExecuted(); updateActions(); - m_part->repaintAllViews(); + m_part->tqrepaintAllViews(); } void diff --git a/karbon/commands/vcommand.h b/karbon/commands/vcommand.h index 254e27eb..36c63996 100644 --- a/karbon/commands/vcommand.h +++ b/karbon/commands/vcommand.h @@ -24,8 +24,8 @@ //#include <assert.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqobject.h> +#include <tqptrlist.h> #include "vvisitor.h" @@ -48,7 +48,7 @@ public: * @param name the name of the command (appears in command history) * @param icon the icon of the command (appears in command history) */ - VCommand( VDocument* doc, const QString& name, const QString& icon = "14_action" ) + VCommand( VDocument* doc, const TQString& name, const TQString& icon = "14_action" ) : m_document( doc ), m_name( name ), m_icon( icon ) { // A crash because of an assert() is not much better than an crash because of a null @@ -88,7 +88,7 @@ public: * * @return the command name */ - QString name() const + TQString name() const { return m_name; } @@ -98,7 +98,7 @@ public: * * @param name the new command name */ - void setName( const QString& name ) + void setName( const TQString& name ) { m_name = name; } @@ -108,7 +108,7 @@ public: * * @return the command icon */ - QString icon() const + TQString icon() const { return m_icon; } @@ -126,8 +126,8 @@ public: private: VDocument* m_document; - QString m_name; - QString m_icon; + TQString m_name; + TQString m_icon; }; /** @@ -140,9 +140,10 @@ private: * oldest undone command. That makes it possible to go back and forth to a * specific document state. */ -class VCommandHistory : public QObject +class VCommandHistory : public TQObject { Q_OBJECT + TQ_OBJECT public: /** @@ -219,7 +220,7 @@ public: * * @return pointer to the list of commands */ - const QPtrList<VCommand>* commands() const + const TQPtrList<VCommand>* commands() const { return & m_commands; } @@ -310,7 +311,7 @@ private: unsigned int m_redoLimit; KAction *m_undo; KAction *m_redo; - QPtrList<VCommand> m_commands; + TQPtrList<VCommand> m_commands; int m_savedPos; }; diff --git a/karbon/commands/vdeletenodescmd.cc b/karbon/commands/vdeletenodescmd.cc index cde7d2a5..c16ac497 100644 --- a/karbon/commands/vdeletenodescmd.cc +++ b/karbon/commands/vdeletenodescmd.cc @@ -52,7 +52,7 @@ VDeleteNodeCmd::visitVSubpath( VSubpath& path ) segment = segment->next(); } if( m_segments.count() > 0 ) - path.invalidateBoundingBox(); + path.tqinvalidateBoundingBox(); } void @@ -69,7 +69,7 @@ VDeleteNodeCmd::execute() void VDeleteNodeCmd::unexecute() { - QPtrListIterator<VSegment> itr( m_segments ); + TQPtrListIterator<VSegment> itr( m_segments ); for( ; itr.current() ; ++itr ) itr.current()->setState( VSegment::normal ); setSuccess( false ); diff --git a/karbon/commands/vdeletenodescmd.h b/karbon/commands/vdeletenodescmd.h index 28e26226..82931230 100644 --- a/karbon/commands/vdeletenodescmd.h +++ b/karbon/commands/vdeletenodescmd.h @@ -39,7 +39,7 @@ public: virtual void visitVSubpath( VSubpath& path ); protected: - QPtrList<VSegment> m_segments; + TQPtrList<VSegment> m_segments; }; #endif diff --git a/karbon/commands/vdistributecmd.cc b/karbon/commands/vdistributecmd.cc index d6ceb200..d8e410b0 100644 --- a/karbon/commands/vdistributecmd.cc +++ b/karbon/commands/vdistributecmd.cc @@ -48,7 +48,7 @@ VDistributeCmd::execute() VObjectList objs = document()->selection()->objects(); VObjectListIterator itr( objs ); - QMap<double,VObject*> sortedPos; + TQMap<double,VObject*> sortedPos; // sort by position and calculate sum of objects widht/height for( ; itr.current(); ++itr ) @@ -89,7 +89,7 @@ VDistributeCmd::execute() double pos = 0.0, step = space / double(objs.count() - 1); VTranslateCmd *trafoCmd = 0L; - QMapIterator<double,VObject*> it = sortedPos.begin(), et = sortedPos.end(); + TQMapIterator<double,VObject*> it = sortedPos.begin(), et = sortedPos.end(); for( ; it != et; ++it ) { @@ -155,7 +155,7 @@ VDistributeCmd::execute() void VDistributeCmd::unexecute() { - QPtrListIterator<VTranslateCmd> itr( m_trafoCmds ); + TQPtrListIterator<VTranslateCmd> itr( m_trafoCmds ); for( ; itr.current() ; ++itr ) itr.current()->unexecute(); setSuccess( false ); diff --git a/karbon/commands/vdistributecmd.h b/karbon/commands/vdistributecmd.h index 2f0cffe3..b7850193 100644 --- a/karbon/commands/vdistributecmd.h +++ b/karbon/commands/vdistributecmd.h @@ -51,7 +51,7 @@ protected: double getAvailableSpace( VObject *first, VObject *last, double extent ); Distribute m_distribute; - QPtrList<VTranslateCmd> m_trafoCmds; + TQPtrList<VTranslateCmd> m_trafoCmds; }; #endif diff --git a/karbon/commands/vfillcmd.cc b/karbon/commands/vfillcmd.cc index 48572ade..18f17b85 100644 --- a/karbon/commands/vfillcmd.cc +++ b/karbon/commands/vfillcmd.cc @@ -28,7 +28,7 @@ #include "vgroup.h" #include "vtext.h" -VFillCmd::VFillCmd( VDocument *doc, const VFill &fill, const QString &icon ) +VFillCmd::VFillCmd( VDocument *doc, const VFill &fill, const TQString &icon ) : VCommand( doc, i18n( "Fill Objects" ), icon ), m_fill( fill ) { m_selection = document()->selection()->clone(); diff --git a/karbon/commands/vfillcmd.h b/karbon/commands/vfillcmd.h index 41661290..d222ab63 100644 --- a/karbon/commands/vfillcmd.h +++ b/karbon/commands/vfillcmd.h @@ -25,7 +25,7 @@ #include "vfill.h" #include "vgroup.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <koffice_export.h> class VSelection; @@ -34,7 +34,7 @@ class VSelection; class KARBONCOMMAND_EXPORT VFillCmd : public VCommand { public: - VFillCmd( VDocument *doc, const VFill &, const QString& icon = "14_action" ); + VFillCmd( VDocument *doc, const VFill &, const TQString& icon = "14_action" ); virtual ~VFillCmd(); virtual void execute(); @@ -55,7 +55,7 @@ protected: VFill m_fill; - QValueVector<VFill> m_oldfills; + TQValueVector<VFill> m_oldfills; }; #endif diff --git a/karbon/commands/vgroupcmd.cc b/karbon/commands/vgroupcmd.cc index bcad4d93..d6e9a7fa 100644 --- a/karbon/commands/vgroupcmd.cc +++ b/karbon/commands/vgroupcmd.cc @@ -47,10 +47,10 @@ VGroupCmd::execute() VObjectListIterator itr( m_selection->objects() ); for ( ; itr.current() ; ++itr ) { - // remove from corresponding parent - VGroup *parent = dynamic_cast<VGroup*>( itr.current()->parent() ); - if( parent ) - parent->take( *itr.current() ); + // remove from corresponding tqparent + VGroup *tqparent = dynamic_cast<VGroup*>( itr.current()->tqparent() ); + if( tqparent ) + tqparent->take( *itr.current() ); m_group->append( itr.current() ); } @@ -77,18 +77,18 @@ VGroupCmd::unexecute() document()->selection()->append( itr.current() ); } - VGroup* parent; - if( ( parent = dynamic_cast<VGroup*>( m_group->parent() ) ) ) + VGroup* tqparent; + if( ( tqparent = dynamic_cast<VGroup*>( m_group->tqparent() ) ) ) { - // unregister from parent: - parent->take( *m_group ); + // unregister from tqparent: + tqparent->take( *m_group ); - // inform all objects in this group about their new parent + // inform all objects in this group about their new tqparent VObjectListIterator itr = m_selection->objects(); for ( ; itr.current() ; ++itr ) { - parent->append( itr.current() ); + tqparent->append( itr.current() ); } m_group->clear(); diff --git a/karbon/commands/vinsertcmd.cc b/karbon/commands/vinsertcmd.cc index 2ec628c8..2db54907 100644 --- a/karbon/commands/vinsertcmd.cc +++ b/karbon/commands/vinsertcmd.cc @@ -26,7 +26,7 @@ #include "vtransformcmd.h" -VInsertCmd::VInsertCmd( VDocument *doc, const QString& name, +VInsertCmd::VInsertCmd( VDocument *doc, const TQString& name, VObjectList *objects, double offset ) : VCommand( doc, name, "14_insert" ), diff --git a/karbon/commands/vinsertcmd.h b/karbon/commands/vinsertcmd.h index 7cc948a9..9036a1ee 100644 --- a/karbon/commands/vinsertcmd.h +++ b/karbon/commands/vinsertcmd.h @@ -33,7 +33,7 @@ class VInsert; class VInsertCmd : public VCommand { public: - VInsertCmd( VDocument *doc, const QString& name, + VInsertCmd( VDocument *doc, const TQString& name, VObjectList *objects, double offset ); virtual ~VInsertCmd(); diff --git a/karbon/commands/vlayercmd.cc b/karbon/commands/vlayercmd.cc index d53155cd..9a1fe7bd 100644 --- a/karbon/commands/vlayercmd.cc +++ b/karbon/commands/vlayercmd.cc @@ -22,7 +22,7 @@ #include "vlayercmd.h" #include "vdocument.h" -VLayerCmd::VLayerCmd( VDocument* doc, const QString& name, VLayer* layer, VLayerCmdType order ) +VLayerCmd::VLayerCmd( VDocument* doc, const TQString& name, VLayer* layer, VLayerCmdType order ) : VCommand( doc, name, "14_layers" ), m_layer( layer ), m_cmdType( order ) { if( order == addLayer ) diff --git a/karbon/commands/vlayercmd.h b/karbon/commands/vlayercmd.h index b2771202..dd76773d 100644 --- a/karbon/commands/vlayercmd.h +++ b/karbon/commands/vlayercmd.h @@ -43,7 +43,7 @@ public: deleteLayer }; - VLayerCmd( VDocument* doc, const QString& name, VLayer* layer, VLayerCmdType order ); + VLayerCmd( VDocument* doc, const TQString& name, VLayer* layer, VLayerCmdType order ); virtual ~VLayerCmd() {} virtual void execute(); diff --git a/karbon/commands/vreplacingcmd.cc b/karbon/commands/vreplacingcmd.cc index c14ffa1d..d99fe313 100644 --- a/karbon/commands/vreplacingcmd.cc +++ b/karbon/commands/vreplacingcmd.cc @@ -22,7 +22,7 @@ #include "vselection.h" #include "vdocument.h" -VReplacingCmd::VReplacingCmd( VDocument* doc, const QString& name ) +VReplacingCmd::VReplacingCmd( VDocument* doc, const TQString& name ) : VCommand( doc, name ) { // Set members. @@ -44,7 +44,7 @@ VReplacingCmd::execute() bool successful = false; - // Create new shapes if they don't exist yet. + // Create new tqshapes if they don't exist yet. if( !m_newObjects ) { m_newObjects = new VSelection(); @@ -65,11 +65,11 @@ VReplacingCmd::execute() { successful = true; - // Insert new shape right before old shape. - itr.current()->parent()->insertInfrontOf( + // Insert new tqshape right before old tqshape. + itr.current()->tqparent()->insertInfrontOf( newObject, itr.current() ); - // Add new shape to list of new objects. + // Add new tqshape to list of new objects. m_newObjects->append( newObject ); } // No success. diff --git a/karbon/commands/vreplacingcmd.h b/karbon/commands/vreplacingcmd.h index 54a14aac..a4f478e3 100644 --- a/karbon/commands/vreplacingcmd.h +++ b/karbon/commands/vreplacingcmd.h @@ -23,13 +23,13 @@ #include "vcommand.h" #include <koffice_export.h> -class QString; +class TQString; class VSelection; /** * VReplacingCmd is a generic command. Derive from it if you plan to do complex - * transformations upon selected objects which make it necessary to replace + * transformations upon selected objects which make it necessary to tqreplace * each object as a whole with a new object. */ @@ -43,7 +43,7 @@ protected: /** * Make it "abstract". */ - VReplacingCmd( VDocument* doc, const QString& name ); + VReplacingCmd( VDocument* doc, const TQString& name ); virtual ~VReplacingCmd(); private: diff --git a/karbon/commands/vshapecmd.cc b/karbon/commands/vshapecmd.cc index 59ea841a..ae0ad2dc 100644 --- a/karbon/commands/vshapecmd.cc +++ b/karbon/commands/vshapecmd.cc @@ -25,33 +25,33 @@ #include "vshapecmd.h" -VShapeCmd::VShapeCmd( VDocument* doc, const QString& name, VPath* shape, const QString& icon ) - : VCommand( doc, name, icon ), m_shape( shape ) +VShapeCmd::VShapeCmd( VDocument* doc, const TQString& name, VPath* tqshape, const TQString& icon ) + : VCommand( doc, name, icon ), m_tqshape( tqshape ) { } void VShapeCmd::execute() { - if( !m_shape ) + if( !m_tqshape ) return; - if( m_shape->state() == VObject::deleted ) + if( m_tqshape->state() == VObject::deleted ) { document()->selection()->clear(); - m_shape->setState( VObject::normal ); - document()->selection()->append( m_shape ); + m_tqshape->setState( VObject::normal ); + document()->selection()->append( m_tqshape ); } else { - m_shape->setState( VObject::normal ); - m_shape->setFill( *( document()->selection()->fill() ) ); - m_shape->setStroke( *( document()->selection()->stroke() ) ); + m_tqshape->setState( VObject::normal ); + m_tqshape->setFill( *( document()->selection()->fill() ) ); + m_tqshape->setStroke( *( document()->selection()->stroke() ) ); // Add path: - document()->append( m_shape ); + document()->append( m_tqshape ); document()->selection()->clear(); - document()->selection()->append( m_shape ); + document()->selection()->append( m_tqshape ); } setSuccess( true ); @@ -60,11 +60,11 @@ VShapeCmd::execute() void VShapeCmd::unexecute() { - if( !m_shape ) + if( !m_tqshape ) return; - document()->selection()->take( *m_shape ); - m_shape->setState( VObject::deleted ); + document()->selection()->take( *m_tqshape ); + m_tqshape->setState( VObject::deleted ); setSuccess( false ); } diff --git a/karbon/commands/vshapecmd.h b/karbon/commands/vshapecmd.h index dc033dbe..30607fcd 100644 --- a/karbon/commands/vshapecmd.h +++ b/karbon/commands/vshapecmd.h @@ -28,13 +28,13 @@ class VPath; /* * Provides a common base class for creation commands since they all have * a similar execute / unexecute behaviour and all build a VPath. Upon - * execution() the shape will be added to the document and selected, upon undoing + * execution() the tqshape will be added to the document and selected, upon undoing * it will be set to the deleted state. */ class KARBONCOMMAND_EXPORT VShapeCmd : public VCommand { public: - VShapeCmd( VDocument* doc, const QString& name, VPath* shape, const QString& icon = "14_polygon" ); + VShapeCmd( VDocument* doc, const TQString& name, VPath* tqshape, const TQString& icon = "14_polygon" ); virtual ~VShapeCmd() {} virtual void execute(); @@ -43,8 +43,8 @@ public: virtual bool changesSelection() const { return true; } protected: - /// Pointer to the created shape. - VPath *m_shape; + /// Pointer to the created tqshape. + VPath *m_tqshape; }; #endif diff --git a/karbon/commands/vstrokecmd.cc b/karbon/commands/vstrokecmd.cc index 26a9a1a7..2ea43668 100644 --- a/karbon/commands/vstrokecmd.cc +++ b/karbon/commands/vstrokecmd.cc @@ -26,7 +26,7 @@ #include "vstrokecmd.h" #include "vdocument.h" -VStrokeCmd::VStrokeCmd( VDocument *doc, const VStroke *stroke, const QString& icon ) +VStrokeCmd::VStrokeCmd( VDocument *doc, const VStroke *stroke, const TQString& icon ) : VCommand( doc, i18n( "Stroke Objects" ), icon ), m_stroke( *stroke ) { m_selection = document()->selection()->clone(); @@ -74,7 +74,7 @@ VStrokeCmd::VStrokeCmd( VDocument *doc, const VColor &color ) m_stroke.setColor( color ); } -VStrokeCmd::VStrokeCmd( VDocument *doc, const QValueList<float>& array ) +VStrokeCmd::VStrokeCmd( VDocument *doc, const TQValueList<float>& array ) : VCommand( doc, i18n( "Dash Pattern" ), "linewidth" ) { m_selection = document()->selection()->clone(); diff --git a/karbon/commands/vstrokecmd.h b/karbon/commands/vstrokecmd.h index 71adb334..ba56c74b 100644 --- a/karbon/commands/vstrokecmd.h +++ b/karbon/commands/vstrokecmd.h @@ -25,19 +25,19 @@ #include "vcolor.h" #include "vstroke.h" -#include <qvaluevector.h> +#include <tqvaluevector.h> #include <koffice_export.h> // Stroke object(s) class KARBONCOMMAND_EXPORT VStrokeCmd : public VCommand { public: - VStrokeCmd( VDocument *doc, const VStroke *, const QString& icon = "14_action" ); + VStrokeCmd( VDocument *doc, const VStroke *, const TQString& icon = "14_action" ); VStrokeCmd( VDocument *doc, VGradient * ); VStrokeCmd( VDocument *doc, VPattern * ); VStrokeCmd( VDocument *doc, const VColor & ); VStrokeCmd( VDocument *doc, double ); - VStrokeCmd( VDocument *doc, const QValueList<float>& ); + VStrokeCmd( VDocument *doc, const TQValueList<float>& ); virtual ~VStrokeCmd(); virtual void execute(); @@ -62,7 +62,7 @@ protected: State m_state; VSelection *m_selection; VStroke m_stroke; - QValueVector<VStroke> m_oldstrokes; + TQValueVector<VStroke> m_oldstrokes; }; #endif diff --git a/karbon/commands/vtextcmd.cc b/karbon/commands/vtextcmd.cc index 5bab728d..32e7b031 100644 --- a/karbon/commands/vtextcmd.cc +++ b/karbon/commands/vtextcmd.cc @@ -26,7 +26,7 @@ #include "vtext.h" #include "vtextcmd.h" -VTextCmd::VTextCmd( KarbonPart* part, const QFont& font, const QString& text ) +VTextCmd::VTextCmd( KarbonPart* part, const TQFont& font, const TQString& text ) : VShapeCmd( part, i18n( "Insert Text" ) ), m_font( font ), m_text( text ) { } diff --git a/karbon/commands/vtextcmd.h b/karbon/commands/vtextcmd.h index 3e0f310e..708250c8 100644 --- a/karbon/commands/vtextcmd.h +++ b/karbon/commands/vtextcmd.h @@ -21,9 +21,9 @@ #ifndef __VTEXTCMD_H__ #define __VTEXTCMD_H__ -#include <qfont.h> +#include <tqfont.h> -#include "vshapecmd.h" +#include "vtqshapecmd.h" // create a text-object. @@ -32,14 +32,14 @@ class VObject; class VTextCmd : public VShapeCmd { public: - VTextCmd( KarbonPart* part, const QFont& font, const QString& m_text ); + VTextCmd( KarbonPart* part, const TQFont& font, const TQString& m_text ); virtual ~VTextCmd() {} virtual VObject* createPath(); protected: - QFont m_font; - QString m_text; + TQFont m_font; + TQString m_text; }; #endif diff --git a/karbon/commands/vtransformcmd.cc b/karbon/commands/vtransformcmd.cc index 5feacac5..5cb08953 100644 --- a/karbon/commands/vtransformcmd.cc +++ b/karbon/commands/vtransformcmd.cc @@ -33,7 +33,7 @@ #include <kdebug.h> -VTransformCmd::VTransformCmd( VDocument *doc, const QWMatrix& mat, bool duplicate ) +VTransformCmd::VTransformCmd( VDocument *doc, const TQWMatrix& mat, bool duplicate ) : VCommand( doc, i18n( "Transform Objects" ) ), m_mat( mat ), m_duplicate( duplicate ) { m_selection = ( document() && document()->selection() ) @@ -51,7 +51,7 @@ VTransformCmd::VTransformCmd( VDocument *doc, const QWMatrix& mat, bool duplicat setName( i18n( "Transform Object" ) ); } -VTransformCmd::VTransformCmd( VDocument *doc, const QString& name, const QString& icon, bool duplicate ) +VTransformCmd::VTransformCmd( VDocument *doc, const TQString& name, const TQString& icon, bool duplicate ) : VCommand( doc, name, icon ), m_duplicate( duplicate ) { m_selection = ( document() && document()->selection() ) @@ -195,7 +195,7 @@ VTransformCmd::visitVSubpath( VSubpath& path ) segment = segment->next(); } - path.invalidateBoundingBox(); + path.tqinvalidateBoundingBox(); } void @@ -217,7 +217,7 @@ VTransformCmd::visitVText( VText& text ) visit( *itr.current() ); } - text.invalidateBoundingBox(); + text.tqinvalidateBoundingBox(); } void @@ -301,7 +301,7 @@ VTranslateBezierCmd::execute() { if( m_segment->degree() == 3 ) { - QWMatrix m2( m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), -m_mat.dx(), -m_mat.dy() ); + TQWMatrix m2( m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), -m_mat.dx(), -m_mat.dy() ); if( m_firstControl ) { if( m_segment->prev() && @@ -343,7 +343,7 @@ VTranslateBezierCmd::execute() } if( m_subpath ) - m_subpath->invalidateBoundingBox(); + m_subpath->tqinvalidateBoundingBox(); setSuccess( true ); } @@ -351,7 +351,7 @@ VTranslateBezierCmd::execute() void VTranslateBezierCmd::unexecute() { - QWMatrix m2( m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), -m_mat.dx(), -m_mat.dy() ); + TQWMatrix m2( m_mat.m11(), m_mat.m12(), m_mat.m21(), m_mat.m22(), -m_mat.dx(), -m_mat.dy() ); if( m_segment ) { for( uint i = 0;i < m_segment->degree();i++ ) @@ -450,7 +450,7 @@ VTranslatePointCmd::visitVSubpath( VSubpath& path ) // save indices of selected points for all segments while( segment ) { - QValueVector<int> pnts; + TQValueVector<int> pnts; for( unsigned short i = 0; i < segment->degree(); ++i ) { @@ -471,21 +471,21 @@ VTranslatePointCmd::visitVSubpath( VSubpath& path ) void VTranslatePointCmd::translatePoints() { - QMap<VSegment*, QValueVector<int> >::iterator it, et = m_segPnts.end(); + TQMap<VSegment*, TQValueVector<int> >::iterator it, et = m_segPnts.end(); // iterate over the segments and transform all selected points for( it = m_segPnts.begin(); it != et; ++it ) { VSegment *segment = it.key(); - QValueVector<int> &pnts = it.data(); + TQValueVector<int> &pnts = it.data(); int pntCnt = pnts.size(); for( int i = 0; i < pntCnt; ++i ) segment->setPoint( pnts[i], segment->point( pnts[i] ).transform( m_mat ) ); } - // invalidate all changed subpaths + // tqinvalidate all changed subpaths VObjectListIterator itr( m_subpaths ); for( ; itr.current(); ++itr ) - itr.current()->invalidateBoundingBox(); + itr.current()->tqinvalidateBoundingBox(); } diff --git a/karbon/commands/vtransformcmd.h b/karbon/commands/vtransformcmd.h index daa26950..4711d56c 100644 --- a/karbon/commands/vtransformcmd.h +++ b/karbon/commands/vtransformcmd.h @@ -21,14 +21,14 @@ #ifndef __VTRANSFORMCMD_H__ #define __VTRANSFORMCMD_H__ -#include <qvaluevector.h> +#include <tqvaluevector.h> #include "vcommand.h" #include "vgroup.h" #include <koffice_export.h> // Transform object(s) with a specified matrix and allow undo. -class QWMatrix; +class TQWMatrix; class VPath; class VSubpath; class VSegment; @@ -38,7 +38,7 @@ class VSelection; class KARBONCOMMAND_EXPORT VTransformCmd : public VCommand { public: - VTransformCmd( VDocument *doc, const QWMatrix& mat, bool duplicate = false ); + VTransformCmd( VDocument *doc, const TQWMatrix& mat, bool duplicate = false ); virtual ~VTransformCmd(); virtual void execute(); @@ -50,18 +50,18 @@ public: virtual void visitVImage( VImage& img ); virtual void visitVObject( VObject& object ); - void setMatrix( const QWMatrix& m ) + void setMatrix( const TQWMatrix& m ) { m_mat = m; } protected: - VTransformCmd( VDocument *doc, const QString& name, const QString& icon, bool duplicate = false ); + VTransformCmd( VDocument *doc, const TQString& name, const TQString& icon, bool duplicate = false ); VSelection* m_selection; VObjectList m_duplicates; - QWMatrix m_mat; + TQWMatrix m_mat; bool m_duplicate; }; @@ -106,7 +106,7 @@ public: virtual void visitVSubpath( VSubpath& path ); protected: - QWMatrix m_mat; + TQWMatrix m_mat; VSegment *m_segment; VSegment *m_segmenttwo; bool m_firstControl; @@ -127,8 +127,8 @@ public: protected: void translatePoints(); - QWMatrix m_mat; - QMap<VSegment*, QValueVector<int> > m_segPnts; + TQWMatrix m_mat; + TQMap<VSegment*, TQValueVector<int> > m_segPnts; VObjectList m_subpaths; }; diff --git a/karbon/commands/vungroupcmd.cc b/karbon/commands/vungroupcmd.cc index 314a873e..5f238898 100644 --- a/karbon/commands/vungroupcmd.cc +++ b/karbon/commands/vungroupcmd.cc @@ -53,19 +53,19 @@ VUnGroupCmd::execute() document()->selection()->append( itr.current() ); } - VGroup* parent; - if( ( parent = dynamic_cast<VGroup*>( m_group->parent() ) ) ) + VGroup* tqparent; + if( ( tqparent = dynamic_cast<VGroup*>( m_group->tqparent() ) ) ) { - // unregister from parent: - parent->take( *m_group ); + // unregister from tqparent: + tqparent->take( *m_group ); - // inform all objects in this group about their new parent + // inform all objects in this group about their new tqparent VObjectListIterator itr = m_group->objects(); for ( ; itr.current() ; ++itr ) { - itr.current()->invalidateBoundingBox(); - parent->append( itr.current() ); + itr.current()->tqinvalidateBoundingBox(); + tqparent->append( itr.current() ); } m_group->clear(); |