summaryrefslogtreecommitdiffstats
path: root/karbon/tools
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /karbon/tools
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karbon/tools')
-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
38 files changed, 669 insertions, 656 deletions
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