summaryrefslogtreecommitdiffstats
path: root/kig/objects
diff options
context:
space:
mode:
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/conic_types.cc104
-rw-r--r--kig/objects/conic_types.h22
-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_type.cc12
-rw-r--r--kig/objects/locus_imp.h4
-rw-r--r--kig/objects/object_calcer.cc34
-rw-r--r--kig/objects/object_calcer.h44
-rw-r--r--kig/objects/object_factory.cc88
-rw-r--r--kig/objects/object_factory.h10
-rw-r--r--kig/objects/object_type.cc8
-rw-r--r--kig/objects/object_type.h18
-rw-r--r--kig/objects/other_type.cc18
-rw-r--r--kig/objects/other_type.h8
-rw-r--r--kig/objects/point_type.cc104
-rw-r--r--kig/objects/point_type.h20
-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_type.cc28
-rw-r--r--kig/objects/text_type.h6
29 files changed, 499 insertions, 499 deletions
diff --git a/kig/objects/angle_type.cc b/kig/objects/angle_type.cc
index b0dc09c1..7b86411b 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& tqparents, const KigDocument& ) const
+ObjectImp* AngleType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( uint i = 0; i < tqparents.size(); ++i )
+ for ( uint i = 0; i < parents.size(); ++i )
points.push_back(
- static_cast<const PointImp*>( tqparents[i] )->coordinate() );
+ static_cast<const PointImp*>( parents[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*> tqparents = t.tqparents();
+ std::vector<ObjectCalcer*> parents = t.parents();
- assert( margsparser.checkArgs( tqparents ) );
+ assert( margsparser.checkArgs( parents ) );
- 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 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 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( tqparents ) );
- tqparents[2]->move( nc, d.document() );
+ MonitorDataObjects mon( getAllParents( parents ) );
+ parents[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& tqparents, const KigDocument& ) const
+ObjectImp* HalfAngleType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( uint i = 0; i < tqparents.size(); ++i )
+ for ( uint i = 0; i < parents.size(); ++i )
points.push_back(
- static_cast<const PointImp*>( tqparents[i] )->coordinate() );
+ static_cast<const PointImp*>( parents[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 cb0a4c5f..cdfe0294 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& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) 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& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) 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 77b9dc6a..0f8eecec 100644
--- a/kig/objects/base_type.cc
+++ b/kig/objects/base_type.cc
@@ -33,13 +33,13 @@ ObjectABType::~ObjectABType()
{
}
-ObjectImp* ObjectABType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* ObjectABType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) )
+ if ( ! margsparser.checkArgs( parents ) )
return new InvalidImp;
- Coordinate a = static_cast<const PointImp*>( tqparents[0] )->coordinate();
- Coordinate b = static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ Coordinate a = static_cast<const PointImp*>( parents[0] )->coordinate();
+ Coordinate b = static_cast<const PointImp*>( parents[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*> tqparents = o.tqparents();
- return tqparents[0]->isFreelyTranslatable() && tqparents[1]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ return parents[0]->isFreelyTranslatable() && parents[1]->isFreelyTranslatable();
}
void ObjectABType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- 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();
+ 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 dist = b - a;
- if ( tqparents[0]->canMove() )
- tqparents[0]->move( to, d );
- if ( tqparents[1]->canMove() )
- tqparents[1]->move( to + dist, d );
+ if ( parents[0]->canMove() )
+ parents[0]->move( to, d );
+ if ( parents[1]->canMove() )
+ parents[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*> tqparents = o.tqparents();
- assert( margsparser.checkArgs( tqparents ) );
- return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ assert( margsparser.checkArgs( parents ) );
+ return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> ObjectABType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ std::vector<ObjectCalcer*> parents = ourobj.parents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = tqparents[1]->movableParents();
+ tmp = parents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( tqparents.begin(), tqparents.end() );
+ ret.insert( parents.begin(), parents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
diff --git a/kig/objects/conic_types.cc b/kig/objects/conic_types.cc
index 58209011..34396369 100644
--- a/kig/objects/conic_types.cc
+++ b/kig/objects/conic_types.cc
@@ -57,12 +57,12 @@ ConicB5PType::~ConicB5PType()
{
}
-ObjectImp* ConicB5PType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* ConicB5PType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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& tqparents, const KigDocument& ) const
+ObjectImp* ConicBAAPType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) )
+ if ( ! margsparser.checkArgs( parents ) )
return new InvalidImp;
- 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();
+ 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();
return new ConicImpCart( calcConicByAsymptotes( la, lb, c ) );
}
-ObjectImp* ConicBFFPType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* ConicBFFPType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> cs;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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& tqparents, const KigDocument& ) const
+ObjectImp* ConicBDFPType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
- const LineData line = static_cast<const AbstractLineImp*>( tqparents[0] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( parents[0] )->data();
const Coordinate focus =
- static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ static_cast<const PointImp*>( parents[1] )->coordinate();
Coordinate point;
- if ( tqparents.size() == 3 )
- point = static_cast<const PointImp*>( tqparents[2] )->coordinate();
+ if ( parents.size() == 3 )
+ point = static_cast<const PointImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* ParabolaBTPType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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& tqparents, const KigDocument& ) const
+ObjectImp* ConicPolarPointType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const ConicCartesianData c = static_cast<const ConicImp*>( tqparents[0] )->cartesianData();
- const LineData l = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ const ConicCartesianData c = static_cast<const ConicImp*>( parents[0] )->cartesianData();
+ const LineData l = static_cast<const AbstractLineImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* ConicPolarLineType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const ConicCartesianData c = static_cast<const ConicImp*>( tqparents[0] )->cartesianData();
- const Coordinate p = static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ const ConicCartesianData c = static_cast<const ConicImp*>( parents[0] )->cartesianData();
+ const Coordinate p = static_cast<const PointImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* ConicDirectrixType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
const ConicPolarData data =
- static_cast<const ConicImp*>( tqparents[0] )->polarData();
+ static_cast<const ConicImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* EquilateralHyperbolaB4PType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> pts;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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& tqparents, const KigDocument& ) const
+ObjectImp* ConicAsymptoteType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
bool valid = true;
const LineData ret = calcConicAsymptote(
- static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
- static_cast<const IntImp*>( tqparents[1] )->data(),
+ static_cast<const ConicImp*>( parents[0] )->cartesianData(),
+ static_cast<const IntImp*>( parents[1] )->data(),
valid );
if ( valid )
@@ -565,18 +565,18 @@ const ConicRadicalType* ConicRadicalType::instance()
return &t;
}
-ObjectImp* ConicRadicalType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* ConicRadicalType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- if ( tqparents[0]->inherits( CircleImp::stype() ) &&
- tqparents[1]->inherits( CircleImp::stype() ) )
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( parents[0]->inherits( CircleImp::stype() ) &&
+ parents[1]->inherits( CircleImp::stype() ) )
{
- if( static_cast<const IntImp*>( tqparents[2] )->data() != 1 )
+ if( static_cast<const IntImp*>( parents[2] )->data() != 1 )
return new InvalidImp;
else
{
- const CircleImp* c1 = static_cast<const CircleImp*>( tqparents[0] );
- const CircleImp* c2 = static_cast<const CircleImp*>( tqparents[1] );
+ const CircleImp* c1 = static_cast<const CircleImp*>( parents[0] );
+ const CircleImp* c2 = static_cast<const CircleImp*>( parents[1] );
const Coordinate a = calcCircleRadicalStartPoint(
c1->center(), c2->center(), c1->squareRadius(), c2->squareRadius()
);
@@ -588,10 +588,10 @@ ObjectImp* ConicRadicalType::calc( const Args& tqparents, const KigDocument& ) c
{
bool valid = true;
const LineData l = calcConicRadical(
- 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 );
+ 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 );
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*> tqparents = t.tqparents();
- assert( dynamic_cast<ObjectConstCalcer*>( tqparents[3] ) );
- ObjectConstCalcer* zeroindexo = static_cast<ObjectConstCalcer*>( tqparents[3] );
+ std::vector<ObjectCalcer*> parents = t.parents();
+ assert( dynamic_cast<ObjectConstCalcer*>( parents[3] ) );
+ ObjectConstCalcer* zeroindexo = static_cast<ObjectConstCalcer*>( parents[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 e3c44c01..858ca057 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class ConicBAAPType
~ConicBAAPType();
public:
static const ConicBAAPType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -96,7 +96,7 @@ class ParabolaBTPType
~ParabolaBTPType();
public:
static const ParabolaBTPType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -107,7 +107,7 @@ class EquilateralHyperbolaB4PType
~EquilateralHyperbolaB4PType();
public:
static const EquilateralHyperbolaB4PType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -118,7 +118,7 @@ class ConicPolarPointType
~ConicPolarPointType();
public:
static const ConicPolarPointType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -129,7 +129,7 @@ class ConicPolarLineType
~ConicPolarLineType();
public:
static const ConicPolarLineType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -140,7 +140,7 @@ class ConicDirectrixType
~ConicDirectrixType();
public:
static const ConicDirectrixType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -162,7 +162,7 @@ class ConicAsymptoteType
~ConicAsymptoteType();
public:
static const ConicAsymptoteType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -173,7 +173,7 @@ class ConicRadicalType
~ConicRadicalType();
public:
static const ConicRadicalType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
TQStringList specialActions() const;
void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t,
diff --git a/kig/objects/cubic_type.cc b/kig/objects/cubic_type.cc
index 1878128a..c322b8c3 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& tqparents, const KigDocument& ) const
+ObjectImp* CubicNodeB6PType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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& tqparents, const KigDocument& ) const
+ObjectImp* CubicCuspB4PType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 2 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 2 ) ) return new InvalidImp;
std::vector<Coordinate> points;
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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 439c7367..39be7387 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class CubicNodeB6PType
~CubicNodeB6PType();
public:
static const CubicNodeB6PType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -49,7 +49,7 @@ class CubicCuspB4PType
~CubicCuspB4PType();
public:
static const CubicCuspB4PType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/intersection_types.cc b/kig/objects/intersection_types.cc
index 92cbefff..804d498d 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& tqparents, const KigDocument& ) const
+ObjectImp* ConicLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( tqparents[2] )->data();
+ int side = static_cast<const IntImp*>( parents[2] )->data();
assert( side == 1 || side == -1 );
- const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
Coordinate ret;
- if ( tqparents[0]->inherits( CircleImp::stype() ) )
+ if ( parents[0]->inherits( CircleImp::stype() ) )
{
// easy case..
- const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
+ const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
ret = calcCircleLineIntersect(
c->center(), c->squareRadius(), line, side );
}
@@ -75,7 +75,7 @@ ObjectImp* ConicLineIntersectionType::calc( const Args& tqparents, const KigDocu
{
// harder case..
ret = calcConicLineIntersect(
- static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
+ static_cast<const ConicImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* ConicLineOtherIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- Coordinate p = static_cast<const PointImp*>( tqparents[2] )->coordinate();
- const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ Coordinate p = static_cast<const PointImp*>( parents[2] )->coordinate();
+ const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
Coordinate ret;
-// if ( tqparents[0]->inherits( CircleImp::stype() ) )
+// if ( parents[0]->inherits( CircleImp::stype() ) )
// {
// // easy case..
-// const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
+// const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
// ret = calcCircleLineIntersect(
// c->center(), c->squareRadius(), line, side, valid );
// }
@@ -133,7 +133,7 @@ ObjectImp* ConicLineOtherIntersectionType::calc( const Args& tqparents, const Ki
double bay = line.b.y - line.a.y;
double knownparam = (pax*bax + pay*bay)/(bax*bax + bay*bay);
ret = calcConicLineIntersect(
- static_cast<const ConicImp*>( tqparents[0] )->cartesianData(),
+ static_cast<const ConicImp*>( parents[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& tqparents, const KigDocument& d ) const
+ObjectImp* LineLineIntersectionType::calc( const Args& parents, const KigDocument& d ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
Coordinate p =
calcIntersectionPoint(
- 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 ) )
+ 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 ) )
return new PointImp( p );
else return new InvalidImp();
}
@@ -204,15 +204,15 @@ const LineCubicIntersectionType* LineCubicIntersectionType::instance()
return &t;
}
-ObjectImp* LineCubicIntersectionType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* LineCubicIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- int which = static_cast<const IntImp*>( tqparents[2] )->data();
+ int which = static_cast<const IntImp*>( parents[2] )->data();
bool valid = true;
const Coordinate c = calcCubicLineIntersect(
- static_cast<const CubicImp*>( tqparents[0] )->data(),
- static_cast<const AbstractLineImp*>( tqparents[1] )->data(),
+ static_cast<const CubicImp*>( parents[0] )->data(),
+ static_cast<const AbstractLineImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* CircleCircleIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( tqparents[2] )->data();
+ int side = static_cast<const IntImp*>( parents[2] )->data();
assert( side == 1 || side == -1 );
- const CircleImp* c1 = static_cast<const CircleImp*>( tqparents[0] );
- const CircleImp* c2 = static_cast<const CircleImp*>( tqparents[1] );
+ const CircleImp* c1 = static_cast<const CircleImp*>( parents[0] );
+ const CircleImp* c2 = static_cast<const CircleImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* ArcLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- int side = static_cast<const IntImp*>( tqparents[2] )->data();
+ int side = static_cast<const IntImp*>( parents[2] )->data();
assert( side == 1 || side == -1 );
- const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
- const ArcImp* c = static_cast<const ArcImp*>( tqparents[0] );
+ const ArcImp* c = static_cast<const ArcImp*>( parents[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 46d60199..9e1df62e 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -51,7 +51,7 @@ class ConicLineOtherIntersectionType
~ConicLineOtherIntersectionType();
public:
static const ConicLineOtherIntersectionType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -62,7 +62,7 @@ class LineLineIntersectionType
~LineLineIntersectionType();
public:
static const LineLineIntersectionType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -73,7 +73,7 @@ class LineCubicIntersectionType
~LineCubicIntersectionType();
public:
static const LineCubicIntersectionType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -84,7 +84,7 @@ class CircleCircleIntersectionType
~CircleCircleIntersectionType();
public:
static const CircleCircleIntersectionType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -98,7 +98,7 @@ class ArcLineIntersectionType
~ArcLineIntersectionType();
public:
static const ArcLineIntersectionType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/line_type.cc b/kig/objects/line_type.cc
index 84deb46e..a02cc80b 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*> tqparents = c.tqparents();
- assert( margsparser.checkArgs( tqparents ) );
+ std::vector<ObjectCalcer*> parents = c.parents();
+ assert( margsparser.checkArgs( parents ) );
- Coordinate a = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
- Coordinate b = static_cast<const PointImp*>( tqparents[1]->imp() )->coordinate();
+ Coordinate a = static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
+ Coordinate b = static_cast<const PointImp*>( parents[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( tqparents ) );
- tqparents[1]->move( nb, d.document() );
+ MonitorDataObjects mon( getAllParents( parents ) );
+ parents[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.h b/kig/objects/locus_imp.h
index b2100634..54ec7f13 100644
--- a/kig/objects/locus_imp.h
+++ b/kig/objects/locus_imp.h
@@ -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 tqparents
+ * be very bad for LocusImp to have to keep references to its parents
* as Objects ( since only the objects know how they are related to
- * their tqparents ). This is how we used to do it, but the current
+ * their parents ). 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
diff --git a/kig/objects/object_calcer.cc b/kig/objects/object_calcer.cc
index ae442aae..38c0b194 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( mtqparents.size() );
- std::transform( mtqparents.begin(), mtqparents.end(),
+ a.reserve( mparents.size() );
+ std::transform( mparents.begin(), mparents.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*>& tqparents, bool sort )
- : mtqparents( ( sort )?type->sortArgs( tqparents ):tqparents ), mtype( type ), mimp( 0 )
+ const std::vector<ObjectCalcer*>& parents, bool sort )
+ : mparents( ( sort )?type->sortArgs( parents ):parents ), mtype( type ), mimp( 0 )
{
- std::for_each( mtqparents.begin(), mtqparents.end(),
+ std::for_each( mparents.begin(), mparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::addChild ), this ) );
}
@@ -68,9 +68,9 @@ void ObjectConstCalcer::calc( const KigDocument& )
{
}
-std::vector<ObjectCalcer*> ObjectConstCalcer::tqparents() const
+std::vector<ObjectCalcer*> ObjectConstCalcer::parents() const
{
- // we have no tqparents..
+ // we have no parents..
return std::vector<ObjectCalcer*>();
}
@@ -99,9 +99,9 @@ const ObjectImp* ObjectTypeCalcer::imp() const
return mimp;
}
-std::vector<ObjectCalcer*> ObjectTypeCalcer::tqparents() const
+std::vector<ObjectCalcer*> ObjectTypeCalcer::parents() const
{
- return mtqparents;
+ return mparents;
}
void ObjectCalcer::addChild( ObjectCalcer* c )
@@ -121,7 +121,7 @@ void ObjectCalcer::delChild( ObjectCalcer* c )
ObjectTypeCalcer::~ObjectTypeCalcer()
{
- std::for_each( mtqparents.begin(), mtqparents.end(),
+ std::for_each( mparents.begin(), mparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) );
delete mimp;
}
@@ -154,7 +154,7 @@ const ObjectImp* ObjectPropertyCalcer::imp() const
return mimp;
}
-std::vector<ObjectCalcer*> ObjectPropertyCalcer::tqparents() const
+std::vector<ObjectCalcer*> ObjectPropertyCalcer::parents() const
{
std::vector<ObjectCalcer*> ret;
ret.push_back( mtqparent );
@@ -197,7 +197,7 @@ const ObjectImpType* ObjectTypeCalcer::impRequirement(
ObjectCalcer* o, const std::vector<ObjectCalcer*>& os ) const
{
Args args;
- args.reserve( mtqparents.size() );
+ args.reserve( mparents.size() );
std::transform(
os.begin(), os.end(),
std::back_inserter( 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( mtqparents.begin(), mtqparents.end(),
+ std::for_each( mparents.begin(), mparents.end(),
std::bind2nd( std::mem_fun( &ObjectCalcer::delChild ), this ) );
- mtqparents = np;
+ mparents = np;
}
void ObjectTypeCalcer::setType( const ObjectType* t )
@@ -270,7 +270,7 @@ 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 tqparents to move them ), and the ObjectType's depend
+ // move on its parents 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 );
@@ -310,9 +310,9 @@ bool ObjectPropertyCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const
bool ObjectTypeCalcer::isDefinedOnOrThrough( const ObjectCalcer* o ) const
{
Args args;
- args.reserve( mtqparents.size() );
+ args.reserve( mparents.size() );
std::transform(
- mtqparents.begin(), mtqparents.end(),
+ mparents.begin(), mparents.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 1aa83db4..92eebc8e 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 tqparents ( the ObjectCalcer's representing the points ), and
+ * two parents ( 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 tqparents moves.. ).
+ * do so ( i.e. every time one of its parents moves.. ).
*
* Each ObjectHolder keeps its ObjectImp itself, and recalculates it
- * from its tqparents in its calc() method ( if necessary ).
+ * from its parents 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
- * tqparents, to ensure that those aren't deleted before it is deleted.
+ * parents, 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 tqparents.. At the bottom, there are Calcer's that
+ * depend on their parents.. 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 tqparents that serve only to hold
+ * top, there are Calcer's without parents 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 tqparents, and some other classes like ObjectHolder take a
+ * to their parents, and some other classes like ObjectHolder take a
* reference to some ObjectCalcer's that they don't want to see
* deleted..
*/
@@ -108,21 +108,21 @@ public:
/**
* Returns the tqparent ObjectCalcer's of this ObjectCalcer.
*/
- virtual std::vector<ObjectCalcer*> tqparents() const = 0;
+ virtual std::vector<ObjectCalcer*> parents() const = 0;
/**
* Returns the ObjectImp of this ObjectCalcer.
*/
virtual const ObjectImp* imp() const = 0;
/**
* Makes the ObjectCalcer recalculate its ObjectImp from its
- * tqparents.
+ * parents.
*/
virtual void calc( const KigDocument& ) = 0;
/**
- * An ObjectCalcer expects its tqparents to have an ObjectImp of a
+ * An ObjectCalcer expects its parents 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 tqparents in order, and
+ * should have. \p os is a list of all the parents in order, and
* \p o is part of it. This method will return the ObjectImpType
* that the tqparent should *at least* be. For example, a Translated
* object can translate any sort of object, so it will return
@@ -144,7 +144,7 @@ public:
virtual bool isFreelyTranslatable() const;
/**
* Moving an object most of the time signifies invoking changes in
- * some of its tqparents. This method returns the set of tqparents that
+ * some of its parents. This method returns the set of parents 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*> mtqparents;
+ std::vector<ObjectCalcer*> mparents;
const ObjectType* mtype;
ObjectImp* mimp;
public:
typedef myboost::intrusive_ptr<ObjectTypeCalcer> shared_ptr;
/**
- * Construct a new ObjectTypeCalcer with a given type and tqparents.
+ * Construct a new ObjectTypeCalcer with a given type and parents.
*/
-// ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& tqparents );
+// ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& parents );
/**
* the sort boolean tells whether the sortArgs method should be invoked or not;
* if not present
*/
- ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& tqparents, bool sort=true );
+ ObjectTypeCalcer( const ObjectType* type, const std::vector<ObjectCalcer*>& parents, bool sort=true );
~ObjectTypeCalcer();
const ObjectImp* imp() const;
- std::vector<ObjectCalcer*> tqparents() const;
+ std::vector<ObjectCalcer*> parents() const;
void calc( const KigDocument& doc );
/**
- * 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.
+ * 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.
*/
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*> tqparents() const;
+ std::vector<ObjectCalcer*> parents() const;
/**
* Set the ObjectImp of this ObjectConstCalcer to the given
@@ -287,7 +287,7 @@ public:
~ObjectPropertyCalcer();
const ObjectImp* imp() const;
- std::vector<ObjectCalcer*> tqparents() const;
+ std::vector<ObjectCalcer*> parents() const;
void calc( const KigDocument& doc );
int propId() const;
diff --git a/kig/objects/object_factory.cc b/kig/objects/object_factory.cc
index 5b1a6add..c2d7b3b5 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*> 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 );
+ 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 );
}
ObjectTypeCalcer* ObjectFactory::constrainedPointCalcer(
ObjectCalcer* curve, double param ) const
{
assert( curve->imp()->inherits( CurveImp::stype() ) );
- std::vector<ObjectCalcer*> tqparents;
- tqparents.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) );
- tqparents.push_back( curve );
- return new ObjectTypeCalcer( ConstrainedPointType::instance(), tqparents );
+ std::vector<ObjectCalcer*> parents;
+ parents.push_back( new ObjectConstCalcer( new DoubleImp( param ) ) );
+ parents.push_back( curve );
+ return new ObjectTypeCalcer( ConstrainedPointType::instance(), parents );
}
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->tqparents().size() == 2 );
- ObjectCalcer* curve = a->tqparents().back();
+ assert( constrained->parents().size() == 2 );
+ ObjectCalcer* curve = a->parents().back();
const ObjectCalcer* moving = b;
- 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 ) );
+ 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 ) );
- ObjectHierarchy hier( hiertqparents, moving );
+ ObjectHierarchy hier( hierparents, moving );
- 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 );
+ 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 );
- return new ObjectTypeCalcer( LocusType::instance(), realtqparents );
+ return new ObjectTypeCalcer( LocusType::instance(), realparents );
}
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*>& tqparents,
+ bool needframe, const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const
{
- return new ObjectHolder( labelCalcer( s, loc, needframe, tqparents, doc ) );
+ return new ObjectHolder( labelCalcer( s, loc, needframe, parents, doc ) );
}
ObjectTypeCalcer* ObjectFactory::labelCalcer(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& tqparents,
+ bool needframe, const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const
{
- return attachedLabelCalcer( s, 0, loc, needframe, tqparents, doc );
+ return attachedLabelCalcer( s, 0, loc, needframe, parents, doc );
}
ObjectTypeCalcer* ObjectFactory::attachedLabelCalcer(
const TQString& s, ObjectCalcer* p,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& ntqparents,
+ const std::vector<ObjectCalcer*>& nparents,
const KigDocument& doc ) const
{
- std::vector<ObjectCalcer*> tqparents;
- tqparents.reserve( ntqparents.size() + 3 );
- tqparents.push_back( new ObjectConstCalcer( new IntImp( needframe ? 1 : 0 ) ) );
+ std::vector<ObjectCalcer*> parents;
+ parents.reserve( nparents.size() + 3 );
+ parents.push_back( new ObjectConstCalcer( new IntImp( needframe ? 1 : 0 ) ) );
- tqparents.push_back( getAttachPoint( p, loc, doc ) );
+ parents.push_back( getAttachPoint( p, loc, doc ) );
- 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 );
+ 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 );
ret->calc( doc );
return ret;
}
@@ -268,10 +268,10 @@ ObjectCalcer* ObjectFactory::getAttachPoint(
ObjectHolder* ObjectFactory::attachedLabel(
const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& tqparents,
+ const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const
{
- return new ObjectHolder( attachedLabelCalcer( s, locationtqparent, loc, needframe, tqparents, doc ) );
+ return new ObjectHolder( attachedLabelCalcer( s, locationtqparent, loc, needframe, parents, doc ) );
}
ObjectPropertyCalcer* ObjectFactory::propertyObjectCalcer(
@@ -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*> 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 );
+ 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 );
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 f3a28d66..d99cce8b 100644
--- a/kig/objects/object_factory.h
+++ b/kig/objects/object_factory.h
@@ -94,16 +94,16 @@ public:
ObjectHolder* locus( ObjectCalcer* a, ObjectCalcer* b ) const;
/**
- * returns a label with text \p s at point \p c .. It ( and its tqparents )
+ * returns a label with text \p s at point \p c .. It ( and its parents )
* is calced already...
*/
ObjectHolder* label(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& tqparents,
+ bool needframe, const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const;
ObjectTypeCalcer* labelCalcer(
const TQString& s, const Coordinate& loc,
- bool needframe, const std::vector<ObjectCalcer*>& tqparents,
+ bool needframe, const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const;
/**
@@ -113,7 +113,7 @@ public:
ObjectTypeCalcer* attachedLabelCalcer(
const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& tqparents,
+ const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const;
/**
* this has been added because it comes handy when redefining
@@ -127,7 +127,7 @@ public:
ObjectHolder* attachedLabel(
const TQString& s, ObjectCalcer* locationtqparent,
const Coordinate& loc, bool needframe,
- const std::vector<ObjectCalcer*>& tqparents,
+ const std::vector<ObjectCalcer*>& parents,
const KigDocument& doc ) const;
/**
diff --git a/kig/objects/object_type.cc b/kig/objects/object_type.cc
index 93634b63..ea85e4f8 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& tqparents ) const
+const ObjectImpType* ArgsParserObjectType::impRequirement( const ObjectImp* o, const Args& parents ) const
{
- return margsparser.impRequirement( o, tqparents );
+ return margsparser.impRequirement( o, parents );
}
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& tqparents ) const
+bool ArgsParserObjectType::isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const
{
- return margsparser.isDefinedOnOrThrough( o, tqparents );
+ return margsparser.isDefinedOnOrThrough( o, parents );
}
diff --git a/kig/objects/object_type.h b/kig/objects/object_type.h
index 60b32026..54471e46 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& tqparents, const KigDocument& d ) const = 0;
+ virtual ObjectImp* calc( const Args& parents, 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 tqparents would be given as tqparents to
+ * Supposing that \p parents would be given as parents 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 tqparents )
+ * that \p o should at least have.. ( \p o should be part of \p parents )
*/
- virtual const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const = 0;
+ virtual const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const = 0;
/**
- * Supposing that \p tqparents would be given as tqparents to this type's
+ * Supposing that \p parents would be given as parents 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& tqparents ) const = 0;
+ virtual bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) 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 tqparents can be specified in an ArgsParser..
+ * inherit from if its parents 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& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
const ArgsParser& argsParser() const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& args ) const;
diff --git a/kig/objects/other_type.cc b/kig/objects/other_type.cc
index 7d632524..80986e82 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& tqparents, const KigDocument& ) const
+ObjectImp* CopyObjectType::calc( const Args& parents, const KigDocument& ) const
{
- assert( tqparents.size() == 1 );
- return tqparents[0]->copy();
+ assert( parents.size() == 1 );
+ return parents[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& tqparents ) const
+const ObjectImpType* LocusType::impRequirement( const ObjectImp* o, const Args& parents ) const
{
- assert( tqparents.size() >= 2 );
- Args firsttwo( tqparents.begin(), tqparents.begin() + 2 );
- if ( o == tqparents[0] || o == tqparents[1] )
+ assert( parents.size() >= 2 );
+ Args firsttwo( parents.begin(), parents.begin() + 2 );
+ if ( o == parents[0] || o == parents[1] )
return margsparser.impRequirement( o, firsttwo );
else
{
- const HierarchyImp* h = dynamic_cast<const HierarchyImp*>( tqparents[0] );
+ const HierarchyImp* h = dynamic_cast<const HierarchyImp*>( parents[0] );
if ( h )
{
PointImp* p = new PointImp( Coordinate() );
- Args hargs( tqparents.begin()+ 2, tqparents.end() );
+ Args hargs( parents.begin()+ 2, parents.end() );
hargs.push_back( p );
ArgsParser hparser = h->data().argParser();
const ObjectImpType* ret = hparser.impRequirement( o, hargs );
diff --git a/kig/objects/other_type.h b/kig/objects/other_type.h
index f8f24209..6bbcead1 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& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) 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& tqparents, const KigDocument& d ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) 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;
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_type.cc b/kig/objects/point_type.cc
index 74fc9d37..f1c59ac4 100644
--- a/kig/objects/point_type.cc
+++ b/kig/objects/point_type.cc
@@ -52,12 +52,12 @@ FixedPointType::~FixedPointType()
{
}
-ObjectImp* FixedPointType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* FixedPointType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- double a = static_cast<const DoubleImp*>( tqparents[0] )->data();
- double b = static_cast<const DoubleImp*>( tqparents[1] )->data();
+ double a = static_cast<const DoubleImp*>( parents[0] )->data();
+ double b = static_cast<const DoubleImp*>( parents[1] )->data();
return new PointImp( Coordinate( a, b ) );
}
@@ -80,14 +80,14 @@ RelativePointType::~RelativePointType()
{
}
-ObjectImp* RelativePointType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* RelativePointType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- if ( ! tqparents[2]->attachPoint().valid() ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ if ( ! parents[2]->attachPoint().valid() ) return new InvalidImp;
- 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();
+ 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();
return new PointImp( reference + Coordinate( a, b ) );
}
@@ -109,12 +109,12 @@ const CursorPointType* CursorPointType::instance()
return &t;
}
-ObjectImp* CursorPointType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* CursorPointType::calc( const Args& parents, const KigDocument& ) const
{
- 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();
+ 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();
return new BogusPointImp( Coordinate( a, b ) );
}
@@ -124,12 +124,12 @@ const ObjectImpType* CursorPointType::resultId() const
return BogusPointImp::stype();
}
-ObjectImp* ConstrainedPointType::calc( const Args& tqparents, const KigDocument& doc ) const
+ObjectImp* ConstrainedPointType::calc( const Args& parents, const KigDocument& doc ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- double param = static_cast<const DoubleImp*>( tqparents[0] )->data();
- const Coordinate nc = static_cast<const CurveImp*>( tqparents[1] )->getPoint( param, doc );
+ double param = static_cast<const DoubleImp*>( parents[0] )->data();
+ const Coordinate nc = static_cast<const CurveImp*>( parents[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.tqparents();
+ std::vector<ObjectCalcer*> pa = ourobj.parents();
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.tqparents();
+ std::vector<ObjectCalcer*> pa = ourobj.parents();
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.tqparents();
+ std::vector<ObjectCalcer*> pa = ourobj.parents();
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*> tqparents = ourobj.tqparents();
- assert( margsparser.checkArgs( tqparents ) );
+ std::vector<ObjectCalcer*> parents = ourobj.parents();
+ assert( margsparser.checkArgs( parents ) );
- assert( dynamic_cast<ObjectConstCalcer*>( tqparents[0] ) );
- ObjectConstCalcer* paramo = static_cast<ObjectConstCalcer*>( tqparents[0] );
- const CurveImp* ci = static_cast<const CurveImp*>( tqparents[1]->imp() );
+ assert( dynamic_cast<ObjectConstCalcer*>( parents[0] ) );
+ ObjectConstCalcer* paramo = static_cast<ObjectConstCalcer*>( parents[0] );
+ const CurveImp* ci = static_cast<const CurveImp*>( parents[1]->imp() );
// fetch the new param..
const double np = ci->getParam( to, d );
@@ -427,11 +427,11 @@ void ConstrainedPointType::executeAction(
break;
case 0:
{
- std::vector<ObjectCalcer*> tqparents = o.tqparents();
- assert( dynamic_cast<ObjectConstCalcer*>( tqparents[0] ) &&
- tqparents[0]->imp()->inherits( DoubleImp::stype() ) );
+ std::vector<ObjectCalcer*> parents = o.parents();
+ assert( dynamic_cast<ObjectConstCalcer*>( parents[0] ) &&
+ parents[0]->imp()->inherits( DoubleImp::stype() ) );
- ObjectConstCalcer* po = static_cast<ObjectConstCalcer*>( tqparents[0] );
+ ObjectConstCalcer* po = static_cast<ObjectConstCalcer*>( parents[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( tqparents );
+ MonitorDataObjects mon( parents );
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.tqparents();
+ return ourobj.parents();
}
std::vector<ObjectCalcer*> RelativePointType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
std::vector<ObjectCalcer*> ret;
- ret.push_back( ourobj.tqparents()[0] );
- ret.push_back( ourobj.tqparents()[1] );
+ ret.push_back( ourobj.parents()[0] );
+ ret.push_back( ourobj.parents()[1] );
return ret;
}
std::vector<ObjectCalcer*> ConstrainedPointType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
std::vector<ObjectCalcer*> ret;
- ret.push_back( ourobj.tqparents()[0] );
+ ret.push_back( ourobj.parents()[0] );
return ret;
}
/* ----------------- Transport of measure ------------------------------ */
-ObjectImp* MeasureTransportType::calc( const Args& tqparents, const KigDocument& doc ) const
+ObjectImp* MeasureTransportType::calc( const Args& parents, const KigDocument& doc ) const
{
double measure;
- if ( tqparents.size() != 3 ) return new InvalidImp;
+ if ( parents.size() != 3 ) return new InvalidImp;
- if ( tqparents[0]->inherits (SegmentImp::stype()) )
+ if ( parents[0]->inherits (SegmentImp::stype()) )
{
- const SegmentImp* s = static_cast<const SegmentImp*>( tqparents[0] );
+ const SegmentImp* s = static_cast<const SegmentImp*>( parents[0] );
measure = s->length();
- } else if ( tqparents[0]->inherits (ArcImp::stype()) )
+ } else if ( parents[0]->inherits (ArcImp::stype()) )
{
- const ArcImp* s = static_cast<const ArcImp*>( tqparents[0] );
+ const ArcImp* s = static_cast<const ArcImp*>( parents[0] );
measure = s->radius()*s->angle();
} else return new InvalidImp;
- const Coordinate& p = static_cast<const PointImp*>( tqparents[2] )->coordinate();
- if ( tqparents[1]->inherits (LineImp::stype()) )
+ const Coordinate& p = static_cast<const PointImp*>( parents[2] )->coordinate();
+ if ( parents[1]->inherits (LineImp::stype()) )
{
- const LineImp* c = static_cast<const LineImp*>( tqparents[1] );
+ const LineImp* c = static_cast<const LineImp*>( parents[1] );
if ( !c->containsPoint( p, doc ) )
return new InvalidImp;
@@ -523,9 +523,9 @@ ObjectImp* MeasureTransportType::calc( const Args& tqparents, const KigDocument&
if ( nc.valid() ) return new PointImp( nc );
else return new InvalidImp;
- } else if ( tqparents[1]->inherits (CircleImp::stype()) )
+ } else if ( parents[1]->inherits (CircleImp::stype()) )
{
- const CircleImp* c = static_cast<const CircleImp*>( tqparents[1] );
+ const CircleImp* c = static_cast<const CircleImp*>( parents[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& tqparents, const KigDocument& doc ) const
+ObjectImp* MeasureTransportTypeOld::calc( const Args& parents, const KigDocument& doc ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const CircleImp* c = static_cast<const CircleImp*>( tqparents[0] );
- const Coordinate& p = static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ const CircleImp* c = static_cast<const CircleImp*>( parents[0] );
+ const Coordinate& p = static_cast<const PointImp*>( parents[1] )->coordinate();
if ( !c->containsPoint( p, doc ) )
return new InvalidImp;
- const SegmentImp* s = static_cast<const SegmentImp*>( tqparents[2] );
+ const SegmentImp* s = static_cast<const SegmentImp*>( parents[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 d1fb7674..69a7e2e8 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/polygon_type.cc b/kig/objects/polygon_type.cc
index 55aa4cd8..bca867da 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& tqparents, const KigDocument& ) const
+ObjectImp* TriangleB3PType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents, 1 ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents, 1 ) ) return new InvalidImp;
std::vector<Coordinate> points;
Coordinate centerofmass3 = Coordinate( 0, 0 );
- for ( Args::const_iterator i = tqparents.begin(); i != tqparents.end(); ++i )
+ for ( Args::const_iterator i = parents.begin(); i != parents.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*> tqparents = o.tqparents();
- return tqparents[0]->isFreelyTranslatable() &&
- tqparents[1]->isFreelyTranslatable() &&
- tqparents[2]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ return parents[0]->isFreelyTranslatable() &&
+ parents[1]->isFreelyTranslatable() &&
+ parents[2]->isFreelyTranslatable();
}
void TriangleB3PType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- 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 );
+ 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 );
}
const Coordinate TriangleB3PType::moveReferencePoint( const ObjectTypeCalcer& o ) const
{
- std::vector<ObjectCalcer*> tqparents = o.tqparents();
- assert( margsparser.checkArgs( tqparents ) );
- return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ assert( margsparser.checkArgs( parents ) );
+ return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> TriangleB3PType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ std::vector<ObjectCalcer*> parents = ourobj.parents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = tqparents[1]->movableParents();
+ tmp = parents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = tqparents[2]->movableParents();
+ tmp = parents[2]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( tqparents.begin(), tqparents.end() );
+ ret.insert( parents.begin(), parents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
@@ -151,11 +151,11 @@ const PolygonBNPType* PolygonBNPType::instance()
return &s;
}
-ObjectImp* PolygonBNPType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* PolygonBNPType::calc( const Args& parents, const KigDocument& ) const
{
- uint count = tqparents.size();
+ uint count = parents.size();
assert (count >= 3); /* non sono ammessi poligoni con meno di tre lati */
-// if ( tqparents[0] != tqparents[count] ) return new InvalidImp;
+// if ( parents[0] != parents[count] ) return new InvalidImp;
std::vector<Coordinate> points;
uint npoints = 0;
@@ -164,8 +164,8 @@ ObjectImp* PolygonBNPType::calc( const Args& tqparents, const KigDocument& ) con
for ( uint i = 0; i < count; ++i )
{
npoints++;
- if ( ! tqparents[i]->inherits( PointImp::stype() ) ) return new InvalidImp;
- Coordinate point = static_cast<const PointImp*>( tqparents[i] )->coordinate();
+ if ( ! parents[i]->inherits( PointImp::stype() ) ) return new InvalidImp;
+ Coordinate point = static_cast<const PointImp*>( parents[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*> tqparents = o.tqparents();
- for ( uint i = 0; i < tqparents.size(); ++i )
+ std::vector<ObjectCalcer*> parents = o.parents();
+ for ( uint i = 0; i < parents.size(); ++i )
{
- if ( !tqparents[i]->isFreelyTranslatable() ) return false;
+ if ( !parents[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*> tqparents = o.tqparents();
- const Coordinate ref = static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
- for ( uint i = 0; i < tqparents.size(); ++i )
+ 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 )
{
- const Coordinate a = static_cast<const PointImp*>( tqparents[i]->imp() )->coordinate();
- tqparents[i]->move( to + a - ref, d );
+ const Coordinate a = static_cast<const PointImp*>( parents[i]->imp() )->coordinate();
+ parents[i]->move( to + a - ref, d );
}
}
const Coordinate PolygonBNPType::moveReferencePoint( const ObjectTypeCalcer& o
) const
{
- std::vector<ObjectCalcer*> tqparents = o.tqparents();
- return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> PolygonBNPType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ std::vector<ObjectCalcer*> parents = ourobj.parents();
std::set<ObjectCalcer*> ret;
- for ( uint i = 0; i < tqparents.size(); ++i )
+ for ( uint i = 0; i < parents.size(); ++i )
{
- std::vector<ObjectCalcer*> tmp = tqparents[i]->movableParents();
+ std::vector<ObjectCalcer*> tmp = parents[i]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
}
- ret.insert( tqparents.begin(), tqparents.end() );
+ ret.insert( parents.begin(), parents.end() );
return std::vector<ObjectCalcer*>( ret.begin(), ret.end() );
}
@@ -281,26 +281,26 @@ const PolygonBCVType* PolygonBCVType::instance()
return &s;
}
-ObjectImp* PolygonBCVType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* PolygonBCVType::calc( const Args& parents, const KigDocument& ) const
{
- if ( tqparents.size() < 3 || tqparents.size() > 4 ) return new InvalidImp;
+ if ( parents.size() < 3 || parents.size() > 4 ) return new InvalidImp;
- if ( ( ! tqparents[0]->inherits( PointImp::stype() ) ) ||
- ( ! tqparents[1]->inherits( PointImp::stype() ) ) ||
- ( ! tqparents[2]->inherits( IntImp::stype() ) ) )
+ if ( ( ! parents[0]->inherits( PointImp::stype() ) ) ||
+ ( ! parents[1]->inherits( PointImp::stype() ) ) ||
+ ( ! parents[2]->inherits( IntImp::stype() ) ) )
return new InvalidImp;
const Coordinate center =
- static_cast<const PointImp*>( tqparents[0] )->coordinate();
+ static_cast<const PointImp*>( parents[0] )->coordinate();
const Coordinate vertex =
- static_cast<const PointImp*>( tqparents[1] )->coordinate();
+ static_cast<const PointImp*>( parents[1] )->coordinate();
const int sides =
- static_cast<const IntImp*>( tqparents[2] )->data();
+ static_cast<const IntImp*>( parents[2] )->data();
int twist = 1;
- if ( tqparents.size() == 4 )
+ if ( parents.size() == 4 )
{
- if ( ! tqparents[3]->inherits( IntImp::stype() ) ) return new InvalidImp;
- twist = static_cast<const IntImp*>( tqparents[3] )->data();
+ if ( ! parents[3]->inherits( IntImp::stype() ) ) return new InvalidImp;
+ twist = static_cast<const IntImp*>( parents[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*> tqparents = o.tqparents();
- return tqparents[0]->isFreelyTranslatable() &&
- tqparents[1]->isFreelyTranslatable();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ return parents[0]->isFreelyTranslatable() &&
+ parents[1]->isFreelyTranslatable();
}
void PolygonBCVType::move( ObjectTypeCalcer& o, const Coordinate& to,
const KigDocument& d ) const
{
- std::vector<ObjectCalcer*> tqparents = o.tqparents();
- // assert( margsparser.checkArgs( tqparents ) );
- if ( ! tqparents[0]->imp()->inherits( PointImp::stype() ) ||
- ! tqparents[1]->imp()->inherits( PointImp::stype() ) ) return;
+ std::vector<ObjectCalcer*> parents = o.parents();
+ // assert( margsparser.checkArgs( parents ) );
+ if ( ! parents[0]->imp()->inherits( PointImp::stype() ) ||
+ ! parents[1]->imp()->inherits( PointImp::stype() ) ) return;
- 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 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 PolygonBCVType::moveReferencePoint( const ObjectTypeCalcer& o) const
{
- std::vector<ObjectCalcer*> tqparents = o.tqparents();
- // assert( margsparser.checkArgs( tqparents ) );
- if ( ! tqparents[0]->imp()->inherits( PointImp::stype() ) ) return Coordinate::invalidCoord();
+ std::vector<ObjectCalcer*> parents = o.parents();
+ // assert( margsparser.checkArgs( parents ) );
+ if ( ! parents[0]->imp()->inherits( PointImp::stype() ) ) return Coordinate::invalidCoord();
- return static_cast<const PointImp*>( tqparents[0]->imp() )->coordinate();
+ return static_cast<const PointImp*>( parents[0]->imp() )->coordinate();
}
std::vector<ObjectCalcer*> PolygonBCVType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
+ std::vector<ObjectCalcer*> parents = ourobj.parents();
std::set<ObjectCalcer*> ret;
- std::vector<ObjectCalcer*> tmp = tqparents[0]->movableParents();
+ std::vector<ObjectCalcer*> tmp = parents[0]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- tmp = tqparents[1]->movableParents();
+ tmp = parents[1]->movableParents();
ret.insert( tmp.begin(), tmp.end() );
- ret.insert( &tqparents[0], &tqparents[1] );
+ ret.insert( &parents[0], &parents[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& tqparents, const KigDocument& ) const
+ObjectImp* PolygonLineIntersectionType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const PolygonImp* polygon = static_cast<const PolygonImp*>( tqparents[0] );
+ const PolygonImp* polygon = static_cast<const PolygonImp*>( parents[0] );
const std::vector<Coordinate> ppoints = polygon->points();
- const LineData line = static_cast<const AbstractLineImp*>( tqparents[1] )->data();
+ const LineData line = static_cast<const AbstractLineImp*>( parents[1] )->data();
Coordinate intersections[2];
uint whichintersection = 0;
bool boundleft = false;
bool boundright = false;
- if ( tqparents[1]->inherits( SegmentImp::stype() ) )
+ if ( parents[1]->inherits( SegmentImp::stype() ) )
{
boundleft = boundright = true;
}
- if ( tqparents[1]->inherits( RayImp::stype() ) )
+ if ( parents[1]->inherits( RayImp::stype() ) )
{
boundleft = true;
}
@@ -562,12 +562,12 @@ const PolygonVertexType* PolygonVertexType::instance()
return &t;
}
-ObjectImp* PolygonVertexType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* PolygonVertexType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
- const uint i = static_cast<const IntImp*>( tqparents[1] )->data();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
+ const uint i = static_cast<const IntImp*>( parents[1] )->data();
if ( i >= ppoints.size() ) return new InvalidImp;
@@ -605,12 +605,12 @@ const PolygonSideType* PolygonSideType::instance()
return &t;
}
-ObjectImp* PolygonSideType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* PolygonSideType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
- const uint i = static_cast<const IntImp*>( tqparents[1] )->data();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
+ const uint i = static_cast<const IntImp*>( parents[1] )->data();
if ( i >= ppoints.size() ) return new InvalidImp;
@@ -650,11 +650,11 @@ const ConvexHullType* ConvexHullType::instance()
return &t;
}
-ObjectImp* ConvexHullType::calc( const Args& tqparents, const KigDocument& ) const
+ObjectImp* ConvexHullType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
- const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( tqparents[0] )->points();
+ const std::vector<Coordinate> ppoints = static_cast<const PolygonImp*>( parents[0] )->points();
if ( ppoints.size() < 3 ) return new InvalidImp;
diff --git a/kig/objects/polygon_type.h b/kig/objects/polygon_type.h
index 09a77da8..a49100bd 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
- const ObjectImpType* impRequirement( const ObjectImp* o, const Args& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -111,7 +111,7 @@ class PolygonVertexType
~PolygonVertexType();
public:
static const PolygonVertexType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -122,7 +122,7 @@ class PolygonSideType
~PolygonSideType();
public:
static const PolygonSideType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -133,7 +133,7 @@ class ConvexHullType
~ConvexHullType();
public:
static const ConvexHullType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
#endif
diff --git a/kig/objects/special_calcers.cc b/kig/objects/special_calcers.cc
index 281017b5..e70bd4e9 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::tqparents() const
+std::vector<ObjectCalcer*> MeasureTransportCalcer::parents() const
{
std::vector<ObjectCalcer*> ret;
ret.push_back( mcircle );
@@ -46,7 +46,7 @@ MeasureTransportCalcer::~MeasureTransportCalcer()
void MeasureTransportCalcer::calc( const KigDocument& )
{
- if ( ! measuretransportargsparser.checkArgs( tqparents() ) )
+ if ( ! measuretransportargsparser.checkArgs( parents() ) )
return new InvalidImp();
if ( ! isPointOnCurve( mpoint, mcircle ) )
diff --git a/kig/objects/special_calcers.h b/kig/objects/special_calcers.h
index 812d7ee5..640587cc 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*> tqparents() const;
+ std::vector<ObjectCalcer*> parents() 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 a0a072bf..e85c111e 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& tqparents, const KigDocument& ) const
+ObjectImp* AreParallelType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& ) const
+ObjectImp* AreOrthogonalType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& ) const
+ObjectImp* AreCollinearType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& doc ) const
+ObjectImp* ContainsTestType::calc( const Args& parents, const KigDocument& doc ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& ) const
+ObjectImp* InPolygonTestType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& ) const
+ObjectImp* ConvexPolygonTestType::calc( const Args& parents, const KigDocument& ) const
{
- if ( ! margsparser.checkArgs( tqparents ) ) return new InvalidImp;
- const PolygonImp* pol = static_cast<const PolygonImp*>( tqparents[0] );
+ if ( ! margsparser.checkArgs( parents ) ) return new InvalidImp;
+ const PolygonImp* pol = static_cast<const PolygonImp*>( parents[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& tqparents, const KigDocument& ) const
+ObjectImp* SameDistanceType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( 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& tqparents, const KigDocument& ) const
+ObjectImp* VectorEqualityTestType::calc( const Args& parents, const KigDocument& ) const
{
- 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 ( ! 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 ( ( 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 4bc96f8c..7498fc4f 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& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -38,7 +38,7 @@ class AreOrthogonalType
~AreOrthogonalType();
public:
static const AreOrthogonalType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -49,7 +49,7 @@ class AreCollinearType
~AreCollinearType();
public:
static const AreCollinearType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -60,7 +60,7 @@ class ContainsTestType
~ContainsTestType();
public:
static const ContainsTestType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -71,7 +71,7 @@ class InPolygonTestType
~InPolygonTestType();
public:
static const InPolygonTestType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -82,7 +82,7 @@ class ConvexPolygonTestType
~ConvexPolygonTestType();
public:
static const ConvexPolygonTestType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -93,7 +93,7 @@ class SameDistanceType
~SameDistanceType();
public:
static const SameDistanceType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
@@ -104,7 +104,7 @@ class VectorEqualityTestType
~VectorEqualityTestType();
public:
static const VectorEqualityTestType* instance();
- ObjectImp* calc( const Args& tqparents, const KigDocument& ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& ) const;
const ObjectImpType* resultId() const;
};
diff --git a/kig/objects/text_type.cc b/kig/objects/text_type.cc
index 5fc637bd..09e84c30 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& tqparents, const KigDocument& doc ) const
+ObjectImp* TextType::calc( const Args& parents, const KigDocument& doc ) const
{
- if( tqparents.size() < 3 ) return new InvalidImp;
- Args firstthree( tqparents.begin(), tqparents.begin() + 3 );
- Args varargs( tqparents.begin() + 3, tqparents.end() );
+ if( parents.size() < 3 ) return new InvalidImp;
+ Args firstthree( parents.begin(), parents.begin() + 3 );
+ Args varargs( parents.begin() + 3, parents.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*> tqparents = ourobj.tqparents();
- assert( tqparents.size() >= 3 );
- const std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 );
+ const std::vector<ObjectCalcer*> parents = ourobj.parents();
+ assert( parents.size() >= 3 );
+ const std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.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*> tqparents = c.tqparents();
- assert( tqparents.size() >= 3 );
+ std::vector<ObjectCalcer*> parents = c.parents();
+ assert( parents.size() >= 3 );
- std::vector<ObjectCalcer*> firstthree( tqparents.begin(), tqparents.begin() + 3 );
+ std::vector<ObjectCalcer*> firstthree( parents.begin(), parents.begin() + 3 );
assert( mparser.checkArgs( firstthree ) );
assert( dynamic_cast<ObjectConstCalcer*>( firstthree[0] ) );
@@ -201,10 +201,10 @@ Args TextType::sortArgs( const Args& args ) const
std::vector<ObjectCalcer*> TextType::movableParents( const ObjectTypeCalcer& ourobj ) const
{
- const std::vector<ObjectCalcer*> tqparents = ourobj.tqparents();
- assert( tqparents.size() >= 3 );
- std::vector<ObjectCalcer*> ret = tqparents[1]->movableParents();
- ret.push_back( tqparents[1] );
+ const std::vector<ObjectCalcer*> parents = ourobj.parents();
+ assert( parents.size() >= 3 );
+ std::vector<ObjectCalcer*> ret = parents[1]->movableParents();
+ ret.push_back( parents[1] );
return ret;
}
diff --git a/kig/objects/text_type.h b/kig/objects/text_type.h
index 5968e040..8f97d4ea 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& tqparents ) const;
- bool isDefinedOnOrThrough( const ObjectImp* o, const Args& tqparents ) const;
+ const ObjectImpType* impRequirement( const ObjectImp* o, const Args& parents ) const;
+ bool isDefinedOnOrThrough( const ObjectImp* o, const Args& parents ) const;
const ObjectImpType* resultId() const;
- ObjectImp* calc( const Args& tqparents, const KigDocument& d ) const;
+ ObjectImp* calc( const Args& parents, const KigDocument& d ) const;
std::vector<ObjectCalcer*> sortArgs( const std::vector<ObjectCalcer*>& os ) const;
Args sortArgs( const Args& args ) const;