diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | d8762de95349dc6edaa34db9bf699b367c1af6b1 (patch) | |
tree | 8c76a6ab8e4e92d13196cb11ddab2d0fb64ec680 /kig/objects | |
parent | 03458c4e2ca2e92deafe078d0e09e1acd4c4765f (diff) | |
download | tdeedu-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/objects')
29 files changed, 51 insertions, 51 deletions
diff --git a/kig/objects/bogus_imp.cc b/kig/objects/bogus_imp.cc index 6e688b1b..5c68c30c 100644 --- a/kig/objects/bogus_imp.cc +++ b/kig/objects/bogus_imp.cc @@ -32,7 +32,7 @@ void BogusImp::draw( KigPainter& ) const { } -bool BogusImp::tqcontains( const Coordinate&, int, const KigWidget& ) const +bool BogusImp::contains( const Coordinate&, int, const KigWidget& ) const { return false; } diff --git a/kig/objects/bogus_imp.h b/kig/objects/bogus_imp.h index 3ab32809..c8f3ee2b 100644 --- a/kig/objects/bogus_imp.h +++ b/kig/objects/bogus_imp.h @@ -46,7 +46,7 @@ public: Coordinate attachPoint( ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& w ) const; + bool contains( const Coordinate& p, int width, const KigWidget& w ) const; bool inRect( const Rect& r, int width, const KigWidget& w ) const; Rect surroundingRect() const; diff --git a/kig/objects/circle_imp.cc b/kig/objects/circle_imp.cc index 059ff592..4b6c1123 100644 --- a/kig/objects/circle_imp.cc +++ b/kig/objects/circle_imp.cc @@ -63,7 +63,7 @@ void CircleImp::draw( KigPainter& p ) const p.drawCircle( mcenter, mradius ); } -bool CircleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool CircleImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return fabs((mcenter - p).length() - mradius) <= w.screenInfo().normalMiss( width ); } @@ -72,10 +72,10 @@ bool CircleImp::inRect( const Rect& r, int width, const KigWidget& w ) const { // first we check if the rect contains at least one of the // north/south/east/west points of the circle - if ( r.tqcontains( mcenter + Coordinate( 0, -mradius ) ) ) return true; - if ( r.tqcontains( mcenter + Coordinate( mradius, 0 ) ) ) return true; - if ( r.tqcontains( mcenter + Coordinate( 0, mradius ) ) ) return true; - if ( r.tqcontains( mcenter + Coordinate( -mradius, 0 ) ) ) return true; + if ( r.contains( mcenter + Coordinate( 0, -mradius ) ) ) return true; + if ( r.contains( mcenter + Coordinate( mradius, 0 ) ) ) return true; + if ( r.contains( mcenter + Coordinate( 0, mradius ) ) ) return true; + if ( r.contains( mcenter + Coordinate( -mradius, 0 ) ) ) return true; // we allow a miss of some pixels .. double miss = w.screenInfo().normalMiss( width ); diff --git a/kig/objects/circle_imp.h b/kig/objects/circle_imp.h index 98fa391d..1ccede6a 100644 --- a/kig/objects/circle_imp.h +++ b/kig/objects/circle_imp.h @@ -46,7 +46,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; diff --git a/kig/objects/conic_imp.cc b/kig/objects/conic_imp.cc index 11e01c28..5828fc98 100644 --- a/kig/objects/conic_imp.cc +++ b/kig/objects/conic_imp.cc @@ -47,7 +47,7 @@ bool ConicImp::valid() const return true; } -bool ConicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const +bool ConicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const { return internalContainsPoint( o, w.screenInfo().normalMiss( width ) ); } diff --git a/kig/objects/conic_imp.h b/kig/objects/conic_imp.h index d1cfa3f9..29068a7b 100644 --- a/kig/objects/conic_imp.h +++ b/kig/objects/conic_imp.h @@ -51,7 +51,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; diff --git a/kig/objects/cubic_imp.cc b/kig/objects/cubic_imp.cc index f727f49a..b4a85b8e 100644 --- a/kig/objects/cubic_imp.cc +++ b/kig/objects/cubic_imp.cc @@ -50,7 +50,7 @@ void CubicImp::draw( KigPainter& p ) const p.drawCurve( this ); } -bool CubicImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const +bool CubicImp::contains( const Coordinate& o, int width, const KigWidget& w ) const { return internalContainsPoint( o, w.screenInfo().normalMiss( width ) ); } @@ -431,7 +431,7 @@ TQString CubicImp::cartesianEquationString( const KigDocument& ) const ret = ret.tqarg( mdata.coeffs[0], 0, 'g', 3 ); // we should find a common place to do this... - ret.tqreplace( "+ -", "- " ); - ret.tqreplace( "+-", "-" ); + ret.replace( "+ -", "- " ); + ret.replace( "+-", "-" ); return ret; } diff --git a/kig/objects/cubic_imp.h b/kig/objects/cubic_imp.h index 65dc25ad..5e9e6a2c 100644 --- a/kig/objects/cubic_imp.h +++ b/kig/objects/cubic_imp.h @@ -40,7 +40,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; Rect surroundingRect() const; TQString cartesianEquationString( const KigDocument& ) const; diff --git a/kig/objects/line_imp.cc b/kig/objects/line_imp.cc index 0cb8a985..7583dc71 100644 --- a/kig/objects/line_imp.cc +++ b/kig/objects/line_imp.cc @@ -197,7 +197,7 @@ void SegmentImp::draw( KigPainter& p ) const p.drawSegment( mdata ); } -bool SegmentImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool SegmentImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } @@ -207,7 +207,7 @@ void RayImp::draw( KigPainter& p ) const p.drawRay( mdata ); } -bool RayImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool RayImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } @@ -217,7 +217,7 @@ void LineImp::draw( KigPainter& p ) const p.drawLine( mdata ); } -bool LineImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool LineImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } diff --git a/kig/objects/line_imp.h b/kig/objects/line_imp.h index c52d8afd..b12c045d 100644 --- a/kig/objects/line_imp.h +++ b/kig/objects/line_imp.h @@ -99,7 +99,7 @@ public: SegmentImp( const LineData& d ); void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; + bool contains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; @@ -154,7 +154,7 @@ public: RayImp( const LineData& d ); void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; + bool contains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; @@ -195,7 +195,7 @@ public: */ LineImp( const LineData& d ); void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& si ) const; + bool contains( const Coordinate& p, int width, const KigWidget& si ) const; Rect surroundingRect() const; ObjectImp* transform( const Transformation& ) const; diff --git a/kig/objects/locus_imp.cc b/kig/objects/locus_imp.cc index 3bf85a9e..edbdc88b 100644 --- a/kig/objects/locus_imp.cc +++ b/kig/objects/locus_imp.cc @@ -49,7 +49,7 @@ void LocusImp::draw( KigPainter& p ) const p.drawCurve( this ); } -bool LocusImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool LocusImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ), w.document() ); } diff --git a/kig/objects/locus_imp.h b/kig/objects/locus_imp.h index 54ec7f13..d6d93217 100644 --- a/kig/objects/locus_imp.h +++ b/kig/objects/locus_imp.h @@ -66,7 +66,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; Rect surroundingRect() const; bool inRect( const Rect& r, int width, const KigWidget& ) const; double getParam( const Coordinate& point, const KigDocument& ) const; diff --git a/kig/objects/object_calcer.cc b/kig/objects/object_calcer.cc index 38c0b194..f6952768 100644 --- a/kig/objects/object_calcer.cc +++ b/kig/objects/object_calcer.cc @@ -202,7 +202,7 @@ const ObjectImpType* ObjectTypeCalcer::impRequirement( os.begin(), os.end(), std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) ); - assert( std::tqfind( args.begin(), args.end(), o->imp() ) != args.end() ); + assert( std::find( args.begin(), args.end(), o->imp() ) != args.end() ); return mtype->impRequirement( o->imp(), args ); } diff --git a/kig/objects/object_drawer.cc b/kig/objects/object_drawer.cc index 1fc0f2e0..d6e41144 100644 --- a/kig/objects/object_drawer.cc +++ b/kig/objects/object_drawer.cc @@ -41,10 +41,10 @@ void ObjectDrawer::draw( const ObjectImp& imp, KigPainter& p, bool sel ) const } } -bool ObjectDrawer::tqcontains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv ) const +bool ObjectDrawer::contains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv ) const { bool shownornv = mshown || nv; - return shownornv && imp.tqcontains( pt, mwidth, w ); + return shownornv && imp.contains( pt, mwidth, w ); } bool ObjectDrawer::shown( ) const diff --git a/kig/objects/object_drawer.h b/kig/objects/object_drawer.h index 7fca8d4e..cbd1374a 100644 --- a/kig/objects/object_drawer.h +++ b/kig/objects/object_drawer.h @@ -68,7 +68,7 @@ public: * dependent on whether it is shown ( when it will never contain * anything ), and on its width.. */ - bool tqcontains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv = false ) const; + bool contains( const ObjectImp& imp, const Coordinate& pt, const KigWidget& w, bool nv = false ) const; /** * returns whether the object \p imp is in the rectangle \p r . This is * dependent on whether it is shown and on its width.. diff --git a/kig/objects/object_factory.cc b/kig/objects/object_factory.cc index c2d7b3b5..aabc82be 100644 --- a/kig/objects/object_factory.cc +++ b/kig/objects/object_factory.cc @@ -277,7 +277,7 @@ ObjectHolder* ObjectFactory::attachedLabel( ObjectPropertyCalcer* ObjectFactory::propertyObjectCalcer( ObjectCalcer* o, const char* p ) const { - int wp = o->imp()->propertiesInternalNames().tqfindIndex( p ); + int wp = o->imp()->propertiesInternalNames().findIndex( p ); if ( wp == -1 ) return 0; return new ObjectPropertyCalcer( o, wp ); } diff --git a/kig/objects/object_holder.cc b/kig/objects/object_holder.cc index 49e6da9d..b6c5f09e 100644 --- a/kig/objects/object_holder.cc +++ b/kig/objects/object_holder.cc @@ -80,9 +80,9 @@ void ObjectHolder::draw( KigPainter& p, bool selected ) const mdrawer->draw( *imp(), p, selected ); } -bool ObjectHolder::tqcontains( const Coordinate& pt, const KigWidget& w, bool nv ) const +bool ObjectHolder::contains( const Coordinate& pt, const KigWidget& w, bool nv ) const { - return mdrawer->tqcontains( *imp(), pt, w, nv ); + return mdrawer->contains( *imp(), pt, w, nv ); } bool ObjectHolder::inRect( const Rect& r, const KigWidget& w ) const diff --git a/kig/objects/object_holder.h b/kig/objects/object_holder.h index 0666fef1..1e80269b 100644 --- a/kig/objects/object_holder.h +++ b/kig/objects/object_holder.h @@ -103,7 +103,7 @@ public: /** * Returns whether this object contains the point \p p . */ - bool tqcontains( const Coordinate& p, const KigWidget& w, bool nv = false ) const; + bool contains( const Coordinate& p, const KigWidget& w, bool nv = false ) const; /** * Returns whether this object is in the rectangle \p r . */ diff --git a/kig/objects/object_imp.h b/kig/objects/object_imp.h index 20484ecf..46166858 100644 --- a/kig/objects/object_imp.h +++ b/kig/objects/object_imp.h @@ -268,7 +268,7 @@ public: virtual ObjectImp* transform( const Transformation& t ) const = 0; virtual void draw( KigPainter& p ) const = 0; - virtual bool tqcontains( const Coordinate& p, int width, + virtual bool contains( const Coordinate& p, int width, const KigWidget& si ) const = 0; virtual bool inRect( const Rect& r, int width, const KigWidget& si ) const = 0; diff --git a/kig/objects/object_type_factory.cc b/kig/objects/object_type_factory.cc index aa69f958..a6d527ce 100644 --- a/kig/objects/object_type_factory.cc +++ b/kig/objects/object_type_factory.cc @@ -56,11 +56,11 @@ ObjectTypeFactory* ObjectTypeFactory::instance() void ObjectTypeFactory::add( const ObjectType* type ) { - assert( mmap.tqfind( std::string( type->fullName() ) ) == mmap.end() ); + assert( mmap.find( std::string( type->fullName() ) ) == mmap.end() ); mmap[std::string( type->fullName() )] = type; } -const ObjectType* ObjectTypeFactory::tqfind( const char* name ) const +const ObjectType* ObjectTypeFactory::find( const char* name ) const { maptype::const_iterator i = mmap.find( std::string( name ) ); if ( i == mmap.end() ) return 0; diff --git a/kig/objects/object_type_factory.h b/kig/objects/object_type_factory.h index 97f4f0c3..c1371d67 100644 --- a/kig/objects/object_type_factory.h +++ b/kig/objects/object_type_factory.h @@ -34,7 +34,7 @@ class ObjectTypeFactory public: static ObjectTypeFactory* instance(); void add( const ObjectType* type ); - const ObjectType* tqfind( const char* name ) const; + const ObjectType* find( const char* name ) const; }; #endif diff --git a/kig/objects/other_imp.cc b/kig/objects/other_imp.cc index 66da40a9..137a3e93 100644 --- a/kig/objects/other_imp.cc +++ b/kig/objects/other_imp.cc @@ -56,7 +56,7 @@ AngleImp::AngleImp( const Coordinate& pt, double start_angle_in_radials, { } -bool AngleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool AngleImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { double radius = 50*w.screenInfo().pixelWidth(); @@ -73,7 +73,7 @@ bool AngleImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) bool AngleImp::inRect( const Rect& r, int width, const KigWidget& w ) const { // TODO ? - return r.tqcontains( mpoint, w.screenInfo().normalMiss( width ) ); + return r.contains( mpoint, w.screenInfo().normalMiss( width ) ); } Coordinate AngleImp::attachPoint() const @@ -179,7 +179,7 @@ void VectorImp::draw( KigPainter& p ) const p.drawVector( mdata.a, mdata.b ); } -bool VectorImp::tqcontains( const Coordinate& o, int width, const KigWidget& w ) const +bool VectorImp::contains( const Coordinate& o, int width, const KigWidget& w ) const { return internalContainsPoint( o, w.screenInfo().normalMiss( width ) ); } @@ -340,7 +340,7 @@ void ArcImp::draw( KigPainter& p ) const p.drawArc( mcenter, mradius, msa, ma ); } -bool ArcImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool ArcImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { return internalContainsPoint( p, w.screenInfo().normalMiss( width ) ); } diff --git a/kig/objects/other_imp.h b/kig/objects/other_imp.h index 56e8c387..8e716fa6 100644 --- a/kig/objects/other_imp.h +++ b/kig/objects/other_imp.h @@ -49,7 +49,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; Rect surroundingRect() const; @@ -113,7 +113,7 @@ public: double getParam( const Coordinate&, const KigDocument& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; Rect surroundingRect() const; @@ -186,7 +186,7 @@ public: ObjectImp* transform( const Transformation& t ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& w ) const; + bool contains( const Coordinate& p, int width, const KigWidget& w ) const; bool inRect( const Rect& r, int width, const KigWidget& si ) const; Rect surroundingRect() const; bool valid() const; diff --git a/kig/objects/point_imp.cc b/kig/objects/point_imp.cc index b2f9b1c1..1e5b8766 100644 --- a/kig/objects/point_imp.cc +++ b/kig/objects/point_imp.cc @@ -42,7 +42,7 @@ void PointImp::draw( KigPainter& p ) const p.drawFatPoint( mc ); } -bool PointImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool PointImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { int twidth = width == -1 ? 5 : width; return (p - mc).length() - twidth*w.screenInfo().pixelWidth() < 0; @@ -51,7 +51,7 @@ bool PointImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) bool PointImp::inRect( const Rect& r, int width, const KigWidget& w ) const { double am = w.screenInfo().normalMiss( width ); - return r.tqcontains( mc, am ); + return r.contains( mc, am ); } const uint PointImp::numberOfProperties() const diff --git a/kig/objects/point_imp.h b/kig/objects/point_imp.h index 6a2db06f..dac0576c 100644 --- a/kig/objects/point_imp.h +++ b/kig/objects/point_imp.h @@ -54,7 +54,7 @@ public: void setCoordinate( const Coordinate& c ); void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; const uint numberOfProperties() const; diff --git a/kig/objects/polygon_imp.cc b/kig/objects/polygon_imp.cc index c9c8fb11..08215bfb 100644 --- a/kig/objects/polygon_imp.cc +++ b/kig/objects/polygon_imp.cc @@ -159,12 +159,12 @@ bool PolygonImp::isInPolygon( const Coordinate& p ) const } #define selectpolygonwithinside 1 #ifdef selectpolygonwithinside -bool PolygonImp::tqcontains( const Coordinate& p, int, const KigWidget& ) const +bool PolygonImp::contains( const Coordinate& p, int, const KigWidget& ) const { return isInPolygon( p ); } #else -bool PolygonImp::tqcontains( const Coordinate& p, int width, const KigWidget& w ) const +bool PolygonImp::contains( const Coordinate& p, int width, const KigWidget& w ) const { bool ret = false; uint reduceddim = mpoints.size() - 1; diff --git a/kig/objects/polygon_imp.h b/kig/objects/polygon_imp.h index 506ca245..9a25d516 100644 --- a/kig/objects/polygon_imp.h +++ b/kig/objects/polygon_imp.h @@ -53,7 +53,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; diff --git a/kig/objects/text_imp.cc b/kig/objects/text_imp.cc index e8feb7f0..32591c16 100644 --- a/kig/objects/text_imp.cc +++ b/kig/objects/text_imp.cc @@ -51,9 +51,9 @@ void TextImp::draw( KigPainter& p ) const p.drawTextFrame( mboundrect, mtext, mframe ); } -bool TextImp::tqcontains( const Coordinate& p, int, const KigWidget& ) const +bool TextImp::contains( const Coordinate& p, int, const KigWidget& ) const { - return mboundrect.tqcontains( p ); + return mboundrect.contains( p ); } bool TextImp::inRect( const Rect& r, int, const KigWidget& ) const diff --git a/kig/objects/text_imp.h b/kig/objects/text_imp.h index 54eb7647..54e33f79 100644 --- a/kig/objects/text_imp.h +++ b/kig/objects/text_imp.h @@ -30,7 +30,7 @@ class TextImp Coordinate mloc; bool mframe; // with this var, we keep track of the place we drew in, for use in - // the tqcontains() function.. + // the contains() function.. mutable Rect mboundrect; public: typedef ObjectImp Parent; @@ -44,7 +44,7 @@ public: ObjectImp* transform( const Transformation& ) const; void draw( KigPainter& p ) const; - bool tqcontains( const Coordinate& p, int width, const KigWidget& ) const; + bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; bool valid() const; Rect surroundingRect() const; |