summaryrefslogtreecommitdiffstats
path: root/karbon
diff options
context:
space:
mode:
Diffstat (limited to 'karbon')
-rw-r--r--karbon/commands/valigncmd.cc2
-rw-r--r--karbon/commands/valigncmd.h2
-rw-r--r--karbon/commands/vbooleancmd.cc4
-rw-r--r--karbon/commands/vbooleancmd.h8
-rw-r--r--karbon/commands/vclipartcmd.cc2
-rw-r--r--karbon/commands/vclipartcmd.h2
-rw-r--r--karbon/commands/vcommand.cc26
-rw-r--r--karbon/commands/vcommand.h23
-rw-r--r--karbon/commands/vdeletenodescmd.cc4
-rw-r--r--karbon/commands/vdeletenodescmd.h2
-rw-r--r--karbon/commands/vdistributecmd.cc6
-rw-r--r--karbon/commands/vdistributecmd.h2
-rw-r--r--karbon/commands/vfillcmd.cc2
-rw-r--r--karbon/commands/vfillcmd.h6
-rw-r--r--karbon/commands/vgroupcmd.cc20
-rw-r--r--karbon/commands/vinsertcmd.cc2
-rw-r--r--karbon/commands/vinsertcmd.h2
-rw-r--r--karbon/commands/vlayercmd.cc2
-rw-r--r--karbon/commands/vlayercmd.h2
-rw-r--r--karbon/commands/vreplacingcmd.cc10
-rw-r--r--karbon/commands/vreplacingcmd.h6
-rw-r--r--karbon/commands/vshapecmd.cc28
-rw-r--r--karbon/commands/vshapecmd.h8
-rw-r--r--karbon/commands/vstrokecmd.cc4
-rw-r--r--karbon/commands/vstrokecmd.h8
-rw-r--r--karbon/commands/vtextcmd.cc2
-rw-r--r--karbon/commands/vtextcmd.h10
-rw-r--r--karbon/commands/vtransformcmd.cc24
-rw-r--r--karbon/commands/vtransformcmd.h18
-rw-r--r--karbon/commands/vungroupcmd.cc14
-rw-r--r--karbon/core/vclipgroup.cc16
-rw-r--r--karbon/core/vclipgroup.h6
-rw-r--r--karbon/core/vcolor.cc14
-rw-r--r--karbon/core/vcolor.h20
-rw-r--r--karbon/core/vcomposite.cc176
-rw-r--r--karbon/core/vcomposite.h42
-rw-r--r--karbon/core/vcursor.cc54
-rw-r--r--karbon/core/vcursor.h18
-rw-r--r--karbon/core/vdashpattern.cc16
-rw-r--r--karbon/core/vdashpattern.h14
-rw-r--r--karbon/core/vdocument.cc56
-rw-r--r--karbon/core/vdocument.h34
-rw-r--r--karbon/core/vfill.cc40
-rw-r--r--karbon/core/vfill.h16
-rw-r--r--karbon/core/vgradient.cc88
-rw-r--r--karbon/core/vgradient.h22
-rw-r--r--karbon/core/vgroup.cc34
-rw-r--r--karbon/core/vgroup.h18
-rw-r--r--karbon/core/vgroup_iface.cc4
-rw-r--r--karbon/core/vgroup_iface.h8
-rw-r--r--karbon/core/vimage.cc30
-rw-r--r--karbon/core/vimage.h16
-rw-r--r--karbon/core/vkarbonplugin.cc2
-rw-r--r--karbon/core/vkarbonplugin.h2
-rw-r--r--karbon/core/vlayer.cc14
-rw-r--r--karbon/core/vlayer.h12
-rw-r--r--karbon/core/vlayer_iface.cc4
-rw-r--r--karbon/core/vlayer_iface.h6
-rw-r--r--karbon/core/vobject.cc46
-rw-r--r--karbon/core/vobject.h44
-rw-r--r--karbon/core/vobject_iface.cc6
-rw-r--r--karbon/core/vobject_iface.h12
-rw-r--r--karbon/core/vpath.cc56
-rw-r--r--karbon/core/vpath.h12
-rw-r--r--karbon/core/vpattern.cc28
-rw-r--r--karbon/core/vpattern.h30
-rw-r--r--karbon/core/vsegment.cc14
-rw-r--r--karbon/core/vsegment.h10
-rw-r--r--karbon/core/vselection.cc44
-rw-r--r--karbon/core/vselection.h16
-rw-r--r--karbon/core/vstroke.cc42
-rw-r--r--karbon/core/vstroke.h18
-rw-r--r--karbon/core/vtext.cc98
-rw-r--r--karbon/core/vtext.h40
-rw-r--r--karbon/core/vtext_iface.cc6
-rw-r--r--karbon/core/vtext_iface.h4
-rw-r--r--karbon/dialogs/vcolordlg.cc4
-rw-r--r--karbon/dialogs/vcolordlg.h3
-rw-r--r--karbon/dialogs/vcolortab.cc74
-rw-r--r--karbon/dialogs/vcolortab.h11
-rw-r--r--karbon/dialogs/vconfiguredlg.cc116
-rw-r--r--karbon/dialogs/vconfiguredlg.h39
-rw-r--r--karbon/dialogs/vstrokedlg.cc64
-rw-r--r--karbon/dialogs/vstrokedlg.h15
-rw-r--r--karbon/dockers/vcolordocker.cc80
-rw-r--r--karbon/dockers/vcolordocker.h25
-rw-r--r--karbon/dockers/vdocumentdocker.cc444
-rw-r--r--karbon/dockers/vdocumentdocker.h118
-rw-r--r--karbon/dockers/vstrokedocker.cc90
-rw-r--r--karbon/dockers/vstrokedocker.h13
-rw-r--r--karbon/dockers/vstyledocker.cc78
-rw-r--r--karbon/dockers/vstyledocker.h30
-rw-r--r--karbon/dockers/vtransformdocker.cc94
-rw-r--r--karbon/dockers/vtransformdocker.h5
-rw-r--r--karbon/karbon_drag.cpp38
-rw-r--r--karbon/karbon_drag.h17
-rw-r--r--karbon/karbon_factory.cc18
-rw-r--r--karbon/karbon_factory.h9
-rw-r--r--karbon/karbon_grid_data.cpp10
-rw-r--r--karbon/karbon_grid_data.h10
-rw-r--r--karbon/karbon_part.cc144
-rw-r--r--karbon/karbon_part.h35
-rw-r--r--karbon/karbon_part_iface.cc14
-rw-r--r--karbon/karbon_part_iface.h8
-rw-r--r--karbon/karbon_resourceserver.cc118
-rw-r--r--karbon/karbon_resourceserver.h55
-rw-r--r--karbon/karbon_tool_registry.cc2
-rw-r--r--karbon/karbon_tool_registry.h4
-rw-r--r--karbon/karbon_view.cc408
-rw-r--r--karbon/karbon_view.h39
-rw-r--r--karbon/karbon_view_iface.cc4
-rw-r--r--karbon/karbon_view_iface.h4
-rw-r--r--karbon/plugins/flattenpath/flattenpathplugin.cc24
-rw-r--r--karbon/plugins/flattenpath/flattenpathplugin.h6
-rw-r--r--karbon/plugins/imagetool/imagetoolplugin.cc6
-rw-r--r--karbon/plugins/imagetool/imagetoolplugin.h5
-rw-r--r--karbon/plugins/imagetool/vimagetool.cc18
-rw-r--r--karbon/plugins/imagetool/vimagetool.h14
-rw-r--r--karbon/plugins/insertknots/insertknotsplugin.cc22
-rw-r--r--karbon/plugins/insertknots/insertknotsplugin.h6
-rw-r--r--karbon/plugins/roundcorners/roundcornersplugin.cc26
-rw-r--r--karbon/plugins/roundcorners/roundcornersplugin.h6
-rw-r--r--karbon/plugins/shadoweffect/shadoweffectplugin.cc36
-rw-r--r--karbon/plugins/shadoweffect/shadoweffectplugin.h6
-rw-r--r--karbon/plugins/shadoweffect/vshadowdecorator.cc14
-rw-r--r--karbon/plugins/shadoweffect/vshadowdecorator.h6
-rw-r--r--karbon/plugins/whirlpinch/whirlpinchplugin.cc30
-rw-r--r--karbon/plugins/whirlpinch/whirlpinchplugin.h6
-rw-r--r--karbon/plugins/zoomtool/vzoomtool.cc24
-rw-r--r--karbon/plugins/zoomtool/vzoomtool.h14
-rw-r--r--karbon/plugins/zoomtool/zoomtoolplugin.cc8
-rw-r--r--karbon/plugins/zoomtool/zoomtoolplugin.h5
-rw-r--r--karbon/render/art_rgb.c6
-rw-r--r--karbon/render/art_rgb_svp.c4
-rw-r--r--karbon/render/vkopainter.cc78
-rw-r--r--karbon/render/vkopainter.h34
-rw-r--r--karbon/render/vpainter.h36
-rw-r--r--karbon/render/vpainterfactory.cc10
-rw-r--r--karbon/render/vpainterfactory.h8
-rw-r--r--karbon/render/vqpainter.cc100
-rw-r--r--karbon/render/vqpainter.h40
-rw-r--r--karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c14
-rw-r--r--karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c30
-rw-r--r--karbon/render/xrgbrender/gdk-pixbuf-xlib.h4
-rw-r--r--karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c2
-rw-r--r--karbon/shapes/vellipse.cc64
-rw-r--r--karbon/shapes/vellipse.h12
-rw-r--r--karbon/shapes/vpolygon.cc50
-rw-r--r--karbon/shapes/vpolygon.h14
-rw-r--r--karbon/shapes/vpolyline.cc58
-rw-r--r--karbon/shapes/vpolyline.h18
-rw-r--r--karbon/shapes/vrectangle.cc50
-rw-r--r--karbon/shapes/vrectangle.h12
-rw-r--r--karbon/shapes/vsinus.cc30
-rw-r--r--karbon/shapes/vsinus.h10
-rw-r--r--karbon/shapes/vspiral.cc30
-rw-r--r--karbon/shapes/vspiral.h10
-rw-r--r--karbon/shapes/vstar.cc30
-rw-r--r--karbon/shapes/vstar.h16
-rw-r--r--karbon/tools/vcurvefit.cc30
-rw-r--r--karbon/tools/vcurvefit.h6
-rw-r--r--karbon/tools/vdefaulttools.cc10
-rw-r--r--karbon/tools/vdefaulttools.h5
-rw-r--r--karbon/tools/vellipsetool.cc32
-rw-r--r--karbon/tools/vellipsetool.h17
-rw-r--r--karbon/tools/vgradienttool.cc58
-rw-r--r--karbon/tools/vgradienttool.h9
-rw-r--r--karbon/tools/vpatterntool.cc94
-rw-r--r--karbon/tools/vpatterntool.h20
-rw-r--r--karbon/tools/vpenciltool.cc60
-rw-r--r--karbon/tools/vpenciltool.h35
-rw-r--r--karbon/tools/vpolygontool.cc34
-rw-r--r--karbon/tools/vpolygontool.h10
-rw-r--r--karbon/tools/vpolylinetool.cc46
-rw-r--r--karbon/tools/vpolylinetool.h19
-rw-r--r--karbon/tools/vrectangletool.cc24
-rw-r--r--karbon/tools/vrectangletool.h14
-rw-r--r--karbon/tools/vrotatetool.cc14
-rw-r--r--karbon/tools/vrotatetool.h4
-rw-r--r--karbon/tools/vroundrecttool.cc28
-rw-r--r--karbon/tools/vroundrecttool.h10
-rw-r--r--karbon/tools/vselectnodestool.cc64
-rw-r--r--karbon/tools/vselectnodestool.h6
-rw-r--r--karbon/tools/vselecttool.cc94
-rw-r--r--karbon/tools/vselecttool.h12
-rw-r--r--karbon/tools/vshapetool.cc34
-rw-r--r--karbon/tools/vshapetool.h10
-rw-r--r--karbon/tools/vsheartool.cc24
-rw-r--r--karbon/tools/vsheartool.h4
-rw-r--r--karbon/tools/vsinustool.cc28
-rw-r--r--karbon/tools/vsinustool.h14
-rw-r--r--karbon/tools/vspiraltool.cc36
-rw-r--r--karbon/tools/vspiraltool.h10
-rw-r--r--karbon/tools/vstartool.cc48
-rw-r--r--karbon/tools/vstartool.h15
-rw-r--r--karbon/tools/vtexttool.cc258
-rw-r--r--karbon/tools/vtexttool.h89
-rw-r--r--karbon/usablity-review.txt2
-rw-r--r--karbon/visitors/vdrawselection.cc32
-rw-r--r--karbon/visitors/vselectiondesc.h10
-rw-r--r--karbon/visitors/vselectnodes.cc10
-rw-r--r--karbon/visitors/vselectnodes.h4
-rw-r--r--karbon/visitors/vselectobjects.cc16
-rw-r--r--karbon/visitors/vtransformnodes.cc6
-rw-r--r--karbon/visitors/vtransformnodes.h6
-rw-r--r--karbon/vtool.cc60
-rw-r--r--karbon/vtool.h29
-rw-r--r--karbon/vtoolcontroller.cc16
-rw-r--r--karbon/vtoolcontroller.h14
-rw-r--r--karbon/widgets/vcanvas.cc92
-rw-r--r--karbon/widgets/vcanvas.h33
-rw-r--r--karbon/widgets/vcolorslider.cc52
-rw-r--r--karbon/widgets/vcolorslider.h25
-rw-r--r--karbon/widgets/vgradienttabwidget.cc104
-rw-r--r--karbon/widgets/vgradienttabwidget.h51
-rw-r--r--karbon/widgets/vgradientwidget.cc76
-rw-r--r--karbon/widgets/vgradientwidget.h25
-rw-r--r--karbon/widgets/vreference.cc38
-rw-r--r--karbon/widgets/vreference.h11
-rw-r--r--karbon/widgets/vruler.cc78
-rw-r--r--karbon/widgets/vruler.h35
-rw-r--r--karbon/widgets/vselecttoolbar.cc20
-rw-r--r--karbon/widgets/vselecttoolbar.h1
-rw-r--r--karbon/widgets/vsmallpreview.cc66
-rw-r--r--karbon/widgets/vsmallpreview.h21
-rw-r--r--karbon/widgets/vstatebutton.cc8
-rw-r--r--karbon/widgets/vstatebutton.h16
-rw-r--r--karbon/widgets/vstrokefillpreview.cc60
-rw-r--r--karbon/widgets/vstrokefillpreview.h27
-rw-r--r--karbon/widgets/vtoolbox.h1
-rw-r--r--karbon/widgets/vtranslate.cc64
-rw-r--r--karbon/widgets/vtranslate.h31
-rw-r--r--karbon/widgets/vtypebuttonbox.cc40
-rw-r--r--karbon/widgets/vtypebuttonbox.h7
234 files changed, 3710 insertions, 3653 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();
diff --git a/karbon/core/vclipgroup.cc b/karbon/core/vclipgroup.cc
index fb96f609..2451f321 100644
--- a/karbon/core/vclipgroup.cc
+++ b/karbon/core/vclipgroup.cc
@@ -22,7 +22,7 @@
#include <config.h>
#endif
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -32,7 +32,7 @@
#include "vsegment.h"
#include <vpainter.h>
#include "vtext.h"
-VClipGroup::VClipGroup( VObject* parent, VState state ) : VGroup( parent, state ) {}
+VClipGroup::VClipGroup( VObject* tqparent, VState state ) : VGroup( tqparent, state ) {}
VClipGroup::VClipGroup( const VClipGroup& group ) : VGroup( group ) {}
VClipGroup::~VClipGroup() { }
@@ -72,9 +72,9 @@ VClipGroup* VClipGroup::clone() const
}
-void VClipGroup::save( QDomElement& element ) const
+void VClipGroup::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "CLIP" );
+ TQDomElement me = element.ownerDocument().createElement( "CLIP" );
element.appendChild( me );
// save objects:
@@ -84,18 +84,18 @@ void VClipGroup::save( QDomElement& element ) const
itr.current()->save( me );
}
-void VClipGroup::load( const QDomElement& element )
+void VClipGroup::load( const TQDomElement& element )
{
m_objects.setAutoDelete( true );
m_objects.clear();
m_objects.setAutoDelete( false );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "COMPOSITE" || e.tagName() == "PATH" ) // TODO : remove COMPOSITE later
{
@@ -146,7 +146,7 @@ void PathRenderer::visitVSubpath( VSubpath& path )
KoPoint p2;
KoPoint p3;
- QString buffer;
+ TQString buffer;
if(segment->state() != VSegment::deleted)
{
diff --git a/karbon/core/vclipgroup.h b/karbon/core/vclipgroup.h
index 640f3b11..f53055c6 100644
--- a/karbon/core/vclipgroup.h
+++ b/karbon/core/vclipgroup.h
@@ -33,7 +33,7 @@ class VPainter;
class KARBONBASE_EXPORT VClipGroup : public VGroup
{
public:
- VClipGroup( VObject* parent, VState state = normal );
+ VClipGroup( VObject* tqparent, VState state = normal );
VClipGroup ( const VClipGroup& group );
virtual ~VClipGroup();
@@ -42,8 +42,8 @@ public:
virtual VClipGroup* clone() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
};
diff --git a/karbon/core/vcolor.cc b/karbon/core/vcolor.cc
index c82777eb..f8f237d5 100644
--- a/karbon/core/vcolor.cc
+++ b/karbon/core/vcolor.cc
@@ -19,7 +19,7 @@
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vcolor.h"
#include "vglobal.h"
@@ -47,7 +47,7 @@ VColor::VColor( const VColor& color )
m_value[3] = color.m_value[3];
}
-VColor::VColor( const QColor& color )
+VColor::VColor( const TQColor& color )
{
m_colorSpace = rgb;
m_opacity = 1.0;
@@ -57,12 +57,12 @@ VColor::VColor( const QColor& color )
m_value[2] = color.blue() / 255.0;
}
-VColor::operator QColor() const
+VColor::operator TQColor() const
{
VColor copy( *this );
copy.convertToColorSpace( rgb );
- QColor color;
+ TQColor color;
color.setRgb( int( 255 * copy[0] ), int( 255 * copy[1] ), int( 255 * copy[2] ) );
return color;
@@ -294,9 +294,9 @@ VColor::convertToColorSpace( const VColorSpace colorSpace )
}
void
-VColor::save( QDomElement& element ) const
+VColor::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "COLOR" );
+ TQDomElement me = element.ownerDocument().createElement( "COLOR" );
element.appendChild( me );
if( m_colorSpace != rgb )
@@ -318,7 +318,7 @@ VColor::save( QDomElement& element ) const
}
void
-VColor::load( const QDomElement& element )
+VColor::load( const TQDomElement& element )
{
switch( element.attribute( "colorSpace" ).toUShort() )
{
diff --git a/karbon/core/vcolor.h b/karbon/core/vcolor.h
index cf48370e..4b1534e0 100644
--- a/karbon/core/vcolor.h
+++ b/karbon/core/vcolor.h
@@ -22,10 +22,10 @@
#define __VCOLOR_H__
-#include <qcolor.h>
-#include <qstring.h>
+#include <tqcolor.h>
+#include <tqstring.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
/**
@@ -63,16 +63,16 @@ public:
VColor( const VColor& color );
/**
- * Constructs a new VColor by copying data from the specified QColor
+ * Constructs a new VColor by copying data from the specified TQColor
*
* @param color the color to copy from
*/
- VColor( const QColor& color );
+ VColor( const TQColor& color );
/**
- * Cast operator to QColor.
+ * Cast operator to TQColor.
*/
- operator QColor() const;
+ operator TQColor() const;
/**
* Index operator to access color components.
@@ -159,14 +159,14 @@ public:
*
* @param element the DOM element to which the attributes are saved
*/
- void save( QDomElement& element ) const;
+ void save( TQDomElement& element ) const;
/**
* Load this color's state from xml and initialize it accordingly.
*
* @param element the DOM element from which the attributes are read
*/
- void load( const QDomElement& element );
+ void load( const TQDomElement& element );
private:
void convertToColorSpace( const VColorSpace colorSpace );
@@ -176,7 +176,7 @@ private:
float m_value[4];
float m_opacity;
- QString m_name;
+ TQString m_name;
};
#endif
diff --git a/karbon/core/vcomposite.cc b/karbon/core/vcomposite.cc
index 8cd61311..d8eaf027 100644
--- a/karbon/core/vcomposite.cc
+++ b/karbon/core/vcomposite.cc
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
-#include <qregexp.h>
+#include <tqdom.h>
+#include <tqpainter.h>
+#include <tqwmatrix.h>
+#include <tqregexp.h>
#include <KoPoint.h>
#include <KoRect.h>
@@ -44,8 +44,8 @@
#include <kdebug.h>
-VPath::VPath( VObject* parent, VState state )
- : VObject( parent, state ), m_fillRule( winding )
+VPath::VPath( VObject* tqparent, VState state )
+ : VObject( tqparent, state ), m_fillRule( winding )
{
m_paths.setAutoDelete( true );
@@ -124,9 +124,9 @@ VPath::draw( VPainter* painter, const KoRect *rect ) const
if( !itr.current()->isEmpty() )
{
painter->newPath();
- painter->setRasterOp( Qt::XorROP );
- painter->setPen( Qt::yellow );
- painter->setBrush( Qt::NoBrush );
+ painter->setRasterOp( TQt::XorROP );
+ painter->setPen( TQt::yellow );
+ painter->setBrush( TQt::NoBrush );
VSubpathIterator jtr( *( itr.current() ) );
for( ; jtr.current(); ++jtr )
@@ -156,14 +156,14 @@ VPath::draw( VPainter* painter, const KoRect *rect ) const
}
}
- painter->setRasterOp( Qt::CopyROP );
- painter->setPen( Qt::NoPen );
+ painter->setRasterOp( TQt::CopyROP );
+ painter->setPen( TQt::NoPen );
painter->setBrush( *fill() );
painter->fillPath();
// draw stroke:
painter->setPen( *stroke() );
- painter->setBrush( Qt::NoBrush );
+ painter->setBrush( TQt::NoBrush );
painter->strokePath();
}
@@ -264,7 +264,7 @@ bool
VPath::pointIsInside( const KoPoint& p ) const
{
// Check if point is inside boundingbox.
- if( !boundingBox().contains( p ) )
+ if( !boundingBox().tqcontains( p ) )
return false;
@@ -340,16 +340,16 @@ VPath::clone() const
}
void
-VPath::save( QDomElement& element ) const
+VPath::save( TQDomElement& element ) const
{
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "PATH" );
+ TQDomElement me = element.ownerDocument().createElement( "PATH" );
element.appendChild( me );
VObject::save( me );
- QString d;
+ TQString d;
saveSvgPath( d );
me.setAttribute( "d", d );
@@ -368,7 +368,7 @@ VPath::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyle
{
docWriter->startElement( "draw:path" );
- QString d;
+ TQString d;
saveSvgPath( d );
docWriter->addAttribute( "svg:d", d );
@@ -377,7 +377,7 @@ VPath::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyle
double w = boundingBox().width();
double h = boundingBox().height();
- docWriter->addAttribute( "svg:viewBox", QString( "%1 %2 %3 %4" ).arg( x ).arg( y ).arg( w ).arg( h ) );
+ docWriter->addAttribute( "svg:viewBox", TQString( "%1 %2 %3 %4" ).tqarg( x ).tqarg( y ).tqarg( w ).tqarg( h ) );
docWriter->addAttributePt( "svg:x", x );
docWriter->addAttributePt( "svg:y", y );
docWriter->addAttributePt( "svg:width", w );
@@ -385,11 +385,11 @@ VPath::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyle
VObject::saveOasis( store, docWriter, mainStyles, index );
- QWMatrix tmpMat;
+ TQWMatrix tmpMat;
tmpMat.scale( 1, -1 );
tmpMat.translate( 0, -document()->height() );
- QString transform = buildOasisTransform( tmpMat );
+ TQString transform = buildOasisTransform( tmpMat );
if( !transform.isEmpty() )
docWriter->addAttribute( "draw:transform", transform );
@@ -402,7 +402,7 @@ VPath::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto ) co
{
if( m_fill )
{
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -document()->height() );
@@ -417,19 +417,19 @@ VPath::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto ) co
}
void
-VPath::transformByViewbox( const QDomElement &element, QString viewbox )
+VPath::transformByViewbox( const TQDomElement &element, TQString viewbox )
{
if( ! viewbox.isEmpty() )
{
// allow for viewbox def with ',' or whitespace
- QStringList points = QStringList::split( ' ', viewbox.replace( ',', ' ' ).simplifyWhiteSpace() );
+ TQStringList points = TQStringList::split( ' ', viewbox.tqreplace( ',', ' ' ).simplifyWhiteSpace() );
- double w = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ) );
- double h = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ) );
- double x = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) );
- double y = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) );
+ double w = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ) );
+ double h = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ) );
+ double x = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) );
+ double y = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) );
- QWMatrix mat;
+ TQWMatrix mat;
mat.translate( x-KoUnit::parseValue( points[0] ), y-KoUnit::parseValue( points[1] ) );
mat.scale( w / KoUnit::parseValue( points[2] ) , h / KoUnit::parseValue( points[3] ) );
VTransformCmd cmd( 0L, mat );
@@ -438,42 +438,42 @@ VPath::transformByViewbox( const QDomElement &element, QString viewbox )
}
bool
-VPath::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VPath::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
setState( normal );
- QString viewbox;
+ TQString viewbox;
if( element.localName() == "path" )
{
- QString data = element.attributeNS( KoXmlNS::svg, "d", QString::null );
+ TQString data = element.attributeNS( KoXmlNS::svg, "d", TQString() );
if( data.length() > 0 )
{
loadSvgPath( data );
}
- m_fillRule = element.attributeNS( KoXmlNS::svg, "fill-rule", QString::null ) == "winding" ? winding : evenOdd;
+ m_fillRule = element.attributeNS( KoXmlNS::svg, "fill-rule", TQString() ) == "winding" ? winding : evenOdd;
- viewbox = element.attributeNS( KoXmlNS::svg, "viewBox", QString::null );
+ viewbox = element.attributeNS( KoXmlNS::svg, "viewBox", TQString() );
}
- else if( element.localName() == "custom-shape" )
+ else if( element.localName() == "custom-tqshape" )
{
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.namespaceURI() != KoXmlNS::draw )
continue;
- if( e.localName() == "enhanced-geometry" )
+ if( e.localName() == "enhanced-tqgeometry" )
{
- QString data = e.attributeNS( KoXmlNS::draw, "enhanced-path", QString::null );
+ TQString data = e.attributeNS( KoXmlNS::draw, "enhanced-path", TQString() );
if( ! data.isEmpty() )
loadSvgPath( data );
- viewbox = e.attributeNS( KoXmlNS::svg, "viewBox", QString::null );
+ viewbox = e.attributeNS( KoXmlNS::svg, "viewBox", TQString() );
}
}
}
@@ -481,7 +481,7 @@ VPath::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
transformByViewbox( element, viewbox );
- QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null );
+ TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() );
if( !trafo.isEmpty() )
transformOasis( trafo );
@@ -489,24 +489,24 @@ VPath::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
}
void
-VPath::load( const QDomElement& element )
+VPath::load( const TQDomElement& element )
{
setState( normal );
VObject::load( element );
- QString data = element.attribute( "d" );
+ TQString data = element.attribute( "d" );
if( data.length() > 0 )
{
loadSvgPath( data );
}
m_fillRule = element.attribute( "fillRule" ) == 0 ? evenOdd : winding;
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement child = list.item( i ).toElement();
+ TQDomElement child = list.item( i ).toElement();
if( child.tagName() == "PATH" )
{
@@ -522,21 +522,21 @@ VPath::load( const QDomElement& element )
}
}
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
void
-VPath::loadSvgPath( const QString &d )
+VPath::loadSvgPath( const TQString &d )
{
- //QTime s;s.start();
+ //TQTime s;s.start();
parseSVG( d, true );
//kdDebug(38000) << "Parsing time : " << s.elapsed() << endl;
}
void
-VPath::saveSvgPath( QString &d ) const
+VPath::saveSvgPath( TQString &d ) const
{
// save paths to svg:
VSubpathListIterator itr( m_paths );
@@ -578,36 +578,36 @@ VPath::accept( VVisitor& visitor )
}
void
-VPath::transform( const QString &transform )
+VPath::transform( const TQString &transform )
{
VTransformCmd cmd( 0L, parseTransform( transform ) );
cmd.visitVPath( *this );
}
void
-VPath::transformOasis( const QString &transform )
+VPath::transformOasis( const TQString &transform )
{
VTransformCmd cmd( 0L, parseOasisTransform( transform ) );
cmd.visitVPath( *this );
}
-QWMatrix
-VPath::parseTransform( const QString &transform )
+TQWMatrix
+VPath::parseTransform( const TQString &transform )
{
- QWMatrix result;
+ TQWMatrix result;
// Split string for handling 1 transform statement at a time
- QStringList subtransforms = QStringList::split(')', transform);
- QStringList::ConstIterator it = subtransforms.begin();
- QStringList::ConstIterator end = subtransforms.end();
+ TQStringList subtransforms = TQStringList::split(')', transform);
+ TQStringList::ConstIterator it = subtransforms.begin();
+ TQStringList::ConstIterator end = subtransforms.end();
for(; it != end; ++it)
{
- QStringList subtransform = QStringList::split('(', (*it));
+ TQStringList subtransform = TQStringList::split('(', (*it));
subtransform[0] = subtransform[0].stripWhiteSpace().lower();
subtransform[1] = subtransform[1].simplifyWhiteSpace();
- QRegExp reg("[,( ]");
- QStringList params = QStringList::split(reg, subtransform[1]);
+ TQRegExp reg("[,( ]");
+ TQStringList params = TQStringList::split(reg, subtransform[1]);
if(subtransform[0].startsWith(";") || subtransform[0].startsWith(","))
subtransform[0] = subtransform[0].right(subtransform[0].length() - 1);
@@ -656,23 +656,23 @@ VPath::parseTransform( const QString &transform )
return result;
}
-QWMatrix
-VPath::parseOasisTransform( const QString &transform )
+TQWMatrix
+VPath::parseOasisTransform( const TQString &transform )
{
- QWMatrix result;
+ TQWMatrix result;
// Split string for handling 1 transform statement at a time
- QStringList subtransforms = QStringList::split(')', transform);
- QStringList::ConstIterator it = subtransforms.begin();
- QStringList::ConstIterator end = subtransforms.end();
+ TQStringList subtransforms = TQStringList::split(')', transform);
+ TQStringList::ConstIterator it = subtransforms.begin();
+ TQStringList::ConstIterator end = subtransforms.end();
for(; it != end; ++it)
{
- QStringList subtransform = QStringList::split('(', (*it));
+ TQStringList subtransform = TQStringList::split('(', (*it));
subtransform[0] = subtransform[0].stripWhiteSpace().lower();
subtransform[1] = subtransform[1].simplifyWhiteSpace();
- QRegExp reg("[,( ]");
- QStringList params = QStringList::split(reg, subtransform[1]);
+ TQRegExp reg("[,( ]");
+ TQStringList params = TQStringList::split(reg, subtransform[1]);
if(subtransform[0].startsWith(";") || subtransform[0].startsWith(","))
subtransform[0] = subtransform[0].right(subtransform[0].length() - 1);
@@ -730,46 +730,46 @@ VPath::parseOasisTransform( const QString &transform )
return result;
}
-QString
+TQString
VPath::buildSvgTransform() const
{
return buildSvgTransform( m_matrix );
}
-QString
-VPath::buildSvgTransform( const QWMatrix &mat ) const
+TQString
+VPath::buildSvgTransform( const TQWMatrix &mat ) const
{
- QString transform;
+ TQString transform;
if( !mat.isIdentity() )
{
- transform = QString( "matrix(%1, %2, %3, %4, %5, %6)" ).arg( mat.m11() )
- .arg( mat.m12() )
- .arg( mat.m21() )
- .arg( mat.m22() )
- .arg( mat.dx() )
- .arg( mat.dy() );
+ transform = TQString( "matrix(%1, %2, %3, %4, %5, %6)" ).tqarg( mat.m11() )
+ .tqarg( mat.m12() )
+ .tqarg( mat.m21() )
+ .tqarg( mat.m22() )
+ .tqarg( mat.dx() )
+ .tqarg( mat.dy() );
}
return transform;
}
-QString
+TQString
VPath::buildOasisTransform() const
{
return buildSvgTransform( m_matrix );
}
-QString
-VPath::buildOasisTransform( const QWMatrix &mat ) const
+TQString
+VPath::buildOasisTransform( const TQWMatrix &mat ) const
{
- QString transform;
+ TQString transform;
if( !mat.isIdentity() )
{
- transform = QString( "matrix(%1, %2, %3, %4, %5pt, %6pt)" ).arg( mat.m11() )
- .arg( mat.m12() )
- .arg( mat.m21() )
- .arg( mat.m22() )
- .arg( mat.dx() )
- .arg( mat.dy() );
+ transform = TQString( "matrix(%1, %2, %3, %4, %5pt, %6pt)" ).tqarg( mat.m11() )
+ .tqarg( mat.m12() )
+ .tqarg( mat.m21() )
+ .tqarg( mat.m22() )
+ .tqarg( mat.dx() )
+ .tqarg( mat.dy() );
}
return transform;
}
diff --git a/karbon/core/vcomposite.h b/karbon/core/vcomposite.h
index e786294b..bcac57dd 100644
--- a/karbon/core/vcomposite.h
+++ b/karbon/core/vcomposite.h
@@ -21,7 +21,7 @@
#define __VCOMPOSITE_H__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <KoPoint.h>
@@ -30,14 +30,14 @@
#include "vfillrule.h"
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class VPainter;
class VSegment;
class VVisitor;
class VSubpath;
-typedef QPtrList<VSubpath> VSubpathList;
-typedef QPtrListIterator<VSubpath> VSubpathListIterator;
+typedef TQPtrList<VSubpath> VSubpathList;
+typedef TQPtrListIterator<VSubpath> VSubpathListIterator;
/**
@@ -47,7 +47,7 @@ typedef QPtrListIterator<VSubpath> VSubpathListIterator;
class KARBONBASE_EXPORT VPath : public VObject, SVGPathParser
{
public:
- VPath( VObject* parent, VState state = normal );
+ VPath( VObject* tqparent, VState state = normal );
VPath( const VPath& path );
virtual ~VPath();
@@ -187,36 +187,36 @@ public:
}
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VPath* clone() const;
virtual void accept( VVisitor& visitor );
- void transform( const QString &transform );
- void transformOasis( const QString &transform );
+ void transform( const TQString &transform );
+ void transformOasis( const TQString &transform );
- static QWMatrix parseTransform( const QString &transform );
+ static TQWMatrix parseTransform( const TQString &transform );
- void transform( const QWMatrix &mat )
+ void transform( const TQWMatrix &mat )
{
m_matrix *= mat;
}
- void loadSvgPath( const QString & );
- void saveSvgPath( QString & ) const;
+ void loadSvgPath( const TQString & );
+ void saveSvgPath( TQString & ) const;
protected:
- QString buildSvgTransform() const;
- QString buildSvgTransform( const QWMatrix &mat ) const;
- QString buildOasisTransform() const;
- QString buildOasisTransform( const QWMatrix &mat ) const;
+ TQString buildSvgTransform() const;
+ TQString buildSvgTransform( const TQWMatrix &mat ) const;
+ TQString buildOasisTransform() const;
+ TQString buildOasisTransform( const TQWMatrix &mat ) const;
- void transformByViewbox( const QDomElement &element, QString viewbox );
+ void transformByViewbox( const TQDomElement &element, TQString viewbox );
/// For svg path data parsing.
virtual void svgMoveTo( double x1, double y1, bool abs = true );
@@ -225,10 +225,10 @@ protected:
virtual void svgClosePath();
virtual void saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesojectauto ) const;
- QWMatrix parseOasisTransform( const QString &transform );
+ TQWMatrix parseOasisTransform( const TQString &transform );
protected:
- QWMatrix m_matrix;
+ TQWMatrix m_matrix;
private:
/**
diff --git a/karbon/core/vcursor.cc b/karbon/core/vcursor.cc
index ed9d1f8d..a44004f2 100644
--- a/karbon/core/vcursor.cc
+++ b/karbon/core/vcursor.cc
@@ -18,7 +18,7 @@
*/
#include "vcursor.h"
-#include <qbitmap.h>
+#include <tqbitmap.h>
static const char* const cminus[] = {
"16 16 6 1",
@@ -72,7 +72,7 @@ static const char* const cplus[] = {
"OOOOOOOOOOOOO O"
};
-QCursor VCursor::createCursor( CursorType type )
+TQCursor VCursor::createCursor( CursorType type )
{
switch( type )
{
@@ -80,69 +80,69 @@ QCursor VCursor::createCursor( CursorType type )
return crossHair();
break;
case ZoomPlus:
- return QCursor( QPixmap( ( const char**) cplus ), -1, -1 );
+ return TQCursor( TQPixmap( ( const char**) cplus ), -1, -1 );
break;
case ZoomMinus:
- return QCursor( QPixmap( ( const char**) cminus ), -1, -1 );
+ return TQCursor( TQPixmap( ( const char**) cminus ), -1, -1 );
break;
case NeedleArrow:
return needleArrow();
break;
- default: return QCursor( Qt::arrowCursor );
+ default: return TQCursor( TQt::arrowCursor );
}
}
-QCursor VCursor::createCursor( const char * bitmap[], const char * mask[], int hotX, int hotY )
+TQCursor VCursor::createCursor( const char * bitmap[], const char * tqmask[], int hotX, int hotY )
{
- // the cursor bitmap and mask
- QBitmap b, m;
+ // the cursor bitmap and tqmask
+ TQBitmap b, m;
- b = QPixmap( (const char**) bitmap );
- m = QPixmap( (const char**) mask );
+ b = TQPixmap( (const char**) bitmap );
+ m = TQPixmap( (const char**) tqmask );
- return QCursor( b, m, hotX, hotY );
+ return TQCursor( b, m, hotX, hotY );
}
-QCursor VCursor::crossHair()
+TQCursor VCursor::crossHair()
{
static unsigned char cross_bits[] = {
0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0xff, 0x7f, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
0x80, 0x00, 0x80, 0x00, 0x80, 0x00};
- QBitmap b = QBitmap( 15, 15, cross_bits, true );
- QBitmap m = b.createHeuristicMask( false );
+ TQBitmap b = TQBitmap( 15, 15, cross_bits, true );
+ TQBitmap m = b.createHeuristicMask( false );
- return QCursor( b, m, 7, 7 );
+ return TQCursor( b, m, 7, 7 );
}
-QCursor VCursor::needleArrow()
+TQCursor VCursor::needleArrow()
{
static unsigned char needle_bits[] = {
0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x01,
0x80, 0x03, 0x80, 0x07, 0x00, 0x0f, 0x00, 0x1f, 0x00, 0x3e, 0x00, 0x7e,
0x00, 0x7c, 0x00, 0x1c, 0x00, 0x18, 0x00, 0x00};
- QBitmap b = QBitmap( 16, 16, needle_bits, true );
- QBitmap m = b.createHeuristicMask( false );
+ TQBitmap b = TQBitmap( 16, 16, needle_bits, true );
+ TQBitmap m = b.createHeuristicMask( false );
- return QCursor( b, m, 2, 0 );
+ return TQCursor( b, m, 2, 0 );
}
-QCursor VCursor::needleMoveArrow()
+TQCursor VCursor::needleMoveArrow()
{
static unsigned char needle_move_bits[] = {
0x00, 0x00, 0x10, 0x00, 0x20, 0x00, 0x60, 0x00, 0xc0, 0x00, 0xc0, 0x01,
0x80, 0x03, 0x80, 0x07, 0x10, 0x0f, 0x38, 0x1f, 0x54, 0x3e, 0xfe, 0x7e,
0x54, 0x7c, 0x38, 0x1c, 0x10, 0x18, 0x00, 0x00};
- QBitmap b = QBitmap( 16, 16, needle_move_bits, true );
- QBitmap m = b.createHeuristicMask( false );
+ TQBitmap b = TQBitmap( 16, 16, needle_move_bits, true );
+ TQBitmap m = b.createHeuristicMask( false );
- return QCursor( b, m, 2, 0 );
+ return TQCursor( b, m, 2, 0 );
}
-QCursor VCursor::horzMove()
+TQCursor VCursor::horzMove()
{
/*
#define horzMove_width 15
@@ -159,8 +159,8 @@ QCursor VCursor::horzMove()
0x0c, 0x18, 0xfe, 0x3f, 0x0c, 0x18, 0x08, 0x08, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
- QBitmap b = QBitmap( 15, 15, horzMove_bits, true );
- QBitmap m = b.createHeuristicMask( false );
+ TQBitmap b = TQBitmap( 15, 15, horzMove_bits, true );
+ TQBitmap m = b.createHeuristicMask( false );
- return QCursor( b, m, 7, 7 );
+ return TQCursor( b, m, 7, 7 );
}
diff --git a/karbon/core/vcursor.h b/karbon/core/vcursor.h
index 84c89648..90ab1673 100644
--- a/karbon/core/vcursor.h
+++ b/karbon/core/vcursor.h
@@ -20,14 +20,14 @@
#ifndef __VCURSOR_H__
#define __VCURSOR_H__
-#include <qcursor.h>
+#include <tqcursor.h>
#include <koffice_export.h>
/**
* A helper class for easily creating cursors from XPMs.
*
* One can create a predefined unthemed cursor or create a cursor from two given XMPs,
-* the cursor bitmap and the cursor mask.
+* the cursor bitmap and the cursor tqmask.
*/
class KARBONBASE_EXPORT VCursor
{
@@ -47,24 +47,24 @@ public:
* @param type the requested cursor id
* @return the predefined cursor
*/
- static QCursor createCursor( CursorType type );
+ static TQCursor createCursor( CursorType type );
/**
* Creates a cursor from two specified XPM images.
- * This is only a wrapper function for a QCursor ctor.
+ * This is only a wrapper function for a TQCursor ctor.
*/
- static QCursor createCursor( const char * bitmap[], const char * mask[], int hotX = -1, int hotY = -1 );
+ static TQCursor createCursor( const char * bitmap[], const char * tqmask[], int hotX = -1, int hotY = -1 );
/** crosshair cursor */
- static QCursor crossHair();
+ static TQCursor crossHair();
/** needle arraow cursor */
- static QCursor needleArrow();
+ static TQCursor needleArrow();
/** needle arrow with four way arrow */
- static QCursor needleMoveArrow();
+ static TQCursor needleMoveArrow();
- static QCursor horzMove();
+ static TQCursor horzMove();
private:
// prevent instantiation
diff --git a/karbon/core/vdashpattern.cc b/karbon/core/vdashpattern.cc
index e758e824..cc167584 100644
--- a/karbon/core/vdashpattern.cc
+++ b/karbon/core/vdashpattern.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vdashpattern.h"
@@ -27,19 +27,19 @@ VDashPattern::VDashPattern( double offset )
}
void
-VDashPattern::save( QDomElement& element ) const
+VDashPattern::save( TQDomElement& element ) const
{
if( m_array.size() != 0 )
{
- QDomElement me = element.ownerDocument().createElement( "DASHPATTERN" );
+ TQDomElement me = element.ownerDocument().createElement( "DASHPATTERN" );
element.appendChild( me );
if( m_offset != 0.0 )
me.setAttribute( "offset", m_offset );
- QDomElement dash;
+ TQDomElement dash;
- QValueListConstIterator<float> itr;
+ TQValueListConstIterator<float> itr;
for( itr = m_array.begin(); itr != m_array.end(); ++itr )
{
dash = element.ownerDocument().createElement( "DASH" );
@@ -50,18 +50,18 @@ VDashPattern::save( QDomElement& element ) const
}
void
-VDashPattern::load( const QDomElement& element )
+VDashPattern::load( const TQDomElement& element )
{
m_offset = element.attribute( "offset", "0.0" ).toDouble();
float value;
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "DASH" )
{
value = e.attribute( "l", "0.0" ).toFloat();
diff --git a/karbon/core/vdashpattern.h b/karbon/core/vdashpattern.h
index 1abf4e41..9dd3af1d 100644
--- a/karbon/core/vdashpattern.h
+++ b/karbon/core/vdashpattern.h
@@ -20,10 +20,10 @@
#ifndef __VDASHPATTERN_H__
#define __VDASHPATTERN_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
/**
@@ -42,19 +42,19 @@ class KARBONBASE_EXPORT VDashPattern
public:
VDashPattern( double dashOffset = 0.0 );
- const QValueList<float>& array() const { return m_array; }
- void setArray( const QValueList<float>& array )
+ const TQValueList<float>& array() const { return m_array; }
+ void setArray( const TQValueList<float>& array )
{ m_array = array; }
// dash offset:
float offset() const { return m_offset; }
void setOffset( float offset ) { m_offset = offset; }
- void save( QDomElement& element ) const;
- void load( const QDomElement& element );
+ void save( TQDomElement& element ) const;
+ void load( const TQDomElement& element );
private:
- QValueList<float> m_array;
+ TQValueList<float> m_array;
float m_offset;
};
diff --git a/karbon/core/vdocument.cc b/karbon/core/vdocument.cc
index d87ad368..0384141b 100644
--- a/karbon/core/vdocument.cc
+++ b/karbon/core/vdocument.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vdocument.h"
#include "vselection.h"
@@ -65,12 +65,12 @@ VDocument::~VDocument()
void
VDocument::drawPage( VPainter *p, const KoPageLayout &pl, bool showPageMargins ) const
{
- p->setPen( Qt::black );
- p->setBrush( Qt::white );
+ p->setPen( TQt::black );
+ p->setBrush( TQt::white );
p->drawRect( 0, 0, m_width, m_height );
- p->setPen( Qt::NoPen );
- p->setBrush( Qt::black );
+ p->setPen( TQt::NoPen );
+ p->setBrush( TQt::black );
p->drawRect( m_width, - 2, 2, m_height );
p->drawRect( 0, - 2, m_width, 2 );
//p->drawRect( 0, m_height - 1, m_width, 1 );
@@ -82,7 +82,7 @@ VDocument::drawPage( VPainter *p, const KoPageLayout &pl, bool showPageMargins )
double dx = m_gridData.freq.width();
double dy = m_gridData.freq.height();
p->setPen( s );
- p->setBrush( Qt::NoBrush );
+ p->setBrush( TQt::NoBrush );
KoPoint p0( dx, dy );
while( p0.x() < m_width )
{
@@ -112,11 +112,11 @@ VDocument::drawPage( VPainter *p, const KoPageLayout &pl, bool showPageMargins )
int mb = int( pl.ptBottom );
VStroke s( 0, 1 );
- s.setColor( Qt::blue );
- QValueList<float> dashes;
+ s.setColor( TQt::blue );
+ TQValueList<float> dashes;
s.dashPattern().setArray( dashes << 5 << 5 );
p->setPen( s );
- p->setBrush( Qt::NoBrush );
+ p->setBrush( TQt::NoBrush );
p->drawRect(ml, mt, m_width-ml-mr, m_height-mt-mb);
}
}
@@ -124,7 +124,7 @@ VDocument::drawPage( VPainter *p, const KoPageLayout &pl, bool showPageMargins )
void
VDocument::draw( VPainter *painter, const KoRect* rect ) const
{
- QPtrListIterator<VLayer> itr = m_layers;
+ TQPtrListIterator<VLayer> itr = m_layers;
for ( ; itr.current(); ++itr )
{
@@ -151,20 +151,20 @@ VDocument::removeLayer( VLayer* layer )
bool VDocument::canRaiseLayer( VLayer* layer )
{
- int pos = m_layers.find( layer );
+ int pos = m_layers.tqfind( layer );
return (pos != int( m_layers.count() ) - 1 && pos >= 0 );
}
bool VDocument::canLowerLayer( VLayer* layer )
{
- int pos = m_layers.find( layer );
+ int pos = m_layers.tqfind( layer );
return (pos>0);
}
void
VDocument::raiseLayer( VLayer* layer )
{
- int pos = m_layers.find( layer );
+ int pos = m_layers.tqfind( layer );
if( pos != int( m_layers.count() ) - 1 && pos >= 0 )
{
VLayer* layer = m_layers.take( pos );
@@ -175,7 +175,7 @@ VDocument::raiseLayer( VLayer* layer )
void
VDocument::lowerLayer( VLayer* layer )
{
- int pos = m_layers.find( layer );
+ int pos = m_layers.tqfind( layer );
if ( pos > 0 )
{
VLayer* layer = m_layers.take( pos );
@@ -186,13 +186,13 @@ VDocument::lowerLayer( VLayer* layer )
int
VDocument::layerPos( VLayer* layer )
{
- return m_layers.find( layer );
+ return m_layers.tqfind( layer );
} // VDocument::layerPos
void
VDocument::setActiveLayer( VLayer* layer )
{
- if ( m_layers.find( layer ) != -1 )
+ if ( m_layers.tqfind( layer ) != -1 )
m_activeLayer = layer;
} // VDocument::setActiveLayer
@@ -202,11 +202,11 @@ VDocument::append( VObject* object )
m_activeLayer->append( object );
}
-QDomDocument
+TQDomDocument
VDocument::saveXML() const
{
- QDomDocument doc;
- QDomElement me = doc.createElement( "DOC" );
+ TQDomDocument doc;
+ TQDomElement me = doc.createElement( "DOC" );
doc.appendChild( me );
save( me );
return doc;
@@ -231,7 +231,7 @@ VDocument::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainS
}
void
-VDocument::save( QDomElement& me ) const
+VDocument::save( TQDomElement& me ) const
{
me.setAttribute( "mime", "application/x-karbon" ),
me.setAttribute( "version", "0.1" );
@@ -258,13 +258,13 @@ VDocument::clone() const
}
void
-VDocument::load( const QDomElement& doc )
+VDocument::load( const TQDomElement& doc )
{
loadXML( doc );
}
bool
-VDocument::loadXML( const QDomElement& doc )
+VDocument::loadXML( const TQDomElement& doc )
{
if( doc.attribute( "mime" ) != "application/x-karbon" ||
doc.attribute( "syntaxVersion" ) != "0.1" )
@@ -284,14 +284,14 @@ VDocument::loadXML( const QDomElement& doc )
}
void
-VDocument::loadDocumentContent( const QDomElement& doc )
+VDocument::loadDocumentContent( const TQDomElement& doc )
{
- QDomNodeList list = doc.childNodes();
+ TQDomNodeList list = doc.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "LAYER" )
{
@@ -304,7 +304,7 @@ VDocument::loadDocumentContent( const QDomElement& doc )
}
bool
-VDocument::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VDocument::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
return m_layers.current()->loadOasis( element, context );
}
@@ -315,9 +315,9 @@ VDocument::accept( VVisitor& visitor )
visitor.visitVDocument( *this );
}
-QString
+TQString
VDocument::objectName( const VObject *obj ) const
{
- QMap<const VObject *, QString>::ConstIterator it = m_objectNames.find( obj );
+ TQMap<const VObject *, TQString>::ConstIterator it = m_objectNames.tqfind( obj );
return it == m_objectNames.end() ? 0L : it.data();
}
diff --git a/karbon/core/vdocument.h b/karbon/core/vdocument.h
index 577dd1c2..45270d2e 100644
--- a/karbon/core/vdocument.h
+++ b/karbon/core/vdocument.h
@@ -23,23 +23,23 @@
#include <KoUnit.h>
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qptrdict.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqptrdict.h>
#include "vobject.h"
#include "karbon_grid_data.h"
#include <koffice_export.h>
-class QDomDocument;
-class QDomElement;
+class TQDomDocument;
+class TQDomElement;
class VSelection;
class VLayer;
class KoPageLayout;
-typedef QPtrList<VLayer> VLayerList;
-typedef QPtrListIterator<VLayer> VLayerListIterator;
+typedef TQPtrList<VLayer> VLayerList;
+typedef TQPtrListIterator<VLayer> VLayerListIterator;
/**
@@ -83,7 +83,7 @@ public:
* Draw the document frame to a painting device.
*
* @param painter abstraction that is used to render to a painting device.
- * @param pl layout describing the page to draw on (restricting the painter)
+ * @param pl tqlayout describing the page to draw on (restricting the painter)
* @param drawPageMargins if @c true, also draw the crop marks for the page margins,
* otherwise, don't draw them.
*/
@@ -216,14 +216,14 @@ public:
*/
const VLayerList& layers() const { return m_layers; }
- QDomDocument saveXML() const;
+ TQDomDocument saveXML() const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles ) const;
enum { STYLE_GRAPHICAUTO = 20, STYLE_LINEAR_GRADIENT, STYLE_RADIAL_GRADIENT, STYLE_STROKE };
- bool loadXML( const QDomElement& doc );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
- void loadDocumentContent( const QDomElement& doc );
+ bool loadXML( const TQDomElement& doc );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
+ void loadDocumentContent( const TQDomElement& doc );
virtual VDocument* clone() const;
@@ -265,7 +265,7 @@ public:
* @param obj the object to retrieve name for
* @return the custom name of the object or an empty string if no custom name is set
*/
- QString objectName( const VObject *obj ) const;
+ TQString objectName( const VObject *obj ) const;
/**
* Sets custom name of specified object.
@@ -276,7 +276,7 @@ public:
* @param obj the object to set custom name for
* @param name the the custom name to set
*/
- void setObjectName( const VObject *obj, const QString name ) { m_objectNames.insert( obj, name ); }
+ void setObjectName( const VObject *obj, const TQString name ) { m_objectNames.insert( obj, name ); }
bool saveAsPath() const { return m_saveAsPath; }
void saveAsPath( bool b ) { m_saveAsPath = b; }
@@ -315,7 +315,7 @@ private:
*/
KoUnit::Unit m_unit;
- QMap<const VObject *, QString> m_objectNames;
+ TQMap<const VObject *, TQString> m_objectNames;
// TODO this flag is used nowhere, can we remove it?
bool m_saveAsPath;
diff --git a/karbon/core/vfill.cc b/karbon/core/vfill.cc
index 44f69f75..549045ae 100644
--- a/karbon/core/vfill.cc
+++ b/karbon/core/vfill.cc
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <KoGenStyles.h>
@@ -31,8 +31,8 @@
VFill::VFill()
: m_type( none )
{
- /*m_gradient.addStop( VColor( Qt::red.rgb() ), 0.0 );
- m_gradient.addStop( VColor( Qt::yellow.rgb() ), 1.0 );
+ /*m_gradient.addStop( VColor( TQt::red.rgb() ), 0.0 );
+ m_gradient.addStop( VColor( TQt::yellow.rgb() ), 1.0 );
m_gradient.setOrigin( KoPoint( 0, 0 ) );
m_gradient.setVector( KoPoint( 0, 50 ) );
m_gradient.setSpreadMethod( gradient_spread_reflect );*/
@@ -48,14 +48,14 @@ VFill::VFill( const VColor &c )
VFill::VFill( const VFill& fill )
{
- // doesn't copy parent:
+ // doesn't copy tqparent:
*this = fill;
}
void
-VFill::save( QDomElement& element ) const
+VFill::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "FILL" );
+ TQDomElement me = element.ownerDocument().createElement( "FILL" );
element.appendChild( me );
if( !( m_type == none ) )
@@ -81,17 +81,17 @@ VFill::saveOasis( KoGenStyles &mainStyles, KoGenStyle &style ) const
if( m_type == solid )
{
style.addProperty( "draw:fill", "solid" );
- style.addProperty( "draw:fill-color", QColor( m_color ).name() );
+ style.addProperty( "draw:fill-color", TQColor( m_color ).name() );
if( m_color.opacity() < 1 )
- style.addProperty( "draw:opacity", QString( "%1%" ).arg( m_color.opacity() * 100. ) );
+ style.addProperty( "draw:opacity", TQString( "%1%" ).tqarg( m_color.opacity() * 100. ) );
}
else if( m_type == grad )
{
style.addProperty( "draw:fill", "gradient" );
- QString grad = m_gradient.saveOasis( mainStyles );
+ TQString grad = m_gradient.saveOasis( mainStyles );
style.addProperty( "draw:fill-gradient-name", grad );
if( m_color.opacity() < 1 )
- style.addProperty( "draw:opacity", QString( "%1%" ).arg( m_color.opacity() * 100. ) );
+ style.addProperty( "draw:opacity", TQString( "%1%" ).tqarg( m_color.opacity() * 100. ) );
}
else if( m_type == patt )
style.addProperty( "draw:fill", "hatch" );
@@ -100,7 +100,7 @@ VFill::saveOasis( KoGenStyles &mainStyles, KoGenStyle &style ) const
}
void
-VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context, VObject* parent )
+VFill::loadOasis( const TQDomElement &/*object*/, KoOasisLoadingContext &context, VObject* tqparent )
{
KoStyleStack &stack = context.styleStack();
if( stack.hasAttributeNS( KoXmlNS::draw, "fill" ) )
@@ -108,17 +108,17 @@ VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context,
if( stack.attributeNS( KoXmlNS::draw, "fill" ) == "solid" )
{
setType( VFill::solid );
- setColor( QColor( stack.attributeNS( KoXmlNS::draw, "fill-color" ) ) );
+ setColor( TQColor( stack.attributeNS( KoXmlNS::draw, "fill-color" ) ) );
}
else if( stack.attributeNS( KoXmlNS::draw, "fill" ) == "gradient" )
{
setType( VFill::grad );
- QString style = stack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
+ TQString style = stack.attributeNS( KoXmlNS::draw, "fill-gradient-name" );
kdDebug()<<" style gradient name :"<<style<<endl;
- QDomElement *grad = context.oasisStyles().drawStyles()[ style ];
+ TQDomElement *grad = context.oasisStyles().drawStyles()[ style ];
kdDebug()<<" style gradient name :"<< grad <<endl;
if( grad )
- m_gradient.loadOasis( *grad, stack, parent );
+ m_gradient.loadOasis( *grad, stack, tqparent );
}
if( stack.hasAttributeNS( KoXmlNS::draw, "opacity" ) )
m_color.setOpacity( stack.attributeNS( KoXmlNS::draw, "opacity" ).remove( '%' ).toFloat() / 100. );
@@ -126,17 +126,17 @@ VFill::loadOasis( const QDomElement &/*object*/, KoOasisLoadingContext &context,
}
void
-VFill::load( const QDomElement& element )
+VFill::load( const TQDomElement& element )
{
m_type = none;
// load color:
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "COLOR" )
{
m_type = solid;
@@ -161,7 +161,7 @@ VFill::operator=( const VFill& fill )
{
if( this != &fill )
{
- // dont copy the parent!
+ // dont copy the tqparent!
m_type = fill.m_type;
m_color = fill.m_color;
m_gradient = fill.m_gradient;
@@ -172,7 +172,7 @@ VFill::operator=( const VFill& fill )
}
void
-VFill::transform( const QWMatrix& m )
+VFill::transform( const TQWMatrix& m )
{
if( type() == VFill::grad )
gradient().transform( m );
diff --git a/karbon/core/vfill.h b/karbon/core/vfill.h
index 67a31722..d05b8c88 100644
--- a/karbon/core/vfill.h
+++ b/karbon/core/vfill.h
@@ -26,18 +26,18 @@
#include "vpattern.h"
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class KoGenStyle;
class KoGenStyles;
class KoOasisLoadingContext;
/**
- * Manages the fill of shapes.
+ * Manages the fill of tqshapes.
*
* The fill can be solid or gradient.
- * Also two fill rules are supported that effect how the shape is
- * filled. For explanation see the QPainter documentation.
+ * Also two fill rules are supported that effect how the tqshape is
+ * filled. For explanation see the TQPainter documentation.
*
* Default is no fill and even-odd filling rule.
*/
@@ -69,14 +69,14 @@ public:
VFillType type() const { return m_type; }
void setType( VFillType type ) { m_type = type; }
- void save( QDomElement& element ) const;
+ void save( TQDomElement& element ) const;
void saveOasis( KoGenStyles &mainStyles, KoGenStyle &style ) const;
- void load( const QDomElement& element );
- void loadOasis( const QDomElement &object, KoOasisLoadingContext &context, VObject* parent = 0L );
+ void load( const TQDomElement& element );
+ void loadOasis( const TQDomElement &object, KoOasisLoadingContext &context, VObject* tqparent = 0L );
VFill& operator=( const VFill& fill );
- void transform( const QWMatrix& m );
+ void transform( const TQWMatrix& m );
private:
VColor m_color;
diff --git a/karbon/core/vgradient.cc b/karbon/core/vgradient.cc
index cd3b55b6..11d6239f 100644
--- a/karbon/core/vgradient.cc
+++ b/karbon/core/vgradient.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qbuffer.h>
+#include <tqdom.h>
+#include <tqbuffer.h>
#include "vdocument.h"
#include "vglobal.h"
@@ -28,7 +28,7 @@
#include <KoXmlWriter.h>
#include <KoXmlNS.h>
-int VGradient::VColorStopList::compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 )
+int VGradient::VColorStopList::compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{
float r1 = ( (VColorStop*)item1 )->rampPoint;
float r2 = ( (VColorStop*)item2 )->rampPoint;
@@ -66,7 +66,7 @@ VGradient::VGradient( const VGradient& gradient )
m_repeatMethod = gradient.m_repeatMethod;
m_colorStops.clear();
- QPtrVector<VColorStop> cs = gradient.colorStops();
+ TQPtrVector<VColorStop> cs = gradient.colorStops();
for( uint i = 0; i < cs.count(); i++ )
m_colorStops.append( new VColorStop( *cs[i] ) );
m_colorStops.sort();
@@ -86,7 +86,7 @@ VGradient& VGradient::operator=( const VGradient& gradient )
m_repeatMethod = gradient.m_repeatMethod;
m_colorStops.clear();
- QPtrVector<VColorStop> cs = gradient.colorStops();
+ TQPtrVector<VColorStop> cs = gradient.colorStops();
for( uint i = 0; i < cs.count(); i++ )
m_colorStops.append( new VColorStop( *cs[i] ) );
m_colorStops.sort();
@@ -94,9 +94,9 @@ VGradient& VGradient::operator=( const VGradient& gradient )
return *this;
} // VGradient::operator=
-const QPtrVector<VColorStop> VGradient::colorStops() const
+const TQPtrVector<VColorStop> VGradient::colorStops() const
{
- QPtrVector<VColorStop> v;
+ TQPtrVector<VColorStop> v;
m_colorStops.toVector( &v );
v.setAutoDelete( false );
return v;
@@ -140,9 +140,9 @@ void VGradient::removeStop( const VColorStop& colorstop )
} // VGradient::removeStop
void
-VGradient::save( QDomElement& element ) const
+VGradient::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "GRADIENT" );
+ TQDomElement me = element.ownerDocument().createElement( "GRADIENT" );
me.setAttribute( "originX", m_origin.x() );
me.setAttribute( "originY", m_origin.y() );
@@ -155,10 +155,10 @@ VGradient::save( QDomElement& element ) const
// save stops
VColorStop* colorstop;
- QPtrList<VColorStop>& colorStops = const_cast<VColorStopList&>( m_colorStops );
+ TQPtrList<VColorStop>& colorStops = const_cast<VColorStopList&>( m_colorStops );
for( colorstop = colorStops.first(); colorstop; colorstop = colorStops.next() )
{
- QDomElement stop = element.ownerDocument().createElement( "COLORSTOP" );
+ TQDomElement stop = element.ownerDocument().createElement( "COLORSTOP" );
colorstop->color.save( stop );
stop.setAttribute( "ramppoint", colorstop->rampPoint );
stop.setAttribute( "midpoint", colorstop->midPoint );
@@ -168,7 +168,7 @@ VGradient::save( QDomElement& element ) const
element.appendChild( me );
}
-QString
+TQString
VGradient::saveOasis( KoGenStyles &mainStyles ) const
{
bool radial = m_type == VGradient::radial;
@@ -198,50 +198,50 @@ VGradient::saveOasis( KoGenStyles &mainStyles ) const
gradientStyle.addAttribute( "svg:spreadMethod", "reflect" );
else
gradientStyle.addAttribute( "svg:spreadMethod", "pad" );
- QBuffer buffer;
+ TQBuffer buffer;
buffer.open( IO_WriteOnly );
- KoXmlWriter elementWriter( &buffer ); // TODO pass indentation level
+ KoXmlWriter elementWriter( TQT_TQIODEVICE(&buffer) ); // TODO pass indentation level
// save stops
VColorStop* colorstop;
- QPtrList<VColorStop>& colorStops = const_cast<VColorStopList&>( m_colorStops );
+ TQPtrList<VColorStop>& colorStops = const_cast<VColorStopList&>( m_colorStops );
for( colorstop = colorStops.first(); colorstop; colorstop = colorStops.next() )
{
elementWriter.startElement( "svg:stop" );
- elementWriter.addAttribute( "svg:offset", QString( "%1" ).arg( colorstop->rampPoint ) );
- elementWriter.addAttribute( "svg:color", QColor( colorstop->color ).name() );
+ elementWriter.addAttribute( "svg:offset", TQString( "%1" ).tqarg( colorstop->rampPoint ) );
+ elementWriter.addAttribute( "svg:color", TQColor( colorstop->color ).name() );
if( colorstop->color.opacity() < 1 )
- elementWriter.addAttribute( "svg:stop-opacity", QString( "%1" ).arg( colorstop->color.opacity() ) );
+ elementWriter.addAttribute( "svg:stop-opacity", TQString( "%1" ).tqarg( colorstop->color.opacity() ) );
elementWriter.endElement();
}
- QString elementContents = QString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
+ TQString elementContents = TQString::fromUtf8( buffer.buffer(), buffer.buffer().size() );
gradientStyle.addChildElement( "svg:stop", elementContents );
return mainStyles.lookup( gradientStyle, "gradient" );
}
void
-VGradient::loadOasis( const QDomElement &object, KoStyleStack &/*stack*/, VObject* parent )
+VGradient::loadOasis( const TQDomElement &object, KoStyleStack &/*stack*/, VObject* tqparent )
{
kdDebug(38000) << "namespaceURI: " << object.namespaceURI() << endl;
kdDebug(38000) << "localName: " << object.localName() << endl;
KoRect bb;
- if( parent )
- bb = parent->boundingBox();
+ if( tqparent )
+ bb = tqparent->boundingBox();
if( object.namespaceURI() == KoXmlNS::draw && object.localName() == "gradient" )
{
m_repeatMethod = VGradient::reflect;
- QString strType = object.attributeNS( KoXmlNS::draw, "style", QString::null );
+ TQString strType = object.attributeNS( KoXmlNS::draw, "style", TQString() );
if( strType == "radial" )
{
m_type = VGradient::radial;
// TODO : find out whether Oasis works with boundingBox only?
- double cx = KoUnit::parseValue( object.attributeNS( KoXmlNS::draw, "cx", QString::null ).remove("%") );
+ double cx = KoUnit::parseValue( object.attributeNS( KoXmlNS::draw, "cx", TQString() ).remove("%") );
m_origin.setX( bb.bottomLeft().x() + bb.width() * 0.01 * cx );
- double cy = KoUnit::parseValue( object.attributeNS( KoXmlNS::draw, "cy", QString::null ).remove("%") );
+ double cy = KoUnit::parseValue( object.attributeNS( KoXmlNS::draw, "cy", TQString() ).remove("%") );
m_origin.setY( bb.bottomLeft().y() - bb.height() * 0.01 * cy );
m_focalPoint = m_origin;
m_vector = bb.topRight();
@@ -261,8 +261,8 @@ VGradient::loadOasis( const QDomElement &object, KoStyleStack &/*stack*/, VObjec
}
else return;
- VColor startColor( QColor( object.attributeNS( KoXmlNS::draw, "start-color", QString::null ) ) );
- VColor endColor( QColor( object.attributeNS( KoXmlNS::draw, "end-color", QString::null ) ) );
+ VColor startColor( TQColor( object.attributeNS( KoXmlNS::draw, "start-color", TQString() ) ) );
+ VColor endColor( TQColor( object.attributeNS( KoXmlNS::draw, "end-color", TQString() ) ) );
double startOpacity = 0.01 * object.attributeNS( KoXmlNS::draw, "start-intensity", "100" ).remove("%").toDouble();
double endOpacity = 0.01 * object.attributeNS( KoXmlNS::draw, "end-intensity", "100" ).remove("%").toDouble();
@@ -280,25 +280,25 @@ VGradient::loadOasis( const QDomElement &object, KoStyleStack &/*stack*/, VObjec
if( object.localName() == "linearGradient" )
{
m_type = VGradient::linear;
- m_origin.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "x1", QString::null ) ) );
- m_origin.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "y1", QString::null ) ) );
- m_vector.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "x2", QString::null ) ) );
- m_vector.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "y2", QString::null ) ) );
+ m_origin.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "x1", TQString() ) ) );
+ m_origin.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "y1", TQString() ) ) );
+ m_vector.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "x2", TQString() ) ) );
+ m_vector.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "y2", TQString() ) ) );
m_focalPoint = m_origin;
}
else if( object.localName() == "radialGradient" )
{
m_type = VGradient::radial;
- m_origin.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "cx", QString::null ) ) );
- m_origin.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "cy", QString::null ) ) );
- double r = KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "r", QString::null ) );
+ m_origin.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "cx", TQString() ) ) );
+ m_origin.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "cy", TQString() ) ) );
+ double r = KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "r", TQString() ) );
m_vector.setX( m_origin.x() + r );
m_vector.setY( m_origin.y() );
- m_focalPoint.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "fx", QString::null ) ) );
- m_focalPoint.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "fy", QString::null ) ) );
+ m_focalPoint.setX( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "fx", TQString() ) ) );
+ m_focalPoint.setY( KoUnit::parseValue( object.attributeNS( KoXmlNS::svg, "fy", TQString() ) ) );
}
- QString strSpread( object.attributeNS( KoXmlNS::svg, "spreadMethod", "pad" ) );
+ TQString strSpread( object.attributeNS( KoXmlNS::svg, "spreadMethod", "pad" ) );
if( strSpread == "repeat" )
m_repeatMethod = VGradient::repeat;
else if( strSpread == "reflect" )
@@ -309,16 +309,16 @@ VGradient::loadOasis( const QDomElement &object, KoStyleStack &/*stack*/, VObjec
m_colorStops.clear();
// load stops
- QDomNodeList list = object.childNodes();
+ TQDomNodeList list = object.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement colorstop = list.item( i ).toElement();
+ TQDomElement colorstop = list.item( i ).toElement();
if( colorstop.namespaceURI() == KoXmlNS::svg && colorstop.localName() == "stop" )
{
- VColor color( QColor( colorstop.attributeNS( KoXmlNS::svg, "color", QString::null ) ) );
+ VColor color( TQColor( colorstop.attributeNS( KoXmlNS::svg, "color", TQString() ) ) );
color.setOpacity( colorstop.attributeNS( KoXmlNS::svg, "stop-opacity", "1.0" ).toDouble() );
addStop( color, colorstop.attributeNS( KoXmlNS::svg, "offset", "0.0" ).toDouble(), 0.5 );
}
@@ -329,7 +329,7 @@ VGradient::loadOasis( const QDomElement &object, KoStyleStack &/*stack*/, VObjec
}
void
-VGradient::load( const QDomElement& element )
+VGradient::load( const TQDomElement& element )
{
m_origin.setX( element.attribute( "originX", "0.0" ).toDouble() );
m_origin.setY( element.attribute( "originY", "0.0" ).toDouble() );
@@ -343,12 +343,12 @@ VGradient::load( const QDomElement& element )
m_colorStops.clear();
// load stops
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement colorstop = list.item( i ).toElement();
+ TQDomElement colorstop = list.item( i ).toElement();
if( colorstop.tagName() == "COLORSTOP" )
{
@@ -362,7 +362,7 @@ VGradient::load( const QDomElement& element )
}
void
-VGradient::transform( const QWMatrix &m )
+VGradient::transform( const TQWMatrix &m )
{
m_origin = m_origin.transform( m );
m_focalPoint = m_focalPoint.transform( m );
diff --git a/karbon/core/vgradient.h b/karbon/core/vgradient.h
index 5587af7e..8341eeab 100644
--- a/karbon/core/vgradient.h
+++ b/karbon/core/vgradient.h
@@ -20,15 +20,15 @@
#ifndef __VGRADIENT_H__
#define __VGRADIENT_H__
-#include <qptrlist.h>
-#include <qptrvector.h>
+#include <tqptrlist.h>
+#include <tqptrvector.h>
#include <koffice_export.h>
#include <KoPoint.h>
#include "vcolor.h"
-class QDomElement;
+class TQDomElement;
class KoGenStyle;
class KoGenStyles;
class KoStyleStack;
@@ -74,10 +74,10 @@ public:
repeat = 2
};
- class VColorStopList : public QPtrList<VColorStop>
+ class VColorStopList : public TQPtrList<VColorStop>
{
protected:
- virtual int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 );
+ virtual int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 );
}; // VColorStopList
VGradient( VGradientType type = linear );
@@ -91,7 +91,7 @@ public:
VGradientRepeatMethod repeatMethod() const { return m_repeatMethod; }
void setRepeatMethod( VGradientRepeatMethod repeatMethod ) { m_repeatMethod = repeatMethod; }
- const QPtrVector<VColorStop> colorStops() const;
+ const TQPtrVector<VColorStop> colorStops() const;
void addStop( const VColorStop& colorStop );
void addStop( const VColor &color, float rampPoint, float midPoint );
void removeStop( const VColorStop& colorStop );
@@ -106,12 +106,12 @@ public:
KoPoint vector() const { return m_vector; }
void setVector( const KoPoint &vector ) { m_vector = vector; }
- void save( QDomElement& element ) const;
- QString saveOasis( KoGenStyles &mainStyles ) const;
- void load( const QDomElement& element );
- void loadOasis( const QDomElement &object, KoStyleStack &stack, VObject* parent = 0L );
+ void save( TQDomElement& element ) const;
+ TQString saveOasis( KoGenStyles &mainStyles ) const;
+ void load( const TQDomElement& element );
+ void loadOasis( const TQDomElement &object, KoStyleStack &stack, VObject* tqparent = 0L );
- void transform( const QWMatrix& m );
+ void transform( const TQWMatrix& m );
protected:
VColorStopList m_colorStops;
diff --git a/karbon/core/vgroup.cc b/karbon/core/vgroup.cc
index d356b2b1..8a426577 100644
--- a/karbon/core/vgroup.cc
+++ b/karbon/core/vgroup.cc
@@ -21,7 +21,7 @@
#include <config.h>
#endif
-#include <qdom.h>
+#include <tqdom.h>
#include <KoStore.h>
#include <KoXmlWriter.h>
@@ -51,8 +51,8 @@
#include <kdebug.h>
-VGroup::VGroup( VObject* parent, VState state )
- : VObject( parent, state )
+VGroup::VGroup( VObject* tqparent, VState state )
+ : VObject( tqparent, state )
{
m_stroke = new VStroke( this );
m_fill = new VFill();
@@ -157,11 +157,11 @@ VGroup::setState( const VState state )
}
void
-VGroup::save( QDomElement& element ) const
+VGroup::save( TQDomElement& element ) const
{
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "GROUP" );
+ TQDomElement me = element.ownerDocument().createElement( "GROUP" );
element.appendChild( me );
// save objects:
@@ -193,18 +193,18 @@ VGroup::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyl
}
bool
-VGroup::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VGroup::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
m_objects.setAutoDelete( true );
m_objects.clear();
m_objects.setAutoDelete( false );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
kdDebug(38000) << "VGroup::loadOasis: e.tagName() = " << e.tagName() << endl;
kdDebug(38000) << "VGroup::loadOasis: e.namespaceURI() = " << e.namespaceURI() << endl;
@@ -215,7 +215,7 @@ VGroup::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
context.styleStack().save();
- if( e.localName() == "path" || e.localName() == "custom-shape" )
+ if( e.localName() == "path" || e.localName() == "custom-tqshape" )
{
VPath* composite = new VPath( this );
composite->loadOasis( e, context );
@@ -260,7 +260,7 @@ VGroup::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
}
void
-VGroup::load( const QDomElement& element )
+VGroup::load( const TQDomElement& element )
{
m_objects.setAutoDelete( true );
m_objects.clear();
@@ -268,12 +268,12 @@ VGroup::load( const QDomElement& element )
VObject::load( element );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "COMPOSITE" || e.tagName() == "PATH" ) // TODO : remove COMPOSITE later
{
@@ -365,7 +365,7 @@ VGroup::take( const VObject& object )
{
m_objects.removeRef( &object );
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -375,7 +375,7 @@ VGroup::append( VObject* object )
m_objects.append( object );
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -383,9 +383,9 @@ VGroup::insertInfrontOf( VObject* newObject, VObject* oldObject )
{
newObject->setParent( this );
- m_objects.insert( m_objects.find( oldObject ), newObject );
+ m_objects.insert( m_objects.tqfind( oldObject ), newObject );
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -393,6 +393,6 @@ VGroup::clear()
{
m_objects.clear();
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
diff --git a/karbon/core/vgroup.h b/karbon/core/vgroup.h
index 25190178..29eb3842 100644
--- a/karbon/core/vgroup.h
+++ b/karbon/core/vgroup.h
@@ -20,12 +20,12 @@
#ifndef __VGROUP_H__
#define __VGROUP_H__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include "vobject.h"
#include <koffice_export.h>
-typedef QPtrList<VObject> VObjectList;
-typedef QPtrListIterator<VObject> VObjectListIterator;
+typedef TQPtrList<VObject> VObjectList;
+typedef TQPtrListIterator<VObject> VObjectListIterator;
/**
* Base class for all sort of VObject conglomerats.
@@ -35,14 +35,14 @@ class KARBONBASE_EXPORT VGroup : public VObject
{
public:
/**
- * Constructs a new group object that is child of parent and has the given state.
+ * Constructs a new group object that is child of tqparent and has the given state.
*
* The object's fill and stroke are created here.
*
- * @param parent the new object's parent
+ * @param tqparent the new object's tqparent
* @param state the new object's state
*/
- VGroup( VObject* parent, VState state = normal );
+ VGroup( VObject* tqparent, VState state = normal );
/**
* Copy constructor.
@@ -65,10 +65,10 @@ public:
virtual void setState( const VState state );
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VGroup* clone() const;
diff --git a/karbon/core/vgroup_iface.cc b/karbon/core/vgroup_iface.cc
index fec75358..9de952b3 100644
--- a/karbon/core/vgroup_iface.cc
+++ b/karbon/core/vgroup_iface.cc
@@ -34,10 +34,10 @@ VGroupIface::clear()
m_group->clear();
}
-QValueList<DCOPRef>
+TQValueList<DCOPRef>
VGroupIface::objects()
{
- QValueList<DCOPRef> lst;
+ TQValueList<DCOPRef> lst;
VObjectListIterator itr = m_group->objects();
for( ; itr.current(); ++itr )
lst.append( DCOPRef( kapp->dcopClient()->appId(), itr.current()->dcopObject()->objId() ) );
diff --git a/karbon/core/vgroup_iface.h b/karbon/core/vgroup_iface.h
index c189a7a1..afb0c6e7 100644
--- a/karbon/core/vgroup_iface.h
+++ b/karbon/core/vgroup_iface.h
@@ -20,14 +20,14 @@
#ifndef __VGROUP_IFACE_H__
#define __VGROUP_IFACE_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "vobject_iface.h"
class VGroup;
-//typedef QPtrList<VObject> VObjectList;
-//typedef QPtrListIterator<VObject> VObjectListIterator;
+//typedef TQPtrList<VObject> VObjectList;
+//typedef TQPtrListIterator<VObject> VObjectListIterator;
class VGroupIface : public VObjectIface
{
@@ -44,7 +44,7 @@ k_dcop:
//virtual void insertInfrontOf( VObject* newObject, VObject* oldObject );
void clear();
- QValueList<DCOPRef> objects();
+ TQValueList<DCOPRef> objects();
private:
VGroup *m_group;
diff --git a/karbon/core/vimage.cc b/karbon/core/vimage.cc
index a8bbf138..7f75254b 100644
--- a/karbon/core/vimage.cc
+++ b/karbon/core/vimage.cc
@@ -9,20 +9,20 @@
#include "vfill.h"
#include "vstroke.h"
-#include <qdom.h>
-#include <qimage.h>
+#include <tqdom.h>
+#include <tqimage.h>
#include <KoRect.h>
#include <render/vqpainter.h>
#include <kdebug.h>
-VImage::VImage( VObject *parent, const QString &fname ) : VObject( parent ), m_image( 0L ), m_fname( fname )
+VImage::VImage( VObject *tqparent, const TQString &fname ) : VObject( tqparent ), m_image( 0L ), m_fname( fname )
{
m_stroke = new VStroke( this );
m_stroke->setType( VStroke::none );
m_fill = new VFill();
- m_image = new QImage( m_fname );
+ m_image = new TQImage( m_fname );
if( m_image->depth() != 32 )
*m_image = m_image->convertDepth( 32 );
m_image->setAlphaBuffer( true );
@@ -33,7 +33,7 @@ VImage::VImage( VObject *parent, const QString &fname ) : VObject( parent ), m_i
VImage::VImage( const VImage &other ) : VObject( other )
{
if( other.m_image )
- m_image = new QImage( *other.m_image );
+ m_image = new TQImage( *other.m_image );
else
m_image = 0L;
@@ -77,17 +77,17 @@ VImage::draw( VPainter *painter, const KoRect * ) const
painter->lineTo( bl );
painter->lineTo( tl );
- painter->setRasterOp( Qt::XorROP );
+ painter->setRasterOp( TQt::XorROP );
//painter->setPen( stroke() );
- painter->setPen( Qt::yellow );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQt::yellow );
+ painter->setBrush( TQt::NoBrush );
painter->strokePath();
return;
}
//painter->setWorldMatrix( m_matrix );
- //*m_image = m_image->smoothScale( m_image->width() * zoomFactor, m_image->height() * zoomFactor, QImage::ScaleMin );
+ //*m_image = m_image->smoothScale( m_image->width() * zoomFactor, m_image->height() * zoomFactor, TQ_ScaleMin );
m_boundingBox = KoRect( 0, 0, m_image->width(), m_image->height() );
m_boundingBox = m_boundingBox.transform( m_matrix );
if( !m_image->isNull() )
@@ -95,9 +95,9 @@ VImage::draw( VPainter *painter, const KoRect * ) const
}
void
-VImage::transform( const QWMatrix& m )
+VImage::transform( const TQWMatrix& m )
{
- //QWMatrix m2 = m;
+ //TQWMatrix m2 = m;
//m_matrix *= m2.scale( 1.0, -1.0 );
m_matrix *= m;
kdDebug(38000) << "dx : " << m.dx() << ", dy : " << m.dy() << endl;
@@ -111,11 +111,11 @@ VImage::clone() const
}
void
-VImage::save( QDomElement& element ) const
+VImage::save( TQDomElement& element ) const
{
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "IMAGE" );
+ TQDomElement me = element.ownerDocument().createElement( "IMAGE" );
element.appendChild( me );
me.setAttribute( "fname", m_fname );
@@ -129,7 +129,7 @@ VImage::save( QDomElement& element ) const
}
void
-VImage::load( const QDomElement& element )
+VImage::load( const TQDomElement& element )
{
setState( normal );
m_fname = element.attribute( "fname" );
@@ -141,7 +141,7 @@ VImage::load( const QDomElement& element )
element.attribute( "dy", "0.0" ).toDouble() );
kdDebug(38000) << "VImage::load : " << m_fname.latin1() << endl;
delete m_image;
- m_image = new QImage( m_fname );
+ m_image = new TQImage( m_fname );
if( m_image->depth() != 32 )
*m_image = m_image->convertDepth( 32 );
m_image->setAlphaBuffer( true );
diff --git a/karbon/core/vimage.h b/karbon/core/vimage.h
index d73e4ee7..2933b4eb 100644
--- a/karbon/core/vimage.h
+++ b/karbon/core/vimage.h
@@ -7,31 +7,31 @@
#include "vobject.h"
#include <koffice_export.h>
-class QImage;
+class TQImage;
// all vobjects exist inside a layer.
class KARBONBASE_EXPORT VImage : public VObject
{
public:
- VImage( VObject *parent, const QString &fname = "" );
+ VImage( VObject *tqparent, const TQString &fname = "" );
VImage( const VImage & );
virtual ~VImage();
virtual void draw( VPainter *painter, const KoRect *rect ) const;
- virtual void transform( const QWMatrix& m );
+ virtual void transform( const TQWMatrix& m );
virtual VObject* clone() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
virtual void accept( VVisitor& visitor );
private:
- QImage *m_image;
- QString m_fname;
- QWMatrix m_matrix;
+ TQImage *m_image;
+ TQString m_fname;
+ TQWMatrix m_matrix;
};
#endif
diff --git a/karbon/core/vkarbonplugin.cc b/karbon/core/vkarbonplugin.cc
index 94f38fe5..d05043d9 100644
--- a/karbon/core/vkarbonplugin.cc
+++ b/karbon/core/vkarbonplugin.cc
@@ -19,7 +19,7 @@
#include "vkarbonplugin.h"
-VKarbonPlugin::VKarbonPlugin( QObject *parent, const char* name ) : Plugin( parent, name )
+VKarbonPlugin::VKarbonPlugin( TQObject *tqparent, const char* name ) : Plugin( tqparent, name )
{
}
diff --git a/karbon/core/vkarbonplugin.h b/karbon/core/vkarbonplugin.h
index 39563829..e86680a0 100644
--- a/karbon/core/vkarbonplugin.h
+++ b/karbon/core/vkarbonplugin.h
@@ -26,7 +26,7 @@
class KARBONBASE_EXPORT VKarbonPlugin : public KParts::Plugin
{
public:
- VKarbonPlugin( QObject *parent, const char* name );
+ VKarbonPlugin( TQObject *tqparent, const char* name );
virtual ~VKarbonPlugin() {}
};
diff --git a/karbon/core/vlayer.cc b/karbon/core/vlayer.cc
index f74a3d4b..49c3bc11 100644
--- a/karbon/core/vlayer.cc
+++ b/karbon/core/vlayer.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <klocale.h>
#include <KoRect.h>
@@ -35,8 +35,8 @@
#include "vfill.h"
#include "vstroke.h"
-VLayer::VLayer( VObject* parent, VState state )
- : VGroup( parent, state )
+VLayer::VLayer( VObject* tqparent, VState state )
+ : VGroup( tqparent, state )
{
setName( "Layer" );
// HACK : vlayer just shouldn't have fill/stroke at all
@@ -111,7 +111,7 @@ VLayer::downwards( const VObject& object )
{
if( m_objects.getFirst() == &object ) return;
- int index = m_objects.find( &object );
+ int index = m_objects.tqfind( &object );
bool bLast = m_objects.getLast() == &object;
m_objects.remove( index );
@@ -131,11 +131,11 @@ VLayer::sendToBack( const VObject& object )
}
void
-VLayer::save( QDomElement& element ) const
+VLayer::save( TQDomElement& element ) const
{
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "LAYER" );
+ TQDomElement me = element.ownerDocument().createElement( "LAYER" );
element.appendChild( me );
if( state() == normal || state() == normal_locked || state() == VObject::selected )
@@ -165,7 +165,7 @@ VLayer::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyl
}
void
-VLayer::load( const QDomElement& element )
+VLayer::load( const TQDomElement& element )
{
setState( element.attribute( "visible" ) == 0 ? hidden : normal );
VGroup::load( element );
diff --git a/karbon/core/vlayer.h b/karbon/core/vlayer.h
index 26524416..7dbd126b 100644
--- a/karbon/core/vlayer.h
+++ b/karbon/core/vlayer.h
@@ -22,7 +22,7 @@
#include "vgroup.h"
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class DCOPObject;
@@ -37,12 +37,12 @@ class KARBONBASE_EXPORT VLayer : public VGroup
{
public:
/**
- * Constructs a new layer object that is child of parent and has the given state.
+ * Constructs a new layer object that is child of tqparent and has the given state.
*
- * @param parent the new object's parent
+ * @param tqparent the new object's tqparent
* @param state the new object's state
*/
- VLayer( VObject* parent, VState state = normal );
+ VLayer( VObject* tqparent, VState state = normal );
/**
* Copy constructor.
@@ -56,9 +56,9 @@ public:
virtual void draw( VPainter *painter, const KoRect* rect = 0L ) const;
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
+ virtual void load( const TQDomElement& element );
virtual VLayer* clone() const;
diff --git a/karbon/core/vlayer_iface.cc b/karbon/core/vlayer_iface.cc
index 7db8a20b..168e6a4a 100644
--- a/karbon/core/vlayer_iface.cc
+++ b/karbon/core/vlayer_iface.cc
@@ -30,12 +30,12 @@ VLayerIface::VLayerIface( VLayer* layer )
}
void
-VLayerIface::setName( const QString& name )
+VLayerIface::setName( const TQString& name )
{
m_layer->setName( name );
}
-QString
+TQString
VLayerIface::name() const
{
return m_layer->name();
diff --git a/karbon/core/vlayer_iface.h b/karbon/core/vlayer_iface.h
index 9f34a4e0..e177d507 100644
--- a/karbon/core/vlayer_iface.h
+++ b/karbon/core/vlayer_iface.h
@@ -21,7 +21,7 @@
#define __VLAYER_IFACE_H__
#include "vgroup_iface.h"
-#include <qstring.h>
+#include <tqstring.h>
class VLayer;
@@ -33,8 +33,8 @@ public:
VLayerIface( VLayer* layer );
k_dcop:
- void setName( const QString& name );
- QString name() const;
+ void setName( const TQString& name );
+ TQString name() const;
void setSelected( bool state );
bool selected() const;
diff --git a/karbon/core/vobject.cc b/karbon/core/vobject.cc
index af2fee35..2f9333ac 100644
--- a/karbon/core/vobject.cc
+++ b/karbon/core/vobject.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vdocument.h"
#include "vfill.h"
@@ -33,15 +33,15 @@
#include <KoOasisLoadingContext.h>
#include <KoOasisStyles.h>
-VObject::VObject( VObject* parent, VState state ) : m_dcop( 0L )
+VObject::VObject( VObject* tqparent, VState state ) : m_dcop( 0L )
{
m_stroke = 0L;
m_fill = 0L;
- m_parent = parent;
+ m_parent = tqparent;
m_state = state;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
VObject::VObject( const VObject& obj )
@@ -52,7 +52,7 @@ VObject::VObject( const VObject& obj )
m_parent = obj.m_parent;
m_state = obj.m_state;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
m_dcop = 0L;
VDocument *srcDoc = obj.document();
@@ -99,7 +99,7 @@ VObject::setFill( const VFill& fill )
}
void
-VObject::save( QDomElement& element ) const
+VObject::save( TQDomElement& element ) const
{
if( m_stroke )
m_stroke->save( element );
@@ -109,7 +109,7 @@ VObject::save( QDomElement& element ) const
VDocument *doc = document();
if( doc && !doc->objectName( this ).isEmpty() )
- element.setAttribute( "ID", QString( doc->objectName( this ) ) );
+ element.setAttribute( "ID", TQString( doc->objectName( this ) ) );
}
void
@@ -118,7 +118,7 @@ VObject::saveOasis( KoStore *, KoXmlWriter *docWriter, KoGenStyles &mainStyles,
if( !name().isEmpty() )
docWriter->addAttribute( "draw:name", name() );
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -document()->height() );
@@ -131,9 +131,9 @@ VObject::saveOasis( KoStore *, KoXmlWriter *docWriter, KoGenStyles &mainStyles,
stroke.transform( mat );
stroke.saveOasis( styleobjectauto );
}
- QString st = mainStyles.lookup( styleobjectauto, "st" );
+ TQString st = mainStyles.lookup( styleobjectauto, "st" );
if(document())
- docWriter->addAttribute( "draw:id", "obj" + QString::number( index ) );
+ docWriter->addAttribute( "draw:id", "obj" + TQString::number( index ) );
docWriter->addAttribute( "draw:style-name", st );
}
@@ -142,7 +142,7 @@ VObject::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto )
{
if( m_fill )
{
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -document()->height() );
@@ -154,7 +154,7 @@ VObject::saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesobjectauto )
}
void
-VObject::load( const QDomElement& element )
+VObject::load( const TQDomElement& element )
{
if( !m_stroke )
m_stroke = new VStroke( this );
@@ -178,7 +178,7 @@ VObject::load( const QDomElement& element )
}
bool
-VObject::loadOasis( const QDomElement &object, KoOasisLoadingContext &context )
+VObject::loadOasis( const TQDomElement &object, KoOasisLoadingContext &context )
{
if( !m_stroke )
m_stroke = new VStroke( this );
@@ -195,19 +195,19 @@ VObject::loadOasis( const QDomElement &object, KoOasisLoadingContext &context )
m_fill->loadOasis( object, context, this );
if( object.hasAttributeNS( KoXmlNS::draw, "name" ) )
- setName( object.attributeNS( KoXmlNS::draw, "name", QString::null ) );
+ setName( object.attributeNS( KoXmlNS::draw, "name", TQString() ) );
return true;
}
void
-VObject::addStyles( const QDomElement* style, KoOasisLoadingContext & context )
+VObject::addStyles( const TQDomElement* style, KoOasisLoadingContext & context )
{
if(style)
{
- // this function is necessary as parent styles can have parents themself
- if( style->hasAttributeNS( KoXmlNS::style, "parent-style-name" ) )
- addStyles( context.oasisStyles().findStyle( style->attributeNS( KoXmlNS::style, "parent-style-name", QString::null ) ), context );
+ // this function is necessary as tqparent styles can have tqparents themself
+ if( style->hasAttributeNS( KoXmlNS::style, "tqparent-style-name" ) )
+ addStyles( context.oasisStyles().findStyle( style->attributeNS( KoXmlNS::style, "tqparent-style-name", TQString() ) ), context );
context.addStyles( style, "style-name" );
}
}
@@ -216,19 +216,19 @@ VDocument *
VObject::document() const
{
VObject *obj = (VObject *)this;
- while( obj->parent() )
- obj = obj->parent();
+ while( obj->tqparent() )
+ obj = obj->tqparent();
return dynamic_cast<VDocument *>( obj );
}
-QString
+TQString
VObject::name() const
{
- return document() ? document()->objectName( this ) : QString();
+ return document() ? document()->objectName( this ) : TQString();
}
void
-VObject::setName( const QString &s )
+VObject::setName( const TQString &s )
{
if( document() )
document()->setObjectName( this, s );
diff --git a/karbon/core/vobject.h b/karbon/core/vobject.h
index 9aa6885a..93a3ab1f 100644
--- a/karbon/core/vobject.h
+++ b/karbon/core/vobject.h
@@ -26,7 +26,7 @@
#include <dcopobject.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class VDocument;
class VFill;
class VPainter;
@@ -44,7 +44,7 @@ class KoGenStyle;
* have the ability to draw itself using a painter, perform
* hit detection, transform on demand, clone and load/save itself.
* Also each object manages its own bounding box and keeps track of its
- * parent object.
+ * tqparent object.
*/
class KARBONBASE_EXPORT VObject
{
@@ -57,22 +57,22 @@ public:
hidden_locked = 3, /**< hidden and locked (r/o) */
deleted = 4, /**< deleted, nearly dead */
- // shape specific states:
+ // tqshape specific states:
selected = 5, /**< visible, active and can be manipulated by tools */
edit = 6 /**< visible, active and is currently manipulated by a tool */
};
/**
- * Constructs a new object that is child of parent and has the given state.
+ * Constructs a new object that is child of tqparent and has the given state.
*
- * @param parent the new object's parent
+ * @param tqparent the new object's tqparent
* @param state the new object's state
*/
- VObject( VObject* parent, VState state = edit );
+ VObject( VObject* tqparent, VState state = edit );
/**
* Copy constructor.
- * Copies parent, state and name of given object.
+ * Copies tqparent, state and name of given object.
*
* @param obj the object to copy properties from
*/
@@ -124,27 +124,27 @@ public:
* This function is public so visitors can access it themself at the right
* time when they manipulate many VSegments.
*/
- void invalidateBoundingBox()
+ void tqinvalidateBoundingBox()
{
m_boundingBoxIsInvalid = true;
if( m_parent )
- m_parent->invalidateBoundingBox();
+ m_parent->tqinvalidateBoundingBox();
}
/**
- * Sets a new parent object.
+ * Sets a new tqparent object.
*
- * @param parent the new parent object
+ * @param tqparent the new tqparent object
*/
- void setParent( VObject* parent ) { m_parent = parent; }
+ void setParent( VObject* tqparent ) { m_parent = tqparent; }
/**
- * Returns pointer to current parent object.
+ * Returns pointer to current tqparent object.
*
- * @return pointer to current parent object or 0 if no parent object is set
+ * @return pointer to current tqparent object or 0 if no tqparent object is set
*/
- VObject* parent() const { return m_parent; }
+ VObject* tqparent() const { return m_parent; }
/**
* Get the state the object is in.
@@ -195,7 +195,7 @@ public:
*
* @param element the DOM element to which the attributes are saved
*/
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
/**
* Save this object's state to OpenDocument.
@@ -212,7 +212,7 @@ public:
*
* @param element the DOM element from which the attributes are read
*/
- virtual void load( const QDomElement& element );
+ virtual void load( const TQDomElement& element );
/**
* Load this object's state from OpenDocument and initialize
@@ -221,7 +221,7 @@ public:
* @param element the DOM element to read attributes from
* @param context FIXME
*/
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
/**
* Create an exact copy of this object.
@@ -254,19 +254,19 @@ public:
*
* @return the object's name
*/
- virtual QString name() const;
+ virtual TQString name() const;
/**
* Sets the object's name to a given new name.
*
* @param s the new object name
*/
- void setName( const QString &s );
+ void setName( const TQString &s );
/**
* Return document the object belongs to.
*
- * @return pointer to parent document or 0 if object does not belong to a document
+ * @return pointer to tqparent document or 0 if object does not belong to a document
*/
VDocument *document() const;
@@ -277,7 +277,7 @@ protected:
* @param style FIXME
* @param context FIXME
*/
- void addStyles( const QDomElement* style, KoOasisLoadingContext & context );
+ void addStyles( const TQDomElement* style, KoOasisLoadingContext & context );
virtual void saveOasisFill( KoGenStyles &mainStyles, KoGenStyle &stylesojectauto ) const;
diff --git a/karbon/core/vobject_iface.cc b/karbon/core/vobject_iface.cc
index c93b68d6..09291ec4 100644
--- a/karbon/core/vobject_iface.cc
+++ b/karbon/core/vobject_iface.cc
@@ -41,11 +41,11 @@ VObjectIface::setState( int state )
}
DCOPRef
-VObjectIface::parent() const
+VObjectIface::tqparent() const
{
- if( !m_object->parent() )
+ if( !m_object->tqparent() )
return DCOPRef();
- return DCOPRef( kapp->dcopClient()->appId(), m_object->parent()->dcopObject()->objId() );
+ return DCOPRef( kapp->dcopClient()->appId(), m_object->tqparent()->dcopObject()->objId() );
}
diff --git a/karbon/core/vobject_iface.h b/karbon/core/vobject_iface.h
index e1684ba2..e4a645ca 100644
--- a/karbon/core/vobject_iface.h
+++ b/karbon/core/vobject_iface.h
@@ -23,7 +23,7 @@
#include <KoRect.h>
class VObject;
-class QDomElement;
+class TQDomElement;
class VFill;
class VPainter;
class VStroke;
@@ -44,10 +44,10 @@ k_dcop:
const KoRect& boundingBox() const { return m_boundingBox; }
bool boundingBoxIsInvalid() const;
- void invalidateBoundingBox();
- void setParent( VObject* parent ) { m_parent = parent; }*/
+ void tqinvalidateBoundingBox();
+ void setParent( VObject* tqparent ) { m_parent = tqparent; }*/
- DCOPRef parent() const;
+ DCOPRef tqparent() const;
int state() const;
void setState( int state );
@@ -56,8 +56,8 @@ k_dcop:
VFill* fill() const { return m_fill; }
void setStroke( const VStroke& stroke );
void setFill( const VFill& fill );
- void save( QDomElement& element ) const;
- void load( const QDomElement& element );
+ void save( TQDomElement& element ) const;
+ void load( const TQDomElement& element );
VObject* clone() const = 0;
void accept( VVisitor& ) {}
void insertInfrontOf( VObject* , VObject* ) { }*/
diff --git a/karbon/core/vpath.cc b/karbon/core/vpath.cc
index a9fcc8a1..88baa8fe 100644
--- a/karbon/core/vpath.cc
+++ b/karbon/core/vpath.cc
@@ -20,9 +20,9 @@
#include <math.h>
-#include <qdom.h>
-#include <qvaluelist.h>
-#include <qwmatrix.h>
+#include <tqdom.h>
+#include <tqvaluelist.h>
+#include <tqwmatrix.h>
#include "vpath.h"
#include "vsegment.h"
@@ -52,7 +52,7 @@ public:
m_list->push_front( itr );
else
{
- m_list = new QValueList<VSubpathIterator*>;
+ m_list = new TQValueList<VSubpathIterator*>;
m_list->push_front( itr );
}
}
@@ -86,7 +86,7 @@ public:
if( m_list )
{
for(
- QValueList<VSubpathIterator*>::Iterator itr = m_list->begin();
+ TQValueList<VSubpathIterator*>::Iterator itr = m_list->begin();
itr != m_list->end();
++itr )
{
@@ -109,7 +109,7 @@ public:
if( m_list )
{
for(
- QValueList<VSubpathIterator*>::Iterator itr = m_list->begin();
+ TQValueList<VSubpathIterator*>::Iterator itr = m_list->begin();
itr != m_list->end();
++itr )
{
@@ -120,13 +120,13 @@ public:
}
private:
- QValueList<VSubpathIterator*>* m_list;
+ TQValueList<VSubpathIterator*>* m_list;
VSubpathIterator* m_iterator;
};
-VSubpath::VSubpath( VObject* parent )
- : VObject( parent )
+VSubpath::VSubpath( VObject* tqparent )
+ : VObject( tqparent )
{
m_isClosed = false;
@@ -416,14 +416,14 @@ bool
VSubpath::pointIsInside( const KoPoint& p ) const
{
// If the point is not inside the boundingbox, it cannot be inside the path either.
- if( !boundingBox().contains( p ) )
+ if( !boundingBox().tqcontains( p ) )
return false;
// First check if the point is inside the knot polygon (beziers are treated
// as lines).
/* This algorithm is taken from "Fast Winding Number Inclusion of a Point
- * in a Polygon" by Dan Sunday, geometryalgorithms.com.
+ * in a Polygon" by Dan Sunday, tqgeometryalgorithms.com.
*/
/*
@@ -481,7 +481,7 @@ VSubpath::pointIsInside( const KoPoint& p ) const
// cache the closed evaluation
bool closed = isClosed() || getLast()->knot() == getFirst()->knot();
- QValueList<double> rparams;
+ TQValueList<double> rparams;
VSegment* segment = getFirst()->next();
@@ -528,7 +528,7 @@ VSubpath::pointIsInside( const KoPoint& p ) const
// sort all intersections
qHeapSort( rparams );
- QValueList<double>::iterator itr, etr = rparams.end();
+ TQValueList<double>::iterator itr, etr = rparams.end();
for( itr = rparams.begin(); itr != etr; ++itr )
kdDebug(38000) << "intersection: " << *itr << endl;
@@ -654,7 +654,7 @@ VSubpath::revert()
return;
- VSubpath list( parent() );
+ VSubpath list( tqparent() );
list.moveTo( getLast()->knot() );
VSegment* segment = getLast();
@@ -701,7 +701,7 @@ VSubpath::clone() const
}
void
-VSubpath::saveSvgPath( QString &d ) const
+VSubpath::saveSvgPath( TQString &d ) const
{
// Save segments.
VSegment* segment = getFirst();
@@ -715,21 +715,21 @@ VSubpath::saveSvgPath( QString &d ) const
// Line.
if( segment->prev() )
{
- d += QString( "L%1 %2" ).
- arg( segment->knot().x() ).arg( segment->knot().y() );
+ d += TQString( "L%1 %2" ).
+ tqarg( segment->knot().x() ).tqarg( segment->knot().y() );
}
// Moveto.
else
{
- d += QString( "M%1 %2" ).
- arg( segment->knot().x() ).arg( segment->knot().y() );
+ d += TQString( "M%1 %2" ).
+ tqarg( segment->knot().x() ).tqarg( segment->knot().y() );
}
}
// Bezier ( degree >= 3 ).
else
{
// We currently treat all beziers as cubic beziers.
- d += QString( "C%1 %2 %3 %4 %5 %6" ).
+ d += TQString( "C%1 %2 %3 %4 %5 %6" ).
arg( segment->point( segment->degree() - 3 ).x() ).
arg( segment->point( segment->degree() - 3 ).y() ).
arg( segment->point( segment->degree() - 2 ).x() ).
@@ -748,18 +748,18 @@ VSubpath::saveSvgPath( QString &d ) const
// TODO: remove this backward compatibility function after koffice 1.3.x
void
-VSubpath::load( const QDomElement& element )
+VSubpath::load( const TQDomElement& element )
{
// We might have a "begin" segment.
clear();
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement segment = list.item( i ).toElement();
+ TQDomElement segment = list.item( i ).toElement();
VSegment* s = new VSegment();
s->load( segment );
@@ -820,7 +820,7 @@ VSubpath::insert( const VSegment* segment )
m_current = s;
++m_number;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
return true;
}
@@ -856,7 +856,7 @@ VSubpath::insert( uint index, const VSegment* segment )
m_current = s;
++m_number;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
return true;
}
@@ -878,7 +878,7 @@ VSubpath::prepend( const VSegment* segment )
++m_number;
m_currentIndex = 0;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -898,7 +898,7 @@ VSubpath::append( const VSegment* segment )
m_currentIndex = m_number;
++m_number;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -924,7 +924,7 @@ VSubpath::clear()
m_isClosed = false;
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
VSegment*
diff --git a/karbon/core/vpath.h b/karbon/core/vpath.h
index 3287a75e..48c89a4c 100644
--- a/karbon/core/vpath.h
+++ b/karbon/core/vpath.h
@@ -26,8 +26,8 @@
#include "vobject.h"
#include <koffice_export.h>
-class QDomElement;
-class QWMatrix;
+class TQDomElement;
+class TQWMatrix;
class VSubpathIteratorList;
class VSegment;
class VVisitor;
@@ -44,7 +44,7 @@ class KARBONBASE_EXPORT VSubpath : public VObject
friend class VSubpathIterator;
public:
- VSubpath( VObject* parent );
+ VSubpath( VObject* tqparent );
VSubpath( const VSubpath& list );
VSubpath( const VSegment& segment );
virtual ~VSubpath();
@@ -106,13 +106,13 @@ public:
virtual const KoRect& boundingBox() const;
- virtual void save( QDomElement& /*element*/) const
+ virtual void save( TQDomElement& /*element*/) const
{ } // VSubpaths cant be saved.
// TODO: remove this backward compatibility function after koffice 1.3.x
- virtual void load( const QDomElement& element );
+ virtual void load( const TQDomElement& element );
- void saveSvgPath( QString & ) const;
+ void saveSvgPath( TQString & ) const;
virtual VSubpath* clone() const;
diff --git a/karbon/core/vpattern.cc b/karbon/core/vpattern.cc
index 9929a1b9..3a9c181f 100644
--- a/karbon/core/vpattern.cc
+++ b/karbon/core/vpattern.cc
@@ -17,10 +17,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vpattern.h"
-#include <qpixmap.h>
+#include <tqpixmap.h>
#define THUMB_SIZE 30
VPattern::VPattern()
@@ -29,13 +29,13 @@ VPattern::VPattern()
validThumb = false;
}
-VPattern::VPattern( const QString &tilename )
+VPattern::VPattern( const TQString &tilename )
{
load( tilename );
}
void
-VPattern::load( const QString &tilename )
+VPattern::load( const TQString &tilename )
{
m_tilename = tilename;
bool ok = m_image.load( tilename );
@@ -47,7 +47,7 @@ VPattern::load( const QString &tilename )
}
m_image = m_image.convertDepth( 32 );
- m_pixmap.convertFromImage(m_image, QPixmap::AutoColor);
+ m_pixmap.convertFromImage(m_image, TQPixmap::AutoColor);
if( m_image.width() > THUMB_SIZE || m_image.height() > THUMB_SIZE )
{
int xsize = THUMB_SIZE;
@@ -67,7 +67,7 @@ VPattern::load( const QString &tilename )
if(xsize > 30) xsize = 30;
}
- QImage thumbImg = m_image.smoothScale( xsize, ysize );
+ TQImage thumbImg = m_image.smoothScale( xsize, ysize );
m_pixmapThumb.convertFromImage( thumbImg );
validThumb = true;
}
@@ -93,9 +93,9 @@ VPattern::tileHeight() const
}
void
-VPattern::save( QDomElement& element ) const
+VPattern::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "PATTERN" );
+ TQDomElement me = element.ownerDocument().createElement( "PATTERN" );
me.setAttribute( "originX", m_origin.x() );
me.setAttribute( "originY", m_origin.y() );
@@ -108,7 +108,7 @@ VPattern::save( QDomElement& element ) const
}
void
-VPattern::load( const QDomElement& element )
+VPattern::load( const TQDomElement& element )
{
m_origin.setX( element.attribute( "originX", "0.0" ).toDouble() );
m_origin.setY( element.attribute( "originY", "0.0" ).toDouble() );
@@ -120,20 +120,20 @@ VPattern::load( const QDomElement& element )
}
void
-VPattern::transform( const QWMatrix &m )
+VPattern::transform( const TQWMatrix &m )
{
m_origin = m_origin.transform( m );
m_vector = m_vector.transform( m );
}
-QPixmap& VPattern::pixmap() const
+TQPixmap& VPattern::pixmap() const
{
- return (QPixmap&)m_pixmap;
+ return (TQPixmap&)m_pixmap;
}
-QPixmap& VPattern::thumbPixmap() const
+TQPixmap& VPattern::thumbPixmap() const
{
- return (QPixmap&)m_pixmapThumb;
+ return (TQPixmap&)m_pixmapThumb;
}
diff --git a/karbon/core/vpattern.h b/karbon/core/vpattern.h
index 04870d7d..634a70dd 100644
--- a/karbon/core/vpattern.h
+++ b/karbon/core/vpattern.h
@@ -22,17 +22,17 @@
#include <KoPoint.h>
#include <koIconChooser.h>
-#include <qimage.h>
-#include <qpixmap.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class KARBONBASE_EXPORT VPattern : public KoIconItem
{
public:
VPattern();
- VPattern( const QString &tilename );
+ VPattern( const TQString &tilename );
unsigned char *pixels();
unsigned int tileWidth() const;
@@ -44,29 +44,29 @@ public:
KoPoint vector() const { return m_vector; }
void setVector( const KoPoint &vector ) { m_vector = vector; }
- void load( const QString &tilename );
+ void load( const TQString &tilename );
- void save( QDomElement& element ) const;
- void load( const QDomElement& element );
+ void save( TQDomElement& element ) const;
+ void load( const TQDomElement& element );
- void transform( const QWMatrix& m );
+ void transform( const TQWMatrix& m );
// for KoIconItem
- QPixmap& pixmap() const ;
- QPixmap& thumbPixmap() const;
+ TQPixmap& pixmap() const ;
+ TQPixmap& thumbPixmap() const;
bool isValid() const { return m_valid; }
- QString tilename() const { return m_tilename; }
+ TQString tilename() const { return m_tilename; }
private:
// coordinates:
KoPoint m_origin;
KoPoint m_vector;
- QImage m_image;
- QPixmap m_pixmap;
- QPixmap m_pixmapThumb;
- QString m_tilename;
+ TQImage m_image;
+ TQPixmap m_pixmap;
+ TQPixmap m_pixmapThumb;
+ TQString m_tilename;
bool m_valid;
};
diff --git a/karbon/core/vsegment.cc b/karbon/core/vsegment.cc
index 3f0a4590..d18baeba 100644
--- a/karbon/core/vsegment.cc
+++ b/karbon/core/vsegment.cc
@@ -19,7 +19,7 @@
#include <math.h>
-#include <qdom.h>
+#include <tqdom.h>
#include "vpainter.h"
#include "vpath.h"
@@ -418,7 +418,7 @@ VSegment::lengthParam( double len ) const
double lengthMid = length( paramMid );
- while( QABS( lengthMid - len ) / len > VGlobal::paramLengthTolerance )
+ while( TQABS( lengthMid - len ) / len > VGlobal::paramLengthTolerance )
{
if( lengthMid < len )
param1 = paramMid;
@@ -584,7 +584,7 @@ kdDebug(38000) << newCurve.getLast()->p( i ).x() << " "
kdDebug(38000) << endl;
// Find roots.
- QValueList<double> params;
+ TQValueList<double> params;
newCurve.getLast()->rootParams( params );
@@ -601,7 +601,7 @@ kdDebug(38000) << endl;
resultParam = 0.0;
// Iterate over the found candidate params.
- for( QValueListConstIterator<double> itr = params.begin(); itr != params.end(); ++itr )
+ for( TQValueListConstIterator<double> itr = params.begin(); itr != params.end(); ++itr )
{
pointDerivativesAt( *itr, &dist );
dist -= p;
@@ -625,7 +625,7 @@ kdDebug(38000) << endl;
}
void
-VSegment::rootParams( QValueList<double>& params ) const
+VSegment::rootParams( TQValueList<double>& params ) const
{
if( !prev() )
{
@@ -942,7 +942,7 @@ VSegment::height(
( p.y() - a.y() ) * ( p.y() - a.y() ) );
// Normalize.
- return QABS( det ) / norm;
+ return TQABS( det ) / norm;
}
bool
@@ -1061,7 +1061,7 @@ VSegment::next() const
// TODO: remove this backward compatibility function after koffice 1.3.x
void
-VSegment::load( const QDomElement& element )
+VSegment::load( const TQDomElement& element )
{
if( element.tagName() == "CURVE" )
{
diff --git a/karbon/core/vsegment.h b/karbon/core/vsegment.h
index 402946a8..7dd0548a 100644
--- a/karbon/core/vsegment.h
+++ b/karbon/core/vsegment.h
@@ -20,8 +20,8 @@
#ifndef __VSEGMENT_H__
#define __VSEGMENT_H__
-#include <qptrlist.h>
-#include <qvaluelist.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
#include <KoPoint.h>
#include <KoRect.h>
@@ -29,7 +29,7 @@
#include "vglobal.h"
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class VPainter;
/**
@@ -371,7 +371,7 @@ public:
void draw( VPainter* painter ) const;
// TODO: remove this backward compatibility function after koffice 1.3.x.
- void load( const QDomElement& element );
+ void load( const TQDomElement& element );
/**
@@ -384,7 +384,7 @@ private:
* Calculates the solutions of y(x) = 0 where 0 <= x <= 1. The
* returned parameters are not ordered.
*/
- void rootParams( QValueList<double>& params ) const;
+ void rootParams( TQValueList<double>& params ) const;
/**
* Calculates how often the control polygon crosses the x-axis.
diff --git a/karbon/core/vselection.cc b/karbon/core/vselection.cc
index ec9626ce..30398ec4 100644
--- a/karbon/core/vselection.cc
+++ b/karbon/core/vselection.cc
@@ -32,11 +32,11 @@
uint VSelection::m_handleNodeSize = 3;
-VSelection::VSelection( VObject* parent )
- : VObject( parent ), m_showhandle( true )
+VSelection::VSelection( VObject* tqparent )
+ : VObject( tqparent ), m_showhandle( true )
{
m_handleRect = new KoRect[ 10 ];
- setStroke( VStroke( VColor( Qt::black ) ) );
+ setStroke( VStroke( VColor( TQt::black ) ) );
setFill( VFill() );
m_selectObjects = true;
@@ -79,7 +79,7 @@ VSelection::take( VObject& object )
m_objects.removeRef( &object );
if( object.state() >= selected )
object.setState( normal );
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
bool
@@ -90,7 +90,7 @@ VSelection::take( const KoRect& rect, bool selectObjects, bool exclusive )
if( selectObjects )
{
VSelectObjects op( m_objects, rect, false );
- if( op.visit( *static_cast<VDocument*>( parent() ) ) )
+ if( op.visit( *static_cast<VDocument*>( tqparent() ) ) )
{
selectNodes();
success = true;
@@ -112,7 +112,7 @@ VSelection::take( const KoRect& rect, bool selectObjects, bool exclusive )
}
}
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
return success;
}
@@ -123,10 +123,10 @@ VSelection::append()
clear();
VSelectObjects op( m_objects );
- op.visit( *static_cast<VDocument*>( parent() ) );
+ op.visit( *static_cast<VDocument*>( tqparent() ) );
selectNodes();
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -135,10 +135,10 @@ VSelection::append( VObject* object )
// only append if item is not deleted or not already in list
if( object->state() != deleted )
{
- if( ! m_objects.containsRef( object ) )
+ if( ! m_objects.tqcontainsRef( object ) )
m_objects.append( object );
object->setState( selected );
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
}
@@ -159,7 +159,7 @@ VSelection::append( const KoRect& rect, bool selectObjects, bool exclusive )
{
//m_objects.clear();
VSelectObjects op( m_objects, rect );
- if( op.visit( *static_cast<VDocument*>( parent() ) ) )
+ if( op.visit( *static_cast<VDocument*>( tqparent() ) ) )
{
selectNodes();
success = true;
@@ -186,7 +186,7 @@ VSelection::append( const KoRect& rect, bool selectObjects, bool exclusive )
take( *( jtr.current() ) );
}
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
return success;
}
@@ -206,7 +206,7 @@ VSelection::clear()
}
m_objects.clear();
- invalidateBoundingBox();
+ tqinvalidateBoundingBox();
}
void
@@ -222,8 +222,8 @@ VSelection::draw( VPainter* painter, double zoomFactor ) const
const KoRect& rect = boundingBox();
// calculate displaycoords of big handle rect:
- m_handleRect[ 0 ].setCoords( qRound( rect.left() ), qRound( rect.top() ),
- qRound( rect.right() ), qRound( rect.bottom() ) );
+ m_handleRect[ 0 ].setCoords( tqRound( rect.left() ), tqRound( rect.top() ),
+ tqRound( rect.right() ), tqRound( rect.bottom() ) );
KoPoint center = m_handleRect[ 0 ].center();
@@ -242,18 +242,18 @@ VSelection::draw( VPainter* painter, double zoomFactor ) const
if( !m_showhandle ) return;
// draw handle rect:
- painter->setPen( Qt::blue.light() );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQt::blue.light() );
+ painter->setBrush( TQt::NoBrush );
painter->drawRect( KoRect( m_handleRect[ 0 ].x() * zoomFactor, m_handleRect[ 0 ].y() * zoomFactor,
m_handleRect[ 0 ].width() * zoomFactor, m_handleRect[ 0 ].height() * zoomFactor ) );
- painter->setPen( Qt::blue.light() );
+ painter->setPen( TQt::blue.light() );
// draw nodes:
if( state() == VObject::selected )
{
- painter->setPen( Qt::blue.light() );
- painter->setBrush( Qt::white );
+ painter->setPen( TQt::blue.light() );
+ painter->setBrush( TQt::white );
KoRect temp;
for( uint i = node_lt; i <= node_rb; ++i )
@@ -295,14 +295,14 @@ VSelection::handleNode( const KoPoint &point ) const
{
for( uint i = node_lt; i <= node_rb; ++i )
{
- if( m_handleRect[i].contains( point ) )
+ if( m_handleRect[i].tqcontains( point ) )
return static_cast<VHandleNode>( i );
}
return node_none;
}
-QPtrList<VSegment>
+TQPtrList<VSegment>
VSelection::getSegments( const KoRect& rect )
{
VTestNodes op( rect );
diff --git a/karbon/core/vselection.h b/karbon/core/vselection.h
index 31dbb266..c98e5bf1 100644
--- a/karbon/core/vselection.h
+++ b/karbon/core/vselection.h
@@ -22,7 +22,7 @@
#define __VSELECTION_H__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <KoRect.h>
@@ -30,13 +30,13 @@
#include "vvisitor.h"
#include <koffice_export.h>
class KoPoint;
-class QObject;
+class TQObject;
class VPainter;
class VVisitor;
class VSegment;
-typedef QPtrList<VObject> VObjectList;
-typedef QPtrListIterator<VObject> VObjectListIterator;
+typedef TQPtrList<VObject> VObjectList;
+typedef TQPtrListIterator<VObject> VObjectListIterator;
/// Ids of manipulation nodes.
@@ -62,11 +62,11 @@ class KARBONBASE_EXPORT VSelection : public VObject, public VVisitor
{
public:
/**
- * Constructs a vselection with the specified parent.
+ * Constructs a vselection with the specified tqparent.
*
- * @param parent the selection's parent
+ * @param tqparent the selection's tqparent
*/
- VSelection( VObject* parent = 0L );
+ VSelection( VObject* tqparent = 0L );
/**
* Constructs a vselection by copying the specified selection.
@@ -141,7 +141,7 @@ public:
* @param rect the selection rect
* @return the list of segments
*/
- QPtrList<VSegment> getSegments( const KoRect& rect );
+ TQPtrList<VSegment> getSegments( const KoRect& rect );
/**
* Selects or deselects all nodes.
diff --git a/karbon/core/vstroke.cc b/karbon/core/vstroke.cc
index b7431be5..0fe49e99 100644
--- a/karbon/core/vstroke.cc
+++ b/karbon/core/vstroke.cc
@@ -18,7 +18,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <KoGenStyles.h>
#include <KoStyleStack.h>
@@ -33,10 +33,10 @@ VStroke::VStroke()
: m_parent(0L), m_lineWidth(1.0), m_lineCap(capButt), m_lineJoin(joinMiter), m_miterLimit(10.0), m_type(none)
{}
-VStroke::VStroke( VObject* parent, float width, const VLineCap cap, const VLineJoin join,
+VStroke::VStroke( VObject* tqparent, float width, const VLineCap cap, const VLineJoin join,
float miterLimit )
{
- m_parent = parent;
+ m_parent = tqparent;
m_type = solid;
m_lineWidth = width;
m_lineCap = cap;
@@ -44,10 +44,10 @@ VStroke::VStroke( VObject* parent, float width, const VLineCap cap, const VLineJ
m_miterLimit = miterLimit;
}
-VStroke::VStroke( const VColor &c, VObject* parent, float width, const VLineCap cap, const VLineJoin join,
+VStroke::VStroke( const VColor &c, VObject* tqparent, float width, const VLineCap cap, const VLineJoin join,
float miterLimit )
{
- m_parent = parent;
+ m_parent = tqparent;
m_type = solid;
m_lineWidth = width;
m_lineCap = cap;
@@ -58,7 +58,7 @@ VStroke::VStroke( const VColor &c, VObject* parent, float width, const VLineCap
VStroke::VStroke( const VStroke& stroke )
{
- // doesn't copy parent:
+ // doesn't copy tqparent:
*this = stroke;
}
@@ -67,15 +67,15 @@ VStroke::setLineWidth( float width )
{
m_lineWidth = width;
- // tell our parent so he can update his bbox:
+ // tell our tqparent so he can update his bbox:
if( m_parent )
- m_parent->invalidateBoundingBox();
+ m_parent->tqinvalidateBoundingBox();
}
void
-VStroke::save( QDomElement& element ) const
+VStroke::save( TQDomElement& element ) const
{
- QDomElement me = element.ownerDocument().createElement( "STROKE" );
+ TQDomElement me = element.ownerDocument().createElement( "STROKE" );
element.appendChild( me );
// save stroke parameters:
@@ -114,10 +114,10 @@ VStroke::saveOasis( KoGenStyle &style ) const
if( m_type == solid )
{
style.addProperty( "draw:stroke", "solid" );
- style.addProperty( "svg:stroke-color", QColor( m_color ).name() );
+ style.addProperty( "svg:stroke-color", TQColor( m_color ).name() );
style.addPropertyPt( "svg:stroke-width", m_lineWidth );
if( m_color.opacity() < 1 )
- style.addProperty( "svg:stroke-opacity", QString( "%1%" ).arg( m_color.opacity() * 100. ) );
+ style.addProperty( "svg:stroke-opacity", TQString( "%1%" ).tqarg( m_color.opacity() * 100. ) );
}
else if( m_type == none )
style.addProperty( "draw:stroke", "none" );
@@ -142,10 +142,10 @@ VStroke::loadOasis( const KoStyleStack &stack )
if( stack.attributeNS( KoXmlNS::draw, "stroke" ) == "solid" )
{
setType( VStroke::solid );
- setColor( QColor( stack.attributeNS( KoXmlNS::svg, "stroke-color" ) ) );
+ setColor( TQColor( stack.attributeNS( KoXmlNS::svg, "stroke-color" ) ) );
if( stack.hasAttributeNS( KoXmlNS::svg, "stroke-opacity" ) )
m_color.setOpacity( stack.attributeNS( KoXmlNS::svg, "stroke-opacity" ).remove( '%' ).toFloat() / 100. );
- QString join = stack.attributeNS( KoXmlNS::draw, "stroke-linejoin" );
+ TQString join = stack.attributeNS( KoXmlNS::draw, "stroke-linejoin" );
if( !join.isEmpty() )
{
if( join == "round" )
@@ -166,7 +166,7 @@ VStroke::loadOasis( const KoStyleStack &stack )
}
void
-VStroke::load( const QDomElement& element )
+VStroke::load( const TQDomElement& element )
{
m_type = none;
// load stroke parameters:
@@ -200,12 +200,12 @@ VStroke::load( const QDomElement& element )
// load color:
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
{
if( list.item( i ).isElement() )
{
- QDomElement e = list.item( i ).toElement();
+ TQDomElement e = list.item( i ).toElement();
if( e.tagName() == "COLOR" )
{
m_color.load( e );
@@ -235,13 +235,13 @@ VStroke::operator=( const VStroke& stroke )
{
if( this != &stroke )
{
- // dont copy the parent!
+ // dont copy the tqparent!
m_type = stroke.m_type;
m_lineWidth = stroke.m_lineWidth;
- // Tell our parent about the linewidth change, so he can update his bbox:
+ // Tell our tqparent about the linewidth change, so he can update his bbox:
//if( m_parent )
- // m_parent->invalidateBoundingBox();
+ // m_parent->tqinvalidateBoundingBox();
m_lineCap = stroke.m_lineCap;
m_lineJoin = stroke.m_lineJoin;
@@ -256,7 +256,7 @@ VStroke::operator=( const VStroke& stroke )
}
void
-VStroke::transform( const QWMatrix& m )
+VStroke::transform( const TQWMatrix& m )
{
if( type() == VStroke::grad )
gradient().transform( m );
diff --git a/karbon/core/vstroke.h b/karbon/core/vstroke.h
index 6cfa338d..90eedc43 100644
--- a/karbon/core/vstroke.h
+++ b/karbon/core/vstroke.h
@@ -21,7 +21,7 @@
#ifndef __VSTROKE_H__
#define __VSTROKE_H__
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
#include "vcolor.h"
#include "vdashpattern.h"
@@ -29,7 +29,7 @@
#include "vpattern.h"
#include <koffice_export.h>
-class QDomElement;
+class TQDomElement;
class VObject;
class KoGenStyle;
class KoStyleStack;
@@ -72,14 +72,14 @@ public:
};
VStroke();
- VStroke( VObject* parent, float width = 1.0, const VLineCap cap = capButt,
+ VStroke( VObject* tqparent, float width = 1.0, const VLineCap cap = capButt,
const VLineJoin join = joinMiter, float miterLimit = 10.0 );
- VStroke( const VColor &c, VObject* parent = 0L, float width = 1.0, const VLineCap cap = capButt,
+ VStroke( const VColor &c, VObject* tqparent = 0L, float width = 1.0, const VLineCap cap = capButt,
const VLineJoin join = joinMiter, float miterLimit = 10.0 );
VStroke( const VStroke& stroke );
- void setParent( VObject* parent ) { m_parent = parent; }
- VObject* parent()const { return m_parent; }
+ void setParent( VObject* tqparent ) { m_parent = tqparent; }
+ VObject* tqparent()const { return m_parent; }
VStrokeType type() const { return m_type; }
void setType( VStrokeType type ) { m_type = type; }
@@ -108,15 +108,15 @@ public:
VDashPattern& dashPattern() { return m_dashPattern; }
const VDashPattern& dashPattern() const { return m_dashPattern; }
- void save( QDomElement& element ) const;
+ void save( TQDomElement& element ) const;
void saveOasis( KoGenStyle &style ) const;
- void load( const QDomElement& element );
+ void load( const TQDomElement& element );
void loadOasis( const KoStyleStack &stack );
VStroke& operator=( const VStroke& stroke );
- void transform( const QWMatrix& m );
+ void transform( const TQWMatrix& m );
private:
VObject *m_parent;
diff --git a/karbon/core/vtext.cc b/karbon/core/vtext.cc
index 53c6af51..9f215b59 100644
--- a/karbon/core/vtext.cc
+++ b/karbon/core/vtext.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdom.h>
-#include <qfile.h>
+#include <tqdom.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <KoPoint.h>
@@ -56,7 +56,7 @@ int traceMoveto( FT_Vector *to, VPath *composite )
double tox = ( to->x / 64.0 );
double toy = ( -to->y / 64.0 );
- //QString add = "M" + QString::number(tox) + "," + QString::number(toy) + " ";
+ //TQString add = "M" + TQString::number(tox) + "," + TQString::number(toy) + " ";
//kdDebug(38000) << add.latin1() << endl;
composite->moveTo( KoPoint( tox, toy ) );
@@ -68,7 +68,7 @@ int traceLineto( FT_Vector *to, VPath *composite )
double tox = ( to->x / 64.0 );
double toy = ( -to->y / 64.0 );
- //QString add = "L" + QString::number(tox) + "," + QString::number(toy) + " ";
+ //TQString add = "L" + TQString::number(tox) + "," + TQString::number(toy) + " ";
//kdDebug(38000) << add.latin1() << endl;
composite->lineTo( KoPoint( tox, toy ) );
@@ -83,7 +83,7 @@ int traceQuadraticBezier( FT_Vector *control, FT_Vector *to, VPath *composite )
double x2 = ( to->x / 64.0 );
double y2 = ( -to->y / 64.0 );
- //QString add = "Q" + QString::number(x1) + "," + QString::number(y1) + "," + QString::number(x2) + "," + QString::number(y2) + " ";
+ //TQString add = "Q" + TQString::number(x1) + "," + TQString::number(y1) + "," + TQString::number(x2) + "," + TQString::number(y2) + " ";
//kdDebug(38000) << add.latin1() << endl;
composite->curveTo( KoPoint( x1, y1 ), KoPoint( x2, y2 ), KoPoint( x2, y2 ) );
//composite->curve2To( KoPoint( x1, y1 ), KoPoint( x2, y2 ) );
@@ -100,7 +100,7 @@ int traceCubicBezier( FT_Vector *p, FT_Vector *q, FT_Vector *to, VPath *composit
double x3 = ( to->x / 64.0 );
double y3 = ( -to->y / 64.0 );
- //QString add = "C" + QString::number(x1) + "," + QString::number(y1) + "," + QString::number(x2) + "," + QString::number(y2) + "," + QString::number(x3) + "," + QString::number(y3);
+ //TQString add = "C" + TQString::number(x1) + "," + TQString::number(y1) + "," + TQString::number(x2) + "," + TQString::number(y2) + "," + TQString::number(x3) + "," + TQString::number(y3);
//kdDebug(38000) << add.latin1() << endl;
composite->curveTo( KoPoint( x1, y1 ), KoPoint( x2, y2 ), KoPoint( x3, y3 ) );
@@ -120,15 +120,15 @@ FT_Outline_Funcs OutlineMethods =
#endif // HAVE_KARBONTEXT
-VText::VText( VObject* parent, VState state )
- : VObject( parent, state ), m_basePath( 0L )
+VText::VText( VObject* tqparent, VState state )
+ : VObject( tqparent, state ), m_basePath( 0L )
{
m_glyphs.setAutoDelete( true );
m_boundingBoxIsInvalid = true;
m_stroke = new VStroke( this );
m_fill = new VFill();
m_position = (VText::Position)0;
- m_alignment = (VText::Alignment)0;
+ m_tqalignment = (VText::Alignment)0;
m_shadow = false;
m_translucentShadow = false;
m_shadowAngle = 0;
@@ -137,8 +137,8 @@ VText::VText( VObject* parent, VState state )
}
-VText::VText( const QFont &font, const VSubpath& basePath, Position position, Alignment alignment, const QString& text )
- : VObject( 0L ), m_font( font ), m_basePath( basePath ), m_position( position ), m_alignment( alignment ), m_text( text )
+VText::VText( const TQFont &font, const VSubpath& basePath, Position position, Alignment tqalignment, const TQString& text )
+ : VObject( 0L ), m_font( font ), m_basePath( basePath ), m_position( position ), m_tqalignment( tqalignment ), m_text( text )
{
m_glyphs.setAutoDelete( true );
m_boundingBoxIsInvalid = true;
@@ -148,7 +148,7 @@ VText::VText( const QFont &font, const VSubpath& basePath, Position position, Al
}
VText::VText( const VText& text )
- : VObject( text ), m_font( text.m_font ), m_basePath( text.m_basePath ), m_position( text.m_position ), m_alignment( text.m_alignment ), m_text( text.m_text ), m_shadow( text.m_shadow ), m_translucentShadow( text.m_translucentShadow ), m_shadowDistance( text.m_shadowDistance ), m_shadowAngle( text.m_shadowAngle ), m_offset( text.m_offset )
+ : VObject( text ), m_font( text.m_font ), m_basePath( text.m_basePath ), m_position( text.m_position ), m_tqalignment( text.m_tqalignment ), m_text( text.m_text ), m_shadow( text.m_shadow ), m_translucentShadow( text.m_translucentShadow ), m_shadowDistance( text.m_shadowDistance ), m_shadowAngle( text.m_shadowAngle ), m_offset( text.m_offset )
{
m_stroke = new VStroke( *text.m_stroke );
m_stroke->setParent( this );
@@ -215,15 +215,15 @@ VText::draw( VPainter* painter, const KoRect* /*rect*/ ) const
int shadowDx = int( m_shadowDistance * cos( m_shadowAngle / 360. * 6.2832 ) );
int shadowDy = int( m_shadowDistance * sin( m_shadowAngle / 360. * 6.2832 ) );
- VTransformCmd trafo( 0L, QWMatrix() );
+ VTransformCmd trafo( 0L, TQWMatrix() );
for( itr.toFirst(); itr.current(); ++itr )
{
- trafo.setMatrix( QWMatrix( 1, 0, 0, 1, shadowDx, shadowDy ) );
+ trafo.setMatrix( TQWMatrix( 1, 0, 0, 1, shadowDx, shadowDy ) );
trafo.visit( *( itr.current() ) );
itr.current()->setFill( VFill( color ) );
itr.current()->setStroke( VStroke( color ) );
itr.current()->draw( painter );
- trafo.setMatrix( QWMatrix( 1, 0, 0, 1, -shadowDx, -shadowDy ) );
+ trafo.setMatrix( TQWMatrix( 1, 0, 0, 1, -shadowDx, -shadowDy ) );
trafo.visit( *( itr.current() ) );
}
}
@@ -240,9 +240,9 @@ VText::draw( VPainter* painter, const KoRect* /*rect*/ ) const
if( state() == edit )//|| state() == selected )
{
painter->newPath();
- painter->setRasterOp( Qt::XorROP );
- painter->setPen( Qt::yellow );
- painter->setBrush( Qt::NoBrush );
+ painter->setRasterOp( TQt::XorROP );
+ painter->setPen( TQt::yellow );
+ painter->setBrush( TQt::NoBrush );
for( itr.toFirst(); itr.current(); ++itr )
itr.current()->draw( painter );
@@ -287,7 +287,7 @@ VText::clone() const
VGroup* VText::toVGroup() const
{
- VGroup* group = new VGroup( parent() );
+ VGroup* group = new VGroup( tqparent() );
VPathListIterator itr( m_glyphs );
for( itr.toFirst(); itr.current(); ++itr )
@@ -304,11 +304,11 @@ VGroup* VText::toVGroup() const
} // VText::toVGroup
void
-VText::save( QDomElement& element ) const
+VText::save( TQDomElement& element ) const
{
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "TEXT" );
+ TQDomElement me = element.ownerDocument().createElement( "TEXT" );
VPath path( 0L );
path.combinePath( m_basePath );
@@ -323,7 +323,7 @@ VText::save( QDomElement& element ) const
me.setAttribute( "italic", m_font.italic() );
me.setAttribute( "bold", m_font.bold() );
me.setAttribute( "position", m_position );
- me.setAttribute( "alignment", m_alignment );
+ me.setAttribute( "tqalignment", m_tqalignment );
me.setAttribute( "shadow", m_shadow );
me.setAttribute( "translucentshadow", m_translucentShadow );
me.setAttribute( "shadowangle", m_shadowAngle );
@@ -339,17 +339,17 @@ VText::save( QDomElement& element ) const
}
void
-VText::load( const QDomElement& element )
+VText::load( const TQDomElement& element )
{
m_glyphs.clear();
m_font.setFamily( element.attribute( "family", "Times" ) );
m_font.setPointSize( element.attribute( "size", "12" ).toInt() );
m_font.setItalic( element.attribute( "italic" ).toInt() == 1 );
- m_font.setWeight( QFont::Normal );
+ m_font.setWeight( TQFont::Normal );
m_font.setBold( element.attribute( "bold" ).toInt() == 1 );
m_position = (Position)element.attribute( "position", "0" ).toInt();
- m_alignment = (Alignment)element.attribute( "alignment", "0" ).toInt();
+ m_tqalignment = (Alignment)element.attribute( "tqalignment", "0" ).toInt();
m_shadow = ( element.attribute( "shadow" ).toInt() == 1 );
m_translucentShadow = ( element.attribute( "translucentshadow" ).toInt() == 1 );
m_shadowAngle = element.attribute( "shadowangle" ).toInt();
@@ -359,8 +359,8 @@ VText::load( const QDomElement& element )
VObject::load( element );
- QDomNodeList list = element.childNodes();
- QDomElement e = list.item( 0 ).toElement();
+ TQDomNodeList list = element.childNodes();
+ TQDomElement e = list.item( 0 ).toElement();
// element to start with reading glyph paths and stroke, fill, etc.
uint startElement = 0;
@@ -401,7 +401,7 @@ VText::load( const QDomElement& element )
}
void
-VText::setText( const QString& text )
+VText::setText( const TQString& text )
{
if( m_text != text )
{
@@ -453,17 +453,17 @@ VText::traceText()
// Build FontConfig request pattern
int id = -1;
- QString filename = buildRequest( m_font.family(), weight, slant, m_font.pointSize(), id );
+ TQString filename = buildRequest( m_font.family(), weight, slant, m_font.pointSize(), id );
m_glyphs.clear();
- kdDebug(38000) << "Loading " << filename.latin1() << " for requested font \"" << m_font.family().latin1() << "\", " << m_font.pointSize() << " pt." << endl;
+ kdDebug(38000) << "Loading " << filename.latin1() << " for requested font \"" << TQString(m_font.family()).latin1() << "\", " << m_font.pointSize() << " pt." << endl;
FT_UInt glyphIndex;
FT_Face fontFace;
// TODO : this lib should probably be a singleton (Rob)
FT_Library library;
FT_Init_FreeType( &library );
- FT_Error error = FT_New_Face( library, QFile::encodeName(filename), id, &fontFace );
+ FT_Error error = FT_New_Face( library, TQFile::encodeName(filename), id, &fontFace );
if( error )
{
@@ -473,7 +473,7 @@ VText::traceText()
bool foundCharmap = false;
- // Try to choose unicode charmap
+ // Try to choose tqunicode charmap
for( int charmap = 0; charmap < fontFace->num_charmaps; charmap++ )
{
if( fontFace->charmaps[charmap]->encoding == ft_encoding_unicode )
@@ -481,14 +481,14 @@ VText::traceText()
FT_Error error = FT_Set_Charmap( fontFace, fontFace->charmaps[charmap] );
if( error )
{
- kdDebug(38000) << "traceText(), unable to select unicode charmap." << endl;
+ kdDebug(38000) << "traceText(), unable to select tqunicode charmap." << endl;
continue;
}
foundCharmap = true;
}
}
- // Choose first charmap if no unicode charmap was found
+ // Choose first charmap if no tqunicode charmap was found
if( ! foundCharmap )
{
error = FT_Set_Charmap( fontFace, fontFace->charmaps[0] );
@@ -512,13 +512,13 @@ VText::traceText()
// storing glyphs.
float l = 0;
- QValueList<float> glyphXAdvance;
- QValueList<float> glyphYAdvance;
+ TQValueList<float> glyphXAdvance;
+ TQValueList<float> glyphYAdvance;
for( unsigned int i = 0; i < m_text.length(); i++ )
{
// get the glyph index for the current character
- QChar character = m_text.at( i );
- glyphIndex = FT_Get_Char_Index( fontFace, character.unicode() );
+ TQChar character = m_text.at( i );
+ glyphIndex = FT_Get_Char_Index( fontFace, character.tqunicode() );
if( ! glyphIndex )
{
kdDebug(38000) << "traceText(), unable get index of char : " << character << endl;
@@ -575,7 +575,7 @@ VText::traceText()
kdDebug(38000) << "traceText(), using offset : " << m_offset << endl;
float x = m_offset * pathLength;
- switch( m_alignment )
+ switch( m_tqalignment )
{
case Left: x += 0; break;
case Center: x -= 0.5 * l; break;
@@ -603,7 +603,7 @@ VText::traceText()
// Step 1: place (0, 0) to the rotation center of the glyph.
dx = *glyphXAdvance.at( i ) / 2;
x += dx;
- VTransformCmd trafo( 0L, QWMatrix( 1, 0, 0, 1, -dx, y + yoffset ) );
+ VTransformCmd trafo( 0L, TQWMatrix( 1, 0, 0, 1, -dx, y + yoffset ) );
trafo.visit( *composite );
// Step 2: find the position where to draw.
@@ -640,11 +640,11 @@ VText::traceText()
// Step 3: transform glyph and append it. That's it, we've got
// text following a path. Really easy, isn't it ;) ?
- trafo.setMatrix( QWMatrix( tangent.x(), tangent.y(), tangent.y(), -tangent.x(), point.x(), point.y() ) );
+ trafo.setMatrix( TQWMatrix( tangent.x(), tangent.y(), tangent.y(), -tangent.x(), point.x(), point.y() ) );
trafo.visit( *composite );
composite->setState( state() );
- //kdDebug(38000) << "Glyph: " << (QString)character << " [String pos: " << x << ", " << y << " / Canvas pos: " << point.x() << ", " << point.y() << "]" << endl;
+ //kdDebug(38000) << "Glyph: " << (TQString)character << " [String pos: " << x << ", " << y << " / Canvas pos: " << point.x() << ", " << point.y() << "]" << endl;
x += dx;
y += *glyphYAdvance.at( i );
@@ -655,17 +655,17 @@ VText::traceText()
}
// This routine is copied from KSVGFont (Rob)
-QString
-VText::buildRequest( QString family, int weight, int slant, double size, int &id )
+TQString
+VText::buildRequest( TQString family, int weight, int slant, double size, int &id )
{
// Strip those stupid [Xft or whatever]...
int pos;
- if( ( pos = family.find( '[' ) ) )
+ if( ( pos = family.tqfind( '[' ) ) )
family = family.left( pos );
// Use FontConfig to locate & select fonts and use FreeType2 to open them
FcPattern *pattern;
- QString fileName;
+ TQString fileName;
pattern = FcPatternBuild( 0, FC_WEIGHT, FcTypeInteger, weight,
FC_SLANT, FcTypeInteger, slant,
@@ -710,13 +710,13 @@ VText::buildRequest( QString family, int weight, int slant, double size, int &id
FcPatternGetInteger(pattern, FC_INDEX, 0, &id) != FcResultMatch )
{
kdDebug(38000) << "VText::buildRequest(), could not load font file for requested font \"" << family.latin1() << "\"" << endl;
- return QString::null;
+ return TQString();
}
- fileName = QFile::decodeName(reinterpret_cast<const char *>( temp ));
+ fileName = TQFile::decodeName(reinterpret_cast<const char *>( temp ));
// get family name of matched font
- QString newFamily;
+ TQString newFamily;
if( FcResultMatch == FcPatternGetString( pattern, FC_FAMILY, 0, &temp ) )
m_font.setFamily( reinterpret_cast<const char *>( temp ) );
diff --git a/karbon/core/vtext.h b/karbon/core/vtext.h
index 962705ea..55455c5f 100644
--- a/karbon/core/vtext.h
+++ b/karbon/core/vtext.h
@@ -24,9 +24,9 @@
#include <config.h>
#endif
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qfont.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqfont.h>
#include <koffice_export.h>
#include "vpath.h"
@@ -34,8 +34,8 @@
class VGroup;
-typedef QPtrList<VPath> VPathList;
-typedef QPtrListIterator<VPath> VPathListIterator;
+typedef TQPtrList<VPath> VPathList;
+typedef TQPtrListIterator<VPath> VPathListIterator;
#ifdef Above
#undef Above
@@ -56,22 +56,22 @@ public:
Right
};
- VText( VObject* parent, VState state = normal );
- VText( const QFont &font, const VSubpath& basePath, Position position, Alignment alignment, const QString& text );
+ VText( VObject* tqparent, VState state = normal );
+ VText( const TQFont &font, const VSubpath& basePath, Position position, Alignment tqalignment, const TQString& text );
VText( const VText& text );
virtual ~VText();
virtual DCOPObject* dcopObject();
- virtual void setText( const QString& text );
- virtual const QString& text() { return m_text; }
- virtual void setFont( const QFont& font ) { m_font = font; }
- virtual const QFont& font() { return m_font; }
+ virtual void setText( const TQString& text );
+ virtual const TQString& text() { return m_text; }
+ virtual void setFont( const TQFont& font ) { m_font = font; }
+ virtual const TQFont& font() { return m_font; }
virtual void setBasePath( const VSubpath& path ) { m_basePath = path; }
virtual VSubpath& basePath() { return m_basePath; }
virtual void setPosition( Position position ) { m_position = position; }
virtual Position position() { return m_position; }
- virtual void setAlignment( Alignment alignment ) { m_alignment = alignment; }
- virtual Alignment alignment() { return m_alignment; }
+ virtual void tqsetAlignment( Alignment tqalignment ) { m_tqalignment = tqalignment; }
+ virtual Alignment tqalignment() { return m_tqalignment; }
virtual void setUseShadow( bool state ) { m_shadow = state; }
virtual bool useShadow() { return m_shadow; }
virtual void setShadow( int angle, int distance, bool translucent )
@@ -94,8 +94,8 @@ public:
virtual const KoRect& boundingBox() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
virtual VText* clone() const;
virtual VGroup* toVGroup() const;
@@ -108,20 +108,20 @@ public:
void traceText();
protected:
- QString buildRequest( QString family, int weight, int slant, double size, int &id );
+ TQString buildRequest( TQString family, int weight, int slant, double size, int &id );
#endif // HAVE_KARBONTEXT
private:
// The font to use to draw the text.
- QFont m_font;
+ TQFont m_font;
// The base path. Doesn't belong to the document.
VSubpath m_basePath;
// The text position
Position m_position;
- // The text alignment
- Alignment m_alignment;
+ // The text tqalignment
+ Alignment m_tqalignment;
// The text to draw
- QString m_text;
+ TQString m_text;
// Shadow parameters
bool m_shadow;
bool m_translucentShadow;
diff --git a/karbon/core/vtext_iface.cc b/karbon/core/vtext_iface.cc
index 1a01b192..7cbeaf37 100644
--- a/karbon/core/vtext_iface.cc
+++ b/karbon/core/vtext_iface.cc
@@ -26,12 +26,12 @@ VTextIface::VTextIface( VText *text )
}
void
-VTextIface::setText( QString text )
+VTextIface::setText( TQString text )
{
m_text->setText( text );
}
-QString
+TQString
VTextIface::text()
{
return m_text->text();
@@ -40,7 +40,7 @@ VTextIface::text()
void
VTextIface::setFontSize( int pointSize )
{
- QFont font = m_text->font();
+ TQFont font = m_text->font();
font.setPointSize( pointSize );
m_text->setFont( font );
}
diff --git a/karbon/core/vtext_iface.h b/karbon/core/vtext_iface.h
index 6cca452a..dc51eca7 100644
--- a/karbon/core/vtext_iface.h
+++ b/karbon/core/vtext_iface.h
@@ -32,8 +32,8 @@ public:
VTextIface( VText *text );
k_dcop:
- void setText( QString text );
- QString text();
+ void setText( TQString text );
+ TQString text();
void setFontSize( int pointSize );
int fontSize();
diff --git a/karbon/dialogs/vcolordlg.cc b/karbon/dialogs/vcolordlg.cc
index 6acefa24..b12d983b 100644
--- a/karbon/dialogs/vcolordlg.cc
+++ b/karbon/dialogs/vcolordlg.cc
@@ -24,8 +24,8 @@
#include "vcolordlg.h"
#include "vcolortab.h"
-VColorDlg::VColorDlg( const VColor &c, QWidget* parent, const char* name )
- : KDialogBase ( parent, name, true, i18n( "Uniform Color" ),
+VColorDlg::VColorDlg( const VColor &c, TQWidget* tqparent, const char* name )
+ : KDialogBase ( tqparent, name, true, i18n( "Uniform Color" ),
KDialogBase::Ok | KDialogBase::Cancel )
{
m_colortab = new VColorTab( VColor( c ), this, name );
diff --git a/karbon/dialogs/vcolordlg.h b/karbon/dialogs/vcolordlg.h
index 820bb1bf..92fc0857 100644
--- a/karbon/dialogs/vcolordlg.h
+++ b/karbon/dialogs/vcolordlg.h
@@ -30,9 +30,10 @@ class VFill;
class VColorDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VColorDlg( const VColor &c, QWidget* parent = 0L, const char* name = 0L );
+ VColorDlg( const VColor &c, TQWidget* tqparent = 0L, const char* name = 0L );
VColor Color();
diff --git a/karbon/dialogs/vcolortab.cc b/karbon/dialogs/vcolortab.cc
index 037fdc6e..f66a9ced 100644
--- a/karbon/dialogs/vcolortab.cc
+++ b/karbon/dialogs/vcolortab.cc
@@ -18,9 +18,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <kcolordialog.h>
#include <klocale.h>
@@ -34,67 +34,67 @@
#include <kdebug.h>
-VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name )
- : QTabWidget( parent, name )
+VColorTab::VColorTab( const VColor &c, TQWidget* tqparent, const char* name )
+ : TQTabWidget( tqparent, name )
{
- QGridLayout *mainLayout;
+ TQGridLayout *mainLayout;
- mRGBWidget = new QWidget( this );
- mainLayout = new QGridLayout( mRGBWidget, 3, 3 );
+ mRGBWidget = new TQWidget( this );
+ mainLayout = new TQGridLayout( mRGBWidget, 3, 3 );
mColorSelector = new KHSSelector( mRGBWidget );
mColorSelector->setMinimumHeight( 165 );
mColorSelector->setMinimumWidth( 165 );
- connect( mColorSelector, SIGNAL( valueChanged( int, int ) ), this, SLOT( slotHSChanged( int, int ) ) );
+ connect( mColorSelector, TQT_SIGNAL( valueChanged( int, int ) ), this, TQT_SLOT( slotHSChanged( int, int ) ) );
mainLayout->addMultiCellWidget(mColorSelector, 0, 2, 0, 0 );
//Selector
- mSelector = new KGradientSelector( KSelector::Vertical, mRGBWidget );
- mSelector->setColors( QColor( "white" ), QColor( "black" ) );
+ mSelector = new KGradientSelector( Qt::Vertical, mRGBWidget );
+ mSelector->setColors( TQColor( "white" ), TQColor( "black" ) );
mSelector->setMinimumWidth( 20 );
- //TODO: Make it autochange color if the solid-filled object is selected (also for QSpinBoxes)
- connect( mSelector, SIGNAL( valueChanged( int ) ), this, SLOT( slotVChanged( int ) ) );
+ //TODO: Make it autochange color if the solid-filled object is selected (also for TQSpinBoxes)
+ connect( mSelector, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotVChanged( int ) ) );
mainLayout->addMultiCellWidget( mSelector, 0, 2, 1, 1 );
//Reference
- QGroupBox* groupbox = new QGroupBox( 2, Vertical, i18n( "Reference" ), mRGBWidget );
- new QLabel( i18n( "Old:" ), groupbox );
- new QLabel( i18n( "New:" ), groupbox );
+ TQGroupBox* groupbox = new TQGroupBox( 2,Qt::Vertical, i18n( "Reference" ), mRGBWidget );
+ new TQLabel( i18n( "Old:" ), groupbox );
+ new TQLabel( i18n( "New:" ), groupbox );
mOldColor = new KColorPatch( groupbox );
mColorPreview = new KColorPatch( groupbox );
- QColor color( c );
+ TQColor color( c );
mOldColor->setColor( color );
mColorPreview->setColor( color );
mainLayout->addWidget( groupbox, 0, 2 );
//Components
- QGroupBox* cgroupbox = new QGroupBox( 3, Vertical, i18n( "Components" ), mRGBWidget );
+ TQGroupBox* cgroupbox = new TQGroupBox( 3,Qt::Vertical, i18n( "Components" ), mRGBWidget );
//--->RGB
- new QLabel( i18n( "R:" ), cgroupbox );
- new QLabel( i18n( "G:" ), cgroupbox );
- new QLabel( i18n( "B:" ), cgroupbox );
+ new TQLabel( i18n( "R:" ), cgroupbox );
+ new TQLabel( i18n( "G:" ), cgroupbox );
+ new TQLabel( i18n( "B:" ), cgroupbox );
mRed = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox );
mGreen = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox );
mBlue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox );
- connect( mRed, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) );
- connect( mGreen, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) );
- connect( mBlue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromRGBSpinBoxes() ) );
+ connect( mRed, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) );
+ connect( mGreen, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) );
+ connect( mBlue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromRGBSpinBoxes() ) );
//--->HSV
- new QLabel( i18n( "Hue:", "H:" ), cgroupbox );
- new QLabel( i18n( "Saturation:", "S:" ), cgroupbox );
- new QLabel( i18n( "Value:", "V:" ), cgroupbox );
+ new TQLabel( i18n( "Hue:", "H:" ), cgroupbox );
+ new TQLabel( i18n( "Saturation:", "S:" ), cgroupbox );
+ new TQLabel( i18n( "Value:", "V:" ), cgroupbox );
mHue = new KIntSpinBox( 0, 359, 1, 0, 10, cgroupbox );
mSaturation = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox );
mValue = new KIntSpinBox( 0, 255, 1, 0, 10, cgroupbox );
- connect( mHue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) );
- connect( mSaturation, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) );
- connect( mValue, SIGNAL( valueChanged(int) ), this, SLOT( slotUpdateFromHSVSpinBoxes() ) );
+ connect( mHue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) );
+ connect( mSaturation, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) );
+ connect( mValue, TQT_SIGNAL( valueChanged(int) ), this, TQT_SLOT( slotUpdateFromHSVSpinBoxes() ) );
mainLayout->addWidget( cgroupbox, 1, 2 );
//--->Opacity
- QGroupBox* ogroupBox = new QGroupBox( 1, Vertical, i18n( "Opacity" ), mRGBWidget );
+ TQGroupBox* ogroupBox = new TQGroupBox( 1,Qt::Vertical, i18n( "Opacity" ), mRGBWidget );
mOpacity = new KIntNumInput( 100, ogroupBox );
mOpacity->setRange( 0, 100, 1, true );
mOpacity->setValue( int( c.opacity() * 100.0 ) );
@@ -114,7 +114,7 @@ VColorTab::VColorTab( const VColor &c, QWidget* parent, const char* name )
void VColorTab::slotUpdateFromRGBSpinBoxes()
{
- QColor color( mRed->value(), mGreen->value(), mBlue->value(), QColor::Rgb );
+ TQColor color( mRed->value(), mGreen->value(), mBlue->value(), TQColor::Rgb );
mColorPreview->setColor( color );
mColorPreview->update();
@@ -143,7 +143,7 @@ void VColorTab::slotUpdateFromRGBSpinBoxes()
void VColorTab::slotUpdateFromHSVSpinBoxes()
{
- QColor color( mHue->value(), mSaturation->value(), mValue->value(), QColor::Hsv );
+ TQColor color( mHue->value(), mSaturation->value(), mValue->value(), TQColor::Hsv );
mColorPreview->setColor( color );
mColorPreview->update();
@@ -181,17 +181,17 @@ VColor VColorTab::Color()
void VColorTab::slotHSChanged( int h, int s )
{
- //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv );
+ //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv );
mHue->setValue( h );
mSaturation->setValue( s );
- QColor color1( h, s, 255, QColor::Hsv );
- QColor color2( h, s, 0, QColor::Hsv );
+ TQColor color1( h, s, 255, TQColor::Hsv );
+ TQColor color2( h, s, 0, TQColor::Hsv );
mSelector->setColors( color1, color2 );
}
void VColorTab::slotVChanged( int newVal )
{
- //QColor color( mHue->value(), mSaturation->value(), newVal, QColor::Hsv );
+ //TQColor color( mHue->value(), mSaturation->value(), newVal, TQColor::Hsv );
mValue->setValue( static_cast<int>( float( newVal ) / 99.0 * 255.0 ) );
}
diff --git a/karbon/dialogs/vcolortab.h b/karbon/dialogs/vcolortab.h
index 18a00f7c..5397cdb8 100644
--- a/karbon/dialogs/vcolortab.h
+++ b/karbon/dialogs/vcolortab.h
@@ -21,9 +21,9 @@
#ifndef __VCOLORTAB_H
#define __VCOLORTAB_H
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
-class QColor;
+class TQColor;
class KHSSelector;
class KIntSpinBox;
class KGradientSelector;
@@ -31,17 +31,18 @@ class KColorPatch;
class KIntNumInput;
class VColor;
-class VColorTab : public QTabWidget
+class VColorTab : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VColorTab( const VColor &c, QWidget* parent = 0L, const char* name = 0L );
+ VColorTab( const VColor &c, TQWidget* tqparent = 0L, const char* name = 0L );
VColor Color();
private:
- QWidget* mRGBWidget;
+ TQWidget* mRGBWidget;
KHSSelector* mColorSelector;
KIntSpinBox* mRed;
KIntSpinBox* mGreen;
diff --git a/karbon/dialogs/vconfiguredlg.cc b/karbon/dialogs/vconfiguredlg.cc
index c8439753..bbe6d629 100644
--- a/karbon/dialogs/vconfiguredlg.cc
+++ b/karbon/dialogs/vconfiguredlg.cc
@@ -19,14 +19,14 @@
#include <float.h>
-#include <qcheckbox.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qvbox.h>
-#include <qvgroupbox.h>
-#include <qcombobox.h>
-#include <qgrid.h>
+#include <tqcheckbox.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqvbox.h>
+#include <tqvgroupbox.h>
+#include <tqcombobox.h>
+#include <tqgrid.h>
#include <kiconloader.h>
#include <kconfig.h>
@@ -43,38 +43,38 @@
#include "vconfiguredlg.h"
-VConfigureDlg::VConfigureDlg( KarbonView* parent )
+VConfigureDlg::VConfigureDlg( KarbonView* tqparent )
: KDialogBase( KDialogBase::IconList, i18n( "Configure" ),
KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default,
- KDialogBase::Ok, parent )
+ KDialogBase::Ok, tqparent )
{
- QVBox * page = addVBoxPage(
+ TQVBox * page = addVBoxPage(
i18n( "Interface" ), i18n( "Interface" ),
BarIcon( "misc", KIcon::SizeMedium ) );
- m_interfacePage = new VConfigInterfacePage( parent, page );
+ m_interfacePage = new VConfigInterfacePage( tqparent, page );
page = addVBoxPage(
i18n( "Misc" ), i18n( "Misc" ),
BarIcon( "misc", KIcon::SizeMedium ) );
- m_miscPage = new VConfigMiscPage( parent, page );
+ m_miscPage = new VConfigMiscPage( tqparent, page );
page = addVBoxPage(
i18n( "Grid" ), i18n( "Grid" ),
BarIcon( "grid", KIcon::SizeMedium ) );
- m_gridPage = new VConfigGridPage( parent, page );
+ m_gridPage = new VConfigGridPage( tqparent, page );
- connect( m_miscPage, SIGNAL( unitChanged( int ) ), m_gridPage, SLOT( slotUnitChanged( int ) ) );
+ connect( m_miscPage, TQT_SIGNAL( unitChanged( int ) ), m_gridPage, TQT_SLOT( slotUnitChanged( int ) ) );
page = addVBoxPage(
i18n( "Document" ), i18n( "Document Settings" ),
BarIcon( "document", KIcon::SizeMedium ) );
- m_defaultDocPage = new VConfigDefaultPage( parent, page );
- connect( this, SIGNAL( okClicked() ), this, SLOT( slotApply() ) );
+ m_defaultDocPage = new VConfigDefaultPage( tqparent, page );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotApply() ) );
}
void VConfigureDlg::slotApply()
@@ -104,8 +104,8 @@ void VConfigureDlg::slotDefault()
VConfigInterfacePage::VConfigInterfacePage( KarbonView* view,
- QVBox* box, char* name )
- : QObject( box->parent(), name )
+ TQVBox* box, char* name )
+ : TQObject( box->tqparent(), name )
{
m_view = view;
m_config = KarbonFactory::instance()->config();
@@ -115,7 +115,7 @@ VConfigInterfacePage::VConfigInterfacePage( KarbonView* view,
m_oldDockerFontSize = 8;
bool oldShowStatusBar = true;
- QVGroupBox* tmpQGroupBox = new QVGroupBox( i18n( "Interface" ), box );
+ TQVGroupBox* tmpTQGroupBox = new TQVGroupBox( i18n( "Interface" ), box );
m_config->setGroup( "" );
@@ -135,18 +135,18 @@ VConfigInterfacePage::VConfigInterfacePage( KarbonView* view,
"CopyOffset", m_oldCopyOffset );
}
- m_showStatusBar = new QCheckBox( i18n( "Show status bar" ), tmpQGroupBox );
+ m_showStatusBar = new TQCheckBox( i18n( "Show status bar" ), tmpTQGroupBox );
m_showStatusBar->setChecked( oldShowStatusBar );
- m_recentFiles = new KIntNumInput( m_oldRecentFiles, tmpQGroupBox );
+ m_recentFiles = new KIntNumInput( m_oldRecentFiles, tmpTQGroupBox );
m_recentFiles->setRange( 1, 20, 1 );
m_recentFiles->setLabel( i18n( "Number of recent files:" ) );
- m_copyOffset = new KIntNumInput( m_oldCopyOffset, tmpQGroupBox );
+ m_copyOffset = new KIntNumInput( m_oldCopyOffset, tmpTQGroupBox );
m_copyOffset->setRange( 1, 50, 1 );
m_copyOffset->setLabel( i18n( "Copy offset:" ) );
- m_dockerFontSize = new KIntNumInput( m_oldDockerFontSize, tmpQGroupBox );
+ m_dockerFontSize = new KIntNumInput( m_oldDockerFontSize, tmpTQGroupBox );
m_dockerFontSize->setRange( 5, 20, 1 );
m_dockerFontSize->setLabel( i18n( "Palette font size:" ) );
}
@@ -209,23 +209,23 @@ void VConfigInterfacePage::slotDefault()
}
-VConfigMiscPage::VConfigMiscPage( KarbonView* view, QVBox* box, char* name )
- : QObject( box->parent(), name )
+VConfigMiscPage::VConfigMiscPage( KarbonView* view, TQVBox* box, char* name )
+ : TQObject( box->tqparent(), name )
{
m_view = view;
m_config = KarbonFactory::instance()->config();
KoUnit::Unit unit = view->part()->unit();
- QGroupBox* tmpQGroupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Misc" ), box, "GroupBox" );
- tmpQGroupBox->layout()->setSpacing(KDialog::spacingHint());
- tmpQGroupBox->layout()->setMargin(KDialog::marginHint());
+ TQGroupBox* tmpTQGroupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Misc" ), box, "GroupBox" );
+ tmpTQGroupBox->tqlayout()->setSpacing(KDialog::spacingHint());
+ tmpTQGroupBox->tqlayout()->setMargin(KDialog::marginHint());
- QGridLayout* grid = new QGridLayout(tmpQGroupBox->layout(), 4, 2 );
+ TQGridLayout* grid = new TQGridLayout(tmpTQGroupBox->tqlayout(), 4, 2 );
m_oldUndoRedo = 30;
- QString unitType = KoUnit::unitName( unit );
+ TQString unitType = KoUnit::unitName( unit );
//#################"laurent
//don't load unitType from config file because unit is
//depend from kword file => unit can be different from config file
@@ -236,20 +236,20 @@ VConfigMiscPage::VConfigMiscPage( KarbonView* view, QVBox* box, char* name )
m_oldUndoRedo = m_config->readNumEntry( "UndoRedo", m_oldUndoRedo );
}
- m_undoRedo = new KIntNumInput( m_oldUndoRedo, tmpQGroupBox );
+ m_undoRedo = new KIntNumInput( m_oldUndoRedo, tmpTQGroupBox );
m_undoRedo->setLabel( i18n( "Undo/redo limit:" ) );
m_undoRedo->setRange( 10, 60, 1 );
grid->addMultiCellWidget( m_undoRedo, 0, 0, 0, 1 );
- grid->addWidget( new QLabel( i18n( "Units:" ), tmpQGroupBox ), 1, 0 );
+ grid->addWidget( new TQLabel( i18n( "Units:" ), tmpTQGroupBox ), 1, 0 );
- m_unit = new QComboBox( tmpQGroupBox );
+ m_unit = new TQComboBox( tmpTQGroupBox );
m_unit->insertStringList( KoUnit::listOfUnitName() );
grid->addWidget( m_unit, 1, 1 );
m_oldUnit = KoUnit::unit( unitType );
m_unit->setCurrentItem( m_oldUnit );
- connect( m_unit, SIGNAL( activated( int ) ), SIGNAL( unitChanged( int ) ) );
+ connect( m_unit, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( unitChanged( int ) ) );
}
void VConfigMiscPage::apply()
@@ -282,8 +282,8 @@ void VConfigMiscPage::slotDefault()
m_unit->setCurrentItem( 0 );
}
-VConfigGridPage::VConfigGridPage( KarbonView* view, QVBox* page, char* name )
- : QObject( page->parent(), name )
+VConfigGridPage::VConfigGridPage( KarbonView* view, TQVBox* page, char* name )
+ : TQObject( page->tqparent(), name )
{
m_view = view;
KoUnit::Unit unit = view->part()->document().unit();
@@ -295,41 +295,41 @@ VConfigGridPage::VConfigGridPage( KarbonView* view, QVBox* page, char* name )
double sw = gd.snap.width();
double sh = gd.snap.height();
- m_gridChBox = new QCheckBox( i18n( "Show &grid" ), page );
+ m_gridChBox = new TQCheckBox( i18n( "Show &grid" ), page );
m_gridChBox->setChecked( gd.isShow );
- m_snapChBox = new QCheckBox( i18n( "Snap to g&rid" ), page );
+ m_snapChBox = new TQCheckBox( i18n( "Snap to g&rid" ), page );
m_snapChBox->setChecked( gd.isSnap );
- QLabel* gridColorLbl = new QLabel( i18n( "Grid &color:" ), page);
+ TQLabel* gridColorLbl = new TQLabel( i18n( "Grid &color:" ), page);
m_gridColorBtn = new KColorButton( gd.color, page );
gridColorLbl->setBuddy( m_gridColorBtn );
- QGroupBox* spacingGrp = new QGroupBox( 2, Qt::Horizontal, i18n( "Spacing" ), page );
- QLabel* spaceHorizLbl = new QLabel( i18n( "&Horizontal:" ), spacingGrp );
+ TQGroupBox* spacingGrp = new TQGroupBox( 2, Qt::Horizontal, i18n( "Spacing" ), page );
+ TQLabel* spaceHorizLbl = new TQLabel( i18n( "&Horizontal:" ), spacingGrp );
m_spaceHorizUSpin = new KoUnitDoubleSpinBox( spacingGrp, 0.0, pgw, 0.1, fw, unit );
spaceHorizLbl->setBuddy( m_spaceHorizUSpin );
- QLabel* spaceVertLbl = new QLabel( i18n( "&Vertical:" ), spacingGrp );
+ TQLabel* spaceVertLbl = new TQLabel( i18n( "&Vertical:" ), spacingGrp );
m_spaceVertUSpin = new KoUnitDoubleSpinBox( spacingGrp, 0.0, pgh, 0.1, fh, unit );
spaceVertLbl->setBuddy( m_spaceVertUSpin );
- QGroupBox* snapGrp = new QGroupBox( 2, Qt::Horizontal, i18n( "Snap Distance" ), page );
- QLabel* snapHorizLbl = new QLabel( i18n( "H&orizontal:" ), snapGrp );
+ TQGroupBox* snapGrp = new TQGroupBox( 2, Qt::Horizontal, i18n( "Snap Distance" ), page );
+ TQLabel* snapHorizLbl = new TQLabel( i18n( "H&orizontal:" ), snapGrp );
m_snapHorizUSpin = new KoUnitDoubleSpinBox( snapGrp, 0.0, fw, 0.1, sw, unit );
snapHorizLbl->setBuddy( m_snapHorizUSpin );
- QLabel* snapVertLbl = new QLabel( i18n( "V&ertical:" ), snapGrp );
+ TQLabel* snapVertLbl = new TQLabel( i18n( "V&ertical:" ), snapGrp );
m_snapVertUSpin = new KoUnitDoubleSpinBox( snapGrp, 0.0, fh, 0.1, sh, unit );
snapVertLbl->setBuddy( m_snapVertUSpin );
- QGridLayout* gl = new QGridLayout();
+ TQGridLayout* gl = new TQGridLayout();
gl->setSpacing( KDialog::spacingHint() );
gl->addMultiCellWidget( m_gridChBox, 0, 0, 0, 2 );
gl->addMultiCellWidget( m_snapChBox, 1, 1, 0, 2 );
gl->addWidget( gridColorLbl, 2, 0) ;
gl->addWidget( m_gridColorBtn, 2, 1 );
- gl->addItem( new QSpacerItem( 0, 0 ), 2, 2 );
+ gl->addItem( new TQSpacerItem( 0, 0 ), 2, 2 );
gl->addMultiCellWidget( spacingGrp, 3, 3, 0, 2 );
gl->addMultiCellWidget( snapGrp, 4, 4, 0, 2 );
- gl->addMultiCell( new QSpacerItem( 0, 0 ), 5, 5, 0, 2 );
+ gl->addMultiCell( new TQSpacerItem( 0, 0 ), 5, 5, 0, 2 );
- connect( m_spaceHorizUSpin, SIGNAL( valueChanged( double ) ), SLOT( setMaxHorizSnap( double ) ) );
- connect( m_spaceVertUSpin, SIGNAL( valueChanged( double ) ), SLOT( setMaxVertSnap( double ) ) ) ;
+ connect( m_spaceHorizUSpin, TQT_SIGNAL( valueChanged( double ) ), TQT_SLOT( setMaxHorizSnap( double ) ) );
+ connect( m_spaceVertUSpin, TQT_SIGNAL( valueChanged( double ) ), TQT_SLOT( setMaxVertSnap( double ) ) ) ;
}
void VConfigGridPage::setMaxHorizSnap( double v )
@@ -361,7 +361,7 @@ void VConfigGridPage::apply()
gd.isShow = m_gridChBox->isChecked();
gd.isSnap = m_snapChBox->isChecked();
gd.color = m_gridColorBtn->color();
- m_view->repaintAll();
+ m_view->tqrepaintAll();
}
void VConfigGridPage::slotDefault()
@@ -373,18 +373,18 @@ void VConfigGridPage::slotDefault()
m_snapVertUSpin->setValue( KoUnit::toUserValue( 20.0, unit ) );
m_gridChBox->setChecked( true );
m_snapChBox->setChecked( true );
- m_gridColorBtn->setColor( QColor( 228, 228, 228 ) );
+ m_gridColorBtn->setColor( TQColor( 228, 228, 228 ) );
}
VConfigDefaultPage::VConfigDefaultPage( KarbonView* view,
- QVBox* box, char* name )
- : QObject( box->parent(), name )
+ TQVBox* box, char* name )
+ : TQObject( box->tqparent(), name )
{
m_view = view;
m_config = KarbonFactory::instance()->config();
- QVGroupBox* gbDocumentSettings = new QVGroupBox(
+ TQVGroupBox* gbDocumentSettings = new TQVGroupBox(
i18n( "Document Settings" ), box );
gbDocumentSettings->setMargin( KDialog::marginHint() );
gbDocumentSettings->setInsideSpacing( KDialog::spacingHint() );
@@ -409,10 +409,10 @@ VConfigDefaultPage::VConfigDefaultPage( KarbonView* view,
m_autoSave->setSpecialValueText( i18n( "No auto save" ) );
m_autoSave->setSuffix( i18n( "min" ) );
- m_createBackupFile = new QCheckBox( i18n( "Create backup file" ), gbDocumentSettings );
+ m_createBackupFile = new TQCheckBox( i18n( "Create backup file" ), gbDocumentSettings );
m_createBackupFile->setChecked( m_oldBackupFile );
- m_saveAsPath = new QCheckBox( i18n( "Save as path" ), gbDocumentSettings );
+ m_saveAsPath = new TQCheckBox( i18n( "Save as path" ), gbDocumentSettings );
m_saveAsPath->setChecked( m_oldSaveAsPath );
}
diff --git a/karbon/dialogs/vconfiguredlg.h b/karbon/dialogs/vconfiguredlg.h
index f1470bea..dd12eba2 100644
--- a/karbon/dialogs/vconfiguredlg.h
+++ b/karbon/dialogs/vconfiguredlg.h
@@ -28,16 +28,17 @@ class KConfig;
class KIntNumInput;
class KColorButton;
class KoUnitDoubleSpinBox;
-class QCheckBox;
-class QComboBox;
+class TQCheckBox;
+class TQComboBox;
-class VConfigInterfacePage : public QObject
+class VConfigInterfacePage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
VConfigInterfacePage(
- KarbonView* view, QVBox *box = 0L, char* name = 0L );
+ KarbonView* view, TQVBox *box = 0L, char* name = 0L );
void apply();
@@ -51,7 +52,7 @@ private:
KIntNumInput* m_recentFiles;
int m_oldRecentFiles;
- QCheckBox* m_showStatusBar;
+ TQCheckBox* m_showStatusBar;
KIntNumInput* m_copyOffset;
int m_oldCopyOffset;
@@ -61,13 +62,14 @@ private:
};
-class VConfigMiscPage : public QObject
+class VConfigMiscPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
VConfigMiscPage(
- KarbonView* view, QVBox* box, char* name = 0L );
+ KarbonView* view, TQVBox* box, char* name = 0L );
void apply();
@@ -84,16 +86,17 @@ private:
KIntNumInput* m_undoRedo;
int m_oldUndoRedo;
int m_oldUnit;
- QComboBox *m_unit;
+ TQComboBox *m_unit;
};
-class VConfigDefaultPage : public QObject
+class VConfigDefaultPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
VConfigDefaultPage(
- KarbonView* view, QVBox* box, char* name = 0L );
+ KarbonView* view, TQVBox* box, char* name = 0L );
void apply();
@@ -106,19 +109,20 @@ private:
KIntNumInput* m_autoSave;
int m_oldAutoSave;
- QCheckBox *m_createBackupFile;
+ TQCheckBox *m_createBackupFile;
bool m_oldBackupFile;
- QCheckBox *m_saveAsPath;
+ TQCheckBox *m_saveAsPath;
bool m_oldSaveAsPath;
};
-class VConfigGridPage : public QObject
+class VConfigGridPage : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
VConfigGridPage(
- KarbonView* view, QVBox* box, char* name = 0L );
+ KarbonView* view, TQVBox* box, char* name = 0L );
void apply();
@@ -136,17 +140,18 @@ private:
KoUnitDoubleSpinBox* m_spaceVertUSpin;
KoUnitDoubleSpinBox* m_snapHorizUSpin;
KoUnitDoubleSpinBox* m_snapVertUSpin;
- QCheckBox* m_gridChBox;
- QCheckBox* m_snapChBox;
+ TQCheckBox* m_gridChBox;
+ TQCheckBox* m_snapChBox;
KColorButton* m_gridColorBtn;
};
class VConfigureDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VConfigureDlg( KarbonView* parent );
+ VConfigureDlg( KarbonView* tqparent );
public slots:
void slotApply();
diff --git a/karbon/dialogs/vstrokedlg.cc b/karbon/dialogs/vstrokedlg.cc
index ed530178..8dcfa9f9 100644
--- a/karbon/dialogs/vstrokedlg.cc
+++ b/karbon/dialogs/vstrokedlg.cc
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qradiobutton.h>
-#include <qvbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqradiobutton.h>
+#include <tqvbuttongroup.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -39,68 +39,68 @@
#include "vstrokedlg.h"
#include "vcolortab.h"
-VStrokeDlg::VStrokeDlg( KarbonPart* part, QWidget* parent, const char* name )
- : KDialogBase ( parent, name, true, i18n( "Stroke" ), Ok | Cancel ), m_part( part )
+VStrokeDlg::VStrokeDlg( KarbonPart* part, TQWidget* tqparent, const char* name )
+ : KDialogBase ( tqparent, name, true, i18n( "Stroke" ), Ok | Cancel ), m_part( part )
{
enableButtonSeparator( true );
- QTabWidget *mainWidget = new QTabWidget( this, "strokemain" );
- QHBoxLayout *mainLayout = new QHBoxLayout (mainWidget, 3);
+ TQTabWidget *mainWidget = new TQTabWidget( this, "strokemain" );
+ TQHBoxLayout *mainLayout = new TQHBoxLayout (mainWidget, 3);
- QVBoxLayout *leftLayout = new QVBoxLayout( mainLayout, 4 );
+ TQVBoxLayout *leftLayout = new TQVBoxLayout( mainLayout, 4 );
- QLabel* widthLabel = new QLabel( i18n ( "stroke width", "Width:" ), mainWidget );
+ TQLabel* widthLabel = new TQLabel( i18n ( "stroke width", "Width:" ), mainWidget );
leftLayout->addWidget ( widthLabel );
m_setLineWidth = new KoUnitDoubleSpinBox( mainWidget, 0.0, 1000.0, 0.5, 1.0, KoUnit::U_PT, 1 );
leftLayout->addWidget ( m_setLineWidth );
//Dashing ->
- QLabel* styleLabel = new QLabel( i18n ( "Style:" ), mainWidget );
+ TQLabel* styleLabel = new TQLabel( i18n ( "Style:" ), mainWidget );
leftLayout->addWidget ( styleLabel );
- m_styleCombo = new QComboBox( mainWidget );
+ m_styleCombo = new TQComboBox( mainWidget );
m_styleCombo->setEnabled ( false );
leftLayout->addWidget ( m_styleCombo );
// <- Dashing - reserved for later
- QRadioButton* button;
- m_typeOption = new QVButtonGroup ( mainWidget );
- button = new QRadioButton ( i18n( "None" ), m_typeOption );
+ TQRadioButton* button;
+ m_typeOption = new TQVButtonGroup ( mainWidget );
+ button = new TQRadioButton ( i18n( "None" ), m_typeOption );
m_typeOption->insert( button );
- button = new QRadioButton ( i18n( "Stroke" ), m_typeOption );
+ button = new TQRadioButton ( i18n( "Stroke" ), m_typeOption );
m_typeOption->insert( button );
- button = new QRadioButton ( i18n( "Gradient" ), m_typeOption );
+ button = new TQRadioButton ( i18n( "Gradient" ), m_typeOption );
m_typeOption->insert( button );
m_typeOption->setTitle( i18n( "Type" ) );
mainLayout->addWidget( m_typeOption );
- connect( m_typeOption, SIGNAL( clicked( int ) ), this, SLOT( slotTypeChanged( int ) ) );
+ connect( m_typeOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotTypeChanged( int ) ) );
- m_capOption = new QVButtonGroup ( mainWidget );
- //button = new QRadioButton ( i18n( "Butt" ), m_capOption );
- button = new QRadioButton ( m_capOption );
+ m_capOption = new TQVButtonGroup ( mainWidget );
+ //button = new TQRadioButton ( i18n( "Butt" ), m_capOption );
+ button = new TQRadioButton ( m_capOption );
button->setPixmap( DesktopIcon( "cap_butt" ) );
m_capOption->insert( button );
- button = new QRadioButton ( m_capOption );
+ button = new TQRadioButton ( m_capOption );
button->setPixmap( DesktopIcon( "cap_round" ) );
m_capOption->insert( button );
- button = new QRadioButton ( m_capOption );
+ button = new TQRadioButton ( m_capOption );
button->setPixmap( DesktopIcon( "cap_square" ) );
m_capOption->insert( button );
m_capOption->setTitle( i18n( "Cap" ) );
mainLayout->addWidget( m_capOption );
- connect( m_capOption, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
+ connect( m_capOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
- m_joinOption = new QVButtonGroup ( mainWidget );
- button = new QRadioButton ( m_joinOption );
+ m_joinOption = new TQVButtonGroup ( mainWidget );
+ button = new TQRadioButton ( m_joinOption );
button->setPixmap( DesktopIcon( "join_miter" ) );
m_joinOption->insert( button );
- button = new QRadioButton ( m_joinOption );
+ button = new TQRadioButton ( m_joinOption );
button->setPixmap( DesktopIcon( "join_round" ) );
m_joinOption->insert( button );
- button = new QRadioButton ( m_joinOption );
+ button = new TQRadioButton ( m_joinOption );
button->setPixmap( DesktopIcon( "join_bevel" ) );
m_joinOption->insert( button );
m_joinOption->setTitle( i18n( "Join" ) );
mainLayout->addWidget( m_joinOption );
- connect( m_joinOption, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ connect( m_joinOption, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
VSelection *sel = part->document().selection();
if( sel && sel->objects().count() > 0 ) // there is a selection, so take the stroke of first selected object
@@ -126,7 +126,7 @@ VStrokeDlg::VStrokeDlg( KarbonPart* part, QWidget* parent, const char* name )
setMainWidget( m_colortab );
disableResize();
- connect (this, SIGNAL( okClicked( void ) ), this, SLOT( slotOKClicked ( void ) ) );
+ connect (this, TQT_SIGNAL( okClicked( void ) ), this, TQT_SLOT( slotOKClicked ( void ) ) );
}
void VStrokeDlg::slotTypeChanged( int ID )
diff --git a/karbon/dialogs/vstrokedlg.h b/karbon/dialogs/vstrokedlg.h
index ddfa1b9f..a75a8727 100644
--- a/karbon/dialogs/vstrokedlg.h
+++ b/karbon/dialogs/vstrokedlg.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
-class QComboBox;
-class QVButtonGroup;
+class TQComboBox;
+class TQVButtonGroup;
class KarbonPart;
class KoUnitDoubleSpinBox;
@@ -34,18 +34,19 @@ class VColorTab;
class VStrokeDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStrokeDlg( KarbonPart* part, QWidget* parent = 0L, const char* name = 0L );
+ VStrokeDlg( KarbonPart* part, TQWidget* tqparent = 0L, const char* name = 0L );
private:
VColorTab* m_colortab;
KarbonPart *m_part;
KoUnitDoubleSpinBox *m_setLineWidth;
- QComboBox *m_styleCombo;
- QVButtonGroup *m_typeOption;
- QVButtonGroup *m_capOption;
- QVButtonGroup *m_joinOption;
+ TQComboBox *m_styleCombo;
+ TQVButtonGroup *m_typeOption;
+ TQVButtonGroup *m_capOption;
+ TQVButtonGroup *m_joinOption;
protected:
VStroke m_stroke;
diff --git a/karbon/dockers/vcolordocker.cc b/karbon/dockers/vcolordocker.cc
index c5037967..b574bec0 100644
--- a/karbon/dockers/vcolordocker.cc
+++ b/karbon/dockers/vcolordocker.cc
@@ -18,14 +18,14 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qwidget.h>
-#include <qcolor.h>
-#include <qtooltip.h>
-#include <qevent.h>
-#include <qptrlist.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqwidget.h>
+#include <tqcolor.h>
+#include <tqtooltip.h>
+#include <tqevent.h>
+#include <tqptrlist.h>
#include <klocale.h>
#include <KoMainWindow.h>
@@ -51,8 +51,8 @@
#include <kdebug.h>
-VColorDocker::VColorDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ )
- : QWidget(), m_part ( part ), m_view( parent )
+VColorDocker::VColorDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ )
+ : TQWidget(), m_part ( part ), m_view( tqparent )
{
m_isStrokeDocker = false;
setCaption( i18n( "Color Chooser" ) );
@@ -62,39 +62,39 @@ VColorDocker::VColorDocker( KarbonPart* part, KarbonView* parent, const char* /*
m_fillCmd = 0;
m_strokeCmd = 0;
- mTabWidget = new QTabWidget( this );
+ mTabWidget = new TQTabWidget( this );
/* ##### HSV WIDGET ##### */
mHSVWidget = new KoHSVWidget( mTabWidget );
- connect( mHSVWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) );
- connect( mHSVWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) );
- connect(this, SIGNAL(fgColorChanged(const QColor &)), mHSVWidget, SLOT(setFgColor(const QColor &)));
- connect(this, SIGNAL(bgColorChanged(const QColor &)), mHSVWidget, SLOT(setBgColor(const QColor &)));
- connect( mHSVWidget, SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, SLOT( updateMode( KDualColorButton::DualColor ) ) );
+ connect( mHSVWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) );
+ connect( mHSVWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) );
+ connect(this, TQT_SIGNAL(fgColorChanged(const TQColor &)), mHSVWidget, TQT_SLOT(setFgColor(const TQColor &)));
+ connect(this, TQT_SIGNAL(bgColorChanged(const TQColor &)), mHSVWidget, TQT_SLOT(setBgColor(const TQColor &)));
+ connect( mHSVWidget, TQT_SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, TQT_SLOT( updateMode( KDualColorButton::DualColor ) ) );
mTabWidget->addTab( mHSVWidget, i18n( "HSV" ) );
/* ##### RGB WIDGET ##### */
mRGBWidget = new KoRGBWidget( mTabWidget );
- connect( mRGBWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) );
- connect( mRGBWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) );
- connect(this, SIGNAL(fgColorChanged(const QColor &)), mRGBWidget, SLOT(setFgColor(const QColor &)));
- connect(this, SIGNAL(bgColorChanged(const QColor &)), mRGBWidget, SLOT(setBgColor(const QColor &)));
- connect( mRGBWidget, SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, SLOT( updateMode( KDualColorButton::DualColor ) ) );
+ connect( mRGBWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) );
+ connect( mRGBWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) );
+ connect(this, TQT_SIGNAL(fgColorChanged(const TQColor &)), mRGBWidget, TQT_SLOT(setFgColor(const TQColor &)));
+ connect(this, TQT_SIGNAL(bgColorChanged(const TQColor &)), mRGBWidget, TQT_SLOT(setBgColor(const TQColor &)));
+ connect( mRGBWidget, TQT_SIGNAL( sigModeChanged(KDualColorButton::DualColor) ), this, TQT_SLOT( updateMode( KDualColorButton::DualColor ) ) );
mTabWidget->addTab( mRGBWidget, i18n( "RGB" ) );
/* ##### CMYK WIDGET ##### */
/*mCMYKWidget = new KoCMYKWidget( mTabWidget );
- connect( mCMYKWidget, SIGNAL( sigFgColorChanged( const QColor &) ), this, SLOT( updateFgColor( const QColor &) ) );
- connect( mCMYKWidget, SIGNAL( sigBgColorChanged( const QColor &) ), this, SLOT( updateBgColor( const QColor &) ) );
+ connect( mCMYKWidget, TQT_SIGNAL( sigFgColorChanged( const TQColor &) ), this, TQT_SLOT( updateFgColor( const TQColor &) ) );
+ connect( mCMYKWidget, TQT_SIGNAL( sigBgColorChanged( const TQColor &) ), this, TQT_SLOT( updateBgColor( const TQColor &) ) );
mTabWidget->addTab( mCMYKWidget, i18n( "CMYK" ) );*/
//Opacity
- mOpacity = new VColorSlider( i18n( "Opacity:" ), QColor( "white" ), QColor( "black" ), 0, 100, 100, this );
+ mOpacity = new VColorSlider( i18n( "Opacity:" ), TQColor( "white" ), TQColor( "black" ), 0, 100, 100, this );
//TODO: Make "white" a transparent color
- connect( mOpacity, SIGNAL( valueChanged ( int ) ), this, SLOT( updateOpacity() ) );
- QToolTip::add( mOpacity, i18n( "Alpha (opacity)" ) );
+ connect( mOpacity, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateOpacity() ) );
+ TQToolTip::add( mOpacity, i18n( "Alpha (opacity)" ) );
- QVBoxLayout *mainWidgetLayout = new QVBoxLayout( this, 3 );
+ TQVBoxLayout *mainWidgetLayout = new TQVBoxLayout( this, 3 );
mainWidgetLayout->addWidget( mTabWidget );
mainWidgetLayout->addWidget( mOpacity );
mainWidgetLayout->activate();
@@ -107,7 +107,7 @@ VColorDocker::~VColorDocker()
{
}
-void VColorDocker::updateFgColor(const QColor &c)
+void VColorDocker::updateFgColor(const TQColor &c)
{
m_color = c;
@@ -115,7 +115,7 @@ void VColorDocker::updateFgColor(const QColor &c)
v.setOpacity( m_opacity );
// check if we have objects selected
- QPtrList<VObject> VNewObjectList = m_part->document().selection()->objects();
+ TQPtrList<VObject> VNewObjectList = m_part->document().selection()->objects();
if( ! VNewObjectList.count() )
return;
@@ -124,7 +124,7 @@ void VColorDocker::updateFgColor(const QColor &c)
//mCMYKWidget->blockSignals(true);
VCommandHistory* history = m_part->commandHistory();
- const QPtrList<VCommand>* commandList = history->commands();
+ const TQPtrList<VCommand>* commandList = history->commands();
VStrokeCmd* command = dynamic_cast<VStrokeCmd*>(commandList->getLast());
if(command == 0 || m_strokeCmd == 0)
@@ -134,12 +134,12 @@ void VColorDocker::updateFgColor(const QColor &c)
}
else
{
- QPtrList<VObject> VOldObjectList = command->getSelection()->objects();
+ TQPtrList<VObject> VOldObjectList = command->getSelection()->objects();
if( VOldObjectList == VNewObjectList )
{
m_strokeCmd->changeStroke(v);
- m_part->repaintAllViews();
+ m_part->tqrepaintAllViews();
}
else
{
@@ -155,7 +155,7 @@ void VColorDocker::updateFgColor(const QColor &c)
//mCMYKWidget->blockSignals(false);
}
-void VColorDocker::updateBgColor(const QColor &c)
+void VColorDocker::updateBgColor(const TQColor &c)
{
m_color = c;
@@ -163,7 +163,7 @@ void VColorDocker::updateBgColor(const QColor &c)
v.setOpacity( m_opacity );
// check if we have objects selected
- QPtrList<VObject> VNewObjectList = m_part->document().selection()->objects();
+ TQPtrList<VObject> VNewObjectList = m_part->document().selection()->objects();
if( ! VNewObjectList.count() )
return;
@@ -172,7 +172,7 @@ void VColorDocker::updateBgColor(const QColor &c)
//mCMYKWidget->blockSignals(true);
VCommandHistory* history = m_part->commandHistory();
- const QPtrList<VCommand>* commandList = history->commands();
+ const TQPtrList<VCommand>* commandList = history->commands();
VFillCmd* command = dynamic_cast<VFillCmd*>(commandList->getLast());
if(command == 0 || m_fillCmd == 0)
@@ -182,12 +182,12 @@ void VColorDocker::updateBgColor(const QColor &c)
}
else
{
- QPtrList<VObject> VOldObjectList = command->getSelection()->objects();
+ TQPtrList<VObject> VOldObjectList = command->getSelection()->objects();
if( VOldObjectList == VNewObjectList )
{
m_fillCmd->changeFill(VFill(v));
- m_part->repaintAllViews();
+ m_part->tqrepaintAllViews();
}
else
{
@@ -217,7 +217,7 @@ void VColorDocker::updateOpacity()
}
void
-VColorDocker::mouseReleaseEvent( QMouseEvent * )
+VColorDocker::mouseReleaseEvent( TQMouseEvent * )
{
//changeColor();
}
@@ -250,8 +250,8 @@ void VColorDocker::update()
{
VObject *obj = m_part->document().selection()->objects().getFirst();
- QColor fgColor = QColor(obj->stroke() ? obj->stroke()->color() : VColor() );
- QColor bgColor = QColor(obj->fill() ? obj->fill()->color() : VColor() );
+ TQColor fgColor = TQColor(obj->stroke() ? obj->stroke()->color() : VColor() );
+ TQColor bgColor = TQColor(obj->fill() ? obj->fill()->color() : VColor() );
mHSVWidget->setFgColor(fgColor);
mRGBWidget->setFgColor(fgColor);
diff --git a/karbon/dockers/vcolordocker.h b/karbon/dockers/vcolordocker.h
index e5e791d7..ea8e4c9d 100644
--- a/karbon/dockers/vcolordocker.h
+++ b/karbon/dockers/vcolordocker.h
@@ -21,9 +21,9 @@
#ifndef __VCOLORDOCKER_H__
#define __VCOLORDOCKER_H__
-class QTabWidget;
-class QWidget;
-class QColor;
+class TQTabWidget;
+class TQWidget;
+class TQColor;
class KarbonView;
class VColor;
class VColorSlider;
@@ -31,12 +31,13 @@ class KoHSVWidget;
class KoCMYKWidget;
class KoRGBWidget;
-class VColorDocker : public QWidget
+class VColorDocker : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VColorDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
+ VColorDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L );
virtual ~VColorDocker();
virtual bool isStrokeDocker() { return m_isStrokeDocker; };
@@ -48,26 +49,26 @@ public slots:
virtual void update();
private:
- virtual void mouseReleaseEvent( QMouseEvent *e );
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
- QTabWidget *mTabWidget;
+ TQTabWidget *mTabWidget;
KoHSVWidget *mHSVWidget;
//KoCMYKWidget *mCMYKWidget;
KoRGBWidget *mRGBWidget;
VColorSlider *mOpacity;
signals:
- void fgColorChanged( const QColor &c );
- void bgColorChanged( const QColor &c );
+ void fgColorChanged( const TQColor &c );
+ void bgColorChanged( const TQColor &c );
void modeChanged( KDualColorButton::DualColor s);
private slots:
- void updateFgColor(const QColor &c);
- void updateBgColor(const QColor &c);
+ void updateFgColor(const TQColor &c);
+ void updateBgColor(const TQColor &c);
void updateOpacity();
void updateMode( KDualColorButton::DualColor s );
protected:
bool m_isStrokeDocker; //Are we setting stroke color ( true ) or fill color ( false )
- QColor m_color;
+ TQColor m_color;
float m_opacity;
private:
KarbonPart *m_part;
diff --git a/karbon/dockers/vdocumentdocker.cc b/karbon/dockers/vdocumentdocker.cc
index ccbbf711..b63ae9ae 100644
--- a/karbon/dockers/vdocumentdocker.cc
+++ b/karbon/dockers/vdocumentdocker.cc
@@ -17,17 +17,17 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qhbuttongroup.h>
-#include <qinputdialog.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qlistview.h>
-#include <qptrvector.h>
-#include <qtoolbutton.h>
-#include <qpainter.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqhbuttongroup.h>
+#include <tqinputdialog.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqlistview.h>
+#include <tqptrvector.h>
+#include <tqtoolbutton.h>
+#include <tqpainter.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kglobal.h>
@@ -61,12 +61,12 @@ static long g_lastKey = 0;
* Document tab *
*************************************************************************/
-VDocumentPreview::VDocumentPreview( KarbonView* view, QWidget* parent )
- : QWidget( parent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view )
+VDocumentPreview::VDocumentPreview( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "DocumentPreview" ), m_document( &view->part()->document() ), m_view( view )
{
update();
installEventFilter( this );
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMouseTracking( true );
m_dragging = false;
m_docpixmap = 0L;
@@ -85,7 +85,7 @@ VDocumentPreview::reset()
}
bool
-VDocumentPreview::eventFilter( QObject* object, QEvent* event )
+VDocumentPreview::eventFilter( TQObject* object, TQEvent* event )
{
double scaleFactor;
double xoffset = 0.;
@@ -102,17 +102,17 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
}
KoRect rect = m_view->canvasWidget()->boundingBox();
- QMouseEvent* mouseEvent = static_cast<QMouseEvent*>( event );
- if( event->type() == QEvent::MouseButtonPress )
+ TQMouseEvent* mouseEvent = TQT_TQMOUSEEVENT( event );
+ if( event->type() == TQEvent::MouseButtonPress )
{
m_firstPoint.setX( mouseEvent->pos().x() );
m_firstPoint.setY( mouseEvent->pos().y() );
m_lastPoint = m_firstPoint;
KoPoint p3( m_firstPoint.x() / scaleFactor - xoffset,
( height() - m_firstPoint.y() ) / scaleFactor - yoffset );
- m_dragging = rect.contains( p3 );
+ m_dragging = rect.tqcontains( p3 );
}
- else if( event->type() == QEvent::MouseButtonRelease )
+ else if( event->type() == TQEvent::MouseButtonRelease )
{
if( m_dragging )
{
@@ -127,7 +127,7 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
update();
}
}
- else if( event->type() == QEvent::MouseMove )
+ else if( event->type() == TQEvent::MouseMove )
{
if( m_dragging )
{
@@ -144,18 +144,18 @@ VDocumentPreview::eventFilter( QObject* object, QEvent* event )
{
KoPoint p3( mouseEvent->pos().x() / scaleFactor - xoffset,
( height() - mouseEvent->pos().y() ) / scaleFactor - yoffset );
- setCursor( rect.contains( p3 ) ? QCursor::SizeAllCursor : QCursor( Qt::arrowCursor ) );
+ setCursor( rect.tqcontains( p3 ) ? TQCursor::SizeAllCursor : TQCursor( TQt::arrowCursor ) );
}
}
- return QWidget::eventFilter( object, event );
+ return TQWidget::eventFilter( object, event );
}
void
-VDocumentPreview::paintEvent( QPaintEvent* )
+VDocumentPreview::paintEvent( TQPaintEvent* )
{
// TODO : use NotROP, otherwise too slow
- QPixmap pixmap( width(), height() );
+ TQPixmap pixmap( width(), height() );
double xoffset = 0.;
double yoffset = 0.;
double scaleFactor;
@@ -174,17 +174,17 @@ VDocumentPreview::paintEvent( QPaintEvent* )
if( !m_docpixmap || m_docpixmap->width() != width() || m_docpixmap->height() != height() )
{
delete m_docpixmap;
- m_docpixmap = new QPixmap( width(), height() );
- VKoPainter p( m_docpixmap, width(), height() );
- p.clear( QColor( 195, 194, 193 ) );
- p.setWorldMatrix( QWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
+ m_docpixmap = new TQPixmap( width(), height() );
+ VKoPainter p( TQT_TQPAINTDEVICE(m_docpixmap), width(), height() );
+ p.clear( TQColor( 195, 194, 193 ) );
+ p.setWorldMatrix( TQWMatrix( 1, 0, 0, -1, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
p.setZoomFactor( scaleFactor );
KoRect rect( -xoffset, -yoffset, m_document->width() + xoffset, m_document->height() + yoffset );
// draw doc outline
- VColor c( Qt::black );
+ VColor c( TQt::black );
VStroke stroke( c, 0L, 1.0 / scaleFactor );
p.setPen( stroke );
- p.setBrush( Qt::white );
+ p.setBrush( TQt::white );
p.drawRect( KoRect( 2, 2, m_document->width() - 2, m_document->height() - 2 ) );
m_document->draw( &p, &rect );
p.end();
@@ -193,9 +193,9 @@ VDocumentPreview::paintEvent( QPaintEvent* )
// draw viewport rect
{
- QPainter p( &pixmap );
- p.setWorldMatrix( QWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
- p.setPen( Qt::red );
+ TQPainter p( &pixmap );
+ p.setWorldMatrix( TQWMatrix( scaleFactor, 0, 0, -scaleFactor, xoffset * scaleFactor, height() - yoffset * scaleFactor ) );
+ p.setPen( TQt::red );
double dx = ( m_lastPoint.x() - m_firstPoint.x() ) * m_view->zoom();
double dy = ( m_lastPoint.y() - m_firstPoint.y() ) * m_view->zoom();
KoPoint p1( dx / scaleFactor, dy / scaleFactor );
@@ -205,13 +205,13 @@ VDocumentPreview::paintEvent( QPaintEvent* )
p.drawRect( int( p1.x() ), int( p1.y() ), int( p2.x() - p1.x() ), int( p2.y() - p1.y() ) );
}
- QPainter pw( &pixmap );
- pw.setPen( colorGroup().light() );
+ TQPainter pw( &pixmap );
+ pw.setPen( tqcolorGroup().light() );
pw.drawLine( 1, 1, 1, height() - 2 );
pw.drawLine( 1, 1, width() - 2, 1 );
pw.drawLine( width() - 1, height() - 1, 0, height() - 1 );
pw.drawLine( width() - 1, height() - 1, width() - 1, 0 );
- pw.setPen( colorGroup().dark() );
+ pw.setPen( tqcolorGroup().dark() );
pw.drawLine( 0, 0, width() - 1, 0 );
pw.drawLine( 0, 0, 0, height() - 1 );
pw.drawLine( width() - 2, height() - 2, width() - 2, 1 );
@@ -220,42 +220,42 @@ VDocumentPreview::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VDocumentPreview::paintEvent
-VDocumentTab::VDocumentTab( KarbonView* view, QWidget* parent )
- : QWidget( parent, "DocumentTab" ), m_view( view )
-{
- QFrame* frame;
- QGridLayout* layout = new QGridLayout( this );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 );
- layout->addWidget( new QLabel( i18n( "document width", "Width:" ), this ), 0, 0 );
- layout->addWidget( new QLabel( i18n( "Height:" ), this ), 1, 0 );
- layout->addMultiCellWidget( frame = new QFrame( this ), 2, 2, 0, 1 );
- frame->setFrameShape( QFrame::HLine );
- layout->addWidget( new QLabel( i18n( "Layers:" ), this ), 3, 0 );
- layout->addWidget( new QLabel( i18n( "Format:" ), this ), 4, 0 );
- layout->addMultiCellWidget( frame = new QFrame( this ), 5, 5, 0, 1 );
- frame->setFrameShape( QFrame::HLine );
- //layout->addMultiCellWidget( new QLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 );
- layout->addWidget( m_width = new QLabel( this ), 0, 1 );
- layout->addWidget( m_height = new QLabel( this ), 1, 1 );
- layout->addWidget( m_layers = new QLabel( this ), 3, 1 );
- layout->addWidget( m_format = new QLabel( this ), 4, 1 );
- layout->setRowStretch( 7, 1 );
- layout->setColStretch( 0, 0 );
- layout->setColStretch( 1, 0 );
- layout->setColStretch( 2, 2 );
- //layout->addWidget(
-
- m_width->setAlignment( AlignRight );
- m_height->setAlignment( AlignRight );
- m_layers->setAlignment( AlignRight );
- m_format->setAlignment( AlignRight );
-
- connect( view->part()->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) );
- connect( view->part()->commandHistory(), SIGNAL( commandExecuted() ), this, SLOT( slotCommandExecuted() ) );
- connect( view, SIGNAL( pageLayoutChanged() ), this, SLOT( slotCommandExecuted() ) );
- connect( view->canvasWidget(), SIGNAL( viewportChanged() ), this, SLOT( slotViewportChanged() ) );
+VDocumentTab::VDocumentTab( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "DocumentTab" ), m_view( view )
+{
+ TQFrame* frame;
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->addMultiCellWidget( m_documentPreview = new VDocumentPreview( m_view, this ), 0, 7, 2, 2 );
+ tqlayout->addWidget( new TQLabel( i18n( "document width", "Width:" ), this ), 0, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Height:" ), this ), 1, 0 );
+ tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 2, 2, 0, 1 );
+ frame->setFrameShape( TQFrame::HLine );
+ tqlayout->addWidget( new TQLabel( i18n( "Layers:" ), this ), 3, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Format:" ), this ), 4, 0 );
+ tqlayout->addMultiCellWidget( frame = new TQFrame( this ), 5, 5, 0, 1 );
+ frame->setFrameShape( TQFrame::HLine );
+ //tqlayout->addMultiCellWidget( new TQLabel( i18n( "Zoom factor:" ), this ), 6, 6, 0, 1 );
+ tqlayout->addWidget( m_width = new TQLabel( this ), 0, 1 );
+ tqlayout->addWidget( m_height = new TQLabel( this ), 1, 1 );
+ tqlayout->addWidget( m_layers = new TQLabel( this ), 3, 1 );
+ tqlayout->addWidget( m_format = new TQLabel( this ), 4, 1 );
+ tqlayout->setRowStretch( 7, 1 );
+ tqlayout->setColStretch( 0, 0 );
+ tqlayout->setColStretch( 1, 0 );
+ tqlayout->setColStretch( 2, 2 );
+ //tqlayout->addWidget(
+
+ m_width->tqsetAlignment( AlignRight );
+ m_height->tqsetAlignment( AlignRight );
+ m_layers->tqsetAlignment( AlignRight );
+ m_format->tqsetAlignment( AlignRight );
+
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) );
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted() ), this, TQT_SLOT( slotCommandExecuted() ) );
+ connect( view, TQT_SIGNAL( pageLayoutChanged() ), this, TQT_SLOT( slotCommandExecuted() ) );
+ connect( view->canvasWidget(), TQT_SIGNAL( viewportChanged() ), this, TQT_SLOT( slotViewportChanged() ) );
updateDocumentInfo();
} // VDocumentTab::VDocumentTab
@@ -269,7 +269,7 @@ VDocumentTab::updateDocumentInfo()
{
m_width->setText( KoUnit::toUserStringValue( m_view->part()->document().width(), m_view->part()->unit() ) + m_view->part()->unitName() );
m_height->setText( KoUnit::toUserStringValue( m_view->part()->document().height(), m_view->part()->unit() ) + m_view->part()->unitName() );
- m_layers->setText( QString::number( m_view->part()->document().layers().count() ) );
+ m_layers->setText( TQString::number( m_view->part()->document().layers().count() ) );
} // VDocumentTab::updateDocumentInfo
void
@@ -303,8 +303,8 @@ VDocumentTab::slotCommandExecuted()
* Layers tab *
*************************************************************************/
-VObjectListViewItem::VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map )
- : QListViewItem( parent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map )
+VObjectListViewItem::VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map )
+ : TQListViewItem( tqparent, 0L ), m_object( object ), m_document( doc ), m_key( key ), m_map( map )
{
update();
// add itself to object list item map
@@ -317,10 +317,10 @@ VObjectListViewItem::~VObjectListViewItem()
m_map->take( m_object );
}
-QString
+TQString
VObjectListViewItem::key( int, bool ) const
{
- return QString( "%1" ).arg( m_key );
+ return TQString( "%1" ).tqarg( m_key );
}
void
@@ -329,14 +329,14 @@ VObjectListViewItem::update()
// text description
VSelectionDescription selectionDesc;
selectionDesc.visit( *m_object );
- setText( 0, QString( "%1" ).arg( selectionDesc.shortDescription() ) );
+ setText( 0, TQString( "%1" ).tqarg( selectionDesc.shortDescription() ) );
// draw thumb preview (16x16)
- QPixmap preview;
+ TQPixmap preview;
preview.resize( 16, 16 );
- VKoPainter p( &preview, 16, 16, false );
+ VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
// Y mirroring
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
KoRect bbox = m_object->boundingBox();
mat.translate( 0, -16 );
@@ -348,30 +348,30 @@ VObjectListViewItem::update()
p.setZoomFactor( factor );
m_object->draw( &p );
p.setZoomFactor( 1 );
- p.setWorldMatrix( QWMatrix() );
- p.setPen( Qt::black );
- p.setBrush( Qt::NoBrush );
+ p.setWorldMatrix( TQWMatrix() );
+ p.setPen( TQt::black );
+ p.setBrush( TQt::NoBrush );
p.drawRect( KoRect( 0, 0, 16, 16 ) );
p.end();
// set thumb preview, lock and visible pixmaps
setPixmap( 0, preview );
- QString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
+ TQString s = ( m_object->state() == VObject::normal_locked || m_object->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
s = ( m_object->state() == VObject::hidden || m_object->state() == VObject::hidden_locked ) ? "14_layer_novisible" : "14_layer_visible";
setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
}
int
-VObjectListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const
+VObjectListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const
{
VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>(i);
if( ! objectItem ) return 0;
return m_key < objectItem->m_key ? -1 : 1;
}
-VLayerListViewItem::VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map )
- : QCheckListItem( parent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map )
+VLayerListViewItem::VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map )
+ : TQCheckListItem( tqparent, 0L, CheckBox ), m_layer( layer ), m_document( doc), m_map( map )
{
update();
// add itself to layer list item map
@@ -388,11 +388,11 @@ void
VLayerListViewItem::update()
{
// draw thumb preview (16x16)
- QPixmap preview;
+ TQPixmap preview;
preview.resize( 16, 16 );
- VKoPainter p( &preview, 16, 16, false );
+ VKoPainter p( TQT_TQPAINTDEVICE(&preview), 16, 16, false );
// Y mirroring
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -16 );
p.setWorldMatrix( mat );
@@ -401,9 +401,9 @@ VLayerListViewItem::update()
p.setZoomFactor( 16. / 800. );
m_layer->draw( &p );
p.setZoomFactor( 1 );
- p.setWorldMatrix( QWMatrix() );
- p.setPen( Qt::black );
- p.setBrush( Qt::NoBrush );
+ p.setWorldMatrix( TQWMatrix() );
+ p.setPen( TQt::black );
+ p.setBrush( TQt::NoBrush );
p.drawRect( KoRect( 0, 0, 16, 16 ) );
p.end();
@@ -413,7 +413,7 @@ VLayerListViewItem::update()
// set thumb preview, lock and visible pixmaps
setPixmap( 0, preview );
- QString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
+ TQString s = ( m_layer->state() == VObject::normal_locked || m_layer->state() == VObject::hidden_locked ) ? "locked" : "unlocked";
setPixmap( 1, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
s = ( m_layer->state() == VObject::normal || m_layer->state() == VObject::normal_locked ) ? "14_layer_visible" : "14_layer_novisible";
setPixmap( 2, *KarbonFactory::rServer()->cachePixmap( s, KIcon::Small ) );
@@ -435,69 +435,69 @@ VLayerListViewItem::pos()
return 1 + item->pos();
} // VLayerListViewItem::pos
-QString
+TQString
VLayerListViewItem::key( int, bool ) const
{
- return QString( "%1" ).arg( m_key );
+ return TQString( "%1" ).tqarg( m_key );
}
int
-VLayerListViewItem::compare( QListViewItem *i, int /*col*/, bool /*ascending*/ ) const
+VLayerListViewItem::compare( TQListViewItem *i, int /*col*/, bool /*ascending*/ ) const
{
VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>(i);
if( ! layerItem ) return 0;
return m_key < layerItem->m_key ? -1 : 1;
}
-VLayersTab::VLayersTab( KarbonView* view, QWidget* parent )
- : QWidget( parent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() )
+VLayersTab::VLayersTab( KarbonView* view, TQWidget* tqparent )
+ : TQWidget( tqparent, "LayersTab" ), m_view( view ), m_document( &view->part()->document() )
{
- QToolButton* button;
- QVBoxLayout* layout = new QVBoxLayout( this, 1 );
- layout->addWidget( m_layersListView = new QListView( this ), 1 );
- m_buttonGroup = new QHButtonGroup( this );
+ TQToolButton* button;
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this, 1 );
+ tqlayout->addWidget( m_layersListView = new TQListView( this ), 1 );
+ m_buttonGroup = new TQHButtonGroup( this );
m_buttonGroup->setInsideMargin( 3 );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_newlayer" ) );
button->setTextLabel( i18n( "New" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_raiselayer" ) );
button->setTextLabel( i18n( "Raise" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_lowerlayer" ) );
button->setTextLabel( i18n( "Lower" ) );
m_buttonGroup->insert( button );
- button = new QToolButton( m_buttonGroup );
+ button = new TQToolButton( m_buttonGroup );
button->setIconSet( SmallIcon( "14_layer_deletelayer" ) );
button->setTextLabel( i18n( "Delete" ) );
m_buttonGroup->insert( button );
- layout->addWidget( m_buttonGroup, 0);
- layout->setSpacing( 0 );
- layout->setMargin( 3 );
+ tqlayout->addWidget( m_buttonGroup, 0);
+ tqlayout->setSpacing( 0 );
+ tqlayout->setMargin( 3 );
m_layersListView->setAllColumnsShowFocus( true );
m_layersListView->addColumn( i18n( "Item" ), 120 );
m_layersListView->addColumn( i18n( "L" ), 20 );
m_layersListView->addColumn( i18n( "V" ), 20 );
- m_layersListView->setColumnWidthMode( 0, QListView::Maximum );
- m_layersListView->setColumnAlignment( 1, Qt::AlignCenter );
- m_layersListView->setColumnAlignment( 2, Qt::AlignCenter );
- m_layersListView->setResizeMode( QListView::NoColumn );
+ m_layersListView->setColumnWidthMode( 0, TQListView::Maximum );
+ m_layersListView->setColumnAlignment( 1, TQt::AlignCenter );
+ m_layersListView->setColumnAlignment( 2, TQt::AlignCenter );
+ m_layersListView->setResizeMode( TQListView::NoColumn );
m_layersListView->setSorting( 0, false );
m_layersListView->setRootIsDecorated( true );
- m_layersListView->setSelectionMode( QListView::Extended );
+ m_layersListView->setSelectionMode( TQListView::Extended );
- connect( m_layersListView, SIGNAL( clicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( itemClicked( QListViewItem*, const QPoint&, int ) ) );
- connect( m_layersListView, SIGNAL( rightButtonClicked( QListViewItem*, const QPoint&, int ) ), this, SLOT( renameItem( QListViewItem*, const QPoint&, int ) ) );
- connect( m_layersListView, SIGNAL( selectionChanged() ), this, SLOT( selectionChangedFromList() ) );
- connect( m_view, SIGNAL( selectionChange() ), this, SLOT( selectionChangedFromTool() ) );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) );
- connect( view->part()->commandHistory(), SIGNAL( commandExecuted( VCommand*) ), this, SLOT( slotCommandExecuted( VCommand* ) ) );
+ connect( m_layersListView, TQT_SIGNAL( clicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( itemClicked( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_layersListView, TQT_SIGNAL( rightButtonClicked( TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( renameItem( TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_layersListView, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( selectionChangedFromList() ) );
+ connect( m_view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( selectionChangedFromTool() ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) );
+ connect( view->part()->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand*) ), this, TQT_SLOT( slotCommandExecuted( VCommand* ) ) );
- layout->activate();
+ tqlayout->activate();
updateLayers();
} // VLayersTab::VLayersTab
@@ -524,14 +524,14 @@ VLayersTab::slotButtonClicked( int ID )
void
VLayersTab::resetSelection()
{
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
// iterates over all list items and deselects them manually
// to avoid the list views selectionChanged signal
for(; it.current(); ++it )
{
it.current()->setSelected( false );
- it.current()->repaint();
+ it.current()->tqrepaint();
}
}
@@ -540,7 +540,7 @@ VLayersTab::selectActiveLayer()
{
if( ! m_layers[ m_document->activeLayer() ] )
{
- QPtrVector<VLayer> vector;
+ TQPtrVector<VLayer> vector;
m_document->layers().toVector( &vector );
// find another layer to set active
for( int i = vector.count() - 1; i >= 0; i-- )
@@ -552,18 +552,18 @@ VLayersTab::selectActiveLayer()
}
// deselect all other layers
- QPtrDictIterator<VLayerListViewItem> it( m_layers );
+ TQPtrDictIterator<VLayerListViewItem> it( m_layers );
for(; it.current(); ++it )
{
it.current()->setSelected( false );
- it.current()->repaint();
+ it.current()->tqrepaint();
}
VLayerListViewItem *layerItem = m_layers[ m_document->activeLayer() ];
if( layerItem )
{
layerItem->setSelected( true );
- layerItem->repaint();
+ layerItem->tqrepaint();
kdDebug(38000) << "selecting active layer: " << layerItem->text() << endl;
}
}
@@ -584,12 +584,12 @@ VLayersTab::selectionChangedFromTool()
VObjectListViewItem *item = m_objects[ obj ];
if( ! item )
{
- VLayerListViewItem *layerItem = m_layers[ obj->parent() ];
+ VLayerListViewItem *layerItem = m_layers[ obj->tqparent() ];
if( layerItem )
updateObjects( layerItem->layer(), layerItem );
else
{
- VObjectListViewItem *objectItem = m_objects[ obj->parent() ];
+ VObjectListViewItem *objectItem = m_objects[ obj->tqparent() ];
if( objectItem )
updateObjects( objectItem->object(), objectItem );
else
@@ -606,9 +606,9 @@ VLayersTab::selectionChangedFromTool()
}
void
-VLayersTab::updateChildItems( QListViewItem *item )
+VLayersTab::updateChildItems( TQListViewItem *item )
{
- QListViewItemIterator it( item );
+ TQListViewItemIterator it( item );
// iterator points to item, so make the next item current first
for( ++it; it.current(); ++it )
@@ -620,7 +620,7 @@ VLayersTab::updateChildItems( QListViewItem *item )
updateChildItems( objectItem );
objectItem->update();
- objectItem->repaint();
+ objectItem->tqrepaint();
}
}
@@ -659,7 +659,7 @@ VLayersTab::toggleState( VObject *obj, int col )
}
void
-VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
+VLayersTab::itemClicked( TQListViewItem* item, const TQPoint &, int col )
{
if( item )
{
@@ -676,11 +676,11 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
toggleState( layerItem->layer(), col );
layerItem->update();
- layerItem->repaint();
+ layerItem->tqrepaint();
updateChildItems( layerItem );
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
}
else
@@ -703,12 +703,12 @@ VLayersTab::itemClicked( QListViewItem* item, const QPoint &, int col )
objectItem->setSelected( false );
objectItem->update();
- objectItem->repaint();
+ objectItem->tqrepaint();
if( dynamic_cast<VGroup*>( objectItem->object() ) )
updateChildItems( objectItem );
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
}
}
@@ -719,7 +719,7 @@ VLayersTab::selectionChangedFromList()
{
m_document->selection()->clear();
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
// iterate over all list items and add their corresponding object
// to the documents selection if the list item is selected and not hidden or locked or both
@@ -740,16 +740,16 @@ VLayersTab::selectionChangedFromList()
&& (state != VObject::hidden_locked) )
{
m_document->selection()->append( objectItem->object() );
- objectItem->repaint();
+ objectItem->tqrepaint();
}
}
m_view->selectionChanged();
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
void
-VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
+VLayersTab::renameItem( TQListViewItem* item, const TQPoint&, int col )
{
if ( ( item ) && col == 0 )
{
@@ -759,7 +759,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
{
VObjectListViewItem *objectItem = dynamic_cast< VObjectListViewItem *>( item );
VObject *obj = objectItem->object();
- QString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ),
+ TQString name = KInputDialog::getText( i18n( "Current Object" ), i18n( "Change the name of the object:" ),
obj->name(), &ok, this );
if( ok )
{
@@ -769,7 +769,7 @@ VLayersTab::renameItem( QListViewItem* item, const QPoint&, int col )
}
else
{
- QString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ),
+ TQString name = KInputDialog::getText( i18n( "Rename Layer" ), i18n( "Change the name of the current layer:" ),
layerItem->layer()->name(), &ok, this );
if( ok )
{
@@ -784,7 +784,7 @@ void
VLayersTab::addLayer()
{
bool ok = true;
- QString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ),
+ TQString name = KInputDialog::getText( i18n( "New Layer" ), i18n( "Enter the name of the new layer:" ),
i18n( "New layer" ), &ok, this );
if( ok )
{
@@ -801,8 +801,8 @@ void
VLayersTab::raiseItem()
{
VCommand *cmd = 0L;
- //QListViewItem *newselection = 0L;
- QListViewItemIterator it( m_layersListView );
+ //TQListViewItem *newselection = 0L;
+ TQListViewItemIterator it( m_layersListView );
if( m_document->selection()->objects().count() )
{
@@ -836,7 +836,7 @@ void
VLayersTab::lowerItem()
{
VCommand *cmd = 0L;
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
if( m_document->selection()->objects().count() )
{
@@ -869,9 +869,9 @@ void
VLayersTab::deleteItem()
{
VCommand *cmd = 0L;
- QListViewItemIterator it( m_layersListView );
+ TQListViewItemIterator it( m_layersListView );
- QPtrList<QListViewItem> deleteItems;
+ TQPtrList<TQListViewItem> deleteItems;
deleteItems.setAutoDelete( false );
// collect all selected items because they get deselected
@@ -926,7 +926,7 @@ VLayersTab::deleteItem()
if( cmd )
{
updatePreviews();
- m_view->part()->repaintAllViews();
+ m_view->part()->tqrepaintAllViews();
}
} // VLayersTab::deleteItem
@@ -942,7 +942,7 @@ VLayersTab::updateLayers()
{
removeDeletedObjectsFromList();
- QPtrVector<VLayer> vector;
+ TQPtrVector<VLayer> vector;
m_document->layers().toVector( &vector );
VLayerListViewItem* item = 0L;
for( int i = vector.count() - 1; i >= 0; i-- )
@@ -968,7 +968,7 @@ VLayersTab::updateLayers()
} // VLayersTab::updateLayers
void
-VLayersTab::updateObjects( VObject *object, QListViewItem *item )
+VLayersTab::updateObjects( VObject *object, TQListViewItem *item )
{
VObjectListIterator itr = dynamic_cast<VGroup *>( object )->objects();
@@ -982,10 +982,10 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item )
objectItem = new VObjectListViewItem( item, itr.current(), m_document, objcount, &m_objects );
objectItem->update();
}
- else if( objectItem->parent() != item )
+ else if( objectItem->tqparent() != item )
{
- // object found, but has false parent -> reparent
- objectItem->parent()->takeItem( objectItem );
+ // object found, but has false tqparent -> reparent
+ objectItem->tqparent()->takeItem( objectItem );
item->insertItem( objectItem );
}
@@ -1001,20 +1001,20 @@ VLayersTab::updateObjects( VObject *object, QListViewItem *item )
void
VLayersTab::removeDeletedObjectsFromList()
{
- QPtrDictIterator<VObjectListViewItem> it( m_objects );
+ TQPtrDictIterator<VObjectListViewItem> it( m_objects );
// iterate over all object items and delete the following items:
// - items representing deleted objects
- // - items with objects objects that changed parents
+ // - items with objects objects that changed tqparents
// BEWARE: when deleting an item, the iterator is automatically incremented
for(; it.current(); )
{
- VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->parent() );
+ VLayerListViewItem *layerItem = dynamic_cast<VLayerListViewItem*>( it.current()->tqparent() );
if( layerItem )
{
VGroup *group = dynamic_cast<VGroup*>( layerItem->layer() );
- // check if object of item is still child of object of parent item
- if( group && ! group->objects().contains( it.current()->object() ) )
+ // check if object of item is still child of object of tqparent item
+ if( group && ! group->objects().tqcontains( it.current()->object() ) )
{
layerItem->takeItem( it.current() );
delete it.current();
@@ -1023,12 +1023,12 @@ VLayersTab::removeDeletedObjectsFromList()
}
else
{
- VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->parent() );
+ VObjectListViewItem *objectItem = dynamic_cast<VObjectListViewItem*>( it.current()->tqparent() );
if( objectItem )
{
VGroup *group = dynamic_cast<VGroup*>( objectItem->object() );
- // check if object of item is still child of object of parent item
- if( group && ! group->objects().contains( it.current()->object() ) )
+ // check if object of item is still child of object of tqparent item
+ if( group && ! group->objects().tqcontains( it.current()->object() ) )
{
objectItem->takeItem( it.current() );
delete it.current();
@@ -1051,7 +1051,7 @@ VLayersTab::removeDeletedObjectsFromList()
++it;
}
- QPtrDictIterator<VLayerListViewItem> itr( m_layers );
+ TQPtrDictIterator<VLayerListViewItem> itr( m_layers );
// iterate over all layer items and delete the following items:
// - items representing deleted layers
@@ -1085,12 +1085,12 @@ VLayersTab::slotCommandExecuted( VCommand* command )
* History tab *
*************************************************************************/
-VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after )
- : QListViewItem( parent, after )
+VHistoryGroupItem::VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after )
{
setPixmap( 0, *item->pixmap( 0 ) );
setText( 0, item->text( 0 ) );
- parent->takeItem( item );
+ tqparent->takeItem( item );
insertItem( item );
m_key = item->key( 0, true );
} // VHistoryItem::VHistoryItem
@@ -1100,7 +1100,7 @@ VHistoryGroupItem::~VHistoryGroupItem()
} // VHistoryGroupItem::~VHistoryGroupItem
void
-VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+VHistoryGroupItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
int e = 0;
int n = 0;
@@ -1117,12 +1117,12 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in
{
p->fillRect( 0, 0, width, height(), cg.base() );
if ( n > 0 )
- p->fillRect( 0, 0, width, height(), QBrush( cg.base().dark( 140 ), QBrush::BDiagPattern ) );
+ p->fillRect( 0, 0, width, height(), TQBrush( cg.base().dark( 140 ), TQBrush::BDiagPattern ) );
}
else
p->fillRect( 0, 0, width, height(), cg.base().dark( 140 ) );
- const QPixmap* pixmap = this->pixmap( column );
+ const TQPixmap* pixmap = this->pixmap( column );
int xstart;
if ( pixmap )
{
@@ -1134,25 +1134,25 @@ VHistoryGroupItem::paintCell( QPainter* p, const QColorGroup& cg, int column, in
else
xstart = 4;
p->setPen( cg.text() );
- p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) );
+ p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) );
} // VHistoryGroupItem::paintCell
void
-VHistoryGroupItem::paintFocus( QPainter*, const QColorGroup&, const QRect& )
+VHistoryGroupItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& )
{
// Do not paint any focus rectangle
// It makes the list and the selected item look messy
} // VHistoryGroupItem::paintFocus
-VHistoryItem::VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after )
- : QListViewItem( parent, after ), m_command( command )
+VHistoryItem::VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after ), m_command( command )
{
init();
} // VHistoryItem::VHistoryItem
-VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after )
- : QListViewItem( parent, after ), m_command( command )
+VHistoryItem::VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after )
+ : TQListViewItem( tqparent, after ), m_command( command )
{
init();
} // VHistoryItem::VHistoryItem
@@ -1164,7 +1164,7 @@ VHistoryItem::init()
char buffer[70];
sprintf( buffer, "%064ld", ++g_lastKey );
m_key = buffer;
- setPixmap( 0, QPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) );
+ setPixmap( 0, TQPixmap( KGlobal::iconLoader()->iconPath( m_command->icon(), KIcon::Small ) ) );
setText( 0, m_command->name() );
} // VHistoryITem::init
@@ -1173,11 +1173,11 @@ VHistoryItem::~VHistoryItem()
} // VHistoryItem::~VHistoryItem
void
-VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align )
+VHistoryItem::paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align )
{
- p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : cg.base().dark( 140 ) ) );
+ p->fillRect( 0, 0, width, height(), ( m_command->success() ? cg.base() : TQColor(cg.base().dark( 140 )) ) );
- const QPixmap* pixmap = this->pixmap( column );
+ const TQPixmap* pixmap = this->pixmap( column );
int xstart;
if ( pixmap )
{
@@ -1189,35 +1189,35 @@ VHistoryItem::paintCell( QPainter* p, const QColorGroup& cg, int column, int wid
else
xstart = 4;
p->setPen( cg.text() );
- p->drawText( xstart, 0, width - xstart, height(), align | Qt::AlignVCenter, text( column ) );
+ p->drawText( xstart, 0, width - xstart, height(), align | TQt::AlignVCenter, text( column ) );
} // VHistoryItem::paintCell
void
-VHistoryItem::paintFocus( QPainter*, const QColorGroup&, const QRect& )
+VHistoryItem::paintFocus( TQPainter*, const TQColorGroup&, const TQRect& )
{
// Do not paint any focus rectangle
// It makes the list and the selected item look messy
} // VHistoryItem::paintFocus
-VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
- : QWidget( parent ), m_part( part )
+VHistoryTab::VHistoryTab( KarbonPart* part, TQWidget* tqparent )
+ : TQWidget( tqparent ), m_part( part )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->add( m_history = new QListView( this ) );
- m_history->setVScrollBarMode( QListView::AlwaysOn );
- m_history->setSelectionMode( QListView::NoSelection );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->add( m_history = new TQListView( this ) );
+ m_history->setVScrollBarMode( TQListView::AlwaysOn );
+ m_history->setSelectionMode( TQListView::NoSelection );
m_history->addColumn( i18n( "Commands" ) );
- m_history->setResizeMode( QListView::AllColumns );
+ m_history->setResizeMode( TQListView::AllColumns );
m_history->setRootIsDecorated( true );
- layout->add( m_groupCommands = new QCheckBox( i18n( "Group commands" ), this ) );
+ tqlayout->add( m_groupCommands = new TQCheckBox( i18n( "Group commands" ), this ) );
m_history->setSorting( 0, true );
VHistoryGroupItem* group = 0;
VHistoryItem* last = 0;
- QPtrVector<VCommand> cmds;
+ TQPtrVector<VCommand> cmds;
part->commandHistory()->commands()->toVector( &cmds );
int c = cmds.count();
for ( int i = 0; i < c; i++ )
@@ -1225,7 +1225,7 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
if ( ( i > 0 ) && ( cmds[ i ]->name() == cmds[ i - 1 ]->name() ) )
if ( group )
{
- QListViewItem* prev = group->firstChild();
+ TQListViewItem* prev = group->firstChild();
while ( prev && prev->nextSibling() )
prev = prev->nextSibling();
new VHistoryItem( cmds[ i ], group, prev );
@@ -1243,17 +1243,17 @@ VHistoryTab::VHistoryTab( KarbonPart* part, QWidget* parent )
}
m_history->sort();
- connect( m_history, SIGNAL( mouseButtonClicked( int, QListViewItem*, const QPoint&, int ) ), this, SLOT( commandClicked( int, QListViewItem*, const QPoint&, int ) ) );
- connect( m_groupCommands, SIGNAL( stateChanged( int ) ), this, SLOT( groupingChanged( int ) ) );
- connect( part->commandHistory(), SIGNAL( historyCleared() ), this, SLOT( historyCleared() ) );
- connect( part->commandHistory(), SIGNAL( commandAdded( VCommand* ) ), this, SLOT( slotCommandAdded( VCommand* ) ) );
- connect( part->commandHistory(), SIGNAL( commandExecuted( VCommand* ) ), this, SLOT( commandExecuted( VCommand* ) ) );
- connect( part->commandHistory(), SIGNAL( firstCommandRemoved() ), this, SLOT( removeFirstCommand() ) );
- connect( part->commandHistory(), SIGNAL( lastCommandRemoved() ), this, SLOT( removeLastCommand() ) );
- connect( this, SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), SLOT( undo( VCommand* ) ) );
- connect( this, SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), SLOT( redo( VCommand* ) ) );
- connect( this, SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( undoAllTo( VCommand* ) ) );
- connect( this, SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), SLOT( redoAllTo( VCommand* ) ) );
+ connect( m_history, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem*, const TQPoint&, int ) ), this, TQT_SLOT( commandClicked( int, TQListViewItem*, const TQPoint&, int ) ) );
+ connect( m_groupCommands, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( groupingChanged( int ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( historyCleared() ), this, TQT_SLOT( historyCleared() ) );
+ connect( part->commandHistory(), TQT_SIGNAL( commandAdded( VCommand* ) ), this, TQT_SLOT( slotCommandAdded( VCommand* ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand* ) ), this, TQT_SLOT( commandExecuted( VCommand* ) ) );
+ connect( part->commandHistory(), TQT_SIGNAL( firstCommandRemoved() ), this, TQT_SLOT( removeFirstCommand() ) );
+ connect( part->commandHistory(), TQT_SIGNAL( lastCommandRemoved() ), this, TQT_SLOT( removeLastCommand() ) );
+ connect( this, TQT_SIGNAL( undoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( undo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( redoCommand( VCommand* ) ), part->commandHistory(), TQT_SLOT( redo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( undoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( undoAllTo( VCommand* ) ) );
+ connect( this, TQT_SIGNAL( redoCommandsTo( VCommand* ) ), part->commandHistory(), TQT_SLOT( redoAllTo( VCommand* ) ) );
} // VHistoryTab::VHistoryTab
VHistoryTab::~VHistoryTab()
@@ -1275,13 +1275,13 @@ VHistoryTab::historyCleared()
void
VHistoryTab::commandExecuted( VCommand* command )
{
- QListViewItem* item = m_history->firstChild();
+ TQListViewItem* item = m_history->firstChild();
bool found = false;
while ( !found && item )
{
if ( item->rtti() == 1001 )
{
- QListViewItem* child = item->firstChild();
+ TQListViewItem* child = item->firstChild();
while ( !found && child )
{
found = ( ( (VHistoryItem*)child )->command() == command );
@@ -1297,9 +1297,9 @@ VHistoryTab::commandExecuted( VCommand* command )
}
if ( found )
{
- m_history->repaintItem( item );
- if ( item->parent() )
- m_history->repaintItem( item->parent() );
+ m_history->tqrepaintItem( item );
+ if ( item->tqparent() )
+ m_history->tqrepaintItem( item->tqparent() );
m_history->ensureItemVisible( item );
}
} // VHistoryTab::commandExecuted
@@ -1310,7 +1310,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
if ( !command )
return;
- QListViewItem* last = m_history->firstChild();
+ TQListViewItem* last = m_history->firstChild();
while ( last && last->nextSibling() )
last = last->nextSibling();
@@ -1320,7 +1320,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
{
if( last->rtti() == 1002 )
{
- QListViewItem* prevSibling;
+ TQListViewItem* prevSibling;
if( m_history->childCount() > 1 )
{
prevSibling = m_history->firstChild();
@@ -1331,7 +1331,7 @@ VHistoryTab::slotCommandAdded( VCommand* command )
prevSibling = m_history->firstChild();
last = new VHistoryGroupItem( (VHistoryItem*)last, m_history, prevSibling );
}
- QListViewItem* prev = last->firstChild();
+ TQListViewItem* prev = last->firstChild();
while ( prev && prev->nextSibling() )
prev = prev->nextSibling();
m_history->setCurrentItem( new VHistoryItem( command, (VHistoryGroupItem*)last, prev ) );
@@ -1370,7 +1370,7 @@ VHistoryTab::removeLastCommand()
{
if ( m_history->childCount() > 0 )
{
- QListViewItem* last = m_history->firstChild();
+ TQListViewItem* last = m_history->firstChild();
while ( last && last->nextSibling() )
last = last->nextSibling();
if ( last->rtti() == 1002 )
@@ -1392,7 +1392,7 @@ VHistoryTab::removeLastCommand()
} // VHistoryTab::removeLastCommand
void
-VHistoryTab::commandClicked( int button, QListViewItem* item, const QPoint&, int )
+VHistoryTab::commandClicked( int button, TQListViewItem* item, const TQPoint&, int )
{
if ( !item || item->rtti() == 1001 )
return;
@@ -1415,9 +1415,9 @@ VHistoryTab::groupingChanged( int )
{
if ( m_groupCommands->isChecked() && m_history->childCount() > 1 )
{
- QListViewItem* s2last = 0;
- QListViewItem* last = m_history->firstChild();
- QListViewItem* item = last->nextSibling();
+ TQListViewItem* s2last = 0;
+ TQListViewItem* last = m_history->firstChild();
+ TQListViewItem* item = last->nextSibling();
while ( item )
if ( last->text( 0 ) == item->text( 0 ) )
{
@@ -1436,11 +1436,11 @@ VHistoryTab::groupingChanged( int )
}
else
{
- QListViewItem* item = m_history->firstChild();
+ TQListViewItem* item = m_history->firstChild();
while ( item )
if ( item->rtti() == 1001 )
{
- QListViewItem* child;
+ TQListViewItem* child;
while ( ( child = item->firstChild() ) )
{
item->takeItem( child );
diff --git a/karbon/dockers/vdocumentdocker.h b/karbon/dockers/vdocumentdocker.h
index 278f56ba..4f60949a 100644
--- a/karbon/dockers/vdocumentdocker.h
+++ b/karbon/dockers/vdocumentdocker.h
@@ -20,14 +20,14 @@
#ifndef __VDOCUMENTDOCKER_H__
#define __VDOCUMENTDOCKER_H__
-#include <qlistview.h>
-#include <qptrdict.h>
+#include <tqlistview.h>
+#include <tqptrdict.h>
-class QHButtonGroup;
-class QPoint;
-class QLabel;
-class QPixmap;
-class QCheckBox;
+class TQHButtonGroup;
+class TQPoint;
+class TQLabel;
+class TQPixmap;
+class TQCheckBox;
class VDocument;
class VLayer;
@@ -37,19 +37,20 @@ class KarbonView;
* Document Tab *
*************************************************************************/
-class VDocumentPreview : public QWidget
+class VDocumentPreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VDocumentPreview( KarbonView* view, QWidget* parent = 0 );
+ VDocumentPreview( KarbonView* view, TQWidget* tqparent = 0 );
~VDocumentPreview();
void reset();
protected:
- void paintEvent( QPaintEvent* e );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ void paintEvent( TQPaintEvent* e );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
private:
VDocument *m_document;
@@ -57,15 +58,16 @@ class VDocumentPreview : public QWidget
KoPoint m_firstPoint;
KoPoint m_lastPoint;
bool m_dragging;
- QPixmap *m_docpixmap;
+ TQPixmap *m_docpixmap;
}; // VDocumentPreview
-class VDocumentTab : public QWidget
+class VDocumentTab : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VDocumentTab( KarbonView* view, QWidget* parent );
+ VDocumentTab( KarbonView* view, TQWidget* tqparent );
~VDocumentTab();
public slots:
@@ -77,10 +79,10 @@ class VDocumentTab : public QWidget
private:
VDocumentPreview* m_documentPreview;
- QLabel* m_height;
- QLabel* m_width;
- QLabel* m_layers;
- QLabel* m_format;
+ TQLabel* m_height;
+ TQLabel* m_width;
+ TQLabel* m_layers;
+ TQLabel* m_format;
KarbonView* m_view;
}; // VDocumentTab
@@ -89,17 +91,17 @@ class VDocumentTab : public QWidget
* Layers Tab *
*************************************************************************/
-class VLayerListViewItem : public QCheckListItem
+class VLayerListViewItem : public TQCheckListItem
{
public:
- VLayerListViewItem( QListView* parent, VLayer* layer, VDocument *doc, QPtrDict<VLayerListViewItem> *map );
+ VLayerListViewItem( TQListView* tqparent, VLayer* layer, VDocument *doc, TQPtrDict<VLayerListViewItem> *map );
virtual ~VLayerListViewItem();
VLayer* layer() { return m_layer; }
int pos();
void update();
- virtual QString key( int column, bool ascending ) const;
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
void setKey( uint key ) { m_key = key; }
protected:
@@ -109,43 +111,44 @@ private:
VLayer *m_layer;
VDocument *m_document;
uint m_key;
- QPtrDict<VLayerListViewItem> *m_map;
+ TQPtrDict<VLayerListViewItem> *m_map;
}; // VLayerListViewItem
-class VObjectListViewItem : public QListViewItem
+class VObjectListViewItem : public TQListViewItem
{
public:
- VObjectListViewItem( QListViewItem* parent, VObject* object, VDocument *doc, uint key, QPtrDict<VObjectListViewItem> *map );
+ VObjectListViewItem( TQListViewItem* tqparent, VObject* object, VDocument *doc, uint key, TQPtrDict<VObjectListViewItem> *map );
virtual ~VObjectListViewItem();
VObject* object() { return m_object; }
void update();
- virtual QString key( int column, bool ascending ) const;
- virtual int compare( QListViewItem *i, int col, bool ascending ) const;
+ virtual TQString key( int column, bool ascending ) const;
+ virtual int compare( TQListViewItem *i, int col, bool ascending ) const;
void setKey( uint key ) { m_key = key; }
private:
VObject *m_object;
VDocument *m_document;
uint m_key;
- QPtrDict<VObjectListViewItem> *m_map;
+ TQPtrDict<VObjectListViewItem> *m_map;
};
-class VLayersTab : public QWidget
+class VLayersTab : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VLayersTab( KarbonView* view, QWidget* parent = 0 );
+ VLayersTab( KarbonView* view, TQWidget* tqparent = 0 );
~VLayersTab();
public slots:
void updatePreviews();
void updateLayers();
- void itemClicked( QListViewItem* item, const QPoint&, int col );
+ void itemClicked( TQListViewItem* item, const TQPoint&, int col );
void selectionChangedFromList();
void selectionChangedFromTool();
- void renameItem( QListViewItem* item, const QPoint&, int col );
+ void renameItem( TQListViewItem* item, const TQPoint&, int col );
void addLayer();
void raiseItem();
void lowerItem();
@@ -155,22 +158,22 @@ public slots:
private slots:
void slotButtonClicked( int ID );
void removeDeletedObjectsFromList();
- void updateChildItems( QListViewItem *item );
+ void updateChildItems( TQListViewItem *item );
void toggleState( VObject *obj, int col );
protected:
VLayerListViewItem* listItem( int pos );
- void updateObjects( VObject *object, QListViewItem *item );
+ void updateObjects( VObject *object, TQListViewItem *item );
void resetSelection();
void selectActiveLayer();
private:
- QListView *m_layersListView;
- QHButtonGroup *m_buttonGroup;
+ TQListView *m_layersListView;
+ TQHButtonGroup *m_buttonGroup;
KarbonView *m_view;
VDocument *m_document;
- QPtrDict<VLayerListViewItem> m_layers;
- QPtrDict<VObjectListViewItem> m_objects;
+ TQPtrDict<VLayerListViewItem> m_layers;
+ TQPtrDict<VObjectListViewItem> m_objects;
}; // VLayersTab
/*************************************************************************
@@ -179,50 +182,51 @@ private:
class VHistoryItem;
-class VHistoryGroupItem : public QListViewItem
+class VHistoryGroupItem : public TQListViewItem
{
public:
- VHistoryGroupItem( VHistoryItem* item, QListView* parent, QListViewItem* after );
+ VHistoryGroupItem( VHistoryItem* item, TQListView* tqparent, TQListViewItem* after );
~VHistoryGroupItem();
- void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
- void paintFocus( QPainter*, const QColorGroup&, const QRect& );
+ void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
+ void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& );
- virtual QString key( int, bool ) const { return m_key; }
+ virtual TQString key( int, bool ) const { return m_key; }
virtual int rtti() const { return 1001; }
private:
- QString m_key;
+ TQString m_key;
}; // VHistoryGroupItem
-class VHistoryItem : public QListViewItem
+class VHistoryItem : public TQListViewItem
{
public:
- VHistoryItem( VCommand* command, QListView* parent, QListViewItem* after );
- VHistoryItem( VCommand* command, VHistoryGroupItem* parent, QListViewItem* after );
+ VHistoryItem( VCommand* command, TQListView* tqparent, TQListViewItem* after );
+ VHistoryItem( VCommand* command, VHistoryGroupItem* tqparent, TQListViewItem* after );
~VHistoryItem();
VCommand* command() { return m_command; }
- void paintCell( QPainter* p, const QColorGroup& cg, int column, int width, int align );
- void paintFocus( QPainter*, const QColorGroup&, const QRect& );
+ void paintCell( TQPainter* p, const TQColorGroup& cg, int column, int width, int align );
+ void paintFocus( TQPainter*, const TQColorGroup&, const TQRect& );
- virtual QString key( int, bool ) const { return m_key; }
+ virtual TQString key( int, bool ) const { return m_key; }
virtual int rtti() const { return 1002; }
private:
void init();
- QString m_key;
+ TQString m_key;
VCommand* m_command;
}; // VHistoryItem
-class VHistoryTab : public QWidget
+class VHistoryTab : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VHistoryTab( KarbonPart* part, QWidget* parent );
+ VHistoryTab( KarbonPart* part, TQWidget* tqparent );
~VHistoryTab();
bool groupingEnabled();
@@ -234,7 +238,7 @@ class VHistoryTab : public QWidget
void removeFirstCommand();
void removeLastCommand();
- void commandClicked( int button, QListViewItem* item, const QPoint& point, int col );
+ void commandClicked( int button, TQListViewItem* item, const TQPoint& point, int col );
void groupingChanged( int );
signals:
@@ -244,9 +248,9 @@ class VHistoryTab : public QWidget
void redoCommandsTo( VCommand* command );
private:
- QListView* m_history;
- QListViewItem* m_lastCommand;
- QCheckBox* m_groupCommands;
+ TQListView* m_history;
+ TQListViewItem* m_lastCommand;
+ TQCheckBox* m_groupCommands;
long m_lastCommandIndex;
KarbonPart* m_part;
diff --git a/karbon/dockers/vstrokedocker.cc b/karbon/dockers/vstrokedocker.cc
index 200c9dc9..fb3dce28 100644
--- a/karbon/dockers/vstrokedocker.cc
+++ b/karbon/dockers/vstrokedocker.cc
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qhbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwidget.h>
-#include <qtooltip.h>
+#include <tqhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwidget.h>
+#include <tqtooltip.h>
#include <kiconloader.h>
#include <klocale.h>
@@ -39,72 +39,72 @@
#include "vstrokedocker.h"
-VStrokeDocker::VStrokeDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ )
- : QWidget(), m_part ( part ), m_view( parent )
+VStrokeDocker::VStrokeDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ )
+ : TQWidget(), m_part ( part ), m_view( tqparent )
{
setCaption( i18n( "Stroke Properties" ) );
- QPushButton *button;
+ TQPushButton *button;
- QGridLayout *mainLayout = new QGridLayout( this, 4, 2 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 4, 2 );
- QLabel* widthLabel = new QLabel( i18n ( "stroke width", "Width:" ), this );
+ TQLabel* widthLabel = new TQLabel( i18n ( "stroke width", "Width:" ), this );
mainLayout->addWidget( widthLabel, 0, 0 );
// set min/max/step and value in points, then set actual unit
m_setLineWidth = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5, 1.0, KoUnit::U_PT, 2 );
m_setLineWidth->setUnit( part->unit() );
- QToolTip::add( m_setLineWidth, i18n( "Set line width of actual selection" ) );
+ TQToolTip::add( m_setLineWidth, i18n( "Set line width of actual selection" ) );
mainLayout->addWidget ( m_setLineWidth, 0, 1 );
- connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) );
+ connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) );
- QLabel* capLabel = new QLabel( i18n ( "Cap:" ), this );
+ TQLabel* capLabel = new TQLabel( i18n ( "Cap:" ), this );
mainLayout->addWidget( capLabel, 1, 0 );
- m_capGroup = new QHButtonGroup( this );
- m_capGroup->setFrameShape( QFrame::NoFrame );
+ m_capGroup = new TQHButtonGroup( this );
+ m_capGroup->setFrameShape( TQFrame::NoFrame );
m_capGroup->setInsideMargin( 1 );
m_capGroup->setExclusive( true );
- button = new QPushButton( "", m_capGroup );
+ button = new TQPushButton( "", m_capGroup );
button->setPixmap( SmallIcon( "cap_butt" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Butt cap" ) );
+ TQToolTip::add( button, i18n( "Butt cap" ) );
m_capGroup->insert( button );
- button = new QPushButton( "", m_capGroup );
+ button = new TQPushButton( "", m_capGroup );
button->setPixmap( SmallIcon( "cap_round" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Round cap" ) );
+ TQToolTip::add( button, i18n( "Round cap" ) );
m_capGroup->insert( button );
- button = new QPushButton( "", m_capGroup );
+ button = new TQPushButton( "", m_capGroup );
button->setPixmap( SmallIcon( "cap_square" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Square cap" ) );
+ TQToolTip::add( button, i18n( "Square cap" ) );
m_capGroup->insert( button );
mainLayout->addWidget( m_capGroup, 1, 1 );
- connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
+ connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
- QLabel* joinLabel = new QLabel( i18n ( "Join:" ), this );
+ TQLabel* joinLabel = new TQLabel( i18n ( "Join:" ), this );
mainLayout->addWidget( joinLabel, 2, 0 );
- m_joinGroup = new QHButtonGroup( this );
- m_joinGroup->setFrameShape( QFrame::NoFrame );
+ m_joinGroup = new TQHButtonGroup( this );
+ m_joinGroup->setFrameShape( TQFrame::NoFrame );
m_joinGroup->setInsideMargin( 1 );
m_joinGroup->setExclusive( true );
- button = new QPushButton( "", m_joinGroup );
+ button = new TQPushButton( "", m_joinGroup );
button->setPixmap( SmallIcon( "join_miter" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Miter join" ) );
+ TQToolTip::add( button, i18n( "Miter join" ) );
m_joinGroup->insert( button );
- button = new QPushButton( "", m_joinGroup );
+ button = new TQPushButton( "", m_joinGroup );
button->setPixmap( SmallIcon( "join_round" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Round join" ) );
+ TQToolTip::add( button, i18n( "Round join" ) );
m_joinGroup->insert( button );
- button = new QPushButton( "", m_joinGroup );
+ button = new TQPushButton( "", m_joinGroup );
button->setPixmap( SmallIcon( "join_bevel" ) );
button->setToggleButton( true );
- QToolTip::add( button, i18n( "Bevel join" ) );
+ TQToolTip::add( button, i18n( "Bevel join" ) );
m_joinGroup->insert( button );
mainLayout->addWidget( m_joinGroup, 2, 1 );
- connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
mainLayout->setRowStretch( 3, 1 );
mainLayout->setColStretch( 1, 1 );
@@ -149,9 +149,9 @@ void VStrokeDocker::slotJoinChanged( int ID )
void VStrokeDocker::updateDocker()
{
- disconnect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) );
- disconnect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
- disconnect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ disconnect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) );
+ disconnect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
+ disconnect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
switch( m_stroke.lineCap() )
{
@@ -175,9 +175,9 @@ void VStrokeDocker::updateDocker()
m_setLineWidth->changeValue( m_stroke.lineWidth() );
- connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) );
- connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
- connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) );
+ connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
+ connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
}
void VStrokeDocker::widthChanged()
@@ -197,15 +197,15 @@ void VStrokeDocker::setStroke( const VStroke &stroke )
void VStrokeDocker::setUnit( KoUnit::Unit unit )
{
- disconnect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) );
- disconnect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
- disconnect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ disconnect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) );
+ disconnect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
+ disconnect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
m_setLineWidth->setUnit( unit );
- connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( widthChanged() ) );
- connect( m_capGroup, SIGNAL( clicked( int ) ), this, SLOT( slotCapChanged( int ) ) );
- connect( m_joinGroup, SIGNAL( clicked( int ) ), this, SLOT( slotJoinChanged( int ) ) );
+ connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( widthChanged() ) );
+ connect( m_capGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotCapChanged( int ) ) );
+ connect( m_joinGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotJoinChanged( int ) ) );
}
#include "vstrokedocker.moc"
diff --git a/karbon/dockers/vstrokedocker.h b/karbon/dockers/vstrokedocker.h
index 77d536b9..742387a7 100644
--- a/karbon/dockers/vstrokedocker.h
+++ b/karbon/dockers/vstrokedocker.h
@@ -21,8 +21,8 @@
#ifndef __VSTROKEDOCKER_H__
#define __VSTROKEDOCKER_H__
-class QHButtonGroup;
-class QWidget;
+class TQHButtonGroup;
+class TQWidget;
class KoUnitDoubleSpinBox;
@@ -30,20 +30,21 @@ class KoMainWindow;
class KarbonView;
class KarbonPart;
-class VStrokeDocker : public QWidget
+class VStrokeDocker : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStrokeDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
+ VStrokeDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L );
public slots:
virtual void setStroke( const VStroke & );
virtual void setUnit( KoUnit::Unit unit );
private:
- QHButtonGroup *m_capGroup;
- QHButtonGroup *m_joinGroup;
+ TQHButtonGroup *m_capGroup;
+ TQHButtonGroup *m_joinGroup;
KarbonPart *m_part;
KarbonView *m_view;
KoUnitDoubleSpinBox *m_setLineWidth;
diff --git a/karbon/dockers/vstyledocker.cc b/karbon/dockers/vstyledocker.cc
index 9a7ce083..fcf317f6 100644
--- a/karbon/dockers/vstyledocker.cc
+++ b/karbon/dockers/vstyledocker.cc
@@ -18,12 +18,12 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qsize.h>
-#include <qhbuttongroup.h>
-#include <qtoolbutton.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqsize.h>
+#include <tqhbuttongroup.h>
+#include <tqtoolbutton.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -46,8 +46,8 @@
#include <unistd.h>
-ClipartChooser::ClipartChooser( QSize iconSize, QWidget *parent, const char *name )
- : KoIconChooser( iconSize, parent, name )
+ClipartChooser::ClipartChooser( TQSize iconSize, TQWidget *tqparent, const char *name )
+ : KoIconChooser( iconSize, tqparent, name )
{
setDragEnabled( true );
}
@@ -62,7 +62,7 @@ ClipartChooser::startDrag()
double s = kMax( selectedClipart->originalWidth(), selectedClipart->originalHeight() );
VObject *clipart = selectedClipart->clipart()->clone();
- QWMatrix mat( s, 0, 0, -s, -( s / 2 ), ( s / 2 ) );
+ TQWMatrix mat( s, 0, 0, -s, -( s / 2 ), ( s / 2 ) );
VTransformCmd trafo( 0L, mat );
trafo.visit( *clipart );
@@ -72,27 +72,27 @@ ClipartChooser::startDrag()
kd->dragCopy();
}
-VStyleDocker::VStyleDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ )
- : QWidget(), m_part ( part ), m_view( parent )
+VStyleDocker::VStyleDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ )
+ : TQWidget(), m_part ( part ), m_view( tqparent )
{
setCaption( i18n( "Resources" ) );
- mTabWidget = new QTabWidget( this );
+ mTabWidget = new TQTabWidget( this );
//Pattern
KoPatternChooser *pPatternChooser = new KoPatternChooser( KarbonFactory::rServer()->patterns(), mTabWidget );
pPatternChooser->setCaption( i18n( "Patterns" ) );
- connect( pPatternChooser, SIGNAL(selected( KoIconItem * ) ), this, SLOT( slotItemSelected( KoIconItem * )));
- connect( KarbonFactory::rServer(), SIGNAL( patternAdded( KoIconItem * )), pPatternChooser, SLOT( addPattern( KoIconItem * )));
- connect( KarbonFactory::rServer(), SIGNAL( patternRemoved( KoIconItem * )), pPatternChooser, SLOT( removePattern( KoIconItem * )));
+ connect( pPatternChooser, TQT_SIGNAL(selected( KoIconItem * ) ), this, TQT_SLOT( slotItemSelected( KoIconItem * )));
+ connect( KarbonFactory::rServer(), TQT_SIGNAL( patternAdded( KoIconItem * )), pPatternChooser, TQT_SLOT( addPattern( KoIconItem * )));
+ connect( KarbonFactory::rServer(), TQT_SIGNAL( patternRemoved( KoIconItem * )), pPatternChooser, TQT_SLOT( removePattern( KoIconItem * )));
mTabWidget->addTab( pPatternChooser, i18n( "Patterns" ) );
//Clipart
ClipartWidget *pClipartWidget = new ClipartWidget( KarbonFactory::rServer()->cliparts(), part, mTabWidget );
mTabWidget->addTab( pClipartWidget, i18n( "Clipart" ) );
- QVBoxLayout *mainWidgetLayout = new QVBoxLayout( this, 2 );
+ TQVBoxLayout *mainWidgetLayout = new TQVBoxLayout( this, 2 );
mainWidgetLayout->addWidget( mTabWidget );
mainWidgetLayout->activate();
setMinimumHeight( 174 );
@@ -119,22 +119,22 @@ void VStyleDocker::slotItemSelected( KoIconItem *item )
}
void
-VStyleDocker::mouseReleaseEvent( QMouseEvent * )
+VStyleDocker::mouseReleaseEvent( TQMouseEvent * )
{
}
-ClipartWidget::ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, QWidget* parent )
- : QWidget( parent ), m_part( part )
+ClipartWidget::ClipartWidget( TQPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, TQWidget* tqparent )
+ : TQWidget( tqparent ), m_part( part )
{
KIconLoader il;
- QVBoxLayout* layout = new QVBoxLayout( this );
- layout->addWidget( m_clipartChooser = new ClipartChooser( QSize( 32, 32 ), this ) );
- layout->addWidget( m_buttonGroup = new QHButtonGroup( this ) );
- QToolButton* m_addClipartButton;
- m_buttonGroup->insert( m_addClipartButton = new QToolButton( m_buttonGroup ) );
- m_buttonGroup->insert( m_importClipartButton = new QToolButton( m_buttonGroup ) );
- m_buttonGroup->insert( m_deleteClipartButton = new QToolButton( m_buttonGroup ) );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ tqlayout->addWidget( m_clipartChooser = new ClipartChooser( TQSize( 32, 32 ), this ) );
+ tqlayout->addWidget( m_buttonGroup = new TQHButtonGroup( this ) );
+ TQToolButton* m_addClipartButton;
+ m_buttonGroup->insert( m_addClipartButton = new TQToolButton( m_buttonGroup ) );
+ m_buttonGroup->insert( m_importClipartButton = new TQToolButton( m_buttonGroup ) );
+ m_buttonGroup->insert( m_deleteClipartButton = new TQToolButton( m_buttonGroup ) );
m_addClipartButton->setIconSet( SmallIcon( "14_layer_newlayer" ) );
m_addClipartButton->setTextLabel( i18n( "Add" ) );
m_importClipartButton->setIconSet( SmallIcon( "fileimport" ) );
@@ -145,11 +145,11 @@ ClipartWidget::ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPa
m_buttonGroup->setInsideMargin( 3 );
//setFrameStyle( Box | Sunken );
- layout->setMargin( 3 );
+ tqlayout->setMargin( 3 );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) );
- //connect( m_deleteClipartButton, SIGNAL( clicked() ), this, SLOT( deleteClipart() ) );
- connect( m_clipartChooser, SIGNAL( selected( KoIconItem* ) ), this, SLOT( clipartSelected( KoIconItem* ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) );
+ //connect( m_deleteClipartButton, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deleteClipart() ) );
+ connect( m_clipartChooser, TQT_SIGNAL( selected( KoIconItem* ) ), this, TQT_SLOT( clipartSelected( KoIconItem* ) ) );
m_clipartChooser->setAutoDelete( false );
VClipartIconItem* item = 0L;
@@ -199,7 +199,7 @@ ClipartWidget::addClipart()
if( selection->objects().count() > 1 )
{
- QPtrVector<VObject> objects;
+ TQPtrVector<VObject> objects;
selection->objects().toVector( &objects );
VGroup* group = new VGroup( 0L );
@@ -217,7 +217,7 @@ ClipartWidget::addClipart()
{
KoRect clipartBox = clipart->boundingBox();
double scaleFactor = 1. / kMax( clipartBox.width(), clipartBox.height() );
- QWMatrix trMatrix( scaleFactor, 0, 0, scaleFactor, -clipartBox.x() * scaleFactor, -clipartBox.y() * scaleFactor );
+ TQWMatrix trMatrix( scaleFactor, 0, 0, scaleFactor, -clipartBox.x() * scaleFactor, -clipartBox.y() * scaleFactor );
VTransformCmd trafo( 0L, trMatrix );
trafo.visit( *clipart );
@@ -247,28 +247,28 @@ ClipartWidget::addClipart()
void
ClipartWidget::importClipart()
{
- QStringList filter;
+ TQStringList filter;
filter << "application/x-karbon" << "image/svg+xml" << "image/x-wmf" << "image/x-eps" << "application/postscript";
- KFileDialog *dialog = new KFileDialog( "foo", QString::null, 0L, "Choose Graphic to Add", true);
+ KFileDialog *dialog = new KFileDialog( "foo", TQString(), 0L, "Choose Graphic to Add", true);
dialog->setMimeFilter( filter, "application/x-karbon" );
- if( dialog->exec()!=QDialog::Accepted )
+ if( dialog->exec()!=TQDialog::Accepted )
{
delete dialog;
return;
}
- QString fname = dialog->selectedFile();
+ TQString fname = dialog->selectedFile();
delete dialog;
if( m_part->nativeFormatMimeType() == dialog->currentMimeFilter().latin1() )
m_part->mergeNativeFormat( fname );
else
{
KoFilterManager man( m_part );
- KoFilter::ConversionStatus status;
- QString importedFile = man.import( fname, status );
+ KoFilter::ConversiontqStatus status;
+ TQString importedFile = man.import( fname, status );
if( status == KoFilter::OK )
m_part->mergeNativeFormat( importedFile );
if( !importedFile.isEmpty() )
- unlink( QFile::encodeName( importedFile ) );
+ unlink( TQFile::encodeName( importedFile ) );
if( status != KoFilter::OK )
return;
}
diff --git a/karbon/dockers/vstyledocker.h b/karbon/dockers/vstyledocker.h
index b1187735..026a7d97 100644
--- a/karbon/dockers/vstyledocker.h
+++ b/karbon/dockers/vstyledocker.h
@@ -22,29 +22,30 @@
#define __VSTYLEDOCKER_H__
#include <koIconChooser.h>
-#include <qwidget.h>
+#include <tqwidget.h>
-class QTabWidget;
+class TQTabWidget;
class KarbonView;
class KarbonPart;
-class QHButtonGroup;
-class QToolButton;
+class TQHButtonGroup;
+class TQToolButton;
class VClipartIconItem;
class ClipartChooser : public KoIconChooser
{
public:
- ClipartChooser( QSize iconSize, QWidget *parent = 0L, const char *name = 0L );
+ ClipartChooser( TQSize iconSize, TQWidget *tqparent = 0L, const char *name = 0L );
virtual void startDrag();
};
-class ClipartWidget : public QWidget
+class ClipartWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ClipartWidget( QPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, QWidget* parent = 0L );
+ ClipartWidget( TQPtrList<VClipartIconItem>* clipartItems, KarbonPart *part, TQWidget* tqparent = 0L );
~ClipartWidget();
VClipartIconItem* selectedClipart();
@@ -59,28 +60,29 @@ public slots:
private:
ClipartChooser* m_clipartChooser;
- QHButtonGroup* m_buttonGroup;
- QToolButton* m_importClipartButton;
- QToolButton* m_deleteClipartButton;
+ TQHButtonGroup* m_buttonGroup;
+ TQToolButton* m_importClipartButton;
+ TQToolButton* m_deleteClipartButton;
KarbonPart* m_part;
VClipartIconItem* m_clipartItem;
VClipartIconItem* m_selectedItem;
};
-class VStyleDocker : public QWidget
+class VStyleDocker : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStyleDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
+ VStyleDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L );
virtual ~VStyleDocker();
public slots:
void slotItemSelected( KoIconItem * );
private:
- virtual void mouseReleaseEvent( QMouseEvent *e );
- QTabWidget *mTabWidget;
+ virtual void mouseReleaseEvent( TQMouseEvent *e );
+ TQTabWidget *mTabWidget;
KarbonPart *m_part;
KarbonView *m_view;
};
diff --git a/karbon/dockers/vtransformdocker.cc b/karbon/dockers/vtransformdocker.cc
index 56b07161..1616b47e 100644
--- a/karbon/dockers/vtransformdocker.cc
+++ b/karbon/dockers/vtransformdocker.cc
@@ -18,11 +18,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qwidget.h>
-#include <qwmatrix.h>
-#include <qtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
+#include <tqwmatrix.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <KoMainWindow.h>
@@ -37,62 +37,62 @@
#include "vtransformdocker.h"
-VTransformDocker::VTransformDocker( KarbonPart* part, KarbonView* parent, const char* /*name*/ )
- : QWidget(), m_part ( part ), m_view( parent )
+VTransformDocker::VTransformDocker( KarbonPart* part, KarbonView* tqparent, const char* /*name*/ )
+ : TQWidget(), m_part ( part ), m_view( tqparent )
{
setCaption( i18n( "Transform" ) );
- QGridLayout *mainLayout = new QGridLayout( this, 5, 5 );
+ TQGridLayout *mainLayout = new TQGridLayout( this, 5, 5 );
//X: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* xLabel = new QLabel( i18n ( "X:" ), this );
+ TQLabel* xLabel = new TQLabel( i18n ( "X:" ), this );
mainLayout->addWidget( xLabel, 0, 0 );
m_x = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_x, 0, 1 );
- QToolTip::add( m_x, i18n("Set x-position of actual selection") );
+ TQToolTip::add( m_x, i18n("Set x-position of actual selection") );
//Y: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* yLabel = new QLabel( i18n ( "Y:" ), this );
+ TQLabel* yLabel = new TQLabel( i18n ( "Y:" ), this );
mainLayout->addWidget( yLabel, 0, 2 );
m_y = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_y, 0, 3 );
- QToolTip::add( m_y, i18n("Set y-position of actual selection") );
+ TQToolTip::add( m_y, i18n("Set y-position of actual selection") );
//Width: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* wLabel = new QLabel( i18n ( "W:" ), this );
+ TQLabel* wLabel = new TQLabel( i18n ( "W:" ), this );
mainLayout->addWidget( wLabel, 1, 0 );
m_width = new KoUnitDoubleSpinBox( this, 0.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_width, 1, 1 );
- QToolTip::add( m_width, i18n("Set width of actual selection") );
+ TQToolTip::add( m_width, i18n("Set width of actual selection") );
//Height: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* hLabel = new QLabel( i18n ( "H:" ), this );
+ TQLabel* hLabel = new TQLabel( i18n ( "H:" ), this );
mainLayout->addWidget( hLabel, 1, 2 );
m_height = new KoUnitDoubleSpinBox( this, 0.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_height, 1, 3 );
- QToolTip::add( m_height, i18n("Set height of actual selection") );
+ TQToolTip::add( m_height, i18n("Set height of actual selection") );
//TODO: Add Rotation, Shear
//ROTATE: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* rLabel = new QLabel( i18n ( "R:" ), this );
+ TQLabel* rLabel = new TQLabel( i18n ( "R:" ), this );
mainLayout->addWidget( rLabel, 3, 0 );
m_rotate = new KDoubleSpinBox( -360.0, 360.0, 1.0, 10.0, 1, this );
mainLayout->addWidget( m_rotate, 3, 1 );
- QToolTip::add( m_rotate, i18n("Rotate actual selection") );
+ TQToolTip::add( m_rotate, i18n("Rotate actual selection") );
//X-Shear: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* sxLabel = new QLabel( i18n ( "SX:" ), this );
+ TQLabel* sxLabel = new TQLabel( i18n ( "SX:" ), this );
mainLayout->addWidget( sxLabel, 2, 0 );
m_shearX = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_shearX, 2, 1 );
- QToolTip::add( m_shearX, i18n("Shear actual selection in x-direction") );
+ TQToolTip::add( m_shearX, i18n("Shear actual selection in x-direction") );
//Y-Shear: (TODO: Set 5000 limit to real Karbon14 limit)
- QLabel* syLabel = new QLabel( i18n ( "SY:" ), this );
+ TQLabel* syLabel = new TQLabel( i18n ( "SY:" ), this );
mainLayout->addWidget( syLabel, 2, 2 );
m_shearY = new KoUnitDoubleSpinBox( this, -5000.0, 5000.0, 1.0, 10.0, m_part->unit(), 1 );
mainLayout->addWidget( m_shearY, 2, 3 );
- QToolTip::add( m_shearY, i18n("Shear actual selection in y-direction") );
+ TQToolTip::add( m_shearY, i18n("Shear actual selection in y-direction") );
mainLayout->setRowStretch( 4, 1 );
mainLayout->setColStretch( 1, 1 );
@@ -106,23 +106,23 @@ VTransformDocker::enableSignals( bool enable )
{
if( enable )
{
- connect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) );
- connect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) );
- connect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) );
- connect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) );
- connect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) );
- connect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) );
- connect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) );
+ connect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) );
+ connect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) );
+ connect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) );
+ connect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) );
+ connect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) );
+ connect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) );
+ connect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) );
}
else
{
- disconnect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) );
- disconnect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( translate() ) );
- disconnect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) );
- disconnect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( scale() ) );
- disconnect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) );
- disconnect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) );
- disconnect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) );
+ disconnect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) );
+ disconnect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( translate() ) );
+ disconnect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) );
+ disconnect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( scale() ) );
+ disconnect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) );
+ disconnect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) );
+ disconnect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) );
}
}
@@ -172,7 +172,7 @@ VTransformDocker::translate()
VTranslateCmd *cmd = new VTranslateCmd( &m_view->part()->document(), newX-rect.x(), newY-rect.y(), false );
m_view->part()->addCommand( cmd );
}
- m_part->repaintAllViews( true );
+ m_part->tqrepaintAllViews( true );
}
void
@@ -190,7 +190,7 @@ VTransformDocker::scale()
VScaleCmd *cmd = new VScaleCmd( &m_view->part()->document(), rect.topLeft(), newW/rect.width(), newH/rect.height(), false );
m_view->part()->addCommand( cmd );
}
- m_part->repaintAllViews( true );
+ m_part->tqrepaintAllViews( true );
}
void
@@ -219,10 +219,10 @@ VTransformDocker::shearX()
shear /= double(rect.width()*0.5);
VShearCmd *cmd = new VShearCmd( &m_view->part()->document(), rect.center(), shear, 0 );
m_view->part()->addCommand( cmd );
- m_part->repaintAllViews( true );
- disconnect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) );
+ m_part->tqrepaintAllViews( true );
+ disconnect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) );
m_shearX->changeValue(0.0);
- connect( m_shearX, SIGNAL( valueChanged( double ) ), this, SLOT( shearX() ) );
+ connect( m_shearX, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearX() ) );
}
}
@@ -237,10 +237,10 @@ VTransformDocker::shearY()
shear /= double(rect.height()*0.5);
VShearCmd *cmd = new VShearCmd( &m_view->part()->document(), rect.center(), 0, shear );
m_view->part()->addCommand( cmd );
- m_part->repaintAllViews( true );
- disconnect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) );
+ m_part->tqrepaintAllViews( true );
+ disconnect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) );
m_shearY->changeValue(0.0);
- connect( m_shearY, SIGNAL( valueChanged( double ) ), this, SLOT( shearY() ) );
+ connect( m_shearY, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( shearY() ) );
}
}
@@ -254,10 +254,10 @@ VTransformDocker::rotate()
KoPoint center = m_view->part()->document().selection()->boundingBox().center();
VRotateCmd *cmd = new VRotateCmd( &m_view->part()->document(), center, angle );
m_view->part()->addCommand( cmd );
- m_part->repaintAllViews( true );
- disconnect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) );
+ m_part->tqrepaintAllViews( true );
+ disconnect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) );
m_rotate->setValue(0.0);
- connect( m_rotate, SIGNAL( valueChanged( double ) ), this, SLOT( rotate() ) );
+ connect( m_rotate, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( rotate() ) );
}
}
diff --git a/karbon/dockers/vtransformdocker.h b/karbon/dockers/vtransformdocker.h
index 3ba161d4..8e2f21e8 100644
--- a/karbon/dockers/vtransformdocker.h
+++ b/karbon/dockers/vtransformdocker.h
@@ -25,12 +25,13 @@ class KarbonPart;
class KarbonView;
class KoUnitDoubleSpinBox;
-class VTransformDocker : public QWidget
+class VTransformDocker : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VTransformDocker( KarbonPart* part, KarbonView* parent = 0L, const char* name = 0L );
+ VTransformDocker( KarbonPart* part, KarbonView* tqparent = 0L, const char* name = 0L );
public slots:
void update();
diff --git a/karbon/karbon_drag.cpp b/karbon/karbon_drag.cpp
index c605bb3c..3c60e94d 100644
--- a/karbon/karbon_drag.cpp
+++ b/karbon/karbon_drag.cpp
@@ -19,17 +19,17 @@
#include "karbon_drag.h"
-#include <qcstring.h>
-#include <qdom.h>
-#include <qtextstream.h>
+#include <tqcstring.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
#include "vdocument.h"
-QCString KarbonDrag::m_encodeFormats[NumEncodeFmts];
-QCString KarbonDrag::m_decodeFormats[NumDecodeFmts];
+TQCString KarbonDrag::m_encodeFormats[NumEncodeFmts];
+TQCString KarbonDrag::m_decodeFormats[NumDecodeFmts];
-KarbonDrag::KarbonDrag( QWidget *dragSource, const char *name )
- : QDragObject( dragSource, name )
+KarbonDrag::KarbonDrag( TQWidget *dragSource, const char *name )
+ : TQDragObject( dragSource, name )
{
m_encodeFormats[0] = "application/vnd.kde.karbon";
m_decodeFormats[0] = "application/vnd.kde.karbon";
@@ -45,18 +45,18 @@ KarbonDrag::format( int i ) const
return 0L;
}
-QByteArray
-KarbonDrag::encodedData( const char* mimetype ) const
+TQByteArray
+KarbonDrag::tqencodedData( const char* mimetype ) const
{
- QCString result;
+ TQCString result;
if( m_encodeFormats[0] == mimetype )
{
VObjectListIterator itr( m_objects );
// build a xml fragment containing the selection as karbon xml
- QDomDocument doc( "clip" );
- QDomElement elem = doc.createElement( "clip" );
- QTextStream ts( result, IO_WriteOnly );
+ TQDomDocument doc( "clip" );
+ TQDomElement elem = doc.createElement( "clip" );
+ TQTextStream ts( result, IO_WriteOnly );
for( ; itr.current() ; ++itr )
itr.current()->save( elem );
@@ -68,7 +68,7 @@ KarbonDrag::encodedData( const char* mimetype ) const
}
bool
-KarbonDrag::canDecode( QMimeSource* e)
+KarbonDrag::canDecode( TQMimeSource* e)
{
for( int i = 0; i < NumDecodeFmts; i++ )
{
@@ -80,14 +80,14 @@ KarbonDrag::canDecode( QMimeSource* e)
}
bool
-KarbonDrag::decode( QMimeSource* e, VObjectList& sl, VDocument& vdoc )
+KarbonDrag::decode( TQMimeSource* e, VObjectList& sl, VDocument& vdoc )
{
if( e->provides( m_decodeFormats[0] ) )
{
- QDomDocument doc( "clip" );
- QByteArray data = e->encodedData( m_decodeFormats[0] );
- doc.setContent( QCString( data, data.size()+1 ) );
- QDomElement clip = doc.documentElement();
+ TQDomDocument doc( "clip" );
+ TQByteArray data = e->tqencodedData( m_decodeFormats[0] );
+ doc.setContent( TQCString( data, data.size()+1 ) );
+ TQDomElement clip = doc.documentElement();
// Try to parse the clipboard data
if( clip.tagName() == "clip" )
{
diff --git a/karbon/karbon_drag.h b/karbon/karbon_drag.h
index 96a72d32..0fb80119 100644
--- a/karbon/karbon_drag.h
+++ b/karbon/karbon_drag.h
@@ -20,7 +20,7 @@
#ifndef KARBON_DRAG_H
#define KARBON_DRAG_H
-#include <qdragobject.h>
+#include <tqdragobject.h>
#include "vgroup.h"
@@ -29,20 +29,21 @@ class VDocument;
#define NumEncodeFmts 1
#define NumDecodeFmts 1
-class KarbonDrag : public QDragObject
+class KarbonDrag : public TQDragObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- KarbonDrag( QWidget* dragSource = 0, const char* name = 0 );
+ KarbonDrag( TQWidget* dragSource = 0, const char* name = 0 );
const char* format( int i ) const;
- QByteArray encodedData( const char* mimetype ) const;
- static bool canDecode( QMimeSource * );
- static bool decode( QMimeSource* e, VObjectList& sl, VDocument& vdoc );
+ TQByteArray tqencodedData( const char* mimetype ) const;
+ static bool canDecode( TQMimeSource * );
+ static bool decode( TQMimeSource* e, VObjectList& sl, VDocument& vdoc );
void setObjectList( VObjectList l );
private:
- static QCString m_encodeFormats[NumEncodeFmts];
- static QCString m_decodeFormats[NumDecodeFmts];
+ static TQCString m_encodeFormats[NumEncodeFmts];
+ static TQCString m_decodeFormats[NumDecodeFmts];
VObjectList m_objects;
};
diff --git a/karbon/karbon_factory.cc b/karbon/karbon_factory.cc
index d751b295..e230dea7 100644
--- a/karbon/karbon_factory.cc
+++ b/karbon/karbon_factory.cc
@@ -41,16 +41,16 @@ KarbonResourceServer* KarbonFactory::s_rserver = 0;
KInstance* KarbonFactory::s_instance = 0L;
KAboutData* KarbonFactory::s_aboutData = 0L;
-KarbonFactory::KarbonFactory( QObject* parent, const char* name )
- : KoFactory( parent, name )
+KarbonFactory::KarbonFactory( TQObject* tqparent, const char* name )
+ : KoFactory( tqparent, name )
{
instance();
KarbonToolRegistry::instance();
// Load plugins
- KTrader::OfferList offers = KTrader::self() -> query(QString::fromLatin1("Karbon/CoreModule"),
- QString::fromLatin1("Type == 'Service'"));
+ KTrader::OfferList offers = KTrader::self() -> query(TQString::tqfromLatin1("Karbon/CoreModule"),
+ TQString::tqfromLatin1("Type == 'Service'"));
KTrader::OfferList::ConstIterator iter;
@@ -59,7 +59,7 @@ KarbonFactory::KarbonFactory( QObject* parent, const char* name )
KService::Ptr service = *iter;
int errCode = 0;
KParts::Plugin* plugin =
- KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, QStringList(), &errCode);
+ KParts::ComponentFactory::createInstanceFromService<KParts::Plugin> ( service, this, 0, TQStringList(), &errCode);
if ( plugin )
kdDebug() << "found plugin " << service -> property("Name").toString() << "\n";
}
@@ -76,18 +76,18 @@ KarbonFactory::~KarbonFactory()
}
KParts::Part*
-KarbonFactory::createPartObject( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, const char* classname, const QStringList& )
+KarbonFactory::createPartObject( TQWidget* tqparentWidget, const char* widgetName,
+ TQObject* tqparent, const char* name, const char* classname, const TQStringList& )
{
// If classname is "KoDocument", our host is a koffice application
// otherwise, the host wants us as a simple part, so switch to readonly and
// single view.
bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
- // parentWidget and widgetName are used by KoDocument for the
+ // tqparentWidget and widgetName are used by KoDocument for the
// "readonly+singleView" case.
KarbonPart* part =
- new KarbonPart( parentWidget, widgetName, parent, name, !bWantKoDocument );
+ new KarbonPart( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
if( !bWantKoDocument )
part->setReadWrite( false );
diff --git a/karbon/karbon_factory.h b/karbon/karbon_factory.h
index 553a2109..308bc603 100644
--- a/karbon/karbon_factory.h
+++ b/karbon/karbon_factory.h
@@ -31,14 +31,15 @@ class KarbonResourceServer;
class KARBONCOMMON_EXPORT KarbonFactory : public KoFactory
{
Q_OBJECT
+ TQ_OBJECT
public:
- KarbonFactory( QObject* parent = 0, const char* name = 0 );
+ KarbonFactory( TQObject* tqparent = 0, const char* name = 0 );
~KarbonFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget = 0,
- const char* widgetName = 0L, QObject* parent = 0L, const char* name = 0L,
- const char* classname = "KoDocument", const QStringList& args = QStringList() );
+ virtual KParts::Part* createPartObject( TQWidget *tqparentWidget = 0,
+ const char* widgetName = 0L, TQObject* tqparent = 0L, const char* name = 0L,
+ const char* classname = "KoDocument", const TQStringList& args = TQStringList() );
static KInstance* instance();
static KAboutData* aboutData();
diff --git a/karbon/karbon_grid_data.cpp b/karbon/karbon_grid_data.cpp
index f1e45ce1..8f15c406 100644
--- a/karbon/karbon_grid_data.cpp
+++ b/karbon/karbon_grid_data.cpp
@@ -19,11 +19,11 @@
*/
#include "karbon_grid_data.h"
-#include <qdom.h>
+#include <tqdom.h>
KarbonGridData::KarbonGridData()
{
- color = QColor( 228, 228, 228 );
+ color = TQColor( 228, 228, 228 );
freq = KoSize( 20, 20 );
snap = KoSize( 20, 20 );
isSnap = false;
@@ -34,7 +34,7 @@ KarbonGridData::~KarbonGridData()
{
}
-void KarbonGridData::save(QDomElement& /*element*/, const QString& /*name*/)
+void KarbonGridData::save(TQDomElement& /*element*/, const TQString& /*name*/)
{
/* Karbon::saveSize(element, name + "Freg", freq);
Karbon::saveSize(element, name + "Snap", snap);
@@ -43,14 +43,14 @@ void KarbonGridData::save(QDomElement& /*element*/, const QString& /*name*/)
element.setAttribute(name + "IsShow", (int)isShow);*/
}
-void KarbonGridData::load(const QDomElement& /*element*/, const QString& /*name*/)
+void KarbonGridData::load(const TQDomElement& /*element*/, const TQString& /*name*/)
{
/* KoSize sdef;
sdef = KoSize(10.0, 10.0);
freq = Karbon::loadSize(element, name + "Freg", sdef);
snap = Karbon::loadSize(element, name + "Snap", sdef);
- QColor def(QColor(228, 228, 228));
+ TQColor def(TQColor(228, 228, 228));
color = XmlReadColor(element, name + "Color", def);
isSnap = (bool)element.attribute(name + "IsSnap", "1").toInt();
diff --git a/karbon/karbon_grid_data.h b/karbon/karbon_grid_data.h
index 4d25bb8a..59ccc171 100644
--- a/karbon/karbon_grid_data.h
+++ b/karbon/karbon_grid_data.h
@@ -21,9 +21,9 @@
#define KARBON_GRID_DATA_H
#include <KoSize.h>
-#include <qcolor.h>
+#include <tqcolor.h>
-class QDomElement;
+class TQDomElement;
class KarbonGridData
{
@@ -31,12 +31,12 @@ public:
KarbonGridData();
~KarbonGridData();
- void save(QDomElement&, const QString&);
- void load(const QDomElement&, const QString&);
+ void save(TQDomElement&, const TQString&);
+ void load(const TQDomElement&, const TQString&);
KoSize freq;
KoSize snap;
- QColor color;
+ TQColor color;
bool isSnap;
bool isShow;
};
diff --git a/karbon/karbon_part.cc b/karbon/karbon_part.cc
index deab6739..88c06de3 100644
--- a/karbon/karbon_part.cc
+++ b/karbon/karbon_part.cc
@@ -18,10 +18,10 @@
*/
-#include <qdom.h>
-#include <qfileinfo.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqdom.h>
+#include <tqfileinfo.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -57,9 +57,9 @@
// Make sure an appropriate DTD is available in www/koffice/DTD if changing this value
// static const char * CURRENT_DTD_VERSION = "1.2";
-KarbonPart::KarbonPart( QWidget* parentWidget, const char* widgetName,
- QObject* parent, const char* name, bool singleViewMode )
- : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
+KarbonPart::KarbonPart( TQWidget* tqparentWidget, const char* widgetName,
+ TQObject* tqparent, const char* name, bool singleViewMode )
+ : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
{
setInstance( KarbonFactory::instance(), false );
setTemplateType( "karbon_template" );
@@ -67,8 +67,8 @@ KarbonPart::KarbonPart( QWidget* parentWidget, const char* widgetName,
dcop = 0L;
m_commandHistory = new VCommandHistory( this );
- connect( m_commandHistory, SIGNAL( documentRestored() ), this, SLOT( slotDocumentRestored() ) );
- connect( m_commandHistory, SIGNAL( commandExecuted( VCommand * ) ), this, SLOT( slotCommandExecuted( VCommand * ) ) );
+ connect( m_commandHistory, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( slotDocumentRestored() ) );
+ connect( m_commandHistory, TQT_SIGNAL( commandExecuted( VCommand * ) ), this, TQT_SLOT( slotCommandExecuted( VCommand * ) ) );
initConfig();
@@ -109,22 +109,22 @@ DCOPObject* KarbonPart::dcopObject()
}
void
-KarbonPart::setPageLayout( KoPageLayout& layout, KoUnit::Unit _unit )
+KarbonPart::setPageLayout( KoPageLayout& tqlayout, KoUnit::Unit _unit )
{
- m_pageLayout = layout;
+ m_pageLayout = tqlayout;
m_doc.setUnit( _unit );
m_doc.setWidth( m_pageLayout.ptWidth );
m_doc.setHeight( m_pageLayout.ptHeight );
}
bool
-KarbonPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
+KarbonPart::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
{
if (flags==KoDocument::InitDocEmpty)
{
return true;
}
- QString file;
+ TQString file;
KoTemplateChooseDia::ReturnType result;
KoTemplateChooseDia::DialogType dlgtype;
@@ -133,7 +133,7 @@ KarbonPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
else
dlgtype = KoTemplateChooseDia::OnlyTemplates;
- result = KoTemplateChooseDia::choose( KarbonFactory::instance(), file, dlgtype, "karbon_template", parentWidget );
+ result = KoTemplateChooseDia::choose( KarbonFactory::instance(), file, dlgtype, "karbon_template", tqparentWidget );
if( result == KoTemplateChooseDia::Template )
{
@@ -158,9 +158,9 @@ KarbonPart::initDoc(InitDocFlags flags, QWidget* parentWidget)
}
KoView*
-KarbonPart::createViewInstance( QWidget* parent, const char* name )
+KarbonPart::createViewInstance( TQWidget* tqparent, const char* name )
{
- KarbonView *result = new KarbonView( this, parent, name );
+ KarbonView *result = new KarbonView( this, tqparent, name );
return result;
}
@@ -171,30 +171,30 @@ KarbonPart::removeView( KoView *view )
KoDocument::removeView( view );
}
-double getAttribute(QDomElement &element, const char *attributeName, double defaultValue)
+double getAttribute(TQDomElement &element, const char *attributeName, double defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toDouble();
else
return defaultValue;
}
-int getAttribute(QDomElement &element, const char *attributeName, int defaultValue)
+int getAttribute(TQDomElement &element, const char *attributeName, int defaultValue)
{
- QString value;
- if ( ( value = element.attribute( attributeName ) ) != QString::null )
+ TQString value;
+ if ( ( value = element.attribute( attributeName ) ) != TQString() )
return value.toInt();
else
return defaultValue;
}
bool
-KarbonPart::loadXML( QIODevice*, const QDomDocument& document )
+KarbonPart::loadXML( TQIODevice*, const TQDomDocument& document )
{
bool success = false;
- QDomElement doc = document.documentElement();
+ TQDomElement doc = document.documentElement();
if( m_merge )
{
@@ -207,7 +207,7 @@ KarbonPart::loadXML( QIODevice*, const QDomDocument& document )
//m_pageLayout = KoPageLayout::standardLayout();
// <PAPER>
- QDomElement paper = doc.namedItem( "PAPER" ).toElement();
+ TQDomElement paper = doc.namedItem( "PAPER" ).toElement();
if ( !paper.isNull() )
{
m_pageLayout.format = static_cast<KoFormat>( getAttribute( paper, "format", 0 ) );
@@ -232,7 +232,7 @@ KarbonPart::loadXML( QIODevice*, const QDomDocument& document )
kdDebug() << " ptWidth=" << m_pageLayout.ptWidth << endl;
kdDebug() << " ptHeight=" << m_pageLayout.ptHeight << endl;
- QDomElement borders = paper.namedItem( "PAPERBORDERS" ).toElement();
+ TQDomElement borders = paper.namedItem( "PAPERBORDERS" ).toElement();
if( !borders.isNull() )
{
if( borders.hasAttribute( "ptLeft" ) )
@@ -250,12 +250,12 @@ KarbonPart::loadXML( QIODevice*, const QDomDocument& document )
return success;
}
-QDomDocument
+TQDomDocument
KarbonPart::saveXML()
{
- QDomDocument doc = m_doc.saveXML();
- QDomElement me = doc.documentElement();
- QDomElement paper = doc.createElement( "PAPER" );
+ TQDomDocument doc = m_doc.saveXML();
+ TQDomElement me = doc.documentElement();
+ TQDomElement paper = doc.createElement( "PAPER" );
me.appendChild( paper );
paper.setAttribute( "format", static_cast<int>( m_pageLayout.format ) );
paper.setAttribute( "pages", pageCount() );
@@ -263,7 +263,7 @@ KarbonPart::saveXML()
paper.setAttribute( "height", m_pageLayout.ptHeight );
paper.setAttribute( "orientation", static_cast<int>( m_pageLayout.orientation ) );
- QDomElement paperBorders = doc.createElement( "PAPERBORDERS" );
+ TQDomElement paperBorders = doc.createElement( "PAPERBORDERS" );
paperBorders.setAttribute( "ptLeft", m_pageLayout.ptLeft );
paperBorders.setAttribute( "ptTop", m_pageLayout.ptTop );
paperBorders.setAttribute( "ptRight", m_pageLayout.ptRight );
@@ -274,16 +274,16 @@ KarbonPart::saveXML()
}
bool
-KarbonPart::loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDomDocument &settings, KoStore *store )
+KarbonPart::loadOasis( const TQDomDocument &doc, KoOasisStyles &styles, const TQDomDocument &settings, KoStore *store )
{
kdDebug(38000) << "Start loading OASIS document..." << doc.toString() << endl;
- QDomElement contents = doc.documentElement();
+ TQDomElement contents = doc.documentElement();
kdDebug(38000) << "Start loading OASIS document..." << contents.text() << endl;
kdDebug(38000) << "Start loading OASIS contents..." << contents.lastChild().localName() << endl;
kdDebug(38000) << "Start loading OASIS contents..." << contents.lastChild().namespaceURI() << endl;
kdDebug(38000) << "Start loading OASIS contents..." << contents.lastChild().isElement() << endl;
- QDomElement body( KoDom::namedItemNS( contents, KoXmlNS::office, "body" ) );
+ TQDomElement body( KoDom::namedItemNS( contents, KoXmlNS::office, "body" ) );
kdDebug(38000) << "Start loading OASIS document..." << body.text() << endl;
if( body.isNull() )
{
@@ -300,7 +300,7 @@ KarbonPart::loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDo
return false;
}
- QDomElement page( KoDom::namedItemNS( body, KoXmlNS::draw, "page" ) );
+ TQDomElement page( KoDom::namedItemNS( body, KoXmlNS::draw, "page" ) );
if(page.isNull())
{
kdDebug(38000) << "No office:drawing found!" << endl;
@@ -308,18 +308,18 @@ KarbonPart::loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDo
return false;
}
- QString masterPageName = "Standard"; // use default layout as fallback
- QDomElement *master = styles.masterPages()[ masterPageName ];
+ TQString masterPageName = "Standard"; // use default tqlayout as fallback
+ TQDomElement *master = styles.masterPages()[ masterPageName ];
if ( !master ) //last test...
master = styles.masterPages()[ "Default" ];
// last resort, use the first found master page style
if ( ! master )
{
- QDictIterator<QDomElement> it( styles.masterPages() );
+ TQDictIterator<TQDomElement> it( styles.masterPages() );
master = it.current();
}
Q_ASSERT( master );
- const QDomElement *style = master ? styles.findStyle( master->attributeNS( KoXmlNS::style, "page-layout-name", QString::null ) ) : 0;
+ const TQDomElement *style = master ? styles.findStyle( master->attributeNS( KoXmlNS::style, "page-tqlayout-name", TQString() ) ) : 0;
if( style )
{
m_pageLayout.loadOasis( *style );
@@ -332,7 +332,7 @@ KarbonPart::loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDo
KoOasisLoadingContext context( this, styles, store );
m_doc.loadOasis( page, context );
// do y-mirroring here
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -m_doc.height() );
VTransformCmd trafo( 0L, mat );
@@ -344,7 +344,7 @@ KarbonPart::loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDo
}
void
-KarbonPart::loadOasisSettings( const QDomDocument&settingsDoc )
+KarbonPart::loadOasisSettings( const TQDomDocument&settingsDoc )
{
if ( settingsDoc.isNull() )
return ; // not an error if some file doesn't have settings.xml
@@ -369,15 +369,15 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
KoGenStyles mainStyles;
KoGenStyle pageLayout = m_pageLayout.saveOasis();
- QString layoutName = mainStyles.lookup( pageLayout, "PL" );
+ TQString tqlayoutName = mainStyles.lookup( pageLayout, "PL" );
KoGenStyle masterPage( KoGenStyle::STYLE_MASTER );
- masterPage.addAttribute( "style:page-layout-name", layoutName );
+ masterPage.addAttribute( "style:page-tqlayout-name", tqlayoutName );
mainStyles.lookup( masterPage, "Default", KoGenStyles::DontForceNumbering );
KTempFile contentTmpFile;
contentTmpFile.setAutoDelete( true );
- QFile* tmpFile = contentTmpFile.file();
- KoXmlWriter contentTmpWriter( tmpFile, 1 );
+ TQFile* tmpFile = contentTmpFile.file();
+ KoXmlWriter contentTmpWriter( TQT_TQIODEVICE(tmpFile), 1 );
contentTmpWriter.startElement( "office:body" );
contentTmpWriter.startElement( "office:drawing" );
@@ -389,8 +389,8 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
docWriter->startElement( "office:automatic-styles" );
- QValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( VDocument::STYLE_GRAPHICAUTO );
- QValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
+ TQValueList<KoGenStyles::NamedStyle> styles = mainStyles.styles( VDocument::STYLE_GRAPHICAUTO );
+ TQValueList<KoGenStyles::NamedStyle>::const_iterator it = styles.begin();
for( ; it != styles.end() ; ++it )
(*it).style->writeStyle( docWriter, mainStyles, "style:style", (*it).name , "style:graphic-properties" );
@@ -398,7 +398,7 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
// And now we can copy over the contents from the tempfile to the real one
tmpFile->close();
- docWriter->addCompleteElement( tmpFile );
+ docWriter->addCompleteElement( TQT_TQIODEVICE(tmpFile) );
contentTmpFile.close();
docWriter->endElement(); // Root element
@@ -431,11 +431,11 @@ KarbonPart::saveOasis( KoStore *store, KoXmlWriter *manifestWriter )
styleWriter->startElement( "office:automatic-styles" );
- QValueList<KoGenStyles::NamedStyle> styleList = mainStyles.styles( KoGenStyle::STYLE_PAGELAYOUT );
+ TQValueList<KoGenStyles::NamedStyle> styleList = mainStyles.styles( KoGenStyle::STYLE_PAGELAYOUT );
it = styleList.begin();
for( ; it != styleList.end(); ++it )
- (*it).style->writeStyle( styleWriter, mainStyles, "style:page-layout", (*it).name, "style:page-layout-properties" );
+ (*it).style->writeStyle( styleWriter, mainStyles, "style:page-tqlayout", (*it).name, "style:page-tqlayout-properties" );
styleWriter->endElement(); // office:automatic-styles
@@ -495,20 +495,20 @@ KarbonPart::saveOasisSettings( KoXmlWriter &/*settingsWriter*/ )
void
KarbonPart::insertObject( VObject* object )
{
- // don't repaint here explicitly. some commands might want to insert many
+ // don't tqrepaint here explicitly. some commands might want to insert many
// objects.
m_doc.append( object );
setModified( true );
}
void
-KarbonPart::addCommand( VCommand* cmd, bool repaint )
+KarbonPart::addCommand( VCommand* cmd, bool tqrepaint )
{
m_commandHistory->addCommand( cmd );
setModified( true );
- if( repaint )
- repaintAllViews();
+ if( tqrepaint )
+ tqrepaintAllViews();
}
void
@@ -530,56 +530,56 @@ KarbonPart::clearHistory()
}
void
-KarbonPart::repaintAllViews( bool repaint )
+KarbonPart::tqrepaintAllViews( bool tqrepaint )
{
- QPtrListIterator<KoView> itr( views() );
+ TQPtrListIterator<KoView> itr( views() );
for( ; itr.current() ; ++itr )
- static_cast<KarbonView*>( itr.current() )->canvasWidget()->repaintAll( repaint );
+ static_cast<KarbonView*>( itr.current() )->canvasWidget()->tqrepaintAll( tqrepaint );
}
void
-KarbonPart::repaintAllViews( const KoRect &rect )
+KarbonPart::tqrepaintAllViews( const KoRect &rect )
{
- QPtrListIterator<KoView> itr( views() );
+ TQPtrListIterator<KoView> itr( views() );
for( ; itr.current() ; ++itr )
- static_cast<KarbonView*>( itr.current() )->canvasWidget()->repaintAll( rect );
+ static_cast<KarbonView*>( itr.current() )->canvasWidget()->tqrepaintAll( rect );
}
void
-KarbonPart::paintContent( QPainter& painter, const QRect& rect,
+KarbonPart::paintContent( TQPainter& painter, const TQRect& rect,
bool /*transparent*/, double /*zoomX*/, double /*zoomY*/ )
{
kdDebug(38000) << "**** part->paintContent()" << endl;
- KoRect r = KoRect::fromQRect( rect );
+ KoRect r = KoRect::fromTQRect( rect );
double zoomFactorX = double( r.width() ) / double( document().width() );
double zoomFactorY = double( r.height() ) / double( document().height() );
double zoomFactor = kMin( zoomFactorX, zoomFactorY );
painter.eraseRect( rect );
VPainterFactory *painterFactory = new VPainterFactory;
- //QPaintDeviceMetrics metrics( painter.device() );
- painterFactory->setPainter( painter.device(), rect.width(), rect.height() );
+ //TQPaintDeviceMetrics metrics( painter.device() );
+ painterFactory->setPainter( painter.tqdevice(), rect.width(), rect.height() );
VPainter *p = painterFactory->painter();
//VPainter *p = new VKoPainter( painter.device() );
p->begin();
p->setZoomFactor( zoomFactor );
- kdDebug(38000) << "painter.worldMatrix().dx() : " << painter.worldMatrix().dx() << endl;
- kdDebug(38000) << "painter.worldMatrix().dy() : " << painter.worldMatrix().dy() << endl;
+ kdDebug(38000) << "painter.tqworldMatrix().dx() : " << painter.tqworldMatrix().dx() << endl;
+ kdDebug(38000) << "painter.tqworldMatrix().dy() : " << painter.tqworldMatrix().dy() << endl;
kdDebug(38000) << "rect.x() : "<< rect.x() << endl;
kdDebug(38000) << "rect.y() : "<< rect.y() << endl;
kdDebug(38000) << "rect.width() : "<< rect.width() << endl;
kdDebug(38000) << "rect.height() : "<< rect.height() << endl;
r = document().boundingBox();
- QWMatrix mat = painter.worldMatrix();
+ TQWMatrix mat = painter.tqworldMatrix();
mat.scale( 1, -1 );
mat.translate( 0, -r.height() * zoomFactor );
p->setWorldMatrix( mat );
m_doc.selection()->clear();
- QPtrListIterator<VLayer> itr( m_doc.layers() );
+ TQPtrListIterator<VLayer> itr( m_doc.layers() );
for( ; itr.current(); ++itr )
{
@@ -599,7 +599,7 @@ KarbonPart::setShowStatusBar( bool b )
void
KarbonPart::reorganizeGUI()
{
- QPtrListIterator<KoView> itr( views() );
+ TQPtrListIterator<KoView> itr( views() );
for( ; itr.current(); ++itr )
{
@@ -633,7 +633,7 @@ KarbonPart::initConfig()
{
config->setGroup( "Misc" );
undos = config->readNumEntry( "UndoRedo", -1 );
- QString defaultUnit = "cm";
+ TQString defaultUnit = "cm";
if( KGlobal::locale()->measureSystem() == KLocale::Imperial )
defaultUnit = "in";
@@ -646,7 +646,7 @@ KarbonPart::initConfig()
}
bool
-KarbonPart::mergeNativeFormat( const QString &file )
+KarbonPart::mergeNativeFormat( const TQString &file )
{
m_merge = true;
bool result = loadNativeFormat( file );
@@ -659,7 +659,7 @@ KarbonPart::mergeNativeFormat( const QString &file )
void
KarbonPart::addShell( KoMainWindow *shell )
{
- connect( shell, SIGNAL( documentSaved() ), m_commandHistory, SLOT( documentSaved() ) );
+ connect( shell, TQT_SIGNAL( documentSaved() ), m_commandHistory, TQT_SLOT( documentSaved() ) );
KoDocument::addShell( shell );
}
diff --git a/karbon/karbon_part.h b/karbon/karbon_part.h
index da94d5be..f83e09ac 100644
--- a/karbon/karbon_part.h
+++ b/karbon/karbon_part.h
@@ -21,7 +21,7 @@
#define __KARBON_PART_H__
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <KoDocument.h>
#include <KoUnit.h>
@@ -30,7 +30,7 @@
class DCOPObject;
class KoRect;
-class QRect;
+class TQRect;
class VCommand;
class VDocument;
class VCommandHistory;
@@ -45,23 +45,24 @@ class VCommandHistory;
class KARBONCOMMON_EXPORT KarbonPart : public KoDocument
{
Q_OBJECT
+ TQ_OBJECT
public:
- KarbonPart( QWidget* parentWidget = 0L, const char* widgetName = 0L,
- QObject* parent = 0L, const char* name = 0L, bool singleViewMode = false );
+ KarbonPart( TQWidget* tqparentWidget = 0L, const char* widgetName = 0L,
+ TQObject* tqparent = 0L, const char* name = 0L, bool singleViewMode = false );
virtual ~KarbonPart();
- virtual void paintContent( QPainter& painter, const QRect& rect,
+ virtual void paintContent( TQPainter& painter, const TQRect& rect,
bool transparent = false, double zoomX = 1.0, double zoomY = 1.0 );
/// standard koDocument inherited methods
- virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
+ virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0);
/// file-> open calls this method
- virtual bool loadXML( QIODevice*, const QDomDocument& document );
- virtual bool loadOasis( const QDomDocument &doc, KoOasisStyles &styles, const QDomDocument &settings, KoStore *store );
+ virtual bool loadXML( TQIODevice*, const TQDomDocument& document );
+ virtual bool loadOasis( const TQDomDocument &doc, KoOasisStyles &styles, const TQDomDocument &settings, KoStore *store );
/// file-> save and file-> save as call this method
- virtual QDomDocument saveXML();
+ virtual TQDomDocument saveXML();
virtual bool saveOasis( KoStore *store, KoXmlWriter *manifestWriter );
virtual void addShell( KoMainWindow *shell );
@@ -72,7 +73,7 @@ public:
void insertObject( VObject* object );
/// insert a command into the undo/redo-history:
- void addCommand( VCommand* cmd, bool repaint = false );
+ void addCommand( VCommand* cmd, bool tqrepaint = false );
// access static document:
VDocument& document() { return m_doc; }
@@ -101,23 +102,23 @@ public:
void initConfig();
unsigned int maxRecentFiles() const { return m_maxRecentFiles; }
- void setPageLayout( KoPageLayout& layout, KoUnit::Unit _unit );
+ void setPageLayout( KoPageLayout& tqlayout, KoUnit::Unit _unit );
- bool mergeNativeFormat( const QString & file );
+ bool mergeNativeFormat( const TQString & file );
public slots:
- /// repaint all views attached to this koDocument
- void repaintAllViews( bool repaint = true );
- void repaintAllViews( const KoRect& );
+ /// tqrepaint all views attached to this koDocument
+ void tqrepaintAllViews( bool tqrepaint = true );
+ void tqrepaintAllViews( const KoRect& );
void slotDocumentRestored();
void slotCommandExecuted( VCommand * );
void slotUnitChanged( KoUnit::Unit unit );
protected:
- virtual KoView* createViewInstance( QWidget* parent, const char* name );
+ virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
virtual void removeView( KoView *view );
void saveOasisSettings( KoXmlWriter &/*settingsWriter*/ );
- void loadOasisSettings( const QDomDocument&settingsDoc );
+ void loadOasisSettings( const TQDomDocument&settingsDoc );
private:
VDocument m_doc; /// store non-visual doc info
diff --git a/karbon/karbon_part_iface.cc b/karbon/karbon_part_iface.cc
index 7d187372..d90c506e 100644
--- a/karbon/karbon_part_iface.cc
+++ b/karbon/karbon_part_iface.cc
@@ -72,23 +72,23 @@ void KarbonPartIface::clearHistory()
}
-QString KarbonPartIface::unitName() const
+TQString KarbonPartIface::unitName() const
{
return m_part->unitName();
}
-QString
+TQString
KarbonPartIface::widthInUnits()
{
- QString val = KoUnit::toUserStringValue( m_part->document().width(), m_part->unit() );
- return QString( "%1%2" ).arg( val ).arg( m_part->unitName() );
+ TQString val = KoUnit::toUserStringValue( m_part->document().width(), m_part->unit() );
+ return TQString( "%1%2" ).tqarg( val ).tqarg( m_part->unitName() );
}
-QString
+TQString
KarbonPartIface::heightInUnits()
{
- QString val = KoUnit::toUserStringValue( m_part->document().height(), m_part->unit() );
- return QString( "%1%2" ).arg( val ).arg( m_part->unitName() );
+ TQString val = KoUnit::toUserStringValue( m_part->document().height(), m_part->unit() );
+ return TQString( "%1%2" ).tqarg( val ).tqarg( m_part->unitName() );
}
double
diff --git a/karbon/karbon_part_iface.h b/karbon/karbon_part_iface.h
index 8e6e2b20..d1c074f0 100644
--- a/karbon/karbon_part_iface.h
+++ b/karbon/karbon_part_iface.h
@@ -21,7 +21,7 @@
#define __KARBON_PART_IFACE_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <dcopref.h>
#include <KoDocumentIface.h>
@@ -46,9 +46,9 @@ k_dcop:
void setUndoRedoLimit( int undo );
void initConfig();
void clearHistory();
- QString unitName() const;
- QString widthInUnits();
- QString heightInUnits();
+ TQString unitName() const;
+ TQString widthInUnits();
+ TQString heightInUnits();
double width();
double height();
diff --git a/karbon/karbon_resourceserver.cc b/karbon/karbon_resourceserver.cc
index af0757a1..6348865c 100644
--- a/karbon/karbon_resourceserver.cc
+++ b/karbon/karbon_resourceserver.cc
@@ -17,11 +17,11 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
+#include <tqdir.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -59,25 +59,25 @@ KarbonResourceServer::KarbonResourceServer()
m_patterns.setAutoDelete( true );
// image formats
- QStringList formats;
+ TQStringList formats;
formats << "*.png" << "*.tif" << "*.xpm" << "*.bmp" << "*.jpg" << "*.gif";
// init vars
- QStringList lst;
- QString format, file;
+ TQStringList lst;
+ TQString format, file;
// find patterns
- for( QStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
{
format = *it;
- QStringList l = KarbonFactory::instance()->dirs()->findAllResources(
+ TQStringList l = KarbonFactory::instance()->dirs()->findAllResources(
"kis_pattern", format, false, true );
lst += l;
}
// load patterns
- for( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
file = *it;
kdDebug(38000) << " - " << file << endl;
@@ -88,7 +88,7 @@ KarbonResourceServer::KarbonResourceServer()
// GRADIENTS
kdDebug(38000) << "Loading gradients:" << endl;
- m_gradients = new QPtrList<VGradientListItem>();
+ m_gradients = new TQPtrList<VGradientListItem>();
m_gradients->setAutoDelete( true );
formats.clear();
@@ -97,16 +97,16 @@ KarbonResourceServer::KarbonResourceServer()
// find Gradients
- for( QStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
{
format = *it;
- QStringList l = KarbonFactory::instance()->dirs()->findAllResources(
+ TQStringList l = KarbonFactory::instance()->dirs()->findAllResources(
"karbon_gradient", format, false, true );
lst += l;
}
// load Gradients
- for( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
file = *it;
kdDebug(38000) << " - " << file << endl;
@@ -117,7 +117,7 @@ KarbonResourceServer::KarbonResourceServer()
// CLIPARTS
kdDebug(38000) << "Loading cliparts:" << endl;
- m_cliparts = new QPtrList<VClipartIconItem>();
+ m_cliparts = new TQPtrList<VClipartIconItem>();
m_cliparts->setAutoDelete( true );
formats.clear();
@@ -126,16 +126,16 @@ KarbonResourceServer::KarbonResourceServer()
// find cliparts
- for( QStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
+ for( TQStringList::Iterator it = formats.begin(); it != formats.end(); ++it )
{
format = *it;
- QStringList l = KarbonFactory::instance()->dirs()->findAllResources(
+ TQStringList l = KarbonFactory::instance()->dirs()->findAllResources(
"karbon_clipart", format, false, true );
lst += l;
}
// load cliparts
- for( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
+ for( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
{
file = *it;
kdDebug(38000) << " - " << file << endl;
@@ -157,7 +157,7 @@ KarbonResourceServer::~KarbonResourceServer()
} // KarbonResourceServer::~KarbonResourceServer
const VPattern*
-KarbonResourceServer::loadPattern( const QString& filename )
+KarbonResourceServer::loadPattern( const TQString& filename )
{
VPattern* pattern = new VPattern( filename );
@@ -173,20 +173,20 @@ KarbonResourceServer::loadPattern( const QString& filename )
}
VPattern*
-KarbonResourceServer::addPattern( const QString& tilename )
+KarbonResourceServer::addPattern( const TQString& tilename )
{
int i = 1;
- QFileInfo fi;
+ TQFileInfo fi;
fi.setFile( tilename );
if( fi.exists() == false )
return 0L;
- QString name = fi.baseName();
+ TQString name = fi.baseName();
- QString ext = '.' + fi.extension( false );
+ TQString ext = '.' + fi.extension( false );
- QString filename = KarbonFactory::instance()->dirs()->saveLocation(
+ TQString filename = KarbonFactory::instance()->dirs()->saveLocation(
"kis_pattern" ) + name + ext;
i = 1;
@@ -201,9 +201,9 @@ KarbonResourceServer::addPattern( const QString& tilename )
}
char buffer[ 1024 ];
- QFile in( tilename );
+ TQFile in( tilename );
in.open( IO_ReadOnly );
- QFile out( filename );
+ TQFile out( filename );
out.open( IO_WriteOnly );
while( !in.atEnd() )
@@ -226,7 +226,7 @@ KarbonResourceServer::addPattern( const QString& tilename )
void
KarbonResourceServer::removePattern( VPattern* pattern )
{
- QFile file( pattern->tilename() );
+ TQFile file( pattern->tilename() );
if( file.remove() )
{
@@ -240,7 +240,7 @@ KarbonResourceServer::addGradient( VGradient* gradient )
{
int i = 1;
char buffer[ 20 ];
- QFileInfo fi;
+ TQFileInfo fi;
sprintf( buffer, "%04d.kgr", i++ );
fi.setFile( KarbonFactory::instance()->dirs()->saveLocation( "karbon_gradient" ) + buffer );
@@ -252,7 +252,7 @@ KarbonResourceServer::addGradient( VGradient* gradient )
kdDebug(38000) << fi.fileName() << endl;
}
- QString filename = KarbonFactory::instance()->dirs()->saveLocation( "karbon_gradient" ) + buffer;
+ TQString filename = KarbonFactory::instance()->dirs()->saveLocation( "karbon_gradient" ) + buffer;
saveGradient( gradient, filename );
@@ -264,14 +264,14 @@ KarbonResourceServer::addGradient( VGradient* gradient )
void
KarbonResourceServer::removeGradient( VGradientListItem* gradient )
{
- QFile file( gradient->filename() );
+ TQFile file( gradient->filename() );
if( file.remove() )
m_gradients->remove( gradient );
} // KarbonResourceServer::removeGradient
void
-KarbonResourceServer::loadGradient( const QString& filename )
+KarbonResourceServer::loadGradient( const TQString& filename )
{
KoGradientManager gradLoader;
@@ -351,18 +351,18 @@ KarbonResourceServer::loadGradient( const QString& filename )
} // KarbonResourceServer::loadGradient
void
-KarbonResourceServer::saveGradient( VGradient* gradient, const QString& filename )
+KarbonResourceServer::saveGradient( VGradient* gradient, const TQString& filename )
{
- QFile file( filename );
- QDomDocument doc;
- QDomElement me = doc.createElement( "PREDEFGRADIENT" );
+ TQFile file( filename );
+ TQDomDocument doc;
+ TQDomElement me = doc.createElement( "PREDEFGRADIENT" );
doc.appendChild( me );
gradient->save( me );
if( !( file.open( IO_WriteOnly ) ) )
return ;
- QTextStream ts( &file );
+ TQTextStream ts( &file );
doc.save( ts, 2 );
@@ -381,7 +381,7 @@ KarbonResourceServer::addClipart( VObject* clipart, double width, double height
while( KStandardDirs::exists( KarbonFactory::instance()->dirs()->saveLocation( "karbon_clipart" ) + buffer ) )
sprintf( buffer, "%04d.kclp", i++ );
- QString filename = KarbonFactory::instance()->dirs()->saveLocation( "karbon_clipart" ) + buffer;
+ TQString filename = KarbonFactory::instance()->dirs()->saveLocation( "karbon_clipart" ) + buffer;
saveClipart( clipart, width, height, filename );
@@ -393,7 +393,7 @@ KarbonResourceServer::addClipart( VObject* clipart, double width, double height
void
KarbonResourceServer::removeClipart( VClipartIconItem* clipart )
{
- QFile file( clipart->filename() );
+ TQFile file( clipart->filename() );
if( file.remove() )
m_cliparts->remove
@@ -401,19 +401,19 @@ KarbonResourceServer::removeClipart( VClipartIconItem* clipart )
}
void
-KarbonResourceServer::loadClipart( const QString& filename )
+KarbonResourceServer::loadClipart( const TQString& filename )
{
- QFile f( filename );
+ TQFile f( filename );
if( f.open( IO_ReadOnly ) )
{
- QDomDocument doc;
+ TQDomDocument doc;
if( !( doc.setContent( &f ) ) )
f.close();
else
{
- QDomElement de = doc.documentElement();
+ TQDomElement de = doc.documentElement();
if( !de.isNull() && de.tagName() == "PREDEFCLIPART" )
{
@@ -421,11 +421,11 @@ KarbonResourceServer::loadClipart( const QString& filename )
double width = de.attribute( "width", "100.0" ).toFloat();
double height = de.attribute( "height", "100.0" ).toFloat();
- QDomNode n = de.firstChild();
+ TQDomNode n = de.firstChild();
if( !n.isNull() )
{
- QDomElement e;
+ TQDomElement e;
e = n.toElement();
if( !e.isNull() )
@@ -469,11 +469,11 @@ KarbonResourceServer::loadClipart( const QString& filename )
}
void
-KarbonResourceServer::saveClipart( VObject* clipart, double width, double height, const QString& filename )
+KarbonResourceServer::saveClipart( VObject* clipart, double width, double height, const TQString& filename )
{
- QFile file( filename );
- QDomDocument doc;
- QDomElement me = doc.createElement( "PREDEFCLIPART" );
+ TQFile file( filename );
+ TQDomDocument doc;
+ TQDomElement me = doc.createElement( "PREDEFCLIPART" );
doc.appendChild( me );
me.setAttribute( "width", width );
me.setAttribute( "height", height );
@@ -482,7 +482,7 @@ KarbonResourceServer::saveClipart( VObject* clipart, double width, double height
if( !( file.open( IO_WriteOnly ) ) )
return ;
- QTextStream ts( &file );
+ TQTextStream ts( &file );
doc.save( ts, 2 );
@@ -491,27 +491,27 @@ KarbonResourceServer::saveClipart( VObject* clipart, double width, double height
file.close();
}
-QPixmap *
-KarbonResourceServer::cachePixmap( const QString &key, int group_or_size )
+TQPixmap *
+KarbonResourceServer::cachePixmap( const TQString &key, int group_or_size )
{
- QPixmap *result = 0L;
+ TQPixmap *result = 0L;
if( !( result = m_pixmaps[ key ] ) )
{
- result = new QPixmap( KGlobal::iconLoader()->iconPath( key, group_or_size ) );
+ result = new TQPixmap( KGlobal::iconLoader()->iconPath( key, group_or_size ) );
m_pixmaps.insert( key, result );
}
return result;
}
-VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double height, QString filename )
+VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double height, TQString filename )
: m_filename( filename ), m_width( width ), m_height( height )
{
m_clipart = clipart->clone();
m_clipart->setState( VObject::normal );
m_pixmap.resize( 64, 64 );
- VKoPainter p( &m_pixmap, 64, 64 );
- QWMatrix mat( 64., 0, 0, 64., 0, 0 );
+ VKoPainter p( TQT_TQPAINTDEVICE(&m_pixmap), 64, 64 );
+ TQWMatrix mat( 64., 0, 0, 64., 0, 0 );
VTransformCmd trafo( 0L, mat );
trafo.visit( *m_clipart );
@@ -524,7 +524,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
p.end();
m_thumbPixmap.resize( 32, 32 );
- VKoPainter p2( &m_thumbPixmap, 32, 32 );
+ VKoPainter p2( TQT_TQPAINTDEVICE(&m_thumbPixmap), 32, 32 );
mat.setMatrix( 32., 0, 0, 32., 0, 0 );
trafo.setMatrix( mat );
@@ -540,7 +540,7 @@ VClipartIconItem::VClipartIconItem( const VObject* clipart, double width, double
validPixmap = true;
validThumb = true;
- m_delete = QFileInfo( filename ).isWritable();
+ m_delete = TQFileInfo( filename ).isWritable();
}
diff --git a/karbon/karbon_resourceserver.h b/karbon/karbon_resourceserver.h
index 8dbdc35f..cf1aae55 100644
--- a/karbon/karbon_resourceserver.h
+++ b/karbon/karbon_resourceserver.h
@@ -26,9 +26,9 @@
#define __KARBONRESOURCESERVER_H__
-#include <qptrlist.h>
-#include <qdict.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
+#include <tqstring.h>
//#include "vgradient.h"
#include "vpattern.h"
@@ -40,9 +40,10 @@ class VClipartIconItem;
class VObject;
-class KARBONCOMMON_EXPORT KarbonResourceServer : public QObject
+class KARBONCOMMON_EXPORT KarbonResourceServer : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
KarbonResourceServer();
@@ -53,12 +54,12 @@ public:
return m_patterns.count();
}
- QPtrList<KoIconItem> patterns()
+ TQPtrList<KoIconItem> patterns()
{
return m_patterns;
}
- VPattern* addPattern( const QString& tilename );
+ VPattern* addPattern( const TQString& tilename );
void removePattern( VPattern* pattern );
int gradientCount()
@@ -66,7 +67,7 @@ public:
return m_gradients->count();
}
- QPtrList<VGradientListItem>* gradients()
+ TQPtrList<VGradientListItem>* gradients()
{
return m_gradients;
}
@@ -79,7 +80,7 @@ public:
return m_cliparts->count();
}
- QPtrList<VClipartIconItem>* cliparts()
+ TQPtrList<VClipartIconItem>* cliparts()
{
return m_cliparts;
}
@@ -87,43 +88,43 @@ public:
VClipartIconItem* addClipart( VObject* clipart, double width, double height );
void removeClipart( VClipartIconItem* clipartIcon );
- QPixmap *cachePixmap( const QString &key, int group_or_size );
+ TQPixmap *cachePixmap( const TQString &key, int group_or_size );
signals:
void patternAdded( KoIconItem *pattern );
void patternRemoved( KoIconItem *pattern );
protected:
- const VPattern* loadPattern( const QString& filename );
+ const VPattern* loadPattern( const TQString& filename );
- void loadGradient( const QString& filename );
- void saveGradient( VGradient* gradient, const QString& filename );
+ void loadGradient( const TQString& filename );
+ void saveGradient( VGradient* gradient, const TQString& filename );
- void loadClipart( const QString& filename );
- void saveClipart( VObject* object, double width, double height, const QString& filename );
+ void loadClipart( const TQString& filename );
+ void saveClipart( VObject* object, double width, double height, const TQString& filename );
private:
- QPtrList<KoIconItem> m_patterns;
- QPtrList<VGradientListItem>* m_gradients;
- QPtrList<VClipartIconItem>* m_cliparts;
- QDict<QPixmap> m_pixmaps;
+ TQPtrList<KoIconItem> m_patterns;
+ TQPtrList<VGradientListItem>* m_gradients;
+ TQPtrList<VClipartIconItem>* m_cliparts;
+ TQDict<TQPixmap> m_pixmaps;
};
class VClipartIconItem : public KoIconItem
{
public:
- VClipartIconItem( const VObject* clipart, double width, double height, QString filename );
+ VClipartIconItem( const VObject* clipart, double width, double height, TQString filename );
VClipartIconItem( const VClipartIconItem& item );
~VClipartIconItem();
- virtual QPixmap& thumbPixmap() const
+ virtual TQPixmap& thumbPixmap() const
{
- return ( QPixmap& ) m_thumbPixmap;
+ return ( TQPixmap& ) m_thumbPixmap;
}
- virtual QPixmap& pixmap() const
+ virtual TQPixmap& pixmap() const
{
- return ( QPixmap& ) m_pixmap;
+ return ( TQPixmap& ) m_pixmap;
}
const VObject* clipart() const
@@ -131,7 +132,7 @@ public:
return m_clipart;
}
- QString filename() const
+ TQString filename() const
{
return m_filename;
}
@@ -154,10 +155,10 @@ public:
VClipartIconItem* clone();
private:
- QPixmap m_pixmap;
- QPixmap m_thumbPixmap;
+ TQPixmap m_pixmap;
+ TQPixmap m_thumbPixmap;
VObject* m_clipart;
- QString m_filename;
+ TQString m_filename;
bool m_delete;
double m_width;
double m_height;
diff --git a/karbon/karbon_tool_registry.cc b/karbon/karbon_tool_registry.cc
index c643435b..5787dd77 100644
--- a/karbon/karbon_tool_registry.cc
+++ b/karbon/karbon_tool_registry.cc
@@ -51,7 +51,7 @@ void KarbonToolRegistry::createTools(KActionCollection * ac, KarbonView* view)
{
Q_ASSERT(view);
- QValueVector<KarbonAbstractToolFactory*>::iterator it;
+ TQValueVector<KarbonAbstractToolFactory*>::iterator it;
for ( it = begin(); it != end(); ++it )
(*it) -> createTool(ac, view);
}
diff --git a/karbon/karbon_tool_registry.h b/karbon/karbon_tool_registry.h
index 7aaa6107..dee24d66 100644
--- a/karbon/karbon_tool_registry.h
+++ b/karbon/karbon_tool_registry.h
@@ -21,7 +21,7 @@
#ifndef KARBON_TOOL_REGISTRY_H_
#define KARBON_TOOL_REGISTRY_H_
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
#include <koffice_export.h>
class KActionCollection;
class VTool;
@@ -31,7 +31,7 @@ class KarbonAbstractToolFactory;
/**
* A registry where new tool plugins can register themselves.
*/
-class KARBONBASE_EXPORT KarbonToolRegistry : private QValueVector<KarbonAbstractToolFactory*>
+class KARBONBASE_EXPORT KarbonToolRegistry : private TQValueVector<KarbonAbstractToolFactory*>
{
public:
virtual ~KarbonToolRegistry();
diff --git a/karbon/karbon_view.cc b/karbon/karbon_view.cc
index 3eb1c19c..db540aa0 100644
--- a/karbon/karbon_view.cc
+++ b/karbon/karbon_view.cc
@@ -19,13 +19,13 @@
#include "karbon_view.h"
-#include <qdragobject.h>
-#include <qiconset.h>
-#include <qapplication.h>
-#include <qclipboard.h>
-#include <qpopupmenu.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqdragobject.h>
+#include <tqiconset.h>
+#include <tqapplication.h>
+#include <tqclipboard.h>
+#include <tqpopupmenu.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kaction.h>
#include <kcolordrag.h>
@@ -107,8 +107,8 @@
const int rulerWidth = 20; // vertical ruler width
const int rulerHeight = 20; // horizontal ruler height
-KarbonView::KarbonView( KarbonPart* p, QWidget* parent, const char* name )
- : KoView( p, parent, name ), KXMLGUIBuilder( shell() ), m_part( p )
+KarbonView::KarbonView( KarbonPart* p, TQWidget* tqparent, const char* name )
+ : KoView( p, tqparent, name ), KXMLGUIBuilder( shell() ), m_part( p )
{
m_toolbox = 0L;
m_toolController = new VToolController( this );
@@ -119,20 +119,20 @@ KarbonView::KarbonView( KarbonPart* p, QWidget* parent, const char* name )
setClientBuilder( this );
if( !p->isReadWrite() )
- setXMLFile( QString::fromLatin1( "karbon_readonly.rc" ) );
+ setXMLFile( TQString::tqfromLatin1( "karbon_readonly.rc" ) );
else
- setXMLFile( QString::fromLatin1( "karbon.rc" ) );
+ setXMLFile( TQString::tqfromLatin1( "karbon.rc" ) );
m_dcop = 0L;
dcopObject(); // build it
// set up status bar message
- m_status = new KStatusBarLabel( QString::null, 0, statusBar() );
- m_status->setAlignment( AlignLeft | AlignVCenter );
+ m_status = new KStatusBarLabel( TQString(), 0, statusBar() );
+ m_status->tqsetAlignment( AlignLeft | AlignVCenter );
m_status->setMinimumWidth( 300 );
addStatusBarItem( m_status, 1 );
- m_cursorCoords = new KStatusBarLabel( QString::null, 0, statusBar() );
- m_cursorCoords->setAlignment( AlignLeft | AlignVCenter );
+ m_cursorCoords = new KStatusBarLabel( TQString(), 0, statusBar() );
+ m_cursorCoords->tqsetAlignment( AlignLeft | AlignVCenter );
m_cursorCoords->setMinimumWidth( 50 );
addStatusBarItem( m_cursorCoords, 0 );
m_smallPreview = new VSmallPreview( this, name );
@@ -159,26 +159,26 @@ KarbonView::KarbonView( KarbonPart* p, QWidget* parent, const char* name )
reorganizeGUI();
- connect( p, SIGNAL( unitChanged( KoUnit::Unit ) ), this, SLOT( setUnit( KoUnit::Unit ) ) );
+ connect( p, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), TQT_TQOBJECT(this), TQT_SLOT( setUnit( KoUnit::Unit ) ) );
// widgets:
m_horizRuler = new VRuler( Qt::Horizontal, this );
m_horizRuler->setUnit(p->unit());
- connect( p, SIGNAL( unitChanged( KoUnit::Unit ) ), m_horizRuler, SLOT( setUnit( KoUnit::Unit ) ) );
+ connect( p, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), m_horizRuler, TQT_SLOT( setUnit( KoUnit::Unit ) ) );
m_vertRuler = new VRuler( Qt::Vertical, this );
m_vertRuler->setUnit(p->unit());
- connect( p, SIGNAL( unitChanged( KoUnit::Unit ) ), m_vertRuler, SLOT( setUnit( KoUnit::Unit ) ) );
+ connect( p, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), m_vertRuler, TQT_SLOT( setUnit( KoUnit::Unit ) ) );
m_canvas = new VCanvas( this, this, p );
- connect( m_canvas, SIGNAL( contentsMoving( int, int ) ), this, SLOT( canvasContentsMoving( int, int ) ) );
+ connect( m_canvas, TQT_SIGNAL( contentsMoving( int, int ) ), TQT_TQOBJECT(this), TQT_SLOT( canvasContentsMoving( int, int ) ) );
m_canvas->show();
// set up factory
m_painterFactory = new VPainterFactory;
- m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
- m_painterFactory->setEditPainter( canvasWidget()->viewport(), width(), height() );
+ m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
+ m_painterFactory->setEditPainter( TQT_TQPAINTDEVICE(canvasWidget()->viewport()), width(), height() );
if( shell() )
{
@@ -227,29 +227,29 @@ KarbonView::~KarbonView()
delete m_toolController;
}
-static Qt::Dock stringToDock( const QString& attrPosition )
+static TQt::Dock stringToDock( const TQString& attrPosition )
{
KToolBar::Dock dock = KToolBar::DockTop;
if ( !attrPosition.isEmpty() ) {
if ( attrPosition == "top" )
- dock = Qt::DockTop;
+ dock = TQt::DockTop;
else if ( attrPosition == "left" )
- dock = Qt::DockLeft;
+ dock = TQt::DockLeft;
else if ( attrPosition == "right" )
- dock = Qt::DockRight;
+ dock = TQt::DockRight;
else if ( attrPosition == "bottom" )
- dock = Qt::DockBottom;
+ dock = TQt::DockBottom;
else if ( attrPosition == "floating" )
- dock = Qt::DockTornOff;
+ dock = TQt::DockTornOff;
else if ( attrPosition == "flat" )
- dock = Qt::DockMinimized;
+ dock = TQt::DockMinimized;
}
return dock;
}
-QWidget *
-KarbonView::createContainer( QWidget *parent, int index, const QDomElement &element, int &id )
+TQWidget *
+KarbonView::createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id )
{
if( element.attribute( "name" ) == "Tools" )
{
@@ -262,27 +262,27 @@ KarbonView::createContainer( QWidget *parent, int index, const QDomElement &elem
mainWindow()->addDockWindow( m_toolbox, dock, false);
mainWindow()->moveDockWindow( m_toolbox, dock, false, 0, 0 );
- //connect( m_toolbox, SIGNAL( activeToolChanged( VTool * ) ), this, SLOT( slotActiveToolChanged( VTool * ) ) );
+ //connect( m_toolbox, TQT_SIGNAL( activeToolChanged( VTool * ) ), TQT_TQOBJECT(this), TQT_SLOT( slotActiveToolChanged( VTool * ) ) );
if( shell() )
{
m_strokeFillPreview = new VStrokeFillPreview( part(), m_toolbox );
m_typeButtonBox = new VTypeButtonBox( part(), m_toolbox );
- connect( m_strokeFillPreview, SIGNAL( fillSelected() ), m_typeButtonBox, SLOT( setFill() ) );
- connect( m_strokeFillPreview, SIGNAL( strokeSelected() ), m_typeButtonBox, SLOT( setStroke() ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( fillSelected() ), m_typeButtonBox, TQT_SLOT( setFill() ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( strokeSelected() ), m_typeButtonBox, TQT_SLOT( setStroke() ) );
- connect( m_strokeFillPreview, SIGNAL( strokeChanged( const VStroke & ) ), this, SLOT( slotStrokeChanged( const VStroke & ) ) );
- connect( m_strokeFillPreview, SIGNAL( fillChanged( const VFill & ) ), this, SLOT( slotFillChanged( const VFill & ) ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( strokeChanged( const VStroke & ) ), TQT_TQOBJECT(this), TQT_SLOT( slotStrokeChanged( const VStroke & ) ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( fillChanged( const VFill & ) ), TQT_TQOBJECT(this), TQT_SLOT( slotFillChanged( const VFill & ) ) );
- connect( m_strokeFillPreview, SIGNAL( strokeSelected() ), m_ColorManager, SLOT( setStrokeDocker() ) );
- connect( m_strokeFillPreview, SIGNAL( fillSelected( ) ), m_ColorManager, SLOT( setFillDocker() ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( strokeSelected() ), m_ColorManager, TQT_SLOT( setStrokeDocker() ) );
+ connect( m_strokeFillPreview, TQT_SIGNAL( fillSelected( ) ), m_ColorManager, TQT_SLOT( setFillDocker() ) );
- connect( m_part->commandHistory(), SIGNAL( commandExecuted( VCommand* ) ), this, SLOT( commandExecuted( VCommand* ) ) );
+ connect( m_part->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand* ) ), TQT_TQOBJECT(this), TQT_SLOT( commandExecuted( VCommand* ) ) );
- connect( m_ColorManager, SIGNAL(modeChanged( KDualColorButton::DualColor)), this, SLOT( strokeFillSelectionChanged(KDualColorButton::DualColor) ) );
- connect( m_ColorManager, SIGNAL(bgColorChanged( const QColor & )), this, SLOT(colorChanged( const QColor & )) );
- connect( m_ColorManager, SIGNAL(fgColorChanged( const QColor & )), this, SLOT(colorChanged( const QColor & )) );
+ connect( m_ColorManager, TQT_SIGNAL(modeChanged( KDualColorButton::DualColor)), TQT_TQOBJECT(this), TQT_SLOT( strokeFillSelectionChanged(KDualColorButton::DualColor) ) );
+ connect( m_ColorManager, TQT_SIGNAL(bgColorChanged( const TQColor & )), TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) );
+ connect( m_ColorManager, TQT_SIGNAL(fgColorChanged( const TQColor & )), TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) );
selectionChanged();
//create toolbars
@@ -291,22 +291,22 @@ KarbonView::createContainer( QWidget *parent, int index, const QDomElement &elem
}
}
- return KXMLGUIBuilder::createContainer( parent, index, element, id );
+ return KXMLGUIBuilder::createContainer( tqparent, index, element, id );
}
void
-KarbonView::removeContainer( QWidget *container, QWidget *parent,
- QDomElement &element, int id )
+KarbonView::removeContainer( TQWidget *container, TQWidget *tqparent,
+ TQDomElement &element, int id )
{
if( container )
kdDebug(38000) << container << endl;
if( shell() && container == m_toolbox )
{
- disconnect( m_part->commandHistory(), SIGNAL( commandExecuted( VCommand* ) ), this, SLOT( commandExecuted( VCommand* ) ) );
- disconnect( m_ColorManager, SIGNAL(modeChanged( KDualColorButton::DualColor)), this, SLOT( strokeFillSelectionChanged(KDualColorButton::DualColor) ) );
- disconnect( m_ColorManager, SIGNAL(bgColorChanged( const QColor & )), this, SLOT(colorChanged( const QColor & )) );
- disconnect( m_ColorManager, SIGNAL(fgColorChanged( const QColor & )), this, SLOT(colorChanged( const QColor & )) );
+ disconnect( m_part->commandHistory(), TQT_SIGNAL( commandExecuted( VCommand* ) ), TQT_TQOBJECT(this), TQT_SLOT( commandExecuted( VCommand* ) ) );
+ disconnect( m_ColorManager, TQT_SIGNAL(modeChanged( KDualColorButton::DualColor)), TQT_TQOBJECT(this), TQT_SLOT( strokeFillSelectionChanged(KDualColorButton::DualColor) ) );
+ disconnect( m_ColorManager, TQT_SIGNAL(bgColorChanged( const TQColor & )), TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) );
+ disconnect( m_ColorManager, TQT_SIGNAL(fgColorChanged( const TQColor & )), TQT_TQOBJECT(this), TQT_SLOT(colorChanged( const TQColor & )) );
delete m_toolbox;
m_toolbox = 0L;
m_toolController->youAintGotNoToolBox();
@@ -318,7 +318,7 @@ KarbonView::removeContainer( QWidget *container, QWidget *parent,
// m_selectToolBar = 0L;
}
else
- KXMLGUIBuilder::removeContainer( container, parent, element, id );
+ KXMLGUIBuilder::removeContainer( container, tqparent, element, id );
}
@@ -331,14 +331,14 @@ KarbonView::dcopObject()
return m_dcop;
}
-QWidget*
+TQWidget*
KarbonView::canvas() const
{
return m_canvas;
}
void
-KarbonView::resizeEvent( QResizeEvent* /*event*/ )
+KarbonView::resizeEvent( TQResizeEvent* /*event*/ )
{
if( shell() && m_showRulerAction->isChecked())
{
@@ -357,10 +357,10 @@ KarbonView::resizeEvent( QResizeEvent* /*event*/ )
}
void
-KarbonView::dropEvent( QDropEvent *e )
+KarbonView::dropEvent( TQDropEvent *e )
{
- //Accepts QColor - from Color Manager's KColorPatch
- QColor color;
+ //Accepts TQColor - from Color Manager's KColorPatch
+ TQColor color;
VColor realcolor;
VObjectList selection;
@@ -383,7 +383,7 @@ KarbonView::dropEvent( QDropEvent *e )
VObject *clipart = selection.first();
KoPoint p( e->pos() );
p = m_canvas->toContents( p );
- QWMatrix mat( 1, 0, 0, 1, p.x(), p.y() );
+ TQWMatrix mat( 1, 0, 0, 1, p.x(), p.y() );
VTransformCmd trafo( 0L, mat );
trafo.visit( *clipart );
@@ -396,10 +396,10 @@ KarbonView::dropEvent( QDropEvent *e )
void
KarbonView::print( KPrinter &printer )
{
- // TODO : ultimately use plain QPainter here as that is better suited to print system
+ // TODO : ultimately use plain TQPainter here as that is better suited to print system
kdDebug(38000) << "KarbonView::print" << endl;
- QPaintDeviceMetrics metrics( ( QPaintDevice * ) & printer );
+ TQPaintDeviceMetrics metrics( ( TQPaintDevice * ) & printer );
printer.setFullPage( true );
KoPageLayout pageLayout = part()->pageLayout();
@@ -409,7 +409,7 @@ KarbonView::print( KPrinter &printer )
// we are using 72 dpi internally
double zoom = metrics.logicalDpiX() / 72.0;
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( 0, -part()->document().height()*zoom );
@@ -418,10 +418,10 @@ KarbonView::print( KPrinter &printer )
KoRect rect( 0, 0, w, h );
- QPixmap img( static_cast<int>( w ), static_cast<int>( h ) );
+ TQPixmap img( static_cast<int>( w ), static_cast<int>( h ) );
// first use the libarts painter to draw into the pixmap
- VKoPainter kop( ( QPaintDevice * )&img, static_cast<int>( w ), static_cast<int>( h ) );
+ VKoPainter kop( ( TQPaintDevice * )&img, static_cast<int>( w ), static_cast<int>( h ) );
kop.setZoomFactor( zoom );
kop.setWorldMatrix( mat );
@@ -432,7 +432,7 @@ KarbonView::print( KPrinter &printer )
kop.end();
- QPainter p;
+ TQPainter p;
// us kopainter to draw the pixmap
// note that it is looking unsmooth when previewing,
@@ -445,15 +445,15 @@ KarbonView::print( KPrinter &printer )
void
KarbonView::fileImportGraphic()
{
- QStringList filter;
+ TQStringList filter;
filter << "application/x-karbon" << "image/svg+xml" << "image/x-wmf" << "image/x-eps" << "application/postscript";
- KFileDialog *dialog = new KFileDialog( "foo", QString::null, 0L, "Choose Graphic to Add", true);
+ KFileDialog *dialog = new KFileDialog( "foo", TQString(), 0L, "Choose Graphic to Add", true);
dialog->setMimeFilter( filter, "application/x-karbon" );
- if(dialog->exec()!=QDialog::Accepted) {
+ if(dialog->exec()!=TQDialog::Accepted) {
delete dialog;
return;
}
- QString fname = dialog->selectedFile();
+ TQString fname = dialog->selectedFile();
//kdDebug(38000) << "in : " << fname.latin1() << endl;
//kdDebug(38000) << "part()->document()->nativeFormatMimeType().latin1() : " << part()->nativeFormatMimeType() << endl;
//kdDebug(38000) << "dialog->currentMimeFilter().latin1() : " << dialog->currentMimeFilter().latin1() << endl;
@@ -462,14 +462,14 @@ KarbonView::fileImportGraphic()
else
{
KoFilterManager man( part() );
- KoFilter::ConversionStatus status;
- QString importedFile = man.import( fname, status );
+ KoFilter::ConversiontqStatus status;
+ TQString importedFile = man.import( fname, status );
part()->mergeNativeFormat( importedFile );
if( !importedFile.isEmpty() )
- unlink( QFile::encodeName( importedFile ) );
+ unlink( TQFile::encodeName( importedFile ) );
}
delete dialog;
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
}
void
@@ -494,7 +494,7 @@ KarbonView::addSelectionToClipboard() const
KarbonDrag* kd = new KarbonDrag();
kd->setObjectList( part()->document().selection()->objects() );
- QApplication::clipboard()->setData( kd );
+ TQApplication::tqclipboard()->setData( kd );
}
void
@@ -503,7 +503,7 @@ KarbonView::editPaste()
KarbonDrag kd;
VObjectList objects;
- if( !kd.decode( QApplication::clipboard()->data(), objects, part()->document() ) )
+ if( !kd.decode( TQApplication::tqclipboard()->data(), objects, part()->document() ) )
return;
// Paste with a small offset.
@@ -515,7 +515,7 @@ KarbonView::editPaste()
&objects, copyOffset ),
true );
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
selectionChanged();
}
@@ -525,7 +525,7 @@ KarbonView::editSelectAll()
part()->document().selection()->append();
if( part()->document().selection()->objects().count() > 0 )
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
selectionChanged();
}
@@ -536,7 +536,7 @@ KarbonView::editDeselectAll()
if( part()->document().selection()->objects().count() > 0 )
{
part()->document().selection()->clear();
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
}
selectionChanged();
@@ -695,7 +695,7 @@ KarbonView::selectionDuplicate()
&objects, copyOffset ),
true );
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
selectionChanged();
}
@@ -750,7 +750,7 @@ KarbonView::slotActiveToolChanged( VTool *tool )
{
toolController()->setCurrentTool( tool );
- m_canvas->repaintAll();
+ m_canvas->tqrepaintAll();
}
void
@@ -759,18 +759,18 @@ KarbonView::viewModeChanged()
canvasWidget()->pixmap()->fill();
if( m_viewAction->currentItem() == 1 )
- m_painterFactory->setWireframePainter( canvasWidget()->pixmap(), width(), height() );
+ m_painterFactory->setWireframePainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
else
- m_painterFactory->setPainter( canvasWidget()->pixmap(), width(), height() );
+ m_painterFactory->setPainter( TQT_TQPAINTDEVICE(canvasWidget()->pixmap()), width(), height() );
- m_canvas->repaintAll();
+ m_canvas->tqrepaintAll();
}
void
KarbonView::setZoomAt( double zoom, const KoPoint &p )
{
- QString zoomText = QString( "%1%" ).arg( zoom * 100.0, 0, 'f', 2 );
- QStringList stl = m_zoomAction->items();
+ TQString zoomText = TQString( "%1%" ).tqarg( zoom * 100.0, 0, 'f', 2 );
+ TQStringList stl = m_zoomAction->items();
if( stl.first() == "25%" )
{
stl.prepend( zoomText.latin1() );
@@ -868,7 +868,7 @@ KarbonView::zoomChanged( const KoPoint &p )
painter->setZoomFactor( zoomFactor );
m_canvas->setViewport( centerX, centerY );
- m_canvas->repaintAll();
+ m_canvas->tqrepaintAll();
m_canvas->viewport()->setUpdatesEnabled( true );
@@ -892,18 +892,18 @@ KarbonView::zoomChanged( const KoPoint &p )
void
KarbonView::setLineStyle( int style )
{
- QValueList<float> dashes;
- if( style == Qt::NoPen )
+ TQValueList<float> dashes;
+ if( style == TQt::NoPen )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes << 0 << 20 ), true );
- else if( style == Qt::SolidLine )
+ else if( style == TQt::SolidLine )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes ), true );
- else if( style == Qt::DashLine )
+ else if( style == TQt::DashLine )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes << 12 << 6 ), true );
- else if( style == Qt::DotLine )
+ else if( style == TQt::DotLine )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes << 2 << 2 ), true );
- else if( style == Qt::DashDotLine )
+ else if( style == TQt::DashDotLine )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes << 12 << 2 << 2 << 2 ), true );
- else if( style == Qt::DashDotDotLine )
+ else if( style == TQt::DashDotDotLine )
part()->addCommand( new VStrokeCmd( &part()->document(), dashes << 12 << 2 << 2 << 2 << 2 << 2 ), true );
}
@@ -940,20 +940,20 @@ KarbonView::initActions()
{
// view ----->
m_viewAction = new KSelectAction(
- i18n( "View &Mode" ), 0, this,
- SLOT( viewModeChanged() ), actionCollection(), "view_mode" );
+ i18n( "View &Mode" ), 0, TQT_TQOBJECT(this),
+ TQT_SLOT( viewModeChanged() ), actionCollection(), "view_mode" );
m_zoomAction = new KSelectAction(
- i18n( "&Zoom" ), "viewmag", 0, this,
- SLOT( zoomChanged() ), actionCollection(), "view_zoom" );
+ i18n( "&Zoom" ), "viewmag", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( zoomChanged() ), actionCollection(), "view_zoom" );
- QStringList mstl;
+ TQStringList mstl;
mstl << i18n( "Normal" ) << i18n( "Wireframe" );
m_viewAction->setItems( mstl );
m_viewAction->setCurrentItem( 0 );
m_viewAction->setEditable( false );
- QStringList stl;
+ TQStringList stl;
// xgettext:no-c-format
stl << i18n( "25%" );
// xgettext:no-c-format
@@ -975,11 +975,11 @@ KarbonView::initActions()
m_zoomAction->setEditable( true );
m_zoomAction->setCurrentItem( 7 );
- KStdAction::zoomIn( this, SLOT( viewZoomIn() ), actionCollection(), "view_zoom_in" );
- KStdAction::zoomOut( this, SLOT( viewZoomOut() ), actionCollection(), "view_zoom_out" );
+ KStdAction::zoomIn( TQT_TQOBJECT(this), TQT_SLOT( viewZoomIn() ), actionCollection(), "view_zoom_in" );
+ KStdAction::zoomOut( TQT_TQOBJECT(this), TQT_SLOT( viewZoomOut() ), actionCollection(), "view_zoom_out" );
m_showPageMargins = new KToggleAction( i18n("Show Page Margins"), "view_margins", 0, actionCollection(), "view_show_margins" );
- connect( m_showPageMargins, SIGNAL(toggled(bool)), SLOT(togglePageMargins(bool)));
+ connect( m_showPageMargins, TQT_SIGNAL(toggled(bool)), TQT_SLOT(togglePageMargins(bool)));
#if KDE_IS_VERSION(3,2,90)
m_showPageMargins->setCheckedState(i18n("Hide Page Margins"));
#endif
@@ -989,133 +989,133 @@ KarbonView::initActions()
return;
// edit ----->
- KStdAction::cut( this,
- SLOT( editCut() ), actionCollection(), "edit_cut" );
- KStdAction::copy( this,
- SLOT( editCopy() ), actionCollection(), "edit_copy" );
- KStdAction::paste( this,
- SLOT( editPaste() ), actionCollection(), "edit_paste" );
- KStdAction::selectAll( this, SLOT( editSelectAll() ), actionCollection(), "edit_select_all" );
- KStdAction::deselect( this, SLOT( editDeselectAll() ), actionCollection(), "edit_deselect_all" );
+ KStdAction::cut( TQT_TQOBJECT(this),
+ TQT_SLOT( editCut() ), actionCollection(), "edit_cut" );
+ KStdAction::copy( TQT_TQOBJECT(this),
+ TQT_SLOT( editCopy() ), actionCollection(), "edit_copy" );
+ KStdAction::paste( TQT_TQOBJECT(this),
+ TQT_SLOT( editPaste() ), actionCollection(), "edit_paste" );
+ KStdAction::selectAll( TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ), actionCollection(), "edit_select_all" );
+ KStdAction::deselect( TQT_TQOBJECT(this), TQT_SLOT( editDeselectAll() ), actionCollection(), "edit_deselect_all" );
new KAction(
- i18n( "&Import Graphic..." ), 0, 0, this,
- SLOT( fileImportGraphic() ), actionCollection(), "file_import" );
+ i18n( "&Import Graphic..." ), 0, 0, TQT_TQOBJECT(this),
+ TQT_SLOT( fileImportGraphic() ), actionCollection(), "file_import" );
m_deleteSelectionAction = new KAction(
- i18n( "D&elete" ), "editdelete", QKeySequence( "Del" ), this,
- SLOT( editDeleteSelection() ), actionCollection(), "edit_delete" );
+ i18n( "D&elete" ), "editdelete", TQKeySequence( "Del" ), TQT_TQOBJECT(this),
+ TQT_SLOT( editDeleteSelection() ), actionCollection(), "edit_delete" );
new KAction(
- i18n( "&History" ), 0, 0, this,
- SLOT( editPurgeHistory() ), actionCollection(), "edit_purge_history" );
+ i18n( "&History" ), 0, 0, TQT_TQOBJECT(this),
+ TQT_SLOT( editPurgeHistory() ), actionCollection(), "edit_purge_history" );
// edit <-----
// object ----->
new KAction(
- i18n( "&Duplicate" ), "duplicate", QKeySequence( "Ctrl+D" ), this,
- SLOT( selectionDuplicate() ), actionCollection(), "object_duplicate" );
+ i18n( "&Duplicate" ), "duplicate", TQKeySequence( "Ctrl+D" ), TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDuplicate() ), actionCollection(), "object_duplicate" );
new KAction(
- i18n( "Bring to &Front" ), "bring_forward", QKeySequence( "Ctrl+Shift+]" ), this,
- SLOT( selectionBringToFront() ), actionCollection(), "object_move_totop" );
+ i18n( "Bring to &Front" ), "bring_forward", TQKeySequence( "Ctrl+Shift+]" ), TQT_TQOBJECT(this),
+ TQT_SLOT( selectionBringToFront() ), actionCollection(), "object_move_totop" );
new KAction(
- i18n( "&Raise" ), "raise", QKeySequence( "Ctrl+]" ), this,
- SLOT( selectionMoveUp() ), actionCollection(), "object_move_up" );
+ i18n( "&Raise" ), "raise", TQKeySequence( "Ctrl+]" ), TQT_TQOBJECT(this),
+ TQT_SLOT( selectionMoveUp() ), actionCollection(), "object_move_up" );
new KAction(
- i18n( "&Lower" ), "lower", QKeySequence( "Ctrl+[" ), this,
- SLOT( selectionMoveDown() ), actionCollection(), "object_move_down" );
+ i18n( "&Lower" ), "lower", TQKeySequence( "Ctrl+[" ), TQT_TQOBJECT(this),
+ TQT_SLOT( selectionMoveDown() ), actionCollection(), "object_move_down" );
new KAction(
- i18n( "Send to &Back" ), "send_backward", QKeySequence( "Ctrl+Shift+[" ), this,
- SLOT( selectionSendToBack() ), actionCollection(), "object_move_tobottom" );
+ i18n( "Send to &Back" ), "send_backward", TQKeySequence( "Ctrl+Shift+[" ), TQT_TQOBJECT(this),
+ TQT_SLOT( selectionSendToBack() ), actionCollection(), "object_move_tobottom" );
new KAction(
- i18n( "Align Left" ), "aoleft", 0, this,
- SLOT( selectionAlignHorizontalLeft() ),
+ i18n( "Align Left" ), "aoleft", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignHorizontalLeft() ),
actionCollection(), "object_align_horizontal_left" );
new KAction(
- i18n( "Align Center (Horizontal)" ), "aocenterh", 0, this,
- SLOT( selectionAlignHorizontalCenter() ),
+ i18n( "Align Center Qt::Horizontal)" ), "aocenterh", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignHorizontalCenter() ),
actionCollection(), "object_align_horizontal_center" );
new KAction(
- i18n( "Align Right" ), "aoright", 0, this,
- SLOT( selectionAlignHorizontalRight() ),
+ i18n( "Align Right" ), "aoright", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignHorizontalRight() ),
actionCollection(), "object_align_horizontal_right" );
new KAction(
- i18n( "Align Top" ), "aotop", 0, this,
- SLOT( selectionAlignVerticalTop() ),
+ i18n( "Align Top" ), "aotop", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignVerticalTop() ),
actionCollection(), "object_align_vertical_top" );
new KAction(
- i18n( "Align Middle (Vertical)" ), "aocenterv", 0, this,
- SLOT( selectionAlignVerticalCenter() ),
+ i18n( "Align Middle Qt::Vertical)" ), "aocenterv", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignVerticalCenter() ),
actionCollection(), "object_align_vertical_center" );
new KAction(
- i18n( "Align Bottom" ), "aobottom", 0, this,
- SLOT( selectionAlignVerticalBottom() ),
+ i18n( "Align Bottom" ), "aobottom", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionAlignVerticalBottom() ),
actionCollection(), "object_align_vertical_bottom" );
new KAction(
- i18n( "Distribute Center (Horizontal)" ), "", 0, this,
- SLOT( selectionDistributeHorizontalCenter() ),
+ i18n( "Distribute Center Qt::Horizontal)" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeHorizontalCenter() ),
actionCollection(), "object_distribute_horizontal_center" );
new KAction(
- i18n( "Distribute Gaps (Horizontal)" ), "", 0, this,
- SLOT( selectionDistributeHorizontalGap() ),
+ i18n( "Distribute Gaps Qt::Horizontal)" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeHorizontalGap() ),
actionCollection(), "object_distribute_horizontal_gap" );
new KAction(
- i18n( "Distribute Left Borders" ), "", 0, this,
- SLOT( selectionDistributeHorizontalLeft() ),
+ i18n( "Distribute Left Borders" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeHorizontalLeft() ),
actionCollection(), "object_distribute_horizontal_left" );
new KAction(
- i18n( "Distribute Right Borders" ), "", 0, this,
- SLOT( selectionDistributeHorizontalRight() ),
+ i18n( "Distribute Right Borders" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeHorizontalRight() ),
actionCollection(), "object_distribute_horizontal_right" );
new KAction(
- i18n( "Distribute Center (Vertical)" ), "", 0, this,
- SLOT( selectionDistributeVerticalCenter() ),
+ i18n( "Distribute Center Qt::Vertical)" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeVerticalCenter() ),
actionCollection(), "object_distribute_vertical_center" );
new KAction(
- i18n( "Distribute Gaps (Vertical)" ), "", 0, this,
- SLOT( selectionDistributeVerticalGap() ),
+ i18n( "Distribute Gaps Qt::Vertical)" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeVerticalGap() ),
actionCollection(), "object_distribute_vertical_gap" );
new KAction(
- i18n( "Distribute Bottom Borders" ), "", 0, this,
- SLOT( selectionDistributeVerticalBottom() ),
+ i18n( "Distribute Bottom Borders" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeVerticalBottom() ),
actionCollection(), "object_distribute_vertical_bottom" );
new KAction(
- i18n( "Distribute Top Borders" ), "", 0, this,
- SLOT( selectionDistributeVerticalTop() ),
+ i18n( "Distribute Top Borders" ), "", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( selectionDistributeVerticalTop() ),
actionCollection(), "object_distribute_vertical_top" );
- m_showRulerAction = new KToggleAction( i18n( "Show Rulers" ), 0, this, SLOT( showRuler() ), actionCollection(), "view_show_ruler" );
+ m_showRulerAction = new KToggleAction( i18n( "Show Rulers" ), 0, TQT_TQOBJECT(this), TQT_SLOT( showRuler() ), actionCollection(), "view_show_ruler" );
#if KDE_IS_VERSION(3,2,90)
m_showRulerAction->setCheckedState(i18n("Hide Rulers"));
#endif
m_showRulerAction->setToolTip( i18n( "Shows or hides rulers." ) );
m_showRulerAction->setChecked( false );
- m_showGridAction = new KToggleAction( i18n( "Show Grid" ), "view_grid", this, SLOT( showGrid() ), actionCollection(), "view_show_grid" );
+ m_showGridAction = new KToggleAction( i18n( "Show Grid" ), "view_grid", TQT_TQOBJECT(this), TQT_SLOT( showGrid() ), actionCollection(), "view_show_grid" );
#if KDE_IS_VERSION(3,2,90)
m_showGridAction->setCheckedState(i18n("Hide Grid"));
#endif
m_showGridAction->setToolTip( i18n( "Shows or hides grid." ) );
//m_showGridAction->setChecked( true );
- m_snapGridAction = new KToggleAction( i18n( "Snap to Grid" ), 0, this, SLOT( snapToGrid() ), actionCollection(), "view_snap_to_grid" );
+ m_snapGridAction = new KToggleAction( i18n( "Snap to Grid" ), 0, TQT_TQOBJECT(this), TQT_SLOT( snapToGrid() ), actionCollection(), "view_snap_to_grid" );
m_snapGridAction->setToolTip( i18n( "Snaps to grid." ) );
//m_snapGridAction->setChecked( true );
m_groupObjects = new KAction(
- i18n( "&Group Objects" ), "group", QKeySequence( "Ctrl+G" ), this,
- SLOT( groupSelection() ), actionCollection(), "selection_group" );
+ i18n( "&Group Objects" ), "group", TQKeySequence( "Ctrl+G" ), TQT_TQOBJECT(this),
+ TQT_SLOT( groupSelection() ), actionCollection(), "selection_group" );
m_ungroupObjects = new KAction(
- i18n( "&Ungroup Objects" ), "ungroup", QKeySequence( "Ctrl+Shift+G" ), this,
- SLOT( ungroupSelection() ), actionCollection(), "selection_ungroup" );
+ i18n( "&Ungroup Objects" ), "ungroup", TQKeySequence( "Ctrl+Shift+G" ), TQT_TQOBJECT(this),
+ TQT_SLOT( ungroupSelection() ), actionCollection(), "selection_ungroup" );
m_closePath = new KAction(
- i18n( "&Close Path" ), QKeySequence( "Ctrl+U" ), this,
- SLOT( closePath() ), actionCollection(), "close_path" );
+ i18n( "&Close Path" ), TQKeySequence( "Ctrl+U" ), TQT_TQOBJECT(this),
+ TQT_SLOT( closePath() ), actionCollection(), "close_path" );
// object <-----
// line style (dashes)
- m_lineStyleAction = new KoLineStyleAction( i18n( "Line Style" ), "linestyle", this, SLOT( setLineStyle( int ) ), actionCollection(), "setLineStyle" );
+ m_lineStyleAction = new KoLineStyleAction( i18n( "Line Style" ), "linestyle", TQT_TQOBJECT(this), TQT_SLOT( setLineStyle( int ) ), actionCollection(), "setLineStyle" );
// line width
m_setLineWidth = new KoUnitDoubleSpinComboBox( this, 0.0, 1000.0, 0.5, 1.0, KoUnit::U_PT, 1 );
- new KWidgetAction( m_setLineWidth, i18n( "Set Line Width" ), 0, this, SLOT( setLineWidth() ), actionCollection(), "setLineWidth" );
+ new KWidgetAction( m_setLineWidth, i18n( "Set Line Width" ), 0, TQT_TQOBJECT(this), TQT_SLOT( setLineWidth() ), actionCollection(), "setLineWidth" );
m_setLineWidth->insertItem( 0.25 );
m_setLineWidth->insertItem( 0.5 );
m_setLineWidth->insertItem( 0.75 );
@@ -1126,25 +1126,25 @@ KarbonView::initActions()
m_setLineWidth->insertItem( 5.0 );
m_setLineWidth->insertItem( 10.0 );
m_setLineWidth->insertItem( 20.0 );
- connect( m_setLineWidth, SIGNAL( valueChanged( double ) ), this, SLOT( setLineWidth() ) );
+ connect( m_setLineWidth, TQT_SIGNAL( valueChanged( double ) ), TQT_TQOBJECT(this), TQT_SLOT( setLineWidth() ) );
m_configureAction = new KAction(
- i18n( "Configure Karbon..." ), "configure", 0, this,
- SLOT( configure() ), actionCollection(), "configure" );
+ i18n( "Configure Karbon..." ), "configure", 0, TQT_TQOBJECT(this),
+ TQT_SLOT( configure() ), actionCollection(), "configure" );
- new KAction( i18n( "Page &Layout..." ), 0, this,
- SLOT( pageLayout() ), actionCollection(), "page_layout" );
+ new KAction( i18n( "Page &Layout..." ), 0, TQT_TQOBJECT(this),
+ TQT_SLOT( pageLayout() ), actionCollection(), "page_layout" );
m_contextHelpAction = new KoContextHelpAction( actionCollection(), this );
}
void
-KarbonView::paintEverything( QPainter& /*p*/, const QRect& /*rect*/, bool /*transparent*/ )
+KarbonView::paintEverything( TQPainter& /*p*/, const TQRect& /*rect*/, bool /*transparent*/ )
{
kdDebug(38000) << "view->paintEverything()" << endl;
}
bool
-KarbonView::mouseEvent( QMouseEvent* event, const KoPoint &p )
+KarbonView::mouseEvent( TQMouseEvent* event, const KoPoint &p )
{
int mx = event->pos().x();
int my = event->pos().y();
@@ -1166,12 +1166,12 @@ KarbonView::mouseEvent( QMouseEvent* event, const KoPoint &p )
KoPoint xy;
xy.setX((mx + canvasWidget()->contentsX() - canvasWidget()->pageOffsetX())/zoom());
- xy.setY( qRound(m_part->document().height()) - (my + canvasWidget()->contentsY() - canvasWidget()->pageOffsetY())/zoom());
+ xy.setY( tqRound(m_part->document().height()) - (my + canvasWidget()->contentsY() - canvasWidget()->pageOffsetY())/zoom());
xy.setX(KoUnit::toUserValue(xy.x(), part()->unit()));
xy.setY(KoUnit::toUserValue(xy.y(), part()->unit()));
- m_cursorCoords->setText( QString( "%1, %2" ).arg(KGlobal::_locale->formatNumber(xy.x(), 2)).arg(KGlobal::_locale->formatNumber(xy.y(), 2)) );
+ m_cursorCoords->setText( TQString( "%1, %2" ).tqarg(KGlobal::_locale->formatNumber(xy.x(), 2)).tqarg(KGlobal::_locale->formatNumber(xy.y(), 2)) );
if( toolController() )
return toolController()->mouseEvent( event, p );
@@ -1180,7 +1180,7 @@ KarbonView::mouseEvent( QMouseEvent* event, const KoPoint &p )
}
bool
-KarbonView::keyEvent( QEvent* event )
+KarbonView::keyEvent( TQEvent* event )
{
if( toolController() )
return toolController()->keyEvent( event );
@@ -1237,7 +1237,7 @@ void
KarbonView::togglePageMargins(bool b)
{
((KToggleAction*)actionCollection()->action("view_show_margins"))->setChecked(b);
- m_canvas->repaintAll();
+ m_canvas->tqrepaintAll();
}
void
@@ -1247,12 +1247,12 @@ KarbonView::updateRuler()
{
if( (1 + m_canvas->pageOffsetX() - m_canvas->contentsX()) >= 0 )
{
- m_horizRuler->setGeometry( 1 + rulerWidth + m_canvas->pageOffsetX() - m_canvas->contentsX(), 0, qRound( 1 + part()->document().width() * zoom() ), rulerHeight );
+ m_horizRuler->setGeometry( 1 + rulerWidth + m_canvas->pageOffsetX() - m_canvas->contentsX(), 0, tqRound( 1 + part()->document().width() * zoom() ), rulerHeight );
m_horizRuler->updateVisibleArea(0,0);
}
else
{
- m_horizRuler->setGeometry( rulerWidth, 0, qRound( 1 + part()->document().width() * zoom() ) - m_canvas->contentsX() + m_canvas->pageOffsetX(), rulerHeight );
+ m_horizRuler->setGeometry( rulerWidth, 0, tqRound( 1 + part()->document().width() * zoom() ) - m_canvas->contentsX() + m_canvas->pageOffsetX(), rulerHeight );
m_horizRuler->updateVisibleArea((m_canvas->contentsX() - m_canvas->pageOffsetX()),0);
}
}
@@ -1261,12 +1261,12 @@ KarbonView::updateRuler()
{
if( (1 + m_canvas->pageOffsetY() - m_canvas->contentsY()) >= 0 )
{
- m_vertRuler->setGeometry( 0, 1 + rulerHeight + m_canvas->pageOffsetY() - m_canvas->contentsY(), rulerWidth, 1 + qRound( part()->document().height() * zoom() ));
+ m_vertRuler->setGeometry( 0, 1 + rulerHeight + m_canvas->pageOffsetY() - m_canvas->contentsY(), rulerWidth, 1 + tqRound( part()->document().height() * zoom() ));
m_vertRuler->updateVisibleArea(0,0);
}
else
{
- m_vertRuler->setGeometry( 0, 1 + rulerHeight, rulerWidth, 1 + qRound( part()->document().height() * zoom() ) + m_canvas->contentsY() - m_canvas->pageOffsetY() );
+ m_vertRuler->setGeometry( 0, 1 + rulerHeight, rulerWidth, 1 + tqRound( part()->document().height() * zoom() ) + m_canvas->contentsY() - m_canvas->pageOffsetY() );
m_vertRuler->updateVisibleArea(0, (m_canvas->contentsY() - m_canvas->pageOffsetY()));
}
}
@@ -1285,9 +1285,9 @@ KarbonView::snapToGrid()
}
void
-KarbonView::showSelectionPopupMenu( const QPoint &pos )
+KarbonView::showSelectionPopupMenu( const TQPoint &pos )
{
- QPtrList<KAction> actionList;
+ TQPtrList<KAction> actionList;
if( m_groupObjects->isEnabled() )
actionList.append( m_groupObjects );
else if( m_ungroupObjects->isEnabled() )
@@ -1295,7 +1295,7 @@ KarbonView::showSelectionPopupMenu( const QPoint &pos )
if( m_closePath->isEnabled() )
actionList.append( m_closePath );
plugActionList( "selection_type_action", actionList );
- ((QPopupMenu *)factory()->container( "selection_popup", this ) )->exec( pos );
+ ((TQPopupMenu *)factory()->container( "selection_popup", this ) )->exec( pos );
unplugActionList( "selection_type_action" );
}
@@ -1310,16 +1310,16 @@ void
KarbonView::pageLayout()
{
KoHeadFoot hf;
- KoPageLayout layout = part()->pageLayout();
+ KoPageLayout tqlayout = part()->pageLayout();
KoUnit::Unit unit = part()->unit();
- if( KoPageLayoutDia::pageLayout( layout, hf, FORMAT_AND_BORDERS | DISABLE_UNIT, unit ) )
+ if( KoPageLayoutDia::pageLayout( tqlayout, hf, FORMAT_AND_BORDERS | DISABLE_UNIT, unit ) )
{
- part()->setPageLayout( layout, unit );
+ part()->setPageLayout( tqlayout, unit );
m_horizRuler->setUnit( unit );
m_vertRuler->setUnit( unit );
m_canvas->resizeContents( int( ( part()->pageLayout().ptWidth + 300 ) * zoom() ),
int( ( part()->pageLayout().ptHeight + 460 ) * zoom() ) );
- part()->repaintAllViews();
+ part()->tqrepaintAllViews();
emit pageLayoutChanged();
}
@@ -1334,12 +1334,12 @@ KarbonView::canvasContentsMoving( int x, int y )
{
if( (1 + m_canvas->pageOffsetX() - x) >= 0)
{
- m_horizRuler->setGeometry( 1 + rulerWidth + m_canvas->pageOffsetX() - x, 0, qRound( 1 + part()->document().width() * zoom() ), rulerHeight );
+ m_horizRuler->setGeometry( 1 + rulerWidth + m_canvas->pageOffsetX() - x, 0, tqRound( 1 + part()->document().width() * zoom() ), rulerHeight );
m_horizRuler->updateVisibleArea(0,0);
}
else
{
- m_horizRuler->setGeometry( rulerWidth, 0, qRound( 1 + part()->document().width() * zoom() ) - x + m_canvas->pageOffsetX(), rulerHeight );
+ m_horizRuler->setGeometry( rulerWidth, 0, tqRound( 1 + part()->document().width() * zoom() ) - x + m_canvas->pageOffsetX(), rulerHeight );
m_horizRuler->updateVisibleArea((x - m_canvas->pageOffsetX()),0);
}
}
@@ -1351,12 +1351,12 @@ KarbonView::canvasContentsMoving( int x, int y )
{
if( (1 + m_canvas->pageOffsetY() - y) >= 0)
{
- m_vertRuler->setGeometry( 0, 1 + rulerHeight + m_canvas->pageOffsetY() - y , rulerWidth, 1 + qRound( part()->document().height() * zoom() ));
+ m_vertRuler->setGeometry( 0, 1 + rulerHeight + m_canvas->pageOffsetY() - y , rulerWidth, 1 + tqRound( part()->document().height() * zoom() ));
m_vertRuler->updateVisibleArea(0,0);
}
else
{
- m_vertRuler->setGeometry( 0, 1 + rulerHeight, rulerWidth, 1 + qRound( part()->document().height() * zoom() ) - y + m_canvas->pageOffsetY() );
+ m_vertRuler->setGeometry( 0, 1 + rulerHeight, rulerWidth, 1 + tqRound( part()->document().height() * zoom() ) - y + m_canvas->pageOffsetY() );
m_vertRuler->updateVisibleArea(0, (y - m_canvas->pageOffsetY()));
}
}
@@ -1403,17 +1403,17 @@ KarbonView::selectionChanged()
// dashes
m_lineStyleAction->setEnabled( true );
if( stroke.dashPattern().array().isEmpty() )
- m_lineStyleAction->setCurrentSelection( Qt::SolidLine );
+ m_lineStyleAction->setCurrentSelection( TQt::SolidLine );
else if( stroke.dashPattern().array()[ 0 ] == 0. )
- m_lineStyleAction->setCurrentSelection( Qt::NoPen );
+ m_lineStyleAction->setCurrentSelection( TQt::NoPen );
else if( stroke.dashPattern().array()[ 0 ] == 2. )
- m_lineStyleAction->setCurrentSelection( Qt::DotLine );
+ m_lineStyleAction->setCurrentSelection( TQt::DotLine );
else if( stroke.dashPattern().array().count() == 2 )
- m_lineStyleAction->setCurrentSelection( Qt::DashLine );
+ m_lineStyleAction->setCurrentSelection( TQt::DashLine );
else if( stroke.dashPattern().array().count() == 4 )
- m_lineStyleAction->setCurrentSelection( Qt::DashDotLine );
+ m_lineStyleAction->setCurrentSelection( TQt::DashDotLine );
else if( stroke.dashPattern().array().count() == 6 )
- m_lineStyleAction->setCurrentSelection( Qt::DashDotDotLine );
+ m_lineStyleAction->setCurrentSelection( TQt::DashDotDotLine );
m_deleteSelectionAction->setEnabled( true );
}
@@ -1432,21 +1432,21 @@ KarbonView::selectionChanged()
emit selectionChange();
}
void
-KarbonView::setCursor( const QCursor &c )
+KarbonView::setCursor( const TQCursor &c )
{
m_canvas->setCursor( c );
}
void
-KarbonView::repaintAll( const KoRect &r )
+KarbonView::tqrepaintAll( const KoRect &r )
{
- m_canvas->repaintAll( r );
+ m_canvas->tqrepaintAll( r );
}
void
-KarbonView::repaintAll( bool repaint )
+KarbonView::tqrepaintAll( bool tqrepaint )
{
- m_canvas->repaintAll( repaint );
+ m_canvas->tqrepaintAll( tqrepaint );
}
void
KarbonView::setPos( const KoPoint& p )
@@ -1470,7 +1470,7 @@ void KarbonView::createDocumentTabDock()
m_DocumentTab = new VDocumentTab(this, this);
m_DocumentTab->setCaption(i18n("Document"));
paletteManager()->addWidget(m_DocumentTab, "DocumentTabDock", "DocumentPanel");
- connect( m_part, SIGNAL( unitChanged( KoUnit::Unit ) ), m_DocumentTab, SLOT( updateDocumentInfo() ) );
+ connect( m_part, TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), m_DocumentTab, TQT_SLOT( updateDocumentInfo() ) );
}
void KarbonView::createLayersTabDock()
@@ -1493,7 +1493,7 @@ void KarbonView::createStrokeDock()
m_strokeDocker->setCaption(i18n("Stroke Properties"));
paletteManager()->addWidget(m_strokeDocker, "StrokeTabDock", "StrokePanel");
- connect( part(), SIGNAL( unitChanged( KoUnit::Unit ) ), m_strokeDocker, SLOT( setUnit( KoUnit::Unit ) ) );
+ connect( part(), TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), m_strokeDocker, TQT_SLOT( setUnit( KoUnit::Unit ) ) );
}
void KarbonView::createColorDock()
@@ -1502,7 +1502,7 @@ void KarbonView::createColorDock()
//m_ColorManager->setCaption(i18n("Stroke Properties"));
paletteManager()->addWidget(m_ColorManager, "ColorTabDock", "ColorPanel");
- connect( this, SIGNAL( selectionChange() ), m_ColorManager, SLOT( update() ) );
+ connect( this, TQT_SIGNAL( selectionChange() ), m_ColorManager, TQT_SLOT( update() ) );
}
void KarbonView::createTransformDock()
@@ -1511,8 +1511,8 @@ void KarbonView::createTransformDock()
m_TransformDocker->setCaption(i18n("Transform"));
paletteManager()->addWidget(m_TransformDocker, "TransformTabDock", "TransformPanel");
- connect( this, SIGNAL( selectionChange() ), m_TransformDocker, SLOT( update() ) );
- connect( part(), SIGNAL( unitChanged( KoUnit::Unit ) ), m_TransformDocker, SLOT( setUnit( KoUnit::Unit ) ) );
+ connect( this, TQT_SIGNAL( selectionChange() ), m_TransformDocker, TQT_SLOT( update() ) );
+ connect( part(), TQT_SIGNAL( unitChanged( KoUnit::Unit ) ), m_TransformDocker, TQT_SLOT( setUnit( KoUnit::Unit ) ) );
}
void KarbonView::createResourceDock()
@@ -1543,7 +1543,7 @@ void KarbonView::strokeFillSelectionChanged( KDualColorButton::DualColor s )
selectionChanged();
}
-void KarbonView::colorChanged( const QColor &c )
+void KarbonView::colorChanged( const TQColor &c )
{
selectionChanged();
}
diff --git a/karbon/karbon_view.h b/karbon/karbon_view.h
index 2e1e4dc0..5b572a85 100644
--- a/karbon/karbon_view.h
+++ b/karbon/karbon_view.h
@@ -32,7 +32,7 @@
#include <KoUnit.h>
#include <koffice_export.h>
class DCOPObject;
-class QLabel;
+class TQLabel;
class KAction;
class KarbonPart;
@@ -74,9 +74,10 @@ class VCommand;
class KARBONCOMMON_EXPORT KarbonView : public KoView, public KXMLGUIBuilder
{
Q_OBJECT
+ TQ_OBJECT
public:
- KarbonView( KarbonPart* part, QWidget* parent = 0L,
+ KarbonView( KarbonPart* part, TQWidget* tqparent = 0L,
const char* name = 0L );
virtual ~KarbonView();
@@ -84,13 +85,13 @@ public:
KarbonPart *part() const { return m_part; }
- virtual void paintEverything( QPainter &p, const QRect &rect, bool transparent = false );
+ virtual void paintEverything( TQPainter &p, const TQRect &rect, bool transparent = false );
- bool mouseEvent( QMouseEvent* event, const KoPoint & );
- bool keyEvent( QEvent* event );
- void dropEvent( QDropEvent *e );
+ bool mouseEvent( TQMouseEvent* event, const KoPoint & );
+ bool keyEvent( TQEvent* event );
+ void dropEvent( TQDropEvent *e );
- virtual QWidget* canvas() const;
+ virtual TQWidget* canvas() const;
VCanvas* canvasWidget() const { return m_canvas; }
@@ -108,12 +109,12 @@ public:
void setNumberOfRecentFiles( unsigned int number );
void setLineWidth( double val );
- QLabel* statusMessage() const { return m_status; }
+ TQLabel* statusMessage() const { return m_status; }
- void setCursor( const QCursor & );
+ void setCursor( const TQCursor & );
- void repaintAll( const KoRect & );
- void repaintAll( bool = true );
+ void tqrepaintAll( const KoRect & );
+ void tqrepaintAll( bool = true );
void setPos( const KoPoint& p );
@@ -184,7 +185,7 @@ public slots:
bool showPageMargins();
void snapToGrid();
- void showSelectionPopupMenu( const QPoint &pos );
+ void showSelectionPopupMenu( const TQPoint &pos );
protected slots:
// Object related operations.
@@ -201,7 +202,7 @@ protected slots:
void canvasContentsMoving( int x, int y );
void commandExecuted( VCommand *command );
void strokeFillSelectionChanged( KDualColorButton::DualColor s );
- void colorChanged( const QColor &c );
+ void colorChanged( const TQColor &c );
signals:
void zoomChanged( double );
void selectionChange();
@@ -209,7 +210,7 @@ signals:
protected:
virtual void updateReadWrite( bool ) {}
- virtual void resizeEvent( QResizeEvent* event );
+ virtual void resizeEvent( TQResizeEvent* event );
void createDocumentTabDock();
void createLayersTabDock();
@@ -220,8 +221,8 @@ protected:
void createResourceDock();
//KXMLGUIBuilder
- virtual QWidget *createContainer( QWidget *parent, int index, const QDomElement &element, int &id );
- virtual void removeContainer( QWidget *container, QWidget *parent, QDomElement &element, int id );
+ virtual TQWidget *createContainer( TQWidget *tqparent, int index, const TQDomElement &element, int &id );
+ virtual void removeContainer( TQWidget *container, TQWidget *tqparent, TQDomElement &element, int id );
void addSelectionToClipboard() const;
private:
@@ -273,9 +274,9 @@ private:
// dcop
DCOPObject *m_dcop;
- //Status Bar
- QLabel *m_status; // Ordinary status
- QLabel *m_cursorCoords; // Cursor coordinates
+ //tqStatus Bar
+ TQLabel *m_status; // Ordinary status
+ TQLabel *m_cursorCoords; // Cursor coordinates
VSmallPreview *m_smallPreview; // Stroke and Fill
VToolController *m_toolController;
};
diff --git a/karbon/karbon_view_iface.cc b/karbon/karbon_view_iface.cc
index 3fdf1778..a1eabe05 100644
--- a/karbon/karbon_view_iface.cc
+++ b/karbon/karbon_view_iface.cc
@@ -143,8 +143,8 @@ void KarbonViewIface::pathWhirlPinch()
//m_view->pathWhirlPinch();
}
-void KarbonViewIface::repaint()
+void KarbonViewIface::tqrepaint()
{
- m_view->canvasWidget()->repaintAll();
+ m_view->canvasWidget()->tqrepaintAll();
}
diff --git a/karbon/karbon_view_iface.h b/karbon/karbon_view_iface.h
index bacfe3f4..fcd4cf55 100644
--- a/karbon/karbon_view_iface.h
+++ b/karbon/karbon_view_iface.h
@@ -21,7 +21,7 @@
#define __KARBON_VIEW_IFACE_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <KoViewIface.h>
@@ -61,7 +61,7 @@ k_dcop:
void pathRoundCorners();
void pathWhirlPinch();
- void repaint();
+ void tqrepaint();
private:
KarbonView* m_view;
diff --git a/karbon/plugins/flattenpath/flattenpathplugin.cc b/karbon/plugins/flattenpath/flattenpathplugin.cc
index 4532a12c..1cb16658 100644
--- a/karbon/plugins/flattenpath/flattenpathplugin.cc
+++ b/karbon/plugins/flattenpath/flattenpathplugin.cc
@@ -23,8 +23,8 @@
#include <karbon_part.h>
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <commands/vflattencmd.h>
@@ -33,12 +33,12 @@
typedef KGenericFactory<FlattenPathPlugin, KarbonView> FlattenPathPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_flattenpathplugin, FlattenPathPluginFactory( "karbonflattenpathplugin" ) )
-FlattenPathPlugin::FlattenPathPlugin( KarbonView *parent, const char* name, const QStringList & )
-: Plugin( parent, name )
+FlattenPathPlugin::FlattenPathPlugin( KarbonView *tqparent, const char* name, const TQStringList & )
+: Plugin( tqparent, name )
{
new KAction(
i18n( "&Flatten Path..." ), "14_flatten", 0, this,
- SLOT( slotFlattenPath() ), actionCollection(), "path_flatten" );
+ TQT_SLOT( slotFlattenPath() ), actionCollection(), "path_flatten" );
m_flattenPathDlg = new VFlattenDlg();
m_flattenPathDlg->setFlatness( 0.2 );
@@ -47,23 +47,23 @@ FlattenPathPlugin::FlattenPathPlugin( KarbonView *parent, const char* name, cons
void
FlattenPathPlugin::slotFlattenPath()
{
- KarbonPart *part = ((KarbonView *)parent())->part();
+ KarbonPart *part = ((KarbonView *)tqparent())->part();
if( part && m_flattenPathDlg->exec() )
part->addCommand( new VFlattenCmd( &part->document(), m_flattenPathDlg->flatness() ), true );
}
-VFlattenDlg::VFlattenDlg( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Flatten Path" ), Ok | Cancel )
+VFlattenDlg::VFlattenDlg( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Flatten Path" ), Ok | Cancel )
{
// add input fields on the left:
- QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Flatness:" ), group );
+ TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ new TQLabel( i18n( "Flatness:" ), group );
m_flatness = new KDoubleNumInput( group );
group->setMinimumWidth( 300 );
// signals and slots:
- connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) );
setMainWidget( group );
setFixedSize( baseSize() );
diff --git a/karbon/plugins/flattenpath/flattenpathplugin.h b/karbon/plugins/flattenpath/flattenpathplugin.h
index 0e92d8f3..d4a4e3a7 100644
--- a/karbon/plugins/flattenpath/flattenpathplugin.h
+++ b/karbon/plugins/flattenpath/flattenpathplugin.h
@@ -29,8 +29,9 @@ class VFlattenDlg;
class FlattenPathPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- FlattenPathPlugin( KarbonView *parent, const char* name, const QStringList & );
+ FlattenPathPlugin( KarbonView *tqparent, const char* name, const TQStringList & );
virtual ~FlattenPathPlugin() {}
private slots:
@@ -45,9 +46,10 @@ class KDoubleNumInput;
class VFlattenDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VFlattenDlg( QWidget* parent = 0L, const char* name = 0L );
+ VFlattenDlg( TQWidget* tqparent = 0L, const char* name = 0L );
double flatness() const;
void setFlatness( double value );
diff --git a/karbon/plugins/imagetool/imagetoolplugin.cc b/karbon/plugins/imagetool/imagetoolplugin.cc
index cd9c7c2f..2bb9962a 100644
--- a/karbon/plugins/imagetool/imagetoolplugin.cc
+++ b/karbon/plugins/imagetool/imagetoolplugin.cc
@@ -31,17 +31,17 @@
typedef KGenericFactory<ImageToolPlugin> ImageToolPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_imagetoolplugin, ImageToolPluginFactory( "karbonimagetoolplugin" ) )
-ImageToolPlugin::ImageToolPlugin(QObject *parent, const char *name, const QStringList &) : KParts::Plugin(parent, name)
+ImageToolPlugin::ImageToolPlugin(TQObject *tqparent, const char *name, const TQStringList &) : KParts::Plugin(tqparent, name)
{
setInstance(ImageToolPluginFactory::instance());
kdDebug() << "VImageToolPlugin. Class: "
<< className()
<< ", Parent: "
- << parent -> className()
+ << tqparent -> className()
<< "\n";
- if ( parent->inherits("KarbonFactory") )
+ if ( tqparent->inherits("KarbonFactory") )
{
KarbonToolRegistry* r = KarbonToolRegistry::instance();
r->add(new KarbonToolFactory<VImageTool>());
diff --git a/karbon/plugins/imagetool/imagetoolplugin.h b/karbon/plugins/imagetool/imagetoolplugin.h
index 6f7e6547..236b0ac6 100644
--- a/karbon/plugins/imagetool/imagetoolplugin.h
+++ b/karbon/plugins/imagetool/imagetoolplugin.h
@@ -21,7 +21,7 @@
#ifndef __IMAGETOOLPLUGIN_H__
#define __IMAGETOOLPLUGIN_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/plugin.h>
@@ -30,8 +30,9 @@
class ImageToolPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImageToolPlugin(QObject *parent, const char *name, const QStringList &);
+ ImageToolPlugin(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~ImageToolPlugin();
};
diff --git a/karbon/plugins/imagetool/vimagetool.cc b/karbon/plugins/imagetool/vimagetool.cc
index 6511fa4d..40823e99 100644
--- a/karbon/plugins/imagetool/vimagetool.cc
+++ b/karbon/plugins/imagetool/vimagetool.cc
@@ -18,7 +18,7 @@
*/
-#include <qcursor.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kfiledialog.h>
#include <kdebug.h>
@@ -33,7 +33,7 @@
VImageTool::VImageTool( KarbonView *view ) : VTool( view, "tool_image_plugin" )
{
registerTool( this );
- m_cursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_cursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
}
VImageTool::~VImageTool()
@@ -41,10 +41,10 @@ VImageTool::~VImageTool()
delete m_cursor;
}
-QString
+TQString
VImageTool::contextHelp()
{
- QString s = i18n( "<qt><b>Image tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Image tool:</b><br>" );
return s;
}
@@ -55,7 +55,7 @@ VImageTool::activate()
VTool::activate();
}
-QString
+TQString
VImageTool::statusText()
{
return i18n( "Image Tool" );
@@ -69,7 +69,7 @@ VImageTool::deactivate()
void
VImageTool::mouseButtonRelease()
{
- QString fname = KFileDialog::getOpenFileName( QString::null, "*.jpg *.gif *.png", view(), i18n( "Choose Image to Add" ) );
+ TQString fname = KFileDialog::getOpenFileName( TQString(), "*.jpg *.gif *.png", view(), i18n( "Choose Image to Add" ) );
if( !fname.isEmpty() )
{
VImage *image = new VImage( 0L, fname );
@@ -79,7 +79,7 @@ VImageTool::mouseButtonRelease()
}
}
-VImageTool::VInsertImageCmd::VInsertImageCmd( VDocument* doc, const QString& name, VImage *image, KoPoint pos )
+VImageTool::VInsertImageCmd::VInsertImageCmd( VDocument* doc, const TQString& name, VImage *image, KoPoint pos )
: VCommand( doc, name, "frame_image" ), m_image( image ), m_pos( pos )
{
}
@@ -95,7 +95,7 @@ VImageTool::VInsertImageCmd::execute()
else
{
m_image->setState( VObject::normal );
- m_image->transform( QWMatrix().translate( m_pos.x(), m_pos.y() ) );
+ m_image->transform( TQWMatrix().translate( m_pos.x(), m_pos.y() ) );
document()->append( m_image );
document()->selection()->clear();
document()->selection()->append( m_image );
@@ -123,7 +123,7 @@ VImageTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Image Tool" ), "14_image", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Image Tool" ), "14_image", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Image" ) );
m_action->setExclusiveGroup( "misc" );
//m_ownAction = true;
diff --git a/karbon/plugins/imagetool/vimagetool.h b/karbon/plugins/imagetool/vimagetool.h
index c9ac7f44..65b187ea 100644
--- a/karbon/plugins/imagetool/vimagetool.h
+++ b/karbon/plugins/imagetool/vimagetool.h
@@ -21,14 +21,14 @@
#ifndef __VIMAGETOOL_H__
#define __VIMAGETOOL_H__
-#include <qstring.h>
+#include <tqstring.h>
#include "vtool.h"
#include <commands/vcommand.h>
class KarbonView;
class VImage;
-class QCursor;
+class TQCursor;
class VImageTool : public VTool
{
@@ -40,15 +40,15 @@ public:
virtual void deactivate();
virtual void setup( KActionCollection *collection );
- virtual QString uiname() { return i18n( "Image Tool" ); }
- virtual QString contextHelp();
- virtual QString statusText();
+ virtual TQString uiname() { return i18n( "Image Tool" ); }
+ virtual TQString contextHelp();
+ virtual TQString statusText();
protected:
class VInsertImageCmd : public VCommand
{
public:
- VInsertImageCmd( VDocument* doc, const QString& name, VImage *image, KoPoint pos );
+ VInsertImageCmd( VDocument* doc, const TQString& name, VImage *image, KoPoint pos );
virtual ~VInsertImageCmd() {}
virtual void execute();
@@ -63,7 +63,7 @@ protected:
virtual void mouseButtonRelease();
private:
- QCursor* m_cursor;
+ TQCursor* m_cursor;
};
#endif
diff --git a/karbon/plugins/insertknots/insertknotsplugin.cc b/karbon/plugins/insertknots/insertknotsplugin.cc
index 2d470b88..b31d33f9 100644
--- a/karbon/plugins/insertknots/insertknotsplugin.cc
+++ b/karbon/plugins/insertknots/insertknotsplugin.cc
@@ -25,19 +25,19 @@
#include <core/vsegment.h>
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
typedef KGenericFactory<InsertKnotsPlugin, KarbonView> InsertKnotsPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_insertknotsplugin, InsertKnotsPluginFactory( "karboninsertknotsplugin" ) )
-InsertKnotsPlugin::InsertKnotsPlugin( KarbonView *parent, const char* name, const QStringList & ) : Plugin( parent, name )
+InsertKnotsPlugin::InsertKnotsPlugin( KarbonView *tqparent, const char* name, const TQStringList & ) : Plugin( tqparent, name )
{
new KAction(
i18n( "&Insert Knots..." ), "14_insertknots", 0, this,
- SLOT( slotInsertKnots() ), actionCollection(), "path_insert_knots" );
+ TQT_SLOT( slotInsertKnots() ), actionCollection(), "path_insert_knots" );
m_insertKnotsDlg = new VInsertKnotsDlg();
}
@@ -45,25 +45,25 @@ InsertKnotsPlugin::InsertKnotsPlugin( KarbonView *parent, const char* name, cons
void
InsertKnotsPlugin::slotInsertKnots()
{
- KarbonPart *part = ((KarbonView *)parent())->part();
+ KarbonPart *part = ((KarbonView *)tqparent())->part();
if( part && m_insertKnotsDlg->exec() )
part->addCommand( new VInsertKnotsCmd( &part->document(), m_insertKnotsDlg->knots() ), true );
}
-VInsertKnotsDlg::VInsertKnotsDlg( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Knots" ), Ok | Cancel )
+VInsertKnotsDlg::VInsertKnotsDlg( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Knots" ), Ok | Cancel )
{
// add input fields:
- QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Knots:" ), group );
+ new TQLabel( i18n( "Knots:" ), group );
m_knots = new KIntSpinBox( group );
m_knots->setMinValue( 1 );
group->setMinimumWidth( 300 );
// signals and slots:
- connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) );
setMainWidget( group );
setFixedSize( baseSize() );
diff --git a/karbon/plugins/insertknots/insertknotsplugin.h b/karbon/plugins/insertknots/insertknotsplugin.h
index 89f0a4d0..4bd2b212 100644
--- a/karbon/plugins/insertknots/insertknotsplugin.h
+++ b/karbon/plugins/insertknots/insertknotsplugin.h
@@ -30,8 +30,9 @@ class KarbonView;
class InsertKnotsPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- InsertKnotsPlugin( KarbonView *parent, const char* name, const QStringList & );
+ InsertKnotsPlugin( KarbonView *tqparent, const char* name, const TQStringList & );
virtual ~InsertKnotsPlugin() {}
private slots:
@@ -46,9 +47,10 @@ class KIntSpinBox;
class VInsertKnotsDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VInsertKnotsDlg( QWidget* parent = 0L, const char* name = 0L );
+ VInsertKnotsDlg( TQWidget* tqparent = 0L, const char* name = 0L );
uint knots() const;
void setKnots( uint value );
diff --git a/karbon/plugins/roundcorners/roundcornersplugin.cc b/karbon/plugins/roundcorners/roundcornersplugin.cc
index 5a36fa51..cb24087f 100644
--- a/karbon/plugins/roundcorners/roundcornersplugin.cc
+++ b/karbon/plugins/roundcorners/roundcornersplugin.cc
@@ -24,19 +24,19 @@
#include <core/vsegment.h>
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
typedef KGenericFactory<VRoundCornersPlugin, KarbonView> VRoundCornersPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_roundcornersplugin, VRoundCornersPluginFactory( "karbonroundcornersplugin" ) )
-VRoundCornersPlugin::VRoundCornersPlugin( KarbonView *parent, const char* name, const QStringList & ) : Plugin( parent, name )
+VRoundCornersPlugin::VRoundCornersPlugin( KarbonView *tqparent, const char* name, const TQStringList & ) : Plugin( tqparent, name )
{
new KAction(
i18n( "&Round Corners..." ), "14_roundcorners", 0, this,
- SLOT( slotRoundCorners() ), actionCollection(), "path_round_corners" );
+ TQT_SLOT( slotRoundCorners() ), actionCollection(), "path_round_corners" );
m_roundCornersDlg = new VRoundCornersDlg();
m_roundCornersDlg->setRadius( 10.0 );
@@ -49,25 +49,25 @@ VRoundCornersPlugin::~VRoundCornersPlugin()
void
VRoundCornersPlugin::slotRoundCorners()
{
- KarbonPart *part = ((KarbonView *)parent())->part();
+ KarbonPart *part = ((KarbonView *)tqparent())->part();
if( part && m_roundCornersDlg->exec() )
part->addCommand( new VRoundCornersCmd( &part->document(), m_roundCornersDlg->radius() ), true );
}
-VRoundCornersDlg::VRoundCornersDlg( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Polygonize" ), Ok | Cancel )
+VRoundCornersDlg::VRoundCornersDlg( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Polygonize" ), Ok | Cancel )
{
// add input:
- QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Round corners:" ), group );
+ new TQLabel( i18n( "Round corners:" ), group );
m_radius = new KDoubleNumInput( group );
group->setMinimumWidth( 300 );
// signals and slots:
- connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) );
setMainWidget( group );
setFixedSize( baseSize() );
@@ -102,7 +102,7 @@ VRoundCornersCmd::visitVSubpath( VSubpath& path )
return;
// Note: we modiy segments from path. that doesn't hurt, since we
- // replace "path" with the temporary path "newPath" afterwards.
+ // tqreplace "path" with the temporary path "newPath" afterwards.
VSubpath newPath( 0L );
@@ -395,7 +395,7 @@ VRoundCornersCmd::visitVSubpath( VSubpath& path )
path = newPath;
// Invalidate bounding box once.
- path.invalidateBoundingBox();
+ path.tqinvalidateBoundingBox();
}
#include "roundcornersplugin.moc"
diff --git a/karbon/plugins/roundcorners/roundcornersplugin.h b/karbon/plugins/roundcorners/roundcornersplugin.h
index 626d698c..74e49f88 100644
--- a/karbon/plugins/roundcorners/roundcornersplugin.h
+++ b/karbon/plugins/roundcorners/roundcornersplugin.h
@@ -31,8 +31,9 @@ class VRoundCornersDlg;
class KARBONBASE_EXPORT VRoundCornersPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- VRoundCornersPlugin( KarbonView *parent, const char* name, const QStringList & );
+ VRoundCornersPlugin( KarbonView *tqparent, const char* name, const TQStringList & );
virtual ~VRoundCornersPlugin();
private slots:
@@ -47,9 +48,10 @@ class KDoubleNumInput;
class VRoundCornersDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VRoundCornersDlg( QWidget* parent = 0L, const char* name = 0L );
+ VRoundCornersDlg( TQWidget* tqparent = 0L, const char* name = 0L );
double radius() const;
void setRadius( double value );
diff --git a/karbon/plugins/shadoweffect/shadoweffectplugin.cc b/karbon/plugins/shadoweffect/shadoweffectplugin.cc
index c1a0aa33..903f0ee0 100644
--- a/karbon/plugins/shadoweffect/shadoweffectplugin.cc
+++ b/karbon/plugins/shadoweffect/shadoweffectplugin.cc
@@ -23,8 +23,8 @@
#include <karbon_part.h>
#include <kgenericfactory.h>
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <core/vgroup.h>
@@ -37,12 +37,12 @@
typedef KGenericFactory<ShadowEffectPlugin, KarbonView> ShadowEffectPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_shadoweffectplugin, ShadowEffectPluginFactory( "karbonshadoweffectplugin" ) )
-ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *parent, const char* name, const QStringList & )
-: Plugin( parent, name )
+ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *tqparent, const char* name, const TQStringList & )
+: Plugin( tqparent, name )
{
new KAction(
i18n( "&Shadow Effect..." ), "shadowRB", 0, this,
- SLOT( slotShadowEffect() ), actionCollection(), "object_shadow" );
+ TQT_SLOT( slotShadowEffect() ), actionCollection(), "object_shadow" );
m_shadowEffectDlg = new VShadowEffectDlg();
m_shadowEffectDlg->setDistance( 2 );
@@ -52,25 +52,25 @@ ShadowEffectPlugin::ShadowEffectPlugin( KarbonView *parent, const char* name, co
void
ShadowEffectPlugin::slotShadowEffect()
{
- KarbonPart *part = ((KarbonView *)parent())->part();
+ KarbonPart *part = ((KarbonView *)tqparent())->part();
if( part && m_shadowEffectDlg->exec() )
part->addCommand( new VCreateShadowCmd( &part->document(), m_shadowEffectDlg->distance(), m_shadowEffectDlg->angle(), double( m_shadowEffectDlg->opacity() ) / 255.0 ), true );
}
-VShadowEffectDlg::VShadowEffectDlg( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Create Shadow Effect" ), Ok | Cancel )
+VShadowEffectDlg::VShadowEffectDlg( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Create Shadow Effect" ), Ok | Cancel )
{
// add input fields on the left:
- QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Distance:" ), group );
+ TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ new TQLabel( i18n( "Distance:" ), group );
m_distance = new KIntNumInput( group );
m_distance->setRange( -1000, 1000, 1, true );
m_distance->setValue( 2 );
- new QLabel( i18n( "Angle:" ), group );
+ new TQLabel( i18n( "Angle:" ), group );
m_angle = new KIntNumInput( group );
m_angle->setRange( 0, 360, 10, true );
m_angle->setValue( 0 );
- new QLabel( i18n( "Opacity:" ), group );
+ new TQLabel( i18n( "Opacity:" ), group );
m_opacity = new KIntNumInput( group );
m_opacity->setRange( 0, 100, 1, true );
m_opacity->setValue( 100 );
@@ -78,8 +78,8 @@ VShadowEffectDlg::VShadowEffectDlg( QWidget* parent, const char* name )
m_opacity->setSuffix(i18n("%"));
// signals and slots:
- connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) );
setMainWidget( group );
}
@@ -142,7 +142,7 @@ VCreateShadowCmd::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();
@@ -169,11 +169,11 @@ VCreateShadowCmd::execute()
if(newObject)
{
- // 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 );
}
}
diff --git a/karbon/plugins/shadoweffect/shadoweffectplugin.h b/karbon/plugins/shadoweffect/shadoweffectplugin.h
index 9a97da98..fc500bb7 100644
--- a/karbon/plugins/shadoweffect/shadoweffectplugin.h
+++ b/karbon/plugins/shadoweffect/shadoweffectplugin.h
@@ -31,8 +31,9 @@ class VShadowEffectDlg;
class ShadowEffectPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- ShadowEffectPlugin( KarbonView *parent, const char* name, const QStringList & );
+ ShadowEffectPlugin( KarbonView *tqparent, const char* name, const TQStringList & );
virtual ~ShadowEffectPlugin() {}
private slots:
@@ -47,9 +48,10 @@ class KIntNumInput;
class VShadowEffectDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VShadowEffectDlg( QWidget* parent = 0L, const char* name = 0L );
+ VShadowEffectDlg( TQWidget* tqparent = 0L, const char* name = 0L );
void setAngle( int );
void setDistance( int );
diff --git a/karbon/plugins/shadoweffect/vshadowdecorator.cc b/karbon/plugins/shadoweffect/vshadowdecorator.cc
index 238673ba..e6b2f378 100644
--- a/karbon/plugins/shadoweffect/vshadowdecorator.cc
+++ b/karbon/plugins/shadoweffect/vshadowdecorator.cc
@@ -26,8 +26,8 @@
#include <core/vselection.h>
#include <commands/vtransformcmd.h>
-VShadowDecorator::VShadowDecorator( VObject *object, VObject* parent, int distance, int angle, float opacity )
- : VObject( parent ), m_object( object ), m_distance( distance ), m_angle( angle ), m_opacity( opacity )
+VShadowDecorator::VShadowDecorator( VObject *object, VObject* tqparent, int distance, int angle, float opacity )
+ : VObject( tqparent ), m_object( object ), m_distance( distance ), m_angle( angle ), m_opacity( opacity )
{
}
@@ -64,12 +64,12 @@ VShadowDecorator::draw( VPainter* painter, const KoRect* rect ) const
VFill *fill = new VFill( *m_object->fill() );
VStroke *stroke = new VStroke( *m_object->stroke() );
- VColor black( Qt::black );
+ VColor black( TQt::black );
black.setOpacity( m_opacity );
if( m_object->fill()->type() != VFill::none )
m_object->fill()->setColor( black );
m_object->stroke()->setColor( black );
- QWMatrix mat = painter->worldMatrix();
+ TQWMatrix mat = painter->tqworldMatrix();
painter->setWorldMatrix( mat.translate( shadowDx * painter->zoomFactor(), -shadowDy * painter->zoomFactor()) );
m_object->draw( painter, rect );
m_object->setFill( *fill );
@@ -122,7 +122,7 @@ VShadowDecorator::setState( const VState state )
}
void
-VShadowDecorator::save( QDomElement& element ) const
+VShadowDecorator::save( TQDomElement& element ) const
{
if( m_state != VObject::deleted )
{
@@ -132,12 +132,12 @@ VShadowDecorator::save( QDomElement& element ) const
VObject *shadow = m_object->clone();
- VColor black( Qt::black );
+ VColor black( TQt::black );
black.setOpacity( m_opacity );
if( shadow->fill()->type() != VFill::none )
shadow->fill()->setColor( black );
shadow->stroke()->setColor( black );
- QWMatrix mat;
+ TQWMatrix mat;
mat.translate( shadowDx, -shadowDy );
VTransformCmd trafo( 0L, mat );
trafo.visit( *shadow );
diff --git a/karbon/plugins/shadoweffect/vshadowdecorator.h b/karbon/plugins/shadoweffect/vshadowdecorator.h
index 3ec57e88..0518baf7 100644
--- a/karbon/plugins/shadoweffect/vshadowdecorator.h
+++ b/karbon/plugins/shadoweffect/vshadowdecorator.h
@@ -29,7 +29,7 @@
class KARBONBASE_EXPORT VShadowDecorator : public VObject
{
public:
- VShadowDecorator( VObject* object, VObject* parent, int distance = 2, int angle = 0, float opacity = 1.0 );
+ VShadowDecorator( VObject* object, VObject* tqparent, int distance = 2, int angle = 0, float opacity = 1.0 );
VShadowDecorator( const VShadowDecorator& obj );
virtual ~VShadowDecorator();
@@ -44,8 +44,8 @@ public:
virtual void accept( VVisitor& /*visitor*/ );
- virtual void save( QDomElement& ) const;
- virtual void load( const QDomElement& ) {}
+ virtual void save( TQDomElement& ) const;
+ virtual void load( const TQDomElement& ) {}
virtual VObject* clone() const;
diff --git a/karbon/plugins/whirlpinch/whirlpinchplugin.cc b/karbon/plugins/whirlpinch/whirlpinchplugin.cc
index 5c6c716a..f26fd091 100644
--- a/karbon/plugins/whirlpinch/whirlpinchplugin.cc
+++ b/karbon/plugins/whirlpinch/whirlpinchplugin.cc
@@ -30,19 +30,19 @@
#include <kdebug.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
typedef KGenericFactory<WhirlPinchPlugin, KarbonView> WhirlPinchPluginFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_whirlpinchplugin, WhirlPinchPluginFactory( "karbonwhirlpinchplugin" ) )
-WhirlPinchPlugin::WhirlPinchPlugin( KarbonView *parent, const char* name, const QStringList & ) : Plugin( parent, name )
+WhirlPinchPlugin::WhirlPinchPlugin( KarbonView *tqparent, const char* name, const TQStringList & ) : Plugin( tqparent, name )
{
new KAction(
i18n( "&Whirl/Pinch..." ), "14_whirl", 0, this,
- SLOT( slotWhirlPinch() ), actionCollection(), "path_whirlpinch" );
+ TQT_SLOT( slotWhirlPinch() ), actionCollection(), "path_whirlpinch" );
m_whirlPinchDlg = new VWhirlPinchDlg();
m_whirlPinchDlg->setAngle( 20.0 );
@@ -53,28 +53,28 @@ WhirlPinchPlugin::WhirlPinchPlugin( KarbonView *parent, const char* name, const
void
WhirlPinchPlugin::slotWhirlPinch()
{
- KarbonPart *part = ((KarbonView *)parent())->part();
+ KarbonPart *part = ((KarbonView *)tqparent())->part();
if( part && m_whirlPinchDlg->exec() )
part->addCommand( new VWhirlPinchCmd( &part->document(), m_whirlPinchDlg->angle(), m_whirlPinchDlg->pinch(), m_whirlPinchDlg->radius() ), true );
}
-VWhirlPinchDlg::VWhirlPinchDlg( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Whirl Pinch" ), Ok | Cancel )
+VWhirlPinchDlg::VWhirlPinchDlg( TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Whirl Pinch" ), Ok | Cancel )
{
// add input fields:
- QGroupBox* group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox* group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Angle:" ), group );
+ new TQLabel( i18n( "Angle:" ), group );
m_angle = new KDoubleNumInput( group );
- new QLabel( i18n( "Pinch:" ), group );
+ new TQLabel( i18n( "Pinch:" ), group );
m_pinch = new KDoubleNumInput( group );
- new QLabel( i18n( "Radius:" ), group );
+ new TQLabel( i18n( "Radius:" ), group );
m_radius = new KDoubleNumInput( group );
group->setMinimumWidth( 300 );
// signals and slots:
- connect( this, SIGNAL( okClicked() ), this, SLOT( accept() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( reject() ) );
+ connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( accept() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( reject() ) );
setMainWidget( group );
setFixedSize( baseSize() );
@@ -143,7 +143,7 @@ VWhirlPinchCmd::visitVPath( VPath& composite )
void
VWhirlPinchCmd::visitVSubpath( VSubpath& path )
{
- QWMatrix m;
+ TQWMatrix m;
KoPoint delta;
double dist;
@@ -192,7 +192,7 @@ VWhirlPinchCmd::visitVSubpath( VSubpath& path )
}
// Invalidate bounding box once.
- path.invalidateBoundingBox();
+ path.tqinvalidateBoundingBox();
}
#include "whirlpinchplugin.moc"
diff --git a/karbon/plugins/whirlpinch/whirlpinchplugin.h b/karbon/plugins/whirlpinch/whirlpinchplugin.h
index ffbff5b2..215f9bcd 100644
--- a/karbon/plugins/whirlpinch/whirlpinchplugin.h
+++ b/karbon/plugins/whirlpinch/whirlpinchplugin.h
@@ -30,8 +30,9 @@ class VWhirlPinchDlg;
class WhirlPinchPlugin : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- WhirlPinchPlugin( KarbonView *parent, const char* name, const QStringList & );
+ WhirlPinchPlugin( KarbonView *tqparent, const char* name, const TQStringList & );
virtual ~WhirlPinchPlugin() {}
private slots:
@@ -46,9 +47,10 @@ class KDoubleNumInput;
class VWhirlPinchDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VWhirlPinchDlg( QWidget* parent = 0L, const char* name = 0L );
+ VWhirlPinchDlg( TQWidget* tqparent = 0L, const char* name = 0L );
double angle() const;
double pinch() const;
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();
};
diff --git a/karbon/render/art_rgb.c b/karbon/render/art_rgb.c
index 4d30fad4..6dd84bde 100644
--- a/karbon/render/art_rgb.c
+++ b/karbon/render/art_rgb.c
@@ -30,10 +30,10 @@
/* This is really slow. Is there any way we might speed it up?
Two ideas:
- First, maybe we should be working at 32-bit alignment. Then,
+ First, maybe we should be working at 32-bit tqalignment. Then,
this can be a simple loop over word stores.
- Second, we can keep working at 24-bit alignment, but have some
+ Second, we can keep working at 24-bit tqalignment, but have some
intelligence about storing. For example, we can iterate over
4-pixel chunks (aligned at 4 pixels), with an inner loop
something like:
@@ -100,7 +100,7 @@ art_rgb_fill_run_ (art_u8 *buf, art_u32 rgb, int n)
*buf++ = b;
}
} else {
- /* handle prefix up to byte alignment */
+ /* handle prefix up to byte tqalignment */
/* I'm worried about this cast on sizeof(long) != sizeof(uchar *)
architectures, but it _should_ work. */
for (i = 0; ((unsigned long)buf) & 3; i++)
diff --git a/karbon/render/art_rgb_svp.c b/karbon/render/art_rgb_svp.c
index 617f1abe..2052d2ff 100644
--- a/karbon/render/art_rgb_svp.c
+++ b/karbon/render/art_rgb_svp.c
@@ -120,7 +120,7 @@ art_rgb_svp_callback_ (void *callback_data, int y,
* @rowstride: Rowstride of @buf buffer.
* @alphagamma: #ArtAlphaGamma for gamma-correcting the rendering.
*
- * Renders the shape specified with @svp into the @buf RGB buffer.
+ * Renders the tqshape specified with @svp into the @buf RGB buffer.
* @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
* of the rectangle rendered. The new pixels are stored starting at
* the first byte of @buf. Thus, the @x0 and @y0 parameters specify
@@ -400,7 +400,7 @@ art_rgb_svp_alpha_opaque_callback_ (void *callback_data, int y,
* @rowstride: Rowstride of @buf buffer.
* @alphagamma: #ArtAlphaGamma for gamma-correcting the compositing.
*
- * Renders the shape specified with @svp over the @buf RGB buffer.
+ * Renders the tqshape specified with @svp over the @buf RGB buffer.
* @x1 - @x0 specifies the width, and @y1 - @y0 specifies the height,
* of the rectangle rendered. The new pixels are stored starting at
* the first byte of @buf. Thus, the @x0 and @y0 parameters specify
diff --git a/karbon/render/vkopainter.cc b/karbon/render/vkopainter.cc
index 21ab911c..98ae826e 100644
--- a/karbon/render/vkopainter.cc
+++ b/karbon/render/vkopainter.cc
@@ -25,10 +25,10 @@
#include "vcolor.h"
#include "vpattern.h"
-#include <qpaintdevice.h>
-#include <qpixmap.h>
-#include <qpointarray.h>
-#include <qimage.h>
+#include <tqpaintdevice.h>
+#include <tqpixmap.h>
+#include <tqpointarray.h>
+#include <tqimage.h>
#include "libart_lgpl/art_vpath.h"
#include <libart_lgpl/art_bpath.h>
@@ -67,7 +67,7 @@
#define INITIAL_ALLOC 300
#define ALLOC_INCREMENT 100
-VKoPainter::VKoPainter( QPaintDevice *target, unsigned int w, unsigned int h, bool bDrawNodes )
+VKoPainter::VKoPainter( TQPaintDevice *target, unsigned int w, unsigned int h, bool bDrawNodes )
: VPainter( target, w, h ), m_target( target ), m_bDrawNodes( bDrawNodes )
{
//kdDebug(38000) << "w : " << w << endl;
@@ -180,18 +180,18 @@ void
VKoPainter::clear()
{
if( m_buffer )
- memset( m_buffer, qRgba( 255, 255, 255, 255 ), m_width * m_height * 4 );
+ memset( m_buffer, tqRgba( 255, 255, 255, 255 ), m_width * m_height * 4 );
}
void
-VKoPainter::clear( const QColor &c )
+VKoPainter::clear( const TQColor &c )
{
if( m_buffer )
memset( m_buffer, c.rgb(), m_width * m_height * 4 );
}
void
-VKoPainter::clear( const KoRect &r, const QColor &c )
+VKoPainter::clear( const KoRect &r, const TQColor &c )
{
unsigned int color = c.rgb();
int x = KMAX( 0, int( r.x() ) );
@@ -202,12 +202,12 @@ VKoPainter::clear( const KoRect &r, const QColor &c )
{
for( int i = y;i < height;i++)
memset( m_buffer + int( x * 4) + int( i * ( m_width * 4 ) ),
- qRgba( qRed( color ), qGreen( color ), qBlue( color ), 100 ), int( width * 4 ) );
+ tqRgba( tqRed( color ), tqGreen( color ), tqBlue( color ), 100 ), int( width * 4 ) );
}
}
void
-VKoPainter::setWorldMatrix( const QWMatrix &mat )
+VKoPainter::setWorldMatrix( const TQWMatrix &mat )
{
m_matrix = mat;
}
@@ -293,25 +293,25 @@ VKoPainter::fillPath()
if( m_index == 0 ) return;
// find begin of last subpath
- int find = -1;
+ int tqfind = -1;
for( int i = m_index - 1; i >= 0; i-- )
{
if( m_path[i].code == ART_MOVETO_OPEN || m_path[i].code == ART_MOVETO )
{
- find = i;
+ tqfind = i;
break;
}
}
// for now, always close
- if( find != -1 && ( m_path[ find ].x3 != m_path[ m_index - 1 ].x3 ||
- m_path[ find ].y3 != m_path[ m_index - 1 ].y3 ) )
+ if( tqfind != -1 && ( m_path[ tqfind ].x3 != m_path[ m_index - 1 ].x3 ||
+ m_path[ tqfind ].y3 != m_path[ m_index - 1 ].y3 ) )
{
ensureSpace( m_index + 1 );
m_path[ m_index ].code = ART_LINETO;
- m_path[ m_index ].x3 = m_path[ find ].x3;
- m_path[ m_index ].y3 = m_path[ find ].y3;
+ m_path[ m_index ].x3 = m_path[ tqfind ].x3;
+ m_path[ m_index ].y3 = m_path[ tqfind ].y3;
m_index++;
m_path[ m_index ].code = ART_END;
@@ -368,7 +368,7 @@ VKoPainter::setPen( const VStroke &stroke )
}
void
-VKoPainter::setPen( const QColor &c )
+VKoPainter::setPen( const TQColor &c )
{
delete m_stroke;
m_stroke = new VStroke;
@@ -385,7 +385,7 @@ VKoPainter::setPen( const QColor &c )
void
VKoPainter::setPen( Qt::PenStyle style )
{
- if( style == Qt::NoPen )
+ if( style == TQt::NoPen )
{
delete m_stroke;
m_stroke = 0L;
@@ -393,7 +393,7 @@ VKoPainter::setPen( Qt::PenStyle style )
}
void
-VKoPainter::setBrush( const QColor &c )
+VKoPainter::setBrush( const TQColor &c )
{
delete m_fill;
m_fill = new VFill;
@@ -408,9 +408,9 @@ VKoPainter::setBrush( const QColor &c )
}
void
-VKoPainter::setBrush( Qt::BrushStyle style )
+VKoPainter::setBrush( TQt::BrushStyle style )
{
- if( style == Qt::NoBrush )
+ if( style == TQt::NoBrush )
{
delete m_fill;
m_fill = 0L;
@@ -436,7 +436,7 @@ VKoPainter::restore()
}
void
-VKoPainter::setRasterOp( Qt::RasterOp )
+VKoPainter::setRasterOp( TQt::RasterOp )
{
}
@@ -501,11 +501,11 @@ VKoPainter::drawVPath( ArtVpath *vec )
art_u32 fillColor = 0;
// filling
- QColor color;
+ TQColor color;
if( m_fill && m_fill->type() != VFill::none )
{
color = m_fill->color();
- af = qRound( 255 * m_fill->color().opacity() );
+ af = tqRound( 255 * m_fill->color().opacity() );
fillColor = ( 0 << 24 ) | ( color.blue() << 16 ) | ( color.green() << 8 ) | color.red();
ArtSvpWriter *swr;
@@ -532,7 +532,7 @@ VKoPainter::drawVPath( ArtVpath *vec )
// TODO : non rgb support ?
color = m_stroke->color();
- as = qRound( 255 * m_stroke->color().opacity() );
+ as = tqRound( 255 * m_stroke->color().opacity() );
strokeColor = ( 0 << 24 ) | ( color.blue() << 16 ) | ( color.green() << 8 ) | color.red();
double ratio = m_zoomFactor;//sqrt(pow(affine[0], 2) + pow(affine[3], 2)) / sqrt(2);
@@ -809,7 +809,7 @@ ArtGradientStop *
VKoPainter::buildStopArray( VGradient &gradient, int &offsets )
{
// TODO : make this generic
- QPtrVector<VColorStop> colorStops = gradient.colorStops();
+ TQPtrVector<VColorStop> colorStops = gradient.colorStops();
offsets = colorStops.count();
ArtGradientStop *stopArray = art_new( ArtGradientStop, offsets * 2 - 1 );
@@ -820,11 +820,11 @@ VKoPainter::buildStopArray( VGradient &gradient, int &offsets )
//double mid = colorStops[ offset ]->midPoint;
stopArray[ offset * 2 ].offset = ramp;
- QColor qStopColor = colorStops[ offset ]->color;
- int r = qRed( qStopColor.rgb() );
- int g = qGreen( qStopColor.rgb() );
- int b = qBlue( qStopColor.rgb() );
- art_u32 rgba = (r << 24) | (g << 16) | (b << 8) | qAlpha(qStopColor.rgb());
+ TQColor qStopColor = colorStops[ offset ]->color;
+ int r = tqRed( qStopColor.rgb() );
+ int g = tqGreen( qStopColor.rgb() );
+ int b = tqBlue( qStopColor.rgb() );
+ art_u32 rgba = (r << 24) | (g << 16) | (b << 8) | tqAlpha(qStopColor.rgb());
/* convert from separated to premultiplied alpha */
int a = int( colorStops[ offset]->color.opacity() * 255.0 );
r = (rgba >> 24) * a + 0x80;
@@ -842,11 +842,11 @@ VKoPainter::buildStopArray( VGradient &gradient, int &offsets )
{
stopArray[ offset * 2 + 1 ].offset = ramp + ( colorStops[ offset + 1 ]->rampPoint - ramp ) * colorStops[ offset ]->midPoint;
- QColor qStopColor2 = colorStops[ offset + 1 ]->color;
- rgba = int(r + ((qRed(qStopColor2.rgb()) - r)) * 0.5) << 24 |
- int(g + ((qGreen(qStopColor2.rgb()) - g)) * 0.5) << 16 |
- int(b + ((qBlue(qStopColor2.rgb()) - b)) * 0.5) << 8 |
- qAlpha(qStopColor2.rgb());
+ TQColor qStopColor2 = colorStops[ offset + 1 ]->color;
+ rgba = int(r + ((tqRed(qStopColor2.rgb()) - r)) * 0.5) << 24 |
+ int(g + ((tqGreen(qStopColor2.rgb()) - g)) * 0.5) << 16 |
+ int(b + ((tqBlue(qStopColor2.rgb()) - b)) * 0.5) << 8 |
+ tqAlpha(qStopColor2.rgb());
/* convert from separated to premultiplied alpha */
int a = int( colorStops[ offset]->color.opacity() * 255.0 );
r = (rgba >> 24) * a + 0x80;
@@ -871,7 +871,7 @@ VKoPainter::drawNode( const KoPoint& p, int width )
{
if( !m_bDrawNodes ) return;
- KoPoint _p( m_matrix.map( QPoint( int( p.x() * m_zoomFactor ), int( p.y() * m_zoomFactor ) ) ) );
+ KoPoint _p( m_matrix.map( TQPoint( int( p.x() * m_zoomFactor ), int( p.y() * m_zoomFactor ) ) ) );
int x1 = int( _p.x() - width );
int x2 = int( _p.x() + width );
int y1 = int( _p.y() - width );
@@ -881,7 +881,7 @@ VKoPainter::drawNode( const KoPoint& p, int width )
int baseindex = 4 * x1 + ( m_width * 4 * y1 );
- QColor color = m_fill->color();
+ TQColor color = m_fill->color();
for( int i = 0; i < y2 - y1; i++ )
{
for( int j = 0; j < x2 - x1; j++ )
@@ -895,7 +895,7 @@ VKoPainter::drawNode( const KoPoint& p, int width )
}
void
-VKoPainter::drawImage( const QImage &image, const QWMatrix &affine )
+VKoPainter::drawImage( const TQImage &image, const TQWMatrix &affine )
{
// set up world matrix
double affineresult[6];
diff --git a/karbon/render/vkopainter.h b/karbon/render/vkopainter.h
index 48336092..75ac0bd1 100644
--- a/karbon/render/vkopainter.h
+++ b/karbon/render/vkopainter.h
@@ -23,10 +23,10 @@
// kopainter/libart wrapper
#include "vpainter.h"
-#include <qwmatrix.h>
-#include <qptrlist.h>
+#include <tqwmatrix.h>
+#include <tqptrlist.h>
#include <koffice_export.h>
-class QPainter;
+class TQPainter;
struct _ArtVpath;
struct _ArtBpath;
struct _ArtSVP;
@@ -38,7 +38,7 @@ class KoRect;
class KARBONBASE_EXPORT VKoPainter : public VPainter
{
public:
- VKoPainter( QPaintDevice *target, unsigned int w = 0, unsigned int h = 0, bool = true );
+ VKoPainter( TQPaintDevice *target, unsigned int w = 0, unsigned int h = 0, bool = true );
VKoPainter( unsigned char *buffer, unsigned int w = 0, unsigned int h = 0, bool = true );
virtual ~VKoPainter();
@@ -47,12 +47,12 @@ public:
virtual void end();
virtual void blit( const KoRect & );
void clear();
- virtual void clear( const QColor & );
- virtual void clear( const KoRect &, const QColor & );
+ virtual void clear( const TQColor & );
+ virtual void clear( const KoRect &, const TQColor & );
// matrix manipulation
- virtual void setWorldMatrix( const QWMatrix & );
- virtual const QWMatrix worldMatrix() { return m_matrix; }
+ virtual void setWorldMatrix( const TQWMatrix & );
+ virtual const TQWMatrix tqworldMatrix() { return m_matrix; }
virtual void setZoomFactor( double );
virtual double zoomFactor() { return m_zoomFactor; }
@@ -74,22 +74,22 @@ public:
// pen + brush
virtual void setPen( const VStroke & );
- virtual void setPen( const QColor & );
+ virtual void setPen( const TQColor & );
virtual void setPen( Qt::PenStyle style );
virtual void setBrush( const VFill & );
- virtual void setBrush( const QColor & );
- virtual void setBrush( Qt::BrushStyle style );
+ virtual void setBrush( const TQColor & );
+ virtual void setBrush( TQt::BrushStyle style );
- virtual void drawImage( const QImage &, const QWMatrix & );
+ virtual void drawImage( const TQImage &, const TQWMatrix & );
// stack management
virtual void save();
virtual void restore();
//
- virtual void setRasterOp( Qt::RasterOp );
+ virtual void setRasterOp( TQt::RasterOp );
- virtual QPaintDevice *device() { return m_target; }
+ virtual TQPaintDevice *device() { return m_target; }
unsigned char *buffer() { return m_buffer; }
private:
@@ -106,15 +106,15 @@ private:
unsigned int m_index;
unsigned int m_alloccount;
unsigned char *m_buffer;
- QPaintDevice *m_target;
+ TQPaintDevice *m_target;
unsigned int m_width;
unsigned int m_height;
- QWMatrix m_matrix;
+ TQWMatrix m_matrix;
VStroke *m_stroke;
VFill *m_fill;
VFillRule m_fillRule;
double m_zoomFactor;
- QPtrList<_ArtSVP> m_clipPaths;
+ TQPtrList<_ArtSVP> m_clipPaths;
bool m_bDrawNodes;
diff --git a/karbon/render/vpainter.h b/karbon/render/vpainter.h
index b638ddcc..84ad9d13 100644
--- a/karbon/render/vpainter.h
+++ b/karbon/render/vpainter.h
@@ -24,16 +24,16 @@
// painter abstraction
-#include <qnamespace.h>
+#include <tqnamespace.h>
#include <KoRect.h>
#include <vfillrule.h>
-class QWMatrix;
-class QPaintDevice;
-class QColor;
-class QPen;
-class QBrush;
-class QImage;
+class TQWMatrix;
+class TQPaintDevice;
+class TQColor;
+class TQPen;
+class TQBrush;
+class TQImage;
class VStroke;
class VFill;
@@ -44,7 +44,7 @@ class KoRect;
class VPainter
{
public:
- VPainter( QPaintDevice *, unsigned int /*w*/ = 0, unsigned int /*h*/ = 0 ) {};
+ VPainter( TQPaintDevice *, unsigned int /*w*/ = 0, unsigned int /*h*/ = 0 ) {};
virtual ~VPainter() {};
//
@@ -52,12 +52,12 @@ public:
virtual void begin() = 0;
virtual void end() = 0;
virtual void blit( const KoRect & ) = 0;
- virtual void clear( const QColor & ) = 0;
- virtual void clear( const KoRect &, const QColor & ) = 0;
+ virtual void clear( const TQColor & ) = 0;
+ virtual void clear( const KoRect &, const TQColor & ) = 0;
// matrix manipulation
- virtual void setWorldMatrix( const QWMatrix & ) = 0;
- virtual const QWMatrix worldMatrix() = 0;
+ virtual void setWorldMatrix( const TQWMatrix & ) = 0;
+ virtual const TQWMatrix tqworldMatrix() = 0;
virtual void setZoomFactor( double ) = 0;
virtual double zoomFactor() { return 1.0; }
@@ -80,23 +80,23 @@ public:
// pen + brush
virtual void setPen( const VStroke & ) = 0;
// compatibility, use VPen/VBrush later ?
- virtual void setPen( const QColor & ) = 0;
+ virtual void setPen( const TQColor & ) = 0;
virtual void setPen( Qt::PenStyle style ) = 0;
virtual void setBrush( const VFill & ) = 0;
- virtual void setBrush( const QColor & ) = 0;
- virtual void setBrush( Qt::BrushStyle style ) = 0;
+ virtual void setBrush( const TQColor & ) = 0;
+ virtual void setBrush( TQt::BrushStyle style ) = 0;
- virtual void drawImage( const QImage &, const QWMatrix & ) {}
+ virtual void drawImage( const TQImage &, const TQWMatrix & ) {}
// stack management
virtual void save() = 0;
virtual void restore() = 0;
// we have to see how this fits in
- virtual void setRasterOp( Qt::RasterOp ) = 0;
+ virtual void setRasterOp( TQt::RasterOp ) = 0;
// access to device
- virtual QPaintDevice *device() = 0;
+ virtual TQPaintDevice *device() = 0;
};
#endif
diff --git a/karbon/render/vpainterfactory.cc b/karbon/render/vpainterfactory.cc
index a4d52c62..2d36882d 100644
--- a/karbon/render/vpainterfactory.cc
+++ b/karbon/render/vpainterfactory.cc
@@ -43,7 +43,7 @@ VPainterFactory::painter()
}
void
-VPainterFactory::setPainter( QPaintDevice *target, int w, int h )
+VPainterFactory::setPainter( TQPaintDevice *target, int w, int h )
{
if( m_painter )
delete m_painter;
@@ -57,18 +57,18 @@ VPainterFactory::editpainter()
}
void
-VPainterFactory::setEditPainter( QPaintDevice *target, int w, int h )
+VPainterFactory::setEditPainter( TQPaintDevice *target, int w, int h )
{
if( m_editpainter )
delete m_editpainter;
- m_editpainter = new VQPainter( target, w, h );
+ m_editpainter = new VTQPainter( target, w, h );
}
void
-VPainterFactory::setWireframePainter( QPaintDevice *target, int w, int h )
+VPainterFactory::setWireframePainter( TQPaintDevice *target, int w, int h )
{
if( m_painter )
delete m_painter;
- m_painter = new VQPainter( target, w, h );
+ m_painter = new VTQPainter( target, w, h );
}
diff --git a/karbon/render/vpainterfactory.h b/karbon/render/vpainterfactory.h
index df36819d..58695ba7 100644
--- a/karbon/render/vpainterfactory.h
+++ b/karbon/render/vpainterfactory.h
@@ -24,7 +24,7 @@
// painter factory
#include <koffice_export.h>
class VPainter;
-class QPaintDevice;
+class TQPaintDevice;
class KARBONBASE_EXPORT VPainterFactory
{
@@ -33,12 +33,12 @@ public:
~VPainterFactory();
VPainter *painter();
- void setPainter( QPaintDevice *target, int w = 0, int h = 0 );
+ void setPainter( TQPaintDevice *target, int w = 0, int h = 0 );
VPainter *editpainter();
- void setEditPainter( QPaintDevice *target, int w = 0, int h = 0 );
+ void setEditPainter( TQPaintDevice *target, int w = 0, int h = 0 );
- void setWireframePainter( QPaintDevice *target, int w = 0, int h = 0 );
+ void setWireframePainter( TQPaintDevice *target, int w = 0, int h = 0 );
private:
VPainter *m_painter;
diff --git a/karbon/render/vqpainter.cc b/karbon/render/vqpainter.cc
index 31e5593e..7f380287 100644
--- a/karbon/render/vqpainter.cc
+++ b/karbon/render/vqpainter.cc
@@ -25,47 +25,47 @@
#include "vcolor.h"
#include "vfill.h"
-#include <qpainter.h>
-#include <qpaintdevice.h>
-#include <qpen.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
+#include <tqpen.h>
#include <KoPoint.h>
#include <kdebug.h>
-VQPainter::VQPainter( QPaintDevice *target, unsigned int w, unsigned int h ) : VPainter( target, w, h ), m_painter( 0L ), m_target( target ), m_width( w ), m_height( h )
+VTQPainter::VTQPainter( TQPaintDevice *target, unsigned int w, unsigned int h ) : VPainter( target, w, h ), m_painter( 0L ), m_target( target ), m_width( w ), m_height( h )
{
m_zoomFactor = 1;
m_index = 0;
- m_painter = new QPainter( target );
+ m_painter = new TQPainter( target );
}
-VQPainter::~VQPainter()
+VTQPainter::~VTQPainter()
{
delete m_painter;
}
void
-VQPainter::resize( unsigned int w, unsigned int h )
+VTQPainter::resize( unsigned int w, unsigned int h )
{
m_width = w;
m_height = h;
}
void
-VQPainter::blit( const KoRect & )
+VTQPainter::blit( const KoRect & )
{
end();
}
void
-VQPainter::clear( const QColor &c )
+VTQPainter::clear( const TQColor &c )
{
m_painter->setBackgroundColor( c );
m_painter->eraseRect( 0, 0, m_width, m_height );
}
void
-VQPainter::begin()
+VTQPainter::begin()
{
if( !m_painter->isActive() )
{
@@ -75,34 +75,34 @@ VQPainter::begin()
}
void
-VQPainter::end()
+VTQPainter::end()
{
m_painter->end();
}
-const QWMatrix
-VQPainter::worldMatrix()
+const TQWMatrix
+VTQPainter::tqworldMatrix()
{
- return m_painter->worldMatrix();
+ return m_painter->tqworldMatrix();
}
void
-VQPainter::setWorldMatrix( const QWMatrix& mat )
+VTQPainter::setWorldMatrix( const TQWMatrix& mat )
{
m_painter->setWorldMatrix( mat );
}
void
-VQPainter::setZoomFactor( double zoomFactor )
+VTQPainter::setZoomFactor( double zoomFactor )
{
m_zoomFactor = zoomFactor;
- /*QWMatrix mat;
+ /*TQWMatrix mat;
mat.scale( zoomFactor, zoomFactor );
m_painter->setWorldMatrix( mat );*/
}
void
-VQPainter::moveTo( const KoPoint &p )
+VTQPainter::moveTo( const KoPoint &p )
{
//m_index = 0;
if( m_pa.size() <= m_index )
@@ -114,7 +114,7 @@ VQPainter::moveTo( const KoPoint &p )
}
void
-VQPainter::lineTo( const KoPoint &p )
+VTQPainter::lineTo( const KoPoint &p )
{
if( m_pa.size() <= m_index )
m_pa.resize( m_index + 10 );
@@ -125,16 +125,16 @@ VQPainter::lineTo( const KoPoint &p )
}
void
-VQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 )
+VTQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 )
{
- // calculate cubic bezier using a temp QPointArray
- QPointArray pa( 4 );
+ // calculate cubic bezier using a temp TQPointArray
+ TQPointArray pa( 4 );
pa.setPoint( 0, m_pa.point( m_index - 1 ).x(), m_pa.point( m_index - 1 ).y() );
pa.setPoint( 1, static_cast<int>(p1.x() * m_zoomFactor), static_cast<int>(p1.y() * m_zoomFactor) );
pa.setPoint( 2, static_cast<int>(p2.x() * m_zoomFactor), static_cast<int>(p2.y() * m_zoomFactor) );
pa.setPoint( 3, static_cast<int>(p3.x() * m_zoomFactor), static_cast<int>(p3.y() * m_zoomFactor) );
- QPointArray pa2( pa.cubicBezier() );
+ TQPointArray pa2( pa.cubicBezier() );
m_pa.resize( m_index + pa2.size() );
m_pa.putPoints( m_index, pa2.size(), pa2 );
@@ -143,30 +143,30 @@ VQPainter::curveTo( const KoPoint &p1, const KoPoint &p2, const KoPoint &p3 )
}
void
-VQPainter::newPath()
+VTQPainter::newPath()
{
m_index = 0;
}
void
-VQPainter::fillPath()
+VTQPainter::fillPath()
{
// we probably dont need filling for qpainter
//m_index = 0;
- m_painter->drawPolygon( m_pa, FALSE, 0, m_index );
+ m_painter->tqdrawPolygon( m_pa, FALSE, 0, m_index );
}
void
-VQPainter::strokePath()
+VTQPainter::strokePath()
{
- m_painter->drawPolyline( m_pa, 0, m_index );
+ m_painter->tqdrawPolyline( m_pa, 0, m_index );
m_index = 0;
}
void
-VQPainter::setPen( const VStroke &stroke )
+VTQPainter::setPen( const VStroke &stroke )
{
- QPen pen;
+ TQPen pen;
// color + linewidth
pen.setColor( stroke.color() );
@@ -184,23 +184,23 @@ VQPainter::setPen( const VStroke &stroke )
}
void
-VQPainter::setBrush( const VFill &fill )
+VTQPainter::setBrush( const VFill &fill )
{
switch( fill.type() )
{
case VFill::none:
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
break;
case VFill::solid:
- m_painter->setBrush( QBrush( fill.color(), Qt::SolidPattern ) );
+ m_painter->setBrush( TQBrush( fill.color(), TQt::SolidPattern ) );
break;
case VFill::grad:
// gradients are nor supported by qpainter
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
break;
case VFill::patt:
// pixmap brushes not supported for printing
- m_painter->setBrush( QBrush( fill.color(), fill.pattern().pixmap() ) );
+ m_painter->setBrush( TQBrush( fill.color(), fill.pattern().pixmap() ) );
break;
default:
break;
@@ -208,64 +208,64 @@ VQPainter::setBrush( const VFill &fill )
}
void
-VQPainter::setPen( const QColor &c )
+VTQPainter::setPen( const TQColor &c )
{
m_painter->setPen( c );
}
void
-VQPainter::setPen( Qt::PenStyle style )
+VTQPainter::setPen( Qt::PenStyle style )
{
m_painter->setPen( style );
}
void
-VQPainter::setBrush( const QColor &c )
+VTQPainter::setBrush( const TQColor &c )
{
m_painter->setBrush( c );
}
void
-VQPainter::setBrush( Qt::BrushStyle style )
+VTQPainter::setBrush( TQt::BrushStyle style )
{
m_painter->setBrush( style );
}
void
-VQPainter::save()
+VTQPainter::save()
{
m_painter->save();
}
void
-VQPainter::restore()
+VTQPainter::restore()
{
m_painter->restore();
}
void
-VQPainter::setRasterOp( Qt::RasterOp r )
+VTQPainter::setRasterOp( TQt::RasterOp r )
{
m_painter->setRasterOp( r );
}
void
-VQPainter::drawNode( const KoPoint &p, int width )
+VTQPainter::drawNode( const KoPoint &p, int width )
{
- m_painter->drawRect( QRect( int( p.x() * m_zoomFactor ) - width, int( p.y() * m_zoomFactor ) - width,
+ m_painter->drawRect( TQRect( int( p.x() * m_zoomFactor ) - width, int( p.y() * m_zoomFactor ) - width,
2 * width + 1, 2 * width + 1 ) );
}
void
-VQPainter::drawRect( const KoRect &rect )
+VTQPainter::drawRect( const KoRect &rect )
{
- m_painter->drawRect( QRect( int( rect.x() ), int( rect.y() ), int( rect.width() ), int( rect.height() ) ) );
+ m_painter->drawRect( TQRect( int( rect.x() ), int( rect.y() ), int( rect.width() ), int( rect.height() ) ) );
}
void
-VQPainter::drawImage( const QImage &image, const QWMatrix &affine )
+VTQPainter::drawImage( const TQImage &image, const TQWMatrix &affine )
{
- QWMatrix matrix = m_painter->worldMatrix();
+ TQWMatrix matrix = m_painter->tqworldMatrix();
double m11 = affine.m11() * matrix.m11() * m_zoomFactor + affine.m12() * matrix.m21();
double m12 = (affine.m11() * matrix.m12() + affine.m12() * matrix.m22() ) * m_zoomFactor;
@@ -274,11 +274,11 @@ VQPainter::drawImage( const QImage &image, const QWMatrix &affine )
double dx = matrix.dx() + affine.dx() * m_zoomFactor;
double dy = matrix.dy() - affine.dy() * m_zoomFactor;
- QWMatrix world( m11, m12, m21, m22, dx, dy );
+ TQWMatrix world( m11, m12, m21, m22, dx, dy );
m_painter->setWorldMatrix( world );
- m_painter->drawImage( QPoint( 0, 0 ), image );
+ m_painter->drawImage( TQPoint( 0, 0 ), image );
// restore old world matrix
m_painter->setWorldMatrix( matrix );
}
diff --git a/karbon/render/vqpainter.h b/karbon/render/vqpainter.h
index 7f4f501b..d1a556db 100644
--- a/karbon/render/vqpainter.h
+++ b/karbon/render/vqpainter.h
@@ -18,33 +18,33 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __VQPAINTER_H__
-#define __VQPAINTER_H__
+#ifndef __VTQPAINTER_H__
+#define __VTQPAINTER_H__
// qpainter wrapper
#include "vpainter.h"
-#include "qpointarray.h"
+#include "tqpointarray.h"
-class QPainter;
+class TQPainter;
-class VQPainter : public VPainter
+class VTQPainter : public VPainter
{
public:
- VQPainter( QPaintDevice *target, unsigned int w = 0, unsigned int h = 0 );
- virtual ~VQPainter();
+ VTQPainter( TQPaintDevice *target, unsigned int w = 0, unsigned int h = 0 );
+ virtual ~VTQPainter();
//
virtual void resize( unsigned int w, unsigned int h );
virtual void begin();
virtual void end();
virtual void blit( const KoRect & );
- virtual void clear( const QColor & );
- virtual void clear( const KoRect &, const QColor & ) {}
+ virtual void clear( const TQColor & );
+ virtual void clear( const KoRect &, const TQColor & ) {}
// matrix manipulation
- virtual void setWorldMatrix( const QWMatrix & );
- virtual const QWMatrix worldMatrix();
+ virtual void setWorldMatrix( const TQWMatrix & );
+ virtual const TQWMatrix tqworldMatrix();
virtual void setZoomFactor( double );
virtual double zoomFactor() { return m_zoomFactor; }
@@ -61,13 +61,13 @@ public:
// pen + brush
virtual void setPen( const VStroke & );
- virtual void setPen( const QColor & );
+ virtual void setPen( const TQColor & );
virtual void setPen( Qt::PenStyle style );
virtual void setBrush( const VFill & );
- virtual void setBrush( const QColor & );
- virtual void setBrush( Qt::BrushStyle style );
+ virtual void setBrush( const TQColor & );
+ virtual void setBrush( TQt::BrushStyle style );
- virtual void drawImage( const QImage &, const QWMatrix & );
+ virtual void drawImage( const TQImage &, const TQWMatrix & );
// stack management
virtual void save();
@@ -78,16 +78,16 @@ public:
virtual void drawRect( const KoRect & );
//
- virtual void setRasterOp( Qt::RasterOp );
+ virtual void setRasterOp( TQt::RasterOp );
- virtual QPaintDevice *device() { return m_target; }
+ virtual TQPaintDevice *device() { return m_target; }
private:
double m_zoomFactor;
unsigned int m_index;
- QPointArray m_pa;
- QPainter *m_painter;
- QPaintDevice *m_target;
+ TQPointArray m_pa;
+ TQPainter *m_painter;
+ TQPaintDevice *m_target;
unsigned int m_width;
unsigned int m_height;
};
diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c
index 7e955610..bbafa393 100644
--- a/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c
+++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib-drawable.c
@@ -1103,24 +1103,24 @@ xlib_window_is_viewable (Window w)
XWindowAttributes wa;
while (w != 0) {
- Window parent, root, *children;
- int nchildren;
+ Window tqparent, root, *tqchildren;
+ int ntqchildren;
XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
if (wa.map_state != IsViewable)
return 0;
if (!XQueryTree (gdk_pixbuf_dpy, w, &root,
- &parent, &children, &nchildren))
+ &tqparent, &tqchildren, &ntqchildren))
return 0;
- if (nchildren > 0)
- XFree (children);
+ if (ntqchildren > 0)
+ XFree (tqchildren);
- if (parent == root)
+ if (tqparent == root)
return 1;
- w = parent;
+ w = tqparent;
}
return 0;
diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c b/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c
index f2439138..f8f890e3 100644
--- a/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c
+++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib-render.c
@@ -31,7 +31,7 @@
**
* gdk_pixbuf_xlib_render_threshold_alpha:
* @pixbuf: A pixbuf.
- * @bitmap: Bitmap where the bilevel mask will be painted to.
+ * @bitmap: Bitmap where the bilevel tqmask will be painted to.
* @src_x: Source X coordinate.
* @src_y: source Y coordinate.
* @dest_x: Destination X coordinate.
@@ -42,7 +42,7 @@
* other values will be painted as one.
*
* Takes the opacity values in a rectangular portion of a pixbuf and thresholds
- * them to produce a bi-level alpha mask that can be used as a clipping mask for
+ * them to produce a bi-level alpha tqmask that can be used as a clipping tqmask for
* a drawable.
*
void
@@ -177,7 +177,7 @@ remove_alpha (GdkPixbuf *pixbuf, int x, int y, int width, int height, int *rowst
* specified GC. This is done using XlibRGB, so the specified drawable must
* have the XlibRGB visual and colormap. Note that this function will ignore
* the opacity information for images with an alpha channel; the GC must already
- * have the clipping mask set if you want transparent regions to show through.
+ * have the clipping tqmask set if you want transparent regions to show through.
*
* For an explanation of dither offsets, see the XlibRGB documentation. In
* brief, the dither offset is important when re-rendering partial regions of an
@@ -255,7 +255,7 @@ gdk_pixbuf_xlib_render_to_drawable (GdkPixbuf *pixbuf,
*
* When used with #GDK_PIXBUF_ALPHA_BILEVEL, this function has to create a bitmap
* out of the thresholded alpha channel of the image and, it has to set this
- * bitmap as the clipping mask for the GC used for drawing. This can be a
+ * bitmap as the clipping tqmask for the GC used for drawing. This can be a
* significant performance penalty depending on the size and the complexity of
* the alpha channel of the image. If performance is crucial, consider handling
* the alpha channel yourself (possibly by caching it in your application) and
@@ -320,23 +320,23 @@ gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf, Drawable drawable,
* @pixbuf: A pixbuf.
* @pixmap_return: Return value for the created pixmap.
- * @mask_return: Return value for the created mask.
+ * @tqmask_return: Return value for the created tqmask.
* @alpha_threshold: Threshold value for opacity values.
*
- * Creates a pixmap and a mask bitmap which are returned in the @pixmap_return
- * and @mask_return arguments, respectively, and renders a pixbuf and its
- * corresponding tresholded alpha mask to them. This is merely a convenience
+ * Creates a pixmap and a tqmask bitmap which are returned in the @pixmap_return
+ * and @tqmask_return arguments, respectively, and renders a pixbuf and its
+ * corresponding tresholded alpha tqmask to them. This is merely a convenience
* function; applications that need to render pixbufs with dither offsets or to
* given drawables should use gdk_pixbuf_xlib_render_to_drawable_alpha() or
* gdk_pixbuf_xlib_render_to_drawable(), and
* gdk_pixbuf_xlib_render_threshold_alpha().
*
- * If the pixbuf does not have an alpha channel, then *@mask_return will be set
+ * If the pixbuf does not have an alpha channel, then *@tqmask_return will be set
* to None.
void
-gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
+gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf,
Pixmap *pixmap_return,
- Pixmap *mask_return,
+ Pixmap *tqmask_return,
int alpha_threshold)
{
g_return_if_fail (pixbuf != NULL);
@@ -361,20 +361,20 @@ gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
XFreeGC (gdk_pixbuf_dpy, gc);
}
- if (mask_return) {
+ if (tqmask_return) {
if (pixbuf->has_alpha) {
- *mask_return = XCreatePixmap (gdk_pixbuf_dpy,
+ *tqmask_return = XCreatePixmap (gdk_pixbuf_dpy,
RootWindow (gdk_pixbuf_dpy,
gdk_pixbuf_screen),
pixbuf->width,
pixbuf->height, 1);
gdk_pixbuf_xlib_render_threshold_alpha (pixbuf,
- *mask_return,
+ *tqmask_return,
0, 0, 0, 0,
pixbuf->width,
pixbuf->height,
alpha_threshold);
} else
- *mask_return = 0;
+ *tqmask_return = 0;
}
}*/
diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlib.h b/karbon/render/xrgbrender/gdk-pixbuf-xlib.h
index 2b31ed7e..26d2426a 100644
--- a/karbon/render/xrgbrender/gdk-pixbuf-xlib.h
+++ b/karbon/render/xrgbrender/gdk-pixbuf-xlib.h
@@ -63,9 +63,9 @@ void gdk_pixbuf_xlib_render_to_drawable_alpha (GdkPixbuf *pixbuf,
XlibRgbDither dither,
int x_dither, int y_dither);
-void gdk_pixbuf_xlib_render_pixmap_and_mask (GdkPixbuf *pixbuf,
+void gdk_pixbuf_xlib_render_pixmap_and_tqmask (GdkPixbuf *pixbuf,
Pixmap *pixmap_return,
- Pixmap *mask_return,
+ Pixmap *tqmask_return,
int alpha_threshold);
diff --git a/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c b/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c
index 171db33d..5c6c6ae0 100644
--- a/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c
+++ b/karbon/render/xrgbrender/gdk-pixbuf-xlibrgb.c
@@ -930,7 +930,7 @@ xlib_rgb_init_with_depth (Display *display, Screen *screen, int prefDepth)
static_image[i]->byte_order = MSBFirst;
}
}
- /* ok, so apparently, image_info->bpp is actually
+ /* ok, so aptqparently, image_info->bpp is actually
BYTES per pixel. What fun! */
switch (static_image[0]->bits_per_pixel) {
case 1:
diff --git a/karbon/shapes/vellipse.cc b/karbon/shapes/vellipse.cc
index c2afc804..15f5ce1c 100644
--- a/karbon/shapes/vellipse.cc
+++ b/karbon/shapes/vellipse.cc
@@ -27,17 +27,17 @@
#include <KoXmlNS.h>
#include <vglobal.h>
#include <vdocument.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <core/vfill.h>
-VEllipse::VEllipse( VObject* parent, VState state ) : VPath( parent, state )
+VEllipse::VEllipse( VObject* tqparent, VState state ) : VPath( tqparent, state )
{
}
-VEllipse::VEllipse( VObject* parent,
+VEllipse::VEllipse( VObject* tqparent,
const KoPoint& topLeft, double width, double height,
VEllipseType type, double startAngle, double endAngle )
- : VPath( parent ), m_type( type ), m_startAngle( startAngle ), m_endAngle( endAngle )
+ : VPath( tqparent ), m_type( type ), m_startAngle( startAngle ), m_endAngle( endAngle )
{
setDrawCenterNode();
@@ -94,7 +94,7 @@ VEllipse::init()
close();
// Translate and scale:
- QWMatrix m;
+ TQWMatrix m;
m.translate( m_center.x(), m_center.y() );
m.scale( 2.0 * m_rx, 2.0 * m_ry );
@@ -105,15 +105,15 @@ VEllipse::init()
m_matrix.reset();
}
-QString
+TQString
VEllipse::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Ellipse" );
}
void
-VEllipse::save( QDomElement& element ) const
+VEllipse::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -124,7 +124,7 @@ VEllipse::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "ELLIPSE" );
+ TQDomElement me = element.ownerDocument().createElement( "ELLIPSE" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -152,7 +152,7 @@ VEllipse::save( QDomElement& element ) const
else
me.setAttribute( "kind", "full" );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
@@ -192,11 +192,11 @@ VEllipse::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt
VObject::saveOasis( store, docWriter, mainStyles, index );
- QWMatrix tmpMat;
+ TQWMatrix tmpMat;
tmpMat.scale( 1, -1 );
tmpMat.translate( 0, -document()->height() );
- QString transform = buildOasisTransform( m_matrix*tmpMat );
+ TQString transform = buildOasisTransform( m_matrix*tmpMat );
if( !transform.isEmpty() )
docWriter->addAttribute( "draw:transform", transform );
@@ -204,44 +204,44 @@ VEllipse::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt
}
bool
-VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VEllipse::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
setState( normal );
if( element.tagName() == "ellipse" )
{
if( element.hasAttributeNS( KoXmlNS::svg, "rx" ) )
- m_rx = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "rx", QString::null ) );
+ m_rx = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "rx", TQString() ) );
else
- m_rx = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ) );
+ m_rx = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ) );
if( element.hasAttributeNS( KoXmlNS::svg, "ry" ) )
- m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "ry", QString::null ) );
+ m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "ry", TQString() ) );
else
- m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ) );
+ m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ) );
}
else if( element.tagName() == "circle" )
{
if( element.hasAttributeNS( KoXmlNS::svg, "r" ) )
- m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "r", QString::null ) );
+ m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "r", TQString() ) );
else
- m_rx = m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ) );
+ m_rx = m_ry = 0.5 * KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ) );
}
if( element.hasAttributeNS( KoXmlNS::svg, "cx" ) )
- m_center.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cx", QString::null ) ) );
+ m_center.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cx", TQString() ) ) );
else
- m_center.setX( m_rx + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) ) );
+ m_center.setX( m_rx + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) ) );
if( element.hasAttributeNS( KoXmlNS::svg, "cy" ) )
- m_center.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cy", QString::null ) ) );
+ m_center.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "cy", TQString() ) ) );
else
- m_center.setY( m_ry + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) ) );
+ m_center.setY( m_ry + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) ) );
// the meaning of cut and section is mixed up in karbon, so just set them so for now
// be sure to do the right thing tm for karbon 2.0
- QString kind = element.attributeNS( KoXmlNS::draw, "kind", QString::null );
+ TQString kind = element.attributeNS( KoXmlNS::draw, "kind", TQString() );
if( kind == "cut" )
m_type = section;
else if( kind == "section" )
@@ -251,10 +251,10 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context
else
m_type = full;
- double startAngle = element.attributeNS( KoXmlNS::draw, "start-angle", QString::null ).toDouble();
- double endAngle = element.attributeNS( KoXmlNS::draw, "end-angle", QString::null ).toDouble();
+ double startAngle = element.attributeNS( KoXmlNS::draw, "start-angle", TQString() ).toDouble();
+ double endAngle = element.attributeNS( KoXmlNS::draw, "end-angle", TQString() ).toDouble();
- // the shape gets mirrored in y-direction, so make the angles temporary clockwise
+ // the tqshape gets mirrored in y-direction, so make the angles temporary clockwise
// just for creating the path
m_startAngle = 360.0 - endAngle;
m_endAngle = 360.0 - startAngle;
@@ -265,9 +265,9 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context
m_startAngle = startAngle;
m_endAngle = endAngle;
- transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) );
+ transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) );
- QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null );
+ TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() );
if( !trafo.isEmpty() )
transformOasis( trafo );
@@ -275,11 +275,11 @@ VEllipse::loadOasis( const QDomElement &element, KoOasisLoadingContext &context
}
void
-VEllipse::load( const QDomElement& element )
+VEllipse::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -304,7 +304,7 @@ VEllipse::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
diff --git a/karbon/shapes/vellipse.h b/karbon/shapes/vellipse.h
index e7decbd2..98f0ec11 100644
--- a/karbon/shapes/vellipse.h
+++ b/karbon/shapes/vellipse.h
@@ -33,17 +33,17 @@ public:
cut,
arc
};
- VEllipse( VObject* parent, VState state = edit );
- VEllipse( VObject* parent,
+ VEllipse( VObject* tqparent, VState state = edit );
+ VEllipse( VObject* tqparent,
const KoPoint& topLeft, double width, double height,
VEllipseType type = full, double startAngle = 0, double endAngle = 0 );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VPath* clone() const;
diff --git a/karbon/shapes/vpolygon.cc b/karbon/shapes/vpolygon.cc
index aa74ca90..724b228f 100644
--- a/karbon/shapes/vpolygon.cc
+++ b/karbon/shapes/vpolygon.cc
@@ -18,7 +18,7 @@
*/
-#include <qdom.h>
+#include <tqdom.h>
#include "vglobal.h"
#include "vpolygon.h"
@@ -30,14 +30,14 @@
#include <KoXmlNS.h>
#include <vdocument.h>
-VPolygon::VPolygon( VObject* parent, VState state )
- : VPath( parent, state )
+VPolygon::VPolygon( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-VPolygon::VPolygon( VObject* parent, const QString &points,
+VPolygon::VPolygon( VObject* tqparent, const TQString &points,
const KoPoint& topLeft, double width, double height )
- : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_points( points )
+ : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_points( points )
{
init();
}
@@ -47,13 +47,13 @@ VPolygon::init()
{
bool bFirst = true;
- QString points = m_points.simplifyWhiteSpace();
- points.replace( ',', ' ' );
+ TQString points = m_points.simplifyWhiteSpace();
+ points.tqreplace( ',', ' ' );
points.remove( '\r' );
points.remove( '\n' );
- QStringList pointList = QStringList::split( ' ', points );
- QStringList::Iterator end(pointList.end());
- for( QStringList::Iterator it = pointList.begin(); it != end; ++it )
+ TQStringList pointList = TQStringList::split( ' ', points );
+ TQStringList::Iterator end(pointList.end());
+ for( TQStringList::Iterator it = pointList.begin(); it != end; ++it )
{
KoPoint point;
point.setX( (*it).toDouble() );
@@ -68,7 +68,7 @@ VPolygon::init()
}
close();
- QWMatrix m;
+ TQWMatrix m;
m.translate( m_topLeft.x(), m_topLeft.y() );
// only tranform the path data
@@ -76,15 +76,15 @@ VPolygon::init()
cmd.VVisitor::visitVPath( *this );
}
-QString
+TQString
VPolygon::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Polygon" );
}
void
-VPolygon::save( QDomElement& element ) const
+VPolygon::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -95,7 +95,7 @@ VPolygon::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "POLYGON" );
+ TQDomElement me = element.ownerDocument().createElement( "POLYGON" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -108,12 +108,12 @@ VPolygon::save( QDomElement& element ) const
me.setAttribute( "x", m_topLeft.x() );
me.setAttribute( "y", m_topLeft.y() );
- me.setAttribute( "width", QString("%1pt").arg( m_width ) );
- me.setAttribute( "height", QString("%1pt").arg( m_height ) );
+ me.setAttribute( "width", TQString("%1pt").tqarg( m_width ) );
+ me.setAttribute( "height", TQString("%1pt").tqarg( m_height ) );
me.setAttribute( "points", m_points );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
@@ -136,11 +136,11 @@ VPolygon::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainSt
}
void
-VPolygon::load( const QDomElement& element )
+VPolygon::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -155,23 +155,23 @@ VPolygon::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
bool
-VPolygon::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VPolygon::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
setState( normal );
- m_points = element.attributeNS( KoXmlNS::draw, "points", QString::null );
+ m_points = element.attributeNS( KoXmlNS::draw, "points", TQString() );
init();
- transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) );
+ transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) );
- QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null );
+ TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() );
if( !trafo.isEmpty() )
transformOasis( trafo );
diff --git a/karbon/shapes/vpolygon.h b/karbon/shapes/vpolygon.h
index 9b7bc940..fcb30850 100644
--- a/karbon/shapes/vpolygon.h
+++ b/karbon/shapes/vpolygon.h
@@ -25,16 +25,16 @@
class VPolygon : public VPath
{
public:
- VPolygon( VObject* parent, VState state = edit );
- VPolygon( VObject* parent, const QString &points,
+ VPolygon( VObject* tqparent, VState state = edit );
+ VPolygon( VObject* tqparent, const TQString &points,
const KoPoint& topLeft, double width, double height );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VPath* clone() const;
@@ -45,7 +45,7 @@ private:
KoPoint m_topLeft;
double m_width;
double m_height;
- QString m_points;
+ TQString m_points;
};
#endif
diff --git a/karbon/shapes/vpolyline.cc b/karbon/shapes/vpolyline.cc
index c55c0d14..de5d15f4 100644
--- a/karbon/shapes/vpolyline.cc
+++ b/karbon/shapes/vpolyline.cc
@@ -19,7 +19,7 @@
#include "vpolyline.h"
-#include <qdom.h>
+#include <tqdom.h>
#include "vglobal.h"
#include <klocale.h>
@@ -30,18 +30,18 @@
#include <KoXmlWriter.h>
#include <KoXmlNS.h>
-VPolyline::VPolyline( VObject* parent, VState state )
- : VPath( parent, state )
+VPolyline::VPolyline( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-/*VPolyline::VPolyline( VObject* parent, VState state )
- : VPath( parent, state )
+/*VPolyline::VPolyline( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}*/
-/*VPolyline::VPolyline( VObject* parent, const QString &points )
- : VPath( parent ), m_points( points )
+/*VPolyline::VPolyline( VObject* tqparent, const TQString &points )
+ : VPath( tqparent ), m_points( points )
{
init();
}*/
@@ -51,13 +51,13 @@ VPolyline::init()
{
bool bFirst = true;
- QString points = m_points.simplifyWhiteSpace();
- points.replace( ',', ' ' );
+ TQString points = m_points.simplifyWhiteSpace();
+ points.tqreplace( ',', ' ' );
points.remove( '\r' );
points.remove( '\n' );
- QStringList pointList = QStringList::split( ' ', points );
- QStringList::Iterator end(pointList.end());
- for( QStringList::Iterator it = pointList.begin(); it != end; ++it )
+ TQStringList pointList = TQStringList::split( ' ', points );
+ TQStringList::Iterator end(pointList.end());
+ for( TQStringList::Iterator it = pointList.begin(); it != end; ++it )
{
KoPoint point;
point.setX( (*it).toDouble() );
@@ -72,15 +72,15 @@ VPolyline::init()
}
}
-QString
+TQString
VPolyline::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Polyline" );
}
void
-VPolyline::save( QDomElement& element ) const
+VPolyline::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -91,7 +91,7 @@ VPolyline::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "POLYLINE" );
+ TQDomElement me = element.ownerDocument().createElement( "POLYLINE" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -103,7 +103,7 @@ VPolyline::save( QDomElement& element ) const
me.setAttribute( "points", m_points );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
@@ -126,11 +126,11 @@ VPolyline::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainS
}
void
-VPolyline::load( const QDomElement& element )
+VPolyline::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -139,38 +139,38 @@ VPolyline::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
bool
-VPolyline::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VPolyline::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
setState( normal );
if( element.localName() == "line" )
{
KoPoint p1, p2;
- p1.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", QString::null ) ) );
- p1.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", QString::null ) ) );
- p2.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", QString::null ) ) );
- p2.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", QString::null ) ) );
+ p1.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x1", TQString() ) ) );
+ p1.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y1", TQString() ) ) );
+ p2.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x2", TQString() ) ) );
+ p2.setY( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y2", TQString() ) ) );
- m_points = QString( "%1,%2 %3,%4" ).arg( p1.x() ).arg( p1.y() ).arg( p2.x() ).arg( p2.y() );
+ m_points = TQString( "%1,%2 %3,%4" ).tqarg( p1.x() ).tqarg( p1.y() ).tqarg( p2.x() ).tqarg( p2.y() );
moveTo( p1 );
lineTo( p2 );
}
else if( element.localName() == "polyline" )
{
- m_points = element.attributeNS( KoXmlNS::draw, "points", QString::null );
+ m_points = element.attributeNS( KoXmlNS::draw, "points", TQString() );
init();
}
- transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) );
+ transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) );
- QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null );
+ TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() );
if( !trafo.isEmpty() )
transformOasis( trafo );
diff --git a/karbon/shapes/vpolyline.h b/karbon/shapes/vpolyline.h
index 34da9716..cc08c87b 100644
--- a/karbon/shapes/vpolyline.h
+++ b/karbon/shapes/vpolyline.h
@@ -21,21 +21,21 @@
#define __VPOLYLINE_H__
#include "vcomposite.h"
-#include <qstring.h>
+#include <tqstring.h>
class VPolyline : public VPath
{
public:
- VPolyline( VObject* parent, VState state = edit );
- //VPolyline( VObject* parent, VState state = edit );
- //VPolyline( VObject* parent, const QString &points );
+ VPolyline( VObject* tqparent, VState state = edit );
+ //VPolyline( VObject* tqparent, VState state = edit );
+ //VPolyline( VObject* tqparent, const TQString &points );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VPath* clone() const;
@@ -43,7 +43,7 @@ protected:
void init();
private:
- QString m_points;
+ TQString m_points;
};
#endif
diff --git a/karbon/shapes/vrectangle.cc b/karbon/shapes/vrectangle.cc
index 966c2bb2..01d1d243 100644
--- a/karbon/shapes/vrectangle.cc
+++ b/karbon/shapes/vrectangle.cc
@@ -24,20 +24,20 @@
#include <KoStore.h>
#include <KoXmlWriter.h>
#include <KoXmlNS.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include "vglobal.h"
#include <vdocument.h>
#include "vtransformcmd.h"
-VRectangle::VRectangle( VObject* parent, VState state )
- : VPath( parent, state )
+VRectangle::VRectangle( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-VRectangle::VRectangle( VObject* parent,
+VRectangle::VRectangle( VObject* tqparent,
const KoPoint& topLeft, double width, double height, double rx, double ry )
- : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_rx( rx ), m_ry( ry )
+ : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_rx( rx ), m_ry( ry )
{
setDrawCenterNode();
@@ -93,15 +93,15 @@ VRectangle::init()
close();
}
-QString
+TQString
VRectangle::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Rectangle" );
}
void
-VRectangle::save( QDomElement& element ) const
+VRectangle::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -112,7 +112,7 @@ VRectangle::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "RECT" );
+ TQDomElement me = element.ownerDocument().createElement( "RECT" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -125,13 +125,13 @@ VRectangle::save( QDomElement& element ) const
me.setAttribute( "x", m_topLeft.x() );
me.setAttribute( "y", m_topLeft.y() );
- me.setAttribute( "width", QString("%1pt").arg( m_width ) );
- me.setAttribute( "height", QString("%1pt").arg( m_height ) );
+ me.setAttribute( "width", TQString("%1pt").tqarg( m_width ) );
+ me.setAttribute( "height", TQString("%1pt").tqarg( m_height ) );
me.setAttribute( "rx", m_rx );
me.setAttribute( "ry", m_ry );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
@@ -161,11 +161,11 @@ VRectangle::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &main
VObject::saveOasis( store, docWriter, mainStyles, index );
- QWMatrix tmpMat;
+ TQWMatrix tmpMat;
tmpMat.scale( 1, -1 );
tmpMat.translate( 0, -document()->height() );
- QString transform = buildOasisTransform( m_matrix*tmpMat );
+ TQString transform = buildOasisTransform( m_matrix*tmpMat );
if( !transform.isEmpty() )
docWriter->addAttribute( "draw:transform", transform );
@@ -173,23 +173,23 @@ VRectangle::saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &main
}
bool
-VRectangle::loadOasis( const QDomElement &element, KoOasisLoadingContext &context )
+VRectangle::loadOasis( const TQDomElement &element, KoOasisLoadingContext &context )
{
setState( normal );
- m_width = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", QString::null ), 10.0 );
- m_height = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", QString::null ), 10.0 );
+ m_width = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "width", TQString() ), 10.0 );
+ m_height = KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "height", TQString() ), 10.0 );
- m_topLeft.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", QString::null ) ) );
- m_topLeft.setY( m_height + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", QString::null ) ) );
+ m_topLeft.setX( KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "x", TQString() ) ) );
+ m_topLeft.setY( m_height + KoUnit::parseValue( element.attributeNS( KoXmlNS::svg, "y", TQString() ) ) );
- m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::draw, "corner-radius", QString::null ) );
+ m_rx = m_ry = KoUnit::parseValue( element.attributeNS( KoXmlNS::draw, "corner-radius", TQString() ) );
init();
- transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", QString::null ) );
+ transformByViewbox( element, element.attributeNS( KoXmlNS::svg, "viewBox", TQString() ) );
- QString trafo = element.attributeNS( KoXmlNS::draw, "transform", QString::null );
+ TQString trafo = element.attributeNS( KoXmlNS::draw, "transform", TQString() );
if( !trafo.isEmpty() )
transformOasis( trafo );
@@ -197,11 +197,11 @@ VRectangle::loadOasis( const QDomElement &element, KoOasisLoadingContext &contex
}
void
-VRectangle::load( const QDomElement& element )
+VRectangle::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -217,7 +217,7 @@ VRectangle::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
diff --git a/karbon/shapes/vrectangle.h b/karbon/shapes/vrectangle.h
index 04bd20d0..08c4e085 100644
--- a/karbon/shapes/vrectangle.h
+++ b/karbon/shapes/vrectangle.h
@@ -26,16 +26,16 @@
class KARBONBASE_EXPORT VRectangle : public VPath
{
public:
- VRectangle( VObject* parent, VState state = edit );
- VRectangle( VObject* parent,
+ VRectangle( VObject* tqparent, VState state = edit );
+ VRectangle( VObject* tqparent,
const KoPoint& topLeft, double width, double height, double rx = 0.0, double ry = 0.0 );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
+ virtual void save( TQDomElement& element ) const;
virtual void saveOasis( KoStore *store, KoXmlWriter *docWriter, KoGenStyles &mainStyles, int &index ) const;
- virtual void load( const QDomElement& element );
- virtual bool loadOasis( const QDomElement &element, KoOasisLoadingContext &context );
+ virtual void load( const TQDomElement& element );
+ virtual bool loadOasis( const TQDomElement &element, KoOasisLoadingContext &context );
virtual VPath* clone() const;
diff --git a/karbon/shapes/vsinus.cc b/karbon/shapes/vsinus.cc
index a6c9ec4f..6c546135 100644
--- a/karbon/shapes/vsinus.cc
+++ b/karbon/shapes/vsinus.cc
@@ -18,24 +18,24 @@
*/
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include "vglobal.h"
#include "vsinus.h"
#include "vtransformcmd.h"
#include <klocale.h>
#include <KoUnit.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <vdocument.h>
-VSinus::VSinus( VObject* parent, VState state )
- : VPath( parent, state )
+VSinus::VSinus( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-VSinus::VSinus( VObject* parent,
+VSinus::VSinus( VObject* tqparent,
const KoPoint& topLeft, double width, double height, uint periods )
- : VPath( parent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_periods( periods )
+ : VPath( tqparent ), m_topLeft( topLeft ), m_width( width), m_height( height ), m_periods( periods )
{
// We want at least 1 period:
if( m_periods < 1 )
@@ -119,7 +119,7 @@ VSinus::init()
}
// Translate and scale:
- QWMatrix m;
+ TQWMatrix m;
m.translate( m_topLeft.x(), m_topLeft.y() - m_height * 0.5 );
m.scale( m_width / m_periods, m_height * 0.5 );
@@ -130,15 +130,15 @@ VSinus::init()
m_matrix.reset();
}
-QString
+TQString
VSinus::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Sinus" );
}
void
-VSinus::save( QDomElement& element ) const
+VSinus::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -149,7 +149,7 @@ VSinus::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "SINUS" );
+ TQDomElement me = element.ownerDocument().createElement( "SINUS" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -167,18 +167,18 @@ VSinus::save( QDomElement& element ) const
me.setAttribute( "periods", m_periods );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
}
void
-VSinus::load( const QDomElement& element )
+VSinus::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -193,7 +193,7 @@ VSinus::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
diff --git a/karbon/shapes/vsinus.h b/karbon/shapes/vsinus.h
index eb8d4f00..10b902d8 100644
--- a/karbon/shapes/vsinus.h
+++ b/karbon/shapes/vsinus.h
@@ -26,14 +26,14 @@
class KARBONBASE_EXPORT VSinus : public VPath
{
public:
- VSinus( VObject* parent, VState state = edit );
- VSinus( VObject* parent,
+ VSinus( VObject* tqparent, VState state = edit );
+ VSinus( VObject* tqparent,
const KoPoint& topLeft, double width, double height, uint periods );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
virtual VPath* clone() const;
diff --git a/karbon/shapes/vspiral.cc b/karbon/shapes/vspiral.cc
index 8f6d17c2..cad37ccd 100644
--- a/karbon/shapes/vspiral.cc
+++ b/karbon/shapes/vspiral.cc
@@ -20,8 +20,8 @@
#include <math.h>
-#include <qwmatrix.h>
-#include <qdom.h>
+#include <tqwmatrix.h>
+#include <tqdom.h>
#include "vglobal.h"
#include "vspiral.h"
@@ -30,15 +30,15 @@
#include <KoUnit.h>
#include <vdocument.h>
-VSpiral::VSpiral( VObject* parent, VState state )
- : VPath( parent, state )
+VSpiral::VSpiral( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-VSpiral::VSpiral( VObject* parent,
+VSpiral::VSpiral( VObject* tqparent,
const KoPoint& center, double radius, uint segments, double fade,
bool clockwise, double angle, VSpiralType type )
- : VPath( parent ), m_center( center), m_radius( radius ), m_fade( fade ), m_segments( segments ), m_clockwise( clockwise ), m_angle( angle ), m_type( type )
+ : VPath( tqparent ), m_center( center), m_radius( radius ), m_fade( fade ), m_segments( segments ), m_clockwise( clockwise ), m_angle( angle ), m_type( type )
{
init();
}
@@ -86,7 +86,7 @@ VSpiral::init()
}
// translate path to center:
- QWMatrix m;
+ TQWMatrix m;
m.translate( m_center.x(), m_center.y() );
// sadly it's not feasible to simply add angle while creation.
@@ -101,15 +101,15 @@ VSpiral::init()
m_matrix.reset();
}
-QString
+TQString
VSpiral::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Spiral" );
}
void
-VSpiral::save( QDomElement& element ) const
+VSpiral::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -120,7 +120,7 @@ VSpiral::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "SPIRAL" );
+ TQDomElement me = element.ownerDocument().createElement( "SPIRAL" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -143,18 +143,18 @@ VSpiral::save( QDomElement& element ) const
me.setAttribute( "type", m_type );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
}
void
-VSpiral::load( const QDomElement& element )
+VSpiral::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -174,7 +174,7 @@ VSpiral::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
diff --git a/karbon/shapes/vspiral.h b/karbon/shapes/vspiral.h
index 2b80f6ad..fc99436c 100644
--- a/karbon/shapes/vspiral.h
+++ b/karbon/shapes/vspiral.h
@@ -31,15 +31,15 @@ public:
round,
rectangular
};
- VSpiral( VObject* parent, VState state = edit );
- VSpiral( VObject* parent,
+ VSpiral( VObject* tqparent, VState state = edit );
+ VSpiral( VObject* tqparent,
const KoPoint& center, double radius, uint segments,
double fade, bool clockwise, double angle = 0.0, VSpiralType type = round );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
virtual VPath* clone() const;
diff --git a/karbon/shapes/vstar.cc b/karbon/shapes/vstar.cc
index 98391272..11f8ef86 100644
--- a/karbon/shapes/vstar.cc
+++ b/karbon/shapes/vstar.cc
@@ -20,8 +20,8 @@
#include <math.h>
-#include <qwmatrix.h>
-#include <qdom.h>
+#include <tqwmatrix.h>
+#include <tqdom.h>
#include "vglobal.h"
#include "vstar.h"
@@ -30,15 +30,15 @@
#include <KoUnit.h>
#include <vdocument.h>
-VStar::VStar( VObject* parent, VState state )
- : VPath( parent, state )
+VStar::VStar( VObject* tqparent, VState state )
+ : VPath( tqparent, state )
{
}
-VStar::VStar( VObject* parent,
+VStar::VStar( VObject* tqparent,
const KoPoint& center, double outerRadius, double innerRadius,
uint edges, double angle, uint innerAngle, double roundness, VStarType type )
- : VPath( parent ), m_center( center), m_outerRadius( outerRadius ), m_innerRadius( innerRadius), m_edges( edges ), m_angle( angle ), m_innerAngle( innerAngle ), m_roundness( roundness ), m_type( type )
+ : VPath( tqparent ), m_center( center), m_outerRadius( outerRadius ), m_innerRadius( innerRadius), m_edges( edges ), m_angle( angle ), m_innerAngle( innerAngle ), m_roundness( roundness ), m_type( type )
{
init();
}
@@ -220,7 +220,7 @@ VStar::init()
close();
// translate path to center:
- QWMatrix m;
+ TQWMatrix m;
m.translate( m_center.x(), m_center.y() );
// only tranform the path data
@@ -261,15 +261,15 @@ VStar::getOptimalInnerRadius( uint edges, double outerRadius, uint /*innerAngle*
return sqrt( x * x + y * y );
}
-QString
+TQString
VStar::name() const
{
- QString result = VObject::name();
+ TQString result = VObject::name();
return !result.isEmpty() ? result : i18n( "Star" );
}
void
-VStar::save( QDomElement& element ) const
+VStar::save( TQDomElement& element ) const
{
VDocument *doc = document();
if( doc && doc->saveAsPath() )
@@ -280,7 +280,7 @@ VStar::save( QDomElement& element ) const
if( state() != deleted )
{
- QDomElement me = element.ownerDocument().createElement( "STAR" );
+ TQDomElement me = element.ownerDocument().createElement( "STAR" );
element.appendChild( me );
// save fill/stroke untransformed
@@ -304,18 +304,18 @@ VStar::save( QDomElement& element ) const
me.setAttribute( "type", m_type );
- QString transform = buildSvgTransform();
+ TQString transform = buildSvgTransform();
if( !transform.isEmpty() )
me.setAttribute( "transform", transform );
}
}
void
-VStar::load( const QDomElement& element )
+VStar::load( const TQDomElement& element )
{
setState( normal );
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for( uint i = 0; i < list.count(); ++i )
if( list.item( i ).isElement() )
VObject::load( list.item( i ).toElement() );
@@ -336,7 +336,7 @@ VStar::load( const QDomElement& element )
init();
- QString trafo = element.attribute( "transform" );
+ TQString trafo = element.attribute( "transform" );
if( !trafo.isEmpty() )
transform( trafo );
}
diff --git a/karbon/shapes/vstar.h b/karbon/shapes/vstar.h
index 7b7ec098..9a4096ea 100644
--- a/karbon/shapes/vstar.h
+++ b/karbon/shapes/vstar.h
@@ -23,11 +23,11 @@
#include "vcomposite.h"
#include <koffice_export.h>
/**
- * This shape offers star-like shapes with a lot of parameters :
+ * This tqshape offers star-like tqshapes with a lot of parameters :
*
* Types :
*
- * Star - fully connected star shape.
+ * Star - fully connected star tqshape.
* Star outline - like star but without the cross connections.
* Framed star - like star outline but with an enclosing path.
* Spoke - basically a star outline with inner radius of zero.
@@ -42,7 +42,7 @@
* Inner radius - inner radius where star has to connect to. This value
* doesn't apply to polygon, spoke and wheel.
* Inner angle - extra radius amount for inner radius.
- * Roundness - uses curves instead of lines for the star shape.
+ * Roundness - uses curves instead of lines for the star tqshape.
*/
class KARBONBASE_EXPORT VStar : public VPath
{
@@ -57,19 +57,19 @@ public:
star,
gear
};
- VStar( VObject* parent, VState state = edit );
- VStar( VObject* parent,
+ VStar( VObject* tqparent, VState state = edit );
+ VStar( VObject* tqparent,
const KoPoint& center, double outerRadius, double innerRadius,
uint edges, double angle = 0.0, uint innerAngle = 0,
double roundness = 0.0, VStarType type = star_outline );
static double getOptimalInnerRadius( uint edges, double outerRadius, uint innerAngle );
- virtual QString name() const;
+ virtual TQString name() const;
- virtual void save( QDomElement& element ) const;
- virtual void load( const QDomElement& element );
+ virtual void save( TQDomElement& element ) const;
+ virtual void load( const TQDomElement& element );
virtual VPath* clone() const;
diff --git a/karbon/tools/vcurvefit.cc b/karbon/tools/vcurvefit.cc
index 08dbda44..42b90a13 100644
--- a/karbon/tools/vcurvefit.cc
+++ b/karbon/tools/vcurvefit.cc
@@ -26,7 +26,7 @@
#include <core/vglobal.h>
#include <render/vpainter.h>
#include <render/vpainterfactory.h>
-#include <commands/vshapecmd.h>
+#include <commands/vtqshapecmd.h>
/*
An Algorithm for Automatically Fitting Digitized Curves
@@ -104,7 +104,7 @@ double distance(KoPoint *p1,KoPoint *p2){
}
-FitVector ComputeLeftTangent(QPtrList<KoPoint> &points,int end){
+FitVector ComputeLeftTangent(TQPtrList<KoPoint> &points,int end){
FitVector tHat1(*points.at(end+1),*points.at(end));
tHat1.normalize();
@@ -112,7 +112,7 @@ FitVector ComputeLeftTangent(QPtrList<KoPoint> &points,int end){
return tHat1;
}
-FitVector ComputeRightTangent(QPtrList<KoPoint> &points,int end){
+FitVector ComputeRightTangent(TQPtrList<KoPoint> &points,int end){
FitVector tHat1(*points.at(end-1),*points.at(end));
tHat1.normalize();
@@ -125,7 +125,7 @@ FitVector ComputeRightTangent(QPtrList<KoPoint> &points,int end){
* Assign parameter values to digitized points
* using relative distances between points.
*/
-static double *ChordLengthParameterize(QPtrList<KoPoint> points,int first,int last)
+static double *ChordLengthParameterize(TQPtrList<KoPoint> points,int first,int last)
{
int i;
double *u; /* Parameterization */
@@ -165,7 +165,7 @@ static FitVector VectorSub(FitVector a,FitVector b)
return (c);
}
-static FitVector ComputeCenterTangent(QPtrList<KoPoint> points,int center)
+static FitVector ComputeCenterTangent(TQPtrList<KoPoint> points,int center)
{
FitVector V1, V2, tHatCenter;
@@ -214,7 +214,7 @@ static double B3(double u)
* Use least-squares method to find Bezier control points for region.
*
*/
-KoPoint* GenerateBezier(QPtrList<KoPoint> &points, int first, int last, double *uPrime,FitVector tHat1,FitVector tHat2)
+KoPoint* GenerateBezier(TQPtrList<KoPoint> &points, int first, int last, double *uPrime,FitVector tHat1,FitVector tHat2)
{
int i;
FitVector A[MAXPOINTS][2]; /* Precomputed rhs for eqn */
@@ -359,7 +359,7 @@ static KoPoint BezierII(int degree,KoPoint *V, double t)
* Find the maximum squared distance of digitized points
* to fitted curve.
*/
-static double ComputeMaxError(QPtrList<KoPoint> points,int first,int last,KoPoint *curve,double *u,int *splitPoint)
+static double ComputeMaxError(TQPtrList<KoPoint> points,int first,int last,KoPoint *curve,double *u,int *splitPoint)
{
int i;
double maxDist; /* Maximum error */
@@ -390,12 +390,12 @@ static double NewtonRaphsonRootFind(KoPoint *Q,KoPoint P,double u)
{
double numerator, denominator;
KoPoint Q1[3], Q2[2]; /* Q' and Q'' */
- KoPoint Q_u, Q1_u, Q2_u; /*u evaluated at Q, Q', & Q'' */
+ KoPoint TQ_u, Q1_u, Q2_u; /*u evaluated at Q, Q', & Q'' */
double uPrime; /* Improved u */
int i;
/* Compute Q(u) */
- Q_u = BezierII(3,Q, u);
+ TQ_u = BezierII(3,Q, u);
/* Generate control vertices for Q' */
for (i = 0; i <= 2; i++) {
@@ -414,9 +414,9 @@ static double NewtonRaphsonRootFind(KoPoint *Q,KoPoint P,double u)
Q2_u = BezierII(1, Q2, u);
/* Compute f(u)/f'(u) */
- numerator = (Q_u.x() - P.x()) * (Q1_u.x()) + (Q_u.y() - P.y()) * (Q1_u.y());
+ numerator = (TQ_u.x() - P.x()) * (Q1_u.x()) + (TQ_u.y() - P.y()) * (Q1_u.y());
denominator = (Q1_u.x()) * (Q1_u.x()) + (Q1_u.y()) * (Q1_u.y()) +
- (Q_u.x() - P.x()) * (Q2_u.x()) + (Q_u.y() - P.y()) * (Q2_u.y());
+ (TQ_u.x() - P.x()) * (Q2_u.x()) + (TQ_u.y() - P.y()) * (Q2_u.y());
/* u = u - f(u)/f'(u) */
uPrime = u - (numerator/denominator);
@@ -425,11 +425,11 @@ static double NewtonRaphsonRootFind(KoPoint *Q,KoPoint P,double u)
/*
* Reparameterize:
- * Given set of points and their parameterization, try to find
+ * Given set of points and their parameterization, try to tqfind
* a better parameterization.
*
*/
-static double *Reparameterize(QPtrList<KoPoint> points,int first,int last,double *u,KoPoint *curve)
+static double *Reparameterize(TQPtrList<KoPoint> points,int first,int last,double *u,KoPoint *curve)
{
int nPts = last-first+1;
int i;
@@ -443,7 +443,7 @@ static double *Reparameterize(QPtrList<KoPoint> points,int first,int last,double
return (uPrime);
}
-KoPoint *FitCubic(QPtrList<KoPoint> &points,int first,int last,FitVector tHat1,FitVector tHat2,float error,int &width){
+KoPoint *FitCubic(TQPtrList<KoPoint> &points,int first,int last,FitVector tHat1,FitVector tHat2,float error,int &width){
double *u;
double *uPrime;
double maxError;
@@ -538,7 +538,7 @@ KoPoint *FitCubic(QPtrList<KoPoint> &points,int first,int last,FitVector tHat1,F
}
-VPath *bezierFit(QPtrList<KoPoint> &points,float error){
+VPath *bezierFit(TQPtrList<KoPoint> &points,float error){
FitVector tHat1, tHat2;
tHat1 = ComputeLeftTangent(points,0);
diff --git a/karbon/tools/vcurvefit.h b/karbon/tools/vcurvefit.h
index b9e54d1d..bc65ef2f 100644
--- a/karbon/tools/vcurvefit.h
+++ b/karbon/tools/vcurvefit.h
@@ -1,11 +1,11 @@
#ifndef __VCURVEFIT_H__
#define __VCURVEFIT_H__
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
#include "KoPoint.h"
-VPath *bezierFit(QPtrList<KoPoint> &points,float error);
+VPath *bezierFit(TQPtrList<KoPoint> &points,float error);
#endif
diff --git a/karbon/tools/vdefaulttools.cc b/karbon/tools/vdefaulttools.cc
index c3a713ec..f26bcf52 100644
--- a/karbon/tools/vdefaulttools.cc
+++ b/karbon/tools/vdefaulttools.cc
@@ -37,7 +37,7 @@
#include "vroundrecttool.h"
#include "vselectnodestool.h"
#include "vselecttool.h"
-#include "vshapetool.h"
+#include "vtqshapetool.h"
#include "vsheartool.h"
#include "vsinustool.h"
#include "vspiraltool.h"
@@ -47,18 +47,18 @@
typedef KGenericFactory<VDefaultTools> VDefaultToolsFactory;
K_EXPORT_COMPONENT_FACTORY( karbon_defaulttools, VDefaultToolsFactory( "karbon_defaulttools" ) )
-VDefaultTools::VDefaultTools(QObject *parent, const char *name, const QStringList &)
- : KParts::Plugin(parent, name)
+VDefaultTools::VDefaultTools(TQObject *tqparent, const char *name, const TQStringList &)
+ : KParts::Plugin(tqparent, name)
{
setInstance(VDefaultToolsFactory::instance());
kdDebug() << "VDefaultTools. Class: "
<< className()
<< ", Parent: "
- << parent -> className()
+ << tqparent -> className()
<< "\n";
- if ( parent->inherits("KarbonFactory") )
+ if ( tqparent->inherits("KarbonFactory") )
{
KarbonToolRegistry* r = KarbonToolRegistry::instance();
r->add(new KarbonToolFactory<VSelectTool>());
diff --git a/karbon/tools/vdefaulttools.h b/karbon/tools/vdefaulttools.h
index bb58bd8f..0c88eb4a 100644
--- a/karbon/tools/vdefaulttools.h
+++ b/karbon/tools/vdefaulttools.h
@@ -21,7 +21,7 @@
#ifndef __DEFAULTTOOLS_H__
#define __DEFAULTTOOLS_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <kparts/plugin.h>
@@ -31,8 +31,9 @@
class VDefaultTools : public KParts::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
- VDefaultTools(QObject *parent, const char *name, const QStringList &);
+ VDefaultTools(TQObject *tqparent, const char *name, const TQStringList &);
virtual ~VDefaultTools();
};
diff --git a/karbon/tools/vellipsetool.cc b/karbon/tools/vellipsetool.cc
index 87528f4a..ff68c350 100644
--- a/karbon/tools/vellipsetool.cc
+++ b/karbon/tools/vellipsetool.cc
@@ -18,8 +18,8 @@
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include "KoUnitWidgets.h"
@@ -29,35 +29,35 @@
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vellipse.h>
+#include <tqshapes/vellipse.h>
#include "vellipsetool.h"
#include "vglobal.h"
-VEllipseOptionsWidget::VEllipseOptionsWidget( KarbonPart *part, QWidget *parent, const char *name )
- : KDialogBase( parent, name, true, i18n( "Insert Ellipse" ), Ok | Cancel ), m_part( part )
+VEllipseOptionsWidget::VEllipseOptionsWidget( KarbonPart *part, TQWidget *tqparent, const char *name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Ellipse" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Type:" ), group );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ new TQLabel( i18n( "Type:" ), group );
m_type = new KComboBox( false, group );
m_type->insertItem( i18n( "Full" ), VEllipse::full );
m_type->insertItem( i18n( "Section" ), VEllipse::section );
m_type->insertItem( i18n( "Pie" ), VEllipse::cut );
m_type->insertItem( i18n( "Arc" ), VEllipse::arc );
- connect( m_type, SIGNAL( activated( int ) ), this, SLOT( typeChanged( int ) ) );
+ connect( m_type, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( typeChanged( int ) ) );
// add width/height-input:
- m_widthLabel = new QLabel( i18n( "object width", "Width:" ), group );
+ m_widthLabel = new TQLabel( i18n( "object width", "Width:" ), group );
m_width = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
- m_heightLabel = new QLabel( i18n( "Height:" ), group );
+ m_heightLabel = new TQLabel( i18n( "Height:" ), group );
m_height = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
- new QLabel( i18n( "Start angle:" ), group );
+ new TQLabel( i18n( "Start angle:" ), group );
m_startAngle = new KIntSpinBox( group );
m_startAngle->setMinValue( 0 );
m_startAngle->setMaxValue( 360 );
- new QLabel( i18n( "End angle:" ), group );
+ new TQLabel( i18n( "End angle:" ), group );
m_endAngle = new KIntSpinBox( group );
m_endAngle->setMinValue( 0 );
m_endAngle->setMaxValue( 360 );
@@ -152,7 +152,7 @@ VEllipseTool::refreshUnit()
}
VPath*
-VEllipseTool::shape( bool interactive ) const
+VEllipseTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -258,7 +258,7 @@ VEllipseTool::cancel()
bool
VEllipseTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -268,9 +268,9 @@ VEllipseTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Ellipse Tool" ), "14_ellipse", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Ellipse Tool" ), "14_ellipse", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Ellipse" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vellipsetool.h b/karbon/tools/vellipsetool.h
index d30e3411..f0276779 100644
--- a/karbon/tools/vellipsetool.h
+++ b/karbon/tools/vellipsetool.h
@@ -22,20 +22,21 @@
#include <kdialogbase.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KoUnitDoubleSpinBox;
class KComboBox;
class KIntSpinBox;
class KarbonView;
-class QLabel;
-class QWidget;
+class TQLabel;
+class TQWidget;
class VEllipseOptionsWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VEllipseOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char *name = 0L );
+ VEllipseOptionsWidget( KarbonPart *part, TQWidget *tqparent = 0L, const char *name = 0L );
double width() const;
double height() const;
@@ -56,8 +57,8 @@ private:
KoUnitDoubleSpinBox *m_width;
KoUnitDoubleSpinBox *m_height;
KarbonPart *m_part;
- QLabel *m_heightLabel;
- QLabel *m_widthLabel;
+ TQLabel *m_heightLabel;
+ TQLabel *m_widthLabel;
};
class VEllipseTool : public VShapeTool
@@ -68,8 +69,8 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Ellipse Tool" ); }
- virtual VPath *shape( bool interactive = false ) const;
+ virtual TQString uiname() { return i18n( "Ellipse Tool" ); }
+ virtual VPath *tqshape( bool interactive = false ) const;
void refreshUnit();
protected:
diff --git a/karbon/tools/vgradienttool.cc b/karbon/tools/vgradienttool.cc
index dbd82720..9c7274ea 100644
--- a/karbon/tools/vgradienttool.cc
+++ b/karbon/tools/vgradienttool.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -64,7 +64,7 @@ VGradientTool::activate()
m_active = true;
m_state = normal;
view()->statusMessage()->setText( i18n( "Gradient" ) );
- view()->setCursor( QCursor( Qt::crossCursor ) );
+ view()->setCursor( TQCursor( TQt::crossCursor ) );
VTool::activate();
if( view() )
@@ -75,10 +75,10 @@ VGradientTool::activate()
VStrokeFillPreview* preview = view()->strokeFillPreview();
if( preview )
{
- connect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) );
- connect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) );
+ connect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) );
+ connect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) );
}
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -94,23 +94,23 @@ VGradientTool::deactivate()
VStrokeFillPreview* preview = view()->strokeFillPreview();
if( preview )
{
- disconnect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) );
- disconnect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) );
+ disconnect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) );
+ disconnect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) );
}
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
-QString
+TQString
VGradientTool::statusText()
{
return i18n( "Gradient Tool" );
}
-QString
+TQString
VGradientTool::contextHelp()
{
- QString s = i18n( "<qt><b>Gradient tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Gradient tool:</b><br>" );
s += i18n( "<i>Click and drag</i> to choose the gradient vector.<br>" );
s += i18n( "<i>Click and drag</i> a gradient vector handle to change the gradient vector.<br>" );
s += i18n( "<i>Shift click and drag</i> to move the radial gradient focal point.<br>" );
@@ -194,9 +194,9 @@ VGradientTool::draw( VPainter* painter )
m_vector = KoRect( e.x()-m_handleSize, e.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize );
m_center = KoRect( f.x()-m_handleSize, f.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize );
- painter->setPen( Qt::blue.light() );
- painter->setBrush( Qt::blue.light() );
- painter->setRasterOp( Qt::XorROP );
+ painter->setPen( TQt::blue.light() );
+ painter->setBrush( TQt::blue.light() );
+ painter->setRasterOp( TQt::XorROP );
// draw the gradient vector
painter->newPath();
@@ -231,9 +231,9 @@ VGradientTool::draw()
return;
VPainter *painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
- painter->setPen( Qt::DotLine );
+ painter->setPen( TQt::DotLine );
painter->newPath();
// differentiate between moving a handle and creating a complete new vector
@@ -289,16 +289,16 @@ VGradientTool::mouseButtonPress()
m_current = first();
// set the apropriate editing state
- if( m_center.contains( m_current ) && shiftPressed())
+ if( m_center.tqcontains( m_current ) && shiftPressed())
{
m_state = moveCenter;
}
- else if( m_origin.contains( m_current ) )
+ else if( m_origin.tqcontains( m_current ) )
{
m_state = moveOrigin;
m_fixed = m_vector.center();
}
- else if( m_vector.contains( m_current ) )
+ else if( m_vector.tqcontains( m_current ) )
{
m_state = moveVector;
m_fixed = m_origin.center();
@@ -466,7 +466,7 @@ VGradientTool::cancel()
bool
VGradientTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -476,7 +476,7 @@ VGradientTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Gradient Tool" ), "14_gradient", Qt::Key_G, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Gradient Tool" ), "14_gradient", TQt::Key_G, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Gradient" ) );
m_action->setExclusiveGroup( "misc" );
//m_ownAction = true;
@@ -489,19 +489,19 @@ VGradientTool::setCursor() const
if( !view() ) return;
// set a different cursor if mouse is inside the handle rects
- if( m_origin.contains( last() ) || m_vector.contains( last() ) || m_center.contains( last() ) )
- view()->setCursor( QCursor( Qt::SizeAllCursor ) );
+ if( m_origin.tqcontains( last() ) || m_vector.tqcontains( last() ) || m_center.tqcontains( last() ) )
+ view()->setCursor( TQCursor( TQt::SizeAllCursor ) );
else
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
}
bool
-VGradientTool::keyReleased( Qt::Key key )
+VGradientTool::keyReleased( TQt::Key key )
{
// increase/decrease the handle size
switch( key )
{
- case Qt::Key_I:
+ case TQt::Key_I:
if( shiftPressed() )
m_handleSize++;
else if( m_handleSize > 3 )
@@ -511,7 +511,7 @@ VGradientTool::keyReleased( Qt::Key key )
}
if( view() )
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
return true;
}
@@ -520,7 +520,7 @@ void
VGradientTool::targetChanged()
{
if( view() )
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
#include "vgradienttool.moc"
diff --git a/karbon/tools/vgradienttool.h b/karbon/tools/vgradienttool.h
index 7e78d510..109dd5cf 100644
--- a/karbon/tools/vgradienttool.h
+++ b/karbon/tools/vgradienttool.h
@@ -31,6 +31,7 @@ class VGradientTabWidget;
class VGradientTool : public VTool
{
Q_OBJECT
+ TQ_OBJECT
public:
VGradientTool( KarbonView *view );
@@ -40,10 +41,10 @@ public:
virtual void deactivate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Gradient Tool" ); }
- virtual QString statusText();
+ virtual TQString uiname() { return i18n( "Gradient Tool" ); }
+ virtual TQString statusText();
- virtual QString contextHelp();
+ virtual TQString contextHelp();
virtual bool showDialog() const;
virtual void draw( VPainter* painter );
@@ -57,7 +58,7 @@ protected:
virtual void mouseDrag();
virtual void cancel();
virtual void setCursor() const;
- virtual bool keyReleased( Qt::Key key );
+ virtual bool keyReleased( TQt::Key key );
/**
* Determines the actual gradient to be edited.
diff --git a/karbon/tools/vpatterntool.cc b/karbon/tools/vpatterntool.cc
index 0143d0bc..01dfc460 100644
--- a/karbon/tools/vpatterntool.cc
+++ b/karbon/tools/vpatterntool.cc
@@ -19,13 +19,13 @@
#include "vpatterntool.h"
-#include <qtoolbutton.h>
-#include <qframe.h>
-#include <qhbuttongroup.h>
-#include <qlayout.h>
-#include <qfileinfo.h>
-#include <qlabel.h>
-#include <qcursor.h>
+#include <tqtoolbutton.h>
+#include <tqframe.h>
+#include <tqhbuttongroup.h>
+#include <tqlayout.h>
+#include <tqfileinfo.h>
+#include <tqlabel.h>
+#include <tqcursor.h>
#include <kiconloader.h>
#include <koIconChooser.h>
@@ -45,15 +45,15 @@
#include <commands/vstrokecmd.h>
#include <widgets/vstrokefillpreview.h>
-VPatternWidget::VPatternWidget( QPtrList<KoIconItem>* patterns, VTool*, QWidget* parent )
- : KDialogBase( parent, "", true, i18n( "Choose Pattern" ), Ok | Cancel ), m_pattern( 0 )
+VPatternWidget::VPatternWidget( TQPtrList<KoIconItem>* patterns, VTool*, TQWidget* tqparent )
+ : KDialogBase( tqparent, "", true, i18n( "Choose Pattern" ), Ok | Cancel ), m_pattern( 0 )
{
- QWidget *base = new QWidget( this );
- QVBoxLayout* layout = new QVBoxLayout( base );
- layout->addWidget( m_patternChooser = new KoIconChooser( QSize( 32, 32 ), base ) );
- layout->addWidget( m_buttonGroup = new QHButtonGroup( base ) );
- m_buttonGroup->insert( m_importPatternButton = new QToolButton( m_buttonGroup ) );
- m_buttonGroup->insert( m_deletePatternButton = new QToolButton( m_buttonGroup ) );
+ TQWidget *base = new TQWidget( this );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( base );
+ tqlayout->addWidget( m_patternChooser = new KoIconChooser( TQSize( 32, 32 ), base ) );
+ tqlayout->addWidget( m_buttonGroup = new TQHButtonGroup( base ) );
+ m_buttonGroup->insert( m_importPatternButton = new TQToolButton( m_buttonGroup ) );
+ m_buttonGroup->insert( m_deletePatternButton = new TQToolButton( m_buttonGroup ) );
m_patternChooser->setFixedSize( 180, 120 );
m_importPatternButton->setIconSet( SmallIconSet( "14_layer_newlayer" ) );
m_importPatternButton->setTextLabel( i18n( "Import" ) );
@@ -65,10 +65,10 @@ VPatternWidget::VPatternWidget( QPtrList<KoIconItem>* patterns, VTool*, QWidget*
m_deletePatternButton->setEnabled( false );
//setFrameStyle( Box | Sunken );
- layout->setMargin( 3 );
+ tqlayout->setMargin( 3 );
- connect( m_buttonGroup, SIGNAL( clicked( int ) ), this, SLOT( slotButtonClicked( int ) ) );
- connect( m_patternChooser, SIGNAL( selected( KoIconItem* ) ), this, SLOT( patternSelected( KoIconItem* ) ) );
+ connect( m_buttonGroup, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( slotButtonClicked( int ) ) );
+ connect( m_patternChooser, TQT_SIGNAL( selected( KoIconItem* ) ), this, TQT_SLOT( patternSelected( KoIconItem* ) ) );
KoIconItem* item;
for( item = patterns->first(); item; item = patterns->next() )
@@ -89,7 +89,7 @@ VPattern* VPatternWidget::selectedPattern()
void VPatternWidget::importPattern()
{
- VPattern* pattern = KarbonFactory::rServer()->addPattern( KFileDialog::getOpenFileName( QString::null,
+ VPattern* pattern = KarbonFactory::rServer()->addPattern( KFileDialog::getOpenFileName( TQString(),
"*.jpg *.gif *.png *.tif *.xpm *.bmp", this, i18n( "Choose Pattern to Add" ) ) );
if( pattern )
m_patternChooser->addItem( pattern );
@@ -117,13 +117,13 @@ void VPatternWidget::slotButtonClicked( int id )
void VPatternWidget::patternSelected( KoIconItem* item )
{
m_pattern = (VPattern*)item;
- m_deletePatternButton->setEnabled( QFileInfo( m_pattern->tilename() ).isWritable() );
+ m_deletePatternButton->setEnabled( TQFileInfo( m_pattern->tilename() ).isWritable() );
} // VPatternWidget::patternSelected
VPatternTool::VPatternTool( KarbonView *view )
: VTool( view, "tool_pattern" ), m_state( normal ), m_handleSize( 3 ), m_active( false )
{
- QPtrList<KoIconItem> patterns = KarbonFactory::rServer()->patterns();
+ TQPtrList<KoIconItem> patterns = KarbonFactory::rServer()->patterns();
m_optionsWidget = new VPatternWidget( &patterns, this );
registerTool( this );
} // VPatternTool::VPatternTool
@@ -140,7 +140,7 @@ VPatternTool::activate()
m_state = normal;
VTool::activate();
view()->statusMessage()->setText( i18n( "Pattern" ) );
- view()->setCursor( QCursor( Qt::crossCursor ) );
+ view()->setCursor( TQCursor( TQt::crossCursor ) );
if( view() )
{
@@ -150,10 +150,10 @@ VPatternTool::activate()
VStrokeFillPreview* preview = view()->strokeFillPreview();
if( preview )
{
- connect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) );
- connect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) );
+ connect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) );
+ connect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) );
}
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -169,18 +169,18 @@ VPatternTool::deactivate()
VStrokeFillPreview* preview = view()->strokeFillPreview();
if( preview )
{
- disconnect( preview, SIGNAL( fillSelected() ), this, SLOT( targetChanged() ) );
- disconnect( preview, SIGNAL( strokeSelected() ), this, SLOT( targetChanged() ) );
+ disconnect( preview, TQT_SIGNAL( fillSelected() ), this, TQT_SLOT( targetChanged() ) );
+ disconnect( preview, TQT_SIGNAL( strokeSelected() ), this, TQT_SLOT( targetChanged() ) );
}
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
-QString
+TQString
VPatternTool::contextHelp()
{
- QString s = i18n( "<qt><b>Pattern tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Pattern tool:</b><br>" );
s += i18n( "<i>Click</i> on the pattern you want in the chooser.<br>" );
s += i18n( "<i>Click and drag</i> to choose the pattern vector.</qt>" );
s += i18n( "<i>Press i or Shift+i</i> to decrease or increase the handle size.<br>" );
@@ -193,9 +193,9 @@ void VPatternTool::draw()
return;
VPainter *painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
- painter->setPen( Qt::DotLine );
+ painter->setPen( TQt::DotLine );
// differentiate between moving a handle and creating a complete new vector
if( m_state == moveOrigin || m_state == moveVector )
@@ -266,9 +266,9 @@ VPatternTool::draw( VPainter* painter )
m_origin = KoRect( s.x()-m_handleSize, s.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize );
m_vector = KoRect( e.x()-m_handleSize, e.y()-m_handleSize, 2*m_handleSize, 2*m_handleSize );
- painter->setPen( Qt::blue.light() );
- painter->setBrush( Qt::blue.light() );
- painter->setRasterOp( Qt::XorROP );
+ painter->setPen( TQt::blue.light() );
+ painter->setBrush( TQt::blue.light() );
+ painter->setRasterOp( TQt::XorROP );
// draw the pattern vector
painter->newPath();
@@ -300,12 +300,12 @@ VPatternTool::mouseButtonPress()
m_current = first();
// set the apropriate editing state
- if( m_origin.contains( m_current ) )
+ if( m_origin.tqcontains( m_current ) )
{
m_state = moveOrigin;
m_fixed = m_vector.center();
}
- else if( m_vector.contains( m_current ) )
+ else if( m_vector.tqcontains( m_current ) )
{
m_state = moveVector;
m_fixed = m_origin.center();
@@ -327,7 +327,7 @@ VPatternTool::mouseButtonRelease()
if( first() == last() )
{
- if( showDialog() != QDialog::Accepted )
+ if( showDialog() != TQDialog::Accepted )
return;
}
@@ -449,7 +449,7 @@ VPatternTool::cancel()
bool
VPatternTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -459,7 +459,7 @@ VPatternTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Pattern Tool" ), "14_pattern", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Pattern Tool" ), "14_pattern", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Pattern" ) );
m_action->setExclusiveGroup( "misc" );
//m_ownAction = true;
@@ -472,19 +472,19 @@ VPatternTool::setCursor() const
if( !view() ) return;
// set a different cursor if mouse is inside the handle rects
- if( m_origin.contains( last() ) || m_vector.contains( last() ) )
- view()->setCursor( QCursor( Qt::SizeAllCursor ) );
+ if( m_origin.tqcontains( last() ) || m_vector.tqcontains( last() ) )
+ view()->setCursor( TQCursor( TQt::SizeAllCursor ) );
else
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
}
bool
-VPatternTool::keyReleased( Qt::Key key )
+VPatternTool::keyReleased( TQt::Key key )
{
// increase/decrease the handle size
switch( key )
{
- case Qt::Key_I:
+ case TQt::Key_I:
if( shiftPressed() )
m_handleSize++;
else if( m_handleSize > 3 )
@@ -494,7 +494,7 @@ VPatternTool::keyReleased( Qt::Key key )
}
if( view() )
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
return true;
}
@@ -503,7 +503,7 @@ void
VPatternTool::targetChanged()
{
if( view() )
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
#include "vpatterntool.moc"
diff --git a/karbon/tools/vpatterntool.h b/karbon/tools/vpatterntool.h
index 0a89a4d4..8812ce4f 100644
--- a/karbon/tools/vpatterntool.h
+++ b/karbon/tools/vpatterntool.h
@@ -26,16 +26,17 @@
#include "vpattern.h"
#include "KoRect.h"
-class QHButtonGroup;
-class QToolButton;
+class TQHButtonGroup;
+class TQToolButton;
class KoIconChooser;
class VPatternWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VPatternWidget( QPtrList<KoIconItem>* patterns, VTool* tool, QWidget* parent = 0L );
+ VPatternWidget( TQPtrList<KoIconItem>* patterns, VTool* tool, TQWidget* tqparent = 0L );
~VPatternWidget();
VPattern* selectedPattern();
@@ -49,9 +50,9 @@ public slots:
private:
KoIconChooser* m_patternChooser;
- QHButtonGroup* m_buttonGroup;
- QToolButton* m_importPatternButton;
- QToolButton* m_deletePatternButton;
+ TQHButtonGroup* m_buttonGroup;
+ TQToolButton* m_importPatternButton;
+ TQToolButton* m_deletePatternButton;
VTool* m_tool;
VPattern* m_pattern;
}; // VPatternWidget
@@ -60,6 +61,7 @@ private:
class VPatternTool : public VTool
{
Q_OBJECT
+ TQ_OBJECT
public:
VPatternTool( KarbonView *view );
@@ -69,8 +71,8 @@ public:
virtual void deactivate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Pattern Tool" ); }
- virtual QString contextHelp();
+ virtual TQString uiname() { return i18n( "Pattern Tool" ); }
+ virtual TQString contextHelp();
virtual bool showDialog() const;
virtual void draw( VPainter* painter );
@@ -86,7 +88,7 @@ protected:
virtual void mouseDragShiftReleased(); */
virtual void cancel();
virtual void setCursor() const;
- virtual bool keyReleased( Qt::Key key );
+ virtual bool keyReleased( TQt::Key key );
/**
* Determines the actual pattern to be edited.
diff --git a/karbon/tools/vpenciltool.cc b/karbon/tools/vpenciltool.cc
index 3a18fcb0..7347e0f9 100644
--- a/karbon/tools/vpenciltool.cc
+++ b/karbon/tools/vpenciltool.cc
@@ -19,14 +19,14 @@
*/
#include <math.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qwidgetstack.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqwidgetstack.h>
#include <klocale.h>
#include <knuminput.h>
@@ -45,45 +45,45 @@
#include <render/vpainter.h>
#include <render/vpainterfactory.h>
#include "vpenciltool.h"
-#include <commands/vshapecmd.h>
+#include <commands/vtqshapecmd.h>
#include "vcurvefit.h"
#include "vpenciltool.moc"
-VPencilOptionsWidget::VPencilOptionsWidget( KarbonView*view, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Pencil Settings" ), Ok | Cancel ), m_view( view )
+VPencilOptionsWidget::VPencilOptionsWidget( KarbonView*view, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Pencil Settings" ), Ok | Cancel ), m_view( view )
{
- QVBox *vbox = new QVBox( this );
+ TQVBox *vbox = new TQVBox( this );
- m_combo = new QComboBox( vbox );
+ m_combo = new TQComboBox( vbox );
m_combo->insertItem( i18n( "Raw" ) );
m_combo->insertItem( i18n( "Curve" ) );
m_combo->insertItem( i18n( "Straight" ) );
- m_widgetStack = new QWidgetStack( vbox );
+ m_widgetStack = new TQWidgetStack( vbox );
- QGroupBox *group1 = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
+ TQGroupBox *group1 = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
m_widgetStack->addWidget( group1, 1 );
- m_optimizeRaw = new QCheckBox( i18n( "Optimize" ), group1 );
+ m_optimizeRaw = new TQCheckBox( i18n( "Optimize" ), group1 );
group1->setInsideMargin( 4 );
group1->setInsideSpacing( 2 );
- QGroupBox *group2 = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
+ TQGroupBox *group2 = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
m_widgetStack->addWidget( group2, 2 );
- QVBox *vbox2 = new QVBox( group2 );
+ TQVBox *vbox2 = new TQVBox( group2 );
- m_optimizeCurve = new QCheckBox( i18n( "Optimize" ), vbox2 );
+ m_optimizeCurve = new TQCheckBox( i18n( "Optimize" ), vbox2 );
m_fittingError = new KDoubleNumInput( 0.0, 400.0, 4.00, 0.50, 3, vbox2 );
m_fittingError->setLabel( i18n( "Exactness:" ) );
group2->setInsideMargin( 4 );
group2->setInsideSpacing( 2 );
- QGroupBox *group3 = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
+ TQGroupBox *group3 = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), m_widgetStack );
m_widgetStack->addWidget( group3, 3 );
m_combineAngle = new KDoubleNumInput( 0.0, 360.0, 0.10, 0.50, 3, group3 );
@@ -93,7 +93,7 @@ VPencilOptionsWidget::VPencilOptionsWidget( KarbonView*view, QWidget* parent, co
group3->setInsideMargin( 4 );
group3->setInsideSpacing( 2 );
- connect( m_combo, SIGNAL( activated( int ) ), this, SLOT( selectMode() ) );
+ connect( m_combo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( selectMode() ) );
//Set the default settings
m_mode = VPencilTool::CURVE;
@@ -147,7 +147,7 @@ VPencilTool::VPencilTool( KarbonView *view )
m_mode = CURVE;
m_optimize = true;
m_combineAngle = 3.0f;
- m_cursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_cursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
}
VPencilTool::~VPencilTool()
@@ -155,10 +155,10 @@ VPencilTool::~VPencilTool()
delete m_cursor;
}
-QString
+TQString
VPencilTool::contextHelp()
{
- QString s = i18n( "<qt><b>Pencil tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Pencil tool:</b><br>" );
s += i18n( "- <i>Click</i> to begin drawing, release when you have finished.");
s += i18n( "- Press <i>Enter</i> or <i>double click</i> to end the polyline.</qt>" );
@@ -185,8 +185,8 @@ VPencilTool::deactivate()
VPath* line = 0L;
- QPtrList<KoPoint> complete;
- QPtrList<KoPoint> *points = &m_Points;
+ TQPtrList<KoPoint> complete;
+ TQPtrList<KoPoint> *points = &m_Points;
if( m_Points.count() > 1 )
{
@@ -216,7 +216,7 @@ VPencilTool::deactivate()
while( ( nextp = m_Points.next() ) )
{
float angle = ANGLE( complete.last(), nextp );
- if( QABS( angle - langle ) < cangle )
+ if( TQABS( angle - langle ) < cangle )
complete.removeLast();
complete.append(nextp);
langle=angle;
@@ -273,7 +273,7 @@ void
VPencilTool::draw()
{
VPainter* painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
m_mode = m_optionWidget->currentMode();
m_optimize = m_optionWidget->optimize();
@@ -392,7 +392,7 @@ VPencilTool::accept()
bool
VPencilTool::showDialog() const
{
- return m_optionWidget->exec() == QDialog::Accepted;
+ return m_optionWidget->exec() == TQDialog::Accepted;
}
void
@@ -402,7 +402,7 @@ VPencilTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Pencil Tool" ), "14_pencil", Qt::SHIFT+Qt::Key_P, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Pencil Tool" ), "14_pencil", TQt::SHIFT+TQt::Key_P, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Pencil" ) );
m_action->setExclusiveGroup( "freehand" );
//m_ownAction = true;
diff --git a/karbon/tools/vpenciltool.h b/karbon/tools/vpenciltool.h
index d8eeb77a..d2bca744 100644
--- a/karbon/tools/vpenciltool.h
+++ b/karbon/tools/vpenciltool.h
@@ -22,8 +22,8 @@
#define __VPENCILTOOL_H__
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include <klocale.h>
#include <kdialogbase.h>
@@ -32,21 +32,22 @@
#include "vtool.h"
-class QLabel;
-class QWidget;
+class TQLabel;
+class TQWidget;
class VPath;
class KarbonView;
-class QCheckBox;
-class QWidgetStack;
-class QComboBox;
+class TQCheckBox;
+class TQWidgetStack;
+class TQComboBox;
class KDoubleNumInput;
-class QCursor;
+class TQCursor;
class VPencilOptionsWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VPencilOptionsWidget( KarbonView*view, QWidget* parent = 0L, const char* name = 0L );
+ VPencilOptionsWidget( KarbonView*view, TQWidget* tqparent = 0L, const char* name = 0L );
int currentMode();
bool optimize();
@@ -58,12 +59,12 @@ class VPencilOptionsWidget : public KDialogBase
private:
KarbonView *m_view;
- QCheckBox *m_optimizeRaw;
- QCheckBox *m_optimizeCurve;
+ TQCheckBox *m_optimizeRaw;
+ TQCheckBox *m_optimizeCurve;
KDoubleNumInput *m_combineAngle;
KDoubleNumInput *m_fittingError;
- QWidgetStack *m_widgetStack;
- QComboBox *m_combo;
+ TQWidgetStack *m_widgetStack;
+ TQComboBox *m_combo;
int m_mode;
};
@@ -88,8 +89,8 @@ class VPencilTool : public VTool
virtual void deactivate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Pencil Tool" ); }
- virtual QString contextHelp();
+ virtual TQString uiname() { return i18n( "Pencil Tool" ); }
+ virtual TQString contextHelp();
virtual enumToolType toolType() { return TOOL_FREEHAND; }
virtual bool showDialog() const;
@@ -124,7 +125,7 @@ class VPencilTool : public VTool
/**
* The list of this polyline points.
*/
- QPtrList<KoPoint> m_Points;
+ TQPtrList<KoPoint> m_Points;
/**
* The start of the last drawn vector.
@@ -154,7 +155,7 @@ class VPencilTool : public VTool
VPencilOptionsWidget *m_optionWidget;
private:
- QCursor* m_cursor;
+ TQCursor* m_cursor;
};
#endif
diff --git a/karbon/tools/vpolygontool.cc b/karbon/tools/vpolygontool.cc
index fcd0faeb..a9584be6 100644
--- a/karbon/tools/vpolygontool.cc
+++ b/karbon/tools/vpolygontool.cc
@@ -18,8 +18,8 @@
*/
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <kdialogbase.h>
#include <klocale.h>
@@ -27,18 +27,18 @@
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vstar.h>
+#include <tqshapes/vstar.h>
#include "vpolygontool.h"
-VPolygonTool::VPolygonOptionsWidget::VPolygonOptionsWidget( KarbonView *view, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Polygon" ), Ok | Cancel ), m_view(view)
+VPolygonTool::VPolygonOptionsWidget::VPolygonOptionsWidget( KarbonView *view, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Polygon" ), Ok | Cancel ), m_view(view)
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Radius:" ), group );
+ new TQLabel( i18n( "Radius:" ), group );
m_radius = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 50.0, KoUnit::U_MM );
refreshUnit();
- new QLabel( i18n( "Edges:" ), group );
+ new TQLabel( i18n( "Edges:" ), group );
m_edges = new KIntSpinBox( group );
m_edges->setMinValue( 3 );
@@ -100,12 +100,12 @@ VPolygonTool::refreshUnit()
}
void
-VPolygonTool::arrowKeyReleased( Qt::Key key )
+VPolygonTool::arrowKeyReleased( TQt::Key key )
{
int change = 0;
- if( key == Qt::Key_Up )
+ if( key == TQt::Key_Up )
change = 1;
- else if( key == Qt::Key_Down )
+ else if( key == TQt::Key_Down )
change = -1;
if( change != 0 )
@@ -119,7 +119,7 @@ VPolygonTool::arrowKeyReleased( Qt::Key key )
}
VPath*
-VPolygonTool::shape( bool interactive ) const
+VPolygonTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -144,7 +144,7 @@ VPolygonTool::shape( bool interactive ) const
bool
VPolygonTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -154,11 +154,11 @@ VPolygonTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- KShortcut shortcut( Qt::Key_Plus );
- shortcut.append(KShortcut( Qt::Key_F9 ) );
- m_action = new KRadioAction( i18n( "Polygon Tool" ), "14_polygon", shortcut, this, SLOT( activate() ), collection, name() );
+ KShortcut shortcut( TQt::Key_Plus );
+ shortcut.append(KShortcut( TQt::Key_F9 ) );
+ m_action = new KRadioAction( i18n( "Polygon Tool" ), "14_polygon", shortcut, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Polygon" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vpolygontool.h b/karbon/tools/vpolygontool.h
index 028565db..c74ad182 100644
--- a/karbon/tools/vpolygontool.h
+++ b/karbon/tools/vpolygontool.h
@@ -22,7 +22,7 @@
#include <kdialogbase.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KoUnitDoubleSpinBox;
class KIntSpinBox;
@@ -36,19 +36,19 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Polygon Tool" ); }
+ virtual TQString uiname() { return i18n( "Polygon Tool" ); }
- virtual VPath *shape( bool interactive = false ) const;
+ virtual VPath *tqshape( bool interactive = false ) const;
void refreshUnit();
- virtual void arrowKeyReleased( Qt::Key );
+ virtual void arrowKeyReleased( TQt::Key );
private:
class VPolygonOptionsWidget : public KDialogBase
{
public:
- VPolygonOptionsWidget( KarbonView *view, QWidget *parent = 0L, const char *name = 0L );
+ VPolygonOptionsWidget( KarbonView *view, TQWidget *tqparent = 0L, const char *name = 0L );
double radius() const;
uint edges() const;
diff --git a/karbon/tools/vpolylinetool.cc b/karbon/tools/vpolylinetool.cc
index 59b72a0e..673503f9 100644
--- a/karbon/tools/vpolylinetool.cc
+++ b/karbon/tools/vpolylinetool.cc
@@ -18,9 +18,9 @@
*/
-#include <qcursor.h>
-#include <qevent.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqlabel.h>
#include <klocale.h>
@@ -35,7 +35,7 @@
#include <render/vpainter.h>
#include <render/vpainterfactory.h>
#include "vpolylinetool.h"
-#include <commands/vshapecmd.h>
+#include <commands/vtqshapecmd.h>
#include <commands/vcommand.h>
#include <widgets/vcanvas.h>
@@ -44,7 +44,7 @@ VPolylineTool::VPolylineTool( KarbonView *view )
{
m_bezierPoints.setAutoDelete( true );
registerTool( this );
- m_crossCursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_crossCursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
}
VPolylineTool::~VPolylineTool()
@@ -52,10 +52,10 @@ VPolylineTool::~VPolylineTool()
delete m_crossCursor;
}
-QString
+TQString
VPolylineTool::contextHelp()
{
- QString s = i18n( "<qt><b>Polyline tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Polyline tool:</b><br>" );
s += i18n( "- <i>Click</i> to add a node and <i>drag</i> to set its bezier vector.<br>" );
s += i18n( "- Press <i>Ctrl</i> while dragging to edit the previous bezier vector.<br>" );
s += i18n( "- Press <i>Shift</i> while dragging to change the curve in a straight line.<br>" );
@@ -76,7 +76,7 @@ VPolylineTool::activate()
m_bezierPoints.clear();
m_close = false;
- connect( view()->part()->commandHistory(), SIGNAL(commandExecuted()), this, SLOT(commandExecuted()) );
+ connect( view()->part()->commandHistory(), TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(commandExecuted()) );
}
void
@@ -145,14 +145,14 @@ VPolylineTool::deactivate()
createObject();
- disconnect( view()->part()->commandHistory(), SIGNAL(commandExecuted()), this, SLOT(commandExecuted()) );
+ disconnect( view()->part()->commandHistory(), TQT_SIGNAL(commandExecuted()), this, TQT_SLOT(commandExecuted()) );
}
void
VPolylineTool::draw()
{
VPainter* painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
if( m_bezierPoints.count() > 2 )
{
@@ -173,21 +173,21 @@ VPolylineTool::drawBezierVector( KoPoint& start, KoPoint& end )
float zoomFactor = view()->zoom();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
painter->newPath();
-/* VStroke stroke( Qt::blue, 0L, 1.0 );
- QValueList<float> array;
+/* VStroke stroke( TQt::blue, 0L, 1.0 );
+ TQValueList<float> array;
array << 2.0 << 3.0;
stroke.dashPattern().setArray( array );*/
- painter->setPen( Qt::DotLine /*stroke*/ );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQt::DotLine /*stroke*/ );
+ painter->setBrush( TQt::NoBrush );
painter->moveTo( start );
painter->lineTo( end );
painter->strokePath();
- painter->setRasterOp( Qt::XorROP );
+ painter->setRasterOp( TQt::XorROP );
painter->newPath();
- painter->setPen( Qt::yellow );
+ painter->setPen( TQt::yellow );
float width = 2.0;
@@ -262,10 +262,10 @@ VPolylineTool::mouseButtonRelease()
VPainter* painter = view()->painterFactory()->editpainter();
painter->save();
painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::XorROP );
- VStroke stroke( Qt::yellow, 0L, 1.0 );
+ painter->setRasterOp( TQt::XorROP );
+ VStroke stroke( TQt::yellow, 0L, 1.0 );
painter->setPen( stroke );
- painter->setBrush( Qt::yellow );
+ painter->setBrush( TQt::yellow );
painter->newPath();
painter->drawNode( m_lastVectorStart, 2 );
painter->strokePath();
@@ -486,9 +486,9 @@ VPolylineTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- KShortcut shortcut( Qt::Key_Plus );
- shortcut.append( KShortcut( Qt::Key_F9 ) );
- m_action = new KRadioAction( i18n( "Polyline Tool" ), "14_polyline", shortcut, this, SLOT( activate() ), collection, name() );
+ KShortcut shortcut( TQt::Key_Plus );
+ shortcut.append( KShortcut( TQt::Key_F9 ) );
+ m_action = new KRadioAction( i18n( "Polyline Tool" ), "14_polyline", shortcut, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Polyline" ) );
m_action->setExclusiveGroup( "freehand" );
//m_ownAction = true;
diff --git a/karbon/tools/vpolylinetool.h b/karbon/tools/vpolylinetool.h
index 83e4a562..2d39250c 100644
--- a/karbon/tools/vpolylinetool.h
+++ b/karbon/tools/vpolylinetool.h
@@ -22,18 +22,18 @@
#define __VPOLYLINETOOL_H__
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "KoPoint.h"
#include "vtool.h"
-class QLabel;
-class QWidget;
+class TQLabel;
+class TQWidget;
class VPath;
-class QCursor;
+class TQCursor;
/**
* The polyline tool.
@@ -49,6 +49,7 @@ class QCursor;
class VPolylineTool : public VTool
{
Q_OBJECT
+ TQ_OBJECT
public:
VPolylineTool( KarbonView *view );
@@ -58,8 +59,8 @@ class VPolylineTool : public VTool
virtual void activate();
virtual void deactivate();
- virtual QString uiname() { return i18n( "Polyline Tool" ); }
- virtual QString contextHelp();
+ virtual TQString uiname() { return i18n( "Polyline Tool" ); }
+ virtual TQString contextHelp();
virtual enumToolType toolType() { return TOOL_FREEHAND; }
protected:
@@ -102,7 +103,7 @@ class VPolylineTool : public VTool
/**
* The list of this polyline points.
*/
- QPtrList<KoPoint> m_bezierPoints;
+ TQPtrList<KoPoint> m_bezierPoints;
/**
* The start of the last drawn vector.
@@ -122,7 +123,7 @@ class VPolylineTool : public VTool
void commandExecuted();
private:
- QCursor* m_crossCursor;
+ TQCursor* m_crossCursor;
};
#endif
diff --git a/karbon/tools/vrectangletool.cc b/karbon/tools/vrectangletool.cc
index e65f3e88..9d19edd2 100644
--- a/karbon/tools/vrectangletool.cc
+++ b/karbon/tools/vrectangletool.cc
@@ -17,28 +17,28 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <knuminput.h>
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vrectangle.h>
+#include <tqshapes/vrectangle.h>
#include "vrectangletool.h"
#include <KoUnitWidgets.h>
-VRectangleTool::VRectangleOptionsWidget::VRectangleOptionsWidget( KarbonPart *part, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Rectangle" ), Ok | Cancel ), m_part( part )
+VRectangleTool::VRectangleOptionsWidget::VRectangleOptionsWidget( KarbonPart *part, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Rectangle" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
// add width/height-input:
- m_widthLabel = new QLabel( i18n( "object width", "Width:" ), group );
+ m_widthLabel = new TQLabel( i18n( "object width", "Width:" ), group );
m_width = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
- m_heightLabel = new QLabel( i18n( "Height:" ), group );
+ m_heightLabel = new TQLabel( i18n( "Height:" ), group );
m_height = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
refreshUnit();
@@ -101,7 +101,7 @@ VRectangleTool::refreshUnit()
}
VPath *
-VRectangleTool::shape( bool interactive ) const
+VRectangleTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -124,7 +124,7 @@ VRectangleTool::shape( bool interactive ) const
bool
VRectangleTool::showDialog() const
{
- return m_optionWidget->exec() == QDialog::Accepted;
+ return m_optionWidget->exec() == TQDialog::Accepted;
}
void
@@ -134,9 +134,9 @@ VRectangleTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Rectangle Tool" ), "14_rectangle", Qt::Key_Plus+Qt::Key_F9, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Rectangle Tool" ), "14_rectangle", TQt::Key_Plus+TQt::Key_F9, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Rectangle" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vrectangletool.h b/karbon/tools/vrectangletool.h
index d5e45c30..d38ead75 100644
--- a/karbon/tools/vrectangletool.h
+++ b/karbon/tools/vrectangletool.h
@@ -24,10 +24,10 @@
#include <klocale.h>
#include <kdialogbase.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KarbonView;
-class QLabel;
+class TQLabel;
class KoUnitDoubleSpinBox;
class VRectangleTool : public VShapeTool
@@ -38,8 +38,8 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Rectangle Tool" ); }
- virtual VPath* shape( bool interactive = false ) const;
+ virtual TQString uiname() { return i18n( "Rectangle Tool" ); }
+ virtual VPath* tqshape( bool interactive = false ) const;
void refreshUnit();
@@ -47,7 +47,7 @@ private:
class VRectangleOptionsWidget : public KDialogBase
{
public:
- VRectangleOptionsWidget( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VRectangleOptionsWidget( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
double width() const;
double height() const;
@@ -59,8 +59,8 @@ private:
KoUnitDoubleSpinBox *m_width;
KoUnitDoubleSpinBox *m_height;
KarbonPart *m_part;
- QLabel *m_heightLabel;
- QLabel *m_widthLabel;
+ TQLabel *m_heightLabel;
+ TQLabel *m_widthLabel;
};
VRectangleOptionsWidget *m_optionWidget;
diff --git a/karbon/tools/vrotatetool.cc b/karbon/tools/vrotatetool.cc
index 987a7b60..cc0a8c73 100644
--- a/karbon/tools/vrotatetool.cc
+++ b/karbon/tools/vrotatetool.cc
@@ -19,8 +19,8 @@
#include <math.h>
-#include <qcursor.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <KoRect.h>
@@ -50,13 +50,13 @@ VRotateTool::~VRotateTool()
void
VRotateTool::activate()
{
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
view()->part()->document().selection()->setState( VObject::selected );
view()->part()->document().selection()->showHandle( false );
VTool::activate();
}
-QString
+TQString
VRotateTool::statusText()
{
return i18n( "Rotate" );
@@ -67,7 +67,7 @@ VRotateTool::draw()
{
VPainter* painter = view()->painterFactory()->editpainter();
//painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
VObjectListIterator itr = m_objects;
for( ; itr.current(); ++itr )
@@ -117,7 +117,7 @@ VRotateTool::cancel()
if ( isDragging() )
{
draw();
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -166,7 +166,7 @@ VRotateTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Rotate Tool" ), "14_rotate", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Rotate Tool" ), "14_rotate", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Rotate" ) );
m_action->setExclusiveGroup( "manipulation" );
//m_ownAction = true;
diff --git a/karbon/tools/vrotatetool.h b/karbon/tools/vrotatetool.h
index 46e2c98b..1829936b 100644
--- a/karbon/tools/vrotatetool.h
+++ b/karbon/tools/vrotatetool.h
@@ -33,9 +33,9 @@ public:
virtual void activate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Rotate Tool" ); }
+ virtual TQString uiname() { return i18n( "Rotate Tool" ); }
virtual enumToolType toolType() { return TOOL_MANIPULATION; }
- virtual QString statusText();
+ virtual TQString statusText();
virtual uint priority() { return 0; }
protected:
diff --git a/karbon/tools/vroundrecttool.cc b/karbon/tools/vroundrecttool.cc
index af21d4d9..a211114f 100644
--- a/karbon/tools/vroundrecttool.cc
+++ b/karbon/tools/vroundrecttool.cc
@@ -18,35 +18,35 @@
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vrectangle.h>
+#include <tqshapes/vrectangle.h>
#include "vroundrecttool.h"
#include "KoUnitWidgets.h"
#include <kgenericfactory.h>
-VRoundRectTool::VRoundRectOptionsWidget::VRoundRectOptionsWidget( KarbonPart *part, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Round Rect" ), Ok | Cancel ), m_part( part )
+VRoundRectTool::VRoundRectOptionsWidget::VRoundRectOptionsWidget( KarbonPart *part, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Round Rect" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "object width", "Width:" ), group );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ new TQLabel( i18n( "object width", "Width:" ), group );
KoUnit::Unit unit = KoUnit::U_CM;
m_width = new KoUnitDoubleSpinBox( group, 0.0, KoUnit::fromUserValue( 1000.0, unit ), KoUnit::fromUserValue( 0.5, unit ), KoUnit::fromUserValue( 10.0, unit ), unit );
- new QLabel( i18n( "Height (%1):" ).arg(KoUnit::unitName( m_part->unit() )), group );
+ new TQLabel( i18n( "Height (%1):" ).tqarg(KoUnit::unitName( m_part->unit() )), group );
m_height = new KoUnitDoubleSpinBox( group, 0.0, KoUnit::fromUserValue( 1000.0, unit ), KoUnit::fromUserValue( 0.5, unit ), KoUnit::fromUserValue( 10.0, unit ), unit );
- new QLabel( i18n( "Edge radius X:" ), group );
+ new TQLabel( i18n( "Edge radius X:" ), group );
m_roundx = new KoUnitDoubleSpinBox( group, 0.0, KoUnit::fromUserValue( 100.0, unit ), KoUnit::fromUserValue( 0.1, unit ), KoUnit::fromUserValue( 1.0, unit ), unit );
- new QLabel( i18n( "Edge radius Y:" ), group );
+ new TQLabel( i18n( "Edge radius Y:" ), group );
m_roundy = new KoUnitDoubleSpinBox( group, 0.0, KoUnit::fromUserValue( 100.0, unit ), KoUnit::fromUserValue( 0.1, unit ), KoUnit::fromUserValue( 1.0, unit ), unit );
group->setInsideMargin( 4 );
@@ -132,7 +132,7 @@ void VRoundRectTool::refreshUnit()
}
VPath*
-VRoundRectTool::shape( bool interactive ) const
+VRoundRectTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -160,7 +160,7 @@ VRoundRectTool::shape( bool interactive ) const
bool
VRoundRectTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -170,9 +170,9 @@ VRoundRectTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Round Rectangle Tool" ), "14_roundrect", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Round Rectangle Tool" ), "14_roundrect", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Round Rectangle" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vroundrecttool.h b/karbon/tools/vroundrecttool.h
index 75e86796..9ab0c3fb 100644
--- a/karbon/tools/vroundrecttool.h
+++ b/karbon/tools/vroundrecttool.h
@@ -25,11 +25,11 @@
#include <knuminput.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KarbonView;
class KarbonPart;
-class QLabel;
+class TQLabel;
class KoUnitDoubleSpinBox;
@@ -41,9 +41,9 @@ public:
virtual bool showDialog() const;
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Round Rectangle Tool" ); }
+ virtual TQString uiname() { return i18n( "Round Rectangle Tool" ); }
- virtual VPath* shape( bool interactive = false ) const;
+ virtual VPath* tqshape( bool interactive = false ) const;
void refreshUnit();
@@ -51,7 +51,7 @@ private:
class VRoundRectOptionsWidget : public KDialogBase
{
public:
- VRoundRectOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char *name = 0L );
+ VRoundRectOptionsWidget( KarbonPart *part, TQWidget *tqparent = 0L, const char *name = 0L );
double width() const;
double height() const;
diff --git a/karbon/tools/vselectnodestool.cc b/karbon/tools/vselectnodestool.cc
index 1c628faa..4d1511ce 100644
--- a/karbon/tools/vselectnodestool.cc
+++ b/karbon/tools/vselectnodestool.cc
@@ -19,8 +19,8 @@
#include <math.h>
-#include <qcursor.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <KoPoint.h>
@@ -63,18 +63,18 @@ VSelectNodesTool::activate()
view()->part()->document().selection()->setSelectObjects( false );
// deselect all nodes
view()->part()->document().selection()->selectNodes( false );
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
VTool::activate();
}
-QString
+TQString
VSelectNodesTool::statusText()
{
if( m_state == normal )
return i18n( "Editing Nodes" );
else
- return QString( "" );
+ return TQString( "" );
}
void
@@ -82,11 +82,11 @@ VSelectNodesTool::draw()
{
VPainter *painter = view()->painterFactory()->editpainter();
painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
if( m_state == dragging )
{
- painter->setPen( Qt::DotLine );
+ painter->setPen( TQt::DotLine );
painter->newPath();
painter->moveTo( KoPoint( m_first.x(), m_first.y() ) );
painter->lineTo( KoPoint( m_current.x(), m_first.y() ) );
@@ -115,12 +115,12 @@ VSelectNodesTool::setCursor() const
KoRect selrect = calcSelRect( last() );
- QPtrList<VSegment> segments = view()->part()->document().selection()->getSegments( selrect );
+ TQPtrList<VSegment> segments = view()->part()->document().selection()->getSegments( selrect );
if( segments.count() > 0 )
{
VSegment* seg = segments.at( 0 );
for( int i = 0; i < seg->degree(); ++i )
- if( seg->pointIsSelected( i ) && selrect.contains( seg->point( i ) ) )
+ if( seg->pointIsSelected( i ) && selrect.tqcontains( seg->point( i ) ) )
{
view()->setCursor( VCursor::needleMoveArrow() );
break;
@@ -141,7 +141,7 @@ VSelectNodesTool::mouseButtonPress()
recalc();
view()->part()->document().selection()->setState( VObject::edit );
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
view()->part()->document().selection()->setState( VObject::selected );
VSelection* selection = view()->part()->document().selection();
@@ -149,7 +149,7 @@ VSelectNodesTool::mouseButtonPress()
KoRect selrect = calcSelRect( m_current );
// get segments with control points inside selection rect
- QPtrList<VSegment> segments = selection->getSegments( selrect );
+ TQPtrList<VSegment> segments = selection->getSegments( selrect );
if( segments.count() > 0 )
{
VSegment *seg = segments.at( 0 );
@@ -158,16 +158,16 @@ VSelectNodesTool::mouseButtonPress()
// allow moving bezier points only if one of the bezier points is within the selection rect
// and no neighboring knot is selected
- if( segments.count() == 1 && ! selrect.contains( seg->knot() ) && ! seg->knotIsSelected()
+ if( segments.count() == 1 && ! selrect.tqcontains( seg->knot() ) && ! seg->knotIsSelected()
&& ( prev && ! prev->knotIsSelected() ) )
{
- if( selrect.contains( seg->point( 1 ) ) )
+ if( selrect.tqcontains( seg->point( 1 ) ) )
{
m_state = movingbezier1;
if( next )
next->selectPoint( 0, false );
}
- else if( selrect.contains( seg->point( 0 ) ) )
+ else if( selrect.tqcontains( seg->point( 0 ) ) )
{
m_state = movingbezier2;
if( prev )
@@ -180,7 +180,7 @@ VSelectNodesTool::mouseButtonPress()
{
for( int i = 0; i < seg->degree(); ++i )
{
- if( seg->pointIsSelected( i ) && selrect.contains( seg->point( i ) ) )
+ if( seg->pointIsSelected( i ) && selrect.tqcontains( seg->point( i ) ) )
{
m_state = moving;
break;
@@ -197,7 +197,7 @@ VSelectNodesTool::mouseButtonPress()
{
for( int i = 0; i < seg->degree(); ++i )
{
- if( selrect.contains( seg->point( i ) ) )
+ if( selrect.tqcontains( seg->point( i ) ) )
{
KoPoint vDist = seg->point( i ) - m_current;
double dist = vDist.x()*vDist.x() + vDist.y()*vDist.y();
@@ -228,21 +228,21 @@ VSelectNodesTool::rightMouseButtonPress()
recalc();
view()->part()->document().selection()->setState( VObject::edit );
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
view()->part()->document().selection()->setState( VObject::selected );
draw();
}
bool
-VSelectNodesTool::keyReleased( Qt::Key key )
+VSelectNodesTool::keyReleased( TQt::Key key )
{
VSelection* selection = view()->part()->document().selection();
switch( key )
{
// increase/decrease the handle size
- case Qt::Key_I:
+ case TQt::Key_I:
{
uint handleSize = selection->handleSize();
if( shiftPressed() )
@@ -251,7 +251,7 @@ VSelectNodesTool::keyReleased( Qt::Key key )
selection->setHandleSize( --handleSize );
}
break;
- case Qt::Key_Delete:
+ case TQt::Key_Delete:
if( selection->objects().count() > 0 )
view()->part()->addCommand( new VDeleteNodeCmd( &view()->part()->document() ), true );
break;
@@ -259,7 +259,7 @@ VSelectNodesTool::keyReleased( Qt::Key key )
}
if( view() )
- view()->repaintAll( selection->boundingBox() );
+ view()->tqrepaintAll( selection->boundingBox() );
return true;
}
@@ -280,7 +280,7 @@ VSelectNodesTool::mouseButtonRelease()
selection->append( selrect.normalize(), false, true );
view()->selectionChanged();
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
m_state = normal;
}
@@ -297,7 +297,7 @@ VSelectNodesTool::rightMouseButtonRelease()
selection->take( selrect.normalize(), false, false );
view()->selectionChanged();
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
m_state = normal;
}
@@ -318,23 +318,23 @@ VSelectNodesTool::mouseDragRelease()
{
view()->part()->document().selection()->setState( VObject::selected );
VCommand *cmd;
- QPtrList<VSegment> segments;
+ TQPtrList<VSegment> segments;
KoPoint _last = view()->canvasWidget()->snapToGrid( last() );
if( m_state == movingbezier1 || m_state == movingbezier2 )
{
KoRect selrect = calcSelRect( m_first );
segments = view()->part()->document().selection()->getSegments( selrect );
cmd = new VTranslateBezierCmd( &view()->part()->document(), segments.at( 0 ),
- qRound( ( _last.x() - m_first.x() ) ),
- qRound( ( _last.y() - m_first.y() ) ),
+ tqRound( ( _last.x() - m_first.x() ) ),
+ tqRound( ( _last.y() - m_first.y() ) ),
m_state == movingbezier2 );
}
else
{
cmd = new VTranslatePointCmd(
&view()->part()->document(),
- qRound( ( _last.x() - m_first.x() ) ),
- qRound( ( _last.y() - m_first.y() ) ) );
+ tqRound( ( _last.x() - m_first.x() ) ),
+ tqRound( ( _last.y() - m_first.y() ) ) );
}
view()->part()->addCommand( cmd, true );
m_state = normal;
@@ -368,7 +368,7 @@ VSelectNodesTool::mouseDragRelease()
false, false );
}
view()->selectionChanged();
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
m_state = normal;
}
}
@@ -381,7 +381,7 @@ VSelectNodesTool::cancel()
{
draw();
m_state = normal;
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -398,7 +398,7 @@ VSelectNodesTool::recalc()
double distx = _last.x() - m_first.x();
double disty = _last.y() - m_first.y();
// move operation
- QWMatrix mat;
+ TQWMatrix mat;
mat.translate( distx, disty );
// Copy selected objects and transform:
@@ -428,7 +428,7 @@ VSelectNodesTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Select Nodes Tool" ), "14_selectnodes", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Select Nodes Tool" ), "14_selectnodes", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Select Nodes" ) );
m_action->setExclusiveGroup( "select" );
//m_ownAction = true;
diff --git a/karbon/tools/vselectnodestool.h b/karbon/tools/vselectnodestool.h
index d0a5b296..f3815b2d 100644
--- a/karbon/tools/vselectnodestool.h
+++ b/karbon/tools/vselectnodestool.h
@@ -31,9 +31,9 @@ public:
virtual void activate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Select Nodes Tool" ); }
+ virtual TQString uiname() { return i18n( "Select Nodes Tool" ); }
virtual enumToolType toolType() { return TOOL_SELECT; }
- virtual QString statusText();
+ virtual TQString statusText();
virtual uint priority() { return 1; }
protected:
@@ -48,7 +48,7 @@ protected:
virtual void rightMouseButtonPress();
virtual void rightMouseButtonRelease();
- virtual bool keyReleased( Qt::Key );
+ virtual bool keyReleased( TQt::Key );
virtual void cancel();
diff --git a/karbon/tools/vselecttool.cc b/karbon/tools/vselecttool.cc
index 19338038..0609d772 100644
--- a/karbon/tools/vselecttool.cc
+++ b/karbon/tools/vselecttool.cc
@@ -20,10 +20,10 @@
#include <math.h>
#include <stdlib.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <KoPoint.h>
#include <KoRect.h>
@@ -43,16 +43,16 @@
VSelectOptionsWidget::VSelectOptionsWidget( KarbonPart *part )
: KDialogBase( 0L, "", true, i18n( "Selection" ), Ok | Cancel ), m_part( part )
{
- QButtonGroup *group = new QButtonGroup( 1, Qt::Horizontal, i18n( "Selection Mode" ), this );
+ TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Selection Mode" ), this );
- new QRadioButton( i18n( "Select in current layer" ), group );
- new QRadioButton( i18n( "Select in visible layers" ), group );
- new QRadioButton( i18n( "Select in selected layers" ), group );
+ new TQRadioButton( i18n( "Select in current layer" ), group );
+ new TQRadioButton( i18n( "Select in visible layers" ), group );
+ new TQRadioButton( i18n( "Select in selected layers" ), group );
group->setRadioButtonExclusive( true );
group->setButton( part->document().selectionMode() );
- connect( group, SIGNAL( clicked( int ) ), this, SLOT( modeChange( int ) ) );
+ connect( group, TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( modeChange( int ) ) );
group->setInsideMargin( 4 );
group->setInsideSpacing( 2 );
@@ -74,7 +74,7 @@ VSelectTool::VSelectTool( KarbonView *view )
m_objects.setAutoDelete( true );
m_optionsWidget = new VSelectOptionsWidget( view->part() );
registerTool( this );
- connect( view, SIGNAL( selectionChange() ), this, SLOT( updateStatusBar() ) );
+ connect( view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( updateStatusBar() ) );
}
VSelectTool::~VSelectTool()
@@ -86,24 +86,24 @@ void
VSelectTool::activate()
{
VTool::activate();
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
view()->part()->document().selection()->showHandle();
view()->part()->document().selection()->setSelectObjects();
view()->part()->document().selection()->setState( VObject::selected );
view()->part()->document().selection()->selectNodes();
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
updateStatusBar();
}
-QString
+TQString
VSelectTool::statusText()
{
return i18n( "Select" );
}
-QString VSelectTool::contextHelp()
+TQString VSelectTool::contextHelp()
{
- QString s = i18n( "<qt><b>Selection tool:</b><br>" );
+ TQString s = i18n( "<qt><b>Selection tool:</b><br>" );
s += i18n( "<i>Select in current layer:</i><br>The selection is made in the layer selected in the layers docker.<br><br>" );
s += i18n( "<i>Select in visible layers:</i><br>The selection is made in the visible layers (eye in the layers docker).<br><br>" );
s += i18n( "<i>Select in selected layers:</i><br>The selection is made in the checked layers in the layers docker.<br><br>" );
@@ -116,7 +116,7 @@ VSelectTool::draw()
{
VPainter *painter = view()->painterFactory()->editpainter();
//painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
KoRect rect = view()->part()->document().selection()->boundingBox();
@@ -130,7 +130,7 @@ VSelectTool::draw()
}
else if( m_state == normal )
{
- 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() ) );
@@ -151,22 +151,22 @@ VSelectTool::setCursor() const
{
case node_lt:
case node_rb:
- view()->setCursor( QCursor( Qt::SizeFDiagCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeFDiagCursor ) );
break;
case node_rt:
case node_lb:
- view()->setCursor( QCursor( Qt::SizeBDiagCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeBDiagCursor ) );
break;
case node_lm:
case node_rm:
- view()->setCursor( QCursor( Qt::SizeHorCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeHorCursor ) );
break;
case node_mt:
case node_mb:
- view()->setCursor( QCursor( Qt::SizeVerCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeVerCursor ) );
break;
default:
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
}
}
@@ -183,14 +183,14 @@ VSelectTool::mouseButtonPress()
if( m_activeNode != node_none )
m_state = scaling;
- else if( rect.contains( m_current ) && m_state == normal )
+ else if( rect.tqcontains( m_current ) && m_state == normal )
m_state = moving;
recalc();
// undraw selection bounding box
view()->part()->document().selection()->setState( VObject::edit );
- view()->repaintAll( rect );
+ view()->tqrepaintAll( rect );
view()->part()->document().selection()->setState( VObject::selected );
draw();
@@ -208,7 +208,7 @@ VSelectTool::rightMouseButtonPress()
// undraw selection bounding box
view()->part()->document().selection()->setState( VObject::edit );
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
view()->part()->document().selection()->setState( VObject::selected );
draw();
@@ -238,14 +238,14 @@ VSelectTool::rightMouseButtonRelease()
if( selector.visit( view()->part()->document() ) )
view()->part()->document().selection()->take( *newSelection.last() );
- view()->part()->repaintAllViews( view()->part()->document().selection()->boundingBox() );
+ view()->part()->tqrepaintAllViews( view()->part()->document().selection()->boundingBox() );
view()->selectionChanged();
updateStatusBar();
}
else if( view()->part()->document().selection()->objects().count() > 0 )
{
- view()->showSelectionPopupMenu( QCursor::pos() );
+ view()->showSelectionPopupMenu( TQCursor::pos() );
}
}
@@ -274,7 +274,7 @@ VSelectTool::mouseButtonRelease()
VObjectListIterator it( newSelection );
for( ; it.current(); ++it )
{
- if( oldSelection.contains( it.current() ) )
+ if( oldSelection.tqcontains( it.current() ) )
lastMatched = it.current();
}
@@ -282,7 +282,7 @@ VSelectTool::mouseButtonRelease()
// - none is selected
// - the stack's bottom object was the last selected object
if( lastMatched && lastMatched != newSelection.first() )
- view()->part()->document().selection()->append( newSelection.at( newSelection.find( lastMatched )-1 ) );
+ view()->part()->document().selection()->append( newSelection.at( newSelection.tqfind( lastMatched )-1 ) );
else
view()->part()->document().selection()->append( newSelection.last() );
}
@@ -300,7 +300,7 @@ VSelectTool::mouseButtonRelease()
view()->part()->document().selection()->append( newSelection.last() );
}
- view()->part()->repaintAllViews( view()->part()->document().selection()->boundingBox() );
+ view()->part()->tqrepaintAllViews( view()->part()->document().selection()->boundingBox() );
view()->selectionChanged();
updateStatusBar();
@@ -322,7 +322,7 @@ VSelectTool::mouseDragRelease()
view()->part()->document().selection()->append( selRect );
else
view()->part()->document().selection()->take( selRect );
- view()->part()->repaintAllViews( selRect );
+ view()->part()->tqrepaintAllViews( selRect );
}
else if( m_state == moving )
{
@@ -332,12 +332,12 @@ VSelectTool::mouseDragRelease()
view()->part()->addCommand(
new VTranslateCmd(
&view()->part()->document(),
- abs( int( m_distx ) ) >= abs( int( m_disty ) ) ? qRound( m_distx ) : 0,
- abs( int( m_distx ) ) <= abs( int( m_disty ) ) ? qRound( m_disty ) : 0, altPressed() ),
+ abs( int( m_distx ) ) >= abs( int( m_disty ) ) ? tqRound( m_distx ) : 0,
+ abs( int( m_distx ) ) <= abs( int( m_disty ) ) ? tqRound( m_disty ) : 0, altPressed() ),
true );
else
view()->part()->addCommand(
- new VTranslateCmd( &view()->part()->document(), qRound( m_distx ), qRound( m_disty ), altPressed() ),
+ new VTranslateCmd( &view()->part()->document(), tqRound( m_distx ), tqRound( m_disty ), altPressed() ),
true );
}
else if( m_state == scaling )
@@ -355,16 +355,16 @@ VSelectTool::mouseDragRelease()
}
void
-VSelectTool::arrowKeyReleased( Qt::Key key )
+VSelectTool::arrowKeyReleased( TQt::Key key )
{
int dx = 0;
int dy = 0;
switch( key )
{
- case Qt::Key_Up: dy = 10; break;
- case Qt::Key_Down: dy = -10; break;
- case Qt::Key_Right: dx = 10; break;
- case Qt::Key_Left: dx = -10; break;
+ case TQt::Key_Up: dy = 10; break;
+ case TQt::Key_Down: dy = -10; break;
+ case TQt::Key_Right: dx = 10; break;
+ case TQt::Key_Left: dx = -10; break;
default: return;
}
m_state = normal;
@@ -378,7 +378,7 @@ VSelectTool::arrowKeyReleased( Qt::Key key )
}
bool
-VSelectTool::keyReleased( Qt::Key key )
+VSelectTool::keyReleased( TQt::Key key )
{
VSelection* selection = view()->part()->document().selection();
@@ -386,7 +386,7 @@ VSelectTool::keyReleased( Qt::Key key )
switch( key )
{
// increase/decrease the handle size
- case Qt::Key_I:
+ case TQt::Key_I:
{
uint handleSize = selection->handleSize();
if( shiftPressed() )
@@ -399,7 +399,7 @@ VSelectTool::keyReleased( Qt::Key key )
}
if( view() )
- view()->repaintAll( selection->boundingBox() );
+ view()->tqrepaintAll( selection->boundingBox() );
return true;
}
@@ -424,11 +424,11 @@ VSelectTool::updateStatusBar() const
double b = KoUnit::toUserValue( rect.bottom(), view()->part()->unit() );
// print bottom-left (%1,%2), top-right (%3,%4) corner of selection bounding box and document unit (%5)
- QString selectMessage = i18n( "[(left,bottom), (right,top)] (actual unit)", "Selection [(%1, %2), (%3, %4)] (%5)").arg( x, 0, 'f', 1 ).arg( y, 0, 'f', 1 ).arg( r, 0, 'f', 1 ).arg( b, 0, 'f', 1 ).arg( view()->part()->unitName() );
+ TQString selectMessage = i18n( "[(left,bottom), (right,top)] (actual unit)", "Selection [(%1, %2), (%3, %4)] (%5)").tqarg( x, 0, 'f', 1 ).tqarg( y, 0, 'f', 1 ).tqarg( r, 0, 'f', 1 ).tqarg( b, 0, 'f', 1 ).tqarg( view()->part()->unitName() );
VSelectionDescription selectionDesc;
selectionDesc.visit( *view()->part()->document().selection() );
- selectMessage += QString( "(%1)" ).arg( selectionDesc.description() );
+ selectMessage += TQString( "(%1)" ).tqarg( selectionDesc.description() );
view()->statusMessage()->setText( selectMessage );
}
@@ -476,7 +476,7 @@ VSelectTool::cancel()
{
draw();
m_state = normal;
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -587,7 +587,7 @@ VSelectTool::recalc()
bool
VSelectTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -603,7 +603,7 @@ VSelectTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Select Tool" ), "14_select", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Select Tool" ), "14_select", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Select" ) );
m_action->setExclusiveGroup( "select" );
//m_ownAction = true;
diff --git a/karbon/tools/vselecttool.h b/karbon/tools/vselecttool.h
index 3ef50cab..1a74289f 100644
--- a/karbon/tools/vselecttool.h
+++ b/karbon/tools/vselecttool.h
@@ -30,6 +30,7 @@ class KarbonView;
class VSelectOptionsWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
VSelectOptionsWidget( KarbonPart* part );
@@ -44,6 +45,7 @@ private:
class VSelectTool : public VTool
{
Q_OBJECT
+ TQ_OBJECT
public:
VSelectTool( KarbonView *view );
@@ -51,11 +53,11 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Select Tool" ); }
+ virtual TQString uiname() { return i18n( "Select Tool" ); }
virtual enumToolType toolType() { return TOOL_SELECT; }
- virtual QString statusText();
+ virtual TQString statusText();
virtual uint priority() { return 0; }
- virtual QString contextHelp();
+ virtual TQString contextHelp();
virtual void refreshUnit();
@@ -76,8 +78,8 @@ protected:
virtual void mouseDragCtrlReleased();
virtual void mouseDragShiftPressed();
virtual void mouseDragShiftReleased();
- virtual void arrowKeyReleased( Qt::Key );
- virtual bool keyReleased( Qt::Key );
+ virtual void arrowKeyReleased( TQt::Key );
+ virtual bool keyReleased( TQt::Key );
virtual void cancel();
diff --git a/karbon/tools/vshapetool.cc b/karbon/tools/vshapetool.cc
index 5ec04084..4f46c317 100644
--- a/karbon/tools/vshapetool.cc
+++ b/karbon/tools/vshapetool.cc
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qevent.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqlabel.h>
#include "karbon_part.h"
#include "karbon_view.h"
@@ -28,15 +28,15 @@
#include "vglobal.h"
#include "vpainter.h"
#include "vpainterfactory.h"
-#include "vshapecmd.h"
-#include "vshapetool.h"
+#include "vtqshapecmd.h"
+#include "vtqshapetool.h"
#include "vselection.h"
#include "vcursor.h"
VShapeTool::VShapeTool( KarbonView *view, const char *name, bool polar )
: VTool( view, name )
{
- m_cursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_cursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
m_isPolar = polar;
m_isSquare = false;
@@ -48,12 +48,12 @@ VShapeTool::~VShapeTool()
delete m_cursor;
}
-QString
+TQString
VShapeTool::contextHelp()
{
- QString s = i18n( "<qt><b>Shape tool</b><br>" );
- s += i18n( "<i>Click and drag</i> to place your own shape.<br>" );
- s += i18n( "<i>Click</i> to place a shape using the tool properties values.</qt>" );
+ TQString s = i18n( "<qt><b>Shape tool</b><br>" );
+ s += i18n( "<i>Click and drag</i> to place your own tqshape.<br>" );
+ s += i18n( "<i>Click</i> to place a tqshape using the tool properties values.</qt>" );
return s;
}
@@ -65,7 +65,7 @@ VShapeTool::activate()
view()->part()->document().selection()->showHandle( true );
}
-QString
+TQString
VShapeTool::statusText()
{
return uiname();
@@ -75,9 +75,9 @@ void
VShapeTool::draw()
{
VPainter* painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
- VPath* composite = shape();
+ VPath* composite = tqshape();
composite->setState( VPath::edit );
composite->draw( painter, &composite->boundingBox() );
delete( composite );
@@ -101,7 +101,7 @@ VShapeTool::mouseButtonRelease()
if( showDialog() )
{
- VPath* composite = shape( true );
+ VPath* composite = tqshape( true );
if( composite )
{
@@ -136,7 +136,7 @@ VShapeTool::mouseDragRelease()
VShapeCmd* cmd = new VShapeCmd(
&view()->part()->document(),
- uiname(), shape(), icon() );
+ uiname(), tqshape(), icon() );
view()->part()->addCommand( cmd, true );
@@ -266,8 +266,8 @@ VShapeTool::recalc()
if ( m_isCentered )
{
- m_p.setX( m_p.x() - m_sign1 * qRound( m_d1 * 0.5 ) );
- m_p.setY( m_p.y() + m_sign2 * qRound( m_d2 * 0.5 ) );
+ m_p.setX( m_p.x() - m_sign1 * tqRound( m_d1 * 0.5 ) );
+ m_p.setY( m_p.y() + m_sign2 * tqRound( m_d2 * 0.5 ) );
}
}
}
diff --git a/karbon/tools/vshapetool.h b/karbon/tools/vshapetool.h
index 48cfa4c7..2a774e94 100644
--- a/karbon/tools/vshapetool.h
+++ b/karbon/tools/vshapetool.h
@@ -20,7 +20,7 @@
#ifndef __VSHAPETOOL_H__
#define __VSHAPETOOL_H__
-#include <qstring.h>
+#include <tqstring.h>
#include <KoPoint.h>
@@ -36,8 +36,8 @@ public:
VShapeTool( KarbonView *view, const char *name, bool polar = false );
virtual enumToolType toolType() { return TOOL_SHAPE; }
- virtual QString statusText();
- virtual QString contextHelp();
+ virtual TQString statusText();
+ virtual TQString contextHelp();
virtual void activate();
@@ -58,7 +58,7 @@ protected:
// Make it "abstract":
virtual ~VShapeTool();
- virtual VPath* shape( bool interactive = false ) const = 0;
+ virtual VPath* tqshape( bool interactive = false ) const = 0;
/**
* Output coordinates.
@@ -77,7 +77,7 @@ private:
bool m_isSquare;
bool m_isCentered;
- QCursor* m_cursor;
+ TQCursor* m_cursor;
};
#endif
diff --git a/karbon/tools/vsheartool.cc b/karbon/tools/vsheartool.cc
index e38336b1..59315cd8 100644
--- a/karbon/tools/vsheartool.cc
+++ b/karbon/tools/vsheartool.cc
@@ -19,8 +19,8 @@
#include <math.h>
-#include <qcursor.h>
-#include <qlabel.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <KoRect.h>
@@ -47,13 +47,13 @@ VShearTool::~VShearTool()
void
VShearTool::activate()
{
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
view()->part()->document().selection()->showHandle( true );
view()->part()->document().selection()->setState( VObject::selected );
VTool::activate();
}
-QString
+TQString
VShearTool::statusText()
{
return i18n( "Shear" );
@@ -63,7 +63,7 @@ void
VShearTool::draw()
{
VPainter* painter = view()->painterFactory()->editpainter();
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
VObjectListIterator itr = m_objects;
for( ; itr.current(); ++itr )
@@ -78,22 +78,22 @@ VShearTool::setCursor() const
{
case node_lt:
case node_rb:
- view()->setCursor( QCursor( Qt::SizeFDiagCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeFDiagCursor ) );
break;
case node_rt:
case node_lb:
- view()->setCursor( QCursor( Qt::SizeBDiagCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeBDiagCursor ) );
break;
case node_lm:
case node_rm:
- view()->setCursor( QCursor( Qt::SizeHorCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeHorCursor ) );
break;
case node_mt:
case node_mb:
- view()->setCursor( QCursor( Qt::SizeVerCursor ) );
+ view()->setCursor( TQCursor( TQt::SizeVerCursor ) );
break;
default:
- view()->setCursor( QCursor( Qt::arrowCursor ) );
+ view()->setCursor( TQCursor( TQt::arrowCursor ) );
}
}
@@ -136,7 +136,7 @@ VShearTool::cancel()
if ( isDragging() )
{
draw();
- view()->repaintAll( view()->part()->document().selection()->boundingBox() );
+ view()->tqrepaintAll( view()->part()->document().selection()->boundingBox() );
}
}
@@ -210,7 +210,7 @@ VShearTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Shear Tool" ), "14_shear", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Shear Tool" ), "14_shear", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Shear" ) );
m_action->setExclusiveGroup( "manipulation" );
//m_ownAction = true;
diff --git a/karbon/tools/vsheartool.h b/karbon/tools/vsheartool.h
index eb3be26c..8a576014 100644
--- a/karbon/tools/vsheartool.h
+++ b/karbon/tools/vsheartool.h
@@ -31,10 +31,10 @@ public:
virtual void activate();
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Shear Tool" ); }
+ virtual TQString uiname() { return i18n( "Shear Tool" ); }
virtual enumToolType toolType() { return TOOL_MANIPULATION; }
virtual uint priority() { return 1; }
- virtual QString statusText();
+ virtual TQString statusText();
protected:
virtual void draw();
diff --git a/karbon/tools/vsinustool.cc b/karbon/tools/vsinustool.cc
index 056b88c9..a520afba 100644
--- a/karbon/tools/vsinustool.cc
+++ b/karbon/tools/vsinustool.cc
@@ -18,34 +18,34 @@
*/
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <knuminput.h>
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vsinus.h>
+#include <tqshapes/vsinus.h>
#include "vsinustool.h"
#include "KoUnitWidgets.h"
-VSinusTool::VSinusOptionsWidget::VSinusOptionsWidget( KarbonPart *part, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Sinus" ), Ok | Cancel ), m_part( part )
+VSinusTool::VSinusOptionsWidget::VSinusOptionsWidget( KarbonPart *part, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Sinus" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
// add width/height-input:
- m_widthLabel = new QLabel( i18n( "object width", "Width:" ), group );
+ m_widthLabel = new TQLabel( i18n( "object width", "Width:" ), group );
m_width = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
- m_heightLabel = new QLabel( i18n( "Height:" ), group );
+ m_heightLabel = new TQLabel( i18n( "Height:" ), group );
m_height = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 100.0, KoUnit::U_MM );
refreshUnit();
- new QLabel( i18n( "Periods:" ), group );
+ new TQLabel( i18n( "Periods:" ), group );
m_periods = new KIntSpinBox( group );
m_periods->setMinValue( 1 );
@@ -120,7 +120,7 @@ VSinusTool::refreshUnit()
}
VPath*
-VSinusTool::shape( bool interactive ) const
+VSinusTool::tqshape( bool interactive ) const
{
if( interactive )
return
@@ -143,7 +143,7 @@ VSinusTool::shape( bool interactive ) const
bool
VSinusTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -153,9 +153,9 @@ VSinusTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Sinus Tool" ), "14_sinus", Qt::SHIFT+Qt::Key_S, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Sinus Tool" ), "14_sinus", TQt::SHIFT+TQt::Key_S, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Sinus" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vsinustool.h b/karbon/tools/vsinustool.h
index 6fcfd45c..1ad343a2 100644
--- a/karbon/tools/vsinustool.h
+++ b/karbon/tools/vsinustool.h
@@ -21,12 +21,12 @@
#define __VSINUSTOOL_H__
#include <kdialogbase.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KoUnitDoubleSpinBox;
class KIntSpinBox;
class KarbonView;
-class QLabel;
+class TQLabel;
class VSinusTool : public VShapeTool
{
@@ -36,9 +36,9 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Sinus Tool" ); }
+ virtual TQString uiname() { return i18n( "Sinus Tool" ); }
- virtual VPath *shape( bool interactive = false ) const;
+ virtual VPath *tqshape( bool interactive = false ) const;
void refreshUnit();
@@ -46,7 +46,7 @@ private:
class VSinusOptionsWidget : public KDialogBase
{
public:
- VSinusOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char *name = 0L );
+ VSinusOptionsWidget( KarbonPart *part, TQWidget *tqparent = 0L, const char *name = 0L );
double width() const;
double height() const;
@@ -61,8 +61,8 @@ private:
KoUnitDoubleSpinBox *m_height;
KIntSpinBox *m_periods;
KarbonPart *m_part;
- QLabel *m_heightLabel;
- QLabel *m_widthLabel;
+ TQLabel *m_heightLabel;
+ TQLabel *m_widthLabel;
};
VSinusOptionsWidget *m_optionsWidget;
diff --git a/karbon/tools/vspiraltool.cc b/karbon/tools/vspiraltool.cc
index f4c3fff6..a9a361f5 100644
--- a/karbon/tools/vspiraltool.cc
+++ b/karbon/tools/vspiraltool.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <kcombobox.h>
@@ -26,32 +26,32 @@
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vspiral.h>
+#include <tqshapes/vspiral.h>
#include "vspiraltool.h"
#include "KoUnitWidgets.h"
-VSpiralTool::VSpiralOptionsWidget::VSpiralOptionsWidget( KarbonPart *part, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Spiral" ), Ok | Cancel ), m_part( part )
+VSpiralTool::VSpiralOptionsWidget::VSpiralOptionsWidget( KarbonPart *part, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Spiral" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Type:" ), group );
+ new TQLabel( i18n( "Type:" ), group );
m_type = new KComboBox( false, group );
m_type->insertItem( i18n( "Round" ), 0 );
m_type->insertItem( i18n( "Rectangular" ), 1 );
- new QLabel( i18n( "Radius:" ), group );
+ new TQLabel( i18n( "Radius:" ), group );
m_radius = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 50.0, KoUnit::U_MM );
refreshUnit();
- new QLabel( i18n( "Segments:" ), group );
+ new TQLabel( i18n( "Segments:" ), group );
m_segments = new KIntSpinBox( group );
m_segments->setMinValue( 1 );
- new QLabel( i18n( "Fade:" ), group );
+ new TQLabel( i18n( "Fade:" ), group );
m_fade = new KDoubleNumInput( group );
m_fade->setRange( 0.0, 1.0, 0.05 );
- new QLabel( i18n( "Orientation:" ), group );
+ new TQLabel( i18n( "Qt::Orientation:" ), group );
m_clockwise = new KComboBox( false, group );
m_clockwise->insertItem( i18n( "Clockwise" ), 0 );
m_clockwise->insertItem( i18n( "Counter Clockwise" ), 1 );
@@ -135,12 +135,12 @@ VSpiralTool::VSpiralTool( KarbonView *view )
}
void
-VSpiralTool::arrowKeyReleased( Qt::Key key )
+VSpiralTool::arrowKeyReleased( TQt::Key key )
{
int change = 0;
- if( key == Qt::Key_Up )
+ if( key == TQt::Key_Up )
change = 1;
- else if( key == Qt::Key_Down )
+ else if( key == TQt::Key_Down )
change = -1;
if( change != 0 )
@@ -165,7 +165,7 @@ VSpiralTool::refreshUnit()
}
VPath*
-VSpiralTool::shape( bool interactive ) const
+VSpiralTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -194,7 +194,7 @@ VSpiralTool::shape( bool interactive ) const
bool
VSpiralTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -204,9 +204,9 @@ VSpiralTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Spiral Tool" ), "14_spiral", Qt::SHIFT+Qt::Key_H, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Spiral Tool" ), "14_spiral", TQt::SHIFT+TQt::Key_H, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Spiral" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vspiraltool.h b/karbon/tools/vspiraltool.h
index 2976deda..c9c4d388 100644
--- a/karbon/tools/vspiraltool.h
+++ b/karbon/tools/vspiraltool.h
@@ -23,7 +23,7 @@
#include <kdialogbase.h>
#include <klocale.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KComboBox;
class KoUnitDoubleSpinBox;
@@ -39,19 +39,19 @@ public:
virtual void setup(KActionCollection *collection);
virtual bool showDialog() const;
- virtual QString uiname() { return i18n( "Spiral Tool" ); }
+ virtual TQString uiname() { return i18n( "Spiral Tool" ); }
- virtual VPath* shape( bool interactive = false ) const;
+ virtual VPath* tqshape( bool interactive = false ) const;
void refreshUnit();
- virtual void arrowKeyReleased( Qt::Key );
+ virtual void arrowKeyReleased( TQt::Key );
private:
class VSpiralOptionsWidget : public KDialogBase
{
public:
- VSpiralOptionsWidget( KarbonPart *part, QWidget *parent = 0L, const char* name = 0L );
+ VSpiralOptionsWidget( KarbonPart *part, TQWidget *tqparent = 0L, const char* name = 0L );
double radius() const;
uint segments() const;
diff --git a/karbon/tools/vstartool.cc b/karbon/tools/vstartool.cc
index 612a0bce..fbad70ce 100644
--- a/karbon/tools/vstartool.cc
+++ b/karbon/tools/vstartool.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qgroupbox.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
#include <klocale.h>
#include <knuminput.h>
@@ -26,16 +26,16 @@
#include <karbon_view.h>
#include <karbon_part.h>
-#include <shapes/vstar.h>
+#include <tqshapes/vstar.h>
#include "vstartool.h"
#include "KoUnitWidgets.h"
-VStarOptionsWidget::VStarOptionsWidget( KarbonPart *part, QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, i18n( "Insert Star" ), Ok | Cancel ), m_part( part )
+VStarOptionsWidget::VStarOptionsWidget( KarbonPart *part, TQWidget* tqparent, const char* name )
+ : KDialogBase( tqparent, name, true, i18n( "Insert Star" ), Ok | Cancel ), m_part( part )
{
- QGroupBox *group = new QGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
- new QLabel( i18n( "Type:" ), group );
+ TQGroupBox *group = new TQGroupBox( 2, Qt::Horizontal, i18n( "Properties" ), this );
+ new TQLabel( i18n( "Type:" ), group );
m_type = new KComboBox( false, group );
m_type->insertItem( i18n( "Star Outline" ), VStar::star_outline );
m_type->insertItem( i18n( "Spoke" ), VStar::spoke );
@@ -44,29 +44,29 @@ VStarOptionsWidget::VStarOptionsWidget( KarbonPart *part, QWidget* parent, const
m_type->insertItem( i18n( "Framed Star" ), VStar::framed_star);
m_type->insertItem( i18n( "Star" ), VStar::star );
m_type->insertItem( i18n( "Gear" ), VStar::gear );
- connect( m_type, SIGNAL( activated( int ) ), this, SLOT( typeChanged( int ) ) );
+ connect( m_type, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( typeChanged( int ) ) );
// add width/height-input:
- m_outerRLabel = new QLabel( i18n( "Outer radius:" ), group );
+ m_outerRLabel = new TQLabel( i18n( "Outer radius:" ), group );
m_outerR = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 50.0, KoUnit::U_MM );
- connect( m_outerR, SIGNAL( valueChanged( double ) ), this, SLOT( setOuterRadius( double ) ) );
+ connect( m_outerR, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( setOuterRadius( double ) ) );
- m_innerRLabel = new QLabel( i18n( "Inner radius:" ), group );
+ m_innerRLabel = new TQLabel( i18n( "Inner radius:" ), group );
m_innerR = new KoUnitDoubleSpinBox( group, 0.0, 1000.0, 0.5, 25.0, KoUnit::U_MM );
refreshUnit();
- new QLabel( i18n( "Edges:" ), group );
+ new TQLabel( i18n( "Edges:" ), group );
m_edges = new KIntSpinBox( group );
m_edges->setMinValue( 3 );
- connect( m_edges, SIGNAL( valueChanged( int ) ), this, SLOT( setEdges( int ) ) );
+ connect( m_edges, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( setEdges( int ) ) );
- new QLabel( i18n( "Inner angle:" ), group );
+ new TQLabel( i18n( "Inner angle:" ), group );
m_innerAngle = new KIntSpinBox( group );
m_innerAngle->setMinValue( 0 );
m_innerAngle->setMaxValue( 360 );
- new QLabel( i18n( "Roundness:" ), group );
+ new TQLabel( i18n( "Roundness:" ), group );
m_roundness = new KDoubleNumInput( group );
m_roundness->setRange( 0.0, 1.0, 0.05 );
@@ -179,12 +179,12 @@ VStarTool::~VStarTool()
}
void
-VStarTool::arrowKeyReleased( Qt::Key key )
+VStarTool::arrowKeyReleased( TQt::Key key )
{
int change = 0;
- if( key == Qt::Key_Up )
+ if( key == TQt::Key_Up )
change = 1;
- else if( key == Qt::Key_Down )
+ else if( key == TQt::Key_Down )
change = -1;
if( change != 0 )
@@ -198,7 +198,7 @@ VStarTool::arrowKeyReleased( Qt::Key key )
}
VPath*
-VStarTool::shape( bool interactive ) const
+VStarTool::tqshape( bool interactive ) const
{
if( interactive )
{
@@ -227,7 +227,7 @@ VStarTool::shape( bool interactive ) const
bool
VStarTool::showDialog() const
{
- return m_optionsWidget->exec() == QDialog::Accepted;
+ return m_optionsWidget->exec() == TQDialog::Accepted;
}
void
@@ -237,11 +237,11 @@ VStarTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- KShortcut shortcut( Qt::Key_Plus );
- shortcut.append(KShortcut( Qt::Key_F9 ) );
- m_action = new KRadioAction( i18n( "Star Tool" ), "14_star", shortcut, this, SLOT( activate() ), collection, name() );
+ KShortcut shortcut( TQt::Key_Plus );
+ shortcut.append(KShortcut( TQt::Key_F9 ) );
+ m_action = new KRadioAction( i18n( "Star Tool" ), "14_star", shortcut, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Draw a star" ) );
- m_action->setExclusiveGroup( "shapes" );
+ m_action->setExclusiveGroup( "tqshapes" );
//m_ownAction = true;
}
}
diff --git a/karbon/tools/vstartool.h b/karbon/tools/vstartool.h
index f9ec716b..89af45db 100644
--- a/karbon/tools/vstartool.h
+++ b/karbon/tools/vstartool.h
@@ -23,7 +23,7 @@
#include <klocale.h>
#include <kdialogbase.h>
-#include "vshapetool.h"
+#include "vtqshapetool.h"
class KoUnitDoubleSpinBox;
@@ -34,8 +34,9 @@ class KarbonView;
class VStarOptionsWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStarOptionsWidget( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VStarOptionsWidget( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
void refreshUnit();
@@ -60,8 +61,8 @@ private:
KIntSpinBox *m_innerAngle;
KComboBox *m_type;
KarbonPart *m_part;
- QLabel *m_innerRLabel;
- QLabel *m_outerRLabel;
+ TQLabel *m_innerRLabel;
+ TQLabel *m_outerRLabel;
};
class VStarTool : public VShapeTool
@@ -72,12 +73,12 @@ public:
virtual bool showDialog() const;
virtual void setup(KActionCollection *collection);
- virtual QString uiname() { return i18n( "Star Tool" ); }
- virtual VPath* shape( bool interactive = false ) const;
+ virtual TQString uiname() { return i18n( "Star Tool" ); }
+ virtual VPath* tqshape( bool interactive = false ) const;
void refreshUnit();
- virtual void arrowKeyReleased( Qt::Key );
+ virtual void arrowKeyReleased( TQt::Key );
private:
VStarOptionsWidget* m_optionsWidget;
diff --git a/karbon/tools/vtexttool.cc b/karbon/tools/vtexttool.cc
index 1d59ebda..259f7c62 100644
--- a/karbon/tools/vtexttool.cc
+++ b/karbon/tools/vtexttool.cc
@@ -19,16 +19,16 @@
#include <math.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qcursor.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcursor.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqtabwidget.h>
#include <kdebug.h>
#include <kfontcombo.h>
@@ -68,13 +68,13 @@ traceShape( VKoPainter* p, int x, int y, int w, int h )
p->lineTo( KoPoint( x , y ) );
}
-ShadowPreview::ShadowPreview( ShadowWidget* parent )
- : QWidget( parent ), m_parent( parent )
+ShadowPreview::ShadowPreview( ShadowWidget* tqparent )
+ : TQWidget( tqparent ), m_parent( tqparent )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 60, 60 );
- connect( this, SIGNAL( changed( int, int, bool ) ), m_parent, SLOT( setShadowValues( int, int, bool ) ) );
+ connect( this, TQT_SIGNAL( changed( int, int, bool ) ), m_parent, TQT_SLOT( setShadowValues( int, int, bool ) ) );
}
ShadowPreview::~ShadowPreview()
@@ -82,7 +82,7 @@ ShadowPreview::~ShadowPreview()
}
void
-ShadowPreview::mouseReleaseEvent( QMouseEvent* e )
+ShadowPreview::mouseReleaseEvent( TQMouseEvent* e )
{
int dx = e->x() - width() / 2;
int dy = e->y() - height() / 2;
@@ -104,14 +104,14 @@ ShadowPreview::mouseReleaseEvent( QMouseEvent* e )
}
void
-ShadowPreview::paintEvent( QPaintEvent* )
+ShadowPreview::paintEvent( TQPaintEvent* )
{
int w = width() - 4;
int h = height() - 4;
int d = m_parent->shadowDistance();
int a = 360 - m_parent->shadowAngle();
- QPixmap pm( w, h );
+ TQPixmap pm( w, h );
VKoPainter p( &pm, w, h );
VColor color( VColor::rgb );
@@ -173,7 +173,7 @@ ShadowPreview::paintEvent( QPaintEvent* )
p.lineTo( KoPoint( w, h ) );
p.lineTo( KoPoint( w, 0 ) );
p.lineTo( KoPoint( 0, 0 ) );
- VColor c( colorGroup().background() );
+ VColor c( tqcolorGroup().background() );
c.setOpacity( .8 );
p.setBrush( VFill( c ) );
p.fillPath();
@@ -181,56 +181,56 @@ ShadowPreview::paintEvent( QPaintEvent* )
p.end();
- QPainter painter( this );
+ TQPainter painter( this );
painter.drawPixmap( 2, 2, pm );
- painter.setPen( colorGroup().light() );
+ painter.setPen( tqcolorGroup().light() );
painter.moveTo( 1, height() - 1 );
painter.lineTo( 1, 1 );
painter.lineTo( width() - 1, 1 );
painter.lineTo( width() - 1, height() - 1 );
painter.lineTo( 1, height() - 1 );
- painter.setPen( colorGroup().dark() );
+ painter.setPen( tqcolorGroup().dark() );
painter.moveTo( 0, height() - 1 );
painter.lineTo( 0, 0 );
painter.lineTo( width() - 1, 0 );
painter.moveTo( width() - 2, 2 );
painter.lineTo( width() - 2, height() - 2 );
painter.lineTo( 2, height() - 2 );
- painter.setPen( Qt::black );
+ painter.setPen( TQt::black );
painter.drawLine( width() / 2 - 2, height() / 2, width() / 2 + 2, height() / 2 );
painter.drawLine( width() / 2, height() / 2 - 2, width() / 2, height() / 2 + 2 );
}
-ShadowWidget::ShadowWidget( QWidget* parent, const char* name, int angle, int distance, bool translucent )
- : QGroupBox( parent, name )
+ShadowWidget::ShadowWidget( TQWidget* tqparent, const char* name, int angle, int distance, bool translucent )
+ : TQGroupBox( tqparent, name )
{
setTitle( i18n( "Shadow" ) );
- setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
-
- QGridLayout* layout = new QGridLayout( this );
- layout->addRowSpacing( 0, 12 );
- layout->setMargin( 3 );
- layout->setSpacing( 2 );
- layout->setColStretch( 0, 1 );
- layout->setColStretch( 1, 0 );
- layout->setColStretch( 2, 2 );
- layout->addMultiCellWidget( m_preview = new ShadowPreview( this ), 1, 3, 0, 0 );
- layout->addWidget( new QLabel( i18n( "Angle:" ), this ), 1, 1 );
- layout->addWidget( m_angle = new KIntNumInput( this ), 1, 2 );
- layout->addWidget( new QLabel( i18n( "Distance:" ), this ), 2, 1 );
- layout->addWidget( m_distance = new KIntNumInput( this ), 2, 2 );
- layout->addWidget( m_useShadow = new QCheckBox( i18n( "Shadow" ), this ), 3, 1 );
- layout->addWidget( m_translucent = new QCheckBox( i18n( "Draw translucent shadow" ), this ), 3, 2 );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
+
+ TQGridLayout* tqlayout = new TQGridLayout( this );
+ tqlayout->addRowSpacing( 0, 12 );
+ tqlayout->setMargin( 3 );
+ tqlayout->setSpacing( 2 );
+ tqlayout->setColStretch( 0, 1 );
+ tqlayout->setColStretch( 1, 0 );
+ tqlayout->setColStretch( 2, 2 );
+ tqlayout->addMultiCellWidget( m_preview = new ShadowPreview( this ), 1, 3, 0, 0 );
+ tqlayout->addWidget( new TQLabel( i18n( "Angle:" ), this ), 1, 1 );
+ tqlayout->addWidget( m_angle = new KIntNumInput( this ), 1, 2 );
+ tqlayout->addWidget( new TQLabel( i18n( "Distance:" ), this ), 2, 1 );
+ tqlayout->addWidget( m_distance = new KIntNumInput( this ), 2, 2 );
+ tqlayout->addWidget( m_useShadow = new TQCheckBox( i18n( "Shadow" ), this ), 3, 1 );
+ tqlayout->addWidget( m_translucent = new TQCheckBox( i18n( "Draw translucent shadow" ), this ), 3, 2 );
m_distance->setRange( 1, 37, 1, true );
m_angle->setRange( 0, 360, 10, true );
m_angle->setValue( angle );
m_distance->setValue( distance );
m_translucent->setChecked( translucent );
- connect( m_angle, SIGNAL( valueChanged( int ) ), this, SLOT( updatePreview( int ) ) );
- connect( m_distance, SIGNAL( valueChanged( int ) ), this, SLOT( updatePreview( int ) ) );
- connect( m_useShadow, SIGNAL( clicked() ), this, SLOT( updatePreview() ) );
- connect( m_translucent, SIGNAL( clicked() ), this, SLOT( updatePreview() ) );
+ connect( m_angle, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( updatePreview( int ) ) );
+ connect( m_distance, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( updatePreview( int ) ) );
+ connect( m_useShadow, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updatePreview() ) );
+ connect( m_translucent, TQT_SIGNAL( clicked() ), this, TQT_SLOT( updatePreview() ) );
updatePreview();
}
@@ -255,7 +255,7 @@ void
ShadowWidget::setShadowAngle( int angle )
{
m_angle->setValue( angle );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
int
@@ -268,7 +268,7 @@ void
ShadowWidget::setShadowDistance( int distance )
{
m_distance->setValue( distance );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
int
@@ -281,7 +281,7 @@ void
ShadowWidget::setTranslucent( bool translucent )
{
m_translucent->setChecked( translucent );
- m_preview->repaint();
+ m_preview->tqrepaint();
}
bool ShadowWidget::isTranslucent()
@@ -301,78 +301,78 @@ ShadowWidget::setShadowValues( int angle, int distance, bool translucent )
void
ShadowWidget::updatePreview( int )
{
- m_preview->repaint();
+ m_preview->tqrepaint();
}
void
ShadowWidget::updatePreview()
{
- m_preview->repaint();
+ m_preview->tqrepaint();
bool ok = m_useShadow->isChecked();
m_angle->setEnabled( ok );
m_distance->setEnabled( ok );
m_translucent->setEnabled( ok );
}
-VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, QWidget *parent )
- : KDialogBase( parent, "", true, i18n( "Text" ), Ok | Cancel ), m_tool( tool )
+VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, TQWidget *tqparent )
+ : KDialogBase( tqparent, "", true, i18n( "Text" ), Ok | Cancel ), m_tool( tool )
{
- //setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ //tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
//setFrameStyle( Box | Sunken );
- QWidget *base = new QWidget( this );
- QVBoxLayout* mainLayout = new QVBoxLayout( base );
+ TQWidget *base = new TQWidget( this );
+ TQVBoxLayout* mainLayout = new TQVBoxLayout( base );
mainLayout->setMargin( 3 );
- mainLayout->add( m_tabWidget = new QTabWidget( base ) );
+ mainLayout->add( m_tabWidget = new TQTabWidget( base ) );
- m_tabWidget->setFont( QFont( KGlobalSettings::generalFont().family() , 8 ) );
+ m_tabWidget->setFont( TQFont( KGlobalSettings::generalFont().family() , 8 ) );
- QWidget* textWidget = new QWidget( m_tabWidget );
+ TQWidget* textWidget = new TQWidget( m_tabWidget );
- QGridLayout* textLayout = new QGridLayout( textWidget );
+ TQGridLayout* textLayout = new TQGridLayout( textWidget );
- QStringList list;
+ TQStringList list;
KFontChooser::getFontList( list, KFontChooser::SmoothScalableFonts );
textLayout->setMargin( 3 );
textLayout->setSpacing( 2 );
textLayout->addMultiCellWidget( m_fontCombo = new KFontCombo( list, textWidget ), 0, 0, 0, 2 );
textLayout->addWidget( m_fontSize = new KIntNumInput( textWidget ), 1, 0 );
- textLayout->addWidget( m_boldCheck = new QCheckBox( i18n( "Bold" ), textWidget ), 1, 1 );
- textLayout->addWidget( m_italicCheck = new QCheckBox( i18n( "Italic" ), textWidget ), 1, 2 );
- textLayout->addMultiCellWidget( m_textEditor = new QLineEdit( textWidget ), 2, 2, 0, 2 );
+ textLayout->addWidget( m_boldCheck = new TQCheckBox( i18n( "Bold" ), textWidget ), 1, 1 );
+ textLayout->addWidget( m_italicCheck = new TQCheckBox( i18n( "Italic" ), textWidget ), 1, 2 );
+ textLayout->addMultiCellWidget( m_textEditor = new TQLineEdit( textWidget ), 2, 2, 0, 2 );
m_tabWidget->addTab( textWidget, i18n( "Text" ) );
- QWidget* posWidget = new QWidget( m_tabWidget );
+ TQWidget* posWidget = new TQWidget( m_tabWidget );
- QGridLayout* posLayout = new QGridLayout( posWidget );
+ TQGridLayout* posLayout = new TQGridLayout( posWidget );
textLayout->setMargin( 3 );
posLayout->setSpacing( 2 );
- posLayout->addWidget( new QLabel( i18n( "Alignment:" ), posWidget ), 0, 0 );
- posLayout->addWidget( m_textAlignment = new QComboBox( posWidget ), 0, 1 );
- posLayout->addWidget( new QLabel( i18n( "Position:" ), posWidget ), 1, 0 );
- posLayout->addWidget( m_textPosition = new QComboBox( posWidget ), 1, 1 );
- posLayout->addWidget( new QLabel( i18n( "Offset:" ), posWidget ), 2, 0 );
+ posLayout->addWidget( new TQLabel( i18n( "Alignment:" ), posWidget ), 0, 0 );
+ posLayout->addWidget( m_textAlignment = new TQComboBox( posWidget ), 0, 1 );
+ posLayout->addWidget( new TQLabel( i18n( "Position:" ), posWidget ), 1, 0 );
+ posLayout->addWidget( m_textPosition = new TQComboBox( posWidget ), 1, 1 );
+ posLayout->addWidget( new TQLabel( i18n( "Offset:" ), posWidget ), 2, 0 );
posLayout->addWidget( m_textOffset = new KDoubleNumInput( posWidget ), 2, 1 );
posLayout->setColStretch( 0, 0 );
posLayout->setColStretch( 1, 1 );
m_tabWidget->addTab( posWidget, i18n( "Position" ) );
- QWidget* fxWidget = new QWidget( m_tabWidget );
+ TQWidget* fxWidget = new TQWidget( m_tabWidget );
- QVBoxLayout* fxLayout = new QVBoxLayout( fxWidget );
+ TQVBoxLayout* fxLayout = new TQVBoxLayout( fxWidget );
fxLayout->setMargin( 3 );
fxLayout->setSpacing( 2 );
fxLayout->add( m_shadow = new ShadowWidget( fxWidget, 0L, 315, 4, true ) );
- QHBoxLayout* fxLayout2 = new QHBoxLayout( fxLayout );
+ TQHBoxLayout* fxLayout2 = new TQHBoxLayout( fxLayout );
fxLayout2->setSpacing( 2 );
- fxLayout2->addWidget( m_editBasePath = new QPushButton( i18n( "Edit Base Path" ), fxWidget ) );
- fxLayout2->addWidget( m_convertToShapes = new QPushButton( i18n( "Convert to Shapes" ), fxWidget ) );
+ fxLayout2->addWidget( m_editBasePath = new TQPushButton( i18n( "Edit Base Path" ), fxWidget ) );
+ fxLayout2->addWidget( m_convertToShapes = new TQPushButton( i18n( "Convert to Shapes" ), fxWidget ) );
m_tabWidget->addTab( fxWidget, i18n( "Effects" ) );
@@ -387,28 +387,28 @@ VTextOptionsWidget::VTextOptionsWidget( VTextTool* tool, QWidget *parent )
m_convertToShapes->setEnabled( true );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Left") );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Center") );
- m_textAlignment->insertItem( i18n( "Horizontal alignment", "Right") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Left") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Center") );
+ m_textAlignment->insertItem( i18n( "Horizontal tqalignment", "Right") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "Above") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "On") );
- m_textPosition->insertItem( i18n( "Vertical alignment", "Under") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "Above") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "On") );
+ m_textPosition->insertItem( i18n( "Vertical tqalignment", "Under") );
m_textOffset->setRange( 0.0, 100.0, 1.0, true );
- connect( m_fontCombo, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_boldCheck, SIGNAL( stateChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_italicCheck, SIGNAL( stateChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_fontSize, SIGNAL( valueChanged( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textPosition, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textAlignment, SIGNAL( activated( int ) ), this, SLOT( valueChanged( int ) ) );
- connect( m_textOffset, SIGNAL( valueChanged( double ) ), this, SLOT( valueChanged( double ) ) );
- connect( m_textEditor, SIGNAL( returnPressed() ), this, SLOT( accept() ) );
- connect( m_textEditor, SIGNAL( textChanged( const QString& ) ), this, SLOT( textChanged( const QString& ) ) );
- connect( m_editBasePath, SIGNAL( clicked() ), this, SLOT( editBasePath() ) );
- connect( m_convertToShapes, SIGNAL( clicked() ), this, SLOT( convertToShapes() ) );
- connect( this, SIGNAL( cancelClicked() ), this, SLOT( cancel() ) );
+ connect( m_fontCombo, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_boldCheck, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_italicCheck, TQT_SIGNAL( stateChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_fontSize, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textPosition, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textAlignment, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( valueChanged( int ) ) );
+ connect( m_textOffset, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( valueChanged( double ) ) );
+ connect( m_textEditor, TQT_SIGNAL( returnPressed() ), this, TQT_SLOT( accept() ) );
+ connect( m_textEditor, TQT_SIGNAL( textChanged( const TQString& ) ), this, TQT_SLOT( textChanged( const TQString& ) ) );
+ connect( m_editBasePath, TQT_SIGNAL( clicked() ), this, TQT_SLOT( editBasePath() ) );
+ connect( m_convertToShapes, TQT_SIGNAL( clicked() ), this, TQT_SLOT( convertToShapes() ) );
+ connect( this, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT( cancel() ) );
setMainWidget( base );
setFixedSize( baseSize() );
@@ -424,7 +424,7 @@ VTextOptionsWidget::valueChanged( int )
m_fontCombo->setBold( m_boldCheck->isChecked() );
m_fontCombo->setItalic( m_italicCheck->isChecked() );
- m_textEditor->setFont( QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
+ m_textEditor->setFont( TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
if( m_tool && isVisible() )
m_tool->textChanged();
@@ -453,7 +453,7 @@ VTextOptionsWidget::cancel()
}
void
-VTextOptionsWidget::textChanged( const QString& )
+VTextOptionsWidget::textChanged( const TQString& )
{
if( m_tool && isVisible() )
m_tool->textChanged();
@@ -474,7 +474,7 @@ VTextOptionsWidget::convertToShapes()
}
void
-VTextOptionsWidget::setFont( const QFont& font )
+VTextOptionsWidget::setFont( const TQFont& font )
{
m_fontCombo->setCurrentText( font.family() );
@@ -487,21 +487,21 @@ VTextOptionsWidget::setFont( const QFont& font )
m_fontCombo->setBold( m_boldCheck->isChecked() );
m_fontCombo->setItalic( m_italicCheck->isChecked() );
- m_textEditor->setFont( QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
+ m_textEditor->setFont( TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() ) );
}
-QFont VTextOptionsWidget::font()
+TQFont VTextOptionsWidget::font()
{
- return QFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() );
+ return TQFont( m_fontCombo->currentText(), m_fontSize->value(), ( m_boldCheck->isChecked() ? 75 : 50 ), m_italicCheck->isChecked() );
}
void
-VTextOptionsWidget::setText( const QString& text )
+VTextOptionsWidget::setText( const TQString& text )
{
m_textEditor->setText( text );
}
-QString VTextOptionsWidget::text()
+TQString VTextOptionsWidget::text()
{
return m_textEditor->text();
}
@@ -518,12 +518,12 @@ VText::Position VTextOptionsWidget::position()
}
void
-VTextOptionsWidget::setAlignment( VText::Alignment alignment )
+VTextOptionsWidget::tqsetAlignment( VText::Alignment tqalignment )
{
- m_textAlignment->setCurrentItem( alignment );
+ m_textAlignment->setCurrentItem( tqalignment );
}
-VText::Alignment VTextOptionsWidget::alignment()
+VText::Alignment VTextOptionsWidget::tqalignment()
{
return ( VText::Alignment ) m_textAlignment->currentItem();
}
@@ -590,7 +590,7 @@ VTextTool::VTextTool( KarbonView *view )
m_text = 0L;
m_editedText = 0L;
registerTool( this );
- m_cursor = new QCursor( VCursor::createCursor( VCursor::CrossHair ) );
+ m_cursor = new TQCursor( VCursor::createCursor( VCursor::CrossHair ) );
}
VTextTool::~VTextTool()
@@ -600,9 +600,9 @@ VTextTool::~VTextTool()
delete m_cursor;
}
-QString VTextTool::contextHelp()
+TQString VTextTool::contextHelp()
{
- QString s = i18n( "<qt><b>Text Tool</b><br>" );
+ TQString s = i18n( "<qt><b>Text Tool</b><br>" );
s += i18n("<i>Click</i> on document to place horizontal text.<br>" );
s += i18n("<i>Click and drag</i> in document to place directional text.<br>" );
s += i18n("<i>Click</i> on a selected path object to place text along its outline.<br>" );
@@ -643,10 +643,10 @@ VTextTool::drawPathCreation()
painter->setZoomFactor( view()->zoom() );
- painter->setRasterOp( Qt::NotROP );
+ painter->setRasterOp( TQt::NotROP );
painter->newPath();
- painter->setPen( Qt::DotLine );
- painter->setBrush( Qt::NoBrush );
+ painter->setPen( TQt::DotLine );
+ painter->setBrush( TQt::NoBrush );
painter->moveTo( first() );
painter->lineTo( m_last );
@@ -657,7 +657,7 @@ void
VTextTool::drawEditedText()
{
if( m_editedText )
- view()->repaintAll( m_editedText->boundingBox() );
+ view()->tqrepaintAll( m_editedText->boundingBox() );
}
void
@@ -678,7 +678,7 @@ VTextTool::mouseButtonRelease()
VObject* selObj = selection->objects().getFirst();
// initialize dialog with single selected object
- if( selection->objects().count() == 1 && selObj->boundingBox().contains( last() ) )
+ if( selection->objects().count() == 1 && selObj->boundingBox().tqcontains( last() ) )
m_optionsWidget->initialize( *selObj );
else
{
@@ -691,7 +691,7 @@ VTextTool::mouseButtonRelease()
return;
}
- if( dynamic_cast<VText*>( selObj ) && selObj->boundingBox().contains( last() ) )
+ if( dynamic_cast<VText*>( selObj ) && selObj->boundingBox().tqcontains( last() ) )
m_optionsWidget->setCaption( i18n( "Change Text") );
else
m_optionsWidget->setCaption( i18n( "Insert Text") );
@@ -768,7 +768,7 @@ VTextTool::createText( VSubpath &path )
m_text = 0L;
delete m_editedText;
- m_editedText = new VText( m_optionsWidget->font(), path, m_optionsWidget->position(), m_optionsWidget->alignment(), m_optionsWidget->text() );
+ m_editedText = new VText( m_optionsWidget->font(), path, m_optionsWidget->position(), m_optionsWidget->tqalignment(), m_optionsWidget->text() );
if( ! m_editedText )
return false;
@@ -795,15 +795,15 @@ VTextTool::textChanged()
{
// hide the original text if we are changing it
m_text->setState( VObject::hidden );
- view()->repaintAll( m_text->boundingBox() );
+ view()->tqrepaintAll( m_text->boundingBox() );
}
else
- view()->repaintAll( m_editedText->boundingBox() );
+ view()->tqrepaintAll( m_editedText->boundingBox() );
m_editedText->setText( m_optionsWidget->text() );
m_editedText->setFont( m_optionsWidget->font() );
m_editedText->setPosition( m_optionsWidget->position() );
- m_editedText->setAlignment( m_optionsWidget->alignment() );
+ m_editedText->tqsetAlignment( m_optionsWidget->tqalignment() );
m_editedText->setOffset( 0.01 * m_optionsWidget->offset() );
#ifdef HAVE_KARBONTEXT
m_editedText->traceText();
@@ -829,7 +829,7 @@ VTextTool::accept()
m_editedText->font(),
m_editedText->basePath(),
m_editedText->position(),
- m_editedText->alignment(),
+ m_editedText->tqalignment(),
m_editedText->offset(),
m_editedText->text(),
m_optionsWidget->useShadow(),
@@ -853,7 +853,7 @@ VTextTool::accept()
}
view()->part()->addCommand( cmd, true );
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
m_creating = false;
}
@@ -864,7 +864,7 @@ VTextTool::cancel()
{
// show original text if we canceled changing it
m_text->setState( VObject::selected );
- view()->repaintAll( m_text->boundingBox() );
+ view()->tqrepaintAll( m_text->boundingBox() );
}
else
drawPathCreation();
@@ -881,7 +881,7 @@ VTextTool::editBasePath()
view()->part()->document().selection()->clear();
view()->part()->document().selection()->append( &m_editedText->basePath() );
- view()->part()->repaintAllViews();
+ view()->part()->tqrepaintAllViews();
}
void
@@ -932,7 +932,7 @@ VTextTool::visitVText( VText& text )
m_optionsWidget->setFont( text.font() );
m_optionsWidget->setText( text.text() );
m_optionsWidget->setPosition( text.position() );
- m_optionsWidget->setAlignment( text.alignment() );
+ m_optionsWidget->tqsetAlignment( text.tqalignment() );
m_optionsWidget->setOffset( text.offset() * 100.0 );
m_optionsWidget->setUseShadow( text.useShadow() );
m_optionsWidget->setShadow( text.shadowAngle(), text.shadowDistance(), text.translucentShadow() );
@@ -941,7 +941,7 @@ VTextTool::visitVText( VText& text )
m_editedText->setState( VObject::edit );
}
-VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text )
+VTextTool::VTextCmd::VTextCmd( VDocument* doc, const TQString& name, VText* text )
: VCommand( doc, name, "14_text" ), m_text( text )
{
m_textModifications = 0L;
@@ -949,8 +949,8 @@ VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text
m_executed = false;
}
-VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text,
- const QFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const QString& newText,
+VTextTool::VTextCmd::VTextCmd( VDocument* doc, const TQString& name, VText* text,
+ const TQFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const TQString& newText,
bool newUseShadow, int newShadowAngle, int newShadowDistance, bool newTranslucentShadow )
: VCommand( doc, name, "14_text" ), m_text( text )
{
@@ -962,7 +962,7 @@ VTextTool::VTextCmd::VTextCmd( VDocument* doc, const QString& name, VText* text,
m_textModifications->newPosition = newPosition;
m_textModifications->oldPosition = text->position();
m_textModifications->newAlignment = newAlignment;
- m_textModifications->oldAlignment = text->alignment();
+ m_textModifications->oldAlignment = text->tqalignment();
m_textModifications->newOffset = newOffset;
m_textModifications->oldOffset = text->offset();
m_textModifications->newText = newText;
@@ -1007,7 +1007,7 @@ VTextTool::VTextCmd::execute()
m_text->setFont( m_textModifications->newFont );
m_text->setBasePath( m_textModifications->newBasePath );
m_text->setPosition( m_textModifications->newPosition );
- m_text->setAlignment( m_textModifications->newAlignment );
+ m_text->tqsetAlignment( m_textModifications->newAlignment );
m_text->setOffset( m_textModifications->newOffset );
m_text->setText( m_textModifications->newText );
m_text->setUseShadow( m_textModifications->newUseShadow );
@@ -1041,7 +1041,7 @@ VTextTool::VTextCmd::unexecute()
m_text->setFont( m_textModifications->oldFont );
m_text->setBasePath( m_textModifications->oldBasePath );
m_text->setPosition( m_textModifications->oldPosition );
- m_text->setAlignment( m_textModifications->oldAlignment );
+ m_text->tqsetAlignment( m_textModifications->oldAlignment );
m_text->setOffset( m_textModifications->oldOffset );
m_text->setText( m_textModifications->oldText );
m_text->setUseShadow( m_textModifications->oldUseShadow );
@@ -1059,7 +1059,7 @@ VTextTool::VTextCmd::unexecute()
setSuccess( false );
}
-VTextTool::VTextToCompositeCmd::VTextToCompositeCmd( VDocument* doc, const QString& name, VText* text )
+VTextTool::VTextToCompositeCmd::VTextToCompositeCmd( VDocument* doc, const TQString& name, VText* text )
: VCommand( doc, name, "14_text" ), m_text( text ), m_group( 0L ), m_executed( false )
{
}
@@ -1148,7 +1148,7 @@ VTextTool::setup( KActionCollection *collection )
if( m_action == 0 )
{
- m_action = new KRadioAction( i18n( "Text Tool" ), "14_text", Qt::SHIFT+Qt::Key_T, this, SLOT( activate() ), collection, name() );
+ m_action = new KRadioAction( i18n( "Text Tool" ), "14_text", TQt::SHIFT+TQt::Key_T, this, TQT_SLOT( activate() ), collection, name() );
m_action->setToolTip( i18n( "Text Tool" ) );
m_action->setExclusiveGroup( "misc" );
//m_ownAction = true;
diff --git a/karbon/tools/vtexttool.h b/karbon/tools/vtexttool.h
index add0dd35..ccecb192 100644
--- a/karbon/tools/vtexttool.h
+++ b/karbon/tools/vtexttool.h
@@ -27,9 +27,9 @@
#include <kdialogbase.h>
-#include "qframe.h"
-#include "qgroupbox.h"
-#include "qcombobox.h"
+#include "tqframe.h"
+#include "tqgroupbox.h"
+#include "tqcombobox.h"
#include "vcommand.h"
#include "vtext.h"
@@ -37,40 +37,42 @@
class KFontCombo;
class KIntNumInput;
-class QCheckBox;
-class QLineEdit;
-class QPushButton;
-class QTabWidget;
+class TQCheckBox;
+class TQLineEdit;
+class TQPushButton;
+class TQTabWidget;
class ShadowWidget;
class VTextTool;
-class QCursor;
+class TQCursor;
-class ShadowPreview : public QWidget
+class ShadowPreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- ShadowPreview( ShadowWidget* parent );
+ ShadowPreview( ShadowWidget* tqparent );
~ShadowPreview();
signals:
void changed( int angle, int distance, bool );
protected:
- virtual void mouseReleaseEvent( QMouseEvent* );
- virtual void paintEvent( QPaintEvent* );
+ virtual void mouseReleaseEvent( TQMouseEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
ShadowWidget* m_parent;
};
-class ShadowWidget : public QGroupBox
+class ShadowWidget : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- ShadowWidget( QWidget* parent, const char* name, int angle, int distance, bool translucent );
+ ShadowWidget( TQWidget* tqparent, const char* name, int angle, int distance, bool translucent );
~ShadowWidget();
void setUseShadow( bool use );
@@ -88,10 +90,10 @@ public slots:
void updatePreview();
protected:
- QCheckBox* m_useShadow;
+ TQCheckBox* m_useShadow;
KIntNumInput* m_angle;
KIntNumInput* m_distance;
- QCheckBox* m_translucent;
+ TQCheckBox* m_translucent;
ShadowPreview* m_preview;
};
@@ -99,19 +101,20 @@ protected:
class VTextOptionsWidget : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- VTextOptionsWidget( VTextTool* tool, QWidget *parent );
+ VTextOptionsWidget( VTextTool* tool, TQWidget *tqparent );
~VTextOptionsWidget();
- void setFont( const QFont& font );
- QFont font();
- void setText( const QString& text );
- QString text();
+ void setFont( const TQFont& font );
+ TQFont font();
+ void setText( const TQString& text );
+ TQString text();
void setPosition( VText::Position position );
VText::Position position();
- void setAlignment( VText::Alignment alignment );
- VText::Alignment alignment();
+ void tqsetAlignment( VText::Alignment tqalignment );
+ VText::Alignment tqalignment();
void setOffset( double offset );
double offset();
void setUseShadow( bool state );
@@ -126,23 +129,23 @@ public slots:
void valueChanged( double );
void accept();
void cancel();
- void textChanged( const QString& );
+ void textChanged( const TQString& );
void editBasePath();
void convertToShapes();
void initialize( VObject &text );
protected:
- QTabWidget* m_tabWidget;
+ TQTabWidget* m_tabWidget;
KFontCombo* m_fontCombo;
- QCheckBox* m_boldCheck;
- QCheckBox* m_italicCheck;
+ TQCheckBox* m_boldCheck;
+ TQCheckBox* m_italicCheck;
KIntNumInput* m_fontSize;
- QLineEdit* m_textEditor;
+ TQLineEdit* m_textEditor;
ShadowWidget* m_shadow;
- QComboBox* m_textAlignment;
- QComboBox* m_textPosition;
- QPushButton* m_editBasePath;
- QPushButton* m_convertToShapes;
+ TQComboBox* m_textAlignment;
+ TQComboBox* m_textPosition;
+ TQPushButton* m_editBasePath;
+ TQPushButton* m_convertToShapes;
KDoubleNumInput* m_textOffset;
VTextTool* m_tool;
};
@@ -155,9 +158,9 @@ public:
~VTextTool();
virtual void setup (KActionCollection *collection );
- virtual QString uiname() { return i18n( "Text Tool" ); }
+ virtual TQString uiname() { return i18n( "Text Tool" ); }
- virtual QString contextHelp();
+ virtual TQString contextHelp();
virtual bool showDialog() const;
virtual void activate();
@@ -196,9 +199,9 @@ private:
class VTextCmd : public VCommand
{
public:
- VTextCmd( VDocument* doc, const QString& name, VText* text );
- VTextCmd( VDocument* doc, const QString& name, VText* text,
- const QFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const QString& newText,
+ VTextCmd( VDocument* doc, const TQString& name, VText* text );
+ VTextCmd( VDocument* doc, const TQString& name, VText* text,
+ const TQFont &newFont, const VSubpath& newBasePath, VText::Position newPosition, VText::Alignment newAlignment, double newOffset, const TQString& newText,
bool newUseShadow, int newShadowAngle, int newShadowDistance, bool newTranslucentShadow );
virtual ~VTextCmd();
@@ -217,8 +220,8 @@ private:
VTextModifPrivate() : oldBasePath( 0L ), newBasePath( 0L )
{}
- QFont oldFont;
- QFont newFont;
+ TQFont oldFont;
+ TQFont newFont;
VSubpath oldBasePath;
VSubpath newBasePath;
VText::Position oldPosition;
@@ -227,8 +230,8 @@ private:
VText::Alignment newAlignment;
double oldOffset;
double newOffset;
- QString oldText;
- QString newText;
+ TQString oldText;
+ TQString newText;
bool oldUseShadow;
bool newUseShadow;
int oldShadowAngle;
@@ -247,7 +250,7 @@ private:
class VTextToCompositeCmd : public VCommand
{
public:
- VTextToCompositeCmd( VDocument* doc, const QString& name, VText* text );
+ VTextToCompositeCmd( VDocument* doc, const TQString& name, VText* text );
virtual ~VTextToCompositeCmd();
virtual void execute();
@@ -280,7 +283,7 @@ private:
bool m_creating;
// are we dragging in 45 degree steps?
bool m_stepwise;
- QCursor* m_cursor;
+ TQCursor* m_cursor;
};
#endif
diff --git a/karbon/usablity-review.txt b/karbon/usablity-review.txt
index 5d2eb8b4..237dc828 100644
--- a/karbon/usablity-review.txt
+++ b/karbon/usablity-review.txt
@@ -79,7 +79,7 @@ unselects is not one of the outside objects.
It is impossible to select an object that is completely inside another.
A perfect solution would:
-* make the 'hit area' based more on the outside of the shape.
+* make the 'hit area' based more on the outside of the tqshape.
A line should not be selected when clicked more then pixels next to it.
Text should be selected when clicked in the white area of a 'D'
diff --git a/karbon/visitors/vdrawselection.cc b/karbon/visitors/vdrawselection.cc
index ad597027..dbd93247 100644
--- a/karbon/visitors/vdrawselection.cc
+++ b/karbon/visitors/vdrawselection.cc
@@ -39,7 +39,7 @@ VDrawSelection::visitVPath( VPath &composite )
m_painter->save();
- m_painter->setPen( Qt::SolidLine );
+ m_painter->setPen( TQt::SolidLine );
const bool editnodes = composite.state() == VObject::edit && m_nodeediting;
@@ -53,10 +53,10 @@ VDrawSelection::visitVPath( VPath &composite )
m_painter->newPath();
if( editnodes )
- m_painter->setRasterOp( Qt::XorROP );
+ m_painter->setRasterOp( TQt::XorROP );
- m_painter->setPen( editnodes ? Qt::yellow : Qt::blue );
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setPen( editnodes ? TQt::yellow : TQt::blue );
+ m_painter->setBrush( TQt::NoBrush );
for( itr.toFirst(); itr.current(); ++itr )
{
@@ -89,7 +89,7 @@ VDrawSelection::visitVPath( VPath &composite )
for( ; jtr.current(); ++jtr )
{
if( editnodes )
- m_painter->setRasterOp( Qt::XorROP );
+ m_painter->setRasterOp( TQt::XorROP );
VColor color;
color.set( 0.5, 0.5, 1.0 );
@@ -100,12 +100,12 @@ VDrawSelection::visitVPath( VPath &composite )
if( !editnodes )
{
m_painter->setPen( stroke );
- m_painter->setPen( Qt::blue );
+ m_painter->setPen( TQt::blue );
}
else
- m_painter->setPen( Qt::yellow );
+ m_painter->setPen( TQt::yellow );
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
if( ( editnodes || composite.state() == VObject::selected && m_nodeediting ) &&
jtr.current()->isCurve() )
@@ -124,7 +124,7 @@ VDrawSelection::visitVPath( VPath &composite )
m_painter->strokePath();
// Draw control node2:
m_painter->newPath();
- m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue );
+ m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue );
m_painter->drawNode( curr->point( curr->degree()-2 ), m_nodeSize );
m_painter->strokePath();
}
@@ -138,21 +138,21 @@ VDrawSelection::visitVPath( VPath &composite )
m_painter->strokePath();
// Draw control node1:
m_painter->newPath();
- m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue );
+ m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue );
m_painter->drawNode( curr->point( 0 ), m_nodeSize );
m_painter->strokePath();
}
}
// Draw knot.
- m_painter->setPen( editnodes ? Qt::yellow : Qt::blue );
+ m_painter->setPen( editnodes ? TQt::yellow : TQt::blue );
if( !m_nodeediting )
- m_painter->setBrush( Qt::blue );
+ m_painter->setBrush( TQt::blue );
else if( jtr.current()->knotIsSelected() )
- m_painter->setBrush( editnodes ? Qt::yellow : Qt::blue );
+ m_painter->setBrush( editnodes ? TQt::yellow : TQt::blue );
else
- m_painter->setBrush( Qt::white );
+ m_painter->setBrush( TQt::white );
m_painter->drawNode( jtr.current()->knot(), m_nodeSize );
}
@@ -162,8 +162,8 @@ VDrawSelection::visitVPath( VPath &composite )
// Draw center node.
if( composite.drawCenterNode() && composite.state() == VObject::selected && !m_nodeediting )
{
- m_painter->setPen( Qt::NoPen );
- m_painter->setBrush( Qt::blue.light() );
+ m_painter->setPen( TQt::NoPen );
+ m_painter->setBrush( TQt::blue.light() );
m_painter->drawNode( composite.boundingBox().center(), m_nodeSize );
}
diff --git a/karbon/visitors/vselectiondesc.h b/karbon/visitors/vselectiondesc.h
index c019c107..036d2b85 100644
--- a/karbon/visitors/vselectiondesc.h
+++ b/karbon/visitors/vselectiondesc.h
@@ -21,7 +21,7 @@
#define __VSELECTIONDESC_H__
#include "vvisitor.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <koffice_export.h>
/**
* This visitors visits structures and tries to capture relevant object type info
@@ -42,12 +42,12 @@ public:
virtual void visitVText( VText& );
virtual void visitVImage( VImage& );
- QString description() { return m_desc; }
- QString shortDescription() { return m_shortdesc; }
+ TQString description() { return m_desc; }
+ TQString shortDescription() { return m_shortdesc; }
private:
- QString m_desc;
- QString m_shortdesc;
+ TQString m_desc;
+ TQString m_shortdesc;
};
#endif
diff --git a/karbon/visitors/vselectnodes.cc b/karbon/visitors/vselectnodes.cc
index 00f56de3..28789956 100644
--- a/karbon/visitors/vselectnodes.cc
+++ b/karbon/visitors/vselectnodes.cc
@@ -54,7 +54,7 @@ VSelectNodes::visitVSubpath( VSubpath& path )
// select all control points inside the selection rect
for( int i = 0; i < curr->degree()-1; ++i )
{
- if( m_rect.contains( curr->point( i ) ) )
+ if( m_rect.tqcontains( curr->point( i ) ) )
{
curr->selectPoint( i, m_select );
setSuccess();
@@ -81,7 +81,7 @@ VSelectNodes::visitVSubpath( VSubpath& path )
}
}
- if( m_rect.contains( curr->knot() ) )
+ if( m_rect.tqcontains( curr->knot() ) )
{
curr->selectKnot( m_select );
// select the last control point before the knot, if segment is curve
@@ -101,7 +101,7 @@ VSelectNodes::visitVSubpath( VSubpath& path )
void
VSelectNodes::visitVLayer( VLayer& layer )
{
- VDocument* doc = (VDocument*)layer.parent();
+ VDocument* doc = (VDocument*)layer.tqparent();
if ( ( layer.state() != VObject::deleted ) &&
( ( doc->selectionMode() == VDocument::AllLayers ) ||
( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) ||
@@ -122,7 +122,7 @@ VTestNodes::visitVSubpath( VSubpath& path )
while( path.current() )
{
for( int i = 0; i < path.current()->degree(); i++ )
- if( m_rect.contains( path.current()->point( i ) ) ) //&&
+ if( m_rect.tqcontains( path.current()->point( i ) ) ) //&&
//path.current()->pointIsSelected( i ) )
{
m_segments.append( path.current() );
@@ -138,7 +138,7 @@ VTestNodes::visitVSubpath( VSubpath& path )
void
VTestNodes::visitVLayer( VLayer& layer )
{
- VDocument* doc = (VDocument*)layer.parent();
+ VDocument* doc = (VDocument*)layer.tqparent();
if ( ( layer.state() != VObject::deleted ) &&
( ( doc->selectionMode() == VDocument::AllLayers ) ||
( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) ||
diff --git a/karbon/visitors/vselectnodes.h b/karbon/visitors/vselectnodes.h
index c4efc93c..d1e95c8f 100644
--- a/karbon/visitors/vselectnodes.h
+++ b/karbon/visitors/vselectnodes.h
@@ -59,11 +59,11 @@ public:
virtual void visitVSubpath( VSubpath& path );
virtual void visitVLayer( VLayer& layer );
- QPtrList<VSegment> &result() { return m_segments; }
+ TQPtrList<VSegment> &result() { return m_segments; }
private:
KoRect m_rect;
- QPtrList<VSegment> m_segments;
+ TQPtrList<VSegment> m_segments;
};
#endif
diff --git a/karbon/visitors/vselectobjects.cc b/karbon/visitors/vselectobjects.cc
index 060eeacb..d64900db 100644
--- a/karbon/visitors/vselectobjects.cc
+++ b/karbon/visitors/vselectobjects.cc
@@ -44,7 +44,7 @@ VSelectObjects::visitVPath( VPath& composite )
{
// Check if composite is completely inside the selection rectangle.
// This test should be the first test since it's the less expensive one.
- if( m_rect.contains( composite.boundingBox() ) )
+ if( m_rect.tqcontains( composite.boundingBox() ) )
{
selected = true;
}
@@ -117,7 +117,7 @@ VSelectObjects::visitVPath( VPath& composite )
if( m_select )
{
composite.setState( VObject::selected );
- if( ! m_selection.containsRef( &composite ) )
+ if( ! m_selection.tqcontainsRef( &composite ) )
m_selection.append( &composite );
}
else
@@ -148,7 +148,7 @@ VSelectObjects::visitVObject( VObject& object )
if( m_rect.intersects( object.boundingBox() ) )
{
object.setState( VObject::selected );
- if( ! m_selection.containsRef( &object ) )
+ if( ! m_selection.tqcontainsRef( &object ) )
m_selection.append( &object );
setSuccess();
}
@@ -168,7 +168,7 @@ VSelectObjects::visitVObject( VObject& object )
if( m_select )
{
object.setState( VObject::selected );
- if( ! m_selection.containsRef( &object ) )
+ if( ! m_selection.tqcontainsRef( &object ) )
m_selection.append( &object );
setSuccess();
}
@@ -183,12 +183,12 @@ VSelectObjects::visitVObject( VObject& object )
// selection by point
else
{
- if( object.boundingBox().contains( m_point ) )
+ if( object.boundingBox().tqcontains( m_point ) )
{
if( m_select )
{
object.setState( VObject::selected );
- if( ! m_selection.containsRef( &object ) )
+ if( ! m_selection.tqcontainsRef( &object ) )
m_selection.append( &object );
}
else
@@ -205,7 +205,7 @@ VSelectObjects::visitVObject( VObject& object )
void
VSelectObjects::visitVLayer( VLayer& layer )
{
- VDocument* doc = (VDocument*)layer.parent();
+ VDocument* doc = (VDocument*)layer.tqparent();
if ( ( layer.state() != VObject::deleted ) &&
( ( doc->selectionMode() == VDocument::AllLayers ) ||
( doc->selectionMode() == VDocument::VisibleLayers && ( layer.state() == VObject::normal || layer.state() == VObject::normal_locked ) ) ||
@@ -239,7 +239,7 @@ VSelectObjects::visitVText( VText& text )
kdDebug(38000) << "selected: " << itr.current() << endl;
m_selection.remove( &c );
text.setState( VObject::selected );
- if( ! m_selection.containsRef( &text ) )
+ if( ! m_selection.tqcontainsRef( &text ) )
m_selection.append( &text );
return;
}
diff --git a/karbon/visitors/vtransformnodes.cc b/karbon/visitors/vtransformnodes.cc
index ed670538..102bb33d 100644
--- a/karbon/visitors/vtransformnodes.cc
+++ b/karbon/visitors/vtransformnodes.cc
@@ -23,7 +23,7 @@
#include "vtransformnodes.h"
-VTransformNodes::VTransformNodes( const QWMatrix& m )
+VTransformNodes::VTransformNodes( const TQWMatrix& m )
: m_matrix( m )
{
}
@@ -44,7 +44,7 @@ VTransformNodes::visitVSubpath( VSubpath& path )
path.current()->isSmooth() )
{
// Do extra reverse trafo for smooth beziers
- QWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(),
+ TQWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(),
-m_matrix.dx(), -m_matrix.dy() );
path.current()->next()->setPoint( 0, path.current()->next()->point( 0 ).transform( m2 ) );
}
@@ -56,7 +56,7 @@ VTransformNodes::visitVSubpath( VSubpath& path )
path.current()->prev()->isSmooth() )
{
// Do extra reverse trafo for smooth beziers
- QWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(),
+ TQWMatrix m2( m_matrix.m11(), m_matrix.m12(), m_matrix.m21(), m_matrix.m22(),
-m_matrix.dx(), -m_matrix.dy() );
path.current()->prev()->setPoint( 1, path.current()->prev()->point( 1 ).transform( m2 ) );
}
diff --git a/karbon/visitors/vtransformnodes.h b/karbon/visitors/vtransformnodes.h
index 5c384e61..176fbd37 100644
--- a/karbon/visitors/vtransformnodes.h
+++ b/karbon/visitors/vtransformnodes.h
@@ -20,7 +20,7 @@
#ifndef __VTRANSFORMNODES_H__
#define __VTRANSFORMNODES_H__
-#include <qwmatrix.h>
+#include <tqwmatrix.h>
#include <koffice_export.h>
#include "vvisitor.h"
@@ -31,12 +31,12 @@ class VSegment;
class KARBONBASE_EXPORT VTransformNodes : public VVisitor
{
public:
- VTransformNodes( const QWMatrix& m );
+ VTransformNodes( const TQWMatrix& m );
virtual void visitVSubpath( VSubpath& path );
private:
- QWMatrix m_matrix;
+ TQWMatrix m_matrix;
};
#endif
diff --git a/karbon/vtool.cc b/karbon/vtool.cc
index 66114048..140d6513 100644
--- a/karbon/vtool.cc
+++ b/karbon/vtool.cc
@@ -17,8 +17,8 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qevent.h>
-#include <qlabel.h>
+#include <tqevent.h>
+#include <tqlabel.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -31,7 +31,7 @@
#include "vtool.moc"
-VTool::VTool( KarbonView *view, const char *name ) : QObject( 0, name ), m_view( view )
+VTool::VTool( KarbonView *view, const char *name ) : TQObject( 0, name ), m_view( view )
{
m_mouseButtonIsDown = false;
m_isDragging = false;
@@ -69,7 +69,7 @@ VTool::view() const
}
bool
-VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
+VTool::mouseEvent( TQMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
{
if( !view() || !view()->part() || !view()->part()->isReadWrite() )
return false;
@@ -79,24 +79,24 @@ VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
setCursor();
- m_altPressed = mouseEvent->state() & Qt::AltButton;
- m_shiftPressed = mouseEvent->state() & Qt::ShiftButton;
- m_ctrlPressed = mouseEvent->state() & Qt::ControlButton;
+ m_altPressed = mouseEvent->state() & TQt::AltButton;
+ m_shiftPressed = mouseEvent->state() & TQt::ShiftButton;
+ m_ctrlPressed = mouseEvent->state() & TQt::ControlButton;
// Mouse events:
- if( mouseEvent->type() == QEvent::MouseButtonDblClick )
+ if( mouseEvent->type() == TQEvent::MouseButtonDblClick )
{
mouseButtonDblClick();
return true;
}
- if( mouseEvent->type() == QEvent::MouseButtonPress )
+ if( mouseEvent->type() == TQEvent::MouseButtonPress )
{
m_firstPoint.setX( canvasCoordinate.x() );
m_firstPoint.setY( canvasCoordinate.y() );
- if( mouseEvent->button() == QEvent::RightButton )
+ if( mouseEvent->button() == Qt::RightButton )
rightMouseButtonPress();
else
mouseButtonPress();
@@ -106,7 +106,7 @@ VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
return true;
}
- if( mouseEvent->type() == QEvent::MouseMove )
+ if( mouseEvent->type() == TQEvent::MouseMove )
{
//setCursor();
@@ -122,7 +122,7 @@ VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
return true;
}
- if( mouseEvent->type() == QEvent::MouseButtonRelease )
+ if( mouseEvent->type() == TQEvent::MouseButtonRelease )
{
if( m_isDragging )
{
@@ -131,7 +131,7 @@ VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
m_isDragging = false;
}
else if( m_mouseButtonIsDown ) // False if canceled.
- if( mouseEvent->button() == QEvent::RightButton )
+ if( mouseEvent->button() == Qt::RightButton )
rightMouseButtonRelease();
else
mouseButtonRelease();
@@ -145,17 +145,17 @@ VTool::mouseEvent( QMouseEvent* mouseEvent, const KoPoint &canvasCoordinate )
}
bool
-VTool::keyEvent( QEvent* event )
+VTool::keyEvent( TQEvent* event )
{
// Key press events.
- if( event->type() == QEvent::KeyPress )
+ if( event->type() == TQEvent::KeyPress )
{
- QKeyEvent* keyEvent = static_cast<QKeyEvent*>( event );
+ TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event );
// Terminate the current drawing with the Enter-key:
if(
- ( keyEvent->key() == Qt::Key_Enter ||
- keyEvent->key() == Qt::Key_Return )
+ ( keyEvent->key() == TQt::Key_Enter ||
+ keyEvent->key() == TQt::Key_Return )
&& !m_isDragging )
{
accept();
@@ -164,7 +164,7 @@ VTool::keyEvent( QEvent* event )
}
// Terminate the current drawing with the Enter-key:
- if( keyEvent->key() == Qt::Key_Backspace && !m_isDragging )
+ if( keyEvent->key() == TQt::Key_Backspace && !m_isDragging )
{
cancelStep();
@@ -172,7 +172,7 @@ VTool::keyEvent( QEvent* event )
}
// Cancel dragging with ESC-key:
- if( keyEvent->key() == Qt::Key_Escape )
+ if( keyEvent->key() == TQt::Key_Escape )
{
cancel();
@@ -183,7 +183,7 @@ VTool::keyEvent( QEvent* event )
}
// If SHIFT is pressed, some tools create a "square" object while dragging:
- if( keyEvent->key() == Qt::Key_Shift )
+ if( keyEvent->key() == TQt::Key_Shift )
{
m_shiftPressed = true;
if( m_isDragging )
@@ -195,7 +195,7 @@ VTool::keyEvent( QEvent* event )
}
// If Ctrl is pressed, some tools create a "centered" object while dragging:
- if( keyEvent->key() == Qt::Key_Control )
+ if( keyEvent->key() == TQt::Key_Control )
{
m_ctrlPressed = true;
if( m_isDragging )
@@ -209,12 +209,12 @@ VTool::keyEvent( QEvent* event )
}
// Key release events:
- if( event->type() == QEvent::KeyRelease )
+ if( event->type() == TQEvent::KeyRelease )
{
- QKeyEvent* keyEvent = static_cast<QKeyEvent*>( event );
+ TQKeyEvent* keyEvent = TQT_TQKEYEVENT( event );
- Qt::Key key = (Qt::Key)keyEvent->key();
- if( key == Qt::Key_Shift )
+ TQt::Key key = (TQt::Key)keyEvent->key();
+ if( key == TQt::Key_Shift )
{
m_shiftPressed = false;
if( m_isDragging )
@@ -225,7 +225,7 @@ VTool::keyEvent( QEvent* event )
}
}
- if( key == Qt::Key_Control )
+ if( key == TQt::Key_Control )
{
m_ctrlPressed = false;
if( m_isDragging )
@@ -236,7 +236,7 @@ VTool::keyEvent( QEvent* event )
}
}
- if( key == Qt::Key_Left || key == Qt::Key_Right || key == Qt::Key_Up || key == Qt::Key_Down )
+ if( key == TQt::Key_Left || key == TQt::Key_Right || key == TQt::Key_Up || key == TQt::Key_Down )
{
arrowKeyReleased( key );
return true;
@@ -253,7 +253,7 @@ VTool::activate()
{
kdDebug() << k_funcinfo << endl;
refreshUnit();
- QPixmap Icon = BarIcon( icon() );
+ TQPixmap Icon = BarIcon( icon() );
view()->contextHelpAction()->updateHelp( uiname(), contextHelp(), &Icon );
view()->statusMessage()->setText( statusText() );
toolController()->setCurrentTool( this );
@@ -269,7 +269,7 @@ VTool::activate()
else
{
refreshUnit();
- QPixmap Icon = BarIcon( icon() );
+ TQPixmap Icon = BarIcon( icon() );
view()->contextHelpAction()->updateHelp( uiname(), contextHelp(), &Icon );
view()->statusMessage()->setText( statusText() );
toolController()->activeTool()->action()->setChecked( true );
diff --git a/karbon/vtool.h b/karbon/vtool.h
index 6447225f..3eabbe76 100644
--- a/karbon/vtool.h
+++ b/karbon/vtool.h
@@ -20,7 +20,7 @@
#ifndef __VTOOL_H__
#define __VTOOL_H__
-#include <qobject.h>
+#include <tqobject.h>
#include <kaction.h>
#include <klocale.h>
#include <KoPoint.h>
@@ -28,8 +28,8 @@
class KRadioAction;
class KarbonPart;
class KarbonView;
-class QEvent;
-class QWidget;
+class TQEvent;
+class TQWidget;
class VPainter;
class VToolController;
@@ -37,7 +37,7 @@ enum enumToolType
{
TOOL_SELECT = 0, //
TOOL_FREEHAND = 1, //
- TOOL_SHAPE = 2, // Geometric shapes like ellipses and lines
+ TOOL_SHAPE = 2, // Geometric tqshapes like ellipses and lines
TOOL_MANIPULATION = 3, //
TOOL_MISC = 4 //
};
@@ -48,9 +48,10 @@ enum enumToolType
* Each tool has an icon, name and category. Basic mouse event and key handling is
* implemented here.
*/
-class KARBONBASE_EXPORT VTool : public QObject
+class KARBONBASE_EXPORT VTool : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -89,12 +90,12 @@ public:
/**
* The name of the tool.
*/
- virtual QString uiname() { return i18n( "Unnamed Tool" ); }
+ virtual TQString uiname() { return i18n( "Unnamed Tool" ); }
/**
* The context help of the tool.
*/
- virtual QString contextHelp() { return i18n( "This tool has no description." ); }
+ virtual TQString contextHelp() { return i18n( "This tool has no description." ); }
/**
* The tool type.
@@ -104,7 +105,7 @@ public:
/**
* The tool status text.
*/
- virtual QString statusText() { return ""; }
+ virtual TQString statusText() { return ""; }
/**
* Position in toolbox. Zero means no preferred position, other
@@ -115,21 +116,21 @@ public:
/**
* The tool icon name.
*/
- QString icon() { return m_action->icon(); }
+ TQString icon() { return m_action->icon(); }
/**
* This function processes every important mouse event.
* It then calls suiting functions like mouseMoved() so deriving tools
* don't need to directly deal with events themselves.
*/
- bool mouseEvent( QMouseEvent* event, const KoPoint& );
+ bool mouseEvent( TQMouseEvent* event, const KoPoint& );
/**
* This function processes every important key event.
* It then calls suiting functions like mouseButtonPress() so deriving tools
* don't need to directly deal with events themselves.
*/
- bool keyEvent( QEvent* event );
+ bool keyEvent( TQEvent* event );
/**
* This function is called when the documents unit setting were changed.
@@ -241,12 +242,12 @@ protected:
/**
* "Arrow" key released up, down, left, right
*/
- virtual void arrowKeyReleased( Qt::Key ) {}
+ virtual void arrowKeyReleased( TQt::Key ) {}
/**
* Specified key released.
*/
- virtual bool keyReleased( Qt::Key ) { return false; }
+ virtual bool keyReleased( TQt::Key ) { return false; }
/**
* Cancels all tool operations. This event is invoked when ESC is pressed.
@@ -307,7 +308,7 @@ protected:
/** The tool's action object. */
KRadioAction *m_action;
- /** Helper function. Returns the parent view's toolcontroller. */
+ /** Helper function. Returns the tqparent view's toolcontroller. */
VToolController *toolController() const;
private:
diff --git a/karbon/vtoolcontroller.cc b/karbon/vtoolcontroller.cc
index 4ce02c79..902deb78 100644
--- a/karbon/vtoolcontroller.cc
+++ b/karbon/vtoolcontroller.cc
@@ -65,7 +65,7 @@ VToolController::setCurrentTool( VTool *tool )
void
VToolController::registerTool( VTool *tool )
{
- if( !m_tools.find( tool->name() ) )
+ if( !m_tools.tqfind( tool->name() ) )
m_tools.insert( tool->name(), tool );
//kdDebug(38000) << "active tool : " << m_currentTool->name() << endl;
}
@@ -74,7 +74,7 @@ void
VToolController::unregisterTool( VTool *tool )
{
// tool->name() is not valid in VTool destructor
- QDictIterator<VTool> it( m_tools );
+ TQDictIterator<VTool> it( m_tools );
for( ; it.current(); ++it )
if (it.current() == tool)
{
@@ -84,7 +84,7 @@ VToolController::unregisterTool( VTool *tool )
}
bool
-VToolController::mouseEvent( QMouseEvent* event, const KoPoint &p )
+VToolController::mouseEvent( TQMouseEvent* event, const KoPoint &p )
{
if( !m_currentTool ) {
return false;
@@ -94,7 +94,7 @@ VToolController::mouseEvent( QMouseEvent* event, const KoPoint &p )
}
bool
-VToolController::keyEvent( QEvent* event )
+VToolController::keyEvent( TQEvent* event )
{
if( !m_currentTool ) {
return false;
@@ -116,7 +116,7 @@ VToolController::setUp( KActionCollection *ac, VToolBox * toolbox )
m_toolBox = toolbox;
- QDictIterator<VTool> it( m_tools );
+ TQDictIterator<VTool> it( m_tools );
for( ; it.current(); ++it )
toolbox->registerTool( it.current() );
@@ -133,7 +133,7 @@ VToolController::resetToolBox( VToolBox * toolbox )
{
m_toolBox = toolbox;
- QDictIterator<VTool> it( m_tools );
+ TQDictIterator<VTool> it( m_tools );
for( ; it.current(); ++it )
toolbox->registerTool( it.current() );
@@ -148,10 +148,10 @@ VToolController::resetToolBox( VToolBox * toolbox )
}
VTool *
-VToolController::findTool( const QString &toolName ) const
+VToolController::findTool( const TQString &toolName ) const
{
VTool *tool = 0;
- QDictIterator<VTool> it( m_tools );
+ TQDictIterator<VTool> it( m_tools );
for( ; it.current(); ++it )
if( it.current()->name() == toolName )
return it.current();
diff --git a/karbon/vtoolcontroller.h b/karbon/vtoolcontroller.h
index 69df1219..47667172 100644
--- a/karbon/vtoolcontroller.h
+++ b/karbon/vtoolcontroller.h
@@ -20,10 +20,10 @@
#ifndef __VTOOLCONTROLLER_H__
#define __VTOOLCONTROLLER_H__
-#include <qdict.h>
+#include <tqdict.h>
#include <KoPoint.h>
-class QEvent;
+class TQEvent;
class VTool;
class KarbonView;
@@ -43,14 +43,14 @@ public:
void setCurrentTool( VTool * );
VTool *currentTool() const { return m_currentTool; }
- bool mouseEvent( QMouseEvent* event, const KoPoint& );
- bool keyEvent( QEvent* event );
+ bool mouseEvent( TQMouseEvent* event, const KoPoint& );
+ bool keyEvent( TQEvent* event );
- const QDict<VTool> &tools() { return m_tools; }
+ const TQDict<VTool> &tools() { return m_tools; }
void setUp( KActionCollection *ac, VToolBox * toolbox );
void resetToolBox( VToolBox * toolbox );
- VTool *findTool( const QString &toolName ) const;
+ VTool *findTool( const TQString &toolName ) const;
// Called when the toolbox is deleted because the view was made inactive in favour of another view
void youAintGotNoToolBox();
@@ -58,7 +58,7 @@ public:
private:
KarbonView *m_view;
VTool *m_currentTool;
- QDict<VTool> m_tools;
+ TQDict<VTool> m_tools;
VToolBox *m_toolBox;
bool m_setup;
};
diff --git a/karbon/widgets/vcanvas.cc b/karbon/widgets/vcanvas.cc
index c3c91670..28b272ae 100644
--- a/karbon/widgets/vcanvas.cc
+++ b/karbon/widgets/vcanvas.cc
@@ -17,9 +17,9 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcursor.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqcursor.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include "karbon_view.h"
#include "karbon_part.h"
@@ -67,15 +67,15 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
KoSize dist = m_part->document().grid().snap;
KoSize dxy = m_part->document().grid().freq;
- int dx = qRound( p.x() / dxy.width() );
- int dy = qRound( p.y() / dxy.height() );
+ int dx = tqRound( p.x() / dxy.width() );
+ int dy = tqRound( p.y() / dxy.height() );
- float distx = QMIN( QABS( p.x() - dxy.width() * dx ), QABS( p.x() - dxy.width() * ( dx + 1 ) ) );
- float disty = QMIN( QABS( p.y() - dxy.height() * dy ), QABS( p.y() - dxy.height() * ( dy + 1 ) ) );
+ float distx = TQMIN( TQABS( p.x() - dxy.width() * dx ), TQABS( p.x() - dxy.width() * ( dx + 1 ) ) );
+ float disty = TQMIN( TQABS( p.y() - dxy.height() * dy ), TQABS( p.y() - dxy.height() * ( dy + 1 ) ) );
if( distx < dist.width() )
{
- if( QABS(p.x() - dxy.width() * dx ) < QABS( p.x() - dxy.width() * ( dx + 1 ) ) )
+ if( TQABS(p.x() - dxy.width() * dx ) < TQABS( p.x() - dxy.width() * ( dx + 1 ) ) )
p.rx() = dxy.width() * dx;
else
p.rx() = dxy.width() * ( dx + 1 );
@@ -83,7 +83,7 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
if( disty < dist.height() )
{
- if( QABS( p.y() - dxy.height() * dy ) < QABS( p.y() - dxy.height() * ( dy + 1 ) ) )
+ if( TQABS( p.y() - dxy.height() * dy ) < TQABS( p.y() - dxy.height() * ( dy + 1 ) ) )
p.ry() = dxy.height() * dy;
else
p.ry() = dxy.height() * ( dy + 1 );
@@ -93,22 +93,22 @@ KoPoint VCanvas::snapToGrid( const KoPoint &point )
}
-VCanvas::VCanvas( QWidget *parent, KarbonView* view, KarbonPart* part )
- : QScrollView( parent, "canvas", WStaticContents/*WNorthWestGravity*/ | WResizeNoErase |
+VCanvas::VCanvas( TQWidget *tqparent, KarbonView* view, KarbonPart* part )
+ : TQScrollView( tqparent, "canvas", WStaticContents/*WNorthWestGravity*/ | WResizeNoErase |
WRepaintNoErase ), m_part( part ), m_view( view )
{
- connect(this, SIGNAL( contentsMoving( int, int ) ), this, SLOT( slotContentsMoving( int, int ) ) );
- viewport()->setFocusPolicy( QWidget::StrongFocus );
+ connect(this, TQT_SIGNAL( contentsMoving( int, int ) ), this, TQT_SLOT( slotContentsMoving( int, int ) ) );
+ viewport()->setFocusPolicy( TQ_StrongFocus );
viewport()->setMouseTracking( true );
setMouseTracking( true );
- viewport()->setBackgroundColor( Qt::white );
- viewport()->setBackgroundMode( QWidget::NoBackground );
+ viewport()->setBackgroundColor( TQt::white );
+ viewport()->setBackgroundMode( TQWidget::NoBackground );
viewport()->installEventFilter( this );
resizeContents( 800, 600 );
- m_pixmap = new QPixmap( 800, 600 );
+ m_pixmap = new TQPixmap( 800, 600 );
setFocus();
@@ -126,21 +126,21 @@ void
VCanvas::setPos( const KoPoint& p )
{
KoPoint p2 = toViewport( p );
- QCursor::setPos( mapToGlobal( QPoint( int(p2.x()), int(p2.y()) ) ) );
+ TQCursor::setPos( mapToGlobal( TQPoint( int(p2.x()), int(p2.y()) ) ) );
}
bool
-VCanvas::eventFilter( QObject* object, QEvent* event )
+VCanvas::eventFilter( TQObject* object, TQEvent* event )
{
- QScrollView::eventFilter( object, event );
+ TQScrollView::eventFilter( object, event );
- if( event->type() == QEvent::AccelOverride || event->type() == QEvent::Accel )
- return QScrollView::eventFilter( object, event );
+ if( event->type() == TQEvent::AccelOverride || event->type() == TQEvent::Accel )
+ return TQScrollView::eventFilter( object, event );
- if( event->type() == QEvent::KeyPress || event->type() == QEvent::KeyRelease )
+ if( event->type() == TQEvent::KeyPress || event->type() == TQEvent::KeyRelease )
return m_view->keyEvent( event );
- QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>( event );
+ TQMouseEvent* mouseEvent = dynamic_cast<TQMouseEvent*>( event );
if( mouseEvent && m_view )
{
@@ -152,9 +152,9 @@ VCanvas::eventFilter( QObject* object, QEvent* event )
}
-// This causes a repaint normally, so just overwriting it omits the repainting
+// This causes a tqrepaint normally, so just overwriting it omits the tqrepainting
void
-VCanvas::focusInEvent( QFocusEvent * )
+VCanvas::focusInEvent( TQFocusEvent * )
{
}
@@ -198,7 +198,7 @@ VCanvas::boundingBox() const
void
VCanvas::setYMirroring( VPainter *p )
{
- QWMatrix mat;
+ TQWMatrix mat;
mat.scale( 1, -1 );
mat.translate( pageOffsetX(), pageOffsetY() );
@@ -212,10 +212,10 @@ VCanvas::setYMirroring( VPainter *p )
}
void
-VCanvas::viewportPaintEvent( QPaintEvent *e )
+VCanvas::viewportPaintEvent( TQPaintEvent *e )
{
- QRect eventRect = e->rect();
- KoRect rect = KoRect::fromQRect( eventRect );
+ TQRect eventRect = e->rect();
+ KoRect rect = KoRect::fromTQRect( eventRect );
setYMirroring( m_view->painterFactory()->editpainter() );
viewport()->setUpdatesEnabled( false );
@@ -223,12 +223,12 @@ VCanvas::viewportPaintEvent( QPaintEvent *e )
// TODO : only update ROIs
p->begin();
- p->clear( rect, QColor( 195, 194, 193 ) );
+ p->clear( rect, TQColor( 195, 194, 193 ) );
p->setZoomFactor( m_view->zoom() );
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- QWMatrix mat = p->worldMatrix();
+ TQWMatrix mat = p->tqworldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
// set up clippath
@@ -248,7 +248,7 @@ VCanvas::viewportPaintEvent( QPaintEvent *e )
p->end();
// draw handle:
- VQPainter qpainter( p->device() );
+ VTQPainter qpainter( p->device() );
setYMirroring( &qpainter );
qpainter.setZoomFactor( m_view->zoom() );
m_part->document().selection()->draw( &qpainter, m_view->zoom() );
@@ -286,14 +286,14 @@ VCanvas::setViewportRect( const KoRect &r )
}
void
-VCanvas::drawContents( QPainter* painter, int clipx, int clipy,
+VCanvas::drawContents( TQPainter* painter, int clipx, int clipy,
int clipw, int cliph )
{
drawDocument( painter, KoRect( clipx, clipy, clipw, cliph ) );
}
void
-VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
+VCanvas::drawDocument( TQPainter* /*painter*/, const KoRect&, bool drawVObjects )
{
setYMirroring( m_view->painterFactory()->editpainter() );
@@ -301,11 +301,11 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
if( drawVObjects )
{
p->begin();
- p->clear( QColor( 195, 194, 193 ) );
+ p->clear( TQColor( 195, 194, 193 ) );
p->setZoomFactor( m_view->zoom() );
setYMirroring( p );
// TRICK : slightly adjust the matrix so libart AA looks better
- QWMatrix mat = p->worldMatrix();
+ TQWMatrix mat = p->tqworldMatrix();
p->setWorldMatrix( mat.translate( -.5, -.5 ) );
m_part->document().drawPage( p, m_part->pageLayout(), m_view->showPageMargins() );
@@ -316,7 +316,7 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
}
// draw handle:
- VQPainter qpainter( p->device() );
+ VTQPainter qpainter( p->device() );
setYMirroring( &qpainter );
qpainter.setZoomFactor( m_view->zoom() );
m_part->document().selection()->draw( &qpainter, m_view->zoom() );
@@ -328,33 +328,33 @@ VCanvas::drawDocument( QPainter* /*painter*/, const KoRect&, bool drawVObjects )
}
void
-VCanvas::repaintAll( bool drawVObjects )
+VCanvas::tqrepaintAll( bool drawVObjects )
{
drawDocument( 0, KoRect( 0, 0, width(), height() ), drawVObjects );
}
-/// repaints just a rect area (no scrolling)
+/// tqrepaints just a rect area (no scrolling)
void
-VCanvas::repaintAll( const KoRect &r )
+VCanvas::tqrepaintAll( const KoRect &r )
{
drawDocument( 0, r );
}
void
-VCanvas::resizeEvent( QResizeEvent* event )
+VCanvas::resizeEvent( TQResizeEvent* event )
{
double centerX = double( contentsX() + 0.5 * visibleWidth() ) / double( contentsWidth() );
double centerY = double( contentsY() + 0.5 * visibleHeight() ) / double( contentsHeight() );
- QScrollView::resizeEvent( event );
+ TQScrollView::resizeEvent( event );
if( !m_pixmap )
- m_pixmap = new QPixmap( width(), height() );
+ m_pixmap = new TQPixmap( width(), height() );
else
m_pixmap->resize( width(), height() );
VPainter *p = m_view->painterFactory()->painter();
p->resize( width(), height() );
- p->clear( QColor( 195, 194, 193 ) );
+ p->clear( TQColor( 195, 194, 193 ) );
setViewport( centerX, centerY );
}
@@ -365,13 +365,13 @@ VCanvas::slotContentsMoving( int /*x*/, int /*y*/ )
}
void
-VCanvas::dragEnterEvent( QDragEnterEvent *e )
+VCanvas::dragEnterEvent( TQDragEnterEvent *e )
{
e->accept( KarbonDrag::canDecode( e ) || KColorDrag::canDecode( e ) );
}
void
-VCanvas::dropEvent( QDropEvent *e )
+VCanvas::dropEvent( TQDropEvent *e )
{
m_view->dropEvent( e );
}
diff --git a/karbon/widgets/vcanvas.h b/karbon/widgets/vcanvas.h
index d0446087..09dc07d3 100644
--- a/karbon/widgets/vcanvas.h
+++ b/karbon/widgets/vcanvas.h
@@ -21,7 +21,7 @@
#define __VCANVAS_H__
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <koffice_export.h>
class KarbonPart;
class KarbonView;
@@ -29,19 +29,20 @@ class KoRect;
class KoPoint;
class VPainter;
-// The canvas is a QScrollView.
+// The canvas is a TQScrollView.
-class KARBONCOMMON_EXPORT VCanvas : public QScrollView
+class KARBONCOMMON_EXPORT VCanvas : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- VCanvas( QWidget *parent, KarbonView* view, KarbonPart* part );
+ VCanvas( TQWidget *tqparent, KarbonView* view, KarbonPart* part );
virtual ~VCanvas();
- void repaintAll( const KoRect & );
- void repaintAll( bool drawVObjects = true );
+ void tqrepaintAll( const KoRect & );
+ void tqrepaintAll( bool drawVObjects = true );
- QPixmap *pixmap() { return m_pixmap; }
+ TQPixmap *pixmap() { return m_pixmap; }
/**
* Sets mouse position to point p.
@@ -72,17 +73,17 @@ public:
KoPoint snapToGrid( const KoPoint & );
protected:
- virtual void dragEnterEvent( QDragEnterEvent * );
- virtual void dropEvent( QDropEvent * );
- virtual void focusInEvent( QFocusEvent * );
- virtual void viewportPaintEvent( QPaintEvent* );
- virtual void drawContents( QPainter* painter, int clipx, int clipy,
+ virtual void dragEnterEvent( TQDragEnterEvent * );
+ virtual void dropEvent( TQDropEvent * );
+ virtual void focusInEvent( TQFocusEvent * );
+ virtual void viewportPaintEvent( TQPaintEvent* );
+ virtual void drawContents( TQPainter* painter, int clipx, int clipy,
int clipw, int cliph );
- void drawDocument( QPainter* painter, const KoRect& rect, bool drawVObjects = true );
+ void drawDocument( TQPainter* painter, const KoRect& rect, bool drawVObjects = true );
- virtual void resizeEvent( QResizeEvent* event );
+ virtual void resizeEvent( TQResizeEvent* event );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
void setYMirroring( VPainter * );
@@ -93,7 +94,7 @@ signals:
void viewportChanged();
private:
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
KarbonPart* m_part;
KarbonView* m_view;
};
diff --git a/karbon/widgets/vcolorslider.cc b/karbon/widgets/vcolorslider.cc
index cd11951b..e0c20555 100644
--- a/karbon/widgets/vcolorslider.cc
+++ b/karbon/widgets/vcolorslider.cc
@@ -20,23 +20,23 @@
/* vcolorslider.cc */
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <knuminput.h>
#include <kselect.h>
#include "vcolorslider.h"
-VColorSlider::VColorSlider( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
}
// Label, left color, right color, min, max, value ...
-VColorSlider::VColorSlider( const QString& label, const QColor& col1,
- const QColor& col2, int min, int max, int value, QWidget* parent, const char* name )
- : QWidget( parent, name )
+VColorSlider::VColorSlider( const TQString& label, const TQColor& col1,
+ const TQColor& col2, int min, int max, int value, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
init();
setLabel( label );
@@ -53,34 +53,34 @@ VColorSlider::~VColorSlider()
void VColorSlider::init()
{
m_isDragging = false;
- QHBoxLayout *layout = new QHBoxLayout( this, 3 );
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 3 );
- m_label = new QLabel( this );
- m_gradientSelect = new KGradientSelector( KSelector::Horizontal, this );
+ m_label = new TQLabel( this );
+ m_gradientSelect = new KGradientSelector( Qt::Horizontal, this );
m_spinBox = new KIntSpinBox( this );
- layout->addWidget( m_label );
- layout->addWidget( m_gradientSelect, 2 );
- layout->addWidget( m_spinBox );
+ tqlayout->addWidget( m_label );
+ tqlayout->addWidget( m_gradientSelect, 2 );
+ tqlayout->addWidget( m_spinBox );
setValue( 0 );
setMinValue( 0 );
setMaxValue( 255 );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->installEventFilter( this );
- layout->activate();
+ tqlayout->activate();
}
-void VColorSlider::setLabel( const QString& label )
+void VColorSlider::setLabel( const TQString& label )
{
m_label->setText( label );
}
-void VColorSlider::setColors( const QColor& color1, const QColor& color2 )
+void VColorSlider::setColors( const TQColor& color1, const TQColor& color2 )
{
m_gradientSelect->setColors( color1, color2 );
}
@@ -114,9 +114,9 @@ void VColorSlider::updateFrom_spinBox( int value )
{
if ( value != m_gradientSelect->value() )
{
- disconnect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ disconnect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
m_gradientSelect->setValue( (m_maxValue - value) + m_minValue );
- connect( m_gradientSelect, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_gradientSelect( int ) ) );
+ connect( m_gradientSelect, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_gradientSelect( int ) ) );
emit valueChanged( value );
}
}
@@ -126,20 +126,20 @@ void VColorSlider::updateFrom_gradientSelect( int value )
value = (m_maxValue - value) + m_minValue;
if ( value != m_spinBox->value() )
{
- disconnect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ disconnect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
m_spinBox->setValue( value );
- connect( m_spinBox, SIGNAL( valueChanged ( int ) ), this, SLOT( updateFrom_spinBox( int ) ) );
+ connect( m_spinBox, TQT_SIGNAL( valueChanged ( int ) ), this, TQT_SLOT( updateFrom_spinBox( int ) ) );
emit valueChanged( value );
}
}
-bool VColorSlider::eventFilter( QObject *obj, QEvent *ev )
+bool VColorSlider::eventFilter( TQObject *obj, TQEvent *ev )
{
- if( obj == m_gradientSelect )
+ if( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(m_gradientSelect) )
{
- if ( ev->type() == QEvent::MouseButtonPress )
+ if ( ev->type() == TQEvent::MouseButtonPress )
m_isDragging = true;
- else if( ev->type() == QEvent::MouseButtonRelease )
+ else if( ev->type() == TQEvent::MouseButtonRelease )
m_isDragging = false;
}
return FALSE;
diff --git a/karbon/widgets/vcolorslider.h b/karbon/widgets/vcolorslider.h
index 82c7f6ec..dc3d659a 100644
--- a/karbon/widgets/vcolorslider.h
+++ b/karbon/widgets/vcolorslider.h
@@ -22,9 +22,9 @@
#ifndef VCOLORSLIDER_H
#define VCOLORSLIDER_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QLabel;
+class TQLabel;
class KIntSpinBox;
class KGradientSelector;
@@ -32,17 +32,18 @@ class KGradientSelector;
* This is the color slider widget that is used to select color or color components.
* It combines a label, a gradient selector and a spinbox.
*/
-class VColorSlider : public QWidget
+class VColorSlider : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructs a new color slider.
*
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param name the slider's name
*/
- VColorSlider( QWidget* parent = 0L, const char* name = 0L );
+ VColorSlider( TQWidget* tqparent = 0L, const char* name = 0L );
/**
* Constructs a new color slider.
@@ -53,11 +54,11 @@ public:
* @param min the minimum value
* @param max the maximum value
* @param value the actual value
- * @param parent the parent widget
+ * @param tqparent the tqparent widget
* @param name the slider's name
*/
- VColorSlider( const QString& label, const QColor& col1, const QColor& col2,
- int min, int max, int value, QWidget* parent = 0L, const char* name = 0L );
+ VColorSlider( const TQString& label, const TQColor& col1, const TQColor& col2,
+ int min, int max, int value, TQWidget* tqparent = 0L, const char* name = 0L );
/** Destroys the color slider */
~VColorSlider();
@@ -75,7 +76,7 @@ public slots:
*
* @param label the new label text
*/
- virtual void setLabel( const QString& label );
+ virtual void setLabel( const TQString& label );
/**
* Sets the colors for the slider.
@@ -83,7 +84,7 @@ public slots:
* @param color1 the new left color
* @param color2 the new right color
*/
- virtual void setColors( const QColor& color1, const QColor& color2 );
+ virtual void setColors( const TQColor& color1, const TQColor& color2 );
/**
* Sets the value of the spinbox (and the value of the vcolorslider).
@@ -115,8 +116,8 @@ public slots:
private:
void init();
- bool eventFilter( QObject *obj, QEvent *ev );
- QLabel* m_label;
+ bool eventFilter( TQObject *obj, TQEvent *ev );
+ TQLabel* m_label;
KIntSpinBox* m_spinBox;
KGradientSelector* m_gradientSelect;
bool m_isDragging;
diff --git a/karbon/widgets/vgradienttabwidget.cc b/karbon/widgets/vgradienttabwidget.cc
index 44bb53bc..b8f955d8 100644
--- a/karbon/widgets/vgradienttabwidget.cc
+++ b/karbon/widgets/vgradienttabwidget.cc
@@ -17,13 +17,13 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
-#include <qfileinfo.h>
-#include <qpixmap.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqfileinfo.h>
+#include <tqpixmap.h>
#include <knuminput.h>
#include <kcombobox.h>
@@ -37,14 +37,14 @@
#include "vkopainter.h"
#include "vfill.h"
-VGradientListItem::VGradientListItem( const VGradient& gradient, QString filename )
- : QListBoxItem( 0L ), m_filename( filename )
+VGradientListItem::VGradientListItem( const VGradient& gradient, TQString filename )
+ : TQListBoxItem( 0L ), m_filename( filename )
{
m_gradient = new VGradient( gradient );
m_pixmap.resize( 200, 16 );
- VKoPainter gp( &m_pixmap, m_pixmap.width(), m_pixmap.height() );
- gp.setRasterOp( Qt::XorROP );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&m_pixmap), m_pixmap.width(), m_pixmap.height() );
+ gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient grad( *m_gradient );
grad.setOrigin( KoPoint( 0, 0 ) );
@@ -62,11 +62,11 @@ VGradientListItem::VGradientListItem( const VGradient& gradient, QString filenam
gp.fillPath();
gp.end();
- m_delete = QFileInfo( filename ).isWritable();
+ m_delete = TQFileInfo( filename ).isWritable();
} // VGradientListItem::VGradientListItem
VGradientListItem::VGradientListItem( const VGradientListItem& gradient )
- : QListBoxItem( 0L )
+ : TQListBoxItem( 0L )
{
m_pixmap = gradient.m_pixmap;
m_delete = gradient.m_delete;
@@ -79,31 +79,31 @@ VGradientListItem::~VGradientListItem()
delete m_gradient;
} // VGradientListItem::~VGradientListItem
-int VGradientListItem::width( const QListBox* lb ) const
+int VGradientListItem::width( const TQListBox* lb ) const
{
return lb->width() - 25;
} // VGradientListItem::width
-void VGradientListItem::paint( QPainter* painter )
+void VGradientListItem::paint( TQPainter* painter )
{
painter->save();
- painter->setRasterOp( Qt::CopyROP );
- QRect r ( 0, 0, width( listBox() ), height( listBox() ) );
+ painter->setRasterOp( TQt::CopyROP );
+ TQRect r ( 0, 0, width( listBox() ), height( listBox() ) );
painter->scale( ( (float)( width( listBox() ) ) ) / 200., 1. );
painter->drawPixmap( 0, 0, m_pixmap );
painter->restore();
if ( isSelected() )
- painter->setPen( listBox()->colorGroup().highlightedText() );
+ painter->setPen( listBox()->tqcolorGroup().highlightedText() );
else
- painter->setPen( listBox()->colorGroup().base() );
+ painter->setPen( listBox()->tqcolorGroup().base() );
painter->drawRect( r );
painter->flush();
} // VGradientListItem::paint
-VGradientPreview::VGradientPreview( VGradient& gradient, double& opacity, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_gradient( &gradient ), m_opacity( &opacity )
+VGradientPreview::VGradientPreview( VGradient& gradient, double& opacity, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ), m_gradient( &gradient ), m_opacity( &opacity )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 70, 70 );
} // VGradientPreview::VGradientPreview
@@ -111,11 +111,11 @@ VGradientPreview::~VGradientPreview()
{
} // VGradientPreview::~VGradientPreview
-void VGradientPreview::paintEvent( QPaintEvent* )
+void VGradientPreview::paintEvent( TQPaintEvent* )
{
- QPixmap pixmap( width(), height() );
- VKoPainter gp( &pixmap, width(), height() );
- gp.setRasterOp( Qt::XorROP );
+ TQPixmap pixmap( width(), height() );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
+ gp.setRasterOp( TQt::XorROP );
gp.newPath();
VGradient gradient( *m_gradient );
if( gradient.type() == VGradient::radial || gradient.type() == VGradient::conic )
@@ -149,15 +149,15 @@ void VGradientPreview::paintEvent( QPaintEvent* )
gp.fillPath();
gp.end();
- QPainter p( &pixmap );
+ TQPainter p( &pixmap );
- p.setPen( colorGroup().light() );
+ p.setPen( tqcolorGroup().light() );
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
p.lineTo( width() - 1, 1 );
p.lineTo( width() - 1, height() - 1 );
p.lineTo( 1, height() - 1 );
- p.setPen( colorGroup().dark() );
+ p.setPen( tqcolorGroup().dark() );
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
p.lineTo( width() - 1, 0 );
@@ -167,8 +167,8 @@ void VGradientPreview::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VGradientPreview::paintEvent
-VGradientTabWidget::VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, QWidget* parent, const char* name )
- : QTabWidget( parent, name ), m_gradient( gradient ), m_resourceServer( server )
+VGradientTabWidget::VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, TQWidget* tqparent, const char* name )
+ : TQTabWidget( tqparent, name ), m_gradient( gradient ), m_resourceServer( server )
{
setupUI();
setupConnections();
@@ -181,15 +181,15 @@ VGradientTabWidget::~VGradientTabWidget()
void VGradientTabWidget::setupUI()
{
- m_editGroup = new QGroupBox( i18n( "Edit Gradient" ) );
- QGridLayout* editLayout = new QGridLayout( m_editGroup, 7, 3 );
+ m_editGroup = new TQGroupBox( i18n( "Edit Gradient" ) );
+ TQGridLayout* editLayout = new TQGridLayout( m_editGroup, 7, 3 );
editLayout->setSpacing( 3 );
editLayout->setMargin( 6 );
editLayout->addRowSpacing( 0, 12 );
editLayout->addMultiCellWidget( m_gradientPreview = new VGradientPreview( m_gradient, m_gradOpacity, m_editGroup ), 1, 3, 0, 0 );
- editLayout->addWidget( new QLabel( i18n( "Type:" ), m_editGroup ), 1, 1 );
- editLayout->addWidget( new QLabel( i18n( "Repeat:" ), m_editGroup ), 2, 1 );
- editLayout->addWidget( new QLabel( i18n( "Target:" ), m_editGroup ), 3, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Type:" ), m_editGroup ), 1, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Repeat:" ), m_editGroup ), 2, 1 );
+ editLayout->addWidget( new TQLabel( i18n( "Target:" ), m_editGroup ), 3, 1 );
editLayout->addWidget( m_gradientType = new KComboBox( false, m_editGroup ), 1, 2 );
m_gradientType->insertItem( i18n( "Linear" ), 0 );
m_gradientType->insertItem( i18n( "Radial" ), 1 );
@@ -201,36 +201,36 @@ void VGradientTabWidget::setupUI()
editLayout->addWidget( m_gradientTarget = new KComboBox( false, m_editGroup ), 3, 2 );
m_gradientTarget->insertItem( i18n( "Stroke" ), 0 );
m_gradientTarget->insertItem( i18n( "Fill" ), 1 );
- editLayout->addMultiCellWidget( m_addToPredefs = new QPushButton( i18n( "&Add to Predefined Gradients" ), m_editGroup ), 6, 6, 0, 2 );
+ editLayout->addMultiCellWidget( m_addToPredefs = new TQPushButton( i18n( "&Add to Predefined Gradients" ), m_editGroup ), 6, 6, 0, 2 );
editLayout->addMultiCellWidget( m_gradientWidget = new VGradientWidget( m_gradient, m_editGroup ), 4, 4, 0, 2 );
- editLayout->addWidget( new QLabel( i18n( "Overall opacity:" ), m_editGroup ), 5, 0 );
+ editLayout->addWidget( new TQLabel( i18n( "Overall opacity:" ), m_editGroup ), 5, 0 );
m_opacity = new KIntNumInput( 100, m_editGroup );
m_opacity->setRange( 0, 100, 1, true );
m_opacity->setValue( 100 );
editLayout->addMultiCellWidget( m_opacity, 5, 5, 1, 2 );
addTab( m_editGroup, i18n( "Edit" ) );
- QGroupBox* predefGroup = new QGroupBox( i18n( "Predefined Gradients" ) );
- QGridLayout* predefLayout = new QGridLayout( predefGroup, 3, 2 );
+ TQGroupBox* predefGroup = new TQGroupBox( i18n( "Predefined Gradients" ) );
+ TQGridLayout* predefLayout = new TQGridLayout( predefGroup, 3, 2 );
predefLayout->setSpacing( 3 );
predefLayout->setMargin( 6 );
predefLayout->addRowSpacing( 0, 12 );
predefLayout->addMultiCellWidget( m_predefGradientsView = new KListBox( predefGroup ), 1, 1, 0, 2 );
- predefLayout->addWidget( m_predefDelete = new QPushButton( i18n( "&Delete" ), predefGroup ), 2, 0 );
- predefLayout->addWidget( m_predefImport = new QPushButton( i18n( "&Import" ), predefGroup ), 2, 1 );
+ predefLayout->addWidget( m_predefDelete = new TQPushButton( i18n( "&Delete" ), predefGroup ), 2, 0 );
+ predefLayout->addWidget( m_predefImport = new TQPushButton( i18n( "&Import" ), predefGroup ), 2, 1 );
m_predefImport->setEnabled( false );
addTab( predefGroup, i18n( "Predefined" ) );
} // VGradientTabWidget::setupUI
void VGradientTabWidget::setupConnections()
{
- connect( m_gradientType, SIGNAL( activated( int ) ), this, SLOT( combosChange( int ) ) );
- connect( m_gradientRepeat, SIGNAL( activated( int ) ), this, SLOT( combosChange( int ) ) );
- connect( m_gradientWidget, SIGNAL( changed() ), m_gradientPreview, SLOT( update() ) );
- connect( m_addToPredefs, SIGNAL( clicked() ), this, SLOT( addGradientToPredefs() ) );
- connect( m_predefGradientsView, SIGNAL( doubleClicked( QListBoxItem *, const QPoint & ) ), this, SLOT( changeToPredef( QListBoxItem* ) ) );
- connect( m_predefDelete, SIGNAL( clicked() ), this, SLOT( deletePredef() ) );
- connect( m_opacity, SIGNAL( valueChanged( int ) ), this, SLOT( opacityChanged( int ) ) );
+ connect( m_gradientType, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( combosChange( int ) ) );
+ connect( m_gradientRepeat, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( combosChange( int ) ) );
+ connect( m_gradientWidget, TQT_SIGNAL( changed() ), m_gradientPreview, TQT_SLOT( update() ) );
+ connect( m_addToPredefs, TQT_SIGNAL( clicked() ), this, TQT_SLOT( addGradientToPredefs() ) );
+ connect( m_predefGradientsView, TQT_SIGNAL( doubleClicked( TQListBoxItem *, const TQPoint & ) ), this, TQT_SLOT( changeToPredef( TQListBoxItem* ) ) );
+ connect( m_predefDelete, TQT_SIGNAL( clicked() ), this, TQT_SLOT( deletePredef() ) );
+ connect( m_opacity, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( opacityChanged( int ) ) );
} // VGradientTabWidget::setupConnection
void VGradientTabWidget::initUI()
@@ -241,7 +241,7 @@ void VGradientTabWidget::initUI()
m_opacity->setValue( 100 );
m_predefGradientsView->clear();
- QPtrList<VGradientListItem>* gradientList = m_resourceServer->gradients();
+ TQPtrList<VGradientListItem>* gradientList = m_resourceServer->gradients();
if( gradientList->count() > 0 )
for( VGradientListItem* g = gradientList->first(); g != NULL; g = gradientList->next() )
m_predefGradientsView->insertItem( new VGradientListItem( *g ) );
@@ -306,7 +306,7 @@ void VGradientTabWidget::addGradientToPredefs()
m_predefGradientsView->insertItem( item );
} // VGradientTabWidget::addGradientToPredefs()
-void VGradientTabWidget::predefSelected( QListBoxItem* item )
+void VGradientTabWidget::predefSelected( TQListBoxItem* item )
{
if( item )
{
@@ -315,7 +315,7 @@ void VGradientTabWidget::predefSelected( QListBoxItem* item )
}
} // VGradientTabWidget::predefSelected
-void VGradientTabWidget::changeToPredef( QListBoxItem* item )
+void VGradientTabWidget::changeToPredef( TQListBoxItem* item )
{
if( item )
{
diff --git a/karbon/widgets/vgradienttabwidget.h b/karbon/widgets/vgradienttabwidget.h
index 2c60cee3..ba5f771f 100644
--- a/karbon/widgets/vgradienttabwidget.h
+++ b/karbon/widgets/vgradienttabwidget.h
@@ -21,9 +21,9 @@
#ifndef _VGRADIENTTABWIDGET_H_
#define _VGRADIENTTABWIDGET_H_
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqlistbox.h>
#include <koffice_export.h>
#include "vgradient.h"
@@ -31,52 +31,53 @@ class KComboBox;
class VGradientWidget;
class KListBox;
class KIntNumInput;
-class QPushButton;
-class QGroupBox;
+class TQPushButton;
+class TQGroupBox;
class KarbonResourceServer;
-class VGradientListItem : public QListBoxItem
+class VGradientListItem : public TQListBoxItem
{
public:
- VGradientListItem( const VGradient& gradient, QString filename );
+ VGradientListItem( const VGradient& gradient, TQString filename );
VGradientListItem( const VGradientListItem& );
~VGradientListItem();
- QPixmap& pixmap() { return m_pixmap; }
+ TQPixmap& pixmap() { return m_pixmap; }
const VGradient* gradient() const { return m_gradient; }
- QString filename() { return m_filename; }
+ TQString filename() { return m_filename; }
bool canDelete() { return m_delete; }
- virtual int height( const QListBox* ) const { return 16; }
- virtual int width( const QListBox* lb ) const;
+ virtual int height( const TQListBox* ) const { return 16; }
+ virtual int width( const TQListBox* lb ) const;
protected:
- virtual void paint( QPainter* p );
+ virtual void paint( TQPainter* p );
private:
VGradient *m_gradient;
- QPixmap m_pixmap;
- QString m_filename;
+ TQPixmap m_pixmap;
+ TQString m_filename;
bool m_delete;
}; // VGradientListItem
-class VGradientPreview : public QWidget
+class VGradientPreview : public TQWidget
{
public:
- VGradientPreview( VGradient& gradient, double& opacity, QWidget* parent = 0L, const char* name = 0L );
+ VGradientPreview( VGradient& gradient, double& opacity, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientPreview();
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
protected:
VGradient* m_gradient;
double* m_opacity;
}; // VGradientPreview
-class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
+class KARBONBASE_EXPORT VGradientTabWidget : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum VGradientTarget {
@@ -84,7 +85,7 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
FILL
};
- VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, QWidget* parent = 0L, const char* name = 0L );
+ VGradientTabWidget( VGradient& gradient, KarbonResourceServer* server, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientTabWidget();
const VGradient& gradient();
@@ -99,8 +100,8 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
public slots:
void combosChange( int );
void addGradientToPredefs();
- void changeToPredef( QListBoxItem* );
- void predefSelected( QListBoxItem* );
+ void changeToPredef( TQListBoxItem* );
+ void predefSelected( TQListBoxItem* );
void deletePredef();
void opacityChanged( int );
@@ -110,16 +111,16 @@ class KARBONBASE_EXPORT VGradientTabWidget : public QTabWidget
void setupConnections();
private:
- QGroupBox *m_editGroup;
+ TQGroupBox *m_editGroup;
VGradientWidget *m_gradientWidget;
KComboBox *m_gradientTarget;
KComboBox *m_gradientRepeat;
KComboBox *m_gradientType;
VGradientPreview *m_gradientPreview;
KListBox *m_predefGradientsView;
- QPushButton *m_predefDelete;
- QPushButton *m_predefImport;
- QPushButton *m_addToPredefs;
+ TQPushButton *m_predefDelete;
+ TQPushButton *m_predefImport;
+ TQPushButton *m_addToPredefs;
KIntNumInput *m_opacity;
VGradient m_gradient;
diff --git a/karbon/widgets/vgradientwidget.cc b/karbon/widgets/vgradientwidget.cc
index 25e29cd7..49410a35 100644
--- a/karbon/widgets/vgradientwidget.cc
+++ b/karbon/widgets/vgradientwidget.cc
@@ -18,14 +18,14 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qframe.h>
-#include <qbitmap.h>
+#include <tqlabel.h>
+#include <tqframe.h>
+#include <tqbitmap.h>
#include <kcolorbutton.h>
#include <kcombobox.h>
#include <klocale.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kiconloader.h>
#include "vgradientwidget.h"
@@ -54,10 +54,10 @@ static unsigned char colorStop_bits[] = {
0x7c, 0x00, 0xfe, 0x00, 0xfe, 0x00, 0xff, 0x01
};
-VGradientWidget::VGradientWidget( VGradient& gradient, QWidget* parent, const char* name )
- : QWidget( parent, name ), m_gradient( &gradient )
+VGradientWidget::VGradientWidget( VGradient& gradient, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name ), m_gradient( &gradient )
{
- setBackgroundMode( Qt::NoBackground );
+ setBackgroundMode( TQt::NoBackground );
setMinimumSize( 105, 35 );
} // VGradientWidget::VGradientWidget
@@ -65,39 +65,39 @@ VGradientWidget::~VGradientWidget()
{
} // VGradientWidget::~VGradientWidget
-void VGradientWidget::paintColorStop( QPainter& p, int x, VColor& color )
+void VGradientWidget::paintColorStop( TQPainter& p, int x, VColor& color )
{
- QBitmap bitmap;
+ TQBitmap bitmap;
- bitmap = QBitmap( colorStop_width, colorStop_height, colorStop_bits, true );
+ bitmap = TQBitmap( colorStop_width, colorStop_height, colorStop_bits, true );
bitmap.setMask( bitmap );
p.setPen( color );
p.drawPixmap( x - 4, 1, bitmap );
- bitmap = QBitmap( colorStopBorder_width, colorStopBorder_height, colorStopBorder_bits, true );
+ bitmap = TQBitmap( colorStopBorder_width, colorStopBorder_height, colorStopBorder_bits, true );
bitmap.setMask( bitmap );
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.drawPixmap( x - 5, 1, bitmap );
} // VGradientWidget::paintColorStop
-void VGradientWidget::paintMidPoint( QPainter& p, int x )
+void VGradientWidget::paintMidPoint( TQPainter& p, int x )
{
- QBitmap bitmap( midPoint_width, midPoint_height, midPoint_bits, true );
+ TQBitmap bitmap( midPoint_width, midPoint_height, midPoint_bits, true );
bitmap.setMask( bitmap );
- p.setPen( Qt::black );
+ p.setPen( TQt::black );
p.drawPixmap( x - 3, 1, bitmap );
} // VGradientWidget::paintMidPoint
-void VGradientWidget::paintEvent( QPaintEvent* )
+void VGradientWidget::paintEvent( TQPaintEvent* )
{
int w = width() - 4; // available width for gradient and points
int h = height() - 7; // available height for gradient and points
int ph = colorStopBorder_height + 2; // point marker height
int gh = h - ph; // gradient area height
- QPixmap pixmap( width(), height() );
- VKoPainter gp( &pixmap, width(), height() );
- gp.setRasterOp( Qt::XorROP );
+ TQPixmap pixmap( width(), height() );
+ VKoPainter gp( TQT_TQPAINTDEVICE(&pixmap), width(), height() );
+ gp.setRasterOp( TQt::XorROP );
VGradient gradient( *m_gradient );
gradient.setType( VGradient::linear );
gradient.setOrigin( KoPoint( 2, 2 ) );
@@ -115,9 +115,9 @@ void VGradientWidget::paintEvent( QPaintEvent* )
gp.drawRect( KoRect( 2, 2, w, gh ) );
gp.end();
- QPainter p( &pixmap );
+ TQPainter p( &pixmap );
- p.setPen( colorGroup().light() );
+ p.setPen( tqcolorGroup().light() );
// light frame around widget
p.moveTo( 1, height() - 1 );
p.lineTo( 1, 1 );
@@ -129,7 +129,7 @@ void VGradientWidget::paintEvent( QPaintEvent* )
p.moveTo( 1, 3 + gh );
p.lineTo( width() - 1, 3 + gh );
- p.setPen( colorGroup().dark() );
+ p.setPen( tqcolorGroup().dark() );
// left-top frame around widget
p.moveTo( 0, height() - 1 );
p.lineTo( 0, 0 );
@@ -151,12 +151,12 @@ void VGradientWidget::paintEvent( QPaintEvent* )
m_pntArea.setRect( 2, height() - ph - 2, w, ph );
// clear point area
- p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), colorGroup().background() );
+ p.fillRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height(), tqcolorGroup().background() );
p.setClipRect( m_pntArea.x(), m_pntArea.y(), m_pntArea.width(), m_pntArea.height() );
p.translate( m_pntArea.x(), m_pntArea.y() );
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
if( colorStops.count() > 1 )
{
VColorStop* stop, *nextstop;
@@ -172,12 +172,12 @@ void VGradientWidget::paintEvent( QPaintEvent* )
bitBlt( this, 0, 0, &pixmap, 0, 0, width(), height() );
} // VGradientWidget::paintEvent
-void VGradientWidget::mousePressEvent( QMouseEvent* e )
+void VGradientWidget::mousePressEvent( TQMouseEvent* e )
{
- if( ! m_pntArea.contains( e->x(), e->y() ) )
+ if( ! m_pntArea.tqcontains( e->x(), e->y() ) )
return;
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
currentPoint = 0;
@@ -213,11 +213,11 @@ void VGradientWidget::mousePressEvent( QMouseEvent* e )
}
} // VGradientWidget::mousePressEvent
-void VGradientWidget::mouseReleaseEvent( QMouseEvent* e )
+void VGradientWidget::mouseReleaseEvent( TQMouseEvent* e )
{
if( e->button() == Qt::RightButton && currentPoint )
{
- if( m_pntArea.contains( e->x(), e->y() ) && ( currentPoint % 2 == 1 ) )
+ if( m_pntArea.tqcontains( e->x(), e->y() ) && ( currentPoint % 2 == 1 ) )
{
int x = e->x() - m_pntArea.left();
// check if we are still above the actual ramp point
@@ -230,12 +230,12 @@ void VGradientWidget::mouseReleaseEvent( QMouseEvent* e )
}
}
}
- setCursor( QCursor( Qt::ArrowCursor ) );
+ setCursor( TQCursor( TQt::ArrowCursor ) );
} // VGradientWidget::mouseReleaseEvent
-void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
+void VGradientWidget::mouseDoubleClickEvent( TQMouseEvent* e )
{
- if( ! m_pntArea.contains( e->x(), e->y() ) )
+ if( ! m_pntArea.tqcontains( e->x(), e->y() ) )
return;
if( e->button() != Qt::LeftButton )
@@ -244,8 +244,8 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
if( currentPoint % 2 == 1 )
{
// ramp point hit -> change color
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->topLevelWidget() );
- if( d->exec() == QDialog::Accepted )
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( currentPoint / 2 )->color, this->tqtopLevelWidget() );
+ if( d->exec() == TQDialog::Accepted )
{
m_gradient->m_colorStops.at( currentPoint / 2 )->color = d->Color();
update();
@@ -256,8 +256,8 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
else if( currentPoint == 0 )
{
// now point hit -> create new color stop
- VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->topLevelWidget() );
- if( d->exec() == QDialog::Accepted )
+ VColorDlg* d = new VColorDlg( m_gradient->m_colorStops.at( 0 )->color, this->tqtopLevelWidget() );
+ if( d->exec() == TQDialog::Accepted )
{
m_gradient->addStop( d->Color(), (float)( e->x() - 2 ) / ( m_pntArea.width() ), 0.5 );
update();
@@ -267,12 +267,12 @@ void VGradientWidget::mouseDoubleClickEvent( QMouseEvent* e )
}
} // VGradientWidget::mouseDoubleClickEvent
-void VGradientWidget::mouseMoveEvent( QMouseEvent* e )
+void VGradientWidget::mouseMoveEvent( TQMouseEvent* e )
{
if( e->state() & Qt::RightButton )
return;
- QPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
+ TQPtrList<VColorStop>& colorStops = m_gradient->m_colorStops;
if( currentPoint >= colorStops.count() * 2 )
return;
diff --git a/karbon/widgets/vgradientwidget.h b/karbon/widgets/vgradientwidget.h
index 76f7472d..236e98f9 100644
--- a/karbon/widgets/vgradientwidget.h
+++ b/karbon/widgets/vgradientwidget.h
@@ -20,41 +20,42 @@
#ifndef _VGRADIENTWIDGET_H_
#define _VGRADIENTWIDGET_H_
-#include <qwidget.h>
+#include <tqwidget.h>
#include <koffice_export.h>
class VGradient;
-class QPainter;
+class TQPainter;
class VColor;
-class KARBONBASE_EXPORT VGradientWidget : public QWidget
+class KARBONBASE_EXPORT VGradientWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VGradientWidget( VGradient& gradient, QWidget* parent = 0L, const char* name = 0L );
+ VGradientWidget( VGradient& gradient, TQWidget* tqparent = 0L, const char* name = 0L );
~VGradientWidget();
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
signals:
void changed();
protected:
/** mouse events... For color stops manipulation */
- void mousePressEvent( QMouseEvent* );
- void mouseReleaseEvent( QMouseEvent* );
- void mouseDoubleClickEvent( QMouseEvent* );
- void mouseMoveEvent( QMouseEvent* );
+ void mousePressEvent( TQMouseEvent* );
+ void mouseReleaseEvent( TQMouseEvent* );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void mouseMoveEvent( TQMouseEvent* );
- void paintColorStop( QPainter& p, int x, VColor& color );
- void paintMidPoint( QPainter& p, int x );
+ void paintColorStop( TQPainter& p, int x, VColor& color );
+ void paintMidPoint( TQPainter& p, int x );
/** The gradient to modify. */
VGradient* m_gradient;
/** The point to modify. */
unsigned int currentPoint;
- QRect m_pntArea;
+ TQRect m_pntArea;
}; // VGradientWidget
#endif /* _VGRADIENTWIDGET_H_ */
diff --git a/karbon/widgets/vreference.cc b/karbon/widgets/vreference.cc
index 43b0e8b2..c7553fe8 100644
--- a/karbon/widgets/vreference.cc
+++ b/karbon/widgets/vreference.cc
@@ -20,42 +20,42 @@
/* vreference.cc */
-#include <qbuttongroup.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
#include "vreference.h"
-VReference::VReference( QWidget *parent, const char *name ) : QFrame ( parent, name )
+VReference::VReference( TQWidget *tqparent, const char *name ) : TQFrame ( tqparent, name )
{
- QVBoxLayout* layout = new QVBoxLayout( this );
- mButtonGroup = new QButtonGroup (3, Vertical, this );
- QRadioButton* radio = new QRadioButton ( mButtonGroup );
+ TQVBoxLayout* tqlayout = new TQVBoxLayout( this );
+ mButtonGroup = new TQButtonGroup (3,Qt::Vertical, this );
+ TQRadioButton* radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, TopLeft );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Left );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, BottomLeft );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Top );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Center );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Bottom );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, TopRight );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, Right );
- radio = new QRadioButton ( mButtonGroup );
+ radio = new TQRadioButton ( mButtonGroup );
mButtonGroup->insert( radio, BottomRight );
connect(
- mButtonGroup, SIGNAL( clicked( int ) ),
- this, SLOT( setReferencePoint( int ) ) );
+ mButtonGroup, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( setReferencePoint( int ) ) );
mButtonGroup->setButton( Center );
- layout->addWidget( mButtonGroup );
- layout->activate();
+ tqlayout->addWidget( mButtonGroup );
+ tqlayout->activate();
setReferencePoint( Center );
}
diff --git a/karbon/widgets/vreference.h b/karbon/widgets/vreference.h
index 3c6c1a9f..261b6150 100644
--- a/karbon/widgets/vreference.h
+++ b/karbon/widgets/vreference.h
@@ -24,9 +24,9 @@
#ifndef VREFERENCE_H
#define VREFERENCE_H
-#include <qframe.h>
+#include <tqframe.h>
-class QButtonGroup;
+class TQButtonGroup;
enum Choice
{
@@ -41,18 +41,19 @@ enum Choice
BottomRight
};
-class VReference : public QFrame
+class VReference : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VReference( QWidget *parent = 0L, const char *name = 0L );
+ VReference( TQWidget *tqparent = 0L, const char *name = 0L );
int referencePoint();
public slots:
virtual void setReferencePoint ( int );
private:
int m_referencePoint;
- QButtonGroup* mButtonGroup;
+ TQButtonGroup* mButtonGroup;
signals:
void referencePointChanged( int referencePoint );
};
diff --git a/karbon/widgets/vruler.cc b/karbon/widgets/vruler.cc
index 0f7c2f62..28ed8939 100644
--- a/karbon/widgets/vruler.cc
+++ b/karbon/widgets/vruler.cc
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "kdebug.h"
@@ -40,7 +40,7 @@ const char *VRuler::m_nums[] = {
"XX XXXXXX XXX XXX XXXXXX XXX XXXX XXXXX XXXXX XXXX XXX"
};
-VRuler::VRuler(Qt::Orientation o, QWidget *parent, const char *name) : super(parent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums)
+VRuler::VRuler(Qt::Orientation o, TQWidget *tqparent, const char *name) : super(tqparent, name, WRepaintNoErase | WResizeNoErase), m_pixmapNums(m_nums)
{
setBackgroundMode(NoBackground);
setFrameStyle(Box | Sunken);
@@ -67,9 +67,9 @@ VRuler::~VRuler()
delete m_pixmapBuffer;
}
-void VRuler::initMarker(Q_INT32 w, Q_INT32 h)
+void VRuler::initMarker(TQ_INT32 w, TQ_INT32 h)
{
- QPainter p;
+ TQPainter p;
m_pixmapMarker.resize(w, h);
p.begin(&m_pixmapMarker);
@@ -81,8 +81,8 @@ void VRuler::initMarker(Q_INT32 w, Q_INT32 h)
void VRuler::recalculateSize()
{
- Q_INT32 w;
- Q_INT32 h;
+ TQ_INT32 w;
+ TQ_INT32 h;
if (m_pixmapBuffer) {
delete m_pixmapBuffer;
@@ -97,7 +97,7 @@ void VRuler::recalculateSize()
h = height();
}
- m_pixmapBuffer = new QPixmap(w, h);
+ m_pixmapBuffer = new TQPixmap(w, h);
Q_CHECK_PTR(m_pixmapBuffer);
drawRuler();
@@ -114,7 +114,7 @@ void VRuler::setUnit(KoUnit::Unit u)
m_unit = u;
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- repaint();
+ tqrepaint();
}
void VRuler::setZoom(double zoom)
@@ -123,15 +123,15 @@ void VRuler::setZoom(double zoom)
recalculateSize();
drawRuler();
updatePointer(m_currentPosition, m_currentPosition);
- repaint();
+ tqrepaint();
}
-void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
+void VRuler::updatePointer(TQ_INT32 x, TQ_INT32 y)
{
if (m_pixmapBuffer) {
if (m_orientation == Qt::Horizontal) {
if (m_currentPosition != -1)
- repaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
+ tqrepaint(m_currentPosition, 1, MARKER_WIDTH, MARKER_HEIGHT);
if (x != -1) {
bitBlt(this, x, 1, &m_pixmapMarker, 0, 0, MARKER_WIDTH, MARKER_HEIGHT);
@@ -139,7 +139,7 @@ void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
}
} else {
if (m_currentPosition != -1)
- repaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
+ tqrepaint(1, m_currentPosition, MARKER_HEIGHT, MARKER_WIDTH);
if (y != -1) {
bitBlt(this, 1, y, &m_pixmapMarker, 0, 0, MARKER_HEIGHT, MARKER_WIDTH);
@@ -149,7 +149,7 @@ void VRuler::updatePointer(Q_INT32 x, Q_INT32 y)
}
}
-void VRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos)
+void VRuler::updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos)
{
if (m_orientation == Qt::Horizontal)
m_firstVisible = xpos;
@@ -158,15 +158,15 @@ void VRuler::updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos)
//kdDebug() << "--###-- VRuler::updateVisibleArea(" << xpos << ", " << ypos << ")" << endl;
drawRuler();
- repaint();
+ tqrepaint();
updatePointer(m_currentPosition, m_currentPosition);
//kdDebug() << "--###-- VRuler::updatePointer(" << m_currentPosition << ", " << m_currentPosition << ")" << endl;
}
-void VRuler::paintEvent(QPaintEvent *e)
+void VRuler::paintEvent(TQPaintEvent *e)
{
if (m_pixmapBuffer) {
- const QRect& rect = e -> rect();
+ const TQRect& rect = e -> rect();
bitBlt(this, rect.topLeft(), m_pixmapBuffer, rect);
super::paintEvent(e);
@@ -175,20 +175,20 @@ void VRuler::paintEvent(QPaintEvent *e)
void VRuler::drawRuler()
{
- QPainter p;
- QString buf;
- Q_INT32 st1 = 0;
- Q_INT32 st2 = 0;
- Q_INT32 st3 = 0;
- Q_INT32 st4 = 0;
- Q_INT32 stt = 0;
+ TQPainter p;
+ TQString buf;
+ TQ_INT32 st1 = 0;
+ TQ_INT32 st2 = 0;
+ TQ_INT32 st3 = 0;
+ TQ_INT32 st4 = 0;
+ TQ_INT32 stt = 0;
if (!m_pixmapBuffer)
return;
p.begin(m_pixmapBuffer);
- p.setPen(QColor(0x70, 0x70, 0x70));
- p.setBackgroundColor(colorGroup().background());
+ p.setPen(TQColor(0x70, 0x70, 0x70));
+ p.setBackgroundColor(tqcolorGroup().background());
p.eraseRect(0, 0, m_pixmapBuffer -> width(), m_pixmapBuffer -> height());
switch (m_unit) {
@@ -215,7 +215,7 @@ void VRuler::drawRuler()
break;
}
- Q_INT32 pos = 0;
+ TQ_INT32 pos = 0;
bool s1 = KoUnit::fromUserValue(st1, m_unit) * m_zoom > 3.0;
bool s2 = KoUnit::fromUserValue(st2, m_unit) * m_zoom > 3.0;
bool s3 = KoUnit::fromUserValue(st3, m_unit) * m_zoom > 3.0;
@@ -224,11 +224,11 @@ void VRuler::drawRuler()
if (m_orientation == Qt::Horizontal) {
// XXX: This was 7 * 4 -- why? what was the idea about having 30 point intervals?
float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom;
- Q_INT32 step = qRound(cx);//((Q_INT32)(cx / (float)stt) + 1) * stt;
- Q_INT32 start = (Q_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
+ TQ_INT32 step = tqRound(cx);//((TQ_INT32)(cx / (float)stt) + 1) * stt;
+ TQ_INT32 start = (TQ_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
do {
- pos = (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
+ pos = (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
if (!s3 && s4 && start % st4 == 0)
p.drawLine(pos, RULER_SIZE - 9, pos, RULER_SIZE);
@@ -243,7 +243,7 @@ void VRuler::drawRuler()
p.drawLine(pos, RULER_SIZE - 5, pos, RULER_SIZE);
if (step && start % step == 0) {
- buf.setNum(QABS(start));
+ buf.setNum(TQABS(start));
drawNums(&p, pos, 4, buf, true);
}
@@ -252,12 +252,12 @@ void VRuler::drawRuler()
} else {
m_firstVisible = 0;
float cx = KoUnit::fromUserValue(100, m_unit) / m_zoom;
- Q_INT32 height = m_pixmapBuffer -> height() - 1;
- Q_INT32 step = qRound(cx);
- Q_INT32 start = (Q_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
+ TQ_INT32 height = m_pixmapBuffer -> height() - 1;
+ TQ_INT32 step = tqRound(cx);
+ TQ_INT32 start = (TQ_INT32)(KoUnit::toUserValue(m_firstVisible, m_unit) / m_zoom);
do {
- pos = height - (Q_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
+ pos = height - (TQ_INT32)(KoUnit::fromUserValue(start, m_unit) * m_zoom - m_firstVisible);
if (!s3 && s4 && start % st4 == 0)
p.drawLine(RULER_SIZE - 9, pos, RULER_SIZE, pos);
@@ -272,7 +272,7 @@ void VRuler::drawRuler()
p.drawLine(RULER_SIZE - 5, pos, RULER_SIZE, pos);
if (step && start % step == 0) {
- buf.setNum(QABS(start));
+ buf.setNum(TQABS(start));
drawNums(&p, 4, pos, buf, false);
}
@@ -283,7 +283,7 @@ void VRuler::drawRuler()
p.end();
}
-void VRuler::resizeEvent(QResizeEvent *)
+void VRuler::resizeEvent(TQResizeEvent *)
{
recalculateSize();
}
@@ -309,15 +309,15 @@ void VRuler::hide()
setFixedWidth(1);
}
-void VRuler::drawNums(QPainter *p, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz)
+void VRuler::drawNums(TQPainter *p, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz)
{
if (orientationHoriz)
x -= 7;
else
y -= 8;
- for (Q_UINT32 k = 0; k < num.length(); k++) {
- Q_INT32 st = num.at(k).digitValue() * 7;
+ for (TQ_UINT32 k = 0; k < num.length(); k++) {
+ TQ_INT32 st = num.at(k).digitValue() * 7;
p -> drawPixmap(x, y, m_pixmapNums, st, 0, 7, 7);
diff --git a/karbon/widgets/vruler.h b/karbon/widgets/vruler.h
index c03de9a2..a97b4cf0 100644
--- a/karbon/widgets/vruler.h
+++ b/karbon/widgets/vruler.h
@@ -20,22 +20,23 @@
#ifndef VRULER_H_
#define VRULER_H_
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <KoUnit.h>
// XXX: Make this look more like the KOffice ruler -- the KOffice
// ruler is not quite suited to Krita. Also: start units with 0,
// print every 100 units.
-class QPainter;
+class TQPainter;
-class VRuler : public QFrame {
+class VRuler : public TQFrame {
Q_OBJECT
- typedef QFrame super;
+ TQ_OBJECT
+ typedef TQFrame super;
public:
- VRuler(Qt::Orientation, QWidget *parent = 0, const char *name = 0);
+ VRuler(Qt::Orientation, TQWidget *tqparent = 0, const char *name = 0);
virtual ~VRuler();
public:
@@ -43,30 +44,30 @@ public:
public slots:
void setZoom(double zoom);
- void updatePointer(Q_INT32 x, Q_INT32 y);
- void updateVisibleArea(Q_INT32 xpos, Q_INT32 ypos);
+ void updatePointer(TQ_INT32 x, TQ_INT32 y);
+ void updateVisibleArea(TQ_INT32 xpos, TQ_INT32 ypos);
void setUnit(KoUnit::Unit u);
void hide();
void show();
public:
- virtual void paintEvent(QPaintEvent *e);
- virtual void resizeEvent(QResizeEvent *e);
+ virtual void paintEvent(TQPaintEvent *e);
+ virtual void resizeEvent(TQResizeEvent *e);
protected:
void recalculateSize();
void drawRuler();
- void initMarker(Q_INT32 w, Q_INT32 h);
- void drawNums(QPainter *gc, Q_INT32 x, Q_INT32 y, QString& num, bool orientationHoriz);
+ void initMarker(TQ_INT32 w, TQ_INT32 h);
+ void drawNums(TQPainter *gc, TQ_INT32 x, TQ_INT32 y, TQString& num, bool orientationHoriz);
private:
KoUnit::Unit m_unit;
Qt::Orientation m_orientation;
- Q_INT32 m_firstVisible;
- Q_INT32 m_currentPosition;
- QPixmap *m_pixmapBuffer;
- QPixmap m_pixmapMarker;
- QPixmap m_pixmapNums;
+ TQ_INT32 m_firstVisible;
+ TQ_INT32 m_currentPosition;
+ TQPixmap *m_pixmapBuffer;
+ TQPixmap m_pixmapMarker;
+ TQPixmap m_pixmapNums;
double m_zoom;
private:
diff --git a/karbon/widgets/vselecttoolbar.cc b/karbon/widgets/vselecttoolbar.cc
index a39650d8..fa01ba46 100644
--- a/karbon/widgets/vselecttoolbar.cc
+++ b/karbon/widgets/vselecttoolbar.cc
@@ -20,7 +20,7 @@
/* vselecttoolbar.cc */
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kdebug.h>
@@ -36,30 +36,30 @@
VSelectToolBar::VSelectToolBar( KarbonView *view, const char* name ) : KToolBar( view, name ), m_view( view )
{
setCaption( i18n( "Object Properties" ) );
- QLabel *x_label = new QLabel( i18n( "X:" ), this, "kde toolbar widget" );
+ TQLabel *x_label = new TQLabel( i18n( "X:" ), this, "kde toolbar widget" );
insertWidget( 0, x_label->width(), x_label );
m_x = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_x, SIGNAL( valueChanged( double ) ), this, SLOT( slotXChanged( double ) ) );
+ connect( m_x, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotXChanged( double ) ) );
insertWidget( 1, m_x->width(), m_x );
- QLabel *y_label = new QLabel( i18n( "Y:" ), this, "kde toolbar widget" );
+ TQLabel *y_label = new TQLabel( i18n( "Y:" ), this, "kde toolbar widget" );
insertWidget( 2, y_label->width(), y_label );
m_y = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_y, SIGNAL( valueChanged( double ) ), this, SLOT( slotYChanged( double ) ) );
+ connect( m_y, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotYChanged( double ) ) );
insertWidget( 3, m_y->width(), m_y );
insertSeparator( 4 );
- QLabel *w_label = new QLabel( i18n( "selection width", "Width:" ), this, "kde toolbar widget" );
+ TQLabel *w_label = new TQLabel( i18n( "selection width", "Width:" ), this, "kde toolbar widget" );
insertWidget( 5, w_label->width(), w_label );
m_width = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_width, SIGNAL( valueChanged( double ) ), this, SLOT( slotWidthChanged( double ) ) );
+ connect( m_width, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotWidthChanged( double ) ) );
insertWidget( 6, m_width->width(), m_width );
- QLabel *h_label = new QLabel( i18n( "Height:" ), this, "kde toolbar widget" );
+ TQLabel *h_label = new TQLabel( i18n( "Height:" ), this, "kde toolbar widget" );
insertWidget( 7, h_label->width(), h_label );
m_height = new KoUnitDoubleSpinBox( this, 0.0, 1000.0, 0.5 );
- connect( m_height, SIGNAL( valueChanged( double ) ), this, SLOT( slotHeightChanged( double ) ) );
+ connect( m_height, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SLOT( slotHeightChanged( double ) ) );
insertWidget( 8, m_height->width(), m_height );
- connect( m_view, SIGNAL( selectionChange() ), this, SLOT( slotSelectionChanged() ) );
+ connect( m_view, TQT_SIGNAL( selectionChange() ), this, TQT_SLOT( slotSelectionChanged() ) );
}
VSelectToolBar::~VSelectToolBar()
diff --git a/karbon/widgets/vselecttoolbar.h b/karbon/widgets/vselecttoolbar.h
index 376ca134..ef6a9b32 100644
--- a/karbon/widgets/vselecttoolbar.h
+++ b/karbon/widgets/vselecttoolbar.h
@@ -30,6 +30,7 @@ class KarbonView;
class VSelectToolBar : public KToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
VSelectToolBar( KarbonView *view, const char* name = 0L );
~VSelectToolBar();
diff --git a/karbon/widgets/vsmallpreview.cc b/karbon/widgets/vsmallpreview.cc
index 7766f6e9..ab1b9261 100644
--- a/karbon/widgets/vsmallpreview.cc
+++ b/karbon/widgets/vsmallpreview.cc
@@ -19,11 +19,11 @@
*/
/* vsmallpreview.cc */
-#include <qcolor.h>
-#include <qframe.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
+#include <tqcolor.h>
+#include <tqframe.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <KoPoint.h>
@@ -39,24 +39,24 @@
#define FRAMEWIDTH 40
-VSmallPreview::VSmallPreview( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VSmallPreview::VSmallPreview( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
- /* Create widget layout */
- QHBoxLayout *layout = new QHBoxLayout( this, 4 );
- m_strokeLabel = new QLabel( i18n( "Stroke: None" ), this );
- layout->addWidget( m_strokeLabel );
- m_strokeFrame = new QFrame( this );
+ /* Create widget tqlayout */
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this, 4 );
+ m_strokeLabel = new TQLabel( i18n( "Stroke: None" ), this );
+ tqlayout->addWidget( m_strokeLabel );
+ m_strokeFrame = new TQFrame( this );
m_strokeFrame->setFixedWidth ( FRAMEWIDTH );
- m_strokeFrame->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
- layout->addWidget( m_strokeFrame );
- m_fillLabel = new QLabel( i18n( "Fill: None" ), this );
- layout->addWidget( m_fillLabel );
- m_fillFrame = new QFrame( this );
+ m_strokeFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
+ tqlayout->addWidget( m_strokeFrame );
+ m_fillLabel = new TQLabel( i18n( "Fill: None" ), this );
+ tqlayout->addWidget( m_fillLabel );
+ m_fillFrame = new TQFrame( this );
m_fillFrame->setFixedWidth ( FRAMEWIDTH );
- m_fillFrame->setFrameStyle( QFrame::GroupBoxPanel | QFrame::Plain );
- layout->addWidget( m_fillFrame );
- layout->activate();
+ m_fillFrame->setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Plain );
+ tqlayout->addWidget( m_fillFrame );
+ tqlayout->activate();
m_fill = VFill();
m_stroke = VStroke();
@@ -83,7 +83,7 @@ VSmallPreview::update( const VStroke &s, const VFill &f )
}
void
-VSmallPreview::paintEvent( QPaintEvent* /*event*/ )
+VSmallPreview::paintEvent( TQPaintEvent* /*event*/ )
{
drawStroke( m_stroke );
drawFill( m_fill );
@@ -95,13 +95,13 @@ VSmallPreview::drawFill( const VFill &f )
VFill fill;
VStroke stroke;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
- VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
+ VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
- m_painter->setPen( Qt::NoPen );
- fill.setColor( Qt::white );
+ m_painter->setPen( TQt::NoPen );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_fillFrame->width(), m_fillFrame->height() ) );
@@ -157,10 +157,10 @@ VSmallPreview::drawFill( const VFill &f )
default: //None or unknown
{
m_fillLabel->setText( i18n( "Fill: None") );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_fillFrame->width(), m_fillFrame->height() ) );
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
stroke.setLineWidth( 2.0 );
m_painter->setPen( stroke );
m_painter->newPath();
@@ -190,13 +190,13 @@ VSmallPreview::drawStroke( const VStroke &s )
VFill fill;
VStroke stroke;
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
m_pixmap.resize( m_fillFrame->width(), m_fillFrame->height() );
- VKoPainter* m_painter = new VKoPainter( &m_pixmap, m_fillFrame->width(), m_fillFrame->height() );
+ VKoPainter* m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), m_fillFrame->width(), m_fillFrame->height() );
m_painter->begin();
- m_painter->setPen( Qt::NoPen );
- fill.setColor( Qt::white );
+ m_painter->setPen( TQt::NoPen );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_strokeFrame->width(), m_strokeFrame->height() ) );
@@ -251,10 +251,10 @@ VSmallPreview::drawStroke( const VStroke &s )
default: //None or unknown
{
m_strokeLabel->setText( i18n( "Stroke: None") );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
m_painter->drawRect( KoRect( 0, 0, m_strokeFrame->width(), m_strokeFrame->height() ) );
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
stroke.setLineWidth( 2.0 );
m_painter->setPen( stroke );
m_painter->newPath();
diff --git a/karbon/widgets/vsmallpreview.h b/karbon/widgets/vsmallpreview.h
index 7b1abb15..f264553d 100644
--- a/karbon/widgets/vsmallpreview.h
+++ b/karbon/widgets/vsmallpreview.h
@@ -24,32 +24,33 @@
#ifndef VSMALLPREVIEW_H
#define VSMALLPREVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
-class QFrame;
-class QLabel;
+class TQFrame;
+class TQLabel;
class VFill;
class VStroke;
-class VSmallPreview : public QWidget
+class VSmallPreview : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VSmallPreview( QWidget* parent = 0L, const char* name = 0L );
+ VSmallPreview( TQWidget* tqparent = 0L, const char* name = 0L );
~VSmallPreview();
void update( const VStroke &, const VFill & );
protected:
- virtual void paintEvent( QPaintEvent* event );
+ virtual void paintEvent( TQPaintEvent* event );
private:
void drawFill( const VFill & );
void drawStroke( const VStroke & );
- QFrame *m_fillFrame;
- QFrame *m_strokeFrame;
- QLabel *m_fillLabel;
- QLabel *m_strokeLabel;
+ TQFrame *m_fillFrame;
+ TQFrame *m_strokeFrame;
+ TQLabel *m_fillLabel;
+ TQLabel *m_strokeLabel;
VFill m_fill;
VStroke m_stroke;
};
diff --git a/karbon/widgets/vstatebutton.cc b/karbon/widgets/vstatebutton.cc
index 635d3de7..197cf0ee 100644
--- a/karbon/widgets/vstatebutton.cc
+++ b/karbon/widgets/vstatebutton.cc
@@ -19,8 +19,8 @@
#include "vstatebutton.h"
-VStateButton::VStateButton( QWidget* parent, const char* name )
- : QPushButton( parent, name )
+VStateButton::VStateButton( TQWidget* tqparent, const char* name )
+ : TQPushButton( tqparent, name )
{
m_index = 0;
m_pixmaps.setAutoDelete( true );
@@ -31,9 +31,9 @@ VStateButton::~VStateButton()
}
void
-VStateButton::mouseReleaseEvent( QMouseEvent *e )
+VStateButton::mouseReleaseEvent( TQMouseEvent *e )
{
- QPushButton::mouseReleaseEvent( e );
+ TQPushButton::mouseReleaseEvent( e );
if( m_pixmaps.count() > 0 )
{
m_index = ++m_index % m_pixmaps.count();
diff --git a/karbon/widgets/vstatebutton.h b/karbon/widgets/vstatebutton.h
index 6273adcc..08e4a1a2 100644
--- a/karbon/widgets/vstatebutton.h
+++ b/karbon/widgets/vstatebutton.h
@@ -20,24 +20,24 @@
#ifndef __VSTATEBUTTON_H__
#define __VSTATEBUTTON_H__
-#include <qpushbutton.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
-class VStateButton : public QPushButton
+class VStateButton : public TQPushButton
{
public:
- VStateButton( QWidget* parent = 0L, const char* name = 0L );
+ VStateButton( TQWidget* tqparent = 0L, const char* name = 0L );
~VStateButton();
- void addState( QPixmap *state ) { m_pixmaps.append( state ); }
+ void addState( TQPixmap *state ) { m_pixmaps.append( state ); }
void setState( unsigned int index );
unsigned int getState() const { return m_index; }
private:
- void mouseReleaseEvent( QMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
- QPtrList<QPixmap> m_pixmaps;
+ TQPtrList<TQPixmap> m_pixmaps;
unsigned int m_index;
};
diff --git a/karbon/widgets/vstrokefillpreview.cc b/karbon/widgets/vstrokefillpreview.cc
index 40dbe4d6..93392d9b 100644
--- a/karbon/widgets/vstrokefillpreview.cc
+++ b/karbon/widgets/vstrokefillpreview.cc
@@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcolor.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <KoPoint.h>
@@ -52,21 +52,17 @@
VStrokeFillPreview::VStrokeFillPreview(
- KarbonPart *part, QWidget* parent, const char* name )
- : QFrame( parent, name ), m_part( part )
+ KarbonPart *part, TQWidget* tqparent, const char* name )
+ : TQFrame( tqparent, name ), m_part( part )
{
m_strokeWidget = false;
- setFocusPolicy( QWidget::NoFocus );
+ setFocusPolicy( TQ_NoFocus );
-#if QT_VERSION < 0x030100
- setFrameStyle( QFrame::Panel | QFrame::Sunken );
-#else
- setFrameStyle( QFrame::GroupBoxPanel | QFrame::Sunken );
-#endif
+ setFrameStyle( TQFrame::GroupBoxPanel | TQFrame::Sunken );
installEventFilter( this );
m_pixmap.resize( int( PANEL_SIZEX ), int( PANEL_SIZEY ) );
- m_painter = new VKoPainter( &m_pixmap, uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
+ m_painter = new VKoPainter( TQT_TQPAINTDEVICE(&m_pixmap), uint( PANEL_SIZEX ), uint( PANEL_SIZEY ) );
}
VStrokeFillPreview::~VStrokeFillPreview()
@@ -75,25 +71,25 @@ VStrokeFillPreview::~VStrokeFillPreview()
}
void
-VStrokeFillPreview::paintEvent( QPaintEvent* event )
+VStrokeFillPreview::paintEvent( TQPaintEvent* event )
{
bitBlt( this,
(int)( width() - PANEL_SIZEX ) / 2, (int)( height() - PANEL_SIZEY ) / 2,
&m_pixmap,
0, 0, (int)PANEL_SIZEX, (int)PANEL_SIZEY );
- QFrame::paintEvent( event );
+ TQFrame::paintEvent( event );
}
bool
-VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
+VStrokeFillPreview::eventFilter( TQObject *, TQEvent *event )
{
- QMouseEvent* e = static_cast<QMouseEvent *>( event );
+ TQMouseEvent* e = TQT_TQMOUSEEVENT( event );
int ex = e->x() - int( ( width() - PANEL_SIZEX ) / 2 );
int ey = e->y() - int( ( height() - PANEL_SIZEY ) / 2 );
- if( event && event->type() == QEvent::MouseButtonPress )
+ if( event && event->type() == TQEvent::MouseButtonPress )
{
if ( m_strokeWidget )
{
@@ -132,14 +128,14 @@ VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
update( m_stroke, m_fill );
}
- if( event && event->type() == QEvent::MouseButtonDblClick )
+ if( event && event->type() == TQEvent::MouseButtonDblClick )
{
if(
ex >= FILL_TOPX && ex <= FILL_BOTTOMX &&
ey >= FILL_TOPY && ey <= FILL_BOTTOMY )
{
VColorDlg* dialog = new VColorDlg( m_fill.color(), this );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
if( m_part && m_part->document().selection() ) m_part->addCommand( new VFillCmd( &m_part->document(), VFill( dialog->Color() ) ), true );
}
@@ -150,7 +146,7 @@ VStrokeFillPreview::eventFilter( QObject *, QEvent *event )
&& ey >= STROKE_TOPY && ey <= STROKE_BOTTOMY )
{
VColorDlg* dialog = new VColorDlg( m_stroke.color(), this );
- if( dialog->exec() == QDialog::Accepted )
+ if( dialog->exec() == TQDialog::Accepted )
{
if( m_part && m_part->document().selection() ) m_part->addCommand( new VStrokeCmd( &m_part->document(), dialog->Color() ), true );
}
@@ -176,12 +172,12 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f )
// draw checkerboard
VFill fill;
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
for( unsigned char y = 0; y < PANEL_SIZEY; y += 10 )
for( unsigned char x = 0; x < PANEL_SIZEX; x += 10 )
{
- fill.setColor( ( ( ( x + y ) % 20 ) == 0 ) ? QColor( 180, 180, 180 ) : QColor( 100, 100, 100 ) );
+ fill.setColor( ( ( ( x + y ) % 20 ) == 0 ) ? TQColor( 180, 180, 180 ) : TQColor( 100, 100, 100 ) );
m_painter->setBrush( fill );
m_painter->drawRect( x, y, 10, 10 );
}
@@ -199,7 +195,7 @@ VStrokeFillPreview::update( const VStroke &s, const VFill &f )
m_painter->end();
- repaint();
+ tqrepaint();
}
void
@@ -241,15 +237,15 @@ VStrokeFillPreview::drawFill( const VFill &f )
}
else
m_painter->setBrush( f );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->drawRect( KoRect( FILL_TOPX, FILL_TOPY, FILL_BOTTOMX - FILL_TOPX, FILL_BOTTOMY - FILL_TOPY ) );
}
else
{
VFill fill;
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->drawRect( KoRect( FILL_TOPX, FILL_TOPY,
FILL_BOTTOMX - FILL_TOPX,
@@ -259,7 +255,7 @@ VStrokeFillPreview::drawFill( const VFill &f )
// show 3D outline of fill part
VColor color;
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
color.set( 1.0, 1.0, 1.0 );
stroke.setColor( color );
m_painter->setPen( stroke );
@@ -282,7 +278,7 @@ VStrokeFillPreview::drawFill( const VFill &f )
if( f.type() == VFill::none )
{
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
m_painter->setPen( stroke );
m_painter->newPath();
m_painter->moveTo( KoPoint( FILL_BOTTOMX, FILL_TOPY ) );
@@ -297,7 +293,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
VStroke stroke;
stroke.setLineWidth( 2.0 );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
if( s.type() != VStroke::none )
{
@@ -357,10 +353,10 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
{
VFill fill;
m_painter->setFillRule( evenOdd );
- fill.setColor( Qt::white );
+ fill.setColor( TQt::white );
m_painter->setBrush( fill );
- m_painter->setPen( Qt::NoPen );
+ m_painter->setPen( TQt::NoPen );
m_painter->newPath();
m_painter->moveTo( KoPoint( STROKE_TOPX, STROKE_TOPY ) );
@@ -382,7 +378,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
color.set( 1.0, 1.0, 1.0 );
stroke.setColor( color );
- m_painter->setBrush( Qt::NoBrush );
+ m_painter->setBrush( TQt::NoBrush );
m_painter->setPen( stroke );
m_painter->newPath();
@@ -401,7 +397,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
m_painter->lineTo( KoPoint( STROKE_TOPX - 1, STROKE_BOTTOMY + 1 ) );
m_painter->strokePath();
- //stroke.setColor( Qt::black.rgb() );
+ //stroke.setColor( TQt::black.rgb() );
//m_painter->setPen( stroke );
m_painter->newPath();
m_painter->moveTo( KoPoint( STROKE_BOTTOMX_INNER - 1, STROKE_TOPY_INNER + 1 ) );
@@ -421,7 +417,7 @@ VStrokeFillPreview::drawStroke( const VStroke &s )
if( s.type() == VStroke::none )
{
- stroke.setColor( Qt::red );
+ stroke.setColor( TQt::red );
m_painter->setPen( stroke );
m_painter->newPath();
diff --git a/karbon/widgets/vstrokefillpreview.h b/karbon/widgets/vstrokefillpreview.h
index 20b0acbd..81fdffae 100644
--- a/karbon/widgets/vstrokefillpreview.h
+++ b/karbon/widgets/vstrokefillpreview.h
@@ -20,32 +20,33 @@
#ifndef __VSTROKEFILLPREVIEW_H__
#define __VSTROKEFILLPREVIEW_H__
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
class VKoPainter;
class VFill;
class VStroke;
class KarbonPart;
-class VStrokeFillPreview : public QFrame
+class VStrokeFillPreview : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
- VStrokeFillPreview( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VStrokeFillPreview( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
~VStrokeFillPreview();
- virtual QSize sizeHint() const
- { return QSize( 50, 50 ); }
- virtual QSize minimumSizeHint() const
- { return QSize( 20, 20 ); }
- virtual QSizePolicy sizePolicy() const
- { return QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); }
+ virtual TQSize tqsizeHint() const
+ { return TQSize( 50, 50 ); }
+ virtual TQSize tqminimumSizeHint() const
+ { return TQSize( 20, 20 ); }
+ virtual TQSizePolicy sizePolicy() const
+ { return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); }
void update( const VStroke &, const VFill & );
- virtual bool eventFilter( QObject* object, QEvent* event );
+ virtual bool eventFilter( TQObject* object, TQEvent* event );
bool strokeIsSelected() const { return m_strokeWidget; }
void setFillSelected();
@@ -57,13 +58,13 @@ signals:
void strokeSelected();
protected:
- virtual void paintEvent( QPaintEvent* event );
+ virtual void paintEvent( TQPaintEvent* event );
private:
VKoPainter* m_painter;
void drawFill( const VFill & );
void drawStroke( const VStroke & );
- QPixmap m_pixmap;
+ TQPixmap m_pixmap;
KarbonPart *m_part;
bool m_strokeWidget;
VFill m_fill;
diff --git a/karbon/widgets/vtoolbox.h b/karbon/widgets/vtoolbox.h
index 28c53f97..0646a1ae 100644
--- a/karbon/widgets/vtoolbox.h
+++ b/karbon/widgets/vtoolbox.h
@@ -28,6 +28,7 @@ class VTool;
class VToolBox : public KoToolBox
{
Q_OBJECT
+ TQ_OBJECT
public:
VToolBox( KMainWindow *mainWin, const char* name, KInstance* instance );
diff --git a/karbon/widgets/vtranslate.cc b/karbon/widgets/vtranslate.cc
index 1eaf81ed..37bfe811 100644
--- a/karbon/widgets/vtranslate.cc
+++ b/karbon/widgets/vtranslate.cc
@@ -18,10 +18,10 @@
* Boston, MA 02110-1301, USA.
*/
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qstring.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqstring.h>
#include <klocale.h>
#include <knuminput.h>
#include <kstdguiitem.h>
@@ -29,43 +29,43 @@
#include "vtranslate.h"
-VTranslate::VTranslate( QWidget* parent, const char* name )
- : QWidget( parent, name )
+VTranslate::VTranslate( TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
setCaption( i18n( "Translate" ) );
- QVBoxLayout *mainlayout = new QVBoxLayout(this, 7);
- mainlayout->addSpacing(5);
+ TQVBoxLayout *maintqlayout = new TQVBoxLayout(this, 7);
+ maintqlayout->addSpacing(5);
- QGridLayout *inputlayout = new QGridLayout(this, 5, 3);
- mainlayout->addLayout(inputlayout);
- m_labelX = new QLabel(i18n("X:"), this);
- inputlayout->addWidget(m_labelX, 0, 0);
- labely = new QLabel(i18n("Y:"), this);
- inputlayout->addWidget(labely, 1, 0);
- inputlayout->addColSpacing(1, 1);
- inputlayout->addColSpacing(3, 5);
+ TQGridLayout *inputtqlayout = new TQGridLayout(this, 5, 3);
+ maintqlayout->addLayout(inputtqlayout);
+ m_labelX = new TQLabel(i18n("X:"), this);
+ inputtqlayout->addWidget(m_labelX, 0, 0);
+ labely = new TQLabel(i18n("Y:"), this);
+ inputtqlayout->addWidget(labely, 1, 0);
+ inputtqlayout->addColSpacing(1, 1);
+ inputtqlayout->addColSpacing(3, 5);
m_inputX = new KDoubleNumInput( this );
m_inputX->setRange(-10000.00, 10000.00, 1.00, false); //range is just for example - for now :-)
- inputlayout->addWidget(m_inputX, 0, 2);
+ inputtqlayout->addWidget(m_inputX, 0, 2);
m_inputY = new KDoubleNumInput( this );
m_inputY->setRange(-10000.00, 10000.00, 1.00, false);
- inputlayout->addWidget(m_inputY, 1, 2);
- m_labelUnit1 = new QLabel("", this);
- inputlayout->addWidget(m_labelUnit1, 0, 4);
- m_labelUnit2 = new QLabel("", this);
- inputlayout->addWidget(m_labelUnit2, 1, 4);
- mainlayout->addSpacing(5);
- m_checkBoxPosition = new QCheckBox(i18n("Relative &position"), this);
- mainlayout->addWidget(m_checkBoxPosition);
- mainlayout->addSpacing(5);
- m_buttonDuplicate = new QPushButton(i18n("&Duplicate"), this);
- mainlayout->addWidget(m_buttonDuplicate);
- mainlayout->addSpacing(1);
+ inputtqlayout->addWidget(m_inputY, 1, 2);
+ m_labelUnit1 = new TQLabel("", this);
+ inputtqlayout->addWidget(m_labelUnit1, 0, 4);
+ m_labelUnit2 = new TQLabel("", this);
+ inputtqlayout->addWidget(m_labelUnit2, 1, 4);
+ maintqlayout->addSpacing(5);
+ m_checkBoxPosition = new TQCheckBox(i18n("Relative &position"), this);
+ maintqlayout->addWidget(m_checkBoxPosition);
+ maintqlayout->addSpacing(5);
+ m_buttonDuplicate = new TQPushButton(i18n("&Duplicate"), this);
+ maintqlayout->addWidget(m_buttonDuplicate);
+ maintqlayout->addSpacing(1);
m_buttonApply = new KPushButton(KStdGuiItem::apply(), this);
- mainlayout->addWidget(m_buttonApply);
+ maintqlayout->addWidget(m_buttonApply);
- mainlayout->activate();
+ maintqlayout->activate();
setFixedSize(baseSize()); //Set the size tp fixed values
}
@@ -74,7 +74,7 @@ VTranslate::~VTranslate()
{
}
-void VTranslate::setUnits( const QString& units )
+void VTranslate::setUnits( const TQString& units )
{
m_labelUnit1->setText( units );
m_labelUnit2->setText( units );
diff --git a/karbon/widgets/vtranslate.h b/karbon/widgets/vtranslate.h
index 23fd1325..1b019d4b 100644
--- a/karbon/widgets/vtranslate.h
+++ b/karbon/widgets/vtranslate.h
@@ -21,36 +21,37 @@
#ifndef __VTRANSLATE_H__
#define __VTRANSLATE_H__
-#include <qwidget.h>
+#include <tqwidget.h>
-class QCheckBox;
-class QLabel;
-class QPushButton;
-class QString;
+class TQCheckBox;
+class TQLabel;
+class TQPushButton;
+class TQString;
class KDoubleNumInput;
-class VTranslate : public QWidget
+class VTranslate : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- VTranslate( QWidget* parent = 0L, const char* name = 0L );
+ VTranslate( TQWidget* tqparent = 0L, const char* name = 0L );
~VTranslate();
public slots:
//sets the unit labels do display correct text (mm, cm, pixels etc):
- void setUnits( const QString& units );
+ void setUnits( const TQString& units );
private:
- QLabel* m_labelX;
+ TQLabel* m_labelX;
KDoubleNumInput* m_inputX; //X coordinate
- QLabel* labely;
+ TQLabel* labely;
KDoubleNumInput* m_inputY; //Y coordinate
- QLabel* m_labelUnit1;
- QLabel* m_labelUnit2;
- QCheckBox* m_checkBoxPosition; //If checked, displays coordinates of selected object
- QPushButton* m_buttonDuplicate; //duplicate (makes a copy of selected object(s) with a new position)
- QPushButton* m_buttonApply; //apply new position
+ TQLabel* m_labelUnit1;
+ TQLabel* m_labelUnit2;
+ TQCheckBox* m_checkBoxPosition; //If checked, displays coordinates of selected object
+ TQPushButton* m_buttonDuplicate; //duplicate (makes a copy of selected object(s) with a new position)
+ TQPushButton* m_buttonApply; //apply new position
};
#endif
diff --git a/karbon/widgets/vtypebuttonbox.cc b/karbon/widgets/vtypebuttonbox.cc
index 4a23d6dd..f182341d 100644
--- a/karbon/widgets/vtypebuttonbox.cc
+++ b/karbon/widgets/vtypebuttonbox.cc
@@ -203,9 +203,9 @@ static const char* const buttonpattern[]={
#endif
-#include <qpixmap.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqpixmap.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
#include <klocale.h>
@@ -217,48 +217,48 @@ static const char* const buttonpattern[]={
#include "vtypebuttonbox.h"
VTypeButtonBox::VTypeButtonBox( KarbonPart *part,
- QWidget* parent, const char* name )
- : QHButtonGroup( parent, name ),
+ TQWidget* tqparent, const char* name )
+ : TQHButtonGroup( tqparent, name ),
m_part( part ), m_isStrokeManipulator( false )
{
- setMaximumWidth( parent->width() - 2 );
+ setMaximumWidth( tqparent->width() - 2 );
// The button for no fill
- QToolButton* button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonnone ) );
+ TQToolButton* button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonnone ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "None" ) );
+ TQToolTip::add( button, i18n( "None" ) );
insert( button, none );
// The button for solid fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonsolid ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonsolid ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Solid" ) );
+ TQToolTip::add( button, i18n( "Solid" ) );
insert( button, solid );
// The button for gradient fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttongradient ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttongradient ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Gradient" ) );
+ TQToolTip::add( button, i18n( "Gradient" ) );
insert( button, gradient );
// The button for pattern fill
- button = new QToolButton( this );
- button->setPixmap( QPixmap( (const char **) buttonpattern ) );
+ button = new TQToolButton( this );
+ button->setPixmap( TQPixmap( (const char **) buttonpattern ) );
button->setMaximumWidth( 14 );
button->setMaximumHeight( 14 );
- QToolTip::add( button, i18n( "Pattern" ) );
+ TQToolTip::add( button, i18n( "Pattern" ) );
insert( button, pattern );
setInsideMargin( 1 );
setInsideSpacing( 1 );
- connect( this, SIGNAL( clicked( int ) ),
- this, SLOT( slotButtonPressed( int ) ) );
+ connect( this, TQT_SIGNAL( clicked( int ) ),
+ this, TQT_SLOT( slotButtonPressed( int ) ) );
}
void
diff --git a/karbon/widgets/vtypebuttonbox.h b/karbon/widgets/vtypebuttonbox.h
index ab624c04..e033a3e4 100644
--- a/karbon/widgets/vtypebuttonbox.h
+++ b/karbon/widgets/vtypebuttonbox.h
@@ -20,13 +20,14 @@
#ifndef __VTYPEBUTTONBOX_H__
#define __VTYPEBUTTONBOX_H__
-#include <qhbuttongroup.h>
+#include <tqhbuttongroup.h>
class KarbonPart;
-class VTypeButtonBox : public QHButtonGroup
+class VTypeButtonBox : public TQHButtonGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
enum buttonType {
@@ -36,7 +37,7 @@ public:
pattern = 3
};
- VTypeButtonBox( KarbonPart *part, QWidget* parent = 0L, const char* name = 0L );
+ VTypeButtonBox( KarbonPart *part, TQWidget* tqparent = 0L, const char* name = 0L );
bool isStrokeManipulator() { return m_isStrokeManipulator; }
public slots: