summaryrefslogtreecommitdiffstats
path: root/kig/misc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commitd8762de95349dc6edaa34db9bf699b367c1af6b1 (patch)
tree8c76a6ab8e4e92d13196cb11ddab2d0fb64ec680 /kig/misc
parent03458c4e2ca2e92deafe078d0e09e1acd4c4765f (diff)
downloadtdeedu-d8762de95349dc6edaa34db9bf699b367c1af6b1.tar.gz
tdeedu-d8762de95349dc6edaa34db9bf699b367c1af6b1.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kig/misc')
-rw-r--r--kig/misc/builtin_stuff.cc2
-rw-r--r--kig/misc/calcpaths.cc2
-rw-r--r--kig/misc/common.cpp12
-rw-r--r--kig/misc/coordinate_system.cpp12
-rw-r--r--kig/misc/guiaction.cc2
-rw-r--r--kig/misc/kigpainter.cpp6
-rw-r--r--kig/misc/object_constructor.cc4
-rw-r--r--kig/misc/object_hierarchy.cc10
-rw-r--r--kig/misc/rect.cc4
-rw-r--r--kig/misc/rect.h4
-rw-r--r--kig/misc/special_constructors.cc2
11 files changed, 30 insertions, 30 deletions
diff --git a/kig/misc/builtin_stuff.cc b/kig/misc/builtin_stuff.cc
index 432721cf..85d0d110 100644
--- a/kig/misc/builtin_stuff.cc
+++ b/kig/misc/builtin_stuff.cc
@@ -509,7 +509,7 @@ void setupBuiltinStuff()
ContainsTestType::instance(),
I18N_NOOP( "Contains Test" ),
I18N_NOOP( "Test whether a given curve contains a given point" ),
- "testtqcontains" );
+ "testcontains" );
ctors->add( c );
actions->add( new ConstructibleAction( c, "objects_new_containstest" ) );
diff --git a/kig/misc/calcpaths.cc b/kig/misc/calcpaths.cc
index 15dd9d98..3e947789 100644
--- a/kig/misc/calcpaths.cc
+++ b/kig/misc/calcpaths.cc
@@ -33,7 +33,7 @@
// I previously misunderstood the semantics of this function
// and thought that the os vector had to be completed with all
// the subtree generated by it. On the contrary, the os vector
-// tqcontains *all* the objects that we want, we only have to
+// contains *all* the objects that we want, we only have to
// reorder them. Now it *should* work, however we postpone
// activating this to a more proper moment
diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp
index 83fdd077..275170ef 100644
--- a/kig/misc/common.cpp
+++ b/kig/misc/common.cpp
@@ -422,7 +422,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// if ( fabs( a.x - b.x ) <= 1e-7 )
// {
// // too small to be useful..
-// return r.tqcontains( Coordinate( a.x, r.center().y ), miss );
+// return r.contains( Coordinate( a.x, r.center().y ), miss );
// }
// in case we have a segment we need also to check for the case when
@@ -433,7 +433,7 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// - if the midpoint is in the rect than returning true is safe (also
// in the cases where we have a ray or a line)
- if ( r.tqcontains( 0.5*( a + b ), miss ) ) return true;
+ if ( r.contains( 0.5*( a + b ), miss ) ) return true;
Coordinate dir = b - a;
double m = dir.y / dir.x;
@@ -455,10 +455,10 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b,
// intersection is not between the begin and end point.. ) and if
// the rect contains the intersection.. If it does, we have a winner..
return
- ( imp->tqcontains( leftint, width, w ) && r.tqcontains( leftint, miss ) ) ||
- ( imp->tqcontains( rightint, width, w ) && r.tqcontains( rightint, miss ) ) ||
- ( imp->tqcontains( bottomint, width, w ) && r.tqcontains( bottomint, miss ) ) ||
- ( imp->tqcontains( topint, width, w ) && r.tqcontains( topint, miss ) );
+ ( imp->contains( leftint, width, w ) && r.contains( leftint, miss ) ) ||
+ ( imp->contains( rightint, width, w ) && r.contains( rightint, miss ) ) ||
+ ( imp->contains( bottomint, width, w ) && r.contains( bottomint, miss ) ) ||
+ ( imp->contains( topint, width, w ) && r.contains( topint, miss ) );
}
bool operator==( const LineData& l, const LineData& r )
diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp
index deefe954..10bd96ce 100644
--- a/kig/misc/coordinate_system.cpp
+++ b/kig/misc/coordinate_system.cpp
@@ -80,7 +80,7 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos )
if( tinput[tinput.length() - 1 ] == ' ' ) tinput.truncate( tinput.length() - 1 );
if ( tinput[0] == '(' ) tinput = tinput.mid( 1 );
if( tinput[0] == ' ' ) tinput = tinput.mid( 1 );
- int scp = tinput.tqfind( ';' );
+ int scp = tinput.find( ';' );
if ( scp == -1 ) return mdv.validate( tinput, pos ) == Invalid ? Invalid : Valid;
else
{
@@ -101,16 +101,16 @@ TQValidator::State CoordinateValidator::validate( TQString & input, int & pos )
void CoordinateValidator::fixup( TQString & input ) const
{
- int nsc = input.tqcontains( ';' );
+ int nsc = input.contains( ';' );
if ( nsc > 1 )
{
// where is the second ';'
- int i = input.tqfind( ';' );
- i = input.tqfind( ';', i );
+ int i = input.find( ';' );
+ i = input.find( ';', i );
input = input.left( i );
};
// now the string has at most one semicolon left..
- int sc = input.tqfind( ';' );
+ int sc = input.find( ';' );
if ( sc == -1 )
{
sc = input.length();
@@ -616,7 +616,7 @@ Coordinate EuclideanCoords::snapToGrid( const Coordinate& c,
Coordinate PolarCoords::snapToGrid( const Coordinate& c,
const KigWidget& w ) const
{
- // we reuse the drawGrid code to tqfind
+ // we reuse the drawGrid code to find
// we multiply by sqrt( 2 ) cause we don't want to miss circles in
// the corners, that intersect with the axes outside of the
diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc
index d17501c2..4876e175 100644
--- a/kig/misc/guiaction.cc
+++ b/kig/misc/guiaction.cc
@@ -93,7 +93,7 @@ KigGUIAction::KigGUIAction( GUIAction* act,
{
setWhatsThis( act->description() );
TQString tooltip = act->descriptiveName();
- tooltip.tqreplace( TQRegExp( "&&" ), "&" );
+ tooltip.replace( TQRegExp( "&&" ), "&" );
setToolTip( tooltip );
}
diff --git a/kig/misc/kigpainter.cpp b/kig/misc/kigpainter.cpp
index 95be1837..81ae6574 100644
--- a/kig/misc/kigpainter.cpp
+++ b/kig/misc/kigpainter.cpp
@@ -835,7 +835,7 @@ void KigPainter::drawCurve( const CurveImp* curve )
bool dooverlay = ! overlaypt && h < hmaxoverlay && valid0 && valid1
&& fabs( p0.x - p1.x ) <= overlayRectSize()
&& fabs( p0.y - p1.y ) <= overlayRectSize();
- bool addn = sr.tqcontains( p2 ) || h >= hmax;
+ bool addn = sr.contains( p2 ) || h >= hmax;
// estimated error between the curve and the segments
double errsq = 1e21;
if ( allvalid ) errsq = (0.5*p0 + 0.5*p1 - p2).squareLength();
@@ -870,10 +870,10 @@ void KigPainter::drawCurve( const CurveImp* curve )
else if ( h >= hmin ) // we do not continue to subdivide indefinitely!
{
// push into stack in order to process both subintervals
- if ( addn || ( valid0 && sr.tqcontains( p0 ) ) )
+ if ( addn || ( valid0 && sr.contains( p0 ) ) )
workstack.push( workitem( curitem.first, coordparampair( t2, p2 ),
overlaypt ) );
- if ( addn || ( valid1 && sr.tqcontains( p1 ) ) )
+ if ( addn || ( valid1 && sr.contains( p1 ) ) )
{
curitem = workitem( coordparampair( t2, p2 ), curitem.second ,
overlaypt );
diff --git a/kig/misc/object_constructor.cc b/kig/misc/object_constructor.cc
index 5522a598..f2b9f330 100644
--- a/kig/misc/object_constructor.cc
+++ b/kig/misc/object_constructor.cc
@@ -554,7 +554,7 @@ void PropertyObjectConstructor::drawprelim(
const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
const KigDocument& d ) const
{
- int index = parents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname );
+ int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname );
assert ( index != -1 );
ObjectImp* imp = parents[0]->imp()->property( index, d );
drawer.draw( *imp, p, true );
@@ -565,7 +565,7 @@ std::vector<ObjectHolder*> PropertyObjectConstructor::build(
const std::vector<ObjectCalcer*>& parents, KigDocument&,
KigWidget& ) const
{
- int index = parents[0]->imp()->propertiesInternalNames().tqfindIndex( mpropinternalname );
+ int index = parents[0]->imp()->propertiesInternalNames().findIndex( mpropinternalname );
assert( index != -1 );
std::vector<ObjectHolder*> ret;
ret.push_back(
diff --git a/kig/misc/object_hierarchy.cc b/kig/misc/object_hierarchy.cc
index 264f7e8c..9b5a09a8 100644
--- a/kig/misc/object_hierarchy.cc
+++ b/kig/misc/object_hierarchy.cc
@@ -51,7 +51,7 @@ public:
// value to true.
virtual void checkDependsOnGiven( std::vector<bool>& dependsstack, int loc ) const = 0;
// this function is used to check whether the given objects are all
- // used by one or more of the final objects. The usedstack tqcontains
+ // used by one or more of the final objects. The usedstack contains
// a set of booleans telling which parts of the hierarchy are
// certainly ancestors of the final objects. In this function, the
// node should set all of its parents' booleans to true.
@@ -237,7 +237,7 @@ void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack,
int loc, const KigDocument& d ) const
{
assert( stack[mtqparent] );
- if ( mpropid == -1 ) mpropid = stack[mtqparent]->propertiesInternalNames().tqfindIndex( mname );
+ if ( mpropid == -1 ) mpropid = stack[mtqparent]->propertiesInternalNames().findIndex( mname );
if ( mpropid != -1 )
stack[loc] = stack[mtqparent]->property( mpropid, d );
else
@@ -247,7 +247,7 @@ void FetchPropertyNode::apply( std::vector<const ObjectImp*>& stack,
void FetchPropertyNode::apply( std::vector<ObjectCalcer*>& stack, int loc ) const
{
if ( mpropid == -1 )
- mpropid = stack[mtqparent]->imp()->propertiesInternalNames().tqfindIndex( mname );
+ mpropid = stack[mtqparent]->imp()->propertiesInternalNames().findIndex( mname );
assert( mpropid != -1 );
stack[loc] = new ObjectPropertyCalcer( stack[mtqparent], mpropid );
}
@@ -537,7 +537,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement&
{
// ApplyTypeNode
TQCString typen = e.attribute( "type" ).latin1();
- const ObjectType* type = ObjectTypeFactory::instance()->tqfind( typen );
+ const ObjectType* type = ObjectTypeFactory::instance()->find( typen );
if ( ! type )
{
error = i18n( "This Kig file uses an object of type \"%1\", "
@@ -696,7 +696,7 @@ const ObjectImpType* lowermost( const ObjectImpType* a, const ObjectImpType* b )
// this function is part of the visit procedure really. It is
// factored out, because it recurses for cache ObjectImp's. What this
// does is, it makes sure that object o is calcable, by putting
-// appropriate Node's in mnodes.. po is o->parents() and pl tqcontains
+// appropriate Node's in mnodes.. po is o->parents() and pl contains
// the location of objects that are already in mnodes and -1
// otherwise.. -1 means we have to store their ObjectImp, unless
// they're cache ObjectImp's etc.
diff --git a/kig/misc/rect.cc b/kig/misc/rect.cc
index 652fae2d..6a7ded12 100644
--- a/kig/misc/rect.cc
+++ b/kig/misc/rect.cc
@@ -211,7 +211,7 @@ double Rect::height() const
return mheight;
}
-bool Rect::tqcontains( const Coordinate& p, double allowed_miss ) const
+bool Rect::contains( const Coordinate& p, double allowed_miss ) const
{
return p.x - left() >= - allowed_miss &&
p.y - bottom() >= - allowed_miss &&
@@ -219,7 +219,7 @@ bool Rect::tqcontains( const Coordinate& p, double allowed_miss ) const
p.y - bottom() - height() <= allowed_miss;
}
-bool Rect::tqcontains( const Coordinate& p ) const
+bool Rect::contains( const Coordinate& p ) const
{
return p.x >= left() &&
p.y >= bottom() &&
diff --git a/kig/misc/rect.h b/kig/misc/rect.h
index 52958dd8..4c8d1f64 100644
--- a/kig/misc/rect.h
+++ b/kig/misc/rect.h
@@ -115,8 +115,8 @@ public:
double top() const;
double width() const;
double height() const;
- bool tqcontains( const Coordinate& p ) const;
- bool tqcontains( const Coordinate& p, double allowed_miss ) const;
+ bool contains( const Coordinate& p ) const;
+ bool contains( const Coordinate& p, double allowed_miss ) const;
bool intersects( const Rect& p ) const;
Rect normalized() const;
friend kdbgstream& operator<<( kdbgstream& s, const Rect& t );
diff --git a/kig/misc/special_constructors.cc b/kig/misc/special_constructors.cc
index 0806f09b..edc54b42 100644
--- a/kig/misc/special_constructors.cc
+++ b/kig/misc/special_constructors.cc
@@ -1403,7 +1403,7 @@ std::vector<ObjectHolder*> MidPointOfTwoPointsConstructor::build(
{
ObjectTypeCalcer* seg = new ObjectTypeCalcer( SegmentABType::instance(), os );
seg->calc( d );
- int index = seg->imp()->propertiesInternalNames().tqfindIndex( "mid-point" );
+ int index = seg->imp()->propertiesInternalNames().findIndex( "mid-point" );
assert( index != -1 );
ObjectPropertyCalcer* prop = new ObjectPropertyCalcer( seg, index );
prop->calc( d );