summaryrefslogtreecommitdiffstats
path: root/kig/objects
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kig/objects
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/objects')
-rw-r--r--kig/objects/angle_type.cc30
-rw-r--r--kig/objects/arc_type.h4
-rw-r--r--kig/objects/base_type.cc42
-rw-r--r--kig/objects/bogus_imp.cc10
-rw-r--r--kig/objects/bogus_imp.h2
-rw-r--r--kig/objects/circle_imp.cc26
-rw-r--r--kig/objects/circle_imp.h2
-rw-r--r--kig/objects/conic_imp.cc22
-rw-r--r--kig/objects/conic_imp.h2
-rw-r--r--kig/objects/conic_types.cc104
-rw-r--r--kig/objects/conic_types.h22
-rw-r--r--kig/objects/cubic_imp.cc28
-rw-r--r--kig/objects/cubic_imp.h2
-rw-r--r--kig/objects/cubic_type.cc12
-rw-r--r--kig/objects/cubic_type.h6
-rw-r--r--kig/objects/intersection_types.cc70
-rw-r--r--kig/objects/intersection_types.h12
-rw-r--r--kig/objects/line_imp.cc10
-rw-r--r--kig/objects/line_imp.h6
-rw-r--r--kig/objects/line_type.cc12
-rw-r--r--kig/objects/locus_imp.cc2
-rw-r--r--kig/objects/locus_imp.h8
-rw-r--r--kig/objects/object_calcer.cc78
-rw-r--r--kig/objects/object_calcer.h66
-rw-r--r--kig/objects/object_drawer.cc22
-rw-r--r--kig/objects/object_drawer.h6
-rw-r--r--kig/objects/object_factory.cc98
-rw-r--r--kig/objects/object_factory.h18
-rw-r--r--kig/objects/object_holder.cc8
-rw-r--r--kig/objects/object_holder.h4
-rw-r--r--kig/objects/object_imp.cc6
-rw-r--r--kig/objects/object_imp.h12
-rw-r--r--kig/objects/object_imp_factory.cc138
-rw-r--r--kig/objects/object_imp_factory.h8
-rw-r--r--kig/objects/object_type.cc8
-rw-r--r--kig/objects/object_type.h18
-rw-r--r--kig/objects/object_type_factory.cc4
-rw-r--r--kig/objects/object_type_factory.h2
-rw-r--r--kig/objects/other_imp.cc8
-rw-r--r--kig/objects/other_imp.h6
-rw-r--r--kig/objects/other_type.cc20
-rw-r--r--kig/objects/other_type.h8
-rw-r--r--kig/objects/point_imp.cc6
-rw-r--r--kig/objects/point_imp.h2
-rw-r--r--kig/objects/point_type.cc106
-rw-r--r--kig/objects/point_type.h20
-rw-r--r--kig/objects/polygon_imp.cc4
-rw-r--r--kig/objects/polygon_imp.h2
-rw-r--r--kig/objects/polygon_type.cc184
-rw-r--r--kig/objects/polygon_type.h22
-rw-r--r--kig/objects/special_calcers.cc4
-rw-r--r--kig/objects/special_calcers.h2
-rw-r--r--kig/objects/tests_type.cc66
-rw-r--r--kig/objects/tests_type.h16
-rw-r--r--kig/objects/text_imp.cc4
-rw-r--r--kig/objects/text_imp.h4
-rw-r--r--kig/objects/text_type.cc32
-rw-r--r--kig/objects/text_type.h6
58 files changed, 726 insertions, 726 deletions
diff --git a/kig/objects/angle_type.cc b/kig/objects/angle_type.cc
index 7b86411b..b0dc09c1 100644
--- a/kig/objects/angle_type.cc
+++ b/kig/objects/angle_type.cc
@@ -65,14 +65,14 @@ const AngleType* AngleType::instance()
return &t;
}
-ObjectImp* AngleType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* AngleType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( uint i = 0; i < parents.size(); ++i )
+ for ( uint i = 0; i < tqparents.size(); ++i )
points.push_back(
- static_cast<const PointImp*>( parents[i] )->coordinate() );
+ static_cast<const PointImp*>( tqparents[i] )->coordinate() );
Coordinate lvect = points[0] - points[1];
Coordinate rvect;
@@ -112,13 +112,13 @@ void AngleType::executeAction(
// pretend to use this var..
(void) i;
- std::vector<ObjectCalcer*> parents = t.parents();
+ std::vector<ObjectCalcer*> tqparents = t.tqparents();
- assert( margsparser.checkArgs( parents ) );
+ assert( margsparser.checkArgs( tqparents ) );
- Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- Coordinate b = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
- Coordinate c = static_cast<const PointImp*>( parents[2]->imp() )->coordinate();
+ Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
+ Coordinate c = static_cast<const PointImp*>( tqparents[2]->imp() )->coordinate();
Coordinate lvect = a - b;
Coordinate rvect = c - b;
@@ -142,8 +142,8 @@ void AngleType::executeAction(
Coordinate cdir( cos( newcangle ), sin( newcangle ) );
Coordinate nc = b + cdir.normalize( rvect.length() );
- MonitorDataObjects mon( getAllParents( parents ) );
- parents[2]->move( nc, d.document() );
+ MonitorDataObjects mon( getAllParents( tqparents ) );
+ tqparents[2]->move( nc, d.document() );
KigCommand* kc = new KigCommand( d, i18n( "Resize Angle" ) );
mon.finish( kc );
d.history()->addCommand( kc );
@@ -166,14 +166,14 @@ const HalfAngleType* HalfAngleType::instance()
return &t;
}
-ObjectImp* HalfAngleType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* HalfAngleType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( uint i = 0; i < parents.size(); ++i )
+ for ( uint i = 0; i < tqparents.size(); ++i )
points.push_back(
- static_cast<const PointImp*>( parents[i] )->coordinate() );
+ static_cast<const PointImp*>( tqparents[i] )->coordinate() );
Coordinate lvect = points[0] - points[1];
Coordinate rvect;
diff --git a/kig/objects/arc_type.h b/kig/objects/arc_type.h
index cdfe0294..cb0a4c5f 100644
--- a/kig/objects/arc_type.h
+++ b/kig/objects/arc_type.h
@@ -35,7 +35,7 @@ public:
ObjectImp* calc( const Args& args, const KigDocument& ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
bool inherits( int type ) const;
const ObjectImpType* resultId() const;
@@ -55,7 +55,7 @@ public:
ObjectImp* calc( const Args& args, const KigDocument& ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
bool inherits( int type ) const;
const ObjectImpType* resultId() const;
diff --git a/kig/objects/base_type.cc b/kig/objects/base_type.cc
index 0f8eecec..77b9dc6a 100644
--- a/kig/objects/base_type.cc
+++ b/kig/objects/base_type.cc
@@ -33,13 +33,13 @@ ObjectABType::~ObjectABType()
{
}
-ObjectImp* ObjectABType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ObjectABType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) )
+ if ( ! margsparser.checkArgs( tqparents ) )
return new InvalidImp;
- Coordinate a = static_cast<const PointImp*>( parents[0] )->coordinate();
- Coordinate b = static_cast<const PointImp*>( parents[1] )->coordinate();
+ Coordinate a = static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ Coordinate b = static_cast<const PointImp*>( tqparents[1] )->coordinate();
return calc( a, b );
}
@@ -57,22 +57,22 @@ bool ObjectABType::canMove( const ObjectTypeCalcer& o ) const
bool ObjectABType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- return parents[0]->isFreelyTranslatable() && parents[1]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ return tqparents[0]->isFreelyTranslatable() && tqparents[1]->isFreelyTranslatable();
}
void ObjectABType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- assert( margsparser.checkArgs( parents ) );
- const Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- const Coordinate b = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
+ const Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ const Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
const Coordinate dist = b - a;
- if ( parents[0]->canMove() )
- parents[0]->move( to, d );
- if ( parents[1]->canMove() )
- parents[1]->move( to + dist, d );
+ if ( tqparents[0]->canMove() )
+ tqparents[0]->move( to, d );
+ if ( tqparents[1]->canMove() )
+ tqparents[1]->move( to + dist, d );
}
ObjectLPType::ObjectLPType( const char* fullname, const ArgsParser::spec* spec, int n )
@@ -94,19 +94,19 @@ ObjectImp* ObjectLPType::calc( const Args& args, const KigDocument& ) const
const Coordinate ObjectABType::moveReferencePoint( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- assert( margsparser.checkArgs( parents ) );
- return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
+ return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> ObjectABType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> parents = ourobj.parents();
+ std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = parents[1]->movableParents();
+ tmp = tqparents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( parents.begin(), parents.end() );
+ ret.insert( tqparents.begin(), tqparents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
diff --git a/kig/objects/bogus_imp.cc b/kig/objects/bogus_imp.cc
index b7b8f41e..6e688b1b 100644
--- a/kig/objects/bogus_imp.cc
+++ b/kig/objects/bogus_imp.cc
@@ -32,7 +32,7 @@ void BogusImp::draw( KigPainter& ) const
{
}
-bool BogusImp::contains( const Coordinate&, int, const KigWidget& ) const
+bool BogusImp::tqcontains( const Coordinate&, int, const KigWidget& ) const
{
return false;
}
@@ -88,22 +88,22 @@ InvalidImp::InvalidImp()
void InvalidImp::fillInNextEscape( TQString& s, const KigDocument& ) const
{
- s = s.arg( "[invalid]" );
+ s = s.tqarg( "[invalid]" );
}
void DoubleImp::fillInNextEscape( TQString& s, const KigDocument& ) const
{
- s = s.arg( mdata );
+ s = s.tqarg( mdata );
}
void IntImp::fillInNextEscape( TQString& s, const KigDocument& ) const
{
- s = s.arg( mdata );
+ s = s.tqarg( mdata );
}
void StringImp::fillInNextEscape( TQString& s, const KigDocument& ) const
{
- s = s.arg( mdata );
+ s = s.tqarg( mdata );
}
HierarchyImp::HierarchyImp( const ObjectHierarchy& h )
diff --git a/kig/objects/bogus_imp.h b/kig/objects/bogus_imp.h
index c8f3ee2b..3ab32809 100644
--- a/kig/objects/bogus_imp.h
+++ b/kig/objects/bogus_imp.h
@@ -46,7 +46,7 @@ public:
Coordinate attachPoint( ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& w ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& w ) const;
bool inRect( const Rect& r, int width, const KigWidget& w ) const;
Rect surroundingRect() const;
diff --git a/kig/objects/circle_imp.cc b/kig/objects/circle_imp.cc
index 38522c22..059ff592 100644
--- a/kig/objects/circle_imp.cc
+++ b/kig/objects/circle_imp.cc
@@ -63,7 +63,7 @@ void CircleImp::draw( KigPainter& p ) const
p.drawCircle( mcenter, mradius );
}
-bool CircleImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool CircleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return fabs((mcenter - p).length() - mradius) <= w.screenInfo().normalMiss( width );
}
@@ -72,10 +72,10 @@ bool CircleImp::inRect( const Rect& r, int width, const KigWidget& w ) const
{
// first we check if the rect contains at least one of the
// north/south/east/west points of the circle
- if ( r.contains( mcenter + Coordinate( 0, -mradius ) ) ) return true;
- if ( r.contains( mcenter + Coordinate( mradius, 0 ) ) ) return true;
- if ( r.contains( mcenter + Coordinate( 0, mradius ) ) ) return true;
- if ( r.contains( mcenter + Coordinate( -mradius, 0 ) ) ) return true;
+ if ( r.tqcontains( mcenter + Coordinate( 0, -mradius ) ) ) return true;
+ if ( r.tqcontains( mcenter + Coordinate( mradius, 0 ) ) ) return true;
+ if ( r.tqcontains( mcenter + Coordinate( 0, mradius ) ) ) return true;
+ if ( r.tqcontains( mcenter + Coordinate( -mradius, 0 ) ) ) return true;
// we allow a miss of some pixels ..
double miss = w.screenInfo().normalMiss( width );
@@ -235,8 +235,8 @@ TQString CircleImp::polarEquationString( const KigDocument& w ) const
{
TQString ret = i18n( "rho = %1 [centered at %2]" );
ConicPolarData data = polarData();
- ret = ret.arg( data.pdimen, 0, 'g', 3 );
- ret = ret.arg( w.coordinateSystem().fromScreen( data.focus1, w ) );
+ ret = ret.tqarg( data.pdimen, 0, 'g', 3 );
+ ret = ret.tqarg( w.coordinateSystem().fromScreen( data.focus1, w ) );
return ret;
}
@@ -244,18 +244,18 @@ TQString CircleImp::cartesianEquationString( const KigDocument& ) const
{
TQString ret = i18n( "x² + y² + %1 x + %2 y + %3 = 0" );
ConicCartesianData data = cartesianData();
- ret = ret.arg( data.coeffs[3], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[4], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[5], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[3], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[4], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[5], 0, 'g', 3 );
return ret;
}
TQString CircleImp::simplyCartesianEquationString( const KigDocument& ) const
{
TQString ret = i18n( "( x - %1 )² + ( y - %2 )² = %3" );
- ret = ret.arg( mcenter.x, 0, 'g', 3 );
- ret = ret.arg( mcenter.y, 0, 'g', 3 );
- ret = ret.arg( mradius * mradius, 0, 'g', 3 );
+ ret = ret.tqarg( mcenter.x, 0, 'g', 3 );
+ ret = ret.tqarg( mcenter.y, 0, 'g', 3 );
+ ret = ret.tqarg( mradius * mradius, 0, 'g', 3 );
return ret;
}
diff --git a/kig/objects/circle_imp.h b/kig/objects/circle_imp.h
index 1ccede6a..98fa391d 100644
--- a/kig/objects/circle_imp.h
+++ b/kig/objects/circle_imp.h
@@ -46,7 +46,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
bool valid() const;
Rect surroundingRect() const;
diff --git a/kig/objects/conic_imp.cc b/kig/objects/conic_imp.cc
index 81331522..11e01c28 100644
--- a/kig/objects/conic_imp.cc
+++ b/kig/objects/conic_imp.cc
@@ -47,7 +47,7 @@ bool ConicImp::valid() const
return true;
}
-bool ConicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const
+bool ConicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const
{
return internalContainsPoint( o, w.screenInfo().normalMiss( width ) );
}
@@ -204,12 +204,12 @@ TQString ConicImp::cartesianEquationString( const KigDocument& ) const
{
TQString ret = i18n( "%1 x² + %2 y² + %3 xy + %4 x + %5 y + %6 = 0" );
ConicCartesianData data = cartesianData();
- ret = ret.arg( data.coeffs[0], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[1], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[2], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[3], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[4], 0, 'g', 3 );
- ret = ret.arg( data.coeffs[5], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[0], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[1], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[2], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[3], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[4], 0, 'g', 3 );
+ ret = ret.tqarg( data.coeffs[5], 0, 'g', 3 );
return ret;
}
@@ -218,11 +218,11 @@ TQString ConicImp::polarEquationString( const KigDocument& w ) const
TQString ret = i18n( "rho = %1/(1 + %2 cos theta + %3 sin theta)\n [centered at %4]" );
const ConicPolarData data = polarData();
- ret = ret.arg( data.pdimen, 0, 'g', 3 );
- ret = ret.arg( -data.ecostheta0, 0, 'g', 3 );
- ret = ret.arg( -data.esintheta0, 0, 'g', 3 );
+ ret = ret.tqarg( data.pdimen, 0, 'g', 3 );
+ ret = ret.tqarg( -data.ecostheta0, 0, 'g', 3 );
+ ret = ret.tqarg( -data.esintheta0, 0, 'g', 3 );
- ret = ret.arg( w.coordinateSystem().fromScreen( data.focus1, w ) );
+ ret = ret.tqarg( w.coordinateSystem().fromScreen( data.focus1, w ) );
return ret;
}
diff --git a/kig/objects/conic_imp.h b/kig/objects/conic_imp.h
index 29068a7b..d1cfa3f9 100644
--- a/kig/objects/conic_imp.h
+++ b/kig/objects/conic_imp.h
@@ -51,7 +51,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
bool valid() const;
Rect surroundingRect() const;
diff --git a/kig/objects/conic_types.cc b/kig/objects/conic_types.cc
index 34396369..58209011 100644
--- a/kig/objects/conic_types.cc
+++ b/kig/objects/conic_types.cc
@@ -57,12 +57,12 @@ ConicB5PType::~ConicB5PType()
{
}
-ObjectImp* ConicB5PType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicB5PType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
points.push_back( static_cast<const PointImp*>( *i )->coordinate() );
ConicCartesianData d =
@@ -105,23 +105,23 @@ const ConicBAAPType* ConicBAAPType::instance()
return &t;
}
-ObjectImp* ConicBAAPType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicBAAPType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) )
+ if ( ! margsparser.checkArgs( tqparents ) )
return new InvalidImp;
- const LineData la = static_cast<const AbstractLineImp*>( parents[0] )->data();
- const LineData lb = static_cast<const AbstractLineImp*>( parents[1] )->data();
- const Coordinate c = static_cast<const PointImp*>( parents[2] )->coordinate();
+ const LineData la = static_cast<const AbstractLineImp*>( tqparents[0] )->data();
+ const LineData lb = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ const Coordinate c = static_cast<const PointImp*>( tqparents[2] )->coordinate();
return new ConicImpCart( calcConicByAsymptotes( la, lb, c ) );
}
-ObjectImp* ConicBFFPType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicBFFPType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> cs;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
cs.push_back( static_cast<const PointImp*>( *i )->coordinate() );
return new ConicImpPolar( calcConicBFFP( cs, type() ) );
@@ -233,17 +233,17 @@ ConicBDFPType::~ConicBDFPType()
{
}
-ObjectImp* ConicBDFPType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicBDFPType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
- const LineData line = static_cast<const AbstractLineImp*>( parents[0] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( tqparents[0] )->data();
const Coordinate focus =
- static_cast<const PointImp*>( parents[1] )->coordinate();
+ static_cast<const PointImp*>( tqparents[1] )->coordinate();
Coordinate point;
- if ( parents.size() == 3 )
- point = static_cast<const PointImp*>( parents[2] )->coordinate();
+ if ( tqparents.size() == 3 )
+ point = static_cast<const PointImp*>( tqparents[2] )->coordinate();
else
{
/* !!!! costruisci point come punto medio dell'altezza tra fuoco e d. */
@@ -286,12 +286,12 @@ const ParabolaBTPType* ParabolaBTPType::instance()
return &t;
}
-ObjectImp* ParabolaBTPType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ParabolaBTPType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
points.push_back( static_cast<const PointImp*>( *i )->coordinate() );
ConicCartesianData d =
@@ -327,12 +327,12 @@ const ConicPolarPointType* ConicPolarPointType::instance()
return &t;
}
-ObjectImp* ConicPolarPointType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicPolarPointType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const ConicCartesianData c = static_cast<const ConicImp*>( parents[0] )->cartesianData();
- const LineData l = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ const ConicCartesianData c = static_cast<const ConicImp*>( tqparents[0] )->cartesianData();
+ const LineData l = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
const Coordinate p = calcConicPolarPoint( c, l );
if ( p.valid() ) return new PointImp( p );
else return new InvalidImp;
@@ -363,12 +363,12 @@ const ConicPolarLineType* ConicPolarLineType::instance()
return &t;
}
-ObjectImp* ConicPolarLineType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicPolarLineType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const ConicCartesianData c = static_cast<const ConicImp*>( parents[0] )->cartesianData();
- const Coordinate p = static_cast<const PointImp*>( parents[1] )->coordinate();
+ const ConicCartesianData c = static_cast<const ConicImp*>( tqparents[0] )->cartesianData();
+ const Coordinate p = static_cast<const PointImp*>( tqparents[1] )->coordinate();
bool valid = true;
const LineData l = calcConicPolarLine( c, p, valid );
if ( valid ) return new LineImp( l );
@@ -398,12 +398,12 @@ const ConicDirectrixType* ConicDirectrixType::instance()
return &t;
}
-ObjectImp* ConicDirectrixType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicDirectrixType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
const ConicPolarData data =
- static_cast<const ConicImp*>( parents[0] )->polarData();
+ static_cast<const ConicImp*>( tqparents[0] )->polarData();
double ec = data.ecostheta0;
double es = data.esintheta0;
@@ -445,12 +445,12 @@ const EquilateralHyperbolaB4PType* EquilateralHyperbolaB4PType::instance()
return &t;
}
-ObjectImp* EquilateralHyperbolaB4PType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* EquilateralHyperbolaB4PType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> pts;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
pts.push_back( static_cast<const PointImp*>( *i )->coordinate() );
ConicCartesianData d = calcConicThroughPoints( pts, equilateral );
@@ -524,14 +524,14 @@ const ConicAsymptoteType* ConicAsymptoteType::instance()
return &t;
}
-ObjectImp* ConicAsymptoteType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicAsymptoteType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
bool valid = true;
const LineData ret = calcConicAsymptote(
- static_cast<const ConicImp*>( parents[0] )->cartesianData(),
- static_cast<const IntImp*>( parents[1] )->data(),
+ static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
+ static_cast<const IntImp*>( tqparents[1] )->data(),
valid );
if ( valid )
@@ -565,18 +565,18 @@ const ConicRadicalType* ConicRadicalType::instance()
return &t;
}
-ObjectImp* ConicRadicalType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicRadicalType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- if ( parents[0]->inherits( CircleImp::stype() ) &&
- parents[1]->inherits( CircleImp::stype() ) )
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( tqparents[0]->inherits( CircleImp::stype() ) &&
+ tqparents[1]->inherits( CircleImp::stype() ) )
{
- if( static_cast<const IntImp*>( parents[2] )->data() != 1 )
+ if( static_cast<const IntImp*>( tqparents[2] )->data() != 1 )
return new InvalidImp;
else
{
- const CircleImp* c1 = static_cast<const CircleImp*>( parents[0] );
- const CircleImp* c2 = static_cast<const CircleImp*>( parents[1] );
+ const CircleImp* c1 = static_cast<const CircleImp*>( tqparents[0] );
+ const CircleImp* c2 = static_cast<const CircleImp*>( tqparents[1] );
const Coordinate a = calcCircleRadicalStartPoint(
c1->center(), c2->center(), c1->squareRadius(), c2->squareRadius()
);
@@ -588,10 +588,10 @@ ObjectImp* ConicRadicalType::calc( const Args& parents, const KigDocument& ) con
{
bool valid = true;
const LineData l = calcConicRadical(
- static_cast<const ConicImp*>( parents[0] )->cartesianData(),
- static_cast<const ConicImp*>( parents[1] )->cartesianData(),
- static_cast<const IntImp*>( parents[2] )->data(),
- static_cast<const IntImp*>( parents[3] )->data(), valid );
+ static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
+ static_cast<const ConicImp*>( tqparents[1] )->cartesianData(),
+ static_cast<const IntImp*>( tqparents[2] )->data(),
+ static_cast<const IntImp*>( tqparents[3] )->data(), valid );
if ( valid )
return new LineImp( l );
else
@@ -674,9 +674,9 @@ void ConicRadicalType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& t,
KigPart& d, KigWidget&, NormalMode& ) const
{
assert( i == 0 );
- std::vector<ObjectCalcer*> parents = t.parents();
- assert( dynamic_cast<ObjectConstCalcer*>( parents[3] ) );
- ObjectConstCalcer* zeroindexo = static_cast<ObjectConstCalcer*>( parents[3] );
+ std::vector<ObjectCalcer*> tqparents = t.tqparents();
+ assert( dynamic_cast<ObjectConstCalcer*>( tqparents[3] ) );
+ ObjectConstCalcer* zeroindexo = static_cast<ObjectConstCalcer*>( tqparents[3] );
MonitorDataObjects mon( zeroindexo );
assert( zeroindexo->imp()->inherits( IntImp::stype() ) );
int oldzeroindex = static_cast<const IntImp*>( zeroindexo->imp() )->data();
diff --git a/kig/objects/conic_types.h b/kig/objects/conic_types.h
index 858ca057..e3c44c01 100644
--- a/kig/objects/conic_types.h
+++ b/kig/objects/conic_types.h
@@ -27,7 +27,7 @@ class ConicB5PType
~ConicB5PType();
public:
static const ConicB5PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class ConicBAAPType
~ConicBAAPType();
public:
static const ConicBAAPType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -49,7 +49,7 @@ protected:
ConicBFFPType( const char* fullname, const ArgsParser::spec*, int n );
~ConicBFFPType();
public:
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
/**
* -1 for hyperbola, 1 for ellipse..
@@ -85,7 +85,7 @@ class ConicBDFPType
~ConicBDFPType();
public:
static const ConicBDFPType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -96,7 +96,7 @@ class ParabolaBTPType
~ParabolaBTPType();
public:
static const ParabolaBTPType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -107,7 +107,7 @@ class EquilateralHyperbolaB4PType
~EquilateralHyperbolaB4PType();
public:
static const EquilateralHyperbolaB4PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -118,7 +118,7 @@ class ConicPolarPointType
~ConicPolarPointType();
public:
static const ConicPolarPointType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -129,7 +129,7 @@ class ConicPolarLineType
~ConicPolarLineType();
public:
static const ConicPolarLineType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -140,7 +140,7 @@ class ConicDirectrixType
~ConicDirectrixType();
public:
static const ConicDirectrixType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -162,7 +162,7 @@ class ConicAsymptoteType
~ConicAsymptoteType();
public:
static const ConicAsymptoteType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -173,7 +173,7 @@ class ConicRadicalType
~ConicRadicalType();
public:
static const ConicRadicalType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
TQStringList specialActions() const;
void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t,
diff --git a/kig/objects/cubic_imp.cc b/kig/objects/cubic_imp.cc
index 3879c5d9..f727f49a 100644
--- a/kig/objects/cubic_imp.cc
+++ b/kig/objects/cubic_imp.cc
@@ -50,7 +50,7 @@ void CubicImp::draw( KigPainter& p ) const
p.drawCurve( this );
}
-bool CubicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const
+bool CubicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const
{
return internalContainsPoint( o, w.screenInfo().normalMiss( width ) );
}
@@ -409,7 +409,7 @@ Rect CubicImp::surroundingRect() const
TQString CubicImp::cartesianEquationString( const KigDocument& ) const
{
/*
- * unfortunately QStrings.arg method is limited to %1, %9, so we cannot
+ * unfortunately TQStrings.arg method is limited to %1, %9, so we cannot
* treat all 10 arguments! Let's split the equation in two parts...
* Now this ends up also in the translation machinery, is this really
* necessary? Otherwise we could do a little bit of tidy up on the
@@ -417,21 +417,21 @@ TQString CubicImp::cartesianEquationString( const KigDocument& ) const
*/
TQString ret = i18n( "%6 x³ + %9 y³ + %7 x²y + %8 xy² + %5 y² + %3 x² + %4 xy + %1 x + %2 y" );
- ret = ret.arg( mdata.coeffs[1], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[2], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[3], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[4], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[5], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[6], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[7], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[8], 0, 'g', 3 );
- ret = ret.arg( mdata.coeffs[9], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[1], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[2], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[3], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[4], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[5], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[6], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[7], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[8], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[9], 0, 'g', 3 );
ret.append( i18n( " + %1 = 0" ) );
- ret = ret.arg( mdata.coeffs[0], 0, 'g', 3 );
+ ret = ret.tqarg( mdata.coeffs[0], 0, 'g', 3 );
// we should find a common place to do this...
- ret.replace( "+ -", "- " );
- ret.replace( "+-", "-" );
+ ret.tqreplace( "+ -", "- " );
+ ret.tqreplace( "+-", "-" );
return ret;
}
diff --git a/kig/objects/cubic_imp.h b/kig/objects/cubic_imp.h
index 5e9e6a2c..65dc25ad 100644
--- a/kig/objects/cubic_imp.h
+++ b/kig/objects/cubic_imp.h
@@ -40,7 +40,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
Rect surroundingRect() const;
TQString cartesianEquationString( const KigDocument& ) const;
diff --git a/kig/objects/cubic_type.cc b/kig/objects/cubic_type.cc
index c322b8c3..1878128a 100644
--- a/kig/objects/cubic_type.cc
+++ b/kig/objects/cubic_type.cc
@@ -112,12 +112,12 @@ const CubicNodeB6PType* CubicNodeB6PType::instance()
return &t;
}
-ObjectImp* CubicNodeB6PType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* CubicNodeB6PType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
points.push_back( static_cast<const PointImp*>( *i )->coordinate() );
CubicCartesianData d = calcCubicNodeThroughPoints( points );
@@ -156,12 +156,12 @@ const CubicCuspB4PType* CubicCuspB4PType::instance()
return &t;
}
-ObjectImp* CubicCuspB4PType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* CubicCuspB4PType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
points.push_back( static_cast<const PointImp*>( *i )->coordinate() );
CubicCartesianData d = calcCubicCuspThroughPoints( points );
diff --git a/kig/objects/cubic_type.h b/kig/objects/cubic_type.h
index 39be7387..439c7367 100644
--- a/kig/objects/cubic_type.h
+++ b/kig/objects/cubic_type.h
@@ -27,7 +27,7 @@ class CubicB9PType
~CubicB9PType();
public:
static const CubicB9PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class CubicNodeB6PType
~CubicNodeB6PType();
public:
static const CubicNodeB6PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -49,7 +49,7 @@ class CubicCuspB4PType
~CubicCuspB4PType();
public:
static const CubicCuspB4PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/intersection_types.cc b/kig/objects/intersection_types.cc
index 804d498d..92cbefff 100644
--- a/kig/objects/intersection_types.cc
+++ b/kig/objects/intersection_types.cc
@@ -55,19 +55,19 @@ const ConicLineIntersectionType* ConicLineIntersectionType::instance()
return &t;
}
-ObjectImp* ConicLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicLineIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( parents[2] )->data();
+ int side = static_cast<const IntImp*>( tqparents[2] )->data();
assert( side == 1 || side == -1 );
- const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
Coordinate ret;
- if ( parents[0]->inherits( CircleImp::stype() ) )
+ if ( tqparents[0]->inherits( CircleImp::stype() ) )
{
// easy case..
- const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
+ const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
ret = calcCircleLineIntersect(
c->center(), c->squareRadius(), line, side );
}
@@ -75,7 +75,7 @@ ObjectImp* ConicLineIntersectionType::calc( const Args& parents, const KigDocume
{
// harder case..
ret = calcConicLineIntersect(
- static_cast<const ConicImp*>( parents[0] )->cartesianData(),
+ static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
line, 0.0, side );
}
if ( ret.valid() ) return new PointImp( ret );
@@ -109,18 +109,18 @@ const ConicLineOtherIntersectionType* ConicLineOtherIntersectionType::instance()
return &t;
}
-ObjectImp* ConicLineOtherIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConicLineOtherIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- Coordinate p = static_cast<const PointImp*>( parents[2] )->coordinate();
- const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ Coordinate p = static_cast<const PointImp*>( tqparents[2] )->coordinate();
+ const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
Coordinate ret;
-// if ( parents[0]->inherits( CircleImp::stype() ) )
+// if ( tqparents[0]->inherits( CircleImp::stype() ) )
// {
// // easy case..
-// const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
+// const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
// ret = calcCircleLineIntersect(
// c->center(), c->squareRadius(), line, side, valid );
// }
@@ -133,7 +133,7 @@ ObjectImp* ConicLineOtherIntersectionType::calc( const Args& parents, const KigD
double bay = line.b.y - line.a.y;
double knownparam = (pax*bax + pay*bay)/(bax*bax + bay*bay);
ret = calcConicLineIntersect(
- static_cast<const ConicImp*>( parents[0] )->cartesianData(),
+ static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
line, knownparam, 0 );
// }
if ( ret.valid() ) return new PointImp( ret );
@@ -164,16 +164,16 @@ const LineLineIntersectionType* LineLineIntersectionType::instance()
return &t;
}
-ObjectImp* LineLineIntersectionType::calc( const Args& parents, const KigDocument& d ) const
+ObjectImp* LineLineIntersectionType::calc( const Args& tqparents, const KigDocument& d ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
Coordinate p =
calcIntersectionPoint(
- static_cast<const AbstractLineImp*>( parents[0] )->data(),
- static_cast<const AbstractLineImp*>( parents[1] )->data() );
- if ( static_cast<const AbstractLineImp*>( parents[0] )->containsPoint( p, d ) &&
- static_cast<const AbstractLineImp*>( parents[1] )->containsPoint( p, d ) )
+ static_cast<const AbstractLineImp*>( tqparents[0] )->data(),
+ static_cast<const AbstractLineImp*>( tqparents[1] )->data() );
+ if ( static_cast<const AbstractLineImp*>( tqparents[0] )->containsPoint( p, d ) &&
+ static_cast<const AbstractLineImp*>( tqparents[1] )->containsPoint( p, d ) )
return new PointImp( p );
else return new InvalidImp();
}
@@ -204,15 +204,15 @@ const LineCubicIntersectionType* LineCubicIntersectionType::instance()
return &t;
}
-ObjectImp* LineCubicIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* LineCubicIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- int which = static_cast<const IntImp*>( parents[2] )->data();
+ int which = static_cast<const IntImp*>( tqparents[2] )->data();
bool valid = true;
const Coordinate c = calcCubicLineIntersect(
- static_cast<const CubicImp*>( parents[0] )->data(),
- static_cast<const AbstractLineImp*>( parents[1] )->data(),
+ static_cast<const CubicImp*>( tqparents[0] )->data(),
+ static_cast<const AbstractLineImp*>( tqparents[1] )->data(),
which, valid );
if ( valid ) return new PointImp( c );
else return new InvalidImp;
@@ -265,14 +265,14 @@ const CircleCircleIntersectionType* CircleCircleIntersectionType::instance()
return &t;
}
-ObjectImp* CircleCircleIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* CircleCircleIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( parents[2] )->data();
+ int side = static_cast<const IntImp*>( tqparents[2] )->data();
assert( side == 1 || side == -1 );
- const CircleImp* c1 = static_cast<const CircleImp*>( parents[0] );
- const CircleImp* c2 = static_cast<const CircleImp*>( parents[1] );
+ const CircleImp* c1 = static_cast<const CircleImp*>( tqparents[0] );
+ const CircleImp* c2 = static_cast<const CircleImp*>( tqparents[1] );
const Coordinate o1 = c1->center();
const Coordinate o2 = c2->center();
const double r1sq = c1->squareRadius();
@@ -316,15 +316,15 @@ const ArcLineIntersectionType* ArcLineIntersectionType::instance()
return &t;
}
-ObjectImp* ArcLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ArcLineIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( parents[2] )->data();
+ int side = static_cast<const IntImp*>( tqparents[2] )->data();
assert( side == 1 || side == -1 );
- const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
- const ArcImp* c = static_cast<const ArcImp*>( parents[0] );
+ const ArcImp* c = static_cast<const ArcImp*>( tqparents[0] );
const double r = c->radius();
Coordinate ret = calcArcLineIntersect( c->center(), r*r, c->startAngle(),
c->angle(), line, side );
diff --git a/kig/objects/intersection_types.h b/kig/objects/intersection_types.h
index 9e1df62e..46d60199 100644
--- a/kig/objects/intersection_types.h
+++ b/kig/objects/intersection_types.h
@@ -36,7 +36,7 @@ class ConicLineIntersectionType
~ConicLineIntersectionType();
public:
static const ConicLineIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -51,7 +51,7 @@ class ConicLineOtherIntersectionType
~ConicLineOtherIntersectionType();
public:
static const ConicLineOtherIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -62,7 +62,7 @@ class LineLineIntersectionType
~LineLineIntersectionType();
public:
static const LineLineIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -73,7 +73,7 @@ class LineCubicIntersectionType
~LineCubicIntersectionType();
public:
static const LineCubicIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -84,7 +84,7 @@ class CircleCircleIntersectionType
~CircleCircleIntersectionType();
public:
static const CircleCircleIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -98,7 +98,7 @@ class ArcLineIntersectionType
~ArcLineIntersectionType();
public:
static const ArcLineIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/line_imp.cc b/kig/objects/line_imp.cc
index a49078a1..0cb8a985 100644
--- a/kig/objects/line_imp.cc
+++ b/kig/objects/line_imp.cc
@@ -186,8 +186,8 @@ const TQString AbstractLineImp::equationString() const
TQString::fromUtf8( r > 0 ? "+" : "-" ) +
TQString::fromUtf8( " %2" );
- ret = ret.arg( m, 0, 'g', 3 );
- ret = ret.arg( abs( r ), 0, 'g', 3 );
+ ret = ret.tqarg( m, 0, 'g', 3 );
+ ret = ret.tqarg( abs( r ), 0, 'g', 3 );
return ret;
}
@@ -197,7 +197,7 @@ void SegmentImp::draw( KigPainter& p ) const
p.drawSegment( mdata );
}
-bool SegmentImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool SegmentImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return internalContainsPoint( p, w.screenInfo().normalMiss( width ) );
}
@@ -207,7 +207,7 @@ void RayImp::draw( KigPainter& p ) const
p.drawRay( mdata );
}
-bool RayImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool RayImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return internalContainsPoint( p, w.screenInfo().normalMiss( width ) );
}
@@ -217,7 +217,7 @@ void LineImp::draw( KigPainter& p ) const
p.drawLine( mdata );
}
-bool LineImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool LineImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return internalContainsPoint( p, w.screenInfo().normalMiss( width ) );
}
diff --git a/kig/objects/line_imp.h b/kig/objects/line_imp.h
index b12c045d..c52d8afd 100644
--- a/kig/objects/line_imp.h
+++ b/kig/objects/line_imp.h
@@ -99,7 +99,7 @@ public:
SegmentImp( const LineData& d );
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& si ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const;
Rect surroundingRect() const;
ObjectImp* transform( const Transformation& ) const;
@@ -154,7 +154,7 @@ public:
RayImp( const LineData& d );
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& si ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const;
Rect surroundingRect() const;
ObjectImp* transform( const Transformation& ) const;
@@ -195,7 +195,7 @@ public:
*/
LineImp( const LineData& d );
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& si ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const;
Rect surroundingRect() const;
ObjectImp* transform( const Transformation& ) const;
diff --git a/kig/objects/line_type.cc b/kig/objects/line_type.cc
index a02cc80b..84deb46e 100644
--- a/kig/objects/line_type.cc
+++ b/kig/objects/line_type.cc
@@ -232,11 +232,11 @@ void SegmentABType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& c,
// pretend to use this var..
(void) i;
- std::vector<ObjectCalcer*> parents = c.parents();
- assert( margsparser.checkArgs( parents ) );
+ std::vector<ObjectCalcer*> tqparents = c.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
- Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- Coordinate b = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
+ Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
bool ok = true;
double length = getDoubleFromUser(
@@ -246,8 +246,8 @@ void SegmentABType::executeAction( int i, ObjectHolder&, ObjectTypeCalcer& c,
Coordinate nb = a + ( b - a ).normalize( length );
- MonitorDataObjects mon( getAllParents( parents ) );
- parents[1]->move( nb, d.document() );
+ MonitorDataObjects mon( getAllParents( tqparents ) );
+ tqparents[1]->move( nb, d.document() );
KigCommand* cd = new KigCommand( d, i18n( "Resize Segment" ) );
mon.finish( cd );
d.history()->addCommand( cd );
diff --git a/kig/objects/locus_imp.cc b/kig/objects/locus_imp.cc
index edbdc88b..3bf85a9e 100644
--- a/kig/objects/locus_imp.cc
+++ b/kig/objects/locus_imp.cc
@@ -49,7 +49,7 @@ void LocusImp::draw( KigPainter& p ) const
p.drawCurve( this );
}
-bool LocusImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool LocusImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return internalContainsPoint( p, w.screenInfo().normalMiss( width ), w.document() );
}
diff --git a/kig/objects/locus_imp.h b/kig/objects/locus_imp.h
index 568e0e7c..b2100634 100644
--- a/kig/objects/locus_imp.h
+++ b/kig/objects/locus_imp.h
@@ -24,7 +24,7 @@
/**
* LocusImp is an imp that consists of a copy of the curveimp that the
* moving point moves over, and an ObjectHierarchy that can calc (
- * given a point, and optionally some more parent objects the position
+ * given a point, and optionally some more tqparent objects the position
* of the moving point. The hierarchy should take the moving point as
* its *first* argument and all others after that. The others are
* used to make it possible for Locus to be updated when some of the
@@ -33,9 +33,9 @@
*
* This may seem rather complicated, but I think it is absolutely
* necessary to support locuses using Kig's object system. It would
- * be very bad for LocusImp to have to keep references to its parents
+ * be very bad for LocusImp to have to keep references to its tqparents
* as Objects ( since only the objects know how they are related to
- * their parents ). This is how we used to do it, but the current
+ * their tqparents ). This is how we used to do it, but the current
* method is far superior. First and foremost because the separation
* between ObjectImp and Object is something that Kig depends on very
* much, and because every ObjectImp should contain all the data it
@@ -66,7 +66,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
Rect surroundingRect() const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
double getParam( const Coordinate& point, const KigDocument& ) const;
diff --git a/kig/objects/object_calcer.cc b/kig/objects/object_calcer.cc
index 40545ed1..ae442aae 100644
--- a/kig/objects/object_calcer.cc
+++ b/kig/objects/object_calcer.cc
@@ -29,8 +29,8 @@
void ObjectTypeCalcer::calc( const KigDocument& doc )
{
Args a;
- a.reserve( mparents.size() );
- std::transform( mparents.begin(), mparents.end(),
+ a.reserve( mtqparents.size() );
+ std::transform( mtqparents.begin(), mtqparents.end(),
std::back_inserter( a ), std::mem_fun( &ObjectCalcer::imp ) );
ObjectImp* n = mtype->calc( a, doc );
delete mimp;
@@ -38,10 +38,10 @@ void ObjectTypeCalcer::calc( const KigDocument& doc )
}
ObjectTypeCalcer::ObjectTypeCalcer( const ObjectType* type,
- const std::vector<ObjectCalcer*>& parents, bool sort )
- : mparents( ( sort )?type->sortArgs( parents ):parents ), mtype( type ), mimp( 0 )
+ const std::vector<ObjectCalcer*>& tqparents, bool sort )
+ : mtqparents( ( sort )?type->sortArgs( tqparents ):tqparents ), mtype( type ), mimp( 0 )
{
- std::for_each( mparents.begin(), mparents.end(),
+ std::for_each( mtqparents.begin(), mtqparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::addChild ), this ) );
}
@@ -68,9 +68,9 @@ void ObjectConstCalcer::calc( const KigDocument& )
{
}
-std::vector<ObjectCalcer*> ObjectConstCalcer::parents() const
+std::vector<ObjectCalcer*> ObjectConstCalcer::tqparents() const
{
- // we have no parents..
+ // we have no tqparents..
return std::vector<ObjectCalcer*>();
}
@@ -99,29 +99,29 @@ const ObjectImp* ObjectTypeCalcer::imp() const
return mimp;
}
-std::vector<ObjectCalcer*> ObjectTypeCalcer::parents() const
+std::vector<ObjectCalcer*> ObjectTypeCalcer::tqparents() const
{
- return mparents;
+ return mtqparents;
}
void ObjectCalcer::addChild( ObjectCalcer* c )
{
- mchildren.push_back( c );
+ mtqchildren.push_back( c );
ref();
}
void ObjectCalcer::delChild( ObjectCalcer* c )
{
- std::vector<ObjectCalcer*>::iterator i = std::find( mchildren.begin(), mchildren.end(), c );
- assert( i != mchildren.end() );
+ std::vector<ObjectCalcer*>::iterator i = std::find( mtqchildren.begin(), mtqchildren.end(), c );
+ assert( i != mtqchildren.end() );
- mchildren.erase( i );
+ mtqchildren.erase( i );
deref();
}
ObjectTypeCalcer::~ObjectTypeCalcer()
{
- std::for_each( mparents.begin(), mparents.end(),
+ std::for_each( mtqparents.begin(), mtqparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) );
delete mimp;
}
@@ -131,21 +131,21 @@ const ObjectType* ObjectTypeCalcer::type() const
return mtype;
}
-ObjectPropertyCalcer::ObjectPropertyCalcer( ObjectCalcer* parent, int propid )
- : mimp( 0 ), mparent( parent ), mpropid( propid )
+ObjectPropertyCalcer::ObjectPropertyCalcer( ObjectCalcer* tqparent, int propid )
+ : mimp( 0 ), mtqparent( tqparent ), mpropid( propid )
{
// Some weird C++ thing prevents me from calling protected members
- // of ObjectCalcer on mparent.. This is an ugly workaround..
- ( mparent->*&ObjectCalcer::addChild )( this );
- //mparent->addChild( this );
+ // of ObjectCalcer on mtqparent.. This is an ugly workaround..
+ ( mtqparent->*&ObjectCalcer::addChild )( this );
+ //mtqparent->addChild( this );
}
ObjectPropertyCalcer::~ObjectPropertyCalcer()
{
// Some weird C++ thing prevents me from calling protected members
- // of ObjectCalcer on mparent.. This is an ugly workaround..
- ( mparent->*&ObjectCalcer::delChild )( this );
- //mparent->delChild( this );
+ // of ObjectCalcer on mtqparent.. This is an ugly workaround..
+ ( mtqparent->*&ObjectCalcer::delChild )( this );
+ //mtqparent->delChild( this );
delete mimp;
}
@@ -154,16 +154,16 @@ const ObjectImp* ObjectPropertyCalcer::imp() const
return mimp;
}
-std::vector<ObjectCalcer*> ObjectPropertyCalcer::parents() const
+std::vector<ObjectCalcer*> ObjectPropertyCalcer::tqparents() const
{
std::vector<ObjectCalcer*> ret;
- ret.push_back( mparent );
+ ret.push_back( mtqparent );
return ret;
}
void ObjectPropertyCalcer::calc( const KigDocument& doc )
{
- ObjectImp* n = mparent->imp()->property( mpropid, doc );
+ ObjectImp* n = mtqparent->imp()->property( mpropid, doc );
delete mimp;
mimp = n;
}
@@ -175,15 +175,15 @@ ObjectImp* ObjectConstCalcer::switchImp( ObjectImp* newimp )
return ret;
}
-std::vector<ObjectCalcer*> ObjectCalcer::children() const
+std::vector<ObjectCalcer*> ObjectCalcer::tqchildren() const
{
- return mchildren;
+ return mtqchildren;
}
const ObjectImpType* ObjectPropertyCalcer::impRequirement(
ObjectCalcer*, const std::vector<ObjectCalcer*>& ) const
{
- return mparent->imp()->impRequirementForProperty( mpropid );
+ return mtqparent->imp()->impRequirementForProperty( mpropid );
}
const ObjectImpType* ObjectConstCalcer::impRequirement(
@@ -197,12 +197,12 @@ const ObjectImpType* ObjectTypeCalcer::impRequirement(
ObjectCalcer* o, const std::vector<ObjectCalcer*>& os ) const
{
Args args;
- args.reserve( mparents.size() );
+ args.reserve( mtqparents.size() );
std::transform(
os.begin(), os.end(),
std::back_inserter( args ),
std::mem_fun( &ObjectCalcer::imp ) );
- assert( std::find( args.begin(), args.end(), o->imp() ) != args.end() );
+ assert( std::tqfind( args.begin(), args.end(), o->imp() ) != args.end() );
return mtype->impRequirement( o->imp(), args );
}
@@ -220,9 +220,9 @@ void ObjectTypeCalcer::setParents( const std::vector<ObjectCalcer*> np )
{
std::for_each( np.begin(), np.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::addChild ), this ) );
- std::for_each( mparents.begin(), mparents.end(),
+ std::for_each( mtqparents.begin(), mtqparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) );
- mparents = np;
+ mtqparents = np;
}
void ObjectTypeCalcer::setType( const ObjectType* t )
@@ -270,15 +270,15 @@ void ObjectTypeCalcer::move( const Coordinate& to, const KigDocument& doc )
{
// we need to check if type can in fact move, because this check is
// not done for us in all circumstances ( e.g. LineABType::move uses
- // move on its parents to move them ), and the ObjectType's depend
+ // move on its tqparents to move them ), and the ObjectType's depend
// on move only being called if canMove() returns true..
if ( mtype->canMove( *this ) )
mtype->move( *this, to, doc );
}
-ObjectCalcer* ObjectPropertyCalcer::parent() const
+ObjectCalcer* ObjectPropertyCalcer::tqparent() const
{
- return mparent;
+ return mtqparent;
}
ObjectCalcer::ObjectCalcer()
@@ -303,16 +303,16 @@ bool ObjectConstCalcer::isDefinedOnOrThrough( const ObjectCalcer* ) const
bool ObjectPropertyCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const
{
- return o == mparent &&
- mparent->imp()->isPropertyDefinedOnOrThroughThisImp( propId() );
+ return o == mtqparent &&
+ mtqparent->imp()->isPropertyDefinedOnOrThroughThisImp( propId() );
}
bool ObjectTypeCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const
{
Args args;
- args.reserve( mparents.size() );
+ args.reserve( mtqparents.size() );
std::transform(
- mparents.begin(), mparents.end(),
+ mtqparents.begin(), mtqparents.end(),
std::back_inserter( args ),
std::mem_fun( &ObjectCalcer::imp ) );
if ( std::find( args.begin(), args.end(), o->imp() ) == args.end() )
diff --git a/kig/objects/object_calcer.h b/kig/objects/object_calcer.h
index 6df94fe8..1aa83db4 100644
--- a/kig/objects/object_calcer.h
+++ b/kig/objects/object_calcer.h
@@ -33,12 +33,12 @@ void intrusive_ptr_release( ObjectCalcer* p );
* be calculated from the two PointImp's it has to go through; every
* time either of them moves, this calculation is redone. In this
* case, there would be an ObjectCalcer that keeps a reference to its
- * two parents ( the ObjectCalcer's representing the points ), and
+ * two tqparents ( the ObjectCalcer's representing the points ), and
* that will calculate its ObjectImp value every time it is asked to
- * do so ( i.e. every time one of its parents moves.. ).
+ * do so ( i.e. every time one of its tqparents moves.. ).
*
* Each ObjectHolder keeps its ObjectImp itself, and recalculates it
- * from its parents in its calc() method ( if necessary ).
+ * from its tqparents in its calc() method ( if necessary ).
*
* Because of the complex relations that ObjectCalcer's hold to other
* ObjectCalcer's and to other classes, they have been made
@@ -46,12 +46,12 @@ void intrusive_ptr_release( ObjectCalcer* p );
* how much times a pointer to them is held. If this count reaches 0,
* this means that nobody needs them anymore, and they delete
* themselves. E.g. an ObjectCalcer always keeps a reference to its
- * parents, to ensure that those aren't deleted before it is deleted.
+ * tqparents, to ensure that those aren't deleted before it is deleted.
*
* At runtime, there will be an entire graph of ObjectCalcer that
- * depend on their parents.. At the bottom, there are Calcer's that
+ * depend on their tqparents.. At the bottom, there are Calcer's that
* the user is aware of, and that are held by ObjectHolder's. At the
- * top, there are Calcer's without parents that serve only to hold
+ * top, there are Calcer's without tqparents that serve only to hold
* some data. Those are most likely ObjectConstCalcer's. There are
* some algorithms to work with the dependency graph in various ways
* in ../misc/calcpath.h
@@ -67,7 +67,7 @@ class ObjectCalcer
protected:
/**
* ObjectCalcer's are reference counted.. They all take a reference
- * to their parents, and some other classes like ObjectHolder take a
+ * to their tqparents, and some other classes like ObjectHolder take a
* reference to some ObjectCalcer's that they don't want to see
* deleted..
*/
@@ -77,10 +77,10 @@ protected:
void ref();
void deref();
- // we keep track of our children, so algorithms can easily walk over
+ // we keep track of our tqchildren, so algorithms can easily walk over
// the dependency graph..
- std::vector<ObjectCalcer*> mchildren;
+ std::vector<ObjectCalcer*> mtqchildren;
ObjectCalcer();
public:
@@ -90,7 +90,7 @@ public:
*/
void addChild( ObjectCalcer* c );
/**
- * a calcer should call this in its destructor, to inform its parent
+ * a calcer should call this in its destructor, to inform its tqparent
* that it is no longer a child of this calcer. This will release
* the reference taken in addChild..
*/
@@ -102,29 +102,29 @@ public:
/**
* Returns the child ObjectCalcer's of this ObjectCalcer.
*/
- std::vector<ObjectCalcer*> children() const;
+ std::vector<ObjectCalcer*> tqchildren() const;
virtual ~ObjectCalcer();
/**
- * Returns the parent ObjectCalcer's of this ObjectCalcer.
+ * Returns the tqparent ObjectCalcer's of this ObjectCalcer.
*/
- virtual std::vector<ObjectCalcer*> parents() const = 0;
+ virtual std::vector<ObjectCalcer*> tqparents() const = 0;
/**
* Returns the ObjectImp of this ObjectCalcer.
*/
virtual const ObjectImp* imp() const = 0;
/**
* Makes the ObjectCalcer recalculate its ObjectImp from its
- * parents.
+ * tqparents.
*/
virtual void calc( const KigDocument& ) = 0;
/**
- * An ObjectCalcer expects its parents to have an ObjectImp of a
+ * An ObjectCalcer expects its tqparents to have an ObjectImp of a
* certain type. This method returns the ObjectImpType that \p o
- * should have. \p os is a list of all the parents in order, and
+ * should have. \p os is a list of all the tqparents in order, and
* \p o is part of it. This method will return the ObjectImpType
- * that the parent should *at least* be. For example, a Translated
+ * that the tqparent should *at least* be. For example, a Translated
* object can translate any sort of object, so it will return
* ObjectImp::stype() here ( the topmost ObjectImpType, that all
* other ObjectImpType's inherit ).
@@ -144,7 +144,7 @@ public:
virtual bool isFreelyTranslatable() const;
/**
* Moving an object most of the time signifies invoking changes in
- * some of its parents. This method returns the set of parents that
+ * some of its tqparents. This method returns the set of tqparents that
* will be changed in the move() method. The object itself should
* not be included.
*/
@@ -182,30 +182,30 @@ public:
class ObjectTypeCalcer
: public ObjectCalcer
{
- std::vector<ObjectCalcer*> mparents;
+ std::vector<ObjectCalcer*> mtqparents;
const ObjectType* mtype;
ObjectImp* mimp;
public:
typedef myboost::intrusive_ptr<ObjectTypeCalcer> shared_ptr;
/**
- * Construct a new ObjectTypeCalcer with a given type and parents.
+ * Construct a new ObjectTypeCalcer with a given type and tqparents.
*/
-// ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& parents );
+// ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& tqparents );
/**
* the sort boolean tells whether the sortArgs method should be invoked or not;
* if not present
*/
- ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& parents, bool sort=true );
+ ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& tqparents, bool sort=true );
~ObjectTypeCalcer();
const ObjectImp* imp() const;
- std::vector<ObjectCalcer*> parents() const;
+ std::vector<ObjectCalcer*> tqparents() const;
void calc( const KigDocument& doc );
/**
- * Set the parents of this ObjectTypeCalcer to np. This object will
- * release the reference it had to its old parents, and take a new
- * one on the new parents.
+ * Set the tqparents of this ObjectTypeCalcer to np. This object will
+ * release the reference it had to its old tqparents, and take a new
+ * one on the new tqparents.
*/
void setParents( const std::vector<ObjectCalcer*> np );
void setType( const ObjectType* t );
@@ -248,7 +248,7 @@ public:
const ObjectImp* imp() const;
void calc( const KigDocument& doc );
- std::vector<ObjectCalcer*> parents() const;
+ std::vector<ObjectCalcer*> tqparents() const;
/**
* Set the ObjectImp of this ObjectConstCalcer to the given
@@ -267,7 +267,7 @@ public:
};
/**
- * This is an ObjectCalcer that has a single parent, and gets a
+ * This is an ObjectCalcer that has a single tqparent, and gets a
* certain property from it in its calc() method.
*
* \see ObjectImp::property
@@ -276,22 +276,22 @@ class ObjectPropertyCalcer
: public ObjectCalcer
{
ObjectImp* mimp;
- ObjectCalcer* mparent;
+ ObjectCalcer* mtqparent;
int mpropid;
public:
/**
* Construct a new ObjectPropertyCalcer, that will get the property
- * from parent with number propid.
+ * from tqparent with number propid.
*/
- ObjectPropertyCalcer( ObjectCalcer* parent, int propid );
+ ObjectPropertyCalcer( ObjectCalcer* tqparent, int propid );
~ObjectPropertyCalcer();
const ObjectImp* imp() const;
- std::vector<ObjectCalcer*> parents() const;
+ std::vector<ObjectCalcer*> tqparents() const;
void calc( const KigDocument& doc );
int propId() const;
- ObjectCalcer* parent() const;
+ ObjectCalcer* tqparent() const;
const ObjectImpType* impRequirement(
ObjectCalcer* o, const std::vector<ObjectCalcer*>& os ) const;
diff --git a/kig/objects/object_drawer.cc b/kig/objects/object_drawer.cc
index f92fabe7..1fc0f2e0 100644
--- a/kig/objects/object_drawer.cc
+++ b/kig/objects/object_drawer.cc
@@ -32,8 +32,8 @@ void ObjectDrawer::draw( const ObjectImp& imp, KigPainter& p, bool sel ) const
if ( mshown || nv )
{
p.setBrushStyle( Qt::NoBrush );
- p.setBrushColor( sel ? Qt::red : ( mshown?mcolor:Qt::gray ) );
- p.setPen( TQPen ( sel ? Qt::red : ( mshown?mcolor:Qt::gray ), 1) );
+ p.setBrushColor( sel ? TQt::red : ( mshown?mcolor:TQt::gray ) );
+ p.setPen( TQPen ( sel ? TQt::red : ( mshown?mcolor:TQt::gray ), 1) );
p.setWidth( mwidth );
p.setStyle( mstyle );
p.setPointStyle( mpointstyle );
@@ -41,10 +41,10 @@ void ObjectDrawer::draw( const ObjectImp& imp, KigPainter& p, bool sel ) const
}
}
-bool ObjectDrawer::contains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv ) const
+bool ObjectDrawer::tqcontains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv ) const
{
bool shownornv = mshown || nv;
- return shownornv && imp.contains( pt, mwidth, w );
+ return shownornv && imp.tqcontains( pt, mwidth, w );
}
bool ObjectDrawer::shown( ) const
@@ -133,7 +133,7 @@ ObjectDrawer::ObjectDrawer( const TQColor& color, int width, bool shown, Qt::Pen
}
ObjectDrawer::ObjectDrawer()
- : mcolor( Qt::blue ), mshown( true ), mwidth( -1 ), mstyle( Qt::SolidLine ), mpointstyle( 0 )
+ : mcolor( TQt::blue ), mshown( true ), mwidth( -1 ), mstyle( Qt::SolidLine ), mpointstyle( 0 )
{
}
@@ -170,7 +170,7 @@ TQString ObjectDrawer::pointStyleToString() const
else if ( mpointstyle == 4 )
return "Cross";
assert( false );
- return TQString::null;
+ return TQString();
}
Qt::PenStyle ObjectDrawer::styleFromString( const TQString& style )
@@ -190,15 +190,15 @@ Qt::PenStyle ObjectDrawer::styleFromString( const TQString& style )
TQString ObjectDrawer::styleToString() const
{
- if ( mstyle == Qt::SolidLine )
+ if ( mstyle == TQt::SolidLine )
return "SolidLine";
- else if ( mstyle == Qt::DashLine )
+ else if ( mstyle == TQt::DashLine )
return "DashLine";
- else if ( mstyle == Qt::DotLine )
+ else if ( mstyle == TQt::DotLine )
return "DotLine";
- else if ( mstyle == Qt::DashDotLine )
+ else if ( mstyle == TQt::DashDotLine )
return "DashDotLine";
- else if ( mstyle == Qt::DashDotDotLine )
+ else if ( mstyle == TQt::DashDotDotLine )
return "DashDotDotLine";
return "SolidLine";
}
diff --git a/kig/objects/object_drawer.h b/kig/objects/object_drawer.h
index 6206522e..7fca8d4e 100644
--- a/kig/objects/object_drawer.h
+++ b/kig/objects/object_drawer.h
@@ -52,8 +52,8 @@ class ObjectDrawer
int mpointstyle;
public:
/**
- * Construct a new ObjectDrawer with a default color ( Qt::blue ),
- * width ( -1 ), shown state ( true ), PenStyle ( Qt::SolidLine ),
+ * Construct a new ObjectDrawer with a default color ( TQt::blue ),
+ * width ( -1 ), shown state ( true ), PenStyle ( TQt::SolidLine ),
* and pointstyle ( 0 )
*/
ObjectDrawer();
@@ -68,7 +68,7 @@ public:
* dependent on whether it is shown ( when it will never contain
* anything ), and on its width..
*/
- bool contains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv = false ) const;
+ bool tqcontains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv = false ) const;
/**
* returns whether the object \p imp is in the rectangle \p r . This is
* dependent on whether it is shown and on its width..
diff --git a/kig/objects/object_factory.cc b/kig/objects/object_factory.cc
index f2957a7e..5b1a6add 100644
--- a/kig/objects/object_factory.cc
+++ b/kig/objects/object_factory.cc
@@ -109,21 +109,21 @@ ObjectTypeCalcer* ObjectFactory::relativePointCalcer(
x = loc.x - reference.x;
y = loc.y - reference.y;
}
- std::vector<ObjectCalcer*> parents;
- parents.push_back( new ObjectConstCalcer( new DoubleImp( x ) ) );
- parents.push_back( new ObjectConstCalcer( new DoubleImp( y ) ) );
- parents.push_back( o );
- return new ObjectTypeCalcer( RelativePointType::instance(), parents );
+ std::vector<ObjectCalcer*> tqparents;
+ tqparents.push_back( new ObjectConstCalcer( new DoubleImp( x ) ) );
+ tqparents.push_back( new ObjectConstCalcer( new DoubleImp( y ) ) );
+ tqparents.push_back( o );
+ return new ObjectTypeCalcer( RelativePointType::instance(), tqparents );
}
ObjectTypeCalcer* ObjectFactory::constrainedPointCalcer(
ObjectCalcer* curve, double param ) const
{
assert( curve->imp()->inherits( CurveImp::stype() ) );
- std::vector<ObjectCalcer*> parents;
- parents.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) );
- parents.push_back( curve );
- return new ObjectTypeCalcer( ConstrainedPointType::instance(), parents );
+ std::vector<ObjectCalcer*> tqparents;
+ tqparents.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) );
+ tqparents.push_back( curve );
+ return new ObjectTypeCalcer( ConstrainedPointType::instance(), tqparents );
}
ObjectHolder* ObjectFactory::constrainedPoint(
@@ -152,24 +152,24 @@ ObjectTypeCalcer* ObjectFactory::locusCalcer(
assert( dynamic_cast<const ObjectTypeCalcer*>( a ) );
ObjectTypeCalcer* constrained = static_cast<ObjectTypeCalcer*>( a );
assert( constrained->type()->inherits( ObjectType::ID_ConstrainedPointType ) );
- assert( constrained->parents().size() == 2 );
- ObjectCalcer* curve = a->parents().back();
+ assert( constrained->tqparents().size() == 2 );
+ ObjectCalcer* curve = a->tqparents().back();
const ObjectCalcer* moving = b;
- std::vector<ObjectCalcer*> hierparents;
- hierparents.push_back( constrained );
- std::vector<ObjectCalcer*> sideOfTree = sideOfTreePath( hierparents, moving );
- std::copy( sideOfTree.begin(), sideOfTree.end(), std::back_inserter( hierparents ) );
+ std::vector<ObjectCalcer*> hiertqparents;
+ hiertqparents.push_back( constrained );
+ std::vector<ObjectCalcer*> sideOfTree = sideOfTreePath( hiertqparents, moving );
+ std::copy( sideOfTree.begin(), sideOfTree.end(), std::back_inserter( hiertqparents ) );
- ObjectHierarchy hier( hierparents, moving );
+ ObjectHierarchy hier( hiertqparents, moving );
- std::vector<ObjectCalcer*> realparents( 2 + sideOfTree.size(), 0 );
- realparents[0] = new ObjectConstCalcer( new HierarchyImp( hier ) );
- realparents[1] = curve;
- copy( sideOfTree.begin(), sideOfTree.end(), realparents.begin() + 2 );
+ std::vector<ObjectCalcer*> realtqparents( 2 + sideOfTree.size(), 0 );
+ realtqparents[0] = new ObjectConstCalcer( new HierarchyImp( hier ) );
+ realtqparents[1] = curve;
+ copy( sideOfTree.begin(), sideOfTree.end(), realtqparents.begin() + 2 );
- return new ObjectTypeCalcer( LocusType::instance(), realparents );
+ return new ObjectTypeCalcer( LocusType::instance(), realtqparents );
}
ObjectHolder* ObjectFactory::locus( ObjectCalcer* a, ObjectCalcer* b ) const
@@ -179,35 +179,35 @@ ObjectHolder* ObjectFactory::locus( ObjectCalcer* a, ObjectCalcer* b ) const
ObjectHolder* ObjectFactory::label(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& parents,
+ bool needframe, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
- return new ObjectHolder( labelCalcer( s, loc, needframe, parents, doc ) );
+ return new ObjectHolder( labelCalcer( s, loc, needframe, tqparents, doc ) );
}
ObjectTypeCalcer* ObjectFactory::labelCalcer(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& parents,
+ bool needframe, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
- return attachedLabelCalcer( s, 0, loc, needframe, parents, doc );
+ return attachedLabelCalcer( s, 0, loc, needframe, tqparents, doc );
}
ObjectTypeCalcer* ObjectFactory::attachedLabelCalcer(
const TQString& s, ObjectCalcer* p,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& nparents,
+ const std::vector<ObjectCalcer*>& ntqparents,
const KigDocument& doc ) const
{
- std::vector<ObjectCalcer*> parents;
- parents.reserve( nparents.size() + 3 );
- parents.push_back( new ObjectConstCalcer( new IntImp( needframe ? 1 : 0 ) ) );
+ std::vector<ObjectCalcer*> tqparents;
+ tqparents.reserve( ntqparents.size() + 3 );
+ tqparents.push_back( new ObjectConstCalcer( new IntImp( needframe ? 1 : 0 ) ) );
- parents.push_back( getAttachPoint( p, loc, doc ) );
+ tqparents.push_back( getAttachPoint( p, loc, doc ) );
- parents.push_back( new ObjectConstCalcer( new StringImp( s ) ) );
- std::copy( nparents.begin(), nparents.end(), std::back_inserter( parents ) );
- ObjectTypeCalcer* ret = new ObjectTypeCalcer( TextType::instance(), parents );
+ tqparents.push_back( new ObjectConstCalcer( new StringImp( s ) ) );
+ std::copy( ntqparents.begin(), ntqparents.end(), std::back_inserter( tqparents ) );
+ ObjectTypeCalcer* ret = new ObjectTypeCalcer( TextType::instance(), tqparents );
ret->calc( doc );
return ret;
}
@@ -266,18 +266,18 @@ ObjectCalcer* ObjectFactory::getAttachPoint(
}
ObjectHolder* ObjectFactory::attachedLabel(
- const TQString& s, ObjectCalcer* locationparent,
+ const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& parents,
+ const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const
{
- return new ObjectHolder( attachedLabelCalcer( s, locationparent, loc, needframe, parents, doc ) );
+ return new ObjectHolder( attachedLabelCalcer( s, locationtqparent, loc, needframe, tqparents, doc ) );
}
ObjectPropertyCalcer* ObjectFactory::propertyObjectCalcer(
ObjectCalcer* o, const char* p ) const
{
- int wp = o->imp()->propertiesInternalNames().findIndex( p );
+ int wp = o->imp()->propertiesInternalNames().tqfindIndex( p );
if ( wp == -1 ) return 0;
return new ObjectPropertyCalcer( o, wp );
}
@@ -299,12 +299,12 @@ void ObjectFactory::redefinePoint(
std::mem_fun( calcmeth ) );
ObjectCalcer* v = 0;
- // we don't want one of our children as a parent...
- std::set<ObjectCalcer*> children = getAllChildren( point );
+ // we don't want one of our tqchildren as a tqparent...
+ std::set<ObjectCalcer*> tqchildren = getAllChildren( point );
for ( std::vector<ObjectCalcer*>::iterator i = os.begin();
i != os.end(); ++i )
if ( (*i)->imp()->inherits( CurveImp::stype() ) &&
- children.find( *i ) == children.end() )
+ tqchildren.find( *i ) == tqchildren.end() )
{
v = *i;
break;
@@ -321,15 +321,15 @@ void ObjectFactory::redefinePoint(
// point already was constrained -> simply update the param
// DataObject and make sure point is on the right curve...
ObjectCalcer* dataobj = 0;
- std::vector<ObjectCalcer*> parents = point->parents();
- assert( parents.size() == 2 );
- assert ( parents[0]->imp()->inherits( DoubleImp::stype() ) );
- dataobj = parents[0];
-
- parents.clear();
- parents.push_back( dataobj );
- parents.push_back( v );
- point->setParents( parents );
+ std::vector<ObjectCalcer*> tqparents = point->tqparents();
+ assert( tqparents.size() == 2 );
+ assert ( tqparents[0]->imp()->inherits( DoubleImp::stype() ) );
+ dataobj = tqparents[0];
+
+ tqparents.clear();
+ tqparents.push_back( dataobj );
+ tqparents.push_back( v );
+ point->setParents( tqparents );
assert( dynamic_cast<ObjectConstCalcer*>( dataobj ) );
static_cast<ObjectConstCalcer*>( dataobj )->setImp(
diff --git a/kig/objects/object_factory.h b/kig/objects/object_factory.h
index 30f080d9..f3a28d66 100644
--- a/kig/objects/object_factory.h
+++ b/kig/objects/object_factory.h
@@ -94,26 +94,26 @@ public:
ObjectHolder* locus( ObjectCalcer* a, ObjectCalcer* b ) const;
/**
- * returns a label with text \p s at point \p c .. It ( and its parents )
+ * returns a label with text \p s at point \p c .. It ( and its tqparents )
* is calced already...
*/
ObjectHolder* label(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& parents,
+ bool needframe, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const;
ObjectTypeCalcer* labelCalcer(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& parents,
+ bool needframe, const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const;
/**
* this one does the same as the above, only that the new label is
- * attached to locationparent if it is non-null..
+ * attached to locationtqparent if it is non-null..
*/
ObjectTypeCalcer* attachedLabelCalcer(
- const TQString& s, ObjectCalcer* locationparent,
+ const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& parents,
+ const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const;
/**
* this has been added because it comes handy when redefining
@@ -121,13 +121,13 @@ public:
* attach point from the method above
*/
ObjectCalcer* getAttachPoint(
- ObjectCalcer* locationparent,
+ ObjectCalcer* locationtqparent,
const Coordinate& loc,
const KigDocument& doc ) const;
ObjectHolder* attachedLabel(
- const TQString& s, ObjectCalcer* locationparent,
+ const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& parents,
+ const std::vector<ObjectCalcer*>& tqparents,
const KigDocument& doc ) const;
/**
diff --git a/kig/objects/object_holder.cc b/kig/objects/object_holder.cc
index 70e1100b..49e6da9d 100644
--- a/kig/objects/object_holder.cc
+++ b/kig/objects/object_holder.cc
@@ -80,9 +80,9 @@ void ObjectHolder::draw( KigPainter& p, bool selected ) const
mdrawer->draw( *imp(), p, selected );
}
-bool ObjectHolder::contains( const Coordinate& pt, const KigWidget& w, bool nv ) const
+bool ObjectHolder::tqcontains( const Coordinate& pt, const KigWidget& w, bool nv ) const
{
- return mdrawer->contains( *imp(), pt, w, nv );
+ return mdrawer->tqcontains( *imp(), pt, w, nv );
}
bool ObjectHolder::inRect( const Rect& r, const KigWidget& w ) const
@@ -145,7 +145,7 @@ const TQString ObjectHolder::name() const
return static_cast<const StringImp*>( mnamecalcer->imp() )->data();
}
else
- return TQString::null;
+ return TQString();
}
void ObjectHolder::setNameCalcer( ObjectConstCalcer* namecalcer )
@@ -160,5 +160,5 @@ TQString ObjectHolder::selectStatement() const
if ( n.isEmpty() )
return i18n( imp()->type()->selectStatement() );
else
- return i18n( imp()->type()->selectNameStatement() ).arg( n );
+ return i18n( imp()->type()->selectNameStatement() ).tqarg( n );
}
diff --git a/kig/objects/object_holder.h b/kig/objects/object_holder.h
index 0afd3892..0666fef1 100644
--- a/kig/objects/object_holder.h
+++ b/kig/objects/object_holder.h
@@ -77,7 +77,7 @@ public:
void setNameCalcer( ObjectConstCalcer* namecalcer );
/**
- * returns TQString::null if no name is set.
+ * returns TQString() if no name is set.
*/
const TQString name() const;
/**
@@ -103,7 +103,7 @@ public:
/**
* Returns whether this object contains the point \p p .
*/
- bool contains( const Coordinate& p, const KigWidget& w, bool nv = false ) const;
+ bool tqcontains( const Coordinate& p, const KigWidget& w, bool nv = false ) const;
/**
* Returns whether this object is in the rectangle \p r .
*/
diff --git a/kig/objects/object_imp.cc b/kig/objects/object_imp.cc
index 9a3ee679..7b2498a3 100644
--- a/kig/objects/object_imp.cc
+++ b/kig/objects/object_imp.cc
@@ -178,7 +178,7 @@ bool ObjectImp::canFillInNextEscape() const
return false;
}
-ObjectImpType::ObjectImpType( const ObjectImpType* parent,
+ObjectImpType::ObjectImpType( const ObjectImpType* tqparent,
const char* internalname,
const char* translatedname,
const char* selectstatement,
@@ -189,7 +189,7 @@ ObjectImpType::ObjectImpType( const ObjectImpType* parent,
const char* attachtothisstatement,
const char* showastatement,
const char* hideastatement )
- : mparent( parent ), minternalname( internalname ),
+ : mtqparent( tqparent ), minternalname( internalname ),
mtranslatedname( translatedname ), mselectstatement( selectstatement ),
mselectnamestatement( selectnamestatement ),
mremoveastatement( removeastatement ), maddastatement( addastatement ),
@@ -207,7 +207,7 @@ ObjectImpType::~ObjectImpType()
bool ObjectImpType::inherits( const ObjectImpType* t ) const
{
- return t == this || (mparent && mparent->inherits( t ) );
+ return t == this || (mtqparent && mtqparent->inherits( t ) );
}
const char* ObjectImpType::internalName() const
diff --git a/kig/objects/object_imp.h b/kig/objects/object_imp.h
index eaf29328..20484ecf 100644
--- a/kig/objects/object_imp.h
+++ b/kig/objects/object_imp.h
@@ -87,7 +87,7 @@ typedef unsigned int uint;
*/
class ObjectImpType
{
- const ObjectImpType* mparent;
+ const ObjectImpType* mtqparent;
const char* minternalname;
const char* mtranslatedname;
const char* mselectstatement;
@@ -126,12 +126,12 @@ public:
* hideastatement is a translatable string like "Hide a Segment"
*
* All translatable strings should have
- * I18N_NOOP around them ! @param parent is the ObjectImpType of
- * your parent ObjectImp type. Never give 0 as parent, except for
+ * I18N_NOOP around them ! @param tqparent is the ObjectImpType of
+ * your tqparent ObjectImp type. Never give 0 as tqparent, except for
* the top ObjectImp ObjectImpType..
*/
ObjectImpType(
- const ObjectImpType* parent, const char* internalname,
+ const ObjectImpType* tqparent, const char* internalname,
const char* translatedname,
const char* selectstatement,
const char* selectnamestatement,
@@ -170,7 +170,7 @@ public:
* Returns a translatable string of the form "Select point %1". %1
* will be filled in by whomever calls this function with the name
* of the object in question. This function should be used as
- * follows: i18n( x->selectNameStatement() ).arg( xname ).
+ * follows: i18n( x->selectNameStatement() ).tqarg( xname ).
*/
const char* selectNameStatement() const;
@@ -268,7 +268,7 @@ public:
virtual ObjectImp* transform( const Transformation& t ) const = 0;
virtual void draw( KigPainter& p ) const = 0;
- virtual bool contains( const Coordinate& p, int width,
+ virtual bool tqcontains( const Coordinate& p, int width,
const KigWidget& si ) const = 0;
virtual bool inRect( const Rect& r, int width,
const KigWidget& si ) const = 0;
diff --git a/kig/objects/object_imp_factory.cc b/kig/objects/object_imp_factory.cc
index 65cd9c94..116f0d0d 100644
--- a/kig/objects/object_imp_factory.cc
+++ b/kig/objects/object_imp_factory.cc
@@ -48,25 +48,25 @@ ObjectImpFactory::~ObjectImpFactory()
{
}
-static void addXYElements( const Coordinate& c, TQDomElement& parent, TQDomDocument& doc )
+static void addXYElements( const Coordinate& c, TQDomElement& tqparent, TQDomDocument& doc )
{
TQDomElement xe = doc.createElement( "x" );
xe.appendChild(
doc.createTextNode(
TQString::number( c.x ) ) );
- parent.appendChild( xe );
+ tqparent.appendChild( xe );
TQDomElement ye = doc.createElement( "y" );
ye.appendChild(
doc.createTextNode(
TQString::number( c.y ) ) );
- parent.appendChild( ye );
+ tqparent.appendChild( ye );
}
-static void addDoubleElement( const char* name, double d, TQDomElement& parent, TQDomDocument& doc )
+static void addDoubleElement( const char* name, double d, TQDomElement& tqparent, TQDomDocument& doc )
{
TQDomElement e = doc.createElement( name );
e.appendChild( doc.createTextNode( TQString::number( d ) ) );
- parent.appendChild( e );
+ tqparent.appendChild( e );
}
static void addCoordinateElement( const char* name, const Coordinate& d, TQDomElement& p, TQDomDocument& doc )
@@ -76,41 +76,41 @@ static void addCoordinateElement( const char* name, const Coordinate& d, TQDomEl
p.appendChild( e );
}
-TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& parent,
+TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& tqparent,
TQDomDocument& doc ) const
{
if( d.inherits( IntImp::stype() ) )
{
- parent.appendChild(
+ tqparent.appendChild(
doc.createTextNode(
TQString::number( static_cast<const IntImp&>( d ).data() ) ) );
- return TQString::fromLatin1( "int" );
+ return TQString::tqfromLatin1( "int" );
}
else if ( d.inherits( DoubleImp::stype() ) )
{
- parent.appendChild(
+ tqparent.appendChild(
doc.createTextNode(
TQString::number( static_cast<const DoubleImp&>( d ).data() ) ) );
- return TQString::fromLatin1( "double" );
+ return TQString::tqfromLatin1( "double" );
}
else if( d.inherits( StringImp::stype() ) )
{
- parent.appendChild(
+ tqparent.appendChild(
doc.createTextNode(
static_cast<const StringImp&>( d ).data() ) );
- return TQString::fromLatin1( "string" );
+ return TQString::tqfromLatin1( "string" );
}
else if ( d.inherits( TestResultImp::stype() ) )
{
- parent.appendChild(
+ tqparent.appendChild(
doc.createTextNode(
static_cast<const TestResultImp&>( d ).data() ) );
- return TQString::fromLatin1( "testresult" );
+ return TQString::tqfromLatin1( "testresult" );
}
else if( d.inherits( HierarchyImp::stype() ) )
{
- static_cast<const HierarchyImp&>( d ).data().serialize( parent, doc );
- return TQString::fromLatin1( "hierarchy" );
+ static_cast<const HierarchyImp&>( d ).data().serialize( tqparent, doc );
+ return TQString::tqfromLatin1( "hierarchy" );
}
else if ( d.inherits( TransformationImp::stype() ) )
{
@@ -128,58 +128,58 @@ TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& parent,
matrixe.appendChild( elel );
};
}
- parent.appendChild( matrixe );
+ tqparent.appendChild( matrixe );
TQDomElement homothetye = doc.createElement( "homothetic" );
const char* ishomothety = trans.isHomothetic() ? "true" : "false";
homothetye.appendChild( doc.createTextNode( ishomothety ) );
- parent.appendChild( homothetye );
+ tqparent.appendChild( homothetye );
- return TQString::fromLatin1( "transformation" );
+ return TQString::tqfromLatin1( "transformation" );
}
else if( d.inherits( AbstractLineImp::stype() ) )
{
LineData l = static_cast<const AbstractLineImp&>( d ).data();
- addCoordinateElement( "a", l.a, parent, doc );
- addCoordinateElement( "b", l.b, parent, doc );
+ addCoordinateElement( "a", l.a, tqparent, doc );
+ addCoordinateElement( "b", l.b, tqparent, doc );
if( d.inherits( SegmentImp::stype() ) )
- return TQString::fromLatin1( "segment" );
+ return TQString::tqfromLatin1( "segment" );
else if( d.inherits( RayImp::stype() ) )
- return TQString::fromLatin1( "ray" );
- else return TQString::fromLatin1( "line" );
+ return TQString::tqfromLatin1( "ray" );
+ else return TQString::tqfromLatin1( "line" );
}
else if( d.inherits( PointImp::stype() ) )
{
addXYElements( static_cast<const PointImp&>( d ).coordinate(),
- parent, doc );
- return TQString::fromLatin1( "point" );
+ tqparent, doc );
+ return TQString::tqfromLatin1( "point" );
}
else if( d.inherits( TextImp::stype() ) )
{
TQString text = static_cast<const TextImp&>( d ).text();
- parent.appendChild(
+ tqparent.appendChild(
doc.createTextNode( text ) );
- return TQString::fromLatin1( "text" );
+ return TQString::tqfromLatin1( "text" );
}
else if( d.inherits( AngleImp::stype() ) )
{
- addDoubleElement( "size", static_cast<const AngleImp&>( d ).size(), parent, doc );
- return TQString::fromLatin1( "angle" );
+ addDoubleElement( "size", static_cast<const AngleImp&>( d ).size(), tqparent, doc );
+ return TQString::tqfromLatin1( "angle" );
}
else if ( d.inherits( ArcImp::stype() ) )
{
const ArcImp& a = static_cast<const ArcImp&>( d );
- addCoordinateElement( "center", a.center(), parent, doc );
- addDoubleElement( "radius", a.radius(), parent, doc );
- addDoubleElement( "startangle", a.startAngle(), parent, doc );
- addDoubleElement( "angle", a.angle(), parent, doc );
- return TQString::fromLatin1( "arc" );
+ addCoordinateElement( "center", a.center(), tqparent, doc );
+ addDoubleElement( "radius", a.radius(), tqparent, doc );
+ addDoubleElement( "startangle", a.startAngle(), tqparent, doc );
+ addDoubleElement( "angle", a.angle(), tqparent, doc );
+ return TQString::tqfromLatin1( "arc" );
}
else if( d.inherits( VectorImp::stype() ) )
{
Coordinate dir = static_cast<const VectorImp&>( d ).dir();
- addXYElements( dir, parent, doc );
- return TQString::fromLatin1( "vector" );
+ addXYElements( dir, tqparent, doc );
+ return TQString::tqfromLatin1( "vector" );
}
else if( d.inherits( LocusImp::stype() ) )
{
@@ -190,30 +190,30 @@ TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& parent,
const CurveImp& curveimp = *locus.curve();
TQString type = serialize( curveimp, curve, doc );
curve.setAttribute( "type", type );
- parent.appendChild( curve );
+ tqparent.appendChild( curve );
// serialize the hierarchy..
TQDomElement hier = doc.createElement( "calculation" );
locus.hierarchy().serialize( hier, doc );
- parent.appendChild( hier );
+ tqparent.appendChild( hier );
- return TQString::fromLatin1( "locus" );
+ return TQString::tqfromLatin1( "locus" );
}
else if( d.inherits( CircleImp::stype() ) )
{
const CircleImp& c = static_cast<const CircleImp&>( d );
- addCoordinateElement( "center", c.center(), parent, doc );
- addDoubleElement( "radius", c.radius(), parent, doc );
- return TQString::fromLatin1( "circle" );
+ addCoordinateElement( "center", c.center(), tqparent, doc );
+ addDoubleElement( "radius", c.radius(), tqparent, doc );
+ return TQString::tqfromLatin1( "circle" );
}
else if( d.inherits( ConicImp::stype() ) )
{
const ConicPolarData data = static_cast<const ConicImp&>( d ).polarData();
- addCoordinateElement( "focus1", data.focus1, parent, doc );
- addDoubleElement( "pdimen", data.pdimen, parent, doc );
- addDoubleElement( "ecostheta0", data.ecostheta0, parent, doc );
- addDoubleElement( "esintheta0", data.esintheta0, parent, doc );
- return TQString::fromLatin1( "conic" );
+ addCoordinateElement( "focus1", data.focus1, tqparent, doc );
+ addDoubleElement( "pdimen", data.pdimen, tqparent, doc );
+ addDoubleElement( "ecostheta0", data.ecostheta0, tqparent, doc );
+ addDoubleElement( "esintheta0", data.esintheta0, tqparent, doc );
+ return TQString::tqfromLatin1( "conic" );
}
else if( d.inherits( CubicImp::stype() ) )
{
@@ -229,11 +229,11 @@ TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& parent,
addDoubleElement( "a112", data.coeffs[7], coeffs, doc );
addDoubleElement( "a122", data.coeffs[8], coeffs, doc );
addDoubleElement( "a222", data.coeffs[9], coeffs, doc );
- parent.appendChild( coeffs );
- return TQString::fromLatin1( "cubic" );
+ tqparent.appendChild( coeffs );
+ return TQString::tqfromLatin1( "cubic" );
}
assert( false );
- return TQString::null;
+ return TQString();
}
static Coordinate readXYElements( const TQDomElement& e, bool& ok )
@@ -285,40 +285,40 @@ static double readDoubleElement( TQDomNode n, bool& ok,
}
ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
- const TQDomElement& parent,
+ const TQDomElement& tqparent,
TQString& error ) const
{
#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; \
}
bool ok = true;
if ( type == "int" )
{
- int ret = parent.text().toInt( &ok );
+ int ret = tqparent.text().toInt( &ok );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
return new IntImp( ret );
}
else if ( type == "double" )
{
- double ret = parent.text().toDouble( &ok );
+ double ret = tqparent.text().toDouble( &ok );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
return new DoubleImp( ret );
}
else if ( type == "string" )
{
- return new StringImp( parent.text() );
+ return new StringImp( tqparent.text() );
}
else if ( type == "testresult" )
{
- return new TestResultImp( parent.text() );
+ return new TestResultImp( tqparent.text() );
}
else if ( type == "hierarchy" )
{
- ObjectHierarchy* hier = ObjectHierarchy::buildSafeObjectHierarchy( parent, error );
+ ObjectHierarchy* hier = ObjectHierarchy::buildSafeObjectHierarchy( tqparent, error );
if ( ! hier ) return 0;
HierarchyImp* imp = new HierarchyImp( *hier );
delete hier;
@@ -328,7 +328,7 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
{
double data[3][3];
bool homothetic = false;
- for ( TQDomElement childe = parent.firstChild().toElement();
+ for ( TQDomElement childe = tqparent.firstChild().toElement();
! childe.isNull(); childe = childe.nextSibling().toElement() )
{
if ( childe.tagName() == "matrix" )
@@ -357,13 +357,13 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if ( type == "point" )
{
- Coordinate ret = readXYElements( parent, ok );
+ Coordinate ret = readXYElements( tqparent, ok );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
return new PointImp( ret );
}
else if ( type == "line" || type == "segment" || type == "ray" )
{
- TQDomNode n = parent.firstChild();
+ TQDomNode n = tqparent.firstChild();
Coordinate a = readCoordinateElement( n, ok, "a" );
if ( !ok ) KIG_GENERIC_PARSE_ERROR;
n = n.nextSibling();
@@ -375,13 +375,13 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if( type == "angle" )
{
- double size = readDoubleElement( parent.firstChild(), ok, "size" );
+ double size = readDoubleElement( tqparent.firstChild(), ok, "size" );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
return new AngleImp( Coordinate(), 0, size );
}
else if ( type == "arc" )
{
- TQDomNode n = parent.firstChild();
+ TQDomNode n = tqparent.firstChild();
Coordinate center = readCoordinateElement( n, ok, "center" );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
n = n.nextSibling();
@@ -397,13 +397,13 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if( type == "vector" )
{
- Coordinate dir = readXYElements( parent, ok );
+ Coordinate dir = readXYElements( tqparent, ok );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
return new VectorImp( Coordinate(), dir );
}
else if( type == "locus" )
{
- TQDomElement curvee = parent.firstChild().toElement();
+ TQDomElement curvee = tqparent.firstChild().toElement();
if ( curvee.isNull() || curvee.tagName() != "curve" ) KIG_GENERIC_PARSE_ERROR;
TQString type = curvee.attribute( "type" );
ObjectImp* oi = deserialize( type, curvee, error );
@@ -417,7 +417,7 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if( type == "circle" )
{
- TQDomNode n = parent.firstChild();
+ TQDomNode n = tqparent.firstChild();
Coordinate center = readCoordinateElement( n, ok, "center" );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
@@ -429,7 +429,7 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if( type == "conic" )
{
- TQDomNode n = parent.firstChild();
+ TQDomNode n = tqparent.firstChild();
Coordinate focus1 = readCoordinateElement( n, ok, "focus1" );
if ( ! ok ) KIG_GENERIC_PARSE_ERROR;
@@ -450,7 +450,7 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
}
else if( type == "cubic" )
{
- TQDomElement coeffse = parent.firstChild().toElement();
+ TQDomElement coeffse = tqparent.firstChild().toElement();
if ( coeffse.isNull() || coeffse.tagName() != "coefficients" )
KIG_GENERIC_PARSE_ERROR;
@@ -504,7 +504,7 @@ ObjectImp* ObjectImpFactory::deserialize( const TQString& type,
"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( type );
+ "or perhaps you are using an older Kig version." ).tqarg( type );
return 0;
}
diff --git a/kig/objects/object_imp_factory.h b/kig/objects/object_imp_factory.h
index 1ac08dde..6056f45d 100644
--- a/kig/objects/object_imp_factory.h
+++ b/kig/objects/object_imp_factory.h
@@ -27,14 +27,14 @@ class ObjectImpFactory
public:
static const ObjectImpFactory* instance();
/**
- * loads data from \p parent , and returns a new ObjectImp from the type
+ * loads data from \p tqparent , and returns a new ObjectImp from the type
* string \p type .
*/
- ObjectImp* deserialize( const TQString& type, const TQDomElement& parent, TQString& error ) const;
+ ObjectImp* deserialize( const TQString& type, const TQDomElement& tqparent, TQString& error ) const;
/**
- * adds data to \p parent , and returns a type string..
+ * adds data to \p tqparent , and returns a type string..
*/
- TQString serialize( const ObjectImp& d, TQDomElement& parent, TQDomDocument& doc ) const;
+ TQString serialize( const ObjectImp& d, TQDomElement& tqparent, TQDomDocument& doc ) const;
};
#endif
diff --git a/kig/objects/object_type.cc b/kig/objects/object_type.cc
index ea85e4f8..93634b63 100644
--- a/kig/objects/object_type.cc
+++ b/kig/objects/object_type.cc
@@ -71,9 +71,9 @@ ArgsParserObjectType::ArgsParserObjectType( const char fulltypename[],
{
}
-const ObjectImpType* ArgsParserObjectType::impRequirement( const ObjectImp* o, const Args& parents ) const
+const ObjectImpType* ArgsParserObjectType::impRequirement( const ObjectImp* o, const Args& tqparents ) const
{
- return margsparser.impRequirement( o, parents );
+ return margsparser.impRequirement( o, tqparents );
}
const ArgsParser& ArgsParserObjectType::argsParser() const
@@ -118,8 +118,8 @@ std::vector<ObjectCalcer*> ObjectType::movableParents( const ObjectTypeCalcer& )
return std::vector<ObjectCalcer*>();
}
-bool ArgsParserObjectType::isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const
+bool ArgsParserObjectType::isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const
{
- return margsparser.isDefinedOnOrThrough( o, parents );
+ return margsparser.isDefinedOnOrThrough( o, tqparents );
}
diff --git a/kig/objects/object_type.h b/kig/objects/object_type.h
index 54471e46..60b32026 100644
--- a/kig/objects/object_type.h
+++ b/kig/objects/object_type.h
@@ -45,7 +45,7 @@ public:
virtual bool inherits( int type ) const;
- virtual ObjectImp* calc( const Args& parents, const KigDocument& d ) const = 0;
+ virtual ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const = 0;
virtual bool canMove( const ObjectTypeCalcer& ourobj ) const;
virtual bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
@@ -57,19 +57,19 @@ public:
const char* fullName() const;
/**
- * Supposing that \p parents would be given as parents to
+ * Supposing that \p tqparents would be given as tqparents to
* this type's calc function, this function returns the ObjectImp id
- * that \p o should at least have.. ( \p o should be part of \p parents )
+ * that \p o should at least have.. ( \p o should be part of \p tqparents )
*/
- virtual const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const = 0;
+ virtual const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const = 0;
/**
- * Supposing that \p parents would be given as parents to this type's
+ * Supposing that \p tqparents would be given as tqparents to this type's
* calc function, 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 ).
*/
- virtual bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const = 0;
+ virtual bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const = 0;
/**
* returns the ObjectImp id of the ObjectImp's produced by this
@@ -108,7 +108,7 @@ public:
/**
* This is a convenience subclass of ObjectType that a type should
- * inherit from if its parents can be specified in an ArgsParser..
+ * inherit from if its tqparents can be specified in an ArgsParser..
*/
class ArgsParserObjectType
: public ObjectType
@@ -119,8 +119,8 @@ protected:
const struct ArgsParser::spec argsspec[],
int n );
public:
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
const ArgsParser& argsParser() const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
diff --git a/kig/objects/object_type_factory.cc b/kig/objects/object_type_factory.cc
index a6d527ce..aa69f958 100644
--- a/kig/objects/object_type_factory.cc
+++ b/kig/objects/object_type_factory.cc
@@ -56,11 +56,11 @@ ObjectTypeFactory* ObjectTypeFactory::instance()
void ObjectTypeFactory::add( const ObjectType* type )
{
- assert( mmap.find( std::string( type->fullName() ) ) == mmap.end() );
+ assert( mmap.tqfind( std::string( type->fullName() ) ) == mmap.end() );
mmap[std::string( type->fullName() )] = type;
}
-const ObjectType* ObjectTypeFactory::find( const char* name ) const
+const ObjectType* ObjectTypeFactory::tqfind( const char* name ) const
{
maptype::const_iterator i = mmap.find( std::string( name ) );
if ( i == mmap.end() ) return 0;
diff --git a/kig/objects/object_type_factory.h b/kig/objects/object_type_factory.h
index c1371d67..97f4f0c3 100644
--- a/kig/objects/object_type_factory.h
+++ b/kig/objects/object_type_factory.h
@@ -34,7 +34,7 @@ class ObjectTypeFactory
public:
static ObjectTypeFactory* instance();
void add( const ObjectType* type );
- const ObjectType* find( const char* name ) const;
+ const ObjectType* tqfind( const char* name ) const;
};
#endif
diff --git a/kig/objects/other_imp.cc b/kig/objects/other_imp.cc
index 137a3e93..66da40a9 100644
--- a/kig/objects/other_imp.cc
+++ b/kig/objects/other_imp.cc
@@ -56,7 +56,7 @@ AngleImp::AngleImp( const Coordinate& pt, double start_angle_in_radials,
{
}
-bool AngleImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool AngleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
double radius = 50*w.screenInfo().pixelWidth();
@@ -73,7 +73,7 @@ bool AngleImp::contains( const Coordinate& p, int width, const KigWidget& w ) co
bool AngleImp::inRect( const Rect& r, int width, const KigWidget& w ) const
{
// TODO ?
- return r.contains( mpoint, w.screenInfo().normalMiss( width ) );
+ return r.tqcontains( mpoint, w.screenInfo().normalMiss( width ) );
}
Coordinate AngleImp::attachPoint() const
@@ -179,7 +179,7 @@ void VectorImp::draw( KigPainter& p ) const
p.drawVector( mdata.a, mdata.b );
}
-bool VectorImp::contains( const Coordinate& o, int width, const KigWidget& w ) const
+bool VectorImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const
{
return internalContainsPoint( o, w.screenInfo().normalMiss( width ) );
}
@@ -340,7 +340,7 @@ void ArcImp::draw( KigPainter& p ) const
p.drawArc( mcenter, mradius, msa, ma );
}
-bool ArcImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool ArcImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
return internalContainsPoint( p, w.screenInfo().normalMiss( width ) );
}
diff --git a/kig/objects/other_imp.h b/kig/objects/other_imp.h
index 8e716fa6..56e8c387 100644
--- a/kig/objects/other_imp.h
+++ b/kig/objects/other_imp.h
@@ -49,7 +49,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
Rect surroundingRect() const;
@@ -113,7 +113,7 @@ public:
double getParam( const Coordinate&, const KigDocument& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
Rect surroundingRect() const;
@@ -186,7 +186,7 @@ public:
ObjectImp* transform( const Transformation& t ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& w ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& w ) const;
bool inRect( const Rect& r, int width, const KigWidget& si ) const;
Rect surroundingRect() const;
bool valid() const;
diff --git a/kig/objects/other_type.cc b/kig/objects/other_type.cc
index 27787986..7d632524 100644
--- a/kig/objects/other_type.cc
+++ b/kig/objects/other_type.cc
@@ -103,10 +103,10 @@ bool CopyObjectType::inherits( int ) const
return false;
}
-ObjectImp* CopyObjectType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* CopyObjectType::calc( const Args& tqparents, const KigDocument& ) const
{
- assert( parents.size() == 1 );
- return parents[0]->copy();
+ assert( tqparents.size() == 1 );
+ return tqparents[0]->copy();
}
const ObjectImpType* CopyObjectType::impRequirement( const ObjectImp*, const Args& ) const
@@ -120,19 +120,19 @@ const ObjectImpType* CopyObjectType::resultId() const
return ObjectImp::stype();
}
-const ObjectImpType* LocusType::impRequirement( const ObjectImp* o, const Args& parents ) const
+const ObjectImpType* LocusType::impRequirement( const ObjectImp* o, const Args& tqparents ) const
{
- assert( parents.size() >= 2 );
- Args firsttwo( parents.begin(), parents.begin() + 2 );
- if ( o == parents[0] || o == parents[1] )
+ assert( tqparents.size() >= 2 );
+ Args firsttwo( tqparents.begin(), tqparents.begin() + 2 );
+ if ( o == tqparents[0] || o == tqparents[1] )
return margsparser.impRequirement( o, firsttwo );
else
{
- const HierarchyImp* h = dynamic_cast<const HierarchyImp*>( parents[0] );
+ const HierarchyImp* h = dynamic_cast<const HierarchyImp*>( tqparents[0] );
if ( h )
{
PointImp* p = new PointImp( Coordinate() );
- Args hargs( parents.begin()+ 2, parents.end() );
+ Args hargs( tqparents.begin()+ 2, tqparents.end() );
hargs.push_back( p );
ArgsParser hparser = h->data().argParser();
const ObjectImpType* ret = hparser.impRequirement( o, hargs );
@@ -182,7 +182,7 @@ Args CopyObjectType::sortArgs( const Args& args ) const
bool CopyObjectType::isDefinedOnOrThrough( const ObjectImp*, const Args& ) const
{
- // TODO: vragen aan parent ?
+ // TODO: vragen aan tqparent ?
// TODO: translate the above TODO ?
return false;
}
diff --git a/kig/objects/other_type.h b/kig/objects/other_type.h
index 6bbcead1..f8f24209 100644
--- a/kig/objects/other_type.h
+++ b/kig/objects/other_type.h
@@ -32,7 +32,7 @@ public:
ObjectImp* calc( const Args& args, const KigDocument& ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
bool inherits( int type ) const;
const ObjectImpType* resultId() const;
@@ -50,9 +50,9 @@ protected:
public:
static CopyObjectType* instance();
bool inherits( int type ) const;
- ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
const ObjectImpType* resultId() const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
Args sortArgs( const Args& args ) const;
diff --git a/kig/objects/point_imp.cc b/kig/objects/point_imp.cc
index 539f98b3..b2f9b1c1 100644
--- a/kig/objects/point_imp.cc
+++ b/kig/objects/point_imp.cc
@@ -42,7 +42,7 @@ void PointImp::draw( KigPainter& p ) const
p.drawFatPoint( mc );
}
-bool PointImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool PointImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
int twidth = width == -1 ? 5 : width;
return (p - mc).length() - twidth*w.screenInfo().pixelWidth() < 0;
@@ -51,7 +51,7 @@ bool PointImp::contains( const Coordinate& p, int width, const KigWidget& w ) co
bool PointImp::inRect( const Rect& r, int width, const KigWidget& w ) const
{
double am = w.screenInfo().normalMiss( width );
- return r.contains( mc, am );
+ return r.tqcontains( mc, am );
}
const uint PointImp::numberOfProperties() const
@@ -137,7 +137,7 @@ void PointImp::setCoordinate( const Coordinate& c )
void PointImp::fillInNextEscape( TQString& s, const KigDocument& doc ) const
{
- s = s.arg( doc.coordinateSystem().fromScreen( mc, doc ) );
+ s = s.tqarg( doc.coordinateSystem().fromScreen( mc, doc ) );
}
void PointImp::visit( ObjectImpVisitor* vtor ) const
diff --git a/kig/objects/point_imp.h b/kig/objects/point_imp.h
index dac0576c..6a2db06f 100644
--- a/kig/objects/point_imp.h
+++ b/kig/objects/point_imp.h
@@ -54,7 +54,7 @@ public:
void setCoordinate( const Coordinate& c );
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
const uint numberOfProperties() const;
diff --git a/kig/objects/point_type.cc b/kig/objects/point_type.cc
index 2acd8479..74fc9d37 100644
--- a/kig/objects/point_type.cc
+++ b/kig/objects/point_type.cc
@@ -52,12 +52,12 @@ FixedPointType::~FixedPointType()
{
}
-ObjectImp* FixedPointType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* FixedPointType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- double a = static_cast<const DoubleImp*>( parents[0] )->data();
- double b = static_cast<const DoubleImp*>( parents[1] )->data();
+ double a = static_cast<const DoubleImp*>( tqparents[0] )->data();
+ double b = static_cast<const DoubleImp*>( tqparents[1] )->data();
return new PointImp( Coordinate( a, b ) );
}
@@ -80,14 +80,14 @@ RelativePointType::~RelativePointType()
{
}
-ObjectImp* RelativePointType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* RelativePointType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- if ( ! parents[2]->attachPoint().valid() ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! tqparents[2]->attachPoint().valid() ) return new InvalidImp;
- Coordinate reference = static_cast<const ObjectImp*>( parents[2] )->attachPoint();
- double a = static_cast<const DoubleImp*>( parents[0] )->data();
- double b = static_cast<const DoubleImp*>( parents[1] )->data();
+ Coordinate reference = static_cast<const ObjectImp*>( tqparents[2] )->attachPoint();
+ double a = static_cast<const DoubleImp*>( tqparents[0] )->data();
+ double b = static_cast<const DoubleImp*>( tqparents[1] )->data();
return new PointImp( reference + Coordinate( a, b ) );
}
@@ -109,12 +109,12 @@ const CursorPointType* CursorPointType::instance()
return &t;
}
-ObjectImp* CursorPointType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* CursorPointType::calc( const Args& tqparents, const KigDocument& ) const
{
- assert ( parents[0]->inherits( DoubleImp::stype() ) );
- assert ( parents[1]->inherits( DoubleImp::stype() ) );
- double a = static_cast<const DoubleImp*>( parents[0] )->data();
- double b = static_cast<const DoubleImp*>( parents[1] )->data();
+ assert ( tqparents[0]->inherits( DoubleImp::stype() ) );
+ assert ( tqparents[1]->inherits( DoubleImp::stype() ) );
+ double a = static_cast<const DoubleImp*>( tqparents[0] )->data();
+ double b = static_cast<const DoubleImp*>( tqparents[1] )->data();
return new BogusPointImp( Coordinate( a, b ) );
}
@@ -124,12 +124,12 @@ const ObjectImpType* CursorPointType::resultId() const
return BogusPointImp::stype();
}
-ObjectImp* ConstrainedPointType::calc( const Args& parents, const KigDocument& doc ) const
+ObjectImp* ConstrainedPointType::calc( const Args& tqparents, const KigDocument& doc ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- double param = static_cast<const DoubleImp*>( parents[0] )->data();
- const Coordinate nc = static_cast<const CurveImp*>( parents[1] )->getPoint( param, doc );
+ double param = static_cast<const DoubleImp*>( tqparents[0] )->data();
+ const Coordinate nc = static_cast<const CurveImp*>( tqparents[1] )->getPoint( param, doc );
if ( nc.valid() ) return new PointImp( nc );
else return new InvalidImp;
}
@@ -155,7 +155,7 @@ void FixedPointType::move( ObjectTypeCalcer& ourobj, const Coordinate& to,
const KigDocument& ) const
{
// fetch the old coord..;
- std::vector<ObjectCalcer*> pa = ourobj.parents();
+ std::vector<ObjectCalcer*> pa = ourobj.tqparents();
assert( margsparser.checkArgs( pa ) );
assert( dynamic_cast<ObjectConstCalcer*>( pa.front() ) );
assert( dynamic_cast<ObjectConstCalcer*>( pa.back() ) );
@@ -173,7 +173,7 @@ void RelativePointType::move( ObjectTypeCalcer& ourobj, const Coordinate& to,
// fetch the attach point..;
// this routine is tightly paired with what moveReferencePoint returns!
// right now moveReferencePoint always returns the origin
- std::vector<ObjectCalcer*> pa = ourobj.parents();
+ std::vector<ObjectCalcer*> pa = ourobj.tqparents();
assert( margsparser.checkArgs( pa ) );
assert( dynamic_cast<ObjectConstCalcer*>( pa[0] ) );
assert( dynamic_cast<ObjectConstCalcer*>( pa[1] ) );
@@ -192,7 +192,7 @@ void CursorPointType::move( ObjectTypeCalcer& ourobj, const Coordinate& to,
{
// fetch the old coord..;
- std::vector<ObjectCalcer*> pa = ourobj.parents();
+ std::vector<ObjectCalcer*> pa = ourobj.tqparents();
assert( pa.size() == 2 );
assert( dynamic_cast<ObjectConstCalcer*>( pa.front() ) );
assert( dynamic_cast<ObjectConstCalcer*>( pa.back() ) );
@@ -208,12 +208,12 @@ void ConstrainedPointType::move( ObjectTypeCalcer& ourobj, const Coordinate& to,
const KigDocument& d ) const
{
// fetch the CurveImp..
- std::vector<ObjectCalcer*> parents = ourobj.parents();
- assert( margsparser.checkArgs( parents ) );
+ std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
- assert( dynamic_cast<ObjectConstCalcer*>( parents[0] ) );
- ObjectConstCalcer* paramo = static_cast<ObjectConstCalcer*>( parents[0] );
- const CurveImp* ci = static_cast<const CurveImp*>( parents[1]->imp() );
+ assert( dynamic_cast<ObjectConstCalcer*>( tqparents[0] ) );
+ ObjectConstCalcer* paramo = static_cast<ObjectConstCalcer*>( tqparents[0] );
+ const CurveImp* ci = static_cast<const CurveImp*>( tqparents[1]->imp() );
// fetch the new param..
const double np = ci->getParam( to, d );
@@ -395,7 +395,7 @@ void FixedPointType::executeAction(
Coordinate oldc = static_cast<const PointImp*>( o.imp() )->coordinate();
KigInputDialog::getCoordinate(
i18n( "Set Coordinate" ),
- i18n( "Enter the new coordinate." ) + TQString::fromLatin1( "<br>" ) +
+ i18n( "Enter the new coordinate." ) + TQString::tqfromLatin1( "<br>" ) +
d.document().coordinateSystem().coordinateFormatNoticeMarkup(),
&w, &ok, d.document(), &oldc );
if ( ! ok ) break;
@@ -427,11 +427,11 @@ void ConstrainedPointType::executeAction(
break;
case 0:
{
- std::vector<ObjectCalcer*> parents = o.parents();
- assert( dynamic_cast<ObjectConstCalcer*>( parents[0] ) &&
- parents[0]->imp()->inherits( DoubleImp::stype() ) );
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ assert( dynamic_cast<ObjectConstCalcer*>( tqparents[0] ) &&
+ tqparents[0]->imp()->inherits( DoubleImp::stype() ) );
- ObjectConstCalcer* po = static_cast<ObjectConstCalcer*>( parents[0] );
+ ObjectConstCalcer* po = static_cast<ObjectConstCalcer*>( tqparents[0] );
double oldp = static_cast<const DoubleImp*>( po->imp() )->data();
bool ok = true;
@@ -440,7 +440,7 @@ void ConstrainedPointType::executeAction(
oldp, &w, &ok, 0, 1, 4 );
if ( ! ok ) return;
- MonitorDataObjects mon( parents );
+ MonitorDataObjects mon( tqparents );
po->setImp( new DoubleImp( newp ) );
KigCommand* kc = new KigCommand( d, i18n( "Change Parameter of Constrained Point" ) );
mon.finish( kc );
@@ -473,46 +473,46 @@ const Coordinate ConstrainedPointType::moveReferencePoint( const ObjectTypeCalce
std::vector<ObjectCalcer*> FixedPointType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- return ourobj.parents();
+ return ourobj.tqparents();
}
std::vector<ObjectCalcer*> RelativePointType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
std::vector<ObjectCalcer*> ret;
- ret.push_back( ourobj.parents()[0] );
- ret.push_back( ourobj.parents()[1] );
+ ret.push_back( ourobj.tqparents()[0] );
+ ret.push_back( ourobj.tqparents()[1] );
return ret;
}
std::vector<ObjectCalcer*> ConstrainedPointType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
std::vector<ObjectCalcer*> ret;
- ret.push_back( ourobj.parents()[0] );
+ ret.push_back( ourobj.tqparents()[0] );
return ret;
}
/* ----------------- Transport of measure ------------------------------ */
-ObjectImp* MeasureTransportType::calc( const Args& parents, const KigDocument& doc ) const
+ObjectImp* MeasureTransportType::calc( const Args& tqparents, const KigDocument& doc ) const
{
double measure;
- if ( parents.size() != 3 ) return new InvalidImp;
+ if ( tqparents.size() != 3 ) return new InvalidImp;
- if ( parents[0]->inherits (SegmentImp::stype()) )
+ if ( tqparents[0]->inherits (SegmentImp::stype()) )
{
- const SegmentImp* s = static_cast<const SegmentImp*>( parents[0] );
+ const SegmentImp* s = static_cast<const SegmentImp*>( tqparents[0] );
measure = s->length();
- } else if ( parents[0]->inherits (ArcImp::stype()) )
+ } else if ( tqparents[0]->inherits (ArcImp::stype()) )
{
- const ArcImp* s = static_cast<const ArcImp*>( parents[0] );
+ const ArcImp* s = static_cast<const ArcImp*>( tqparents[0] );
measure = s->radius()*s->angle();
} else return new InvalidImp;
- const Coordinate& p = static_cast<const PointImp*>( parents[2] )->coordinate();
- if ( parents[1]->inherits (LineImp::stype()) )
+ const Coordinate& p = static_cast<const PointImp*>( tqparents[2] )->coordinate();
+ if ( tqparents[1]->inherits (LineImp::stype()) )
{
- const LineImp* c = static_cast<const LineImp*>( parents[1] );
+ const LineImp* c = static_cast<const LineImp*>( tqparents[1] );
if ( !c->containsPoint( p, doc ) )
return new InvalidImp;
@@ -523,9 +523,9 @@ ObjectImp* MeasureTransportType::calc( const Args& parents, const KigDocument& d
if ( nc.valid() ) return new PointImp( nc );
else return new InvalidImp;
- } else if ( parents[1]->inherits (CircleImp::stype()) )
+ } else if ( tqparents[1]->inherits (CircleImp::stype()) )
{
- const CircleImp* c = static_cast<const CircleImp*>( parents[1] );
+ const CircleImp* c = static_cast<const CircleImp*>( tqparents[1] );
if ( !c->containsPoint( p, doc ) )
return new InvalidImp;
@@ -607,17 +607,17 @@ Args MeasureTransportType::sortArgs( const Args& args ) const
/* - transport of measure (old, for compatibility with prev. kig files) - */
-ObjectImp* MeasureTransportTypeOld::calc( const Args& parents, const KigDocument& doc ) const
+ObjectImp* MeasureTransportTypeOld::calc( const Args& tqparents, const KigDocument& doc ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
- const Coordinate& p = static_cast<const PointImp*>( parents[1] )->coordinate();
+ const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
+ const Coordinate& p = static_cast<const PointImp*>( tqparents[1] )->coordinate();
if ( !c->containsPoint( p, doc ) )
return new InvalidImp;
- const SegmentImp* s = static_cast<const SegmentImp*>( parents[2] );
+ const SegmentImp* s = static_cast<const SegmentImp*>( tqparents[2] );
double param = c->getParam( p, doc );
double measure = s->length();
measure /= 2*c->radius()*M_PI;
diff --git a/kig/objects/point_type.h b/kig/objects/point_type.h
index 69a7e2e8..d1fb7674 100644
--- a/kig/objects/point_type.h
+++ b/kig/objects/point_type.h
@@ -34,7 +34,7 @@ public:
bool inherits( int type ) const;
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
bool canMove( const ObjectTypeCalcer& ourobj ) const;
bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
@@ -58,7 +58,7 @@ class RelativePointType
public:
static const RelativePointType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
bool canMove( const ObjectTypeCalcer& ourobj ) const;
bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
std::vector<ObjectCalcer*> movableParents( const ObjectTypeCalcer& ourobj ) const;
@@ -80,10 +80,10 @@ class CursorPointType
public:
static const CursorPointType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
Args sortArgs( const Args& args ) const;
bool canMove( const ObjectTypeCalcer& ourobj ) const;
@@ -102,7 +102,7 @@ public:
bool inherits( int type ) const;
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
bool canMove( const ObjectTypeCalcer& ourobj ) const;
bool isFreelyTranslatable( const ObjectTypeCalcer& ourobj ) const;
@@ -136,10 +136,10 @@ class MeasureTransportType
public:
static const MeasureTransportType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args )const;
Args sortArgs( const Args& args ) const;
};
@@ -152,7 +152,7 @@ class MeasureTransportTypeOld
public:
static const MeasureTransportTypeOld* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/polygon_imp.cc b/kig/objects/polygon_imp.cc
index 08215bfb..c9c8fb11 100644
--- a/kig/objects/polygon_imp.cc
+++ b/kig/objects/polygon_imp.cc
@@ -159,12 +159,12 @@ bool PolygonImp::isInPolygon( const Coordinate& p ) const
}
#define selectpolygonwithinside 1
#ifdef selectpolygonwithinside
-bool PolygonImp::contains( const Coordinate& p, int, const KigWidget& ) const
+bool PolygonImp::tqcontains( const Coordinate& p, int, const KigWidget& ) const
{
return isInPolygon( p );
}
#else
-bool PolygonImp::contains( const Coordinate& p, int width, const KigWidget& w ) const
+bool PolygonImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const
{
bool ret = false;
uint reduceddim = mpoints.size() - 1;
diff --git a/kig/objects/polygon_imp.h b/kig/objects/polygon_imp.h
index 9a25d516..506ca245 100644
--- a/kig/objects/polygon_imp.h
+++ b/kig/objects/polygon_imp.h
@@ -53,7 +53,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
bool valid() const;
Rect surroundingRect() const;
diff --git a/kig/objects/polygon_type.cc b/kig/objects/polygon_type.cc
index bca867da..55aa4cd8 100644
--- a/kig/objects/polygon_type.cc
+++ b/kig/objects/polygon_type.cc
@@ -60,13 +60,13 @@ const TriangleB3PType* TriangleB3PType::instance()
return &s;
}
-ObjectImp* TriangleB3PType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* TriangleB3PType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> points;
Coordinate centerofmass3 = Coordinate( 0, 0 );
- for ( Args::const_iterator i = parents.begin(); i != parents.end(); ++i )
+ for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
{
Coordinate point = static_cast<const PointImp*>( *i )->coordinate();
centerofmass3 += point;
@@ -87,46 +87,46 @@ bool TriangleB3PType::canMove( const ObjectTypeCalcer& o ) const
bool TriangleB3PType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- return parents[0]->isFreelyTranslatable() &&
- parents[1]->isFreelyTranslatable() &&
- parents[2]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ return tqparents[0]->isFreelyTranslatable() &&
+ tqparents[1]->isFreelyTranslatable() &&
+ tqparents[2]->isFreelyTranslatable();
}
void TriangleB3PType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- assert( margsparser.checkArgs( parents ) );
- const Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- const Coordinate b = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
- const Coordinate c = static_cast<const PointImp*>( parents[2]->imp() )->coordinate();
- if ( parents[0]->canMove() )
- parents[0]->move( to, d );
- if ( parents[1]->canMove() )
- parents[1]->move( to + b - a, d );
- if ( parents[2]->canMove() )
- parents[2]->move( to + c - a, d );
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
+ const Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ const Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
+ const Coordinate c = static_cast<const PointImp*>( tqparents[2]->imp() )->coordinate();
+ if ( tqparents[0]->canMove() )
+ tqparents[0]->move( to, d );
+ if ( tqparents[1]->canMove() )
+ tqparents[1]->move( to + b - a, d );
+ if ( tqparents[2]->canMove() )
+ tqparents[2]->move( to + c - a, d );
}
const Coordinate TriangleB3PType::moveReferencePoint( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- assert( margsparser.checkArgs( parents ) );
- return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ assert( margsparser.checkArgs( tqparents ) );
+ return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> TriangleB3PType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> parents = ourobj.parents();
+ std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = parents[1]->movableParents();
+ tmp = tqparents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = parents[2]->movableParents();
+ tmp = tqparents[2]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( parents.begin(), parents.end() );
+ ret.insert( tqparents.begin(), tqparents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
@@ -151,11 +151,11 @@ const PolygonBNPType* PolygonBNPType::instance()
return &s;
}
-ObjectImp* PolygonBNPType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PolygonBNPType::calc( const Args& tqparents, const KigDocument& ) const
{
- uint count = parents.size();
+ uint count = tqparents.size();
assert (count >= 3); /* non sono ammessi poligoni con meno di tre lati */
-// if ( parents[0] != parents[count] ) return new InvalidImp;
+// if ( tqparents[0] != tqparents[count] ) return new InvalidImp;
std::vector<Coordinate> points;
uint npoints = 0;
@@ -164,8 +164,8 @@ ObjectImp* PolygonBNPType::calc( const Args& parents, const KigDocument& ) const
for ( uint i = 0; i < count; ++i )
{
npoints++;
- if ( ! parents[i]->inherits( PointImp::stype() ) ) return new InvalidImp;
- Coordinate point = static_cast<const PointImp*>( parents[i] )->coordinate();
+ if ( ! tqparents[i]->inherits( PointImp::stype() ) ) return new InvalidImp;
+ Coordinate point = static_cast<const PointImp*>( tqparents[i] )->coordinate();
centerofmassn += point;
points.push_back( point );
}
@@ -204,10 +204,10 @@ bool PolygonBNPType::canMove( const ObjectTypeCalcer& o ) const
bool PolygonBNPType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const
{
- 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 )
{
- if ( !parents[i]->isFreelyTranslatable() ) return false;
+ if ( !tqparents[i]->isFreelyTranslatable() ) return false;
}
return true;
}
@@ -215,32 +215,32 @@ bool PolygonBNPType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const
void PolygonBNPType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- const Coordinate ref = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- for ( uint i = 0; i < parents.size(); ++i )
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ const Coordinate ref = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ for ( uint i = 0; i < tqparents.size(); ++i )
{
- const Coordinate a = static_cast<const PointImp*>( parents[i]->imp() )->coordinate();
- parents[i]->move( to + a - ref, d );
+ const Coordinate a = static_cast<const PointImp*>( tqparents[i]->imp() )->coordinate();
+ tqparents[i]->move( to + a - ref, d );
}
}
const Coordinate PolygonBNPType::moveReferencePoint( const ObjectTypeCalcer& o
) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> PolygonBNPType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> parents = ourobj.parents();
+ std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
std::set<ObjectCalcer*> ret;
- for ( uint i = 0; i < parents.size(); ++i )
+ for ( uint i = 0; i < tqparents.size(); ++i )
{
- std::vector<ObjectCalcer*> tmp = parents[i]->movableParents();
+ std::vector<ObjectCalcer*> tmp = tqparents[i]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
}
- ret.insert( parents.begin(), parents.end() );
+ ret.insert( tqparents.begin(), tqparents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
@@ -281,26 +281,26 @@ const PolygonBCVType* PolygonBCVType::instance()
return &s;
}
-ObjectImp* PolygonBCVType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PolygonBCVType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( parents.size() < 3 || parents.size() > 4 ) return new InvalidImp;
+ if ( tqparents.size() < 3 || tqparents.size() > 4 ) return new InvalidImp;
- if ( ( ! parents[0]->inherits( PointImp::stype() ) ) ||
- ( ! parents[1]->inherits( PointImp::stype() ) ) ||
- ( ! parents[2]->inherits( IntImp::stype() ) ) )
+ if ( ( ! tqparents[0]->inherits( PointImp::stype() ) ) ||
+ ( ! tqparents[1]->inherits( PointImp::stype() ) ) ||
+ ( ! tqparents[2]->inherits( IntImp::stype() ) ) )
return new InvalidImp;
const Coordinate center =
- static_cast<const PointImp*>( parents[0] )->coordinate();
+ static_cast<const PointImp*>( tqparents[0] )->coordinate();
const Coordinate vertex =
- static_cast<const PointImp*>( parents[1] )->coordinate();
+ static_cast<const PointImp*>( tqparents[1] )->coordinate();
const int sides =
- static_cast<const IntImp*>( parents[2] )->data();
+ static_cast<const IntImp*>( tqparents[2] )->data();
int twist = 1;
- if ( parents.size() == 4 )
+ if ( tqparents.size() == 4 )
{
- if ( ! parents[3]->inherits( IntImp::stype() ) ) return new InvalidImp;
- twist = static_cast<const IntImp*>( parents[3] )->data();
+ if ( ! tqparents[3]->inherits( IntImp::stype() ) ) return new InvalidImp;
+ twist = static_cast<const IntImp*>( tqparents[3] )->data();
}
std::vector<Coordinate> vertexes;
@@ -359,43 +359,43 @@ bool PolygonBCVType::canMove( const ObjectTypeCalcer& o ) const
bool PolygonBCVType::isFreelyTranslatable( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- return parents[0]->isFreelyTranslatable() &&
- parents[1]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ return tqparents[0]->isFreelyTranslatable() &&
+ tqparents[1]->isFreelyTranslatable();
}
void PolygonBCVType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- // assert( margsparser.checkArgs( parents ) );
- if ( ! parents[0]->imp()->inherits( PointImp::stype() ) ||
- ! parents[1]->imp()->inherits( PointImp::stype() ) ) return;
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ // assert( margsparser.checkArgs( tqparents ) );
+ if ( ! tqparents[0]->imp()->inherits( PointImp::stype() ) ||
+ ! tqparents[1]->imp()->inherits( PointImp::stype() ) ) return;
- const Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
- const Coordinate b = static_cast<const PointImp*>( parents[1]->imp() )->coordinate();
- parents[0]->move( to, d );
- parents[1]->move( to + b - a, d );
+ const Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ const Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
+ tqparents[0]->move( to, d );
+ tqparents[1]->move( to + b - a, d );
}
const Coordinate PolygonBCVType::moveReferencePoint( const ObjectTypeCalcer& o) const
{
- std::vector<ObjectCalcer*> parents = o.parents();
- // assert( margsparser.checkArgs( parents ) );
- if ( ! parents[0]->imp()->inherits( PointImp::stype() ) ) return Coordinate::invalidCoord();
+ std::vector<ObjectCalcer*> tqparents = o.tqparents();
+ // assert( margsparser.checkArgs( tqparents ) );
+ if ( ! tqparents[0]->imp()->inherits( PointImp::stype() ) ) return Coordinate::invalidCoord();
- return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
+ return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> PolygonBCVType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> parents = ourobj.parents();
+ std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = parents[1]->movableParents();
+ tmp = tqparents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( &parents[0], &parents[1] );
+ ret.insert( &tqparents[0], &tqparents[1] );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
@@ -443,23 +443,23 @@ const PolygonLineIntersectionType* PolygonLineIntersectionType::instance()
* vertex of the polygon.
*/
-ObjectImp* PolygonLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PolygonLineIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const PolygonImp* polygon = static_cast<const PolygonImp*>( parents[0] );
+ const PolygonImp* polygon = static_cast<const PolygonImp*>( tqparents[0] );
const std::vector<Coordinate> ppoints = polygon->points();
- const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
Coordinate intersections[2];
uint whichintersection = 0;
bool boundleft = false;
bool boundright = false;
- if ( parents[1]->inherits( SegmentImp::stype() ) )
+ if ( tqparents[1]->inherits( SegmentImp::stype() ) )
{
boundleft = boundright = true;
}
- if ( parents[1]->inherits( RayImp::stype() ) )
+ if ( tqparents[1]->inherits( RayImp::stype() ) )
{
boundleft = true;
}
@@ -562,12 +562,12 @@ const PolygonVertexType* PolygonVertexType::instance()
return &t;
}
-ObjectImp* PolygonVertexType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PolygonVertexType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
- const uint i = static_cast<const IntImp*>( parents[1] )->data();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
+ const uint i = static_cast<const IntImp*>( tqparents[1] )->data();
if ( i >= ppoints.size() ) return new InvalidImp;
@@ -605,12 +605,12 @@ const PolygonSideType* PolygonSideType::instance()
return &t;
}
-ObjectImp* PolygonSideType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* PolygonSideType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
- const uint i = static_cast<const IntImp*>( parents[1] )->data();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
+ const uint i = static_cast<const IntImp*>( tqparents[1] )->data();
if ( i >= ppoints.size() ) return new InvalidImp;
@@ -650,11 +650,11 @@ const ConvexHullType* ConvexHullType::instance()
return &t;
}
-ObjectImp* ConvexHullType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConvexHullType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
if ( ppoints.size() < 3 ) return new InvalidImp;
diff --git a/kig/objects/polygon_type.h b/kig/objects/polygon_type.h
index a49100bd..09a77da8 100644
--- a/kig/objects/polygon_type.h
+++ b/kig/objects/polygon_type.h
@@ -31,7 +31,7 @@ class TriangleB3PType
public:
static const TriangleB3PType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
bool canMove( const ObjectTypeCalcer& o ) const;
bool isFreelyTranslatable( const ObjectTypeCalcer& o ) const;
@@ -52,10 +52,10 @@ class PolygonBNPType
public:
static const PolygonBNPType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
Args sortArgs( const Args& args ) const;
@@ -78,11 +78,11 @@ class PolygonBCVType
public:
static const PolygonBCVType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
Args sortArgs( const Args& args ) const;
bool canMove( const ObjectTypeCalcer& o ) const;
@@ -100,7 +100,7 @@ class PolygonLineIntersectionType
~PolygonLineIntersectionType();
public:
static const PolygonLineIntersectionType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -111,7 +111,7 @@ class PolygonVertexType
~PolygonVertexType();
public:
static const PolygonVertexType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -122,7 +122,7 @@ class PolygonSideType
~PolygonSideType();
public:
static const PolygonSideType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -133,7 +133,7 @@ class ConvexHullType
~ConvexHullType();
public:
static const ConvexHullType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
#endif
diff --git a/kig/objects/special_calcers.cc b/kig/objects/special_calcers.cc
index e70bd4e9..281017b5 100644
--- a/kig/objects/special_calcers.cc
+++ b/kig/objects/special_calcers.cc
@@ -26,7 +26,7 @@ static const ArgsParser::spec argsspecMeasureTransport[] =
static ArgsParser measuretransportargsparser( argsspecMeasureTransport, 3 );
-std::vector<ObjectCalcer*> MeasureTransportCalcer::parents() const
+std::vector<ObjectCalcer*> MeasureTransportCalcer::tqparents() const
{
std::vector<ObjectCalcer*> ret;
ret.push_back( mcircle );
@@ -46,7 +46,7 @@ MeasureTransportCalcer::~MeasureTransportCalcer()
void MeasureTransportCalcer::calc( const KigDocument& )
{
- if ( ! measuretransportargsparser.checkArgs( parents() ) )
+ if ( ! measuretransportargsparser.checkArgs( tqparents() ) )
return new InvalidImp();
if ( ! isPointOnCurve( mpoint, mcircle ) )
diff --git a/kig/objects/special_calcers.h b/kig/objects/special_calcers.h
index 640587cc..812d7ee5 100644
--- a/kig/objects/special_calcers.h
+++ b/kig/objects/special_calcers.h
@@ -29,7 +29,7 @@ public:
MeasureTransportCalcer(ObjectCalcer* circle, ObjectCalcer* point, ObjectCalcer* segment );
~MeasureTransportCalcer();
- std::vector<ObjectCalcer*> parents() const;
+ std::vector<ObjectCalcer*> tqparents() const;
void calc( const KigDocument& );
const ObjectImpType* impRequirement(
ObjectCalcer* o, const std::vector<ObjectCalcer*>& os ) const;
diff --git a/kig/objects/tests_type.cc b/kig/objects/tests_type.cc
index e85c111e..a0a072bf 100644
--- a/kig/objects/tests_type.cc
+++ b/kig/objects/tests_type.cc
@@ -51,11 +51,11 @@ const AreParallelType* AreParallelType::instance()
return &t;
}
-ObjectImp* AreParallelType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* AreParallelType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const LineData& l1 = static_cast<const AbstractLineImp*>( parents[0] )->data();
- const LineData& l2 = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const LineData& l1 = static_cast<const AbstractLineImp*>( tqparents[0] )->data();
+ const LineData& l2 = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
if ( l1.isParallelTo( l2 ) )
return new TestResultImp( i18n( "These lines are parallel." ) );
@@ -95,11 +95,11 @@ const AreOrthogonalType* AreOrthogonalType::instance()
return &t;
}
-ObjectImp* AreOrthogonalType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* AreOrthogonalType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const LineData& l1 = static_cast<const AbstractLineImp*>( parents[0] )->data();
- const LineData& l2 = static_cast<const AbstractLineImp*>( parents[1] )->data();
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const LineData& l1 = static_cast<const AbstractLineImp*>( tqparents[0] )->data();
+ const LineData& l2 = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
if ( l1.isOrthogonalTo( l2 ) )
return new TestResultImp( i18n( "These lines are orthogonal." ) );
@@ -141,12 +141,12 @@ const AreCollinearType* AreCollinearType::instance()
return &t;
}
-ObjectImp* AreCollinearType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* AreCollinearType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const Coordinate& p1 = static_cast<const PointImp*>( parents[0] )->coordinate();
- const Coordinate& p2 = static_cast<const PointImp*>( parents[1] )->coordinate();
- const Coordinate& p3 = static_cast<const PointImp*>( parents[2] )->coordinate();
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const Coordinate& p1 = static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ const Coordinate& p2 = static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ const Coordinate& p3 = static_cast<const PointImp*>( tqparents[2] )->coordinate();
if ( areCollinear( p1, p2, p3 ) )
return new TestResultImp( i18n( "These points are collinear." ) );
@@ -184,11 +184,11 @@ const ContainsTestType* ContainsTestType::instance()
return &t;
}
-ObjectImp* ContainsTestType::calc( const Args& parents, const KigDocument& doc ) const
+ObjectImp* ContainsTestType::calc( const Args& tqparents, const KigDocument& doc ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const Coordinate& p = static_cast<const PointImp*>( parents[0] )->coordinate();
- const CurveImp* c = static_cast<const CurveImp*>( parents[1] );
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const Coordinate& p = static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ const CurveImp* c = static_cast<const CurveImp*>( tqparents[1] );
if ( c->containsPoint( p, doc ) )
return new TestResultImp( i18n( "This curve contains the point." ) );
@@ -230,11 +230,11 @@ const InPolygonTestType* InPolygonTestType::instance()
return &t;
}
-ObjectImp* InPolygonTestType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* InPolygonTestType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const Coordinate& p = static_cast<const PointImp*>( parents[0] )->coordinate();
- const PolygonImp* pol = static_cast<const PolygonImp*>( parents[1] );
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const Coordinate& p = static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ const PolygonImp* pol = static_cast<const PolygonImp*>( tqparents[1] );
if ( pol->isInPolygon( p ) )
return new TestResultImp( i18n( "This polygon contains the point." ) );
@@ -274,10 +274,10 @@ const ConvexPolygonTestType* ConvexPolygonTestType::instance()
return &t;
}
-ObjectImp* ConvexPolygonTestType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* ConvexPolygonTestType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const PolygonImp* pol = static_cast<const PolygonImp*>( parents[0] );
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const PolygonImp* pol = static_cast<const PolygonImp*>( tqparents[0] );
if ( pol->isConvex() )
return new TestResultImp( i18n( "This polygon is convex." ) );
@@ -321,12 +321,12 @@ const SameDistanceType* SameDistanceType::instance()
return &t;
}
-ObjectImp* SameDistanceType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* SameDistanceType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const Coordinate& p1 = static_cast<const PointImp*>( parents[0] )->coordinate();
- const Coordinate& p2 = static_cast<const PointImp*>( parents[1] )->coordinate();
- const Coordinate& p3 = static_cast<const PointImp*>( parents[2] )->coordinate();
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const Coordinate& p1 = static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ const Coordinate& p2 = static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ const Coordinate& p3 = static_cast<const PointImp*>( tqparents[2] )->coordinate();
if ( fabs( ( p1 - p2 ).length() - ( p1 - p3 ).length() ) < 10e-5 )
return new TestResultImp( i18n( "The two distances are the same." ) );
@@ -364,11 +364,11 @@ const VectorEqualityTestType* VectorEqualityTestType::instance()
return &t;
}
-ObjectImp* VectorEqualityTestType::calc( const Args& parents, const KigDocument& ) const
+ObjectImp* VectorEqualityTestType::calc( const Args& tqparents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const Coordinate& v1 = static_cast<const VectorImp*>( parents[0] )->dir();
- const Coordinate& v2 = static_cast<const VectorImp*>( parents[1] )->dir();
+ if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ const Coordinate& v1 = static_cast<const VectorImp*>( tqparents[0] )->dir();
+ const Coordinate& v2 = static_cast<const VectorImp*>( tqparents[1] )->dir();
if ( ( v1 - v2 ).length() < 10e-5 )
return new TestResultImp( i18n( "The two vectors are the same." ) );
diff --git a/kig/objects/tests_type.h b/kig/objects/tests_type.h
index 7498fc4f..4bc96f8c 100644
--- a/kig/objects/tests_type.h
+++ b/kig/objects/tests_type.h
@@ -27,7 +27,7 @@ class AreParallelType
~AreParallelType();
public:
static const AreParallelType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class AreOrthogonalType
~AreOrthogonalType();
public:
static const AreOrthogonalType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -49,7 +49,7 @@ class AreCollinearType
~AreCollinearType();
public:
static const AreCollinearType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -60,7 +60,7 @@ class ContainsTestType
~ContainsTestType();
public:
static const ContainsTestType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -71,7 +71,7 @@ class InPolygonTestType
~InPolygonTestType();
public:
static const InPolygonTestType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -82,7 +82,7 @@ class ConvexPolygonTestType
~ConvexPolygonTestType();
public:
static const ConvexPolygonTestType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -93,7 +93,7 @@ class SameDistanceType
~SameDistanceType();
public:
static const SameDistanceType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -104,7 +104,7 @@ class VectorEqualityTestType
~VectorEqualityTestType();
public:
static const VectorEqualityTestType* instance();
- ObjectImp* calc( const Args& parents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/text_imp.cc b/kig/objects/text_imp.cc
index 32591c16..e8feb7f0 100644
--- a/kig/objects/text_imp.cc
+++ b/kig/objects/text_imp.cc
@@ -51,9 +51,9 @@ void TextImp::draw( KigPainter& p ) const
p.drawTextFrame( mboundrect, mtext, mframe );
}
-bool TextImp::contains( const Coordinate& p, int, const KigWidget& ) const
+bool TextImp::tqcontains( const Coordinate& p, int, const KigWidget& ) const
{
- return mboundrect.contains( p );
+ return mboundrect.tqcontains( p );
}
bool TextImp::inRect( const Rect& r, int, const KigWidget& ) const
diff --git a/kig/objects/text_imp.h b/kig/objects/text_imp.h
index 54e33f79..54eb7647 100644
--- a/kig/objects/text_imp.h
+++ b/kig/objects/text_imp.h
@@ -30,7 +30,7 @@ class TextImp
Coordinate mloc;
bool mframe;
// with this var, we keep track of the place we drew in, for use in
- // the contains() function..
+ // the tqcontains() function..
mutable Rect mboundrect;
public:
typedef ObjectImp Parent;
@@ -44,7 +44,7 @@ public:
ObjectImp* transform( const Transformation& ) const;
void draw( KigPainter& p ) const;
- bool contains( const Coordinate& p, int width, const KigWidget& ) const;
+ bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const;
bool inRect( const Rect& r, int width, const KigWidget& ) const;
bool valid() const;
Rect surroundingRect() const;
diff --git a/kig/objects/text_type.cc b/kig/objects/text_type.cc
index 214b35c2..5fc637bd 100644
--- a/kig/objects/text_type.cc
+++ b/kig/objects/text_type.cc
@@ -76,11 +76,11 @@ const ObjectImpType* TextType::impRequirement( const ObjectImp* o, const Args& a
return ObjectImp::stype();
}
-ObjectImp* TextType::calc( const Args& parents, const KigDocument& doc ) const
+ObjectImp* TextType::calc( const Args& tqparents, const KigDocument& doc ) const
{
- if( parents.size() < 3 ) return new InvalidImp;
- Args firstthree( parents.begin(), parents.begin() + 3 );
- Args varargs( parents.begin() + 3, parents.end() );
+ if( tqparents.size() < 3 ) return new InvalidImp;
+ Args firstthree( tqparents.begin(), tqparents.begin() + 3 );
+ Args varargs( tqparents.begin() + 3, tqparents.end() );
if ( ! mparser.checkArgs( firstthree ) ) return new InvalidImp;
@@ -108,9 +108,9 @@ bool TextType::isFreelyTranslatable( const ObjectTypeCalcer& ) const
void TextType::move( ObjectTypeCalcer& ourobj, const Coordinate& to,
const KigDocument& d ) const
{
- const std::vector<ObjectCalcer*> parents = ourobj.parents();
- assert( parents.size() >= 3 );
- const std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.begin() + 3 );
+ const std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ assert( tqparents.size() >= 3 );
+ const std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 );
if( dynamic_cast<ObjectConstCalcer*>( firstthree[1] ) )
{
ObjectConstCalcer* c = static_cast<ObjectConstCalcer*>( firstthree[1] );
@@ -133,10 +133,10 @@ void TextType::executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
KigPart& doc, KigWidget&,
NormalMode& ) const
{
- std::vector<ObjectCalcer*> parents = c.parents();
- assert( parents.size() >= 3 );
+ std::vector<ObjectCalcer*> tqparents = c.tqparents();
+ assert( tqparents.size() >= 3 );
- std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.begin() + 3 );
+ std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 );
assert( mparser.checkArgs( firstthree ) );
assert( dynamic_cast<ObjectConstCalcer*>( firstthree[0] ) );
@@ -144,11 +144,11 @@ void TextType::executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c,
if ( i == 0 )
{
- QClipboard* cb = kapp->clipboard();
+ TQClipboard* cb = kapp->tqclipboard();
// copy the text into the clipboard
const TextImp* ti = static_cast<const TextImp*>( c.imp() );
- cb->setText( ti->text(), QClipboard::Clipboard );
+ cb->setText( ti->text(), TQClipboard::Clipboard );
}
else if ( i == 1 )
{
@@ -201,10 +201,10 @@ Args TextType::sortArgs( const Args& args ) const
std::vector<ObjectCalcer*> TextType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- const std::vector<ObjectCalcer*> parents = ourobj.parents();
- assert( parents.size() >= 3 );
- std::vector<ObjectCalcer*> ret = parents[1]->movableParents();
- ret.push_back( parents[1] );
+ const std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ assert( tqparents.size() >= 3 );
+ std::vector<ObjectCalcer*> ret = tqparents[1]->movableParents();
+ ret.push_back( tqparents[1] );
return ret;
}
diff --git a/kig/objects/text_type.h b/kig/objects/text_type.h
index 8f97d4ea..5968e040 100644
--- a/kig/objects/text_type.h
+++ b/kig/objects/text_type.h
@@ -29,11 +29,11 @@ class TextType
public:
static const TextType* instance();
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
const ObjectImpType* resultId() const;
- ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
+ ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
Args sortArgs( const Args& args ) const;