summaryrefslogtreecommitdiffstats
path: root/kig/misc
diff options
context:
space:
mode:
Diffstat (limited to 'kig/misc')
-rw-r--r--kig/misc/argsparser.cpp14
-rw-r--r--kig/misc/argsparser.h14
-rw-r--r--kig/misc/builtin_stuff.cc20
-rw-r--r--kig/misc/calcpaths.cc48
-rw-r--r--kig/misc/calcpaths.h6
-rw-r--r--kig/misc/common.cpp18
-rw-r--r--kig/misc/common.h2
-rw-r--r--kig/misc/coordinate.cpp6
-rw-r--r--kig/misc/coordinate.h4
-rw-r--r--kig/misc/coordinate_system.cpp50
-rw-r--r--kig/misc/coordinate_system.h2
-rw-r--r--kig/misc/cubic-common.cc2
-rw-r--r--kig/misc/guiaction.cc20
-rw-r--r--kig/misc/guiaction.h3
-rw-r--r--kig/misc/kigfiledialog.cc6
-rw-r--r--kig/misc/kigfiledialog.h7
-rw-r--r--kig/misc/kiginputdialog.cc28
-rw-r--r--kig/misc/kiginputdialog.h17
-rw-r--r--kig/misc/kigpainter.cpp44
-rw-r--r--kig/misc/kigpainter.h10
-rw-r--r--kig/misc/lists.cc8
-rw-r--r--kig/misc/object_constructor.cc38
-rw-r--r--kig/misc/object_constructor.h8
-rw-r--r--kig/misc/object_hierarchy.cc146
-rw-r--r--kig/misc/object_hierarchy.h12
-rw-r--r--kig/misc/rect.cc10
-rw-r--r--kig/misc/rect.h8
-rw-r--r--kig/misc/special_constructors.cc188
-rw-r--r--kig/misc/special_constructors.h18
29 files changed, 380 insertions, 377 deletions
diff --git a/kig/misc/argsparser.cpp b/kig/misc/argsparser.cpp
index c2387970..9d722752 100644
--- a/kig/misc/argsparser.cpp
+++ b/kig/misc/argsparser.cpp
@@ -152,15 +152,15 @@ ArgsParser ArgsParser::without( const ObjectImpType* type ) const
return ArgsParser( ret );
}
-ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& parents ) const
+ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& tqparents ) const
{
spec ret;
ret.type = 0;
std::vector<bool> found( margs.size(), false );
- for ( Args::const_iterator o = parents.begin();
- o != parents.end(); ++o )
+ for ( Args::const_iterator o = tqparents.begin();
+ o != tqparents.end(); ++o )
{
for ( uint i = 0; i < margs.size(); ++i )
{
@@ -183,9 +183,9 @@ ArgsParser::spec ArgsParser::findSpec( const ObjectImp* obj, const Args& parents
}
const ObjectImpType* ArgsParser::impRequirement(
- const ObjectImp* o, const Args& parents ) const
+ const ObjectImp* o, const Args& tqparents ) const
{
- spec s = findSpec( o, parents );
+ spec s = findSpec( o, tqparents );
return s.type;
}
@@ -233,9 +233,9 @@ ArgsParser::~ArgsParser()
{
}
-bool ArgsParser::isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const
+bool ArgsParser::isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const
{
- spec s = findSpec( o, parents );
+ spec s = findSpec( o, tqparents );
return s.onOrThrough;
}
diff --git a/kig/misc/argsparser.h b/kig/misc/argsparser.h
index 001d9359..a3aff562 100644
--- a/kig/misc/argsparser.h
+++ b/kig/misc/argsparser.h
@@ -26,7 +26,7 @@ class ObjectImpType;
/**
* This class is meant to take care of checking the types of the
- * parents to ObjectCalcer's, and to put them in the correct order.
+ * tqparents to ObjectCalcer's, and to put them in the correct order.
* An ObjectType should construct an ArgsParser with a specification
* of the arguments it wants. This specification is given as an array
* of ArgsParser::spec structs. This struct contains a pointer to an
@@ -117,7 +117,7 @@ private:
*/
std::vector<spec> margs;
- spec findSpec( const ObjectImp* o, const Args& parents ) const;
+ spec findSpec( const ObjectImp* o, const Args& tqparents ) const;
public:
ArgsParser( const struct spec* args, int n );
ArgsParser( const std::vector<spec>& args );
@@ -137,7 +137,7 @@ public:
int check( const std::vector<ObjectCalcer*>& os ) const;
/**
* returns the usetext for the argument that o would be used for,
- * if sel were used as parents..
+ * if sel were used as tqparents..
* \p o should be in \p sel ...
*/
std::string usetext( const ObjectImp* o, const Args& sel ) const;
@@ -155,16 +155,16 @@ public:
/**
* returns the minimal ObjectImp ID that \p o needs to inherit in order
- * to be useful.. \p o should be part of \p parents .
+ * to be useful.. \p o should be part of \p tqparents .
*/
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
/**
- * Supposing that \p parents would be given as parents, this function
+ * Supposing that \p tqparents would be given as tqparents, this function
* returns whether the returned ObjectImp will be, by construction,
* on \p o ( if \p o is a curve ), or through \p o ( if \p o is a point ).
*/
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
// Checks the args according to this args specification. If the
// objects should never have occurred, then an assertion failure
diff --git a/kig/misc/builtin_stuff.cc b/kig/misc/builtin_stuff.cc
index e162e7ac..432721cf 100644
--- a/kig/misc/builtin_stuff.cc
+++ b/kig/misc/builtin_stuff.cc
@@ -59,14 +59,14 @@ void setupBuiltinStuff()
I18N_NOOP( "A segment constructed from its start and end point" ),
"segment" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_segment", Qt::Key_S ) );
+ actions->add( new ConstructibleAction( c, "objects_new_segment", TQt::Key_S ) );
// line by two points..
c = new SimpleObjectTypeConstructor(
LineABType::instance(), I18N_NOOP( "Line by Two Points" ),
I18N_NOOP( "A line constructed through two points"), "line" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_linettp", Qt::Key_L ) );
+ actions->add( new ConstructibleAction( c, "objects_new_linettp", TQt::Key_L ) );
// ray by two points..
c = new SimpleObjectTypeConstructor(
@@ -74,7 +74,7 @@ void setupBuiltinStuff()
I18N_NOOP( "A half-line by its start point, and another point somewhere on it." ),
"ray" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_ray", Qt::Key_R ) );
+ actions->add( new ConstructibleAction( c, "objects_new_ray", TQt::Key_R ) );
// perpendicular line
c = new SimpleObjectTypeConstructor(
@@ -98,7 +98,7 @@ void setupBuiltinStuff()
I18N_NOOP( "A circle constructed by its center and a point that pertains to it" ),
"circlebcp" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_circlebcp", Qt::Key_C ) );
+ actions->add( new ConstructibleAction( c, "objects_new_circlebcp", TQt::Key_C ) );
c = new SimpleObjectTypeConstructor(
CircleBTPType::instance(), I18N_NOOP( "Circle by Three Points" ),
@@ -227,7 +227,7 @@ void setupBuiltinStuff()
I18N_NOOP( "An angle defined by three points" ),
"angle" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_angle", Qt::Key_A ) );
+ actions->add( new ConstructibleAction( c, "objects_new_angle", TQt::Key_A ) );
c = new SimpleObjectTypeConstructor(
EquilateralHyperbolaB4PType::instance(),
@@ -260,7 +260,7 @@ void setupBuiltinStuff()
"bisection" );
m.merge( mpotp );
m.merge( mpos );
- actions->add( new ConstructibleAction( &m, "objects_new_midpoint", Qt::Key_M ) );
+ actions->add( new ConstructibleAction( &m, "objects_new_midpoint", TQt::Key_M ) );
};
c = new SimpleObjectTypeConstructor(
@@ -269,7 +269,7 @@ void setupBuiltinStuff()
I18N_NOOP( "Construct a vector from two given points." ),
"vector" );
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_vector", Qt::Key_V ) );
+ actions->add( new ConstructibleAction( c, "objects_new_vector", TQt::Key_V ) );
c = new SimpleObjectTypeConstructor(
VectorSumType::instance(),
@@ -509,7 +509,7 @@ void setupBuiltinStuff()
ContainsTestType::instance(),
I18N_NOOP( "Contains Test" ),
I18N_NOOP( "Test whether a given curve contains a given point" ),
- "testcontains" );
+ "testtqcontains" );
ctors->add( c );
actions->add( new ConstructibleAction( c, "objects_new_containstest" ) );
@@ -562,12 +562,12 @@ void setupBuiltinStuff()
// the generic intersection constructor..
c = new GenericIntersectionConstructor();
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_intersection", Qt::Key_I ) );
+ actions->add( new ConstructibleAction( c, "objects_new_intersection", TQt::Key_I ) );
// the generic tangent constructor
c = new TangentConstructor();
ctors->add( c );
- actions->add( new ConstructibleAction( c, "objects_new_tangent", Qt::Key_T ) );
+ actions->add( new ConstructibleAction( c, "objects_new_tangent", TQt::Key_T ) );
// the generic center of curvature constructor
c = new CocConstructor();
diff --git a/kig/misc/calcpaths.cc b/kig/misc/calcpaths.cc
index 1532715b..55787518 100644
--- a/kig/misc/calcpaths.cc
+++ b/kig/misc/calcpaths.cc
@@ -33,7 +33,7 @@
// I previously misunderstood the semantics of this function
// and thought that the os vector had to be completed with all
// the subtree generated by it. On the contrary, the os vector
-// contains *all* the objects that we want, we only have to
+// tqcontains *all* the objects that we want, we only have to
// reorder them. Now it *should* work, however we postpone
// activating this to a more proper moment
@@ -75,7 +75,7 @@ void localdfs( ObjectCalcer* obj,
std::vector<ObjectCalcer*>& all)
{
visited.push_back( obj );
- const std::vector<ObjectCalcer*> o = obj->children();
+ const std::vector<ObjectCalcer*> o = obj->tqchildren();
for ( std::vector<ObjectCalcer*>::const_iterator i = o.begin(); i != o.end(); ++i )
{
if ( std::find( visited.begin(), visited.end(), *i ) == visited.end() )
@@ -98,7 +98,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os )
// the general idea here:
// first we build a new Objects variable. For every object in os,
- // we put all of its children at the end of it, and we do the same
+ // we put all of its tqchildren at the end of it, and we do the same
// for the ones we add..
// "all" is the Objects var we're building...
@@ -115,7 +115,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os )
{
for ( std::vector<ObjectCalcer*>::const_iterator i = tmp.begin(); i != tmp.end(); ++i )
{
- const std::vector<ObjectCalcer*> o = (*i)->children();
+ const std::vector<ObjectCalcer*> o = (*i)->tqchildren();
std::copy( o.begin(), o.end(), std::back_inserter( all ) );
std::copy( o.begin(), o.end(), std::back_inserter( tmp2 ) );
};
@@ -124,7 +124,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os )
};
// now we know that if all objects appear at least once after all of
- // their parents. So, we take all, and of every object, we remove
+ // their tqparents. So, we take all, and of every object, we remove
// every reference except the last one...
std::vector<ObjectCalcer*> ret;
ret.reserve( os.size() );
@@ -148,7 +148,7 @@ bool addBranch( const std::vector<ObjectCalcer*>& o, const ObjectCalcer* to, std
if ( *i == to )
rb = true;
else
- if ( addBranch( (*i)->children(), to, ret ) )
+ if ( addBranch( (*i)->tqchildren(), to, ret ) )
{
rb = true;
ret.push_back( *i );
@@ -163,7 +163,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& from, con
for ( std::vector<ObjectCalcer*>::const_iterator i = from.begin(); i != from.end(); ++i )
{
- (void) addBranch( (*i)->children(), to, all );
+ (void) addBranch( (*i)->tqchildren(), to, all );
};
std::vector<ObjectCalcer*> ret;
@@ -182,9 +182,9 @@ static void addNonCache( ObjectCalcer* o, std::vector<ObjectCalcer*>& ret )
ret.push_back( o );
else
{
- std::vector<ObjectCalcer*> parents = o->parents();
- for ( uint i = 0; i < parents.size(); ++i )
- addNonCache( parents[i], ret );
+ std::vector<ObjectCalcer*> tqparents = o->tqparents();
+ for ( uint i = 0; i < tqparents.size(); ++i )
+ addNonCache( tqparents[i], ret );
};
}
@@ -193,16 +193,16 @@ static bool visit( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& from
// this function returns true if the visited object depends on one
// of the objects in from. If we encounter objects that are on the
// side of the tree path ( they do not depend on from themselves,
- // but their direct children do ), then we add them to ret.
+ // but their direct tqchildren do ), then we add them to ret.
if ( std::find( from.begin(), from.end(), o ) != from.end() ) return true;
- std::vector<bool> deps( o->parents().size(), false );
+ std::vector<bool> deps( o->tqparents().size(), false );
bool somedepend = false;
bool alldepend = true;
- std::vector<ObjectCalcer*> parents = o->parents();
- for ( uint i = 0; i < parents.size(); ++i )
+ std::vector<ObjectCalcer*> tqparents = o->tqparents();
+ for ( uint i = 0; i < tqparents.size(); ++i )
{
- bool v = visit( parents[i], from, ret );
+ bool v = visit( tqparents[i], from, ret );
somedepend |= v;
alldepend &= v;
deps[i] = v;
@@ -211,7 +211,7 @@ static bool visit( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& from
{
for ( uint i = 0; i < deps.size(); ++i )
if ( ! deps[i] )
- addNonCache( parents[i], ret );
+ addNonCache( tqparents[i], ret );
};
return somedepend;
@@ -234,8 +234,8 @@ std::vector<ObjectCalcer*> getAllParents( const std::vector<ObjectCalcer*>& objs
std::set<ObjectCalcer*> next;
for ( std::set<ObjectCalcer*>::const_iterator i = cur.begin(); i != cur.end(); ++i )
{
- std::vector<ObjectCalcer*> parents = (*i)->parents();
- next.insert( parents.begin(), parents.end() );
+ std::vector<ObjectCalcer*> tqparents = (*i)->tqparents();
+ next.insert( tqparents.begin(), tqparents.end() );
};
ret.insert( next.begin(), next.end() );
@@ -253,16 +253,16 @@ std::vector<ObjectCalcer*> getAllParents( ObjectCalcer* obj )
bool isChild( const ObjectCalcer* o, const std::vector<ObjectCalcer*>& os )
{
- std::vector<ObjectCalcer*> parents = o->parents();
- std::set<ObjectCalcer*> cur( parents.begin(), parents.end() );
+ std::vector<ObjectCalcer*> tqparents = o->tqparents();
+ std::set<ObjectCalcer*> cur( tqparents.begin(), tqparents.end() );
while ( ! cur.empty() )
{
std::set<ObjectCalcer*> next;
for ( std::set<ObjectCalcer*>::const_iterator i = cur.begin(); i != cur.end(); ++i )
{
if ( std::find( os.begin(), os.end(), *i ) != os.end() ) return true;
- std::vector<ObjectCalcer*> parents = (*i)->parents();
- next.insert( parents.begin(), parents.end() );
+ std::vector<ObjectCalcer*> tqparents = (*i)->tqparents();
+ next.insert( tqparents.begin(), tqparents.end() );
};
cur = next;
};
@@ -289,8 +289,8 @@ std::set<ObjectCalcer*> getAllChildren( const std::vector<ObjectCalcer*> objs )
i != cur.end(); ++i )
{
ret.insert( *i );
- std::vector<ObjectCalcer*> children = (*i)->children();
- next.insert( children.begin(), children.end() );
+ std::vector<ObjectCalcer*> tqchildren = (*i)->tqchildren();
+ next.insert( tqchildren.begin(), tqchildren.end() );
};
cur = next;
};
diff --git a/kig/misc/calcpaths.h b/kig/misc/calcpaths.h
index 620558a3..3abf19a6 100644
--- a/kig/misc/calcpaths.h
+++ b/kig/misc/calcpaths.h
@@ -23,14 +23,14 @@
/**
* This function sorts \p os such that they're in the right order for
* calc()-ing. This means that child objects must appear after their
- * parents ( for you graph people, this is just a topological sort.. )
+ * tqparents ( for you graph people, this is just a topological sort.. )
*/
std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os );
/**
* This is a different function for more or less the same purpose. It
* takes a few Objects, which are considered to have been calced
- * already. Then, it puts the necessary part of their children in the
+ * already. Then, it puts the necessary part of their tqchildren in the
* right order, so that calc()-ing correctly updates all of their data
* ( they're calc'ed in the right order, i mean... ). The objects in
* from are normally not included in the output, unless they appear
@@ -42,7 +42,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& from, con
* This function returns all objects on the side of the path through
* the dependency tree from from down to to. This means that we look
* for any objects that don't depend on any of the objects in from
- * themselves, but of which one of the direct children does. We need
+ * themselves, but of which one of the direct tqchildren does. We need
* this function for Locus stuff...
*/
std::vector<ObjectCalcer*> sideOfTreePath( const std::vector<ObjectCalcer*>& from, const ObjectCalcer* to );
diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp
index b41b9284..83fdd077 100644
--- a/kig/misc/common.cpp
+++ b/kig/misc/common.cpp
@@ -347,7 +347,7 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate&
}
double getDoubleFromUser( const TQString& caption, const TQString& label, double value,
- TQWidget* parent, bool* ok, double min, double max, int decimals )
+ TQWidget* tqparent, bool* ok, double min, double max, int decimals )
{
#ifdef KIG_USE_KDOUBLEVALIDATOR
KDoubleValidator vtor( min, max, decimals, 0, 0 );
@@ -357,12 +357,12 @@ double getDoubleFromUser( const TQString& caption, const TQString& label, double
#if KDE_IS_VERSION( 3, 1, 90 )
TQString input = KInputDialog::getText(
caption, label, KGlobal::locale()->formatNumber( value, decimals ),
- ok, parent, "getDoubleFromUserDialog", &vtor );
+ ok, tqparent, "getDoubleFromUserDialog", &vtor );
#else
TQString input =
KLineEditDlg::getText( caption, label,
KGlobal::locale()->formatNumber( value, decimals ),
- ok, parent, &vtor );
+ ok, tqparent, &vtor );
#endif
bool myok = true;
@@ -422,7 +422,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// if ( fabs( a.x - b.x ) <= 1e-7 )
// {
// // too small to be useful..
-// return r.contains( Coordinate( a.x, r.center().y ), miss );
+// return r.tqcontains( Coordinate( a.x, r.center().y ), miss );
// }
// in case we have a segment we need also to check for the case when
@@ -433,7 +433,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// - if the midpoint is in the rect than returning true is safe (also
// in the cases where we have a ray or a line)
- if ( r.contains( 0.5*( a + b ), miss ) ) return true;
+ if ( r.tqcontains( 0.5*( a + b ), miss ) ) return true;
Coordinate dir = b - a;
double m = dir.y / dir.x;
@@ -455,10 +455,10 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// intersection is not between the begin and end point.. ) and if
// the rect contains the intersection.. If it does, we have a winner..
return
- ( imp->contains( leftint, width, w ) && r.contains( leftint, miss ) ) ||
- ( imp->contains( rightint, width, w ) && r.contains( rightint, miss ) ) ||
- ( imp->contains( bottomint, width, w ) && r.contains( bottomint, miss ) ) ||
- ( imp->contains( topint, width, w ) && r.contains( topint, miss ) );
+ ( imp->tqcontains( leftint, width, w ) && r.tqcontains( leftint, miss ) ) ||
+ ( imp->tqcontains( rightint, width, w ) && r.tqcontains( rightint, miss ) ) ||
+ ( imp->tqcontains( bottomint, width, w ) && r.tqcontains( bottomint, miss ) ) ||
+ ( imp->tqcontains( topint, width, w ) && r.tqcontains( topint, miss ) );
}
bool operator==( const LineData& l, const LineData& r )
diff --git a/kig/misc/common.h b/kig/misc/common.h
index d1969df3..d4f388fb 100644
--- a/kig/misc/common.h
+++ b/kig/misc/common.h
@@ -52,7 +52,7 @@ extern const double double_inf;
*/
double getDoubleFromUser( const TQString& caption, const TQString& label, double value,
- TQWidget* parent, bool* ok, double min, double max, int decimals );
+ TQWidget* tqparent, bool* ok, double min, double max, int decimals );
/**
* Simple class representing a line. Used by various functions in Kig.
diff --git a/kig/misc/coordinate.cpp b/kig/misc/coordinate.cpp
index f2c272f2..86cf8eab 100644
--- a/kig/misc/coordinate.cpp
+++ b/kig/misc/coordinate.cpp
@@ -25,7 +25,7 @@
using namespace std;
-Coordinate Coordinate::fromQPoint( const TQPoint& p )
+Coordinate Coordinate::fromTQPoint( const TQPoint& p )
{
return Coordinate( p.x(), p.y() );
}
@@ -159,10 +159,10 @@ const Coordinate Coordinate::normalize( double l ) const
const Coordinate Coordinate::round() const
{
- return Coordinate( qRound( x ), qRound( y ) );
+ return Coordinate( tqRound( x ), tqRound( y ) );
}
-TQPoint Coordinate::toQPoint() const
+TQPoint Coordinate::toTQPoint() const
{
Coordinate t = round();
return TQPoint( (int) t.x, (int) t.y );
diff --git a/kig/misc/coordinate.h b/kig/misc/coordinate.h
index 8e19eb5e..745d64a7 100644
--- a/kig/misc/coordinate.h
+++ b/kig/misc/coordinate.h
@@ -33,7 +33,7 @@ class kdbgstream;
class Coordinate
{
public:
- static Coordinate fromQPoint( const TQPoint& p );
+ static Coordinate fromTQPoint( const TQPoint& p );
/** Constructor. Construct a new Coordinate, with a given x and y
* value.
@@ -102,7 +102,7 @@ public:
* x/y ratio untouched...
*/
const Coordinate normalize( double length = 1 ) const;
- TQPoint toQPoint() const;
+ TQPoint toTQPoint() const;
Coordinate& operator= ( const Coordinate& c );
/** Add. Add c to this Coordinate
diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp
index 859ed81d..deefe954 100644
--- a/kig/misc/coordinate_system.cpp
+++ b/kig/misc/coordinate_system.cpp
@@ -40,7 +40,7 @@
#include <math.h>
class CoordinateValidator
- : public QValidator
+ : public TQValidator
{
bool mpolar;
#ifdef KIG_USE_KDOUBLEVALIDATOR
@@ -80,7 +80,7 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos )
if( tinput[tinput.length() - 1 ] == ' ' ) tinput.truncate( tinput.length() - 1 );
if ( tinput[0] == '(' ) tinput = tinput.mid( 1 );
if( tinput[0] == ' ' ) tinput = tinput.mid( 1 );
- int scp = tinput.find( ';' );
+ int scp = tinput.tqfind( ';' );
if ( scp == -1 ) return mdv.validate( tinput, pos ) == Invalid ? Invalid : Valid;
else
{
@@ -101,34 +101,34 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos )
void CoordinateValidator::fixup( TQString & input ) const
{
- int nsc = input.contains( ';' );
+ int nsc = input.tqcontains( ';' );
if ( nsc > 1 )
{
// where is the second ';'
- int i = input.find( ';' );
- i = input.find( ';', i );
+ int i = input.tqfind( ';' );
+ i = input.tqfind( ';', i );
input = input.left( i );
};
// now the string has at most one semicolon left..
- int sc = input.find( ';' );
+ int sc = input.tqfind( ';' );
if ( sc == -1 )
{
sc = input.length();
KLocale* l = KGlobal::locale();
if ( mpolar )
- input.append( TQString::fromLatin1( ";" ) + l->positiveSign() +
- TQString::fromLatin1( "0°" ) );
+ input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() +
+ TQString::tqfromLatin1( "0°" ) );
else
- input.append( TQString::fromLatin1( ";" ) + l->positiveSign() +
- TQString::fromLatin1( "0" ) + l->decimalSymbol() +
- TQString::fromLatin1( "0" ) );
+ input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() +
+ TQString::tqfromLatin1( "0" ) + l->decimalSymbol() +
+ TQString::tqfromLatin1( "0" ) );
};
mre.exactMatch( input );
TQString ds1 = mre.cap( 1 );
mdv.fixup( ds1 );
TQString ds2 = mre.cap( 2 );
mdv.fixup( ds2 );
- input = ds1 + TQString::fromLatin1( "; " ) + ds2;
+ input = ds1 + TQString::tqfromLatin1( "; " ) + ds2;
}
EuclideanCoords::EuclideanCoords()
@@ -146,7 +146,7 @@ TQString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d
int l = kigMax( 0, (int) ( 3 - log10( m ) ) );
TQString xs = KGlobal::locale()->formatNumber( p.x, l );
TQString ys = KGlobal::locale()->formatNumber( p.y, l );
- return TQString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys );
+ return TQString::tqfromLatin1( "( %1; %2 )" ).tqarg( xs ).tqarg( ys );
}
Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const
@@ -255,7 +255,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co
/****** the axes ******/
if ( showaxes )
{
- p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) );
+ p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) );
// x axis
p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) );
// y axis
@@ -286,8 +286,8 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co
);
};
// arrows on the ends of the axes...
- p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) );
- p.setBrush( TQBrush( Qt::gray ) );
+ p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) );
+ p.setBrush( TQBrush( TQt::gray ) );
std::vector<Coordinate> a;
// the arrow on the right end of the X axis...
@@ -354,7 +354,7 @@ TQString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) c
TQString rs = KGlobal::locale()->formatNumber( r, l );
TQString ts = KGlobal::locale()->formatNumber( theta, 0 );
- return TQString::fromLatin1("( %1; %2° )").arg( rs ).arg( ts );
+ return TQString::tqfromLatin1("( %1; %2° )").tqarg( rs ).tqarg( ts );
}
TQString PolarCoords::coordinateFormatNotice() const
@@ -450,7 +450,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const
/****** the axes ******/
if ( showaxes )
{
- p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) );
+ p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) );
// x axis
p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) );
// y axis
@@ -482,8 +482,8 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const
);
};
// arrows on the ends of the axes...
- p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) );
- p.setBrush( TQBrush( Qt::gray ) );
+ p.setPen( TQPen( TQt::gray, 1, TQt::SolidLine ) );
+ p.setBrush( TQBrush( TQt::gray ) );
std::vector<Coordinate> a;
// the arrow on the right end of the X axis...
@@ -575,7 +575,7 @@ TQString CoordinateSystemFactory::setCoordinateSystemStatement( int id )
return i18n( "Set Polar Coordinate System" );
default:
assert( false );
- return TQString::null;
+ return TQString();
}
}
@@ -608,15 +608,15 @@ Coordinate EuclideanCoords::snapToGrid( const Coordinate& c,
const double hgraphmin = ceil( hmin / hd) * hd;
const double vgraphmin = ceil( vmin / vd ) * vd;
- const double nx = qRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin;
- const double ny = qRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin;
+ const double nx = tqRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin;
+ const double ny = tqRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin;
return Coordinate( nx, ny );
}
Coordinate PolarCoords::snapToGrid( const Coordinate& c,
const KigWidget& w ) const
{
- // we reuse the drawGrid code to find
+ // we reuse the drawGrid code to tqfind
// we multiply by sqrt( 2 ) cause we don't want to miss circles in
// the corners, that intersect with the axes outside of the
@@ -643,7 +643,7 @@ Coordinate PolarCoords::snapToGrid( const Coordinate& c,
double d = kigMin( hd, vd );
double dist = c.length();
- double ndist = qRound( dist / d ) * d;
+ double ndist = tqRound( dist / d ) * d;
return c.normalize( ndist );
}
diff --git a/kig/misc/coordinate_system.h b/kig/misc/coordinate_system.h
index 44eaf6d6..f6c8cc7d 100644
--- a/kig/misc/coordinate_system.h
+++ b/kig/misc/coordinate_system.h
@@ -59,7 +59,7 @@ public:
* KigWidget... )
*/
class CoordinateSystem
- : public Qt
+ : public TQt
{
public:
CoordinateSystem();
diff --git a/kig/misc/cubic-common.cc b/kig/misc/cubic-common.cc
index 029f1194..6bdf3aca 100644
--- a/kig/misc/cubic-common.cc
+++ b/kig/misc/cubic-common.cc
@@ -486,7 +486,7 @@ const CubicCartesianData calcCubicTransformation (
// assert (fabs(b[0][1][2] - b[1][2][0]) < 1e-8); // test a couple of cases
// assert (fabs(b[0][1][1] - b[1][1][0]) < 1e-8);
- // apparently, the above assertions are wrong ( due to rounding
+ // aptqparently, the above assertions are wrong ( due to rounding
// errors, Maurizio and I hope :) ), so since the symmetry is not
// present, we just take the sum of the parts of the matrix elements
// that should be symmetric, instead of taking one of them, and
diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc
index c9435d2b..d17501c2 100644
--- a/kig/misc/guiaction.cc
+++ b/kig/misc/guiaction.cc
@@ -81,19 +81,19 @@ void ConstructibleAction::act( KigPart& d )
KigGUIAction::KigGUIAction( GUIAction* act,
KigPart& doc,
- TQObject* parent )
+ TQObject* tqparent )
: KAction( act->descriptiveName(),
doc.instance()->iconLoader()->loadIcon(
act->iconFileName(), KIcon::Toolbar, 0, KIcon::DefaultState, 0L, true ),
act->shortcut(),
0, 0, // no slot connection
- parent, act->actionName() ),
+ tqparent, act->actionName() ),
mact( act ),
mdoc( doc )
{
setWhatsThis( act->description() );
TQString tooltip = act->descriptiveName();
- tooltip.replace( TQRegExp( "&&" ), "&" );
+ tooltip.tqreplace( TQRegExp( "&&" ), "&" );
setToolTip( tooltip );
}
@@ -136,7 +136,7 @@ const char* ConstructPointAction::actionName() const
int ConstructPointAction::shortcut() const
{
- return Qt::Key_P;
+ return TQt::Key_P;
}
void ConstructPointAction::act( KigPart& d )
@@ -223,7 +223,7 @@ void AddFixedPointAction::act( KigPart& doc )
KigInputDialog::getCoordinate(
i18n( "Fixed Point" ),
i18n( "Enter the coordinates for the new point." ) +
- TQString::fromLatin1( "<br>" ) +
+ TQString::tqfromLatin1( "<br>" ) +
doc.document().coordinateSystem().coordinateFormatNoticeMarkup(),
doc.widget(), &ok, doc.document(), &c );
if ( ! ok ) return;
@@ -252,12 +252,12 @@ int ConstructibleAction::shortcut() const
int ConstructTextLabelAction::shortcut() const
{
- return Qt::Key_B;
+ return TQt::Key_B;
}
int AddFixedPointAction::shortcut() const
{
- return Qt::Key_F;
+ return TQt::Key_F;
}
#if 0
@@ -272,7 +272,7 @@ TestAction::~TestAction()
TQString TestAction::description() const
{
- return TQString::fromLatin1( "Test stuff !!!" );
+ return TQString::tqfromLatin1( "Test stuff !!!" );
}
TQCString TestAction::iconFileName() const
@@ -282,7 +282,7 @@ TQCString TestAction::iconFileName() const
TQString TestAction::descriptiveName() const
{
- return TQString::fromLatin1( "Test stuff !!!" );
+ return TQString::tqfromLatin1( "Test stuff !!!" );
}
const char* TestAction::actionName() const
@@ -297,7 +297,7 @@ void TestAction::act( KigPart& doc )
Object* constantpoint = ObjectFactory::instance()->fixedPoint( Coordinate( -1, -1 ) );
constantpoint->calc( doc );
- Object* codeobject = new DataObject( new StringImp( TQString::fromLatin1( script ) ) );
+ Object* codeobject = new DataObject( new StringImp( TQString::tqfromLatin1( script ) ) );
Object* compiledcode = new RealObject( PythonCompileType::instance(), Objects( codeobject ) );
compiledcode->calc( doc );
diff --git a/kig/misc/guiaction.h b/kig/misc/guiaction.h
index e2e3de54..e9595605 100644
--- a/kig/misc/guiaction.h
+++ b/kig/misc/guiaction.h
@@ -35,12 +35,13 @@ class KigGUIAction
: public KAction
{
Q_OBJECT
+ TQ_OBJECT
GUIAction* mact;
KigPart& mdoc;
public:
KigGUIAction( GUIAction* act,
KigPart& doc,
- TQObject* parent );
+ TQObject* tqparent );
void slotActivated();
GUIAction* guiAction();
diff --git a/kig/misc/kigfiledialog.cc b/kig/misc/kigfiledialog.cc
index 2d7ea08f..cdfe2196 100644
--- a/kig/misc/kigfiledialog.cc
+++ b/kig/misc/kigfiledialog.cc
@@ -25,8 +25,8 @@
#include <kmessagebox.h>
KigFileDialog::KigFileDialog( const TQString& startDir, const TQString& filter,
- const TQString& caption, TQWidget* parent )
- : KFileDialog( startDir, filter, parent, "kigfiledialog", true ),
+ const TQString& caption, TQWidget* tqparent )
+ : KFileDialog( startDir, filter, tqparent, "kigfiledialog", true ),
mow( 0L )
{
setCaption( caption );
@@ -53,7 +53,7 @@ void KigFileDialog::accept()
{
int ret = KMessageBox::warningContinueCancel( this,
i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" )
- .arg( sFile ), i18n( "Overwrite File?" ), i18n("Overwrite") );
+ .tqarg( sFile ), i18n( "Overwrite File?" ), i18n("Overwrite") );
if ( ret != KMessageBox::Continue )
{
KFileDialog::reject();
diff --git a/kig/misc/kigfiledialog.h b/kig/misc/kigfiledialog.h
index 8c243131..5fb65949 100644
--- a/kig/misc/kigfiledialog.h
+++ b/kig/misc/kigfiledialog.h
@@ -28,6 +28,7 @@ class KigFileDialog
: public KFileDialog
{
Q_OBJECT
+ TQ_OBJECT
private:
/**
@@ -45,17 +46,17 @@ public:
* documentation of KFileDialog for more help about this
* \param filter the filter for the file dialog
* \param caption the caption of this file dialog
- * \param parent the parent for this file dialog
+ * \param tqparent the tqparent for this file dialog
*/
KigFileDialog( const TQString& startDir, const TQString& filter,
- const TQString& caption, TQWidget *parent );
+ const TQString& caption, TQWidget *tqparent );
/**
* Use this to set the widget containing the options of eg an export filter.
* The option widget will be popped up in a dialog right after the user
* presses OK and before the dialog is closed.
*
- * You can construct the option widget with no parent, as it will be
+ * You can construct the option widget with no tqparent, as it will be
* reparented.
*
* \param w the option widget
diff --git a/kig/misc/kiginputdialog.cc b/kig/misc/kiginputdialog.cc
index ea0aeb66..de8f691d 100644
--- a/kig/misc/kiginputdialog.cc
+++ b/kig/misc/kiginputdialog.cc
@@ -65,8 +65,8 @@ KigInputDialogPrivate::KigInputDialogPrivate()
}
KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label,
- TQWidget* parent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 )
- : KDialogBase( parent, "kigdialog", true, caption, Ok|Cancel, Cancel, true ),
+ TQWidget* tqparent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 )
+ : KDialogBase( tqparent, "kigdialog", true, caption, Ok|Cancel, Cancel, true ),
d( new KigInputDialogPrivate() )
{
d->m_coord1 = c1 ? Coordinate( *c1 ) : Coordinate::invalidCoord();
@@ -84,8 +84,8 @@ KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label,
d->m_textEdit = new KTextEdit( frame );
d->m_textEdit->setText( label );
d->m_textEdit->setReadOnly( true );
- d->m_textEdit->setFocusPolicy( NoFocus );
-// d->m_textEdit->setAlignment( d->m_textEdit->alignment() | Qt::WordBreak );
+ d->m_textEdit->setFocusPolicy( TQ_NoFocus );
+// d->m_textEdit->tqsetAlignment( d->m_textEdit->tqalignment() | TQt::WordBreak );
d->m_textEdit->setFrameStyle( TQFrame::NoFrame );
mainlay->addWidget( d->m_textEdit );
@@ -121,8 +121,8 @@ KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label,
enableButtonOK( ok );
}
-KigInputDialog::KigInputDialog( TQWidget* parent, const Goniometry& g )
- : KDialogBase( parent, "kigdialog", true, i18n( "Set Angle Size" ), Ok|Cancel, Cancel, true ),
+KigInputDialog::KigInputDialog( TQWidget* tqparent, const Goniometry& g )
+ : KDialogBase( tqparent, "kigdialog", true, i18n( "Set Angle Size" ), Ok|Cancel, Cancel, true ),
d( new KigInputDialogPrivate() )
{
d->m_gonio = g;
@@ -171,7 +171,7 @@ KigInputDialog::KigInputDialog( TQWidget* parent, const Goniometry& g )
void KigInputDialog::keyPressEvent( TQKeyEvent* e )
{
- if ( ( e->key() == Qt::Key_Return ) && ( e->state() == 0 ) )
+ if ( ( e->key() == TQt::Key_Return ) && ( e->state() == 0 ) )
{
if ( actionButton( Ok )->isEnabled() )
{
@@ -180,7 +180,7 @@ void KigInputDialog::keyPressEvent( TQKeyEvent* e )
return;
}
}
- else if ( ( e->key() == Qt::Key_Escape ) && ( e->state() == 0 ) )
+ else if ( ( e->key() == TQt::Key_Escape ) && ( e->state() == 0 ) )
{
actionButton( Cancel )->animateClick();
e->accept();
@@ -247,16 +247,16 @@ Goniometry KigInputDialog::goniometry() const
}
void KigInputDialog::getCoordinate( const TQString& caption, const TQString& label,
- TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue )
+ TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue )
{
- getTwoCoordinates( caption, label, parent, ok, doc, cvalue, 0 );
+ getTwoCoordinates( caption, label, tqparent, ok, doc, cvalue, 0 );
}
void KigInputDialog::getTwoCoordinates( const TQString& caption, const TQString& label,
- TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue,
+ TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue,
Coordinate* cvalue2 )
{
- KigInputDialog dlg( caption, label, parent, doc, cvalue, cvalue2 );
+ KigInputDialog dlg( caption, label, tqparent, doc, cvalue, cvalue2 );
*ok = ( dlg.exec() == Accepted );
@@ -273,9 +273,9 @@ void KigInputDialog::getTwoCoordinates( const TQString& caption, const TQString&
}
-Goniometry KigInputDialog::getAngle( TQWidget* parent, bool* ok, const Goniometry& g )
+Goniometry KigInputDialog::getAngle( TQWidget* tqparent, bool* ok, const Goniometry& g )
{
- KigInputDialog dlg( parent, g );
+ KigInputDialog dlg( tqparent, g );
*ok = ( dlg.exec() == Accepted );
diff --git a/kig/misc/kiginputdialog.h b/kig/misc/kiginputdialog.h
index c7b29e73..60f2ba54 100644
--- a/kig/misc/kiginputdialog.h
+++ b/kig/misc/kiginputdialog.h
@@ -41,13 +41,14 @@ class KigInputDialog
: KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
private:
- KigInputDialog( const TQString& caption, const TQString& label, TQWidget* parent,
+ KigInputDialog( const TQString& caption, const TQString& label, TQWidget* tqparent,
const KigDocument& doc, Coordinate* c1, Coordinate* c2 );
- KigInputDialog( TQWidget* parent, const Goniometry& g );
+ KigInputDialog( TQWidget* tqparent, const Goniometry& g );
virtual void keyPressEvent( TQKeyEvent* e );
@@ -69,7 +70,7 @@ public:
*
* \param caption caption of the dialog
* \param label text of the label of the dialog
- * \param parent parent of the dialog widget
+ * \param tqparent tqparent of the dialog widget
* \param ok it will be set to true if the user pressed Ok after inserting a
* well-formatted Coordinate
* \param doc the actual Kig document
@@ -79,14 +80,14 @@ public:
* displayed as initial value of the correspondenting text edit
*/
static void getCoordinate( const TQString& caption, const TQString& label,
- TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue );
+ TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue );
/**
* Static convenience function to get two Coordinates at once from the user.
*
* \param caption caption of the dialog
* \param label text of the label of the dialog
- * \param parent parent of the dialog widget
+ * \param tqparent tqparent of the dialog widget
* \param ok it will be set to true if the user pressed Ok after inserting
* well-formatted Coordinates
* \param doc the actual Kig document
@@ -102,14 +103,14 @@ public:
* the text edit representing the second Coordinate.
*/
static void getTwoCoordinates( const TQString& caption, const TQString& label,
- TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue,
+ TQWidget* tqparent, bool* ok, const KigDocument& doc, Coordinate* cvalue,
Coordinate* cvalue2 );
/**
* Static convenience function to get an angle incapsulated in a Goniometry
* class.
*
- * \param parent parent of the dialog widget
+ * \param tqparent tqparent of the dialog widget
* \param ok it will be set to true if the user pressed Ok after inserting a
* well-formatted angle
* \param g the Goniometry class containing the original angle we are going
@@ -117,7 +118,7 @@ public:
*
* \return a Goniometry class containing the new angle
*/
- static Goniometry getAngle( TQWidget* parent, bool* ok, const Goniometry& g );
+ static Goniometry getAngle( TQWidget* tqparent, bool* ok, const Goniometry& g );
};
#endif
diff --git a/kig/misc/kigpainter.cpp b/kig/misc/kigpainter.cpp
index 98594ecb..95be1837 100644
--- a/kig/misc/kigpainter.cpp
+++ b/kig/misc/kigpainter.cpp
@@ -42,18 +42,18 @@
KigPainter::KigPainter( const ScreenInfo& si, TQPaintDevice* device,
const KigDocument& doc, bool no )
: mP ( device ),
- color( Qt::blue ),
+ color( TQt::blue ),
style( Qt::SolidLine ),
pointstyle( 0 ),
width( -1 ),
brushStyle( Qt::NoBrush ),
- brushColor( Qt::blue ),
+ brushColor( TQt::blue ),
mdoc( doc ),
msi( si ),
mNeedOverlay( no ),
overlayenlarge( 0 )
{
- mP.setBackgroundColor( Qt::white );
+ mP.setBackgroundColor( TQt::white );
}
KigPainter::~KigPainter()
@@ -136,7 +136,7 @@ void KigPainter::drawFatPoint( const Coordinate& p )
Rect r( tl, br );
TQRect qr = toScreen( r );
mP.drawRect( qr );
- mP.fillRect( qr, TQBrush( color, Qt::SolidPattern ) );
+ mP.fillRect( qr, TQBrush( color, TQt::SolidPattern ) );
if( mNeedOverlay ) mOverlay.push_back( qr );
break;
}
@@ -196,7 +196,7 @@ void KigPainter::drawText( const Rect p, const TQString s, int textFlags, int le
void KigPainter::textOverlay( const TQRect& r, const TQString s, int textFlags, int len )
{
- // kdDebug() << Rect::fromQRect( mP.boundingRect( r, textFlags, s, len ) ) << endl;
+ // kdDebug() << Rect::fromTQRect( mP.boundingRect( r, textFlags, s, len ) ) << endl;
TQRect newr( mP.boundingRect( r, textFlags, s, len ) );
newr.setWidth( newr.width() + 4 );
newr.setHeight( newr.height() + 4 );
@@ -218,7 +218,7 @@ void KigPainter::setColor( const TQColor& c )
mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) );
}
-void KigPainter::setStyle( const PenStyle c )
+void KigPainter::setStyle( const Qt::PenStyle c )
{
style = c;
mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) );
@@ -251,7 +251,7 @@ void KigPainter::setBrush( const TQBrush& b )
mP.setBrush( b );
}
-void KigPainter::setBrushStyle( const BrushStyle c )
+void KigPainter::setBrushStyle( const Qt::BrushStyle c )
{
brushStyle = c;
mP.setBrush( TQBrush( brushColor, brushStyle ) );
@@ -292,7 +292,7 @@ void KigPainter::drawPolygon( const std::vector<TQPoint>& pts,
TQBrush oldbrush = mP.brush();
setBrush( TQBrush( color, Dense4Pattern ) );
setPen( Qt::NoPen );
- // i know this isn't really fast, but i blame it all on Qt with its
+ // i know this isn't really fast, but i blame it all on TQt with its
// stupid container classes... what's wrong with the STL ?
TQPointArray t( pts.size() );
int c = 0;
@@ -300,7 +300,7 @@ void KigPainter::drawPolygon( const std::vector<TQPoint>& pts,
{
t.putPoints( c++, 1, i->x(), i->y() );
};
- mP.drawPolygon( t, winding, index, npoints );
+ mP.tqdrawPolygon( t, winding, index, npoints );
setPen( oldpen );
setBrush( oldbrush );
if( mNeedOverlay ) mOverlay.push_back( t.boundingRect() );
@@ -499,9 +499,9 @@ void KigPainter::drawObjects( const std::vector<ObjectHolder*>& os, bool sel )
void KigPainter::drawFilledRect( const TQRect& r )
{
- TQPen pen( Qt::black, 1, Qt::DotLine );
+ TQPen pen( TQt::black, 1, TQt::DotLine );
setPen( pen );
- setBrush( TQBrush( Qt::cyan, Dense6Pattern ) );
+ setBrush( TQBrush( TQt::cyan, Dense6Pattern ) );
drawRect( r.normalize() );
}
@@ -511,7 +511,7 @@ void KigPainter::drawTextStd( const TQPoint& p, const TQString& s )
// tf = text formatting flags
int tf = AlignLeft | AlignTop | DontClip | WordBreak;
// we need the rect where we're going to paint text
- setPen(TQPen(Qt::blue, 1, SolidLine));
+ setPen(TQPen(TQt::blue, 1, SolidLine));
setBrush(Qt::NoBrush);
drawText( Rect(
msi.fromScreen(p), window().bottomRight()
@@ -645,7 +645,7 @@ void KigPainter::drawAngle( const Coordinate& cpoint, const double dstartangle,
setBrushStyle( Qt::SolidPattern );
// drawPolygon( arrow );
- mP.drawPolygon( arrow, false, 0, -1 );
+ mP.tqdrawPolygon( arrow, false, 0, -1 );
// if ( mNeedOverlay ) mOverlay.push_back( toScreen( r ) );
setWholeWinOverlay(); //mp: ugly! why not compute a correct overlay?
@@ -679,7 +679,7 @@ void KigPainter::drawVector( const Coordinate& a, const Coordinate& b )
Coordinate c = b - dir + perp;
Coordinate d = b - dir - perp;
// draw the arrow lines with a normal style
- mP.setPen( TQPen( color, width == -1 ? 1 : width, Qt::SolidLine ) );
+ mP.setPen( TQPen( color, width == -1 ? 1 : width, TQt::SolidLine ) );
drawSegment( b, c );
drawSegment( b, d );
// setting again the original style
@@ -835,7 +835,7 @@ void KigPainter::drawCurve( const CurveImp* curve )
bool dooverlay = ! overlaypt && h < hmaxoverlay && valid0 && valid1
&& fabs( p0.x - p1.x ) <= overlayRectSize()
&& fabs( p0.y - p1.y ) <= overlayRectSize();
- bool addn = sr.contains( p2 ) || h >= hmax;
+ bool addn = sr.tqcontains( p2 ) || h >= hmax;
// estimated error between the curve and the segments
double errsq = 1e21;
if ( allvalid ) errsq = (0.5*p0 + 0.5*p1 - p2).squareLength();
@@ -859,7 +859,7 @@ void KigPainter::drawCurve( const CurveImp* curve )
if ( curpolylinenextfree > 0 && curpolyline[curpolylinenextfree - 1] != tp1 )
{
// flush the current part of the curve
- mP.drawPolyline( curpolyline, 0, curpolylinenextfree );
+ mP.tqdrawPolyline( curpolyline, 0, curpolylinenextfree );
curpolylinenextfree = 0;
}
if ( curpolylinenextfree == 0 )
@@ -870,10 +870,10 @@ void KigPainter::drawCurve( const CurveImp* curve )
else if ( h >= hmin ) // we do not continue to subdivide indefinitely!
{
// push into stack in order to process both subintervals
- if ( addn || ( valid0 && sr.contains( p0 ) ) )
+ if ( addn || ( valid0 && sr.tqcontains( p0 ) ) )
workstack.push( workitem( curitem.first, coordparampair( t2, p2 ),
overlaypt ) );
- if ( addn || ( valid1 && sr.contains( p1 ) ) )
+ if ( addn || ( valid1 && sr.tqcontains( p1 ) ) )
{
curitem = workitem( coordparampair( t2, p2 ), curitem.second ,
overlaypt );
@@ -883,7 +883,7 @@ void KigPainter::drawCurve( const CurveImp* curve )
}
}
// flush the rest of the curve
- mP.drawPolyline( curpolyline, 0, curpolylinenextfree );
+ mP.tqdrawPolyline( curpolyline, 0, curpolylinenextfree );
curpolylinenextfree = 0;
if ( ! workstack.empty () )
@@ -912,10 +912,10 @@ void KigPainter::drawTextFrame( const Rect& frame,
{
// inspired upon kgeo, thanks to Marc Bartsch, i've taken some of
// his code too..
- setPen( TQPen( Qt::black, 1 ) );
+ setPen( TQPen( TQt::black, 1 ) );
setBrush( TQBrush( TQColor( 255, 255, 222 ) ) );
drawRect( frame );
- setPen( TQPen( TQColor( 197, 194, 197 ), 1, Qt::SolidLine ) );
+ setPen( TQPen( TQColor( 197, 194, 197 ), 1, TQt::SolidLine ) );
TQRect qr = toScreen( frame );
@@ -924,7 +924,7 @@ void KigPainter::drawTextFrame( const Rect& frame,
};
setPen( oldpen );
setBrush( oldbrush );
- drawText( frame, s, Qt::AlignVCenter | Qt::AlignLeft );
+ drawText( frame, s, TQt::AlignVCenter | TQt::AlignLeft );
}
void KigPainter::drawArc( const Coordinate& center, const double radius,
diff --git a/kig/misc/kigpainter.h b/kig/misc/kigpainter.h
index 70b4cd9a..ee3b14c1 100644
--- a/kig/misc/kigpainter.h
+++ b/kig/misc/kigpainter.h
@@ -51,7 +51,7 @@ class ObjectHolder;
* It calls KigWidget::appendOverlay() for all of the places it draws in...
*/
class KigPainter
- : public Qt
+ : public TQt
{
protected:
// don't blaim me for this mutable hack. It's TT that hasn't got
@@ -59,10 +59,10 @@ protected:
mutable TQPainter mP;
TQColor color;
- PenStyle style;
+ Qt::PenStyle style;
int pointstyle;
int width;
- BrushStyle brushStyle;
+ Qt::BrushStyle brushStyle;
TQColor brushColor;
const KigDocument& mdoc;
@@ -94,7 +94,7 @@ public:
Rect fromScreen( const TQRect& r ) const;
// colors and stuff...
- void setStyle( const PenStyle c );
+ void setStyle( const Qt::PenStyle c );
void setColor( const TQColor& c );
/**
* setting this to -1 means to use the default width for the object
@@ -103,7 +103,7 @@ public:
void setWidth( const int c );
void setPointStyle( const int p );
void setPen( const TQPen& p );
- void setBrushStyle( const BrushStyle c );
+ void setBrushStyle( const Qt::BrushStyle c );
void setBrush( const TQBrush& b );
void setBrushColor( const TQColor& c );
diff --git a/kig/misc/lists.cc b/kig/misc/lists.cc
index d3a4fb4d..7d2bee62 100644
--- a/kig/misc/lists.cc
+++ b/kig/misc/lists.cc
@@ -301,13 +301,13 @@ bool MacroList::load( const TQString& f, std::vector<Macro*>& ret, const KigPart
TQFile file( f );
if ( ! file.open( IO_ReadOnly ) )
{
- KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) );
+ KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).tqarg( f ) );
return false;
}
TQDomDocument doc( "KigMacroFile" );
if ( !doc.setContent( &file ) )
{
- KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) );
+ KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).tqarg( f ) );
return false;
}
file.close();
@@ -318,7 +318,7 @@ bool MacroList::load( const TQString& f, std::vector<Macro*>& ret, const KigPart
else
{
KMessageBox::detailedSorry(
- 0, i18n( "Kig cannot open the macro file \"%1\"." ).arg( f ),
+ 0, i18n( "Kig cannot open the macro file \"%1\"." ).tqarg( f ),
i18n( "This file was created by a very old Kig version (pre-0.4). "
"Support for this format has been removed from recent Kig versions. "
"You can try to import this macro using a previous Kig version "
@@ -372,7 +372,7 @@ bool MacroList::loadNew( const TQDomElement& docelem, std::vector<Macro*>& ret,
assert( hierarchy );
// if the macro has no name, we give it a bogus name...
if ( name.isEmpty() )
- name = i18n( "Unnamed Macro #%1" ).arg( unnamedindex++ );
+ name = i18n( "Unnamed Macro #%1" ).tqarg( unnamedindex++ );
MacroConstructor* ctor =
new MacroConstructor( *hierarchy, i18n( name.latin1() ), i18n( description.latin1() ), iconfile );
delete hierarchy;
diff --git a/kig/misc/object_constructor.cc b/kig/misc/object_constructor.cc
index ce48a636..a5802d45 100644
--- a/kig/misc/object_constructor.cc
+++ b/kig/misc/object_constructor.cc
@@ -102,12 +102,12 @@ void StandardConstructorBase::handlePrelim(
assert ( margsparser.check( os ) != ArgsParser::Invalid );
std::vector<ObjectCalcer*> args = margsparser.parse( os );
p.setBrushStyle( Qt::NoBrush );
- p.setBrushColor( Qt::red );
- p.setPen( TQPen ( Qt::red, 1) );
+ p.setBrushColor( TQt::red );
+ p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being
// drawn..
- ObjectDrawer drawer( Qt::red );
+ ObjectDrawer drawer( TQt::red );
drawprelim( drawer, p, args, d );
}
@@ -124,12 +124,12 @@ SimpleObjectTypeConstructor::~SimpleObjectTypeConstructor()
{
}
-void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void SimpleObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
Args args;
using namespace std;
- transform( parents.begin(), parents.end(),
+ transform( tqparents.begin(), tqparents.end(),
back_inserter( args ), mem_fun( &ObjectCalcer::imp ) );
ObjectImp* data = mtype->calc( args, doc );
drawer.draw( *data, p, true );
@@ -178,12 +178,12 @@ MultiObjectTypeConstructor::~MultiObjectTypeConstructor()
{
}
-void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void MultiObjectTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
Args args;
using namespace std;
- transform( parents.begin(), parents.end(),
+ transform( tqparents.begin(), tqparents.end(),
back_inserter( args ), mem_fun( &ObjectCalcer::imp ) );
for ( vector<int>::const_iterator i = mparams.begin(); i != mparams.end(); ++i )
@@ -305,7 +305,7 @@ TQString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vec
transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) );
std::string ret = margsparser.usetext( o.imp(), args );
- if ( ret.empty() ) return TQString::null;
+ if ( ret.empty() ) return TQString();
return i18n( ret.c_str() );
}
@@ -318,7 +318,7 @@ TQString StandardConstructorBase::selectStatement(
transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) );
std::string ret = margsparser.selectStatement( args );
- if ( ret.empty() ) return TQString::null;
+ if ( ret.empty() ) return TQString();
return i18n( ret.c_str() );
}
@@ -331,7 +331,7 @@ TQString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vect
int w = (*i)->wantArgs( args, d, v );
if ( w != ArgsParser::Invalid ) return (*i)->useText( o, sel, d, v );
};
- return TQString::null;
+ return TQString();
}
TQString MergeObjectConstructor::selectStatement(
@@ -344,7 +344,7 @@ TQString MergeObjectConstructor::selectStatement(
int wa = (*i)->wantArgs( args, d, w );
if ( wa != ArgsParser::Invalid ) return (*i)->selectStatement( sel, d, w );
};
- return TQString::null;
+ return TQString();
}
MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const TQString& name,
@@ -421,7 +421,7 @@ TQString MacroConstructor::selectStatement(
transform( sel.begin(), sel.end(), back_inserter( args ),
mem_fun( &ObjectCalcer::imp ) );
std::string ret = mparser.selectStatement( args );
- if ( ret.empty() ) return TQString::null;
+ if ( ret.empty() ) return TQString();
else return i18n( ret.c_str() );
}
@@ -434,7 +434,7 @@ TQString MacroConstructor::useText( const ObjectCalcer& o, const std::vector<Obj
transform( sel.begin(), sel.end(), back_inserter( args ),
mem_fun( &ObjectCalcer::imp ) );
std::string ret = mparser.usetext( o.imp(), args );
- if ( ret.empty() ) return TQString::null;
+ if ( ret.empty() ) return TQString();
else return i18n( ret.c_str() );
}
@@ -551,26 +551,26 @@ PropertyObjectConstructor::~PropertyObjectConstructor()
}
void PropertyObjectConstructor::drawprelim(
- const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& d ) const
{
- int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname );
+ int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname );
assert ( index != -1 );
- ObjectImp* imp = parents[0]->imp()->property( index, d );
+ ObjectImp* imp = tqparents[0]->imp()->property( index, d );
drawer.draw( *imp, p, true );
delete imp;
}
std::vector<ObjectHolder*> PropertyObjectConstructor::build(
- const std::vector<ObjectCalcer*>& parents, KigDocument&,
+ const std::vector<ObjectCalcer*>& tqparents, KigDocument&,
KigWidget& ) const
{
- int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname );
+ int index = tqparents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname );
assert( index != -1 );
std::vector<ObjectHolder*> ret;
ret.push_back(
new ObjectHolder(
- new ObjectPropertyCalcer( parents[0], index ) ) );
+ new ObjectPropertyCalcer( tqparents[0], index ) ) );
return ret;
}
diff --git a/kig/misc/object_constructor.h b/kig/misc/object_constructor.h
index 9b03ece0..9233426f 100644
--- a/kig/misc/object_constructor.h
+++ b/kig/misc/object_constructor.h
@@ -165,7 +165,7 @@ public:
const KigDocument& d, const KigWidget& v
) const;
- virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const = 0;
TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
@@ -196,7 +196,7 @@ public:
~SimpleObjectTypeConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os,
@@ -225,7 +225,7 @@ public:
~PropertyObjectConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os,
@@ -265,7 +265,7 @@ public:
int a, int b, int c = -999, int d = -999 );
~MultiObjectTypeConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build(
diff --git a/kig/misc/object_hierarchy.cc b/kig/misc/object_hierarchy.cc
index c2365aaa..7a977e63 100644
--- a/kig/misc/object_hierarchy.cc
+++ b/kig/misc/object_hierarchy.cc
@@ -47,14 +47,14 @@ public:
// on the given objects. The dependsstack contains a set of
// booleans telling which parts of the hierarchy certainly depend on
// the given objects. In this function, the node should check
- // whether any of its parents have true set, and if so, set its own
+ // whether any of its tqparents have true set, and if so, set its own
// value to true.
virtual void checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const = 0;
// this function is used to check whether the given objects are all
- // used by one or more of the final objects. The usedstack contains
+ // used by one or more of the final objects. The usedstack tqcontains
// a set of booleans telling which parts of the hierarchy are
// certainly ancestors of the final objects. In this function, the
- // node should set all of its parents' booleans to true.
+ // node should set all of its tqparents' booleans to true.
virtual void checkArgumentsUsed( std::vector<bool>& usedstack ) const = 0;
};
@@ -118,15 +118,15 @@ class ApplyTypeNode
: public ObjectHierarchy::Node
{
const ObjectType* mtype;
- std::vector<int> mparents;
+ std::vector<int> mtqparents;
public:
- ApplyTypeNode( const ObjectType* type, const std::vector<int>& parents )
- : mtype( type ), mparents( parents ) {}
+ ApplyTypeNode( const ObjectType* type, const std::vector<int>& tqparents )
+ : mtype( type ), mtqparents( tqparents ) {}
~ApplyTypeNode();
Node* copy() const;
const ObjectType* type() const { return mtype; }
- const std::vector<int>& parents() const { return mparents; }
+ const std::vector<int>& tqparents() const { return mtqparents; }
int id() const;
void apply( std::vector<const ObjectImp*>& stack,
@@ -141,17 +141,17 @@ int ApplyTypeNode::id() const { return ID_ApplyType; }
void ApplyTypeNode::checkArgumentsUsed( std::vector<bool>& usedstack ) const
{
- for ( uint i = 0; i < mparents.size(); ++i )
+ for ( uint i = 0; i < mtqparents.size(); ++i )
{
- usedstack[mparents[i]] = true;
+ usedstack[mtqparents[i]] = true;
}
}
void ApplyTypeNode::checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const
{
bool result = false;
- for ( uint i = 0; i < mparents.size(); ++i )
- if ( dependsstack[mparents[i]] == true ) result = true;
+ for ( uint i = 0; i < mtqparents.size(); ++i )
+ if ( dependsstack[mtqparents[i]] == true ) result = true;
dependsstack[loc] = result;
}
@@ -161,23 +161,23 @@ ApplyTypeNode::~ApplyTypeNode()
ObjectHierarchy::Node* ApplyTypeNode::copy() const
{
- return new ApplyTypeNode( mtype, mparents );
+ return new ApplyTypeNode( mtype, mtqparents );
}
void ApplyTypeNode::apply( std::vector<ObjectCalcer*>& stack, int loc ) const
{
- std::vector<ObjectCalcer*> parents;
- for ( uint i = 0; i < mparents.size(); ++i )
- parents.push_back( stack[ mparents[i] ] );
- stack[loc] = new ObjectTypeCalcer( mtype, parents );
+ std::vector<ObjectCalcer*> tqparents;
+ for ( uint i = 0; i < mtqparents.size(); ++i )
+ tqparents.push_back( stack[ mtqparents[i] ] );
+ stack[loc] = new ObjectTypeCalcer( mtype, tqparents );
}
void ApplyTypeNode::apply( std::vector<const ObjectImp*>& stack,
int loc, const KigDocument& doc ) const
{
Args args;
- for ( uint i = 0; i < mparents.size(); ++i )
- args.push_back( stack[mparents[i]] );
+ for ( uint i = 0; i < mtqparents.size(); ++i )
+ args.push_back( stack[mtqparents[i]] );
args = mtype->sortArgs( args );
stack[loc] = mtype->calc( args, doc );
}
@@ -186,21 +186,21 @@ class FetchPropertyNode
: public ObjectHierarchy::Node
{
mutable int mpropid;
- int mparent;
+ int mtqparent;
const TQCString mname;
public:
- // propid is a cache of the location of name in the parent's
+ // propid is a cache of the location of name in the tqparent's
// propertiesInternalNames(), just as it is in PropertyObject. We
// don't want to ever save this value, since we cannot guarantee it
// remains consistent if we add properties some place..
- FetchPropertyNode( const int parent, const TQCString& name, const int propid = -1 )
- : mpropid( propid ), mparent( parent ), mname( name ) {}
+ FetchPropertyNode( const int tqparent, const TQCString& name, const int propid = -1 )
+ : mpropid( propid ), mtqparent( tqparent ), mname( name ) {}
~FetchPropertyNode();
Node* copy() const;
void checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const;
void checkArgumentsUsed( std::vector<bool>& usedstack ) const;
- int parent() const { return mparent; }
+ int tqparent() const { return mtqparent; }
const TQCString& propinternalname() const { return mname; }
int id() const;
@@ -215,17 +215,17 @@ FetchPropertyNode::~FetchPropertyNode()
void FetchPropertyNode::checkArgumentsUsed( std::vector<bool>& usedstack ) const
{
- usedstack[mparent] = true;
+ usedstack[mtqparent] = true;
}
void FetchPropertyNode::checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const
{
- dependsstack[loc] = dependsstack[mparent];
+ dependsstack[loc] = dependsstack[mtqparent];
}
ObjectHierarchy::Node* FetchPropertyNode::copy() const
{
- return new FetchPropertyNode( mparent, mname, mpropid );
+ return new FetchPropertyNode( mtqparent, mname, mpropid );
}
int FetchPropertyNode::id() const
@@ -236,10 +236,10 @@ int FetchPropertyNode::id() const
void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack,
int loc, const KigDocument& d ) const
{
- assert( stack[mparent] );
- if ( mpropid == -1 ) mpropid = stack[mparent]->propertiesInternalNames().findIndex( mname );
+ assert( stack[mtqparent] );
+ if ( mpropid == -1 ) mpropid = stack[mtqparent]->propertiesInternalNames().tqfindIndex( mname );
if ( mpropid != -1 )
- stack[loc] = stack[mparent]->property( mpropid, d );
+ stack[loc] = stack[mtqparent]->property( mpropid, d );
else
stack[loc] = new InvalidImp();
}
@@ -247,9 +247,9 @@ void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack,
void FetchPropertyNode::apply( std::vector<ObjectCalcer*>& stack, int loc ) const
{
if ( mpropid == -1 )
- mpropid = stack[mparent]->imp()->propertiesInternalNames().findIndex( mname );
+ mpropid = stack[mtqparent]->imp()->propertiesInternalNames().tqfindIndex( mname );
assert( mpropid != -1 );
- stack[loc] = new ObjectPropertyCalcer( stack[mparent], mpropid );
+ stack[loc] = new ObjectPropertyCalcer( stack[mtqparent], mpropid );
}
std::vector<ObjectImp*> ObjectHierarchy::calc( const Args& a, const KigDocument& doc ) const
@@ -297,23 +297,23 @@ int ObjectHierarchy::visit( const ObjectCalcer* o, std::map<const ObjectCalcer*,
// because that's where we expect it.. We therefore copy it
// there using CopyObjectType..
int ret = mnumberofargs + mnodes.size();
- std::vector<int> parents;
- parents.push_back( smi->second );
- mnodes.push_back( new ApplyTypeNode( CopyObjectType::instance(), parents ) );
+ std::vector<int> tqparents;
+ tqparents.push_back( smi->second );
+ mnodes.push_back( new ApplyTypeNode( CopyObjectType::instance(), tqparents ) );
return ret;
}
else return smi->second;
}
- std::vector<ObjectCalcer*> p( o->parents() );
+ std::vector<ObjectCalcer*> p( o->tqparents() );
// we check if o descends from the given objects..
bool descendsfromgiven = false;
- std::vector<int> parents;
- parents.resize( p.size(), -1 );
+ std::vector<int> tqparents;
+ tqparents.resize( p.size(), -1 );
for ( uint i = 0; i < p.size(); ++i )
{
int v = visit( p[i], seenmap, false );
- parents[i] = v;
+ tqparents[i] = v;
descendsfromgiven |= (v != -1);
};
@@ -335,7 +335,7 @@ int ObjectHierarchy::visit( const ObjectCalcer* o, std::map<const ObjectCalcer*,
return -1;
};
- return storeObject( o, p, parents, seenmap );
+ return storeObject( o, p, tqparents, seenmap );
}
ObjectHierarchy::~ObjectHierarchy()
@@ -385,9 +385,9 @@ void ObjectHierarchy::init( const std::vector<ObjectCalcer*>& from, const std::v
seenmap[from[i]] = i;
for ( std::vector<ObjectCalcer*>::const_iterator i = to.begin(); i != to.end(); ++i )
{
- std::vector<ObjectCalcer*> parents = (*i)->parents();
- for ( std::vector<ObjectCalcer*>::const_iterator j = parents.begin();
- j != parents.end(); ++j )
+ std::vector<ObjectCalcer*> tqparents = (*i)->tqparents();
+ for ( std::vector<ObjectCalcer*>::const_iterator j = tqparents.begin();
+ j != tqparents.end(); ++j )
visit( *j, seenmap, true );
}
for ( std::vector<ObjectCalcer*>::const_iterator i = to.begin(); i != to.end(); ++i )
@@ -408,7 +408,7 @@ ObjectHierarchy::ObjectHierarchy( const std::vector<ObjectCalcer*>& from, const
init( from, to );
}
-void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) const
+void ObjectHierarchy::serialize( TQDomElement& tqparent, TQDomDocument& doc ) const
{
int id = 1;
for ( uint i = 0; i < mnumberofargs; ++i )
@@ -419,12 +419,12 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons
// we don't save these atm, since the user can't define them.
// we only load them from builtin macro's.
// TQDomElement ut = doc.createElement( "UseText" );
-// ut.appendChild( doc.createTextNode( TQString::fromLatin1(musetexts[i].c_str() ) ) );
+// ut.appendChild( doc.createTextNode( TQString::tqfromLatin1(musetexts[i].c_str() ) ) );
// e.appendChild( ut );
// TQDomElement ss = doc.createElement( "SelectStatement" );
-// ss.appendChild( doc.createTextNode( TQString::fromLatin1(mselectstatements[i].c_str() ) ) );
+// ss.appendChild( doc.createTextNode( TQString::tqfromLatin1(mselectstatements[i].c_str() ) ) );
// e.appendChild( ss );
- parent.appendChild( e );
+ tqparent.appendChild( e );
}
for ( uint i = 0; i < mnodes.size(); ++i )
@@ -437,12 +437,12 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons
{
const ApplyTypeNode* node = static_cast<const ApplyTypeNode*>( mnodes[i] );
e.setAttribute( "action", "calc" );
- e.setAttribute( "type", TQString::fromLatin1( node->type()->fullName() ) );
- for ( uint i = 0; i < node->parents().size(); ++i )
+ e.setAttribute( "type", TQString::tqfromLatin1( node->type()->fullName() ) );
+ for ( uint i = 0; i < node->tqparents().size(); ++i )
{
- int parent = node->parents()[i] + 1;
+ int tqparent = node->tqparents()[i] + 1;
TQDomElement arge = doc.createElement( "arg" );
- arge.appendChild( doc.createTextNode( TQString::number( parent ) ) );
+ arge.appendChild( doc.createTextNode( TQString::number( tqparent ) ) );
e.appendChild( arge );
};
}
@@ -450,9 +450,9 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons
{
const FetchPropertyNode* node = static_cast<const FetchPropertyNode*>( mnodes[i] );
e.setAttribute( "action", "fetch-property" );
- e.setAttribute( "property", node->propinternalname() );
+ e.setAttribute( TQString("property"), TQString(node->propinternalname()) );
TQDomElement arge = doc.createElement( "arg" );
- arge.appendChild( doc.createTextNode( TQString::number( node->parent() + 1 ) ) );
+ arge.appendChild( doc.createTextNode( TQString::number( node->tqparent() + 1 ) ) );
e.appendChild( arge );
}
else
@@ -464,7 +464,7 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons
e.setAttribute( "type", type );
};
- parent.appendChild( e );
+ tqparent.appendChild( e );
};
}
@@ -473,12 +473,12 @@ ObjectHierarchy::ObjectHierarchy()
{
}
-ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error )
+ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& tqparent, TQString& error )
{
#define KIG_GENERIC_PARSE_ERROR \
{ \
error = i18n( "An error was encountered at line %1 in file %2." ) \
- .arg( __LINE__ ).arg( __FILE__ ); \
+ .tqarg( __LINE__ ).tqarg( __FILE__ ); \
return 0; \
}
@@ -486,7 +486,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement&
bool ok = true;
TQString tmp;
- TQDomElement e = parent.firstChild().toElement();
+ TQDomElement e = tqparent.firstChild().toElement();
for (; !e.isNull(); e = e.nextSibling().toElement() )
{
if ( e.tagName() != "input" ) break;
@@ -537,18 +537,18 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement&
{
// ApplyTypeNode
TQCString typen = e.attribute( "type" ).latin1();
- const ObjectType* type = ObjectTypeFactory::instance()->find( typen );
+ const ObjectType* type = ObjectTypeFactory::instance()->tqfind( typen );
if ( ! type )
{
error = i18n( "This Kig file uses an object of type \"%1\", "
"which this Kig version does not support."
"Perhaps you have compiled Kig without support "
"for this object type,"
- "or perhaps you are using an older Kig version." ).arg( typen );
+ "or perhaps you are using an older Kig version." ).tqarg( TQString(typen) );
return 0;
}
- std::vector<int> parents;
+ std::vector<int> tqparents;
for ( TQDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() )
{
TQDomElement q = p.toElement();
@@ -556,18 +556,18 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement&
if ( q.tagName() != "arg" ) KIG_GENERIC_PARSE_ERROR;
int pid = q.text().toInt(&ok );
if ( !ok ) KIG_GENERIC_PARSE_ERROR;
- parents.push_back( pid - 1 );
+ tqparents.push_back( pid - 1 );
};
- newnode = new ApplyTypeNode( type, parents );
+ newnode = new ApplyTypeNode( type, tqparents );
}
else if ( tmp == "fetch-property" )
{
// FetchPropertyNode
TQCString propname = e.attribute( "property" ).latin1();
TQDomElement arge = e.firstChild().toElement();
- int parent = arge.text().toInt( &ok );
+ int tqparent = arge.text().toInt( &ok );
if ( !ok ) KIG_GENERIC_PARSE_ERROR;
- newnode = new FetchPropertyNode( parent - 1, propname );
+ newnode = new FetchPropertyNode( tqparent - 1, propname );
}
else
{
@@ -640,11 +640,11 @@ ObjectHierarchy ObjectHierarchy::transformFinalObject( const Transformation& t )
ObjectHierarchy ret( *this );
ret.mnodes.push_back( new PushStackNode( new TransformationImp( t ) ) );
- std::vector<int> parents;
- parents.push_back( ret.mnodes.size() - 1);
- parents.push_back( ret.mnodes.size() );
+ std::vector<int> tqparents;
+ tqparents.push_back( ret.mnodes.size() - 1);
+ tqparents.push_back( ret.mnodes.size() );
const ObjectType* type = ApplyTransformationObjectType::instance();
- ret.mnodes.push_back( new ApplyTypeNode( type, parents ) );
+ ret.mnodes.push_back( new ApplyTypeNode( type, tqparents ) );
return ret;
}
@@ -696,7 +696,7 @@ const ObjectImpType* lowermost( const ObjectImpType* a, const ObjectImpType* b )
// this function is part of the visit procedure really. It is
// factored out, because it recurses for cache ObjectImp's. What this
// does is, it makes sure that object o is calcable, by putting
-// appropriate Node's in mnodes.. po is o->parents() and pl contains
+// appropriate Node's in mnodes.. po is o->tqparents() and pl tqcontains
// the location of objects that are already in mnodes and -1
// otherwise.. -1 means we have to store their ObjectImp, unless
// they're cache ObjectImp's etc.
@@ -723,12 +723,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vector<Objec
}
else if ( (uint) pl[i] < mnumberofargs )
{
- ObjectCalcer* parent = o->parents()[i];
- std::vector<ObjectCalcer*> opl = o->parents();
+ ObjectCalcer* tqparent = o->tqparents()[i];
+ std::vector<ObjectCalcer*> opl = o->tqparents();
margrequirements[pl[i]] =
lowermost( margrequirements[pl[i]],
- o->impRequirement( parent, opl ) );
+ o->impRequirement( tqparent, opl ) );
musetexts[pl[i]] = margrequirements[pl[i]]->selectStatement();
};
};
@@ -737,12 +737,12 @@ int ObjectHierarchy::storeObject( const ObjectCalcer* o, const std::vector<Objec
else if ( dynamic_cast<const ObjectPropertyCalcer*>( o ) )
{
assert( pl.size() == 1 );
- int parent = pl.front();
+ int tqparent = pl.front();
ObjectCalcer* op = po.front();
assert( op );
uint propid = static_cast<const ObjectPropertyCalcer*>( o )->propId();
assert( propid < op->imp()->propertiesInternalNames().size() );
- mnodes.push_back( new FetchPropertyNode( parent, op->imp()->propertiesInternalNames()[propid], propid ) );
+ mnodes.push_back( new FetchPropertyNode( tqparent, op->imp()->propertiesInternalNames()[propid], propid ) );
}
else
assert( false );
diff --git a/kig/misc/object_hierarchy.h b/kig/misc/object_hierarchy.h
index 60df8a59..cda2615f 100644
--- a/kig/misc/object_hierarchy.h
+++ b/kig/misc/object_hierarchy.h
@@ -73,22 +73,22 @@ public:
std::vector<ObjectImp*> calc( const Args& a, const KigDocument& doc ) const;
/**
- * saves the ObjectHierarchy data in children xml tags of \p parent ..
+ * saves the ObjectHierarchy data in tqchildren xml tags of \p tqparent ..
*/
- void serialize( TQDomElement& parent, TQDomDocument& doc ) const;
+ void serialize( TQDomElement& tqparent, TQDomDocument& doc ) const;
/**
- * Deserialize the ObjectHierarchy data from the xml element \p parent ..
+ * Deserialize the ObjectHierarchy data from the xml element \p tqparent ..
* Since this operation can fail for some reasons, we provide it as a
* static to return 0 in case of error.
*/
- static ObjectHierarchy* buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error );
-// ObjectHierarchy( const TQDomElement& parent );
+ static ObjectHierarchy* buildSafeObjectHierarchy( const TQDomElement& tqparent, TQString& error );
+// ObjectHierarchy( const TQDomElement& tqparent );
/**
* build a set of objects that interdepend according to this
* ObjectHierarchy.. Only the result objects are returned. Helper
* objects that connect the given objects with the returned objects,
- * can only be found by following the returned objects' parents()
+ * can only be found by following the returned objects' tqparents()
* methods..
*/
std::vector<ObjectCalcer*> buildObjects( const std::vector<ObjectCalcer*>& os, const KigDocument& ) const;
diff --git a/kig/misc/rect.cc b/kig/misc/rect.cc
index 183f50f8..652fae2d 100644
--- a/kig/misc/rect.cc
+++ b/kig/misc/rect.cc
@@ -153,9 +153,9 @@ void Rect::scale( const double r )
}
-TQRect Rect::toQRect() const
+TQRect Rect::toTQRect() const
{
- return TQRect(mBottomLeft.toQPoint(), topRight().toQPoint());
+ return TQRect(mBottomLeft.toTQPoint(), topRight().toTQPoint());
}
Coordinate Rect::bottomLeft() const
@@ -211,7 +211,7 @@ double Rect::height() const
return mheight;
}
-bool Rect::contains( const Coordinate& p, double allowed_miss ) const
+bool Rect::tqcontains( const Coordinate& p, double allowed_miss ) const
{
return p.x - left() >= - allowed_miss &&
p.y - bottom() >= - allowed_miss &&
@@ -219,7 +219,7 @@ bool Rect::contains( const Coordinate& p, double allowed_miss ) const
p.y - bottom() - height() <= allowed_miss;
}
-bool Rect::contains( const Coordinate& p ) const
+bool Rect::tqcontains( const Coordinate& p ) const
{
return p.x >= left() &&
p.y >= bottom() &&
@@ -253,7 +253,7 @@ Rect Rect::normalized() const
return t;
}
-Rect Rect::fromQRect( const TQRect& r )
+Rect Rect::fromTQRect( const TQRect& r )
{
return Rect( r.left(), r.top(), r.right(), r.bottom() );
}
diff --git a/kig/misc/rect.h b/kig/misc/rect.h
index 1fe0b071..52958dd8 100644
--- a/kig/misc/rect.h
+++ b/kig/misc/rect.h
@@ -103,7 +103,7 @@ public:
*/
Rect matchShape( const Rect& rhs, bool shrink = false ) const;
- TQRect toQRect() const;
+ TQRect toTQRect() const;
Coordinate bottomLeft() const;
Coordinate bottomRight() const;
Coordinate topLeft() const;
@@ -115,13 +115,13 @@ public:
double top() const;
double width() const;
double height() const;
- bool contains( const Coordinate& p ) const;
- bool contains( const Coordinate& p, double allowed_miss ) const;
+ bool tqcontains( const Coordinate& p ) const;
+ bool tqcontains( const Coordinate& p, double allowed_miss ) const;
bool intersects( const Rect& p ) const;
Rect normalized() const;
friend kdbgstream& operator<<( kdbgstream& s, const Rect& t );
- static Rect fromQRect( const TQRect& );
+ static Rect fromTQRect( const TQRect& );
protected:
Coordinate mBottomLeft;
double mwidth;
diff --git a/kig/misc/special_constructors.cc b/kig/misc/special_constructors.cc
index d419a546..ccb92ac6 100644
--- a/kig/misc/special_constructors.cc
+++ b/kig/misc/special_constructors.cc
@@ -68,7 +68,7 @@ public:
ConicConicIntersectionConstructor();
~ConicConicIntersectionConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
@@ -109,13 +109,13 @@ ConicRadicalConstructor::~ConicRadicalConstructor()
}
void ConicRadicalConstructor::drawprelim(
- const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& doc ) const
+ const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& doc ) const
{
- if ( parents.size() == 2 && parents[0]->imp()->inherits( ConicImp::stype() ) &&
- parents[1]->imp()->inherits( ConicImp::stype() ) )
+ if ( tqparents.size() == 2 && tqparents[0]->imp()->inherits( ConicImp::stype() ) &&
+ tqparents[1]->imp()->inherits( ConicImp::stype() ) )
{
Args args;
- std::transform( parents.begin(), parents.end(),
+ std::transform( tqparents.begin(), tqparents.end(),
std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) );
for ( int i = -1; i < 2; i += 2 )
{
@@ -170,27 +170,27 @@ LocusConstructor::~LocusConstructor()
{
}
-void LocusConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void LocusConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
// this function is rather ugly, but it is necessary to do it this
// way in order to play nice with Kig's design..
- if ( parents.size() != 2 ) return;
- const ObjectTypeCalcer* constrained = dynamic_cast<ObjectTypeCalcer*>( parents.front() );
- const ObjectCalcer* moving = parents.back();
+ if ( tqparents.size() != 2 ) return;
+ const ObjectTypeCalcer* constrained = dynamic_cast<ObjectTypeCalcer*>( tqparents.front() );
+ const ObjectCalcer* moving = tqparents.back();
if ( ! constrained || ! constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) )
{
// moving is in fact the constrained point.. swap them..
- moving = parents.front();
- constrained = dynamic_cast<const ObjectTypeCalcer*>( parents.back() );
+ moving = tqparents.front();
+ constrained = dynamic_cast<const ObjectTypeCalcer*>( tqparents.back() );
assert( constrained );
};
assert( constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) );
- const ObjectImp* oimp = constrained->parents().back()->imp();
+ const ObjectImp* oimp = constrained->tqparents().back()->imp();
if( !oimp->inherits( CurveImp::stype() ) )
- oimp = constrained->parents().front()->imp();
+ oimp = constrained->tqparents().front()->imp();
assert( oimp->inherits( CurveImp::stype() ) );
const CurveImp* cimp = static_cast<const CurveImp*>( oimp );
@@ -210,30 +210,30 @@ const int LocusConstructor::wantArgs(
if ( dynamic_cast<ObjectTypeCalcer*>( os.front() ) &&
static_cast<ObjectTypeCalcer*>( os.front() )->type()->inherits( ObjectType::ID_ConstrainedPointType ) )
{
- std::set<ObjectCalcer*> children = getAllChildren( os.front() );
- return children.find( os.back() ) != children.end() ? ret : ArgsParser::Invalid;
+ std::set<ObjectCalcer*> tqchildren = getAllChildren( os.front() );
+ return tqchildren.find( os.back() ) != tqchildren.end() ? ret : ArgsParser::Invalid;
}
if ( dynamic_cast<ObjectTypeCalcer*>( os.back() ) &&
static_cast<ObjectTypeCalcer*>( os.back() )->type()->inherits( ObjectType::ID_ConstrainedPointType ) )
{
- std::set<ObjectCalcer*> children = getAllChildren( os.back() );
- return children.find( os.front() ) != children.end() ? ret : ArgsParser::Invalid;
+ std::set<ObjectCalcer*> tqchildren = getAllChildren( os.back() );
+ return tqchildren.find( os.front() ) != tqchildren.end() ? ret : ArgsParser::Invalid;
}
return ArgsParser::Invalid;
}
-std::vector<ObjectHolder*> LocusConstructor::build( const std::vector<ObjectCalcer*>& parents, KigDocument&, KigWidget& ) const
+std::vector<ObjectHolder*> LocusConstructor::build( const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const
{
std::vector<ObjectHolder*> ret;
- assert( parents.size() == 2 );
+ assert( tqparents.size() == 2 );
- ObjectTypeCalcer* constrained = dynamic_cast<ObjectTypeCalcer*>( parents.front() );
- ObjectCalcer* moving = parents.back();
+ ObjectTypeCalcer* constrained = dynamic_cast<ObjectTypeCalcer*>( tqparents.front() );
+ ObjectCalcer* moving = tqparents.back();
if ( ! constrained || ! constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) )
{
// moving is in fact the constrained point.. swap them..
- moving = parents.front();
- constrained = dynamic_cast<ObjectTypeCalcer*>( parents.back() );
+ moving = tqparents.front();
+ constrained = dynamic_cast<ObjectTypeCalcer*>( tqparents.back() );
assert( constrained );
};
assert( constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) );
@@ -350,12 +350,12 @@ void PolygonBNPTypeConstructor::handlePrelim(
std::vector<ObjectCalcer*> args = os;
p.setBrushStyle( Qt::NoBrush );
- p.setBrushColor( Qt::red );
- p.setPen( TQPen ( Qt::red, 1) );
+ p.setBrushColor( TQt::red );
+ p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being
// drawn..
- ObjectDrawer drawer( Qt::red );
+ ObjectDrawer drawer( TQt::red );
drawprelim( drawer, p, args, d );
}
@@ -374,21 +374,21 @@ TQString PolygonBNPTypeConstructor::selectStatement(
return i18n("Select a point to be a vertex of the new polygon...");
}
-void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
- if ( parents.size() < 2 ) return;
+ if ( tqparents.size() < 2 ) return;
std::vector<Coordinate> points;
- for ( uint i = 0; i < parents.size(); ++i )
+ for ( uint i = 0; i < tqparents.size(); ++i )
{
const Coordinate vertex =
- static_cast<const PointImp*>( parents[i]->imp() )->coordinate();
+ static_cast<const PointImp*>( tqparents[i]->imp() )->coordinate();
points.push_back( vertex );
}
- if ( parents.size() == 2 )
+ if ( tqparents.size() == 2 )
{
SegmentImp segment = SegmentImp( points[0], points[1] );
drawer.draw( segment, p, true );
@@ -398,12 +398,12 @@ void PolygonBNPTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPaint
}
}
-std::vector<ObjectHolder*> PolygonBNPTypeConstructor::build( const std::vector<ObjectCalcer*>& parents, KigDocument&, KigWidget& ) const
+std::vector<ObjectHolder*> PolygonBNPTypeConstructor::build( const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const
{
- uint count = parents.size() - 1;
+ uint count = tqparents.size() - 1;
assert ( count >= 3 );
std::vector<ObjectCalcer*> args;
- for ( uint i = 0; i < count; ++i ) args.push_back( parents[i] );
+ for ( uint i = 0; i < count; ++i ) args.push_back( tqparents[i] );
ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, args );
ObjectHolder* h = new ObjectHolder( calcer );
std::vector<ObjectHolder*> ret;
@@ -443,12 +443,12 @@ PolygonVertexTypeConstructor::~PolygonVertexTypeConstructor()
{
}
-void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
- if ( parents.size() != 1 ) return;
+ if ( tqparents.size() != 1 ) return;
- const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( parents.front()->imp() );
+ const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( tqparents.front()->imp() );
const std::vector<Coordinate> points = polygon->points();
int sides = points.size();
@@ -459,11 +459,11 @@ void PolygonVertexTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPa
}
}
-std::vector<ObjectHolder*> PolygonVertexTypeConstructor::build( const std::vector<ObjectCalcer*>& parents, KigDocument&, KigWidget& ) const
+std::vector<ObjectHolder*> PolygonVertexTypeConstructor::build( const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const
{
std::vector<ObjectHolder*> ret;
- assert( parents.size() == 1 );
- const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( parents.front()->imp() );
+ assert( tqparents.size() == 1 );
+ const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( tqparents.front()->imp() );
const std::vector<Coordinate> points = polygon->points();
int sides = points.size();
@@ -471,7 +471,7 @@ std::vector<ObjectHolder*> PolygonVertexTypeConstructor::build( const std::vecto
for ( int i = 0; i < sides; ++i )
{
ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( i ) );
- std::vector<ObjectCalcer*> args( parents );
+ std::vector<ObjectCalcer*> args( tqparents );
args.push_back( d );
ret.push_back( new ObjectHolder( new ObjectTypeCalcer( mtype, args ) ) );
}
@@ -510,12 +510,12 @@ PolygonSideTypeConstructor::~PolygonSideTypeConstructor()
{
}
-void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
- if ( parents.size() != 1 ) return;
+ if ( tqparents.size() != 1 ) return;
- const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( parents.front()->imp() );
+ const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( tqparents.front()->imp() );
const std::vector<Coordinate> points = polygon->points();
uint sides = points.size();
@@ -527,11 +527,11 @@ void PolygonSideTypeConstructor::drawprelim( const ObjectDrawer& drawer, KigPain
}
}
-std::vector<ObjectHolder*> PolygonSideTypeConstructor::build( const std::vector<ObjectCalcer*>& parents, KigDocument&, KigWidget& ) const
+std::vector<ObjectHolder*> PolygonSideTypeConstructor::build( const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const
{
std::vector<ObjectHolder*> ret;
- assert( parents.size() == 1 );
- const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( parents.front()->imp() );
+ assert( tqparents.size() == 1 );
+ const PolygonImp* polygon = dynamic_cast<const PolygonImp*>( tqparents.front()->imp() );
const std::vector<Coordinate> points = polygon->points();
uint sides = points.size();
@@ -539,7 +539,7 @@ std::vector<ObjectHolder*> PolygonSideTypeConstructor::build( const std::vector<
for ( uint i = 0; i < sides; ++i )
{
ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( i ) );
- std::vector<ObjectCalcer*> args( parents );
+ std::vector<ObjectCalcer*> args( tqparents );
args.push_back( d );
ret.push_back( new ObjectHolder( new ObjectTypeCalcer( mtype, args ) ) );
}
@@ -659,12 +659,12 @@ void PolygonBCVConstructor::handlePrelim(
}
p.setBrushStyle( Qt::NoBrush );
- p.setBrushColor( Qt::red );
- p.setPen( TQPen ( Qt::red, 1) );
+ p.setBrushColor( TQt::red );
+ p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being
// drawn..
- ObjectDrawer drawer( Qt::red );
+ ObjectDrawer drawer( TQt::red );
drawprelim( drawer, p, args, d );
if ( moreinfo )
{
@@ -682,7 +682,7 @@ void PolygonBCVConstructor::handlePrelim(
ptn = PointImp( where );
ptn.draw( p );
if ( i > 5 ) continue;
- text = TextImp( TQString( "(%1)" ).arg(i), where, false );
+ text = TextImp( TQString( "(%1)" ).tqarg(i), where, false );
text.draw( p );
}
p.setStyle( Qt::DotLine );
@@ -700,17 +700,17 @@ void PolygonBCVConstructor::handlePrelim(
delete_all( args.begin() + 2, args.end() );
}
-std::vector<ObjectHolder*> PolygonBCVConstructor::build( const std::vector<ObjectCalcer*>& parents, KigDocument&, KigWidget& ) const
+std::vector<ObjectHolder*> PolygonBCVConstructor::build( const std::vector<ObjectCalcer*>& tqparents, KigDocument&, KigWidget& ) const
{
- assert ( parents.size() == 3 );
+ assert ( tqparents.size() == 3 );
std::vector<ObjectCalcer*> args;
- Coordinate c = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- Coordinate v = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
- Coordinate cntrl = static_cast<const PointImp*>( parents[2]->imp() )->coordinate();
+ Coordinate c = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ Coordinate v = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
+ Coordinate cntrl = static_cast<const PointImp*>( tqparents[2]->imp() )->coordinate();
- args.push_back( parents[0] );
- args.push_back( parents[1] );
+ args.push_back( tqparents[0] );
+ args.push_back( tqparents[1] );
int winding = 0;
int nsides = computeNsides( c, v, cntrl, winding );
ObjectConstCalcer* d = new ObjectConstCalcer( new IntImp( nsides ) );
@@ -752,13 +752,13 @@ TQString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector<
{
TQString result = TQString(
i18n( "Adjust the number of sides (%1/%2)" )
- ).arg( nsides ).arg( winding );
+ ).tqarg( nsides ).tqarg( winding );
return result;
} else
{
TQString result = TQString(
i18n( "Adjust the number of sides (%1)" )
- ).arg( nsides );
+ ).tqarg( nsides );
return result;
}
break;
@@ -789,20 +789,20 @@ TQString PolygonBCVConstructor::selectStatement(
return "";
}
-void PolygonBCVConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void PolygonBCVConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
- if ( parents.size() < 3 || parents.size() > 4 ) return;
+ if ( tqparents.size() < 3 || tqparents.size() > 4 ) return;
- assert ( parents[0]->imp()->inherits( PointImp::stype() ) &&
- parents[1]->imp()->inherits( PointImp::stype() ) &&
- parents[2]->imp()->inherits( IntImp::stype() ) );
+ assert ( tqparents[0]->imp()->inherits( PointImp::stype() ) &&
+ tqparents[1]->imp()->inherits( PointImp::stype() ) &&
+ tqparents[2]->imp()->inherits( IntImp::stype() ) );
- if ( parents.size() == 4 )
- assert ( parents[3]->imp()->inherits( IntImp::stype() ) );
+ if ( tqparents.size() == 4 )
+ assert ( tqparents[3]->imp()->inherits( IntImp::stype() ) );
Args args;
- std::transform( parents.begin(), parents.end(),
+ std::transform( tqparents.begin(), tqparents.end(),
std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) );
ObjectImp* data = mtype->calc( args, doc );
@@ -878,16 +878,16 @@ ConicConicIntersectionConstructor::~ConicConicIntersectionConstructor()
{
}
-void ConicConicIntersectionConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+void ConicConicIntersectionConstructor::drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
- if ( parents.size() != 2 ) return;
- assert ( parents[0]->imp()->inherits( ConicImp::stype() ) &&
- parents[1]->imp()->inherits( ConicImp::stype() ) );
+ if ( tqparents.size() != 2 ) return;
+ assert ( tqparents[0]->imp()->inherits( ConicImp::stype() ) &&
+ tqparents[1]->imp()->inherits( ConicImp::stype() ) );
const ConicCartesianData conica =
- static_cast<const ConicImp*>( parents[0]->imp() )->cartesianData();
+ static_cast<const ConicImp*>( tqparents[0]->imp() )->cartesianData();
const ConicCartesianData conicb =
- static_cast<const ConicImp*>( parents[1]->imp() )->cartesianData();
+ static_cast<const ConicImp*>( tqparents[1]->imp() )->cartesianData();
bool ok = true;
for ( int wr = -1; wr < 2; wr += 2 )
{
@@ -1179,23 +1179,23 @@ void MeasureTransportConstructor::handlePrelim(
) const
{
p.setBrushStyle( Qt::NoBrush );
- p.setBrushColor( Qt::red );
- p.setPen( TQPen ( Qt::red, 1) );
+ p.setBrushColor( TQt::red );
+ p.setPen( TQPen ( TQt::red, 1) );
p.setWidth( -1 ); // -1 means the default width for the object being
// drawn..
- ObjectDrawer drawer( Qt::red );
+ ObjectDrawer drawer( TQt::red );
drawprelim( drawer, p, os, d );
}
void MeasureTransportConstructor::drawprelim( const ObjectDrawer& drawer,
KigPainter& p,
- const std::vector<ObjectCalcer*>& parents,
+ const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
Args args;
using namespace std;
- transform( parents.begin(), parents.end(),
+ transform( tqparents.begin(), tqparents.end(),
back_inserter( args ), mem_fun( &ObjectCalcer::imp ) );
ObjectImp* data = mtype->calc( args, doc );
drawer.draw( *data, p, true );
@@ -1236,13 +1236,13 @@ TQString MeasureTransportConstructor::selectStatement(
}
std::vector<ObjectHolder*> MeasureTransportConstructor::build(
- const std::vector<ObjectCalcer*>& parents,
+ const std::vector<ObjectCalcer*>& tqparents,
KigDocument&, KigWidget& ) const
{
- assert ( parents.size() == 3 );
+ assert ( tqparents.size() == 3 );
// std::vector<ObjectCalcer*> args;
-// for ( uint i = 0; i < count; ++i ) args.push_back( parents[i] );
- ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, parents );
+// for ( uint i = 0; i < count; ++i ) args.push_back( tqparents[i] );
+ ObjectTypeCalcer* calcer = new ObjectTypeCalcer( mtype, tqparents );
ObjectHolder* h = new ObjectHolder( calcer );
std::vector<ObjectHolder*> ret;
ret.push_back( h );
@@ -1362,7 +1362,7 @@ TQString GenericIntersectionConstructor::useText(
break;
}
- return TQString::null;
+ return TQString();
}
static const ArgsParser::spec argsspecMidPointOfTwoPoints[] =
@@ -1386,15 +1386,15 @@ MidPointOfTwoPointsConstructor::~MidPointOfTwoPointsConstructor()
}
void MidPointOfTwoPointsConstructor::drawprelim(
- const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const
{
- if ( parents.size() != 2 ) return;
- assert( parents[0]->imp()->inherits( PointImp::stype() ) );
- assert( parents[1]->imp()->inherits( PointImp::stype() ) );
+ if ( tqparents.size() != 2 ) return;
+ assert( tqparents[0]->imp()->inherits( PointImp::stype() ) );
+ assert( tqparents[1]->imp()->inherits( PointImp::stype() ) );
const Coordinate m =
- ( static_cast<const PointImp*>( parents[0]->imp() )->coordinate() +
- static_cast<const PointImp*>( parents[1]->imp() )->coordinate() ) / 2;
+ ( static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate() +
+ static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate() ) / 2;
drawer.draw( PointImp( m ), p, true );
}
@@ -1403,7 +1403,7 @@ std::vector<ObjectHolder*> MidPointOfTwoPointsConstructor::build(
{
ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), os );
seg->calc( d );
- int index = seg->imp()->propertiesInternalNames().findIndex( "mid-point" );
+ int index = seg->imp()->propertiesInternalNames().tqfindIndex( "mid-point" );
assert( index != -1 );
ObjectPropertyCalcer* prop = new ObjectPropertyCalcer( seg, index );
prop->calc( d );
@@ -1542,7 +1542,7 @@ TQString TangentConstructor::useText(
else if ( o.imp()->inherits( PointImp::stype() ) )
return i18n( "Tangent at This Point" );
// else assert( false );
- return TQString::null;
+ return TQString();
}
//TQString TangentConstructor::selectStatement(
@@ -1604,7 +1604,7 @@ TQString CocConstructor::useText(
return i18n( "Center of Curvature of This Curve" );
else if ( o.imp()->inherits( PointImp::stype() ) )
return i18n( "Center of Curvature at This Point" );
- return TQString::null;
+ return TQString();
}
bool relativePrimes( int n, int p )
diff --git a/kig/misc/special_constructors.h b/kig/misc/special_constructors.h
index 5b80693c..796c8cd0 100644
--- a/kig/misc/special_constructors.h
+++ b/kig/misc/special_constructors.h
@@ -29,7 +29,7 @@ public:
PolygonVertexTypeConstructor();
~PolygonVertexTypeConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
bool isTransform() const;
@@ -44,7 +44,7 @@ public:
PolygonSideTypeConstructor();
~PolygonSideTypeConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
bool isTransform() const;
@@ -83,7 +83,7 @@ public:
const KigWidget& v
) const;
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
bool isTransform() const;
@@ -121,7 +121,7 @@ public:
const KigDocument& d,
const KigWidget& v
) const;
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
bool isTransform() const;
@@ -163,7 +163,7 @@ public:
const KigWidget& v
) const;
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
bool isTransform() const;
@@ -179,7 +179,7 @@ public:
~ConicRadicalConstructor();
TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
@@ -205,7 +205,7 @@ public:
TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
void plug( KigPart* doc, KigGUIAction* kact );
@@ -259,7 +259,7 @@ class MidPointOfTwoPointsConstructor
public:
MidPointOfTwoPointsConstructor();
~MidPointOfTwoPointsConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d,
KigWidget& w ) const;
@@ -275,7 +275,7 @@ public:
TestConstructor( const ArgsParserObjectType* type, const char* descname,
const char* desc, const char* iconfile );
~TestConstructor();
- void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
+ void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d,
KigWidget& w ) const;