diff options
Diffstat (limited to 'kig/misc')
-rw-r--r-- | kig/misc/argsparser.h | 2 | ||||
-rw-r--r-- | kig/misc/builtin_stuff.cc | 8 | ||||
-rw-r--r-- | kig/misc/calcpaths.cc | 6 | ||||
-rw-r--r-- | kig/misc/common.cpp | 16 | ||||
-rw-r--r-- | kig/misc/common.h | 4 | ||||
-rw-r--r-- | kig/misc/coordinate.cpp | 2 | ||||
-rw-r--r-- | kig/misc/coordinate_system.cpp | 24 | ||||
-rw-r--r-- | kig/misc/guiaction.cc | 10 | ||||
-rw-r--r-- | kig/misc/kiginputdialog.cc | 2 | ||||
-rw-r--r-- | kig/misc/kignumerics.cpp | 2 | ||||
-rw-r--r-- | kig/misc/kigpainter.cpp | 14 | ||||
-rw-r--r-- | kig/misc/object_hierarchy.cc | 12 | ||||
-rw-r--r-- | kig/misc/rect.cc | 4 | ||||
-rw-r--r-- | kig/misc/rect.h | 12 |
14 files changed, 59 insertions, 59 deletions
diff --git a/kig/misc/argsparser.h b/kig/misc/argsparser.h index 2712cf40..001d9359 100644 --- a/kig/misc/argsparser.h +++ b/kig/misc/argsparser.h @@ -29,7 +29,7 @@ class ObjectImpType; * parents to ObjectCalcer's, and to put them in the correct order. * An ObjectType should construct an ArgsParser with a specification * of the arguments it wants. This specification is given as an array - * of ArgsParser::spec structs. This struct tqcontains a pointer to an + * of ArgsParser::spec structs. This struct contains a pointer to an * ObjectImpType ( which is the type you want the argument to have ), * a string ( which is an I18N_NOOP'd string describing what you will * be using the argument for ) and a boolean ( which says whether the diff --git a/kig/misc/builtin_stuff.cc b/kig/misc/builtin_stuff.cc index f02d89d7..e162e7ac 100644 --- a/kig/misc/builtin_stuff.cc +++ b/kig/misc/builtin_stuff.cc @@ -508,15 +508,15 @@ void setupBuiltinStuff() c = new TestConstructor( ContainsTestType::instance(), I18N_NOOP( "Contains Test" ), - I18N_NOOP( "Test whether a given curve tqcontains a given point" ), - "testqcontains" ); + I18N_NOOP( "Test whether a given curve contains a given point" ), + "testcontains" ); ctors->add( c ); - actions->add( new ConstructibleAction( c, "objects_new_tqcontainstest" ) ); + actions->add( new ConstructibleAction( c, "objects_new_containstest" ) ); c = new TestConstructor( InPolygonTestType::instance(), I18N_NOOP( "In Polygon Test" ), - I18N_NOOP( "Test whether a given polygon tqcontains a given point" ), + I18N_NOOP( "Test whether a given polygon contains a given point" ), "test" ); ctors->add( c ); actions->add( new ConstructibleAction( c, "objects_new_inpolygontest" ) ); diff --git a/kig/misc/calcpaths.cc b/kig/misc/calcpaths.cc index b2190303..1532715b 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 @@ -105,7 +105,7 @@ std::vector<ObjectCalcer*> calcPath( const std::vector<ObjectCalcer*>& os ) std::vector<ObjectCalcer*> all = os; // tmp is the var containing the objects we're iterating over. The // first time around this is the os variable, the next time, this - // tqcontains the variables we added in the first round... + // contains the variables we added in the first round... std::vector<ObjectCalcer*> tmp = os; // tmp2 is a temporary var. During a round, it receives all the // variables we add ( to "all" ) in that round, and at the end of @@ -283,7 +283,7 @@ std::set<ObjectCalcer*> getAllChildren( const std::vector<ObjectCalcer*> objs ) std::set<ObjectCalcer*> cur( objs.begin(), objs.end() ); while( !cur.empty() ) { - // tqcontains the objects to iterate over the next time around... + // contains the objects to iterate over the next time around... std::set<ObjectCalcer*> next; for( std::set<ObjectCalcer*>::iterator i = cur.begin(); i != cur.end(); ++i ) diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp index bc6f53d9..b41b9284 100644 --- a/kig/misc/common.cpp +++ b/kig/misc/common.cpp @@ -416,13 +416,13 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, //mp: the following test didn't work for vertical segments; // fortunately the ieee floating point standard allows us to avoid // the test altogether, since it would produce an infinity value that -// makes the final r.tqcontains to fail +// makes the final r.contains to fail // in any case the corresponding test for a.y - b.y was missing. // 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; @@ -453,12 +453,12 @@ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, // For each intersection, we now check if we contain the // intersection ( this might not be the case for a segment, when the // intersection is not between the begin and end point.. ) and if - // the rect tqcontains the intersection.. If it does, we have a winner.. + // 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/common.h b/kig/misc/common.h index a2b259c4..d1969df3 100644 --- a/kig/misc/common.h +++ b/kig/misc/common.h @@ -188,7 +188,7 @@ void calcBorderPoints( Coordinate& p1, Coordinate& p2, const Rect& r ); */ void calcBorderPoints( double& xa, double& xb, double& ya, double& yb, const Rect& r); /** - * cleaner overload, intended to tqreplace the above two... + * cleaner overload, intended to replace the above two... */ const LineData calcBorderPoints( const LineData& l, const Rect& r ); @@ -257,7 +257,7 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, /** * Is the line, segment, ray or vector inside r ? We need the imp to * distinguish between rays, lines, segments or whatever.. ( we use - * their tqcontains functions actually.. ) + * their contains functions actually.. ) */ bool lineInRect( const Rect& r, const Coordinate& a, const Coordinate& b, const int width, const ObjectImp* imp, const KigWidget& w ); diff --git a/kig/misc/coordinate.cpp b/kig/misc/coordinate.cpp index e34f69db..f2c272f2 100644 --- a/kig/misc/coordinate.cpp +++ b/kig/misc/coordinate.cpp @@ -159,7 +159,7 @@ const Coordinate Coordinate::normalize( double l ) const const Coordinate Coordinate::round() const { - return Coordinate( tqRound( x ), tqRound( y ) ); + return Coordinate( qRound( x ), qRound( y ) ); } TQPoint Coordinate::toQPoint() const diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp index 9b5ebd3a..859ed81d 100644 --- a/kig/misc/coordinate_system.cpp +++ b/kig/misc/coordinate_system.cpp @@ -101,7 +101,7 @@ 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 ';' @@ -116,19 +116,19 @@ void CoordinateValidator::fixup( TQString & input ) const sc = input.length(); KLocale* l = KGlobal::locale(); if ( mpolar ) - input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() + - TQString::tqfromLatin1( "0�" ) ); + input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + + TQString::fromLatin1( "0�" ) ); else - input.append( TQString::tqfromLatin1( ";" ) + l->positiveSign() + - TQString::tqfromLatin1( "0" ) + l->decimalSymbol() + - TQString::tqfromLatin1( "0" ) ); + input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + + TQString::fromLatin1( "0" ) + l->decimalSymbol() + + TQString::fromLatin1( "0" ) ); }; mre.exactMatch( input ); TQString ds1 = mre.cap( 1 ); mdv.fixup( ds1 ); TQString ds2 = mre.cap( 2 ); mdv.fixup( ds2 ); - input = ds1 + TQString::tqfromLatin1( "; " ) + ds2; + input = ds1 + TQString::fromLatin1( "; " ) + ds2; } EuclideanCoords::EuclideanCoords() @@ -146,7 +146,7 @@ TQString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d int l = kigMax( 0, (int) ( 3 - log10( m ) ) ); TQString xs = KGlobal::locale()->formatNumber( p.x, l ); TQString ys = KGlobal::locale()->formatNumber( p.y, l ); - return TQString::tqfromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys ); + return TQString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys ); } Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const @@ -354,7 +354,7 @@ TQString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) c TQString rs = KGlobal::locale()->formatNumber( r, l ); TQString ts = KGlobal::locale()->formatNumber( theta, 0 ); - return TQString::tqfromLatin1("( %1; %2� )").arg( rs ).arg( ts ); + return TQString::fromLatin1("( %1; %2� )").arg( rs ).arg( ts ); } TQString PolarCoords::coordinateFormatNotice() const @@ -608,8 +608,8 @@ Coordinate EuclideanCoords::snapToGrid( const Coordinate& c, const double hgraphmin = ceil( hmin / hd) * hd; const double vgraphmin = ceil( vmin / vd ) * vd; - const double nx = tqRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin; - const double ny = tqRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin; + const double nx = qRound( ( c.x - hgraphmin ) / hd ) * hd + hgraphmin; + const double ny = qRound( ( c.y - vgraphmin ) / vd ) * vd + vgraphmin; return Coordinate( nx, ny ); } @@ -643,7 +643,7 @@ Coordinate PolarCoords::snapToGrid( const Coordinate& c, double d = kigMin( hd, vd ); double dist = c.length(); - double ndist = tqRound( dist / d ) * d; + double ndist = qRound( dist / d ) * d; return c.normalize( ndist ); } diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc index 55d908bd..c9435d2b 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 ); } @@ -223,7 +223,7 @@ void AddFixedPointAction::act( KigPart& doc ) KigInputDialog::getCoordinate( i18n( "Fixed Point" ), i18n( "Enter the coordinates for the new point." ) + - TQString::tqfromLatin1( "<br>" ) + + TQString::fromLatin1( "<br>" ) + doc.document().coordinateSystem().coordinateFormatNoticeMarkup(), doc.widget(), &ok, doc.document(), &c ); if ( ! ok ) return; @@ -272,7 +272,7 @@ TestAction::~TestAction() TQString TestAction::description() const { - return TQString::tqfromLatin1( "Test stuff !!!" ); + return TQString::fromLatin1( "Test stuff !!!" ); } TQCString TestAction::iconFileName() const @@ -282,7 +282,7 @@ TQCString TestAction::iconFileName() const TQString TestAction::descriptiveName() const { - return TQString::tqfromLatin1( "Test stuff !!!" ); + return TQString::fromLatin1( "Test stuff !!!" ); } const char* TestAction::actionName() const @@ -297,7 +297,7 @@ void TestAction::act( KigPart& doc ) Object* constantpoint = ObjectFactory::instance()->fixedPoint( Coordinate( -1, -1 ) ); constantpoint->calc( doc ); - Object* codeobject = new DataObject( new StringImp( TQString::tqfromLatin1( script ) ) ); + Object* codeobject = new DataObject( new StringImp( TQString::fromLatin1( script ) ) ); Object* compiledcode = new RealObject( PythonCompileType::instance(), Objects( codeobject ) ); compiledcode->calc( doc ); diff --git a/kig/misc/kiginputdialog.cc b/kig/misc/kiginputdialog.cc index 9f070813..ea0aeb66 100644 --- a/kig/misc/kiginputdialog.cc +++ b/kig/misc/kiginputdialog.cc @@ -85,7 +85,7 @@ KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label, d->m_textEdit->setText( label ); d->m_textEdit->setReadOnly( true ); d->m_textEdit->setFocusPolicy( NoFocus ); -// d->m_textEdit->tqsetAlignment( d->m_textEdit->tqalignment() | Qt::WordBreak ); +// d->m_textEdit->setAlignment( d->m_textEdit->alignment() | Qt::WordBreak ); d->m_textEdit->setFrameStyle( TQFrame::NoFrame ); mainlay->addWidget( d->m_textEdit ); diff --git a/kig/misc/kignumerics.cpp b/kig/misc/kignumerics.cpp index 6ff414c6..4711d058 100644 --- a/kig/misc/kignumerics.cpp +++ b/kig/misc/kignumerics.cpp @@ -331,7 +331,7 @@ bool GaussianElimination( double *matrix[], int numrows, /* * solve an undetermined homogeneous triangular system. the matrix is nonzero * on its diagonal. The last unknown(s) are chosen to be 1. The - * vector "exchange" tqcontains exchanges to be performed on the + * vector "exchange" contains exchanges to be performed on the * final solution components. */ diff --git a/kig/misc/kigpainter.cpp b/kig/misc/kigpainter.cpp index 57a1df06..98594ecb 100644 --- a/kig/misc/kigpainter.cpp +++ b/kig/misc/kigpainter.cpp @@ -374,7 +374,7 @@ void KigPainter::circleOverlayRecurse( const Coordinate& centre, // too near to the centre if (distmaxsq < radiussq) return; - // the rect tqcontains some of the circle + // the rect contains some of the circle // -> if it's small enough, we keep it if( currentRect.width() < overlayRectSize() ) { mOverlay.push_back( toScreenEnlarge( currentRect) ); @@ -735,10 +735,10 @@ void KigPainter::drawCurve( const CurveImp* curve ) TQPen pen = mP.pen(); - // this stack tqcontains pairs of Coordinates ( parameter intervals ) + // this stack contains pairs of Coordinates ( parameter intervals ) // that we still need to process: std::stack<workitem> workstack; - // mp: this stack tqcontains all the generated overlays: + // mp: this stack contains all the generated overlays: // the strategy for generating the overlay structure is the same // recursive-like used to draw the segments: a new rectangle is // generated whenever the length of a segment becomes lower than @@ -758,7 +758,7 @@ void KigPainter::drawCurve( const CurveImp* curve ) std::stack<Rect> overlaystack; // mp: the original version in which an initial set of 20 intervals - // were pushed onto the stack is tqreplaced by a single interval and + // were pushed onto the stack is replaced by a single interval and // by forcing subdivision till h < hmax (with more or less the same // final result). // First push the [0,1] interval into the stack: @@ -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_hierarchy.cc b/kig/misc/object_hierarchy.cc index b7e89456..c2365aaa 100644 --- a/kig/misc/object_hierarchy.cc +++ b/kig/misc/object_hierarchy.cc @@ -44,14 +44,14 @@ public: virtual void apply( std::vector<ObjectCalcer*>& stack, int loc ) const = 0; // this function is used to check whether the final objects depend - // on the given objects. The dependsstack tqcontains a set of + // on the given objects. The dependsstack contains a set of // booleans telling which parts of the hierarchy certainly depend on // the given objects. In this function, the node should check // whether any of its parents have true set, and if so, set its own // 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. @@ -419,10 +419,10 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons // we don't save these atm, since the user can't define them. // we only load them from builtin macro's. // TQDomElement ut = doc.createElement( "UseText" ); -// ut.appendChild( doc.createTextNode( TQString::tqfromLatin1(musetexts[i].c_str() ) ) ); +// ut.appendChild( doc.createTextNode( TQString::fromLatin1(musetexts[i].c_str() ) ) ); // e.appendChild( ut ); // TQDomElement ss = doc.createElement( "SelectStatement" ); -// ss.appendChild( doc.createTextNode( TQString::tqfromLatin1(mselectstatements[i].c_str() ) ) ); +// ss.appendChild( doc.createTextNode( TQString::fromLatin1(mselectstatements[i].c_str() ) ) ); // e.appendChild( ss ); parent.appendChild( e ); } @@ -437,7 +437,7 @@ void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) cons { const ApplyTypeNode* node = static_cast<const ApplyTypeNode*>( mnodes[i] ); e.setAttribute( "action", "calc" ); - e.setAttribute( "type", TQString::tqfromLatin1( node->type()->fullName() ) ); + e.setAttribute( "type", TQString::fromLatin1( node->type()->fullName() ) ); for ( uint i = 0; i < node->parents().size(); ++i ) { int parent = node->parents()[i] + 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 c3f56d1e..183f50f8 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 24edebdd..1fe0b071 100644 --- a/kig/misc/rect.h +++ b/kig/misc/rect.h @@ -28,8 +28,8 @@ #include <kdebug.h> /** - * like Coordinate is a TQPoint tqreplacement with doubles, this is a - * TQRect tqreplacement with doubles... + * like Coordinate is a TQPoint replacement with doubles, this is a + * TQRect replacement with doubles... */ class Rect { @@ -85,7 +85,7 @@ public: Rect& operator/=( const double r ) { scale(1/r); return *this; } /** - * This expands the rect so that it tqcontains r. It has friends + * This expands the rect so that it contains r. It has friends * '|=' and '|' below... */ void eat( const Rect& r ); @@ -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 ); @@ -131,7 +131,7 @@ protected: bool operator==( const Rect& r, const Rect& s ); kdbgstream& operator<<( kdbgstream& s, const Rect& t ); /** - * this operator returns a Rect that tqcontains both the given + * this operator returns a Rect that contains both the given * rects.. */ Rect operator|( const Rect& lhs, const Rect& rhs ); |