diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-19 11:38:41 -0600 |
commit | f0de9e167e289ab7dc33e57f077c1f04ec7c68c8 (patch) | |
tree | 1fc538e179833e62caec21956bfe47a252be5a72 /lib | |
parent | 11191ef0b9908604d1d7aaca382b011ef22c454c (diff) | |
download | koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.tar.gz koffice-f0de9e167e289ab7dc33e57f077c1f04ec7c68c8.zip |
Remove additional unneeded tq method conversions
Diffstat (limited to 'lib')
199 files changed, 1269 insertions, 1269 deletions
diff --git a/lib/kformula/DESIGN b/lib/kformula/DESIGN index 3402d9ee..a6a7eccb 100644 --- a/lib/kformula/DESIGN +++ b/lib/kformula/DESIGN @@ -19,21 +19,21 @@ objects from it. Responsebilities (This goes for every derived element and therefore for each one.) -- knows its tqchildren. Actually BasicElement doesn't have any. But it - already defines that tqchildren must be known by their parent. -- knows its bounding rectangle (its size.) The tqchildren are included +- knows its children. Actually BasicElement doesn't have any. But it + already defines that children must be known by their parent. +- knows its bounding rectangle (its size.) The children are included in this rect. (The position is relative to the parent.) -//- knows its middle line. (for tqalignment) -- knows it's zero point for midline (vertical tqalignment) and +//- knows its middle line. (for alignment) +- knows it's zero point for midline (vertical alignment) and keep open the possibility of negative positions (out of bounding rect) -- draws itself (given a painter); tqchildren are drawn, too +- draws itself (given a painter); children are drawn, too - knows all positions where the cursor is allowed to be. (see below) - knows its parent; The topmost element has no parent; there is a implicit guaranty that the topmost element is always a SequenceElement. - can save and load itself. different formates. (see below) -- all tqchildren must be a SequenceElement. Except for SequenceElement's - tqchildren that might be of any type. +- all children must be a SequenceElement. Except for SequenceElement's + children that might be of any type. - might have its own color. - might have its own font size (see below). @@ -41,14 +41,14 @@ Responsebilities SequenceElement from BasicElement --------------- -Manages a list of tqchildren. The tqchildren are aligned horizontally at +Manages a list of children. The children are aligned horizontally at one middle line. No gaps, no overlaps. -Has no own look. It just draws all its tqchildren and is done. Except if +Has no own look. It just draws all its children and is done. Except if its empty. It looks like an empty space then (i.e. a little square) Has n+1 valid cursor positions where n is the number of -tqchildren. These are before, between and after the tqchildren. +children. These are before, between and after the children. May contain any (type of) element as child @@ -73,20 +73,20 @@ FormulaElement we get a chance to pass messages to the outside world. RootElement from BasicElement ----------- -contains two tqchildren. content and index. index is optional. +contains two children. content and index. index is optional. IndexElement from BasicElement ------------ -contains five tqchildren. content and four indexes. all indexes are +contains five children. content and four indexes. all indexes are optional. If there is no index the element might be replaced by its content. TextElement from BasicElement ----------- -contains one char and no tqchildren at all. +contains one char and no children at all. Might have its own font and size. But preferes to use a reasonalbe @@ -104,7 +104,7 @@ choose with. FractionElement from BasicElement --------------- -2 tqchildren: numerator, denominator +2 children: numerator, denominator DecorationElement from BasicElement @@ -121,7 +121,7 @@ the other side of the decoration. SumIntegralElement from BasicElement //PrefixedElement ------------------ -draws all sorts of mathematical symbols with three tqchildren. Above, +draws all sorts of mathematical symbols with three children. Above, below (or whereever the indices and limits go)and to the right. @@ -142,7 +142,7 @@ typical of a math formula. MatrixElement from BasicElement ------------- -A matrix of tqchildren. +A matrix of children. With all align stuff, internal borders etc, matrix dots handling (i.e. those dots or lines that complete the matrix, not well handled in TeX), etc.. @@ -150,7 +150,7 @@ etc.. SpaceElement from BasicElement ------------ -No tqchildren at all. Provides the facility to insert horizontal spaces +No children at all. Provides the facility to insert horizontal spaces in the formula. (therefore it is similar to TextElement.) @@ -184,14 +184,14 @@ If the cursor points into an element this element is said to own the cursor. There are a few rules that describe how new cursor positions are calculated given the current key: -- An elements cursor positions are its tqchildren. The element might not -own the cursor except when it is owned by one of its tqchildren. The +- An elements cursor positions are its children. The element might not +own the cursor except when it is owned by one of its children. The only exception is SequenceElement which has valid cursor positions -before, between and after its tqchildren, too. +before, between and after its children, too. (Therefore the cursor is always owned by a SequenceElement.) -- Each element's tqchildren are ordered. If the cursor leaves one child +- Each element's children are ordered. If the cursor leaves one child the next child it. The direction depends on the key that moved the cursor. If there is child left the cursor is passed to the parent. @@ -344,7 +344,7 @@ We want a formula to look different according to its surroundings. (Most obviosly according to the available height and/or width.) It would be great to get something like automatic operator -tqalignment. So if you type some formulas each on its own line the +alignment. So if you type some formulas each on its own line the assigment operators should be automatically in a column. (If the user turns this on.) diff --git a/lib/kformula/actionelement.cc b/lib/kformula/actionelement.cc index d4ef8ec4..e1dce937 100644 --- a/lib/kformula/actionelement.cc +++ b/lib/kformula/actionelement.cc @@ -69,7 +69,7 @@ void ActionElement::writeMathMLAttributes( TQDomElement& element ) const element.setAttribute( "actiontype", m_actionType ); } if ( m_selection ) { - element.setAttribute( "selection", TQString( "%1" ).tqarg( m_selection ) ); + element.setAttribute( "selection", TQString( "%1" ).arg( m_selection ) ); } } diff --git a/lib/kformula/basicelement.h b/lib/kformula/basicelement.h index 1fe46cc1..73d031e1 100644 --- a/lib/kformula/basicelement.h +++ b/lib/kformula/basicelement.h @@ -53,7 +53,7 @@ class StyleElement; * Basis of every formula element. An element is used basically by * other elements and by the @ref FormulaCursor . * - * Each element knows its size (a rect that includes all tqchildren) + * Each element knows its size (a rect that includes all children) * and how to draw itself. See @ref calcSizes and @ref draw . * * An element might contain valid cursor position. If the cursor @@ -63,11 +63,11 @@ class StyleElement; * cursor that tell how it wants to move. See @ref moveLeft , * @ref moveRight , @ref moveUp , @ref moveDown . * - * To build a tree an element must own tqchildren. If there are tqchildren + * To build a tree an element must own children. If there are children * there must be a main child. This is the child that might be used to * replace the element. See @ref getMainChild(). * - * If there can be tqchildren you might want to @ref insert and @ref remove + * If there can be children you might want to @ref insert and @ref remove * them. After a removal the element might be senseless. * (See @ref isSenseless ) * If it is it must be removed. @@ -81,10 +81,10 @@ class BasicElement public: /* - * Each element might contain tqchildren. Each child needs + * Each element might contain children. Each child needs * its own unique number. It is not guaranteed, however, * that the number stays the same all the time. - * (The SequenceElement's tqchildren are simply counted.) + * (The SequenceElement's children are simply counted.) */ BasicElement(BasicElement* parent = 0); @@ -102,7 +102,7 @@ public: /** * @returns whether the child should be read-only. The idea is - * that a read-only parent has read-only tqchildren. + * that a read-only parent has read-only children. */ virtual bool readOnly( const BasicElement* child ) const; @@ -158,7 +158,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -166,7 +166,7 @@ public: StyleAttributes& style ) = 0; /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -179,7 +179,7 @@ public: /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* /*cmd*/ ) {} @@ -243,7 +243,7 @@ public: */ virtual void entered( SequenceElement* /*child*/ ); - // tqchildren + // children /** * Removes the child. If this was the main child this element might @@ -257,7 +257,7 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild() { return 0; } //virtual void setMainChild(SequenceElement*) {} @@ -265,10 +265,10 @@ public: // editing // - // Insert and remove tqchildren. + // Insert and remove children. /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. * * The list will be emptied but stays the property of the caller. @@ -276,8 +276,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction) {} /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. */ virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction) {} @@ -290,7 +290,7 @@ public: /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless() { return false; } @@ -316,7 +316,7 @@ public: /** - * Callback for the tabs among our tqchildren. Needed for tqalignment. + * Callback for the tabs among our children. Needed for alignment. */ virtual void registerTab( BasicElement* /*tab*/ ) {} @@ -368,7 +368,7 @@ public: /** * @return a TQDomElement that contain as DomChildren the - * tqchildren, and as attribute the attribute of this + * children, and as attribute the attribute of this * element. */ TQDomElement getElementDom( TQDomDocument& doc); @@ -380,13 +380,13 @@ public: virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; /** - * Set this element attribute, build tqchildren and + * Set this element attribute, build children and * call their buildFromDom. */ bool buildFromDom(TQDomElement element); /** - * Set this element attribute, build tqchildren and call + * Set this element attribute, build children and call * their builFromMathMLDom. * Returns the number of nodes processed or -1 if it failed. */ @@ -445,7 +445,7 @@ protected: * Returns if the SequenceElement could be constructed from the nodes first child. * The node name must match the given name. * - * This is a service for all subclasses that contain tqchildren. + * This is a service for all subclasses that contain children. */ bool buildChild( SequenceElement* child, TQDomNode node, TQString name ); @@ -467,7 +467,7 @@ protected: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -521,7 +521,7 @@ private: * along this line. * * There are elements (like matrix) that don't have a base line. It is - * -1 in this case. The tqalignment is done using the middle line. + * -1 in this case. The alignment is done using the middle line. */ luPixel m_baseline; diff --git a/lib/kformula/bracketelement.cc b/lib/kformula/bracketelement.cc index df51ffa8..a3714e60 100644 --- a/lib/kformula/bracketelement.cc +++ b/lib/kformula/bracketelement.cc @@ -281,7 +281,7 @@ BasicElement* BracketElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void BracketElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -360,7 +360,7 @@ void BracketElement::calcSizes( const ContextStyle& context, /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -707,7 +707,7 @@ int BracketElement::operatorType( TQDomNode& node, bool open ) TQString s = e.text(); if ( s.isNull() ) return -1; - *type = static_cast<SymbolType>( TQString::number( s.tqat( 0 ).latin1() ).toInt() ); + *type = static_cast<SymbolType>( TQString::number( s.at( 0 ).latin1() ).toInt() ); } } else { diff --git a/lib/kformula/bracketelement.h b/lib/kformula/bracketelement.h index 83879aac..baf0ff1e 100644 --- a/lib/kformula/bracketelement.h +++ b/lib/kformula/bracketelement.h @@ -62,7 +62,7 @@ public: const LuPixelPoint& point, const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -95,8 +95,8 @@ public: virtual void moveDown(FormulaCursor* cursor, BasicElement* from); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * We remove ourselve if we are requested to remove our content. */ @@ -110,7 +110,7 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild(); @@ -200,7 +200,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -208,7 +208,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -254,7 +254,7 @@ protected: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -322,7 +322,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -330,7 +330,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -343,7 +343,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -389,7 +389,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -397,7 +397,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -410,7 +410,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/contextstyle.h b/lib/kformula/contextstyle.h index be4a8bcf..11a103dd 100644 --- a/lib/kformula/contextstyle.h +++ b/lib/kformula/contextstyle.h @@ -312,7 +312,7 @@ private: /** * true means to center the symbol between its indexes. - * false means tqalignment to the right. + * false means alignment to the right. */ bool centerSymbol; diff --git a/lib/kformula/errorelement.cc b/lib/kformula/errorelement.cc index 7a685f86..cb1f6c54 100644 --- a/lib/kformula/errorelement.cc +++ b/lib/kformula/errorelement.cc @@ -27,7 +27,7 @@ ErrorElement::ErrorElement( BasicElement* parent ) : SequenceElement( parent ) { } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/errorelement.h b/lib/kformula/errorelement.h index cfc2735d..d52f949a 100644 --- a/lib/kformula/errorelement.h +++ b/lib/kformula/errorelement.h @@ -30,7 +30,7 @@ public: ErrorElement( BasicElement* parent = 0 ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/fontstyle.cc b/lib/kformula/fontstyle.cc index 0e37028a..0df68fcb 100644 --- a/lib/kformula/fontstyle.cc +++ b/lib/kformula/fontstyle.cc @@ -53,7 +53,7 @@ class FontList { public: FontList() { TQFontDatabase db; - const TQStringList lst = db.tqfamilies(); + const TQStringList lst = db.families(); for ( TQStringList::const_iterator it = lst.begin(), end = lst.end() ; it != end ; ++it ) { const TQString name = *it; int i = name.find('['); diff --git a/lib/kformula/formulacursor.cc b/lib/kformula/formulacursor.cc index 9fe3afbd..2257d262 100644 --- a/lib/kformula/formulacursor.cc +++ b/lib/kformula/formulacursor.cc @@ -301,21 +301,21 @@ void FormulaCursor::insert(BasicElement* child, Direction direction) insert(list, direction); } -void FormulaCursor::insert(TQPtrList<BasicElement>& tqchildren, +void FormulaCursor::insert(TQPtrList<BasicElement>& children, Direction direction) { assert( !isReadOnly() ); BasicElement* element = getElement(); - element->insert(this, tqchildren, direction); + element->insert(this, children, direction); } /** - * Removes the current selected tqchildren and returns them. + * Removes the current selected children and returns them. * The cursor needs to be normal (that is be inside a SequenceElement) * for this to have any effect. */ -void FormulaCursor::remove(TQPtrList<BasicElement>& tqchildren, +void FormulaCursor::remove(TQPtrList<BasicElement>& children, Direction direction) { assert( !isReadOnly() ); @@ -328,12 +328,12 @@ void FormulaCursor::remove(TQPtrList<BasicElement>& tqchildren, BasicElement* parent = sequence->getParent(); if (parent != 0) { parent->selectChild(this, sequence); - parent->remove(this, tqchildren, direction); + parent->remove(this, children, direction); return; } } else { - sequence->remove(this, tqchildren, direction); + sequence->remove(this, children, direction); } } } @@ -383,18 +383,18 @@ void FormulaCursor::replaceSelectionWith(BasicElement* element, BasicElement* FormulaCursor::replaceByMainChildContent(Direction direction) { assert( !isReadOnly() ); - TQPtrList<BasicElement> tqchildrenList; + TQPtrList<BasicElement> childrenList; TQPtrList<BasicElement> list; BasicElement* element = getElement(); SequenceElement* mainChild = element->getMainChild(); if ((mainChild != 0) && (mainChild->countChildren() > 0)) { mainChild->selectAllChildren(this); - remove(tqchildrenList); + remove(childrenList); } element->getParent()->selectChild(this, element); setSelection(false); remove(list); - insert(tqchildrenList, direction); + insert(childrenList, direction); if (list.count() > 0) { return list.take(0); } @@ -582,7 +582,7 @@ MatrixElement* FormulaCursor::getActiveMatrixElement() } /** - * The element is going to leave the formula with and all its tqchildren. + * The element is going to leave the formula with and all its children. */ void FormulaCursor::elementWillVanish(BasicElement* element) { diff --git a/lib/kformula/formulacursor.h b/lib/kformula/formulacursor.h index 9843abfa..cca6cf1a 100644 --- a/lib/kformula/formulacursor.h +++ b/lib/kformula/formulacursor.h @@ -152,7 +152,7 @@ public: void insert(BasicElement*, Direction = beforeCursor); /** - * Inserts the listed tqchildren at the current position. + * Inserts the listed children at the current position. * Ignores the selection. * The list will be emptied. */ @@ -160,7 +160,7 @@ public: Direction = beforeCursor); /** - * Removes the current selected tqchildren and returns them. + * Removes the current selected children and returns them. * The cursor needs to be normal (that is be inside a SequenceElement) * for this to have any effect. */ @@ -341,7 +341,7 @@ public: void setCursorData(CursorData* data); /** - * The element is going to leave the formula with and all its tqchildren. + * The element is going to leave the formula with and all its children. */ void elementWillVanish(BasicElement* element); @@ -409,7 +409,7 @@ private: /** * The position the cursor in on inside the element. - * Might be anything from 0 to current->tqchildren->size(). + * Might be anything from 0 to current->children->size(). * * This is where new elements are put in. */ diff --git a/lib/kformula/formulaelement.h b/lib/kformula/formulaelement.h index e6702668..a7e83e4c 100644 --- a/lib/kformula/formulaelement.h +++ b/lib/kformula/formulaelement.h @@ -34,7 +34,7 @@ class SymbolTable; /** * The main element. - * A formula consists of a FormulaElement and its tqchildren. + * A formula consists of a FormulaElement and its children. * The only element that has no parent. */ class FormulaElement : public SequenceElement { @@ -113,7 +113,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -121,7 +121,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -159,7 +159,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/fractionelement.cc b/lib/kformula/fractionelement.cc index 1230bb60..77d93076 100644 --- a/lib/kformula/fractionelement.cc +++ b/lib/kformula/fractionelement.cc @@ -121,7 +121,7 @@ BasicElement* FractionElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void FractionElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -155,7 +155,7 @@ void FractionElement::calcSizes( const ContextStyle& context, /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -332,8 +332,8 @@ void FractionElement::insert(FormulaCursor* cursor, /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * We remove ourselve if we are requested to remove our numerator. * @@ -362,7 +362,7 @@ void FractionElement::remove(FormulaCursor* cursor, /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ bool FractionElement::isSenseless() @@ -373,7 +373,7 @@ bool FractionElement::isSenseless() // main child // -// If an element has tqchildren one has to become the main one. +// If an element has children one has to become the main one. SequenceElement* FractionElement::getMainChild() { @@ -581,13 +581,13 @@ void FractionElement::writeMathMLAttributes( TQDomElement& element ) const { switch ( m_lineThicknessType ) { case AbsoluteSize: - element.setAttribute( "linethickness", TQString( "%1pt" ).tqarg( m_lineThickness ) ); + element.setAttribute( "linethickness", TQString( "%1pt" ).arg( m_lineThickness ) ); break; case RelativeSize: - element.setAttribute( "linethickness", TQString( "%1%" ).tqarg( m_lineThickness * 100.0 ) ); + element.setAttribute( "linethickness", TQString( "%1%" ).arg( m_lineThickness * 100.0 ) ); break; case PixelSize: - element.setAttribute( "linethickness", TQString( "%1px" ).tqarg( m_lineThickness ) ); + element.setAttribute( "linethickness", TQString( "%1px" ).arg( m_lineThickness ) ); break; default: break; diff --git a/lib/kformula/fractionelement.h b/lib/kformula/fractionelement.h index cef69c13..408c3f3e 100644 --- a/lib/kformula/fractionelement.h +++ b/lib/kformula/fractionelement.h @@ -70,7 +70,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -78,7 +78,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -90,7 +90,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -128,8 +128,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * We remove ourselve if we are requested to remove our numerator. * @@ -141,7 +141,7 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild(); @@ -150,7 +150,7 @@ public: /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless(); @@ -182,7 +182,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/glyphelement.cc b/lib/kformula/glyphelement.cc index 9d0b26e6..db509eef 100644 --- a/lib/kformula/glyphelement.cc +++ b/lib/kformula/glyphelement.cc @@ -69,7 +69,7 @@ bool GlyphElement::readAttributesFromMathMLDom( const TQDomElement& element ) /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void GlyphElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -105,7 +105,7 @@ void GlyphElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/glyphelement.h b/lib/kformula/glyphelement.h index e3934fce..68833dd0 100644 --- a/lib/kformula/glyphelement.h +++ b/lib/kformula/glyphelement.h @@ -31,7 +31,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -39,7 +39,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/indexelement.cc b/lib/kformula/indexelement.cc index 25b8997a..a540a7e1 100644 --- a/lib/kformula/indexelement.cc +++ b/lib/kformula/indexelement.cc @@ -341,7 +341,7 @@ void IndexElement::setMiddleX(int xOffset, int middleWidth) /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void IndexElement::calcSizes(const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -542,7 +542,7 @@ void IndexElement::calcSizes(const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -885,12 +885,12 @@ void IndexElement::moveDown(FormulaCursor* cursor, BasicElement* from) } -// tqchildren +// children // main child // -// If an element has tqchildren one has to become the main one. +// If an element has children one has to become the main one. // void IndexElement::setMainChild(SequenceElement* child) // { @@ -902,7 +902,7 @@ void IndexElement::moveDown(FormulaCursor* cursor, BasicElement* from) /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -954,8 +954,8 @@ void IndexElement::insert(FormulaCursor* cursor, /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -1032,7 +1032,7 @@ void IndexElement::normalize(FormulaCursor* cursor, Direction direction) /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ bool IndexElement::isSenseless() @@ -1659,13 +1659,13 @@ void IndexElement::writeMathMLAttributes( TQDomElement& element ) const if ( tag == "msub" || tag == "msubsup" ) { switch ( m_subScriptShiftType ) { case AbsoluteSize: - element.setAttribute( "subscriptshift", TQString( "%1pt" ).tqarg( m_subScriptShift ) ); + element.setAttribute( "subscriptshift", TQString( "%1pt" ).arg( m_subScriptShift ) ); break; case RelativeSize: - element.setAttribute( "subscriptshift", TQString( "%1%" ).tqarg( m_subScriptShift * 100.0 ) ); + element.setAttribute( "subscriptshift", TQString( "%1%" ).arg( m_subScriptShift * 100.0 ) ); break; case PixelSize: - element.setAttribute( "subscriptshift", TQString( "%1px" ).tqarg( m_subScriptShift ) ); + element.setAttribute( "subscriptshift", TQString( "%1px" ).arg( m_subScriptShift ) ); break; default: break; @@ -1674,13 +1674,13 @@ void IndexElement::writeMathMLAttributes( TQDomElement& element ) const if ( tag == "msup" || tag == "msubsup" ) { switch ( m_superScriptShiftType ) { case AbsoluteSize: - element.setAttribute( "superscriptshift", TQString( "%1pt" ).tqarg( m_superScriptShift ) ); + element.setAttribute( "superscriptshift", TQString( "%1pt" ).arg( m_superScriptShift ) ); break; case RelativeSize: - element.setAttribute( "superscriptshift", TQString( "%1%" ).tqarg( m_superScriptShift * 100.0 ) ); + element.setAttribute( "superscriptshift", TQString( "%1%" ).arg( m_superScriptShift * 100.0 ) ); break; case PixelSize: - element.setAttribute( "superscriptshift", TQString( "%1px" ).tqarg( m_superScriptShift ) ); + element.setAttribute( "superscriptshift", TQString( "%1px" ).arg( m_superScriptShift ) ); break; default: break; diff --git a/lib/kformula/indexelement.h b/lib/kformula/indexelement.h index f3fc1acb..b8e567b8 100644 --- a/lib/kformula/indexelement.h +++ b/lib/kformula/indexelement.h @@ -77,7 +77,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -85,7 +85,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -97,7 +97,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -137,7 +137,7 @@ public: */ virtual void moveDown(FormulaCursor* cursor, BasicElement* from); - // tqchildren + // children /** * Removes the child. If this was the main child this element might @@ -151,7 +151,7 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild() { return content; } //SequenceElement* upperLeft; @@ -163,7 +163,7 @@ public: /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -175,8 +175,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -212,7 +212,7 @@ public: /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless(); @@ -259,7 +259,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/kformulacommand.cc b/lib/kformula/kformulacommand.cc index 267038c4..65bfa6c3 100644 --- a/lib/kformula/kformulacommand.cc +++ b/lib/kformula/kformulacommand.cc @@ -556,10 +556,10 @@ void CharStyleCommand::execute() TQMap<SequenceElement*, int> parentCollector; styleList.clear(); - uint count = tqchildrenList().count(); + uint count = childrenList().count(); styleList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = tqchildrenList().at( i ); + TextElement* child = childrenList().at( i ); styleList[i] = child->getCharStyle(); child->setCharStyle( charStyle ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; @@ -571,10 +571,10 @@ void CharStyleCommand::execute() void CharStyleCommand::unexecute() { TQMap<SequenceElement*, int> parentCollector; - uint count = tqchildrenList().count(); + uint count = childrenList().count(); //styleList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = tqchildrenList().at( i ); + TextElement* child = childrenList().at( i ); child->setCharStyle( styleList[i] ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; } @@ -595,10 +595,10 @@ void CharFamilyCommand::execute() TQMap<SequenceElement*, int> parentCollector; familyList.clear(); - uint count = tqchildrenList().count(); + uint count = childrenList().count(); familyList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = tqchildrenList().at( i ); + TextElement* child = childrenList().at( i ); familyList[i] = child->getCharFamily(); child->setCharFamily( charFamily ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; @@ -610,10 +610,10 @@ void CharFamilyCommand::execute() void CharFamilyCommand::unexecute() { TQMap<SequenceElement*, int> parentCollector; - uint count = tqchildrenList().count(); + uint count = childrenList().count(); //familyList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = tqchildrenList().at( i ); + TextElement* child = childrenList().at( i ); child->setCharFamily( familyList[i] ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; } diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h index 09001040..bc1703be 100644 --- a/lib/kformula/kformulacommand.h +++ b/lib/kformula/kformulacommand.h @@ -495,13 +495,13 @@ public: void addTextElement( TextElement* element ) { list.append(element); } /** - * Collects all parent elements those tqchildren are to be changend. + * Collects all parent elements those children are to be changend. */ void addElement( BasicElement* element ) { elementList.append( element ); } protected: - TQPtrList<TextElement>& tqchildrenList() { return list; } + TQPtrList<TextElement>& childrenList() { return list; } void collectChildren(); @@ -520,7 +520,7 @@ private: /** - * Changes the char style of a number of elements an their tqchildren. + * Changes the char style of a number of elements an their children. */ class CharStyleCommand : public FontCommand { public: @@ -539,7 +539,7 @@ private: /** - * Changes the char family of a number of elements an their tqchildren. + * Changes the char family of a number of elements an their children. */ class CharFamilyCommand : public FontCommand { public: diff --git a/lib/kformula/kformulacontainer.h b/lib/kformula/kformulacontainer.h index d87e8184..f40f915b 100644 --- a/lib/kformula/kformulacontainer.h +++ b/lib/kformula/kformulacontainer.h @@ -347,7 +347,7 @@ signals: void errorMsg( const TQString& ); /** - * The element is going to leave the formula with and all its tqchildren. + * The element is going to leave the formula with and all its children. */ void elementWillVanish(BasicElement* element); diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index 17d163f0..9caa66cb 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -1075,7 +1075,7 @@ void DocumentWrapper::textItalic() void DocumentWrapper::delimiterLeft() { TQString left = m_leftBracket->currentText(); - switch ( left.tqat(0).latin1() ) { + switch ( left.at(0).latin1() ) { case '[': case ']': case '{': @@ -1086,7 +1086,7 @@ void DocumentWrapper::delimiterLeft() case ')': case '/': case '\\': - m_leftBracketChar = static_cast<SymbolType>( left.tqat(0).latin1() ); + m_leftBracketChar = static_cast<SymbolType>( left.at(0).latin1() ); break; case '|': m_leftBracketChar = LeftLineBracket; @@ -1100,7 +1100,7 @@ void DocumentWrapper::delimiterLeft() void DocumentWrapper::delimiterRight() { TQString right = m_rightBracket->currentText(); - switch ( right.tqat(0).latin1() ) { + switch ( right.at(0).latin1() ) { case '[': case ']': case '{': @@ -1111,7 +1111,7 @@ void DocumentWrapper::delimiterRight() case ')': case '/': case '\\': - m_rightBracketChar = static_cast<SymbolType>( right.tqat(0).latin1() ); + m_rightBracketChar = static_cast<SymbolType>( right.at(0).latin1() ); break; case '|': m_rightBracketChar = RightLineBracket; diff --git a/lib/kformula/kformulaview.h b/lib/kformula/kformulaview.h index 9562bbfe..cb9c715b 100644 --- a/lib/kformula/kformulaview.h +++ b/lib/kformula/kformulaview.h @@ -141,7 +141,7 @@ protected slots: /** * The cursor has been moved by the container. - * We need to tqrepaint if it was ours. + * We need to repaint if it was ours. */ void slotCursorMoved(FormulaCursor* cursor); diff --git a/lib/kformula/kformulawidget.cc b/lib/kformula/kformulawidget.cc index 0a3399eb..1014a66e 100644 --- a/lib/kformula/kformulawidget.cc +++ b/lib/kformula/kformulawidget.cc @@ -69,8 +69,8 @@ void KFormulaWidget::setReadOnly(bool ro) void KFormulaWidget::paintEvent(TQPaintEvent* event) { - // Always tqrepaint the buffer. This is not so much more work - // than it seems to be as each cursor movement requires a tqrepaint. + // Always repaint the buffer. This is not so much more work + // than it seems to be as each cursor movement requires a repaint. TQPainter p( &buffer ); //p.translate( -fr.x(), -fr.y() ); formulaView.draw( p, event->rect(), colorGroup() ); @@ -128,7 +128,7 @@ void KFormulaWidget::slotFormulaChanged(int width, int height) // Magic numbers just to see the cursor. resize(width + 5, height + 5); buffer.resize(width + 5, height + 5); - // tqrepaint is needed even if the size doesn't change. + // repaint is needed even if the size doesn't change. //update(); } diff --git a/lib/kformula/matrixelement.cc b/lib/kformula/matrixelement.cc index 6b5a5898..7371113f 100644 --- a/lib/kformula/matrixelement.cc +++ b/lib/kformula/matrixelement.cc @@ -430,7 +430,7 @@ BasicElement* MatrixElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void MatrixElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -508,7 +508,7 @@ void MatrixElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -1260,7 +1260,7 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const { TQString rownumber; if ( m_rowNumber ) { - rownumber = TQString( " %1" ).tqarg( m_rowNumber ); + rownumber = TQString( " %1" ).arg( m_rowNumber ); } switch ( m_align ) { case TopAlign: @@ -1352,15 +1352,15 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const columnwidth.append( "fit " ); break; case AbsoluteSize: - columnwidth.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); + columnwidth.append( TQString( "%1pt " ).arg( *lengthIt ) ); lengthIt++; break; case RelativeSize: - columnwidth.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); + columnwidth.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); lengthIt++; break; case PixelSize: - columnwidth.append( TQString( "%1px " ).tqarg( *lengthIt ) ); + columnwidth.append( TQString( "%1px " ).arg( *lengthIt ) ); lengthIt++; break; case NegativeVeryVeryThinMathSpace: @@ -1417,13 +1417,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const element.setAttribute( "width", "auto" ); break; case AbsoluteSize: - element.setAttribute( "width", TQString( "%1pt" ).tqarg( m_width ) ); + element.setAttribute( "width", TQString( "%1pt" ).arg( m_width ) ); break; case RelativeSize: - element.setAttribute( "width", TQString( "%1% " ).tqarg( m_width * 100.0 ) ); + element.setAttribute( "width", TQString( "%1% " ).arg( m_width * 100.0 ) ); break; case PixelSize: - element.setAttribute( "width", TQString( "%1px " ).tqarg( m_width ) ); + element.setAttribute( "width", TQString( "%1px " ).arg( m_width ) ); break; default: break; @@ -1434,13 +1434,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const typeIt != m_rowSpacingType.end(); typeIt++, lengthIt++ ) { switch ( *typeIt ) { case AbsoluteSize: - rowspacing.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); + rowspacing.append( TQString( "%1pt " ).arg( *lengthIt ) ); break; case RelativeSize: - rowspacing.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); + rowspacing.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); break; case PixelSize: - rowspacing.append( TQString( "%1px " ).tqarg( *lengthIt ) ); + rowspacing.append( TQString( "%1px " ).arg( *lengthIt ) ); break; default: break; @@ -1455,15 +1455,15 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const typeIt != m_columnSpacingType.end(); typeIt++ ) { switch ( *typeIt ) { case AbsoluteSize: - columnspacing.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); + columnspacing.append( TQString( "%1pt " ).arg( *lengthIt ) ); lengthIt++; break; case RelativeSize: - columnspacing.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); + columnspacing.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); lengthIt++; break; case PixelSize: - columnspacing.append( TQString( "%1px " ).tqarg( *lengthIt ) ); + columnspacing.append( TQString( "%1px " ).arg( *lengthIt ) ); lengthIt++; break; case NegativeVeryVeryThinMathSpace: @@ -1571,13 +1571,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const TQString framespacing; switch ( m_frameHSpacingType ) { case AbsoluteSize: - framespacing.append( TQString( "%1pt " ).tqarg( m_frameHSpacing ) ); + framespacing.append( TQString( "%1pt " ).arg( m_frameHSpacing ) ); break; case RelativeSize: - framespacing.append( TQString( "%1% " ).tqarg( m_frameHSpacing * 100.0 ) ); + framespacing.append( TQString( "%1% " ).arg( m_frameHSpacing * 100.0 ) ); break; case PixelSize: - framespacing.append( TQString( "%1px " ).tqarg( m_frameHSpacing ) ); + framespacing.append( TQString( "%1px " ).arg( m_frameHSpacing ) ); break; case NegativeVeryVeryThinMathSpace: framespacing.append( "negativeveryverythinmathspace " ); @@ -1626,13 +1626,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_frameVSpacingType ) { case AbsoluteSize: - framespacing.append( TQString( "%1pt " ).tqarg( m_frameVSpacing ) ); + framespacing.append( TQString( "%1pt " ).arg( m_frameVSpacing ) ); break; case RelativeSize: - framespacing.append( TQString( "%1% " ).tqarg( m_frameVSpacing * 100.0 ) ); + framespacing.append( TQString( "%1% " ).arg( m_frameVSpacing * 100.0 ) ); break; case PixelSize: - framespacing.append( TQString( "%1px " ).tqarg( m_frameVSpacing ) ); + framespacing.append( TQString( "%1px " ).arg( m_frameVSpacing ) ); break; case NegativeVeryVeryThinMathSpace: framespacing.append( "negativeveryverythinmathspace " ); @@ -1709,13 +1709,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_minLabelSpacingType ) { case AbsoluteSize: - element.setAttribute( "minlabelspacing", TQString( "%1pt" ).tqarg( m_minLabelSpacing ) ); + element.setAttribute( "minlabelspacing", TQString( "%1pt" ).arg( m_minLabelSpacing ) ); break; case RelativeSize: - element.setAttribute( "minlabelspacing", TQString( "%1%" ).tqarg( m_minLabelSpacing * 100.0 ) ); + element.setAttribute( "minlabelspacing", TQString( "%1%" ).arg( m_minLabelSpacing * 100.0 ) ); break; case PixelSize: - element.setAttribute( "minlabelspacing", TQString( "%1px" ).tqarg( m_minLabelSpacing ) ); + element.setAttribute( "minlabelspacing", TQString( "%1px" ).arg( m_minLabelSpacing ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( "minlabelspacing", "negativeveryverythinmathspace" ); @@ -1810,7 +1810,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -1894,7 +1894,7 @@ void KFCNewLine::execute() int linePos = parent->content.find( m_line ); parent->content.insert( linePos+1, m_newline ); - // If there are tqchildren to be moved. + // If there are children to be moved. if ( m_line->countChildren() > static_cast<int>( m_pos ) ) { // Remove anything after position pos from the current line @@ -1935,7 +1935,7 @@ void KFCNewLine::unexecute() FormulaElement* formula = m_line->formula(); formula->elementRemoval( m_newline ); - // If there are tqchildren to be moved. + // If there are children to be moved. if ( m_newline->countChildren() > 0 ) { // Remove anything from the line to be deleted @@ -2129,7 +2129,7 @@ void MultilineSequenceElement::writeMathML( TQDomDocument& doc, // The mrow, if it exists. TQDomNode n = tmp.firstChild().firstChild(); while ( !n.isNull() ) { - // the illegal TabMarkers are tqchildren of the mrow, child of tmp. + // the illegal TabMarkers are children of the mrow, child of tmp. if ( n.isElement() && n.toElement().tagName() == "TAB" ) { parent.appendChild( mtd ); mtd = doc.createElement( oasisFormat ? "math:mtd" : "mtd" ); diff --git a/lib/kformula/matrixelement.h b/lib/kformula/matrixelement.h index 89426659..7320bf2b 100644 --- a/lib/kformula/matrixelement.h +++ b/lib/kformula/matrixelement.h @@ -80,7 +80,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -88,7 +88,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -100,7 +100,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -153,14 +153,14 @@ public: virtual SequenceElement* getMainChild(); /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. */ //virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. */ //virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction); @@ -184,14 +184,14 @@ public: /** * Returns wether the element has no more useful - * tqchildren (except its main child) and should therefore + * children (except its main child) and should therefore * be replaced by its main child's content. */ //virtual bool isSenseless(); /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -375,7 +375,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -383,7 +383,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -395,7 +395,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -414,7 +414,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/operatorelement.cc b/lib/kformula/operatorelement.cc index 66c1fcdc..27dbbdd6 100644 --- a/lib/kformula/operatorelement.cc +++ b/lib/kformula/operatorelement.cc @@ -488,13 +488,13 @@ void OperatorElement::writeSizeAttribute( TQDomElement& element, const TQString element.setAttribute( attr, "infinity" ); break; case AbsoluteSize: - element.setAttribute( attr, TQString( "%1pt" ).tqarg( length ) ); + element.setAttribute( attr, TQString( "%1pt" ).arg( length ) ); break; case RelativeSize: - element.setAttribute( attr, TQString( "%1% " ).tqarg( length * 100.0 ) ); + element.setAttribute( attr, TQString( "%1% " ).arg( length * 100.0 ) ); break; case PixelSize: - element.setAttribute( attr, TQString( "%1px " ).tqarg( length ) ); + element.setAttribute( attr, TQString( "%1px " ).arg( length ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( attr, "negativeveryverythinmathspace" ); diff --git a/lib/kformula/paddedelement.cc b/lib/kformula/paddedelement.cc index f153a339..e4f28ce7 100644 --- a/lib/kformula/paddedelement.cc +++ b/lib/kformula/paddedelement.cc @@ -36,7 +36,7 @@ PaddedElement::PaddedElement( BasicElement* parent ) : SequenceElement( parent ) /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void PaddedElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -233,18 +233,18 @@ void PaddedElement::writeSizeAttribute( TQDomElement element, const TQString& st } switch ( st ) { case WidthRelativeSize: - element.setAttribute( str, prefix + TQString( "%1 width" ).tqarg( s ) ); + element.setAttribute( str, prefix + TQString( "%1 width" ).arg( s ) ); break; case HeightRelativeSize: - element.setAttribute( str, prefix + TQString( "%1 height" ).tqarg( s ) ); + element.setAttribute( str, prefix + TQString( "%1 height" ).arg( s ) ); case AbsoluteSize: - element.setAttribute( str, prefix + TQString( "%1pt" ).tqarg( s ) ); + element.setAttribute( str, prefix + TQString( "%1pt" ).arg( s ) ); break; case RelativeSize: - element.setAttribute( str, prefix + TQString( "%1%" ).tqarg( s * 100.0 ) ); + element.setAttribute( str, prefix + TQString( "%1%" ).arg( s * 100.0 ) ); break; case PixelSize: - element.setAttribute( str, prefix + TQString( "%1px" ).tqarg( s ) ); + element.setAttribute( str, prefix + TQString( "%1px" ).arg( s ) ); break; default: break; diff --git a/lib/kformula/paddedelement.h b/lib/kformula/paddedelement.h index 5df95b74..f50489c8 100644 --- a/lib/kformula/paddedelement.h +++ b/lib/kformula/paddedelement.h @@ -32,7 +32,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, diff --git a/lib/kformula/phantomelement.cc b/lib/kformula/phantomelement.cc index e2a07fc6..78b0a1cb 100644 --- a/lib/kformula/phantomelement.cc +++ b/lib/kformula/phantomelement.cc @@ -26,7 +26,7 @@ PhantomElement::PhantomElement( BasicElement* parent ) : SequenceElement( parent } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/phantomelement.h b/lib/kformula/phantomelement.h index 373c3545..6fe9a953 100644 --- a/lib/kformula/phantomelement.h +++ b/lib/kformula/phantomelement.h @@ -30,7 +30,7 @@ public: PhantomElement( BasicElement* parent = 0 ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/prototype/engine.py b/lib/kformula/prototype/engine.py index a2a94487..f1391069 100644 --- a/lib/kformula/prototype/engine.py +++ b/lib/kformula/prototype/engine.py @@ -82,7 +82,7 @@ class BasicElement: return self.parent.formula() def draw(self, painter, styleContext, startPoint): - """Draws the whole thing. Including its tqchildren.""" + """Draws the whole thing. Including its children.""" pass def calcSizes(self, styleContext): @@ -91,7 +91,7 @@ class BasicElement: will be stored in self.size, the midline offset in self.midline. - Please note: It's up to a parent to store its tqchildren's position.""" + Please note: It's up to a parent to store its children's position.""" pass def mainChild(self): @@ -116,22 +116,22 @@ class BasicElement: class SequenceElement (BasicElement): - """The element that contains a number of tqchildren. - The tqchildren are aligned in one line.""" + """The element that contains a number of children. + The children are aligned in one line.""" def __init__(self, parent): BasicElement.__init__(self, parent) - self.tqchildren = [] + self.children = [] def elementAtCursor(self, cursor): """Returns the element before the cursor.""" if cursor.pos() > 0: - return self.tqchildren[cursor.pos()-1] + return self.children[cursor.pos()-1] def elementAt(self, point, startPoint): r = BasicElement.elementAt(self, point, startPoint) if r != None: - for child in self.tqchildren: + for child in self.children: r = child.elementAt(point, QPoint(startPoint.x()+child.x(), startPoint.y()+child.y())) if r != None: @@ -143,7 +143,7 @@ class SequenceElement (BasicElement): # Our parent asks us for a cursor position. Found. if fromElement == self.parent: - cursor.set(self, len(self.tqchildren)) + cursor.set(self, len(self.children)) # We already owned the cursor. Ask next child then. elif fromElement == self: @@ -151,16 +151,16 @@ class SequenceElement (BasicElement): if cursor.isSelection(): cursor.set (self, cursor.pos()-1) else: - self.tqchildren[cursor.pos()-1].moveLeft(cursor, self) + self.children[cursor.pos()-1].moveLeft(cursor, self) else: # Needed because FormulaElement derives this. if self.parent != None: self.parent.moveLeft(cursor, self) - # The cursor came from one of our tqchildren or + # The cursor came from one of our children or # something is wrong. else: - fromPos = self.tqchildren.index(fromElement) + fromPos = self.children.index(fromElement) cursor.set(self, fromPos) if cursor.isSelection(): if not cursor.mouseMark(): @@ -175,20 +175,20 @@ class SequenceElement (BasicElement): # We already owned the cursor. Ask next child then. elif fromElement == self: - if cursor.pos() < len(self.tqchildren): + if cursor.pos() < len(self.children): if cursor.isSelection(): cursor.set (self, cursor.pos()+1) else: - self.tqchildren[cursor.pos()].moveRight(cursor, self) + self.children[cursor.pos()].moveRight(cursor, self) else: # Needed because FormulaElement derives this. if self.parent != None: self.parent.moveRight(cursor, self) - # The cursor came from one of our tqchildren or + # The cursor came from one of our children or # something is wrong. else: - fromPos = self.tqchildren.index(fromElement) + fromPos = self.children.index(fromElement) cursor.set(self, fromPos+1) if cursor.isSelection(): if not cursor.mouseMark(): @@ -217,7 +217,7 @@ class SequenceElement (BasicElement): if element != self: while element.parent != self: element = element.parent - cursor.setMarkPos(self.tqchildren.index(element)+1) + cursor.setMarkPos(self.children.index(element)+1) cursor.set(self, 0) def moveEnd(self, cursor): @@ -226,14 +226,14 @@ class SequenceElement (BasicElement): if element != self: while element.parent != self: element = element.parent - cursor.setMarkPos(self.tqchildren.index(element)) - cursor.set(self, len(self.tqchildren)) + cursor.setMarkPos(self.children.index(element)) + cursor.set(self, len(self.children)) def draw(self, painter, styleContext, startPoint): x, y = startPoint.x(), startPoint.y() - if len(self.tqchildren) > 0: - for child in self.tqchildren: + if len(self.children) > 0: + for child in self.children: cX = child.x() cY = child.y() child.draw(painter, styleContext, QPoint(x+cX, y+cY)) @@ -246,11 +246,11 @@ class SequenceElement (BasicElement): painter.drawRect(x, y, self.width(), self.height()) def calcSizes(self, styleContext): - if len(self.tqchildren) > 0: + if len(self.children) > 0: x = self.x() y = self.y() width = toMidline = fromMidline = 0 - for child in self.tqchildren: + for child in self.children: child.calcSizes(styleContext) child.setX(width) width += child.width() @@ -263,7 +263,7 @@ class SequenceElement (BasicElement): self.setHeight(toMidline+fromMidline) self.midline = toMidline - for child in self.tqchildren: + for child in self.children: child.setY(self.midline - child.midline) else: @@ -272,13 +272,13 @@ class SequenceElement (BasicElement): self.midline = 5 def mainChild(self): - if len(self.tqchildren) > 0: - return self.tqchildren[0] + if len(self.children) > 0: + return self.children[0] return None def setMainChild(self, sequenceElement): - if len(self.tqchildren) > 0: - self.tqchildren[0] = sequenceElement + if len(self.children) > 0: + self.children[0] = sequenceElement sequenceElement.parent = self else: self.addChild(sequenceElement) @@ -301,14 +301,14 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.tqchildren.pop(f) + child = self.children.pop(f) self.formula().elementRemoved(child) seq.addChild(child) - self.tqchildren.insert(f, element) + self.children.insert(f, element) cursor.setMarkPos(-1) cursor.set(self, f+1) elif cursor.pos() > 0: - seq.addChild(self.tqchildren[cursor.pos()-1]) + seq.addChild(self.children[cursor.pos()-1]) self.replaceChild(cursor, element) else: self.insertChild(cursor, element) @@ -323,10 +323,10 @@ class SequenceElement (BasicElement): self.formula().elementRemoved(element) seq = element.mainChild() - pos = self.tqchildren.index(element) - self.tqchildren.remove(element) - for child in seq.tqchildren: - self.tqchildren.insert(pos, child) + pos = self.children.index(element) + self.children.remove(element) + for child in seq.children: + self.children.insert(pos, child) child.parent = self pos += 1 cursor.set(self, pos) @@ -334,7 +334,7 @@ class SequenceElement (BasicElement): def addChild(self, element): - self.tqchildren.append(element) + self.children.append(element) element.parent = self self.formula().changed() @@ -342,7 +342,7 @@ class SequenceElement (BasicElement): """Inserts the new element at the cursor position. The cursor is placed behind the new element.""" pos = cursor.pos() - self.tqchildren.insert(pos, element) + self.children.insert(pos, element) element.parent = self cursor.set(self, pos+1) self.formula().changed() @@ -350,15 +350,15 @@ class SequenceElement (BasicElement): def replaceChild(self, cursor, element): """Replaces the element before the cursor with the new one. No range checking. Be careful.""" - self.tqchildren[cursor.pos()-1] = element + self.children[cursor.pos()-1] = element element.parent = self self.formula().changed() def removeChild(self, cursor, element): self.formula().elementRemoved(element) - cursor.set(self, self.tqchildren.index(element)) - self.tqchildren.remove(element) - if len(self.tqchildren) == 0: + cursor.set(self, self.children.index(element)) + self.children.remove(element) + if len(self.children) == 0: if self.parent != None: self.parent.removeChild(cursor, self) return @@ -370,16 +370,16 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.tqchildren.pop(f) + child = self.children.pop(f) self.formula().elementRemoved(child) cursor.setMarkPos(-1) cursor.set(self, f) self.formula().changed() - elif pos < len(self.tqchildren): - self.tqchildren.pop(pos) + elif pos < len(self.children): + self.children.pop(pos) self.formula().changed() else: - if len(self.tqchildren) == 0: + if len(self.children) == 0: if self.parent != None: self.parent.removeChild(cursor, self) @@ -389,17 +389,17 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.tqchildren.pop(f) + child = self.children.pop(f) self.formula().elementRemoved(child) cursor.setMarkPos(-1) cursor.set(self, f) self.formula().changed() elif pos >= 0: - self.tqchildren.pop(pos) + self.children.pop(pos) cursor.set(self, pos) self.formula().changed() else: - if len(self.tqchildren) == 0: + if len(self.children) == 0: if self.parent != None: self.parent.removeChild(cursor, self) @@ -408,10 +408,10 @@ class SequenceElement (BasicElement): """Returns the position after the child at the position in global Coords.""" point = self.globalPos() - if pos < len(self.tqchildren): - d = self.tqchildren[pos].x() + if pos < len(self.children): + d = self.children[pos].x() else: - if len(self.tqchildren) > 0: + if len(self.children) > 0: d = self.width() else: d = 2 @@ -420,12 +420,12 @@ class SequenceElement (BasicElement): return point def countChildren(self): - return len(self.tqchildren) + return len(self.children) class FormulaElement (SequenceElement): """The main element. - A formula consists of a FormulaElement and its tqchildren. + A formula consists of a FormulaElement and its children. The only element that has no parent.""" def __init__(self, document): @@ -436,7 +436,7 @@ class FormulaElement (SequenceElement): return self def changed(self): - """Is called by its tqchildren if the formula changed in any way.""" + """Is called by its children if the formula changed in any way.""" self.document.changed() def elementRemoved(self, element): diff --git a/lib/kformula/rootelement.cc b/lib/kformula/rootelement.cc index 5adeb51c..82a5870c 100644 --- a/lib/kformula/rootelement.cc +++ b/lib/kformula/rootelement.cc @@ -176,7 +176,7 @@ BasicElement* RootElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void RootElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -234,7 +234,7 @@ void RootElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -434,8 +434,8 @@ void RootElement::insert(FormulaCursor* cursor, } /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * We remove ourselve if we are requested to remove our content. */ @@ -476,7 +476,7 @@ void RootElement::normalize(FormulaCursor* cursor, Direction direction) // main child // -// If an element has tqchildren one has to become the main one. +// If an element has children one has to become the main one. SequenceElement* RootElement::getMainChild() { diff --git a/lib/kformula/rootelement.h b/lib/kformula/rootelement.h index 1eacf4d4..f4286ab4 100644 --- a/lib/kformula/rootelement.h +++ b/lib/kformula/rootelement.h @@ -66,7 +66,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -74,7 +74,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -86,7 +86,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -124,8 +124,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * We remove ourselve if we are requested to remove our content. */ @@ -139,7 +139,7 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild(); SequenceElement* getRadiant() { return index; } @@ -175,7 +175,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc index 93293db7..c44c1b50 100644 --- a/lib/kformula/sequenceelement.cc +++ b/lib/kformula/sequenceelement.cc @@ -76,7 +76,7 @@ SequenceElement::SequenceElement(BasicElement* parent) : BasicElement(parent), parseTree(0), textSequence(true),singlePipe(true), style(0) { assert( creationStrategy != 0 ); - tqchildren.setAutoDelete(true); + children.setAutoDelete(true); } @@ -88,12 +88,12 @@ SequenceElement::~SequenceElement() SequenceElement::SequenceElement( const SequenceElement& other ) : BasicElement( other ) { - tqchildren.setAutoDelete(true); - uint count = other.tqchildren.count(); + children.setAutoDelete(true); + uint count = other.children.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = tqchildren.at(i)->clone(); + BasicElement* child = children.at(i)->clone(); child->setParent( this ); - tqchildren.append( child ); + children.append( child ); } } @@ -121,18 +121,18 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, LuPixelPoint myPos(parentOrigin.x() + getX(), parentOrigin.y() + getY()); - uint count = tqchildren.count(); + uint count = children.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = tqchildren.at(i); + BasicElement* child = children.at(i); e = child->goToPos(cursor, handled, point, myPos); if (e != 0) { if (!handled) { handled = true; if ((point.x() - myPos.x()) < (e->getX() + e->getWidth()*2/3)) { - cursor->setTo(this, tqchildren.find(e)); + cursor->setTo(this, children.find(e)); } else { - cursor->setTo(this, tqchildren.find(e)+1); + cursor->setTo(this, children.find(e)+1); } } return e; @@ -143,11 +143,11 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, //int dy = point.y() - myPos.y(); for (uint i = 0; i < count; i++) { - BasicElement* child = tqchildren.at(i); + BasicElement* child = children.at(i); if (dx < child->getX()) { cursor->setTo( this, i ); handled = true; - return tqchildren.at( i ); + return children.at( i ); } } @@ -161,9 +161,9 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, bool SequenceElement::isEmpty() { - uint count = tqchildren.count(); + uint count = children.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = tqchildren.at(i); + BasicElement* child = children.at(i); if (!child->isInvisible()) { return false; } @@ -174,7 +174,7 @@ bool SequenceElement::isEmpty() /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void SequenceElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -190,7 +190,7 @@ void SequenceElement::calcSizes( const ContextStyle& context, width += context.ptToPixelX( getSpaceBefore( context, tstyle, factor ) ); // Let's do all normal elements that have a base line. - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); @@ -237,7 +237,7 @@ void SequenceElement::calcSizes( const ContextStyle& context, void SequenceElement::setChildrenPositions() { - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); child->setY(getBaseline() - child->getBaseline()); @@ -246,7 +246,7 @@ void SequenceElement::setChildrenPositions() /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -264,7 +264,7 @@ void SequenceElement::draw( TQPainter& painter, const LuPixelRect& r, // return; if (!isEmpty()) { - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); for (int i = 0 ; it.current(); i++) { BasicElement* child = it.current(); if (!child->isInvisible()) { @@ -308,7 +308,7 @@ void SequenceElement::draw( TQPainter& painter, const LuPixelRect& r, void SequenceElement::dispatchFontCommand( FontCommand* cmd ) { - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); child->dispatchFontCommand( cmd ); @@ -420,12 +420,12 @@ void SequenceElement::drawCursor( TQPainter& painter, const ContextStyle& contex luPixel SequenceElement::getChildPosition( const ContextStyle& context, uint child ) { - if (child < tqchildren.count()) { - return tqchildren.at(child)->getX(); + if (child < children.count()) { + return children.at(child)->getX(); } else { - if (tqchildren.count() > 0) { - return tqchildren.at(child-1)->getX() + tqchildren.at(child-1)->getWidth(); + if (children.count() > 0) { + return children.at(child-1)->getX() + children.at(child-1)->getWidth(); } else { return context.ptToLayoutUnitPixX( 2 ); @@ -451,9 +451,9 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) { // Our parent asks us for a cursor position. Found. if (from == getParent()) { - cursor->setTo(this, tqchildren.count()); + cursor->setTo(this, children.count()); if ( cursor->isSelectionMode() ) { - cursor->setMark( tqchildren.count() ); + cursor->setMark( children.count() ); } from->entered( this ); } @@ -464,7 +464,7 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) cursor->setTo(this, cursor->getPos()-1); // invisible elements are not visible so we move on. - if (tqchildren.at(cursor->getPos())->isInvisible()) { + if (children.at(cursor->getPos())->isInvisible()) { moveLeft(cursor, this); } } @@ -479,12 +479,12 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) } } - // The cursor came from one of our tqchildren or + // The cursor came from one of our children or // something is wrong. else { - int fromPos = tqchildren.find(from); + int fromPos = children.find(from); if ( fromPos > 0 ) { - tqchildren.at( fromPos - 1)->moveLeft( cursor, this ); + children.at( fromPos - 1)->moveLeft( cursor, this ); } // invisible elements are not visible so we move on. @@ -511,11 +511,11 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from) // We already owned the cursor. Ask next child then. else if (from == this) { uint pos = cursor->getPos(); - if (pos < tqchildren.count()) { + if (pos < children.count()) { cursor->setTo(this, pos+1); // invisible elements are not visible so we move on. - if (tqchildren.at(pos)->isInvisible()) { + if (children.at(pos)->isInvisible()) { moveRight(cursor, this); } } @@ -530,12 +530,12 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from) } } - // The cursor came from one of our tqchildren or + // The cursor came from one of our children or // something is wrong. else { - int fromPos = tqchildren.find(from); - if ( fromPos < tqchildren.count() - 1 ) { - tqchildren.at( fromPos + 1 )->moveDown( cursor, this ); + int fromPos = children.find(from); + if ( fromPos < children.count() - 1 ) { + children.at( fromPos + 1 )->moveDown( cursor, this ); } else { cursor->setTo(this, fromPos+1); @@ -557,7 +557,7 @@ void SequenceElement::moveWordLeft(FormulaCursor* cursor) { uint pos = cursor->getPos(); if (pos > 0) { - ElementType* type = tqchildren.at(pos-1)->getElementType(); + ElementType* type = children.at(pos-1)->getElementType(); if (type != 0) { cursor->setTo(this, type->start()); } @@ -571,8 +571,8 @@ void SequenceElement::moveWordLeft(FormulaCursor* cursor) void SequenceElement::moveWordRight(FormulaCursor* cursor) { uint pos = cursor->getPos(); - if (pos < tqchildren.count()) { - ElementType* type = tqchildren.at(pos)->getElementType(); + if (pos < children.count()) { + ElementType* type = children.at(pos)->getElementType(); if (type != 0) { cursor->setTo(this, type->end()); } @@ -596,7 +596,7 @@ void SequenceElement::moveUp(FormulaCursor* cursor, BasicElement* from) else if ( from == this ) { if ( getParent() != 0 ) { uint pos = cursor->getPos(); - if ( pos < (tqchildren.count() - 1) / 2 ) { + if ( pos < (children.count() - 1) / 2 ) { getParent()->moveLeft( cursor, this ); } else { @@ -630,8 +630,8 @@ void SequenceElement::moveDown(FormulaCursor* cursor, BasicElement* from) } else if (from == this) { uint pos = cursor->getPos(); - if (pos < tqchildren.count()) { - tqchildren.at(pos)->moveDown(cursor, this); + if (pos < children.count()) { + children.at(pos)->moveDown(cursor, this); } } else { @@ -639,7 +639,7 @@ void SequenceElement::moveDown(FormulaCursor* cursor, BasicElement* from) getParent()->moveDown(cursor, this); } else { - cursor->setTo( this, tqchildren.count() ); + cursor->setTo( this, children.count() ); from->entered( this ); // formula()->moveOutBelow( cursor ); } @@ -658,7 +658,7 @@ void SequenceElement::moveHome(FormulaCursor* cursor) while (element->getParent() != this) { element = element->getParent(); } - cursor->setMark(tqchildren.find(element)+1); + cursor->setMark(children.find(element)+1); } } cursor->setTo(this, 0); @@ -676,16 +676,16 @@ void SequenceElement::moveEnd(FormulaCursor* cursor) while (element->getParent() != this) { element = element->getParent(); if (element == 0) { - cursor->setMark(tqchildren.count()); + cursor->setMark(children.count()); break; } } if (element != 0) { - cursor->setMark(tqchildren.find(element)); + cursor->setMark(children.find(element)); } } } - cursor->setTo(this, tqchildren.count()); + cursor->setTo(this, children.count()); } /** @@ -705,11 +705,11 @@ void SequenceElement::goInside(FormulaCursor* cursor) void SequenceElement::goInsideLast(FormulaCursor* cursor) { cursor->setSelection(false); - cursor->setTo(this, tqchildren.count()); + cursor->setTo(this, children.count()); } -// tqchildren +// children /** * Insert a new child in the sequence @@ -723,7 +723,7 @@ void SequenceElement::goInsideLast(FormulaCursor* cursor) bool SequenceElement::insert( uint index, BasicElement *child ) { - return tqchildren.insert( index, child ); + return children.insert( index, child ); } /** @@ -735,12 +735,12 @@ bool SequenceElement::insert( uint index, BasicElement *child ) */ // void SequenceElement::removeChild(FormulaCursor* cursor, BasicElement* child) // { -// int pos = tqchildren.find(child); +// int pos = children.find(child); // formula()->elementRemoval(child, pos); // cursor->setTo(this, pos); -// tqchildren.remove(pos); +// children.remove(pos); // /* -// if len(self.tqchildren) == 0: +// if len(self.children) == 0: // if self.parent != None: // self.parent.removeChild(cursor, self) // return @@ -750,7 +750,7 @@ bool SequenceElement::insert( uint index, BasicElement *child ) /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. The inserted elements will * be selected. * @@ -765,7 +765,7 @@ void SequenceElement::insert(FormulaCursor* cursor, for (uint i = 0; i < count; i++) { BasicElement* child = newChildren.take(0); child->setParent(this); - tqchildren.insert(pos+i, child); + children.insert(pos+i, child); } if (direction == beforeCursor) { cursor->setTo(this, pos+count, pos); @@ -780,8 +780,8 @@ void SequenceElement::insert(FormulaCursor* cursor, /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * The ownership of the list is passed to the caller. */ @@ -803,9 +803,9 @@ void SequenceElement::remove(FormulaCursor* cursor, int pos = cursor->getPos() - 1; if (pos >= 0) { while (pos >= 0) { - BasicElement* child = tqchildren.at(pos); + BasicElement* child = children.at(pos); formula()->elementRemoval(child); - tqchildren.take(pos); + children.take(pos); removedChildren.prepend(child); if (!child->isInvisible()) { break; @@ -818,11 +818,11 @@ void SequenceElement::remove(FormulaCursor* cursor, } else { uint pos = cursor->getPos(); - if (pos < tqchildren.count()) { - while (pos < tqchildren.count()) { - BasicElement* child = tqchildren.at(pos); + if (pos < children.count()) { + while (pos < children.count()) { + BasicElement* child = children.at(pos); formula()->elementRemoval(child); - tqchildren.take(pos); + children.take(pos); removedChildren.append(child); if (!child->isInvisible()) { break; @@ -841,13 +841,13 @@ void SequenceElement::remove(FormulaCursor* cursor, /** - * Removes the tqchildren at pos and appends it to the list. + * Removes the children at pos and appends it to the list. */ void SequenceElement::removeChild(TQPtrList<BasicElement>& removedChildren, int pos) { - BasicElement* child = tqchildren.at(pos); + BasicElement* child = children.at(pos); formula()->elementRemoval(child); - tqchildren.take(pos); + children.take(pos); removedChildren.append(child); //cerr << *removedChildren.at(0) << endl; formula()->changed(); @@ -872,12 +872,12 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct { if ( direction == beforeCursor ) { if ( cursor->getPos() > 0 ) { - return tqchildren.at( cursor->getPos() - 1 ); + return children.at( cursor->getPos() - 1 ); } } else { - if ( cursor->getPos() < tqRound( tqchildren.count() ) ) { - return tqchildren.at( cursor->getPos() ); + if ( cursor->getPos() < tqRound( children.count() ) ) { + return children.at( cursor->getPos() ); } } return 0; @@ -890,7 +890,7 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct */ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child) { - int pos = tqchildren.find(child); + int pos = children.find(child); if (pos > -1) { cursor->setTo(this, pos+1, pos); } @@ -898,7 +898,7 @@ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child) void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child) { - int childPos = tqchildren.find(child); + int childPos = children.find(child); if (childPos > -1) { int pos = cursor->getPos(); if (pos > childPos) { @@ -914,11 +914,11 @@ void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child /** - * Selects all tqchildren. The cursor is put behind, the mark before them. + * Selects all children. The cursor is put behind, the mark before them. */ void SequenceElement::selectAllChildren(FormulaCursor* cursor) { - cursor->setTo(this, tqchildren.count(), 0); + cursor->setTo(this, children.count(), 0); } bool SequenceElement::onlyTextSelected( FormulaCursor* cursor ) @@ -1116,7 +1116,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request case req_addIndex: { if ( cursor->getPos() > 0 && !cursor->isSelection() ) { IndexElement* element = - dynamic_cast<IndexElement*>( tqchildren.at( cursor->getPos()-1 ) ); + dynamic_cast<IndexElement*>( children.at( cursor->getPos()-1 ) ); if ( element != 0 ) { element->goInside( cursor ); return element->buildCommand( container, request ); @@ -1206,7 +1206,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request CharStyleCommand* cmd = new CharStyleCommand( cs, i18n( "Change Char Style" ), container ); int end = cursor->getSelectionEnd(); for ( int i = cursor->getSelectionStart(); i<end; ++i ) { - cmd->addElement( tqchildren.at( i ) ); + cmd->addElement( children.at( i ) ); } return cmd; } @@ -1219,7 +1219,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request CharFamilyCommand* cmd = new CharFamilyCommand( cf, i18n( "Change Char Family" ), container ); int end = cursor->getSelectionEnd(); for ( int i = cursor->getSelectionStart(); i<end; ++i ) { - cmd->addElement( tqchildren.at( i ) ); + cmd->addElement( children.at( i ) ); } return cmd; } @@ -1397,25 +1397,25 @@ KCommand* SequenceElement::input( Container* container, TQChar ch ) } /** - * Stores the given tqchildrens dom in the element. + * Stores the given childrens dom in the element. */ void SequenceElement::getChildrenDom( TQDomDocument& doc, TQDomElement elem, uint from, uint to) { for (uint i = from; i < to; i++) { - TQDomElement tmpEleDom=tqchildren.at(i)->getElementDom(doc); + TQDomElement tmpEleDom=children.at(i)->getElementDom(doc); elem.appendChild(tmpEleDom); } } /** - * Stores the given tqchildrens MathML dom in the element. + * Stores the given childrens MathML dom in the element. */ void SequenceElement::getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& parent, uint from, uint to) { for ( uint i = from; i < to; i++ ) { - tqchildren.at( i )->writeMathML( doc, parent, false ); + children.at( i )->writeMathML( doc, parent, false ); } } @@ -1467,7 +1467,7 @@ void SequenceElement::writeDom(TQDomElement element) { BasicElement::writeDom(element); - uint count = tqchildren.count(); + uint count = children.count(); TQDomDocument doc = element.ownerDocument(); getChildrenDom(doc, element, 0, count); } @@ -1495,7 +1495,7 @@ bool SequenceElement::readContentFromDom(TQDomNode& node) return false; } - return buildChildrenFromDom(tqchildren, node); + return buildChildrenFromDom(children, node); } @@ -1504,9 +1504,9 @@ void SequenceElement::parse() delete parseTree; textSequence = true; - for (BasicElement* element = tqchildren.first(); + for (BasicElement* element = children.first(); element != 0; - element = tqchildren.next()) { + element = children.next()) { // Those types are gone. Make sure they won't // be used. @@ -1519,7 +1519,7 @@ void SequenceElement::parse() const SymbolTable& symbols = formula()->getSymbolTable(); SequenceParser parser(symbols); - parseTree = parser.parse(tqchildren); + parseTree = parser.parse(children); // With the IndexElement dynamically changing its text/non-text // behaviour we need to reparse your parent, too. Hacky! @@ -1544,9 +1544,9 @@ bool SequenceElement::isFirstOfToken( BasicElement* child ) TQString SequenceElement::toLatex() { TQString content; - uint count = tqchildren.count(); + uint count = children.count(); for ( uint i = 0; i < count; i++ ) { - BasicElement* child = tqchildren.at( i ); + BasicElement* child = children.at( i ); // if ( isFirstOfToken( child ) ) { // content += ""; // } @@ -1559,9 +1559,9 @@ TQString SequenceElement::toLatex() TQString SequenceElement::formulaString() { TQString content; - uint count = tqchildren.count(); + uint count = children.count(); for ( uint i = 0; i < count; i++ ) { - BasicElement* child = tqchildren.at( i ); + BasicElement* child = children.at( i ); //if ( isFirstOfToken( child ) ) { // content += " "; //} @@ -1573,7 +1573,7 @@ TQString SequenceElement::formulaString() void SequenceElement::writeMathMLContent( TQDomDocument& doc, TQDomElement& element, bool oasisFormat ) const { - for ( TQPtrListIterator<BasicElement> it( tqchildren ); it.current(); ++it ) { + for ( TQPtrListIterator<BasicElement> it( children ); it.current(); ++it ) { it.current()->writeMathML( doc, element, oasisFormat ); } } @@ -1581,7 +1581,7 @@ void SequenceElement::writeMathMLContent( TQDomDocument& doc, TQDomElement& elem const BasicElement* SequenceElement::getChild( uint i ) const { - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); it += i; return it.current(); } @@ -1589,7 +1589,7 @@ const BasicElement* SequenceElement::getChild( uint i ) const int SequenceElement::childPos( const BasicElement* child ) const { - TQPtrListIterator<BasicElement> it( tqchildren ); + TQPtrListIterator<BasicElement> it( children ); uint count = it.count(); for ( uint i=0; i<count; ++i, ++it ) { if ( it.current() == child ) { @@ -1782,7 +1782,7 @@ BasicElement* NameSequence::createElement( TQString type ) // void NameSequence::parse() // { -// // A name sequence is known as name and so are its tqchildren. +// // A name sequence is known as name and so are its children. // // Caution: this is fake! // for ( int i = 0; i < countChildren(); i++ ) { // getChild( i )->setElementType( getElementType() ); @@ -1891,7 +1891,7 @@ int SequenceElement::readContentFromMathMLDom(TQDomNode& node) return -1; } - return buildChildrenFromMathMLDom(tqchildren, node); + return buildChildrenFromMathMLDom(children, node); } int SequenceElement::buildMathMLChild( TQDomNode node ) @@ -1915,7 +1915,7 @@ int SequenceElement::buildMathMLChild( TQDomNode node ) child->setStyle(style); } if (child->buildFromMathMLDom(e) != -1) { - tqchildren.append(child); + children.append(child); } else { delete child; diff --git a/lib/kformula/sequenceelement.h b/lib/kformula/sequenceelement.h index 4d32153c..f9fb2ce6 100644 --- a/lib/kformula/sequenceelement.h +++ b/lib/kformula/sequenceelement.h @@ -34,8 +34,8 @@ class SymbolTable; class ElementCreationStrategy; /** - * The element that contains a number of tqchildren. - * The tqchildren are aligned in one line. + * The element that contains a number of children. + * The children are aligned in one line. */ class SequenceElement : public BasicElement { SequenceElement& operator=( const SequenceElement& ) { return *this; } @@ -92,7 +92,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -100,7 +100,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -112,7 +112,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -202,10 +202,10 @@ public: virtual void goInsideLast(FormulaCursor* cursor); - // tqchildren + // children /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. The inserted elements will * be selected. * @@ -214,8 +214,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. */ virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction); @@ -244,18 +244,18 @@ public: virtual void childWillVanish(FormulaCursor* cursor, BasicElement* child); /** - * @returns the number of tqchildren we have. + * @returns the number of children we have. */ - uint countChildren() const { return tqchildren.count(); } + uint countChildren() const { return children.count(); } /** * @returns whether the child has the given number. */ bool isChildNumber( uint pos, BasicElement* child ) - { return tqchildren.at( pos ) == child; } + { return children.at( pos ) == child; } /** - * Selects all tqchildren. The cursor is put behind, the mark before them. + * Selects all children. The cursor is put behind, the mark before them. */ void selectAllChildren(FormulaCursor* cursor); @@ -288,12 +288,12 @@ public: virtual void parse(); /** - * Stores the given tqchildrens dom in the element. + * Stores the given childrens dom in the element. */ void getChildrenDom( TQDomDocument& doc, TQDomElement elem, uint from, uint to); /** - * Stores the given tqchildrens MathML dom in the element. + * Stores the given childrens MathML dom in the element. */ void getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& elem, uint from, uint to ); @@ -306,7 +306,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -315,10 +315,10 @@ public: /** * @returns the child at position i. */ - BasicElement* getChild(uint i) { return tqchildren.at(i); } + BasicElement* getChild(uint i) { return children.at(i); } const BasicElement* getChild(uint i) const; - int childPos( BasicElement* child ) { return tqchildren.find( child ); } + int childPos( BasicElement* child ) { return children.find( child ); } int childPos( const BasicElement* child ) const; class ChildIterator { @@ -407,7 +407,7 @@ protected: virtual bool readContentFromDom(TQDomNode& node); /** - * Sets the tqchildrens' positions after their size has been + * Sets the childrens' positions after their size has been * calculated. * * @see #calcSizes @@ -458,16 +458,16 @@ protected: private: /** - * Removes the tqchildren at pos and appends it to the list. + * Removes the children at pos and appends it to the list. */ void removeChild(TQPtrList<BasicElement>& removedChildren, int pos); /** - * Our tqchildren. Be sure to notify the rootElement before + * Our children. Be sure to notify the rootElement before * you remove any. */ - TQPtrList<BasicElement> tqchildren; + TQPtrList<BasicElement> children; /** * the syntax tree of the sequence @@ -603,7 +603,7 @@ protected: /** * @returns whether the child is the first element of its token. - * This can never happen here. Our tqchildren reuse our own + * This can never happen here. Our children reuse our own * element type. */ virtual bool isFirstOfToken( BasicElement* ) { return false; } diff --git a/lib/kformula/spaceelement.cc b/lib/kformula/spaceelement.cc index a7e23464..1fb4f553 100644 --- a/lib/kformula/spaceelement.cc +++ b/lib/kformula/spaceelement.cc @@ -288,13 +288,13 @@ void SpaceElement::writeMathMLAttributes( TQDomElement& element ) const { switch ( m_widthType ) { case AbsoluteSize: - element.setAttribute( "width", TQString( "%1pt" ).tqarg( m_width ) ); + element.setAttribute( "width", TQString( "%1pt" ).arg( m_width ) ); break; case RelativeSize: - element.setAttribute( "width", TQString( "%1%" ).tqarg( m_width * 100.0 ) ); + element.setAttribute( "width", TQString( "%1%" ).arg( m_width * 100.0 ) ); break; case PixelSize: - element.setAttribute( "width", TQString( "%1px" ).tqarg( m_width ) ); + element.setAttribute( "width", TQString( "%1px" ).arg( m_width ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( "width", "negativeveryverythinmathspace" ); @@ -343,26 +343,26 @@ void SpaceElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_heightType ) { case AbsoluteSize: - element.setAttribute( "height", TQString( "%1pt" ).tqarg( m_height ) ); + element.setAttribute( "height", TQString( "%1pt" ).arg( m_height ) ); break; case RelativeSize: - element.setAttribute( "height", TQString( "%1%" ).tqarg( m_height * 100.0 ) ); + element.setAttribute( "height", TQString( "%1%" ).arg( m_height * 100.0 ) ); break; case PixelSize: - element.setAttribute( "height", TQString( "%1px" ).tqarg( m_height ) ); + element.setAttribute( "height", TQString( "%1px" ).arg( m_height ) ); break; default: break; } switch ( m_depthType ) { case AbsoluteSize: - element.setAttribute( "depth", TQString( "%1pt" ).tqarg( m_depth ) ); + element.setAttribute( "depth", TQString( "%1pt" ).arg( m_depth ) ); break; case RelativeSize: - element.setAttribute( "depth", TQString( "%1%" ).tqarg( m_depth * 100.0 ) ); + element.setAttribute( "depth", TQString( "%1%" ).arg( m_depth * 100.0 ) ); break; case PixelSize: - element.setAttribute( "depth", TQString( "%1px" ).tqarg( m_depth ) ); + element.setAttribute( "depth", TQString( "%1px" ).arg( m_depth ) ); break; default: break; diff --git a/lib/kformula/spaceelement.h b/lib/kformula/spaceelement.h index a8c5ec9a..46397509 100644 --- a/lib/kformula/spaceelement.h +++ b/lib/kformula/spaceelement.h @@ -78,7 +78,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -86,7 +86,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -105,7 +105,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/styleelement.cc b/lib/kformula/styleelement.cc index 3bb6b6b1..de760453 100644 --- a/lib/kformula/styleelement.cc +++ b/lib/kformula/styleelement.cc @@ -135,13 +135,13 @@ void StyleElement::writeMathMLAttributes( TQDomElement& element ) const if ( m_relativeScriptLevel && m_scriptLevel >= 0 ) { prefix = "+"; } - element.setAttribute( "scriptlevel", prefix + TQString( "%1" ).tqarg( m_scriptLevel ) ); + element.setAttribute( "scriptlevel", prefix + TQString( "%1" ).arg( m_scriptLevel ) ); } if ( m_customDisplayStyle ) { element.setAttribute( "displaystyle", m_displayStyle ? "true" : "false" ); } if ( m_customScriptSizeMultiplier ) { - element.setAttribute( "scriptsizemultiplier", TQString( "%1" ).tqarg( m_scriptSizeMultiplier ) ); + element.setAttribute( "scriptsizemultiplier", TQString( "%1" ).arg( m_scriptSizeMultiplier ) ); } writeSizeAttribute( element, "scriptminsize", m_scriptMinSizeType, m_scriptMinSize ); if ( m_customBackground ) { @@ -373,13 +373,13 @@ void StyleElement::writeSizeAttribute( TQDomElement element, const TQString& str { switch ( st ) { case AbsoluteSize: - element.setAttribute( str, TQString( "%1pt" ).tqarg( s ) ); + element.setAttribute( str, TQString( "%1pt" ).arg( s ) ); break; case RelativeSize: - element.setAttribute( str, TQString( "%1%" ).tqarg( s * 100.0 ) ); + element.setAttribute( str, TQString( "%1%" ).arg( s * 100.0 ) ); break; case PixelSize: - element.setAttribute( str, TQString( "%1px" ).tqarg( s ) ); + element.setAttribute( str, TQString( "%1px" ).arg( s ) ); break; default: break; diff --git a/lib/kformula/symbolaction.cc b/lib/kformula/symbolaction.cc index aca4dc03..e26f3fef 100644 --- a/lib/kformula/symbolaction.cc +++ b/lib/kformula/symbolaction.cc @@ -91,7 +91,7 @@ void SymbolComboItem::paint( TQPainter *p ) p->setFont( m_font ); TQFontMetrics fm( p->fontMetrics() ); p->drawText( 3, fm.ascent() + fm.leading() / 2, - TQString( "%1" ).tqarg( TQChar( m_symbol ) ) ); + TQString( "%1" ).arg( TQChar( m_symbol ) ) ); p->setFont( KGlobalSettings::generalFont() ); fm = p->fontMetrics(); diff --git a/lib/kformula/symbolelement.cc b/lib/kformula/symbolelement.cc index a601cea4..31787b16 100644 --- a/lib/kformula/symbolelement.cc +++ b/lib/kformula/symbolelement.cc @@ -192,7 +192,7 @@ BasicElement* SymbolElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void SymbolElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -299,7 +299,7 @@ void SymbolElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -502,11 +502,11 @@ void SymbolElement::moveDown(FormulaCursor* cursor, BasicElement* from) } } -// tqchildren +// children // main child // -// If an element has tqchildren one has to become the main one. +// If an element has children one has to become the main one. // void SymbolElement::setMainChild(SequenceElement* child) // { @@ -518,7 +518,7 @@ void SymbolElement::moveDown(FormulaCursor* cursor, BasicElement* from) /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -557,8 +557,8 @@ void SymbolElement::insert(FormulaCursor* cursor, } /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will diff --git a/lib/kformula/symbolelement.h b/lib/kformula/symbolelement.h index 0133258e..ab9b5d89 100644 --- a/lib/kformula/symbolelement.h +++ b/lib/kformula/symbolelement.h @@ -65,7 +65,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -73,7 +73,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -85,7 +85,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -125,7 +125,7 @@ public: */ virtual void moveDown(FormulaCursor* cursor, BasicElement* from); - // tqchildren + // children /** * Removes the child. If this was the main child this element might @@ -139,14 +139,14 @@ public: // main child // - // If an element has tqchildren one has to become the main one. + // If an element has children one has to become the main one. virtual SequenceElement* getMainChild() { return content; } //virtual void setMainChild(SequenceElement*); /** - * Inserts all new tqchildren at the cursor position. Places the + * Inserts all new children at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -158,8 +158,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected tqchildren and returns them. Places the - * cursor to where the tqchildren have been. + * Removes all selected children and returns them. Places the + * cursor to where the children have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -221,7 +221,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc index 42c4a8e6..9b27871b 100644 --- a/lib/kformula/symboltable.cc +++ b/lib/kformula/symboltable.cc @@ -144,7 +144,7 @@ TQStringList SymbolTable::allNames() const TQString SymbolTable::get_name( struct UnicodeNameTable entry ) const { if ( !*entry.name ) { - return "U" + TQString( "%1" ).tqarg( entry.tqunicode, 4, 16 ).upper(); + return "U" + TQString( "%1" ).arg( entry.tqunicode, 4, 16 ).upper(); } return entry.name; } diff --git a/lib/kformula/textelement.cc b/lib/kformula/textelement.cc index c9826429..8789377c 100644 --- a/lib/kformula/textelement.cc +++ b/lib/kformula/textelement.cc @@ -106,7 +106,7 @@ bool TextElement::isInvisible() const /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ void TextElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -155,7 +155,7 @@ void TextElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/textelement.h b/lib/kformula/textelement.h index 99b6e63a..1a64ce80 100644 --- a/lib/kformula/textelement.h +++ b/lib/kformula/textelement.h @@ -73,7 +73,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -81,7 +81,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -93,7 +93,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement tqchildren. + * Dispatch this FontCommand to all our TextElement children. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -123,7 +123,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); @@ -244,7 +244,7 @@ public: /** * Calculates our width and height and - * our tqchildren's parentPosition. + * our children's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -252,7 +252,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its tqchildren. + * Draws the whole element including its children. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -266,7 +266,7 @@ public: /** * @returns the latex representation of the element and - * of the element's tqchildren + * of the element's children */ virtual TQString toLatex(); diff --git a/lib/kformula/tokenelement.cc b/lib/kformula/tokenelement.cc index 272af51f..eda9c0dc 100644 --- a/lib/kformula/tokenelement.cc +++ b/lib/kformula/tokenelement.cc @@ -97,7 +97,7 @@ int TokenElement::buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDo n = n.nextSibling(); } // parse(); - kdWarning() << "Num of tqchildren " << list.count() << endl; + kdWarning() << "Num of children " << list.count() << endl; return 1; } diff --git a/lib/kformula/tokenstyleelement.cc b/lib/kformula/tokenstyleelement.cc index c8e4799f..fcce16e7 100644 --- a/lib/kformula/tokenstyleelement.cc +++ b/lib/kformula/tokenstyleelement.cc @@ -344,13 +344,13 @@ void TokenStyleElement::writeMathMLAttributes( TQDomElement& element ) const // mathsize attribute switch ( m_mathSizeType ) { case AbsoluteSize: - element.setAttribute( "mathsize", TQString( "%1pt" ).tqarg( m_mathSize ) ); + element.setAttribute( "mathsize", TQString( "%1pt" ).arg( m_mathSize ) ); break; case RelativeSize: - element.setAttribute( "mathsize", TQString( "%1%" ).tqarg( m_mathSize * 100.0 ) ); + element.setAttribute( "mathsize", TQString( "%1%" ).arg( m_mathSize * 100.0 ) ); break; case PixelSize: - element.setAttribute( "mathsize", TQString( "%1px" ).tqarg( m_mathSize ) ); + element.setAttribute( "mathsize", TQString( "%1px" ).arg( m_mathSize ) ); break; default: break; @@ -370,13 +370,13 @@ void TokenStyleElement::writeMathMLAttributes( TQDomElement& element ) const // fontsize attribute switch ( m_fontSizeType ) { case AbsoluteSize: - element.setAttribute( "fontsize", TQString( "%1pt" ).tqarg( m_fontSize ) ); + element.setAttribute( "fontsize", TQString( "%1pt" ).arg( m_fontSize ) ); break; case RelativeSize: - element.setAttribute( "fontsize", TQString( "%1%" ).tqarg( m_fontSize * 100.0 ) ); + element.setAttribute( "fontsize", TQString( "%1%" ).arg( m_fontSize * 100.0 ) ); break; case PixelSize: - element.setAttribute( "fontsize", TQString( "%3px" ).tqarg( m_fontSize ) ); + element.setAttribute( "fontsize", TQString( "%3px" ).arg( m_fontSize ) ); break; default: break; diff --git a/lib/kofficecore/KoApplication.cpp b/lib/kofficecore/KoApplication.cpp index d127f444..a4cfcc14 100644 --- a/lib/kofficecore/KoApplication.cpp +++ b/lib/kofficecore/KoApplication.cpp @@ -180,10 +180,10 @@ bool KoApplication::start() paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName ); } if ( paths.isEmpty()) { - KMessageBox::error(0L, i18n("No template found for: %1 ").tqarg(desktopName) ); + KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) ); delete shell; } else if ( paths.count() > 1 ) { - KMessageBox::error(0L, i18n("Too many templates found for: %1").tqarg(desktopName) ); + KMessageBox::error(0L, i18n("Too many templates found for: %1").arg(desktopName) ); delete shell; } } @@ -203,7 +203,7 @@ bool KoApplication::start() kdDebug(30003) << "Template loaded..." << endl; n++; } else { - KMessageBox::error(0L, i18n("Template %1 failed to load.").tqarg(templateURL.prettyURL()) ); + KMessageBox::error(0L, i18n("Template %1 failed to load.").arg(templateURL.prettyURL()) ); delete shell; } } diff --git a/lib/kofficecore/KoApplicationIface.cc b/lib/kofficecore/KoApplicationIface.cc index 042a39a8..3348e873 100644 --- a/lib/kofficecore/KoApplicationIface.cc +++ b/lib/kofficecore/KoApplicationIface.cc @@ -45,7 +45,7 @@ DCOPRef KoApplicationIface::createDocument( const TQString &nativeFormat ) KoDocumentEntry entry = KoDocumentEntry::queryByMimeType( nativeFormat ); if ( entry.isEmpty() ) { - KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).tqarg( nativeFormat ) ); + KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).arg( nativeFormat ) ); return DCOPRef(); } KoDocument* doc = entry.createDoc( 0 ); diff --git a/lib/kofficecore/KoChild.cpp b/lib/kofficecore/KoChild.cpp index e7752347..c78ee70f 100644 --- a/lib/kofficecore/KoChild.cpp +++ b/lib/kofficecore/KoChild.cpp @@ -34,7 +34,7 @@ public: { } - TQRect m_tqgeometry; + TQRect m_geometry; double m_rotation; double m_shearX; @@ -74,14 +74,14 @@ void KoChild::setGeometry( const TQRect &rect, bool noEmit ) if ( !d->m_lock ) d->m_old = framePointArray(); - d->m_tqgeometry = rect; + d->m_geometry = rect; // Embedded objects should have a minimum size of 3, so they can be selected - if( d->m_tqgeometry.width() < 3 ) - d->m_tqgeometry.setWidth( 3 ); + if( d->m_geometry.width() < 3 ) + d->m_geometry.setWidth( 3 ); - if( d->m_tqgeometry.height() < 3 ) - d->m_tqgeometry.setHeight( 3 ); + if( d->m_geometry.height() < 3 ) + d->m_geometry.setHeight( 3 ); updateMatrix(); @@ -89,9 +89,9 @@ void KoChild::setGeometry( const TQRect &rect, bool noEmit ) emit changed( this ); } -TQRect KoChild::tqgeometry() const +TQRect KoChild::geometry() const { - return d->m_tqgeometry; + return d->m_geometry; } TQRegion KoChild::region( const TQWMatrix &matrix ) const @@ -101,7 +101,7 @@ TQRegion KoChild::region( const TQWMatrix &matrix ) const TQPointArray KoChild::pointArray( const TQWMatrix &matrix ) const { - return pointArray( TQRect( 0, 0, d->m_tqgeometry.width(), d->m_tqgeometry.height() ), matrix ); + return pointArray( TQRect( 0, 0, d->m_geometry.width(), d->m_geometry.height() ), matrix ); } //bool KoChild::contains( const TQPoint &point ) const @@ -232,13 +232,13 @@ void KoChild::setContentsPos( int x, int y ) TQRect KoChild::contentRect() const { - return TQRect( d->m_contentsX, d->m_contentsY, int(d->m_tqgeometry.width() / d->m_scaleX), - int(d->m_tqgeometry.height() / d->m_scaleY) ); + return TQRect( d->m_contentsX, d->m_contentsY, int(d->m_geometry.width() / d->m_scaleX), + int(d->m_geometry.height() / d->m_scaleY) ); } TQPointArray KoChild::framePointArray( const TQWMatrix &matrix ) const { - return pointArray( TQRect( -6, -6, d->m_tqgeometry.width() + 12, d->m_tqgeometry.height() + 12 ), matrix ); + return pointArray( TQRect( -6, -6, d->m_geometry.width() + 12, d->m_geometry.height() + 12 ), matrix ); } TQRegion KoChild::frameRegion( const TQWMatrix &matrix, bool solid ) const @@ -281,7 +281,7 @@ void KoChild::updateMatrix() TQWMatrix m; m.rotate( d->m_rotation ); - m.translate( -d->m_rotationPoint.x() + d->m_tqgeometry.x(), -d->m_rotationPoint.y() + d->m_tqgeometry.y() ); + m.translate( -d->m_rotationPoint.x() + d->m_geometry.x(), -d->m_rotationPoint.y() + d->m_geometry.y() ); m.translate( p.x(), p.y() ); m.shear( d->m_shearX, d->m_shearY ); @@ -343,21 +343,21 @@ KoChild::Gadget KoChild::gadgetHitTest( const TQPoint &p ) if ( TQRegion( pointArray( TQRect( -5, -5, 5, 5 ) ) ).contains( p ) ) return TopLeft; - if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_geometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) ) return TopMid; - if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), -5, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), -5, 5, 5 ) ) ).contains( p ) ) return TopRight; - if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( -5, d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) return MidLeft; - if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( -5, d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomLeft; - if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, - d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_geometry.width() / 2 - 3, + d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomMid; - if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomRight; - if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), - d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), + d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) return MidRight; return Move; diff --git a/lib/kofficecore/KoChild.h b/lib/kofficecore/KoChild.h index b7285deb..fe345e2e 100644 --- a/lib/kofficecore/KoChild.h +++ b/lib/kofficecore/KoChild.h @@ -24,7 +24,7 @@ #include <koffice_export.h> /** - * KoChild is an abstract base class that represents the tqgeometry + * KoChild is an abstract base class that represents the geometry * associated with an embedded document. In general it handles its position * relative to the embedded document's parent. * @@ -60,7 +60,7 @@ public: virtual ~KoChild(); /** - * Sets a new tqgeometry for this child document. + * Sets a new geometry for this child document. * Use noEmit = true if you do not want the 'changed'-signal to be emitted */ void setGeometry( const TQRect &rect, bool noEmit = false ); @@ -74,7 +74,7 @@ public: * * @see #setGeometry */ - TQRect tqgeometry() const; + TQRect geometry() const; /** * @return the region of this child part relative to the @@ -189,10 +189,10 @@ public: /** * @return the contents rectangle that is visible. - * This value depends on the scaling and the tqgeometry. + * This value depends on the scaling and the geometry. * This is the value that is passed to KoDocument::paintContent. * - * @see #xScaling #tqgeometry + * @see #xScaling #geometry */ virtual TQRect contentRect() const; @@ -204,7 +204,7 @@ public: virtual TQRegion frameRegion( const TQWMatrix& matrix = TQWMatrix(), bool solid = false ) const; /** - * @return the frame tqgeometry including a border (6 pixels) as a point + * @return the frame geometry including a border (6 pixels) as a point * array with 4 points, one for each corner, transformed by given matrix. */ virtual TQPointArray framePointArray( const TQWMatrix &matrix = TQWMatrix() ) const; @@ -234,11 +234,11 @@ public: void unlock(); /** - * If the child is locked, tqgeometry changes + * If the child is locked, geometry changes * (including scaling, rotation, ...) are not backed up. * * As long as this child is locked, the backed up - * tqgeometry state can be recovered with oldPointArray. + * geometry state can be recovered with oldPointArray. * * @return true when this child is locked. * @@ -247,7 +247,7 @@ public: bool locked() const; /** - * @return the backed up tqgeometry transformed by given matrix. + * @return the backed up geometry transformed by given matrix. */ virtual TQPointArray oldPointArray( const TQWMatrix &matrix ); diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp index bd4bb489..ae4dbeab 100644 --- a/lib/kofficecore/KoContainerHandler.cpp +++ b/lib/kofficecore/KoContainerHandler.cpp @@ -47,7 +47,7 @@ public: KoChild::Gadget gadget, const TQPoint& point ) : m_gadget(gadget), m_view(view), m_child(child), m_parentMatrix(matrix) { - m_geometryStart = child->tqgeometry(); + m_geometryStart = child->geometry(); m_matrix = child->matrix() * matrix; m_invertParentMatrix = matrix.invert(); @@ -84,11 +84,11 @@ KoPartResizeHandler::~KoPartResizeHandler() d=0L; } -void KoPartResizeHandler::tqrepaint(TQRegion &rgn) +void KoPartResizeHandler::repaint(TQRegion &rgn) { rgn = rgn.unite( d->m_child->frameRegion( d->m_parentMatrix, true ) ); // rgn.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset()); - ((TQWidget*)target())->tqrepaint( rgn ); + ((TQWidget*)target())->repaint( rgn ); } bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) @@ -128,7 +128,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y() + y, d->m_geometryStart.width() - x, d->m_geometryStart.height() - y ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::TopMid: @@ -137,7 +137,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y, d->m_geometryStart.width(), d->m_geometryStart.height() - y ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::TopRight: @@ -147,7 +147,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y, d->m_geometryStart.width() + x, d->m_geometryStart.height() - y ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::MidLeft: @@ -156,7 +156,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(), d->m_geometryStart.width() - x, d->m_geometryStart.height() ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::MidRight: @@ -165,7 +165,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width() + x, d->m_geometryStart.height() ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::BottomLeft: @@ -175,7 +175,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(), d->m_geometryStart.width() - x, d->m_geometryStart.height() + y ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::BottomMid: @@ -184,7 +184,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width(), d->m_geometryStart.height() + y ) ); - tqrepaint(rgn); + repaint(rgn); } break; case KoChild::BottomRight: @@ -194,7 +194,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width() + x, d->m_geometryStart.height() + y ) ); - tqrepaint(rgn); + repaint(rgn); } break; default: @@ -214,7 +214,7 @@ public: m_parentMatrix(matrix) { m_invertParentMatrix = matrix.invert(); m_mouseDragStart = m_invertParentMatrix.map( point ); - m_geometryDragStart = m_dragChild->tqgeometry(); + m_geometryDragStart = m_dragChild->geometry(); m_rotationDragStart = m_dragChild->rotationPoint(); } ~KoPartMoveHandlerPrivate() {} @@ -263,7 +263,7 @@ bool KoPartMoveHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_rotationDragStart.y() + pos.y() - d->m_mouseDragStart.y() ) ); bound = bound.unite( d->m_dragChild->frameRegion( d->m_parentMatrix, false ) ); // bound.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset()); - ((TQWidget*)target())->tqrepaint( bound ); + ((TQWidget*)target())->repaint( bound ); return true; } diff --git a/lib/kofficecore/KoContainerHandler.h b/lib/kofficecore/KoContainerHandler.h index 0ea9ba35..0187128d 100644 --- a/lib/kofficecore/KoContainerHandler.h +++ b/lib/kofficecore/KoContainerHandler.h @@ -68,7 +68,7 @@ public: ~KoPartResizeHandler(); protected: - void tqrepaint(TQRegion &rgn); + void repaint(TQRegion &rgn); bool eventFilter( TQObject*, TQEvent* ); private: diff --git a/lib/kofficecore/KoDetailsPane.cpp b/lib/kofficecore/KoDetailsPane.cpp index ecbd496f..66828e99 100644 --- a/lib/kofficecore/KoDetailsPane.cpp +++ b/lib/kofficecore/KoDetailsPane.cpp @@ -296,7 +296,7 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(TQWidget* parent, KInstance* instan fileList.setAutoDelete(false); do { - TQString key = TQString("File%1").tqarg(i); + TQString key = TQString("File%1").arg(i); value = instance->config()->readPathEntry(key); if(!value.isEmpty()) { @@ -369,9 +369,9 @@ void KoRecentDocumentsPane::selectionChanged(TQListViewItem* item) KFileItem* fileItem = static_cast<KoFileListItem*>(item)->fileItem(); TQString details = "<center><table border=\"0\">"; details += i18n("File modification date and time. %1 is date time", "<tr><td><b>Modified:</b></td><td>%1</td></tr>") - .tqarg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME)); + .arg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME)); details += i18n("File access date and time. %1 is date time", "<tr><td><b>Accessed:</b></td><td>%1</td></tr>") - .tqarg(fileItem->timeString(KIO::UDS_ACCESS_TIME)); + .arg(fileItem->timeString(KIO::UDS_ACCESS_TIME)); details += "</table></center>"; m_detailsLabel->setText(details); } else { diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index ddfce183..fd790991 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -120,7 +120,7 @@ public: } TQPtrList<KoView> m_views; - TQPtrList<KoDocumentChild> m_tqchildren; + TQPtrList<KoDocumentChild> m_children; TQPtrList<KoMainWindow> m_shells; TQValueList<TQDomDocument> m_viewBuildDocuments; @@ -271,7 +271,7 @@ KoDocument::~KoDocument() { d->m_autoSaveTimer.stop(); - TQPtrListIterator<KoDocumentChild> childIt( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> childIt( d->m_children ); for (; childIt.current(); ++childIt ) disconnect( childIt.current(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChildDestroyed() ) ); @@ -285,8 +285,8 @@ KoDocument::~KoDocument() delete d->m_startUpWidget; d->m_startUpWidget = 0; - d->m_tqchildren.setAutoDelete( true ); - d->m_tqchildren.clear(); + d->m_children.setAutoDelete( true ); + d->m_children.clear(); d->m_shells.setAutoDelete( true ); d->m_shells.clear(); @@ -591,7 +591,7 @@ void KoDocument::setManager( KParts::PartManager *manager ) if ( manager ) { - TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> it( d->m_children ); for (; it.current(); ++it ) if ( it.current()->document() ) manager->addPart( it.current()->document(), false ); @@ -606,7 +606,7 @@ void KoDocument::setReadWrite( bool readwrite ) for (; vIt.current(); ++vIt ) vIt.current()->updateReadWrite( readwrite ); - TQPtrListIterator<KoDocumentChild> dIt( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> dIt( d->m_children ); for (; dIt.current(); ++dIt ) if ( dIt.current()->document() ) dIt.current()->document()->setReadWrite( readwrite ); @@ -651,7 +651,7 @@ void KoDocument::insertChild( KoDocumentChild *child ) { setModified( true ); - d->m_tqchildren.append( child ); + d->m_children.append( child ); connect( child, TQT_SIGNAL( changed( KoChild * ) ), this, TQT_SLOT( slotChildChanged( KoChild * ) ) ); @@ -681,12 +681,12 @@ void KoDocument::slotChildDestroyed() setModified( true ); const KoDocumentChild *child = static_cast<const KoDocumentChild *>( sender() ); - d->m_tqchildren.removeRef( child ); + d->m_children.removeRef( child ); } -const TQPtrList<KoDocumentChild>& KoDocument::tqchildren() const +const TQPtrList<KoDocumentChild>& KoDocument::children() const { - return d->m_tqchildren; + return d->m_children; } KParts::Part *KoDocument::hitTest( TQWidget *widget, const TQPoint &globalPos ) @@ -718,7 +718,7 @@ KoView* KoDocument::hitTestView() KoDocument* KoDocument::hitTest( const TQPoint &pos, const TQWMatrix &matrix ) { // Call KoDocumentChild::hitTest for any child document - TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> it( d->m_children ); for (; it.current(); ++it ) { KoDocument *doc = it.current()->hitTest( pos, matrix ); @@ -732,7 +732,7 @@ KoDocument* KoDocument::hitTest( const TQPoint &pos, const TQWMatrix &matrix ) KoDocumentChild *KoDocument::child( KoDocument *doc ) { - TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> it( d->m_children ); for (; it.current(); ++it ) if ( it.current()->document() == doc ) return it.current(); @@ -786,7 +786,7 @@ void KoDocument::paintEverything( TQPainter &painter, const TQRect &rect, bool t void KoDocument::paintChildren( TQPainter &painter, const TQRect &/*rect*/, KoView *view, double zoomX, double zoomY ) { - TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); + TQPtrListIterator<KoDocumentChild> it( d->m_children ); for (; it.current(); ++it ) { // #### todo: paint only if child is visible inside rect @@ -863,8 +863,8 @@ bool KoDocument::isModified() const //kdDebug(30003)<<k_funcinfo<<" Modified doc='"<<url().url()<<"' extern="<<isStoredExtern()<<endl; return true; } - // Then go through internally stored tqchildren (considered to be part of this doc) - TQPtrListIterator<KoDocumentChild> it = tqchildren(); + // Then go through internally stored children (considered to be part of this doc) + TQPtrListIterator<KoDocumentChild> it = children(); for (; it.current(); ++it ) { KoDocument *doc = it.current()->document(); @@ -876,9 +876,9 @@ bool KoDocument::isModified() const bool KoDocument::saveChildren( KoStore* _store ) { - //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; int i = 0; - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> it( children() ); for( ; it.current(); ++it ) { KoDocument* childDoc = it.current()->document(); if (childDoc && !it.current()->isDeleted()) @@ -900,8 +900,8 @@ bool KoDocument::saveChildren( KoStore* _store ) bool KoDocument::saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter ) { - //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; + TQPtrListIterator<KoDocumentChild> it( children() ); for( ; it.current(); ++it ) { KoDocument* childDoc = it.current()->document(); if ( childDoc && !it.current()->isDeleted() ) @@ -924,9 +924,9 @@ bool KoDocument::saveExternalChildren() return true; } - //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; KoDocumentChild *ch; - TQPtrListIterator<KoDocumentChild> it = tqchildren(); + TQPtrListIterator<KoDocumentChild> it = children(); for (; (ch = it.current()); ++it ) { if ( !ch->isDeleted() ) @@ -935,7 +935,7 @@ bool KoDocument::saveExternalChildren() if ( doc && doc->isStoredExtern() && doc->isModified() ) { kdDebug(30003)<<" save external doc='"<<url().url()<<"'"<<endl; - doc->setDoNotSaveExtDoc(); // Only save doc + it's internal tqchildren + doc->setDoNotSaveExtDoc(); // Only save doc + it's internal children if ( !doc->save() ) return false; // error } @@ -1031,7 +1031,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "meta.xml" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "meta.xml" ); delete store; return false; } @@ -1039,7 +1039,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) if ( store->open( "Thumbnails/thumbnail.png" ) ) { if ( !saveOasisPreview( store, manifestWriter ) || !store->close() ) { - d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" ); + d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" ); delete store; return false; } @@ -1047,7 +1047,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" ); delete store; return false; } @@ -1055,7 +1055,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) // Write out manifest file if ( !oasisStore.closeManifestWriter() ) { - d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "META-INF/manifest.xml" ); + d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "META-INF/manifest.xml" ); delete store; return false; } @@ -1064,7 +1064,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - // Save internal tqchildren first since they might get a new url + // Save internal children first since they might get a new url if ( !saveChildren( store ) && !oasis ) { if ( d->lastErrorMessage.isEmpty() ) @@ -1086,7 +1086,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "maindoc.xml" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "maindoc.xml" ); delete store; return false; } @@ -1146,7 +1146,7 @@ bool KoDocument::saveToStore( KoStore* _store, const TQString & _path ) else // ugly hack to pass a relative URI m_url = KURL( INTERNAL_PREFIX + _path ); - // To make the tqchildren happy cd to the correct directory + // To make the children happy cd to the correct directory _store->pushDirectory(); _store->enterDirectory( _path ); @@ -1297,7 +1297,7 @@ bool KoDocument::checkAutoSaveFile() TQString dateStr = date.toString(Qt::LocalDate); int res = KMessageBox::warningYesNoCancel( 0, i18n( "An autosaved file for an unnamed document exists in %1.\nThis file is dated %2\nDo you want to open it?" ) - .tqarg(asf, dateStr) ); + .arg(asf, dateStr) ); switch(res) { case KMessageBox::Yes : { KURL url; @@ -1349,7 +1349,7 @@ bool KoDocument::openURL( const KURL & _url ) // Reimplemented, to add a check for autosave files and to improve error reporting if ( !_url.isValid() ) { - d->lastErrorMessage = i18n( "Malformed URL\n%1" ).tqarg( _url.url() ); // ## used anywhere ? + d->lastErrorMessage = i18n( "Malformed URL\n%1" ).arg( _url.url() ); // ## used anywhere ? return false; } if ( !closeURL() ) @@ -1408,7 +1408,7 @@ bool KoDocument::openFile() TQApplication::restoreOverrideCursor(); if ( d->m_autoErrorHandlingEnabled ) // Maybe offer to create a new document with that name ? - KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(m_file) ); + KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(m_file) ); d->m_bLoading = false; return false; } @@ -1516,7 +1516,7 @@ bool KoDocument::openFile() { TQString errorMsg( i18n( "Could not open\n%2.\nReason: %1" ) ); TQString docUrl = url().prettyURL( 0, KURL::StripFileProtocol ); - KMessageBox::error( 0L, errorMsg.tqarg(msg).tqarg(docUrl) ); + KMessageBox::error( 0L, errorMsg.arg(msg).arg(docUrl) ); } d->m_bLoading = false; @@ -1623,7 +1623,7 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDom if (!store->open(filename)) { kdWarning(30003) << "Entry " << filename << " not found!" << endl; - d->lastErrorMessage = i18n( "Could not find %1" ).tqarg( filename ); + d->lastErrorMessage = i18n( "Could not find %1" ).arg( filename ); return false; } // Error variables for TQDomDocument::setContent @@ -1636,8 +1636,8 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDom << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; d->lastErrorMessage = i18n( "Parsing error in %1 at line %2, column %3\nError message: %4" ) - .tqarg( filename ).tqarg( errorLine ).tqarg( errorColumn ) - .tqarg( i18n ( "TQXml", errorMsg.utf8() ) ); + .arg( filename ).arg( errorLine ).arg( errorColumn ) + .arg( i18n ( "TQXml", errorMsg.utf8() ) ); store->close(); return false; } @@ -1650,12 +1650,12 @@ bool KoDocument::loadNativeFormat( const TQString & file ) TQFileInfo fileInfo( file ); if ( !fileInfo.exists() ) // check duplicated from openURL, but this is useful for templates { - d->lastErrorMessage = i18n("The file %1 does not exist.").tqarg(file); + d->lastErrorMessage = i18n("The file %1 does not exist.").arg(file); return false; } if ( !fileInfo.isFile() ) { - d->lastErrorMessage = i18n( "%1 is not a file." ).tqarg(file); + d->lastErrorMessage = i18n( "%1 is not a file." ).arg(file); return false; } @@ -1733,7 +1733,7 @@ bool KoDocument::loadNativeFormat( const TQString & file ) << " Line: " << errorLine << " Column: " << errorColumn << endl << " Message: " << errorMsg << endl; d->lastErrorMessage = i18n( "parsing error in the main document at line %1, column %2\nError message: %3" ) - .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( errorMsg.utf8() ) ); + .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) ); res=false; } @@ -1756,7 +1756,7 @@ bool KoDocument::loadNativeFormatFromStore( const TQString& file ) if ( store->bad() ) { - d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).tqarg( file ); + d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).arg( file ); delete store; TQApplication::restoreOverrideCursor(); return false; @@ -1795,7 +1795,7 @@ bool KoDocument::loadNativeFormatFromStore( const TQString& file ) if ( !loadChildren( store ) ) { - kdError(30003) << "ERROR: Could not load tqchildren" << endl; + kdError(30003) << "ERROR: Could not load children" << endl; // Don't abort, proceed nonetheless } @@ -1865,7 +1865,7 @@ bool KoDocument::loadFromStore( KoStore* _store, const TQString& url ) if ( !loadChildren( _store ) ) { - kdError(30003) << "ERROR: Could not load tqchildren" << endl; + kdError(30003) << "ERROR: Could not load children" << endl; #if 0 return false; #endif @@ -1967,7 +1967,7 @@ void KoDocument::setModified( bool mod ) m_bEmpty = FALSE; } else { // When saving this document, all non-external child documents get saved too. - TQPtrListIterator<KoDocumentChild> it = tqchildren(); + TQPtrListIterator<KoDocumentChild> it = children(); for (; it.current(); ++it ) { KoDocument *doc = it.current()->document(); @@ -2002,7 +2002,7 @@ int KoDocument::queryCloseDia() name = i18n( "Untitled" ); int res = KMessageBox::warningYesNoCancel( 0L, - i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name)); + i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name)); switch(res) { @@ -2023,9 +2023,9 @@ int KoDocument::queryCloseDia() int KoDocument::queryCloseExternalChildren() { - //kdDebug(30003)<<k_funcinfo<<" checking for tqchildren in: "<<url().url()<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking for children in: "<<url().url()<<endl; setDoNotSaveExtDoc(false); - TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + TQPtrListIterator<KoDocumentChild> it( children() ); for (; it.current(); ++it ) { if ( !it.current()->isDeleted() ) @@ -2133,12 +2133,12 @@ TQDomDocument KoDocument::createDomDocument( const TQString& tagName, const TQSt TQDomDocument KoDocument::createDomDocument( const TQString& appName, const TQString& tagName, const TQString& version ) { TQDomImplementation impl; - TQString url = TQString("http://www.koffice.org/DTD/%1-%1.dtd").tqarg(appName).tqarg(version); + TQString url = TQString("http://www.koffice.org/DTD/%1-%1.dtd").arg(appName).arg(version); TQDomDocumentType dtype = impl.createDocumentType( tagName, - TQString("-//KDE//DTD %1 %1//EN").tqarg(appName).tqarg(version), + TQString("-//KDE//DTD %1 %1//EN").arg(appName).arg(version), url ); // The namespace URN doesn't need to include the version number. - TQString namespaceURN = TQString("http://www.koffice.org/DTD/%1").tqarg(appName); + TQString namespaceURN = TQString("http://www.koffice.org/DTD/%1").arg(appName); TQDomDocument doc = impl.createDocument( namespaceURN, tagName, dtype ); doc.insertBefore( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ), doc.documentElement() ); return doc; @@ -2233,7 +2233,7 @@ KService::Ptr KoDocument::readNativeService( KInstance *instance ) // Try by path first, so that we find the global one (which has the native mimetype) // even if the user created a kword.desktop in ~/.kde/share/applnk or any subdir of it. // If he created it under ~/.kde/share/applnk/Office/ then no problem anyway. - service = KService::serviceByDesktopPath( TQString::fromLatin1("Office/%1.desktop").tqarg(instname) ); + service = KService::serviceByDesktopPath( TQString::fromLatin1("Office/%1.desktop").arg(instname) ); } if ( !service ) service = KService::serviceByDesktopName( instname ); @@ -2364,11 +2364,11 @@ void KoDocument::showSavingErrorDialog() { if ( d->lastErrorMessage.isEmpty() ) { - KMessageBox::error( 0L, i18n( "Could not save\n%1" ).tqarg( m_file ) ); + KMessageBox::error( 0L, i18n( "Could not save\n%1" ).arg( m_file ) ); } else if ( d->lastErrorMessage != "USER_CANCELED" ) { - KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).tqarg( m_file, d->lastErrorMessage ) ); + KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).arg( m_file, d->lastErrorMessage ) ); } } @@ -2376,11 +2376,11 @@ void KoDocument::showLoadingErrorDialog() { if ( d->lastErrorMessage.isEmpty() ) { - KMessageBox::error( 0L, i18n( "Could not open\n%1" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ) ) ); + KMessageBox::error( 0L, i18n( "Could not open\n%1" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ) ) ); } else if ( d->lastErrorMessage != "USER_CANCELED" ) { - KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) ); + KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) ); } } diff --git a/lib/kofficecore/KoDocument.h b/lib/kofficecore/KoDocument.h index ac6de7e8..df1518de 100644 --- a/lib/kofficecore/KoDocument.h +++ b/lib/kofficecore/KoDocument.h @@ -385,7 +385,7 @@ public: * @param painter The painter object onto which will be drawn. * @param rect The rect that should be used in the painter object. * @param transparent If true then the entire rectangle is erased before painting. - * @param view The KoView is needed to fiddle about with the active widget, when painting tqchildren. + * @param view The KoView is needed to fiddle about with the active widget, when painting children. * @param zoomX The zoom value to be applied to X coordinates when painting. * @param zoomY The zoom value to be applied to Y coordinates when painting. */ @@ -399,7 +399,7 @@ public: virtual TQPixmap generatePreview( const TQSize& size ); /** - * Paints all of the documents tqchildren into the given painter object. + * Paints all of the documents children into the given painter object. * * @param painter The painter object onto which will be drawn. * @param rect The rect that should be used in the painter object. @@ -427,7 +427,7 @@ public: /** * Paints the data itself. Normally called by paintEverything(). It does not - * paint the tqchildren. + * paint the children. * It's this method that %KOffice Parts have to implement. * * @param painter The painter object onto which will be drawn. @@ -659,17 +659,17 @@ public: static int defaultAutoSave() { return s_defaultAutoSave; } /** - * @return the list of all tqchildren. Do not modify the + * @return the list of all children. Do not modify the * returned list. */ - const TQPtrList<KoDocumentChild>& tqchildren() const; + const TQPtrList<KoDocumentChild>& children() const; /** * @return the KoDocumentChild associated with the given Document, but only if * @p doc is a direct child of this document. * * This is a convenience function. You could get the same result - * by traversing the list returned by tqchildren(). + * by traversing the list returned by children(). */ KoDocumentChild *child( KoDocument *doc ); @@ -771,14 +771,14 @@ public: int queryCloseDia(); /** - * @brief Set when we do not want to save external tqchildren when saving our 'main' doc. + * @brief Set when we do not want to save external children when saving our 'main' doc. * - * This makes it possible to save 'main' doc + all its internal tqchildren first, then - * go on to save external tqchildren. Typically used by query close. + * This makes it possible to save 'main' doc + all its internal children first, then + * go on to save external children. Typically used by query close. * Use: * @code * doc->setDoNotSaveExtDoc(); - * doc->save(); // saves doc and its internal tqchildren, + * doc->save(); // saves doc and its internal children, * //also calls saveExternalChildren() which sets setDoNotSaveExtDoc(false) * doc->saveExternalChildren(); * @endcode @@ -1029,7 +1029,7 @@ protected: * * An example implementation may look like this: * @code - * TQPtrListIterator<KoDocumentChild> it( tqchildren() ); + * TQPtrListIterator<KoDocumentChild> it( children() ); * for( ; it.current(); ++it ) * { * if ( !it.current()->loadDocument( _store ) ) @@ -1043,16 +1043,16 @@ protected: virtual bool loadChildren( KoStore* ); /** - * Saves all internal tqchildren (only!). - * @see saveExternalChildren if you have external tqchildren. + * Saves all internal children (only!). + * @see saveExternalChildren if you have external children. * Returns true on success. */ virtual bool saveChildren( KoStore* store ); /** - * Saves all internal tqchildren (only!), to the store, using the OASIS format. + * Saves all internal children (only!), to the store, using the OASIS format. * This is called automatically during saveNativeFormat. - * @see saveExternalChildren if you have external tqchildren. + * @see saveExternalChildren if you have external children. * Returns true on success. */ virtual bool saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter ); @@ -1077,7 +1077,7 @@ protected: virtual bool completeSaving( KoStore* store ); /** - * Inserts the new child in the list of tqchildren and emits the + * Inserts the new child in the list of children and emits the * childChanged() signal. * * At the same time this method marks this document as modified. @@ -1098,9 +1098,9 @@ protected: KoPageLayout m_pageLayout; /** - * Saves all externally stored tqchildren. + * Saves all externally stored children. * Returns true on success. - * @see #saveChildren for internal tqchildren + * @see #saveChildren for internal children */ virtual bool saveExternalChildren(); diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp index 0767ab04..8c6fe16f 100644 --- a/lib/kofficecore/KoDocumentChild.cpp +++ b/lib/kofficecore/KoDocumentChild.cpp @@ -67,13 +67,13 @@ public: bool m_deleted; }; -KoDocumentChild::KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& tqgeometry ) +KoDocumentChild::KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& geometry ) : KoChild( parent ) { d = new KoDocumentChildPrivate; d->m_parent = parent; d->m_doc = doc; - setGeometry( tqgeometry ); + setGeometry( geometry ); d->m_deleted = false; if ( doc ) doc->setStoreInternal( !doc->hasExternURL() ); @@ -88,11 +88,11 @@ KoDocumentChild::KoDocumentChild( KoDocument* parent ) d->m_deleted = false; } -void KoDocumentChild::setDocument( KoDocument *doc, const TQRect &tqgeometry ) +void KoDocumentChild::setDocument( KoDocument *doc, const TQRect &geometry ) { kdDebug()<<k_funcinfo<<"doc: "<<doc->url().url()<<endl; d->m_doc = doc; - setGeometry( tqgeometry ); + setGeometry( geometry ); updateMatrix(); } @@ -213,7 +213,7 @@ bool KoDocumentChild::loadDocument( KoStore* store ) KMimeType::Ptr mime = KMimeType::mimeType( m_tmpMimeType ); if ( mime->name() != KMimeType::defaultMimeType() ) mimeName = mime->comment(); - d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) ); + d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) ); } return res; } @@ -252,7 +252,7 @@ bool KoDocumentChild::loadOasisDocument( KoStore* store, const TQDomDocument& ma KMimeType::Ptr mime = KMimeType::mimeType( mimeType ); if ( mime->name() != KMimeType::defaultMimeType() ) mimeName = mime->comment(); - d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) ); + d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) ); } return res; } @@ -306,7 +306,7 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr TQApplication::restoreOverrideCursor(); // For security reasons we need to ask confirmation if the url is remote int result = KMessageBox::warningYesNoCancel( - 0, i18n( "This document contains an external link to a remote document\n%1").tqarg(m_tmpURL), + 0, i18n( "This document contains an external link to a remote document\n%1").arg(m_tmpURL), i18n( "Confirmation Required" ), i18n( "Download" ), i18n( "Skip" ) ); if ( result == KMessageBox::Cancel ) @@ -335,9 +335,9 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr d->m_doc->setProperty( "realURL", tmpURL ); // so that it gets saved correctly d->m_doc->setStoreInternal( true ); if ( internalURL ) - d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).tqarg( errorMessage ) ); + d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).arg( errorMessage ) ); else - d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).tqarg( tmpURL, errorMessage ) ); + d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).arg( tmpURL, errorMessage ) ); } return res; } @@ -409,7 +409,7 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) } else { - // To make the tqchildren happy cd to the correct directory + // To make the children happy cd to the correct directory store->pushDirectory(); store->enterDirectory( name ); @@ -480,10 +480,10 @@ TQDomElement KoDocumentChild::save( TQDomDocument& doc, bool uppercase ) e.setAttribute( "mime", d->m_doc->nativeFormatMimeType().data() ); kdDebug() << "KoDocumentChild::save mime=" << d->m_doc->nativeFormatMimeType() << endl; TQDomElement rect = doc.createElement( ( uppercase ? "RECT" : "rect" ) ); - rect.setAttribute( "x", tqgeometry().left() ); - rect.setAttribute( "y", tqgeometry().top() ); - rect.setAttribute( "w", tqgeometry().width() ); - rect.setAttribute( "h", tqgeometry().height() ); + rect.setAttribute( "x", geometry().left() ); + rect.setAttribute( "y", geometry().top() ); + rect.setAttribute( "w", geometry().width() ); + rect.setAttribute( "h", geometry().height() ); e.appendChild(rect); return e; } diff --git a/lib/kofficecore/KoDocumentChild.h b/lib/kofficecore/KoDocumentChild.h index de3704c0..50029cee 100644 --- a/lib/kofficecore/KoDocumentChild.h +++ b/lib/kofficecore/KoDocumentChild.h @@ -45,7 +45,7 @@ class KOFFICECORE_EXPORT KoDocumentChild : public KoChild Q_OBJECT TQ_OBJECT public: - KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& tqgeometry ); + KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& geometry ); /** * When using this constructor you must call @ref #setDocument before @@ -59,7 +59,7 @@ public: * Call this function only directly after calling the constructor * that takes only a parent as argument. */ - virtual void setDocument( KoDocument *doc, const TQRect &tqgeometry ); + virtual void setDocument( KoDocument *doc, const TQRect &geometry ); /** * @return document contained in this child diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp index 0b54ebbb..1c9400c6 100644 --- a/lib/kofficecore/KoDocumentInfo.cpp +++ b/lib/kofficecore/KoDocumentInfo.cpp @@ -122,7 +122,7 @@ bool KoDocumentInfo::saveOasis( KoStore* store ) xmlWriter->startElement( "office:meta" ); xmlWriter->startElement( "meta:generator"); - xmlWriter->addTextNode( TQString( "KOffice/%1" ).tqarg( KOFFICE_VERSION_STRING ) ); + xmlWriter->addTextNode( TQString( "KOffice/%1" ).arg( KOFFICE_VERSION_STRING ) ); xmlWriter->endElement(); TQStringList lst = pages(); TQStringList::ConstIterator it = lst.begin(); @@ -232,7 +232,7 @@ void KoDocumentInfoAuthor::initParameters() m_emailCfg = new KConfig( "emaildefaults", true ); m_emailCfg->setGroup( "Defaults" ); TQString group = m_emailCfg->readEntry("Profile","Default"); - m_emailCfg->setGroup(TQString("PROFILE_%1").tqarg(group)); + m_emailCfg->setGroup(TQString("PROFILE_%1").arg(group)); if ( m_fullName.isNull() ) // only if null. Empty means the user made it explicitly empty. { diff --git a/lib/kofficecore/KoFileDialog.cpp b/lib/kofficecore/KoFileDialog.cpp index 2a7bd315..1c3a7fcb 100644 --- a/lib/kofficecore/KoFileDialog.cpp +++ b/lib/kofficecore/KoFileDialog.cpp @@ -90,9 +90,9 @@ void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter, int idx = 1; // 0 is the native format if ( addUncompressed ) - filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").tqarg( type->comment() ), idx++ ); + filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").arg( type->comment() ), idx++ ); if ( addFlatXML ) - filterWidget->changeItem( i18n("%1 (Flat XML File)").tqarg( type->comment() ), idx++ ); + filterWidget->changeItem( i18n("%1 (Flat XML File)").arg( type->comment() ), idx++ ); // if you add an entry here, update numSpecialEntries above and specialEntrySelected() below // For native format... @@ -109,7 +109,7 @@ void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter, KMimeType::Ptr mime = KMimeType::mimeType (*mimeFilterIt); TQString compatString = mime->property ("X-KDE-CompatibleApplication").toString (); if (!compatString.isEmpty ()) - filterWidget->changeItem (i18n ("%1 (%2 Compatible)").tqarg (mime->comment ()).tqarg (compatString), i); + filterWidget->changeItem (i18n ("%1 (%2 Compatible)").arg (mime->comment ()).arg (compatString), i); } } diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp index e4284e57..1e5beb47 100644 --- a/lib/kofficecore/KoFilter.cpp +++ b/lib/kofficecore/KoFilter.cpp @@ -54,7 +54,7 @@ TQString KoEmbeddingFilter::mimeTypeByExtension( const TQString& extension ) // We need to resort to an ugly hack to determine the mimetype // from the extension, as kservicetypefactory.h isn't installed KURL url; - url.setPath( TQString( "dummy.%1" ).tqarg( extension ) ); + url.setPath( TQString( "dummy.%1" ).arg( extension ) ); KMimeType::Ptr m( KMimeType::findByURL( url, 0, true, true ) ); return m->name(); } diff --git a/lib/kofficecore/KoFilter.h b/lib/kofficecore/KoFilter.h index dc8c2947..cafad774 100644 --- a/lib/kofficecore/KoFilter.h +++ b/lib/kofficecore/KoFilter.h @@ -262,7 +262,7 @@ private: /** * This struct keeps track of the last used index for a - * child part and all references to existing tqchildren + * child part and all references to existing children * We use it to build a whole stack, one PartState per * embedding level. * @internal diff --git a/lib/kofficecore/KoFilterChain.cpp b/lib/kofficecore/KoFilterChain.cpp index 37ff5d95..62d93aa5 100644 --- a/lib/kofficecore/KoFilterChain.cpp +++ b/lib/kofficecore/KoFilterChain.cpp @@ -568,7 +568,7 @@ KoStoreDevice* KoFilterChain::storageInitEmbedding( const TQString& name ) return storageCleanupHelper( &m_outputStorage ); } - if ( !m_outputStorage->enterDirectory( TQString( "part%1" ).tqarg( lruPartIndex ) ) ) + if ( !m_outputStorage->enterDirectory( TQString( "part%1" ).arg( lruPartIndex ) ) ) return storageCleanupHelper( &m_outputStorage ); return storageCreateFirstStream( name, &m_outputStorage, &m_outputStorageDevice ); diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp index e7ee131c..bcd56f75 100644 --- a/lib/kofficecore/KoFilterManager.cpp +++ b/lib/kofficecore/KoFilterManager.cpp @@ -583,7 +583,7 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry ) void KoFilterManager::importErrorHelper( const TQString& mimeType, const bool suppressDialog ) { - TQString tmp = i18n("Could not import file of type\n%1").tqarg( mimeType ); + TQString tmp = i18n("Could not import file of type\n%1").arg( mimeType ); // ###### FIXME: use KLibLoader::lastErrorMessage() here if (!suppressDialog) KMessageBox::error( 0L, tmp, i18n("Missing Import Filter") ); } diff --git a/lib/kofficecore/KoFrame.cpp b/lib/kofficecore/KoFrame.cpp index 4909e1e0..f9b3930e 100644 --- a/lib/kofficecore/KoFrame.cpp +++ b/lib/kofficecore/KoFrame.cpp @@ -254,7 +254,7 @@ void KoFrame::mouseMoveEvent( TQMouseEvent* ev ) TQPoint p = parentWidget()->mapFromGlobal( ev->globalPos() ); move( TQPoint( p.x() + d->m_framePos.x() - d->m_mousePressPos.x(), p.y() + d->m_framePos.y() - d->m_mousePressPos.y() ) ); - // The other modes change the tqgeometry so they call resizeEvent. + // The other modes change the geometry so they call resizeEvent. // This one doesn't, so it has to emit geometryChangedby itself. emit geometryChanged(); //kdDebug() << "KoFrame::mouseMoveEvent koFrame position is " << x() << "," << y() << endl; diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp index 4428d524..248d3ed3 100644 --- a/lib/kofficecore/KoMainWindow.cpp +++ b/lib/kofficecore/KoMainWindow.cpp @@ -505,13 +505,13 @@ void KoMainWindow::updateCaption() } const TQString url = rootDocument()->url().prettyURL( 0, KURL::StripFileProtocol ); if ( !caption.isEmpty() && !url.isEmpty() ) - caption = TQString( "%1 - %2" ).tqarg( caption ).tqarg( url ); + caption = TQString( "%1 - %2" ).arg( caption ).arg( url ); else if ( caption.isEmpty() ) caption = url; setCaption( caption, rootDocument()->isModified() ); if ( !rootDocument()->url().fileName(false).isEmpty() ) - d->m_paSave->setToolTip( i18n("Save as %1").tqarg(rootDocument()->url().fileName(false)) ); + d->m_paSave->setToolTip( i18n("Save as %1").arg(rootDocument()->url().fileName(false)) ); else d->m_paSave->setToolTip( i18n("Save") ); } @@ -544,7 +544,7 @@ bool KoMainWindow::openDocument( const KURL & url ) { if ( !KIO::NetAccess::exists(url,true,0) ) { - KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(url.url()) ); + KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(url.url()) ); m_recent->removeURL(url); //remove the file from the recent-opened-file-list saveRecentFiles(); return false; @@ -677,7 +677,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) const bool neverHeardOfIt = ( mime->name() == KMimeType::defaultMimeType() ); TQString comment = neverHeardOfIt ? - i18n( "%1 (unknown file type)" ).tqarg( outputFormat.data() ) + i18n( "%1 (unknown file type)" ).arg( outputFormat.data() ) : mime->comment(); // Warn the user @@ -689,7 +689,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) this, i18n( "<qt>Saving as a %1 may result in some loss of formatting." "<p>Do you still want to save in this format?</qt>" ) - .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later + .arg( TQString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later i18n( "Confirm Save" ), KStdGuiItem::save (), "NonNativeSaveConfirmation", @@ -703,7 +703,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) this, i18n( "<qt>Exporting as a %1 may result in some loss of formatting." "<p>Do you still want to export to this format?</qt>" ) - .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later + .arg( TQString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later i18n( "Confirm Export" ), i18n ("Export"), "NonNativeExportConfirmation", // different to the one used for Save (above) @@ -1039,7 +1039,7 @@ bool KoMainWindow::queryClose() name = i18n( "Untitled" ); int res = KMessageBox::warningYesNoCancel( this, - i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name), + i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); @@ -1212,7 +1212,7 @@ void KoMainWindow::print(bool quick) { if ( title.isEmpty() ) { // #139905 - breaks message freeze though //const TQString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName(); - //title = i18n("%1 unsaved document (%2)").tqarg(programName).tqarg(KGlobal::locale()->formatDate(TQDate::currentDate(), true/*short*/)); + //title = i18n("%1 unsaved document (%2)").arg(programName).arg(KGlobal::locale()->formatDate(TQDate::currentDate(), true/*short*/)); } printer.setDocName( title ); printer.setDocFileName( fileName ); @@ -1529,9 +1529,9 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart ) if ( it.current()->inherits("KToolBar") ) { KToolBar * tb = static_cast<KToolBar *>(it.current()); - KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").tqarg( tb->text() ), 0, + KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").arg( tb->text() ), 0, actionCollection(), tb->name() ); - act->setCheckedState(i18n("Hide %1 Toolbar").tqarg( tb->text() )); + act->setCheckedState(i18n("Hide %1 Toolbar").arg( tb->text() )); connect( act, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolbarToggled( bool ) ) ); act->setChecked ( !tb->isHidden() ); d->m_toolbarList.append( act ); @@ -1618,7 +1618,7 @@ void KoMainWindow::slotEmailFile() else { fileURL = rootDocument()->url().url(); - theSubject = i18n("Document - %1").tqarg(rootDocument()->url().fileName(false)); + theSubject = i18n("Document - %1").arg(rootDocument()->url().fileName(false)); urls.append( fileURL ); } diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp index ea99ce8a..fa1642e7 100644 --- a/lib/kofficecore/KoOasisStore.cpp +++ b/lib/kofficecore/KoOasisStore.cpp @@ -145,7 +145,7 @@ bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, T if (!m_store->open(fileName)) { kdWarning(30003) << "Entry " << fileName << " not found!" << endl; - errorMessage = i18n( "Could not find %1" ).tqarg( fileName ); + errorMessage = i18n( "Could not find %1" ).arg( fileName ); return false; } // Error variables for TQDomDocument::setContent @@ -168,7 +168,7 @@ bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, T << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; errorMessage = i18n( "Parsing error in the main document at line %1, column %2\nError message: %3" ) - .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ) ); + .arg( errorLine ).arg( errorColumn ).arg( i18n ( "TQXml", errorMsg.utf8() ) ); } else { diff --git a/lib/kofficecore/KoPictureEps.cpp b/lib/kofficecore/KoPictureEps.cpp index 236b08d7..87547bdf 100644 --- a/lib/kofficecore/KoPictureEps.cpp +++ b/lib/kofficecore/KoPictureEps.cpp @@ -244,7 +244,7 @@ void KoPictureEps::draw(TQPainter& painter, int x, int y, int width, int height, TQPaintDeviceMetrics metrics (painter.device()); kdDebug(30003) << "Metrics: X: " << metrics.logicalDpiX() << " x Y: " << metrics.logicalDpiX() << " (in KoPictureEps::draw)" << endl; - if ( painter.tqdevice()->isExtDev() ) // Is it an external device (i.e. printer) + if ( painter.device()->isExtDev() ) // Is it an external device (i.e. printer) { kdDebug(30003) << "Drawing for a printer (in KoPictureEps::draw)" << endl; // For printing, always re-sample the image, as a printer has never the same resolution than a display. diff --git a/lib/kofficecore/KoPictureImage.cpp b/lib/kofficecore/KoPictureImage.cpp index c0775ac7..b0b28ff3 100644 --- a/lib/kofficecore/KoPictureImage.cpp +++ b/lib/kofficecore/KoPictureImage.cpp @@ -95,7 +95,7 @@ void KoPictureImage::draw(TQPainter& painter, int x, int y, int width, int heigh if ( !width || !height ) return; TQSize origSize = getOriginalSize(); - const bool scaleImage = painter.tqdevice()->isExtDev() // we are printing + const bool scaleImage = painter.device()->isExtDev() // we are printing && ((width <= origSize.width()) || (height <= origSize.height())); if( scaleImage ) { diff --git a/lib/kofficecore/KoPictureKey.cpp b/lib/kofficecore/KoPictureKey.cpp index 32d73336..ea2869a9 100644 --- a/lib/kofficecore/KoPictureKey.cpp +++ b/lib/kofficecore/KoPictureKey.cpp @@ -140,7 +140,7 @@ TQString KoPictureKey::toString() const { // We do not use the default TQDateTime::toString has it does not show microseconds return TQString::fromLatin1( "%1 %2" ) - .tqarg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); + .arg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); } void KoPictureKey::setKeyFromFile (const TQString& filename) diff --git a/lib/kofficecore/KoQueryTrader.cpp b/lib/kofficecore/KoQueryTrader.cpp index cc9ab920..84a1be4b 100644 --- a/lib/kofficecore/KoQueryTrader.cpp +++ b/lib/kofficecore/KoQueryTrader.cpp @@ -76,14 +76,14 @@ KoDocument* KoDocumentEntry::createDoc( KoDocument* parent, const char* name ) c KoDocumentEntry KoDocumentEntry::queryByMimeType( const TQString & mimetype ) { - TQString constr = TQString::fromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).tqarg( mimetype ).tqarg( mimetype ); + TQString constr = TQString::fromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).arg( mimetype ).arg( mimetype ); TQValueList<KoDocumentEntry> vec = query( false,constr ); if ( vec.isEmpty() ) { kdWarning(30003) << "Got no results with " << constr << endl; // Fallback to the old way (which was probably wrong, but better be safe) - TQString constr = TQString::fromLatin1( "'%1' in ServiceTypes" ).tqarg( mimetype ); + TQString constr = TQString::fromLatin1( "'%1' in ServiceTypes" ).arg( mimetype ); vec = query( constr ); if ( vec.isEmpty() ) { diff --git a/lib/kofficecore/KoTemplates.h b/lib/kofficecore/KoTemplates.h index 98c3ef72..d65fab44 100644 --- a/lib/kofficecore/KoTemplates.h +++ b/lib/kofficecore/KoTemplates.h @@ -80,9 +80,9 @@ public: void addDir(const TQString &dir) { m_dirs.append(dir); m_touched=true; } int sortingWeight() const { return m_sortingWeight; } void setSortingWeight(int weight) { m_sortingWeight = weight; } - /// If all tqchildren are hidden, we are hidden too + /// If all children are hidden, we are hidden too bool isHidden() const; - /// if we should hide, we hide all the tqchildren + /// if we should hide, we hide all the children void setHidden(bool hidden=true) const; KoTemplate *first() { return m_templates.first(); } diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index 7dc1f0b0..259c498e 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -42,7 +42,7 @@ public: { m_inOperation = false; m_zoom = 1.0; - m_tqchildren.setAutoDelete( true ); + m_children.setAutoDelete( true ); m_manager = 0L; m_tempActiveWidget = 0L; m_dcopObject = 0; @@ -56,7 +56,7 @@ public: TQGuardedPtr<KoDocument> m_doc; // our KoDocument TQGuardedPtr<KParts::PartManager> m_manager; double m_zoom; - TQPtrList<KoViewChild> m_tqchildren; + TQPtrList<KoViewChild> m_children; TQWidget *m_tempActiveWidget; KoViewIface *m_dcopObject; bool m_registered; // are we registered at the part manager? @@ -339,7 +339,7 @@ void KoView::partActivateEvent( KParts::PartActivateEvent *event ) if ( child->isRectangle() && !child->isTransparent() ) { KoViewChild *viewChild = new KoViewChild( child, this ); - d->m_tqchildren.append( viewChild ); + d->m_children.append( viewChild ); TQApplication::setOverrideCursor(waitCursor); // This is the long operation (due to toolbar tqlayout stuff) @@ -484,7 +484,7 @@ void KoView::paintEverything( TQPainter &painter, const TQRect &rect, bool trans KoViewChild *KoView::child( KoView *view ) { - TQPtrListIterator<KoViewChild> it( d->m_tqchildren ); + TQPtrListIterator<KoViewChild> it( d->m_children ); for (; it.current(); ++it ) if ( it.current()->frame()->view() == view ) return it.current(); @@ -494,7 +494,7 @@ KoViewChild *KoView::child( KoView *view ) KoViewChild *KoView::child( KoDocument *doc ) { - TQPtrListIterator<KoViewChild> it( d->m_tqchildren ); + TQPtrListIterator<KoViewChild> it( d->m_children ); for (; it.current(); ++it ) if ( it.current()->documentChild()->document() == doc ) return it.current(); @@ -554,7 +554,7 @@ void KoView::slotChildActivated( bool a ) docChild->document()->setViewBuildDocument( chFrame->view(), chFrame->view()->xmlguiBuildDocument() ); } - d->m_tqchildren.remove( ch ); + d->m_children.remove( ch ); d->m_manager->addPart( docChild->document(), false ); // the destruction of the view removed the part from the partmanager. re-add it :) @@ -741,11 +741,11 @@ KoViewChild::KoViewChild( KoDocumentChild *child, KoView *_parentView ) /* KoViewChild has basically three geometries to keep in sync. - - The KoDocumentChild tqgeometry (i.e. the embedded object's tqgeometry, unzoomed) - - Its own tqgeometry (used for hit-test etc.) - - The KoFrame tqgeometry (the graphical widget for moving the object when active) + - The KoDocumentChild geometry (i.e. the embedded object's geometry, unzoomed) + - Its own geometry (used for hit-test etc.) + - The KoFrame geometry (the graphical widget for moving the object when active) - So we need to subtract the scrollview's offset for the frame tqgeometry, since it's a widget. + So we need to subtract the scrollview's offset for the frame geometry, since it's a widget. The rules are (R1) frameGeometry = viewGeometry(childGeometry) "+" m_frame->{left|right|top|bottom}Border() - scrollview offset, @@ -779,8 +779,8 @@ KoViewChild::~KoViewChild() void KoViewChild::slotFrameGeometryChanged() { - // Set our tqgeometry from the frame tqgeometry (R2 reversed) - TQRect geom = m_frame->tqgeometry(); + // Set our geometry from the frame geometry (R2 reversed) + TQRect geom = m_frame->geometry(); int b = m_frame->border(); TQRect borderRect( geom.x() + b + parentView()->canvasXOffset(), geom.y() + b + parentView()->canvasYOffset(), @@ -790,7 +790,7 @@ void KoViewChild::slotFrameGeometryChanged() if(m_child) { - // Set the child tqgeometry from the frame tqgeometry (R1 reversed) + // Set the child geometry from the frame geometry (R1 reversed) TQRect borderLessRect( geom.x() + m_frame->leftBorder() + parentView()->canvasXOffset(), geom.y() + m_frame->topBorder() + parentView()->canvasYOffset(), geom.width() - m_frame->leftBorder() - m_frame->rightBorder(), @@ -799,8 +799,8 @@ void KoViewChild::slotFrameGeometryChanged() // We don't want to trigger slotDocGeometryChanged again lock(); TQRect childGeom = parentView()->reverseViewTransformations( borderLessRect ); - kdDebug() << "KoChild::slotFrameGeometryChanged child tqgeometry " - << ( tqgeometry() == childGeom ? "already " : "set to " ) + kdDebug() << "KoChild::slotFrameGeometryChanged child geometry " + << ( geometry() == childGeom ? "already " : "set to " ) << childGeom << endl; m_child->setGeometry( childGeom ); unlock(); @@ -811,15 +811,15 @@ void KoViewChild::slotDocGeometryChanged() { if ( locked() ) return; - // Set frame tqgeometry from child tqgeometry (R1) + // Set frame geometry from child geometry (R1) // The frame's resizeEvent will call slotFrameGeometryChanged. - TQRect geom = parentView()->applyViewTransformations( m_child->tqgeometry() ); + TQRect geom = parentView()->applyViewTransformations( m_child->geometry() ); TQRect borderRect( geom.x() - m_frame->leftBorder() - parentView()->canvasXOffset(), geom.y() - m_frame->topBorder() - parentView()->canvasYOffset(), geom.width() + m_frame->leftBorder() + m_frame->rightBorder(), geom.height() + m_frame->topBorder() + m_frame->bottomBorder() ); - kdDebug() << "KoViewChild::slotDocGeometryChanged frame tqgeometry " - << ( m_frame->tqgeometry() == borderRect ? "already " : "set to " ) + kdDebug() << "KoViewChild::slotDocGeometryChanged frame geometry " + << ( m_frame->geometry() == borderRect ? "already " : "set to " ) << borderRect << endl; m_frame->setGeometry( borderRect ); diff --git a/lib/kofficecore/KoXmlReader.cpp b/lib/kofficecore/KoXmlReader.cpp index 3b2d3efb..16a08f0c 100644 --- a/lib/kofficecore/KoXmlReader.cpp +++ b/lib/kofficecore/KoXmlReader.cpp @@ -305,7 +305,7 @@ KoXmlNodeData::KoXmlNodeData() fastLoading = false; // assume true, it will be set to false by XML parser when this node - // apparently has tqchildren AND the tqchildren are not loaded + // apparently has children AND the children are not loaded loaded = true; } @@ -534,7 +534,7 @@ void KoXmlNodeData::loadChildren( int depth ) !doc->xmlReader->feature( "http://xml.org/sax/features/namespace-prefixes" ); - // XML snippet for the tqchildren, including this element + // XML snippet for the children, including this element TQString snippet = doc->buffer.mid( startPos, endPos-startPos+1 ); // now parse all subnodes diff --git a/lib/kofficecore/THOUGHTS b/lib/kofficecore/THOUGHTS index fc936fdc..f0121aa9 100644 --- a/lib/kofficecore/THOUGHTS +++ b/lib/kofficecore/THOUGHTS @@ -30,7 +30,7 @@ solve zooming and "scrolling" problems. One ugly problem also is what we will do about performance problems on repainting a part. Some time ago we got a mail on KOffice where some guy asked what to do about making that embedded painting faster. The reason is -that we *always* tqrepaint the whole area, no matter what. This can easily be +that we *always* repaint the whole area, no matter what. This can easily be optimized to a WNorthWestGravity like behavior, because you can't edit those embedded parts anyway, so even kchart and other non-WNG apps support that. ( we have to translate the painter, of course). @@ -44,7 +44,7 @@ whether they are the root views (not embedded), or they are *active* embedded views. There only has to be a KoView object. There is *one* zoom factor for both axes (x/y) and the whole -content (text, objects, tqchildren,...) is zoomed accordingly. +content (text, objects, children,...) is zoomed accordingly. This kind of zooming is like the zoom support you know from other applications. diff --git a/lib/kofficecore/kkbdaccessextensions.cpp b/lib/kofficecore/kkbdaccessextensions.cpp index 763bd792..a9a1cb2a 100644 --- a/lib/kofficecore/kkbdaccessextensions.cpp +++ b/lib/kofficecore/kkbdaccessextensions.cpp @@ -77,7 +77,7 @@ class KPanelKbdSizerIcon : public TQCursor void setShape(int shayp) { - if (shayp != tqshape()) { + if (shayp != shape()) { // Must restore and override to get the icon to refresh. if (isActive) kapp->restoreOverrideCursor(); TQCursor::setShape((Qt::CursorShape)shayp); diff --git a/lib/kofficecore/koDetailsPaneBase.ui b/lib/kofficecore/koDetailsPaneBase.ui index 2dc1c6f4..4a838726 100644 --- a/lib/kofficecore/koDetailsPaneBase.ui +++ b/lib/kofficecore/koDetailsPaneBase.ui @@ -82,7 +82,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> @@ -177,7 +177,7 @@ <property name="text"> <string></string> </property> - <property name="tqalignment"> + <property name="alignment"> <set>AlignCenter</set> </property> </widget> diff --git a/lib/kofficecore/tests/filter_graph.cpp b/lib/kofficecore/tests/filter_graph.cpp index baead627..7ce1ed77 100644 --- a/lib/kofficecore/tests/filter_graph.cpp +++ b/lib/kofficecore/tests/filter_graph.cpp @@ -52,7 +52,7 @@ int main( int /*argc*/, char ** /*argv*/ ) if ( !key.isEmpty() ) { output += " \""; output += key.latin1(); - output += "\" [tqshape=box, style=filled, fillcolor=lightblue];\n"; + output += "\" [shape=box, style=filled, fillcolor=lightblue];\n"; if ( vertices.find( key ) == vertices.end() ) vertices.append( key ); } diff --git a/lib/kofficecore/tests/koxmlreadertest.cpp b/lib/kofficecore/tests/koxmlreadertest.cpp index 5056e416..512dec71 100644 --- a/lib/kofficecore/tests/koxmlreadertest.cpp +++ b/lib/kofficecore/tests/koxmlreadertest.cpp @@ -639,7 +639,7 @@ void testDocument() CHECK( doc.previousSibling().isNull(), true ); CHECK( doc.nextSibling().isNull(), true ); - // make sure its tqchildren are fine + // make sure its children are fine KoXmlElement rootElement; rootElement = doc.firstChild().toElement(); CHECK( rootElement.isNull(), false ); @@ -1887,7 +1887,7 @@ void testLargeOpenDocumentSpreadsheet() xmlstream << "<office:spreadsheet>"; for( int i = 0; i < sheetCount; i++ ) { - TQString sheetName = TQString("Sheet%1").tqarg(i+1); + TQString sheetName = TQString("Sheet%1").arg(i+1); xmlstream << "<table:table table:name=\"" << sheetName; xmlstream << "\" table:print=\"false\">"; for( int j = 0; j < rowCount; j++ ) @@ -1981,7 +1981,7 @@ void testLargeOpenDocumentSpreadsheet() tableElement = spreadsheetElement.firstChild().toElement(); for( int table=0; table < sheetCount; table++ ) { - TQString tableName = TQString("Sheet%1").tqarg(table+1); + TQString tableName = TQString("Sheet%1").arg(table+1); CHECK( tableElement.isNull(), false ); CHECK( tableElement.isElement(), true ); CHECK( tableElement.localName(), TQString("table") ); diff --git a/lib/kofficeui/KoCommandHistory.cpp b/lib/kofficeui/KoCommandHistory.cpp index 9f071db9..2b5824ed 100644 --- a/lib/kofficeui/KoCommandHistory.cpp +++ b/lib/kofficeui/KoCommandHistory.cpp @@ -188,7 +188,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) { m_first=false; if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); } if((m_redo != 0) && m_redo->isEnabled()) { m_redo->setEnabled(false); @@ -203,7 +203,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) { d->m_present=command; if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); } if (m_redo != 0) { m_redo->setEnabled(false); @@ -229,7 +229,7 @@ void KoCommandHistory::undo() { if (m_redo != 0) { m_redo->setEnabled(true); - m_redo->setText(i18n("&Redo: %1").tqarg(d->m_present->name())); + m_redo->setText(i18n("&Redo: %1").arg(d->m_present->name())); } int index; if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.prev()!=0) { @@ -238,7 +238,7 @@ void KoCommandHistory::undo() { emit commandExecuted(commandUndone); if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); } --index; if(index==d->m_savedAt) @@ -282,13 +282,13 @@ void KoCommandHistory::redo() { if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); } if(m_commands.next()!=0) { if (m_redo != 0) { m_redo->setEnabled(true); - m_redo->setText(i18n("&Redo: %1").tqarg(m_commands.current()->name())); + m_redo->setText(i18n("&Redo: %1").arg(m_commands.current()->name())); } } else { @@ -365,7 +365,7 @@ void KoCommandHistory::slotUndoAboutToShow() if (m_commands.findRef(d->m_present)!=-1) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { - lst.append(i18n("Undo: %1").tqarg(m_commands.current()->name())); + lst.append(i18n("Undo: %1").arg(m_commands.current()->name())); m_commands.prev(); } d->m_undoListBox->insertStringList( lst ); @@ -411,12 +411,12 @@ void KoCommandHistory::slotRedoAboutToShow() if (m_first) { d->m_present = m_commands.first(); - lst.append(i18n("Redo: %1").tqarg(d->m_present->name())); + lst.append(i18n("Redo: %1").arg(d->m_present->name())); } if (m_commands.findRef(d->m_present)!=-1 && m_commands.next()) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { - lst.append(i18n("Redo: %1").tqarg(m_commands.current()->name())); + lst.append(i18n("Redo: %1").arg(m_commands.current()->name())); m_commands.next(); } d->m_redoListBox->insertStringList( lst ); diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp index c11e6745..870fddc6 100644 --- a/lib/kofficeui/KoGuides.cpp +++ b/lib/kofficeui/KoGuides.cpp @@ -754,7 +754,7 @@ void KoGuides::slotRemove() void KoGuides::paint() { - m_view->canvas()->tqrepaint( false ); + m_view->canvas()->repaint( false ); } diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h index 7a28962f..c1f66138 100644 --- a/lib/kofficeui/KoGuides.h +++ b/lib/kofficeui/KoGuides.h @@ -173,7 +173,7 @@ public: void snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff ); /** - * @brief tqrepaint guides if any changed snapping status + * @brief repaint guides if any changed snapping status * * This issues a paint request if any guides have changed snapping status. * @@ -182,7 +182,7 @@ public: void repaintSnapping( const KoRect &snappedRect ); /** - * @brief tqrepaint guides if any changed snapping status + * @brief repaint guides if any changed snapping status * * This issues a paint request if any guides have changed snapping status. * @@ -191,7 +191,7 @@ public: void repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus ); /** - * @brief tqrepaint guides so none is snapped + * @brief repaint guides so none is snapped * * This issues a paint request if any guides have changed snapping status. * It also effectively un-snaps all since it doesn't take an argument @@ -253,9 +253,9 @@ signals: /** * @brief This signal is emitted when guides start/stop painting. * - * With this signal it is possible to only tqrepaint the guides in the paint + * With this signal it is possible to only repaint the guides in the paint * method of the canvas. Just set/unset a flag when this signal is emmited. - * This signal is emitted before and after a tqrepaint is done. + * This signal is emitted before and after a repaint is done. * * @param state true when starting painting guides, false when stopping. */ diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp index 0b410bf1..5cffc108 100644 --- a/lib/kofficeui/KoPageLayoutDia.cpp +++ b/lib/kofficeui/KoPageLayoutDia.cpp @@ -84,14 +84,14 @@ void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; - tqrepaint( true ); + repaint( true ); } /*=================== set tqlayout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; - tqrepaint( true ); + repaint( true ); } /*======================== draw contents =========================*/ diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp index 111ba21b..54be2b3f 100644 --- a/lib/kofficeui/KoPageLayoutSize.cpp +++ b/lib/kofficeui/KoPageLayoutSize.cpp @@ -61,7 +61,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayou else { TQString str=KoUnit::unitDescription(unit); - TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this ); + TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").arg(str), this ); grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft ); } diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index a7ffe145..a249084f 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -661,7 +661,7 @@ void KoTabBar::paintEvent( TQPaintEvent* ) TQPainter painter; TQPixmap pm( size() ); pm.fill( colorGroup().background() ); - painter.tqbegin( TQT_TQPAINTDEVICE(&pm), this ); + painter.begin( TQT_TQPAINTDEVICE(&pm), this ); painter.setPen( colorGroup().dark() ); painter.drawLine( 0, 0, width(), 0 ); diff --git a/lib/kofficeui/KoTabChooser.cpp b/lib/kofficeui/KoTabChooser.cpp index ed891e89..19d93764 100644 --- a/lib/kofficeui/KoTabChooser.cpp +++ b/lib/kofficeui/KoTabChooser.cpp @@ -94,7 +94,7 @@ void KoTabChooser::mousePressEvent( TQMouseEvent *e ) else if ( flags & TAB_RIGHT ) currType = TAB_RIGHT; } break; } - tqrepaint( true ); + repaint( true ); } break; case Qt::RightButton: { TQPoint pnt( TQCursor::pos() ); diff --git a/lib/kofficeui/KoTabChooser.h b/lib/kofficeui/KoTabChooser.h index 31ad0f85..fb9a0591 100644 --- a/lib/kofficeui/KoTabChooser.h +++ b/lib/kofficeui/KoTabChooser.h @@ -71,10 +71,10 @@ protected: KoTabChooserPrivate *d; protected slots: - void rbLeft() { currType = TAB_LEFT; tqrepaint( true ); } - void rbCenter() { currType = TAB_CENTER; tqrepaint( true ); } - void rbRight() { currType = TAB_RIGHT; tqrepaint( true ); } - void rbDecPoint() { currType = TAB_DEC_PNT; tqrepaint( true ); } + void rbLeft() { currType = TAB_LEFT; repaint( true ); } + void rbCenter() { currType = TAB_CENTER; repaint( true ); } + void rbRight() { currType = TAB_RIGHT; repaint( true ); } + void rbDecPoint() { currType = TAB_DEC_PNT; repaint( true ); } }; diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 880c447b..0311049e 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -84,7 +84,7 @@ class MyFileDialog : public KFileDialog ok = TQFile::exists( url.path() ); if ( !ok ) { // Maybe offer to create a new document with that name? (see alos KoDocument::openFile) - KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); } } return ok; @@ -312,7 +312,7 @@ void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout int i = 0; TQString value; do { - TQString key=TQString( "File%1" ).tqarg( i ); + TQString key=TQString( "File%1" ).arg( i ); value=d->m_instance->config()->readPathEntry( key ); if ( !value.isEmpty() ) { // Support for tdelibs-3.5's new RecentFiles format: name[url] @@ -478,7 +478,7 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou currentChanged(itemtoselect); // setup the checkbox - TQString translatedstring = i18n("Always start %1 with the selected template").tqarg(d->m_nativeName); + TQString translatedstring = i18n("Always start %1 with the selected template").arg(d->m_nativeName); d->m_nodiag = new TQCheckBox ( translatedstring , widgetbase); tqlayout->addWidget(d->m_nodiag, 2, 0); @@ -706,7 +706,7 @@ bool KoTemplateChooseDia::collectInfo() KURL url = item->url(); if(url.isLocalFile() && !TQFile::exists(url.path())) { - KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); return false; } d->m_fullTemplateName = url.url(); @@ -793,7 +793,7 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) // and another one for deciding what's the text of the tooltip... const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); TQString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol ); - toolTip = new TQLabel( TQString::fromLatin1(" %1 ").tqarg(toolTipText), 0, + toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(toolTipText), 0, "myToolTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp index 6243b9dc..4e8c4d0c 100644 --- a/lib/kofficeui/KoTemplateCreateDia.cpp +++ b/lib/kofficeui/KoTemplateCreateDia.cpp @@ -171,7 +171,7 @@ KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstan d->m_defaultTemplate = new TQCheckBox( i18n("Use the new template as default"), mainwidget ); d->m_defaultTemplate->setChecked( true ); - TQToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").tqarg(instance->aboutData()->programName() ) ); + TQToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").arg(instance->aboutData()->programName() ) ); rightbox->addWidget( d->m_defaultTemplate ); enableButtonOK(false); diff --git a/lib/kofficeui/KoToolBox.h b/lib/kofficeui/KoToolBox.h index 764ce4c1..7b31d847 100644 --- a/lib/kofficeui/KoToolBox.h +++ b/lib/kofficeui/KoToolBox.h @@ -104,7 +104,7 @@ public: TQWidget* getNextParent(); private: - TQPtrList<TQWidget> m_tqchildren; + TQPtrList<TQWidget> m_children; TQBoxLayout *m_layout; TQWidget *m_leftRow; diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index 3ac7cb45..bc5affeb 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -136,7 +136,7 @@ void KoColorPanel::insertDefaultColors() return; m_defaultsAdded = true; - int currentRow = m_nextPosition.y; // we have to tqrepaint this row below + int currentRow = m_nextPosition.y; // we have to repaint this row below // Note: No checking for duplicates, so take care when you modify that list insertColor(TQColor( 255 , 0 , 0 ), i18n( "color", "Red" ), false); @@ -294,9 +294,9 @@ void KoColorPanel::insertDefaultColors() insertColor(TQColor( 0 , 0 , 205 ), i18n( "color", "MediumBlue" ), false); insertColor(TQColor( 0 , 0 , 128 ), i18n( "color", "Navy" ), false); - finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we tqrepaint anyway + finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we repaint anyway updateGeometry(); - // we have to tqrepaint the "old" current row explicitly due + // we have to repaint the "old" current row explicitly due // to WStaticContents update( 0, currentRow << 4, COLS << 4, 16 ); } diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index 89d9dbc8..14b92ec6 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -90,7 +90,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) const TQString KoUnitDoubleBase::getVisibleText( double value ) const { - const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); + const TQString num ( TQString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; return num; } diff --git a/lib/kofficeui/KoZoomAction.cpp b/lib/kofficeui/KoZoomAction.cpp index 7f9e4139..df1bac4d 100644 --- a/lib/kofficeui/KoZoomAction.cpp +++ b/lib/kofficeui/KoZoomAction.cpp @@ -69,10 +69,10 @@ void KoZoomAction::setZoom( const TQString& text ) // update items with new sorted zoom values TQStringList values; for (TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it ) - values.append( i18n("%1%").tqarg(*it) ); + values.append( i18n("%1%").arg(*it) ); setItems( values ); - TQString zoomStr = i18n("%1%").tqarg( zoom ); + TQString zoomStr = i18n("%1%").arg( zoom ); setCurrentItem( values.findIndex( zoomStr ) ); } @@ -92,21 +92,21 @@ void KoZoomAction::init() setEditable( true ); TQStringList values; - values << i18n("%1%").tqarg("33"); - values << i18n("%1%").tqarg("50"); - values << i18n("%1%").tqarg("75"); - values << i18n("%1%").tqarg("100"); - values << i18n("%1%").tqarg("125"); - values << i18n("%1%").tqarg("150"); - values << i18n("%1%").tqarg("200"); - values << i18n("%1%").tqarg("250"); - values << i18n("%1%").tqarg("350"); - values << i18n("%1%").tqarg("400"); - values << i18n("%1%").tqarg("450"); - values << i18n("%1%").tqarg("500"); + values << i18n("%1%").arg("33"); + values << i18n("%1%").arg("50"); + values << i18n("%1%").arg("75"); + values << i18n("%1%").arg("100"); + values << i18n("%1%").arg("125"); + values << i18n("%1%").arg("150"); + values << i18n("%1%").arg("200"); + values << i18n("%1%").arg("250"); + values << i18n("%1%").arg("350"); + values << i18n("%1%").arg("400"); + values << i18n("%1%").arg("450"); + values << i18n("%1%").arg("500"); setItems( values ); - setCurrentItem( values.findIndex( i18n("%1%").tqarg( 100 ) ) ); + setCurrentItem( values.findIndex( i18n("%1%").arg( 100 ) ) ); connect( this, TQT_SIGNAL( activated( const TQString& ) ), TQT_SLOT( activated( const TQString& ) ) ); diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp index 2618a8e0..e09ef63d 100644 --- a/lib/kofficeui/kcoloractions.cpp +++ b/lib/kofficeui/kcoloractions.cpp @@ -341,7 +341,7 @@ TQString KSelectColorAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!icon().isEmpty()) - return TQString::fromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text); + return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(icon()).arg(text); return text; } diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp index da88a7c1..cfc21c65 100644 --- a/lib/kofficeui/tkaction.cpp +++ b/lib/kofficeui/tkaction.cpp @@ -120,19 +120,19 @@ void TKAction::updateLayout() } } -TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* tqchildren) +TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* children) { TQWidget* base = new TQWidget(parent,"KTToolBarLayout"); TQLabel* textLabel = new TQLabel(base,"text"); textLabel->setMinimumHeight(1); TQLabel* pixLabel = new TQLabel(base,"pixmap"); - tqchildren->reparent(base,TQPoint(0,0)); - tqchildren->setName("widget"); + children->reparent(base,TQPoint(0,0)); + children->setName("widget"); TQHBoxLayout* tqlayout = new TQHBoxLayout(base,0,3); tqlayout->setResizeMode(TQLayout::Minimum); tqlayout->addWidget(textLabel); tqlayout->addWidget(pixLabel); - tqlayout->addWidget(tqchildren,1); + tqlayout->addWidget(children,1); updateLayout(base); return base; diff --git a/lib/kofficeui/tkaction.h b/lib/kofficeui/tkaction.h index 26b4069d..b9a84a41 100644 --- a/lib/kofficeui/tkaction.h +++ b/lib/kofficeui/tkaction.h @@ -44,7 +44,7 @@ public: protected: virtual void initToolBarButton(TKToolBarButton*); - TQWidget* createLayout(TQWidget* parent, TQWidget* tqchildren); + TQWidget* createLayout(TQWidget* parent, TQWidget* children); void updateLayout(); virtual void updateLayout(TQWidget*); diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index 5436496f..af2b14c2 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -182,7 +182,7 @@ void TKToolBarButton::setEnabled( bool enabled ) void TKToolBarButton::setText( const TQString& text) { d->m_text = text; - tqrepaint(false); + repaint(false); } void TKToolBarButton::setIcon( const TQString& icon ) @@ -281,7 +281,7 @@ void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle ) void TKToolBarButton::setRaised(bool f) { d->m_isRaised = f; - tqrepaint(false); + repaint(false); } void TKToolBarButton::setAutoRaised(bool f) @@ -308,7 +308,7 @@ void TKToolBarButton::enterEvent(TQEvent *) } else { TQToolButton::setPixmap(disabledPixmap); } - tqrepaint(false); + repaint(false); } } @@ -332,7 +332,7 @@ bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev) case TQEvent::Hide: on(false); setDown(false); - if ( !tqgeometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) + if ( !geometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) leaveEvent(0L); return false; break; @@ -409,7 +409,7 @@ void TKToolBarButton::paletteChange(const TQPalette &) TQToolButton::setPixmap( disabledPixmap ); else TQToolButton::setPixmap( defaultPixmap ); - tqrepaint(false); + repaint(false); } void TKToolBarButton::makeDefaultPixmap() @@ -502,7 +502,7 @@ void TKToolBarButton::slotToggled() void TKToolBarButton::on(bool flag) { d->m_isOn = flag; - tqrepaint(); + repaint(); } void TKToolBarButton::toggle() @@ -519,14 +519,14 @@ void TKToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); modeChange(); - tqrepaint(); + repaint(); } void TKToolBarButton::setIconMode( TK::IconMode m ) { d->m_iconMode = m; modeChange(); - tqrepaint(); + repaint(); } #include <tktoolbarbutton.moc> diff --git a/lib/kopainter/koColorSlider.cc b/lib/kopainter/koColorSlider.cc index 6c1f8230..6e7c0239 100644 --- a/lib/kopainter/koColorSlider.cc +++ b/lib/kopainter/koColorSlider.cc @@ -60,14 +60,14 @@ void KoColorFrame::slotSetColor1(const TQColor &c) mC1 = c; mColorChanged = true; mPixChanged = true; - tqrepaint(); + repaint(); } void KoColorFrame::slotSetColor2(const TQColor &c) { mC2 = c; mColorChanged = true; - tqrepaint(); + repaint(); } void KoColorFrame::drawContents(TQPainter *p) diff --git a/lib/kopainter/koIconChooser.cc b/lib/kopainter/koIconChooser.cc index 4604bbbd..7fa2f11b 100644 --- a/lib/kopainter/koIconChooser.cc +++ b/lib/kopainter/koIconChooser.cc @@ -166,7 +166,7 @@ void KoIconChooser::setCurrentItem(KoIconItem *item) mCurRow = index / mNCols; mCurCol = index % mNCols; - // tqrepaint the old and the new item + // repaint the old and the new item repaintCell(oldRow, oldCol); repaintCell(mCurRow, mCurCol); diff --git a/lib/kopainter/ko_hsv_widget.cc b/lib/kopainter/ko_hsv_widget.cc index 8b2e556c..9868dec8 100644 --- a/lib/kopainter/ko_hsv_widget.cc +++ b/lib/kopainter/ko_hsv_widget.cc @@ -236,7 +236,7 @@ void KoHSVWidget::update(const KoColor & fgColor, const KoColor & bgColor) mSIn->blockSignals(false); mVIn->blockSignals(false); m_VSelector->blockSignals(false); - m_VSelector->tqrepaint(false); + m_VSelector->repaint(false); m_colorwheel->blockSignals(false); } diff --git a/lib/kopalette/kopalettemanager.cc b/lib/kopalette/kopalettemanager.cc index 94ea8d4d..91d237a3 100644 --- a/lib/kopalette/kopalettemanager.cc +++ b/lib/kopalette/kopalettemanager.cc @@ -165,8 +165,8 @@ void KoPaletteManager::addWidget(TQWidget * widget, } KToggleAction * a; - a = new KToggleAction(i18n("Show %1").tqarg(widget->caption()), 0, m_mapper, TQT_SLOT(map()), m_actionCollection); - a->setCheckedState(i18n("Hide %1").tqarg(widget->caption())); + a = new KToggleAction(i18n("Show %1").arg(widget->caption()), 0, m_mapper, TQT_SLOT(map()), m_actionCollection); + a->setCheckedState(i18n("Hide %1").arg(widget->caption())); m_mapper->setMapping(a, m_widgetNames->count()); // This is the position at which we'll insert the action m_actions->insert( name, a ); diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 7f8bb11a..7040e885 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -233,7 +233,7 @@ Editor::fill() } } -// tqrepaint(); +// repaint(); if (firstChild()) { @@ -271,12 +271,12 @@ Editor::addItem(const TQCString &name, EditorItem *parent) // Create child items item->setOpen(true); - if(!property->tqchildren()) + if(!property->children()) return; last = 0; - TQValueList<Property*>::ConstIterator endIt = property->tqchildren()->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property->tqchildren()->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = property->children()->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property->children()->constBegin(); it != endIt; ++it) { //! \todo allow to have child prop with child items too if( *it && (*it)->isVisible() ) last = new EditorItem(this, item, *it, last); @@ -652,7 +652,7 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty) this, TQT_SLOT(slotWidgetRejectInput(Widget*)) ); } - //update tqgeometry earlier, because Widget::setValue() can depend on widget's tqgeometry + //update geometry earlier, because Widget::setValue() can depend on widget's geometry updateEditorGeometry(d->currentItem, widget); if(widget && (!widget->property() || changeWidgetProperty)) @@ -723,7 +723,7 @@ Editor::updateGroupLabelsPosition() TQRect r = itemRect((TQListViewItem*) group); if(group->label()) { group->label()->setGeometry(r); - group->label()->tqrepaint(); + group->label()->repaint(); } group = dynamic_cast<EditorGroupItem*>(group->nextSibling()); } @@ -748,7 +748,7 @@ Editor::showUndoButton( bool show ) return; int y = viewportToContents(TQPoint(0, itemRect(d->currentItem).y())).y(); - TQRect tqgeometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); + TQRect geometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); d->undoButton->resize(d->baseRowHeight, d->currentItem->height()); updateEditorGeometry(true, show); @@ -756,21 +756,21 @@ Editor::showUndoButton( bool show ) if (!show) { /* if (d->currentWidget) { if (d->currentWidget->leavesTheSpaceForRevertButton()) { - tqgeometry.setWidth(tqgeometry.width()-d->undoButton->width()); + geometry.setWidth(geometry.width()-d->undoButton->width()); } - d->currentWidget->resize(tqgeometry.width(), tqgeometry.height()); + d->currentWidget->resize(geometry.width(), geometry.height()); }*/ d->undoButton->hide(); return; } - TQPoint p = contentsToViewport(TQPoint(0, tqgeometry.y())); - d->undoButton->move(tqgeometry.x() + tqgeometry.width() + TQPoint p = contentsToViewport(TQPoint(0, geometry.y())); + d->undoButton->move(geometry.x() + geometry.width() -((d->currentWidget && d->currentWidget->hasBorders())?1:0)/*editor is moved by 1 to left*/ - d->undoButton->width(), p.y()); // if (d->currentWidget) { // d->currentWidget->move(d->currentWidget->x(), p.y()); -// d->currentWidget->resize(tqgeometry.width()-d->undoButton->width(), tqgeometry.height()); +// d->currentWidget->resize(geometry.width()-d->undoButton->width(), geometry.height()); // } d->undoButton->show(); } @@ -791,7 +791,7 @@ Editor::slotExpanded(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } void @@ -815,7 +815,7 @@ Editor::slotCollapsed(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } void @@ -826,7 +826,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) Q_UNUSED(newSize); /*for (TQListViewItemIterator it(this); it.current(); ++it) { if (section == 0 && dynamic_cast<EditorGroupItem*>(it.current())) { - it.current()->tqrepaint(); + it.current()->repaint(); } }*/ /* @@ -843,7 +843,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) } }*/ // repaintContents(); -// tqrepaint(); +// repaint(); updateEditorGeometry(); update(); } @@ -1021,7 +1021,7 @@ Editor::setSorting( int column, bool ascending ) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - tqrepaint(); + repaint(); } #include "editor.moc" diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index 8c34a5e3..0a431329 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -245,7 +245,7 @@ bool GroupContainer::event( TQEvent * e ) { d->contents->show(); else d->contents->hide(); - d->lyr->tqinvalidate(); + d->lyr->invalidate(); update(); } } diff --git a/lib/koproperty/editoritem.h b/lib/koproperty/editoritem.h index 9f2c75c2..fc703239 100644 --- a/lib/koproperty/editoritem.h +++ b/lib/koproperty/editoritem.h @@ -72,7 +72,7 @@ class EditorItem : public KListViewItem virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); /*! Reimplemented from KListViewItem to draw custom contents. It takes care of drawing the [+] and [-] - signs only if the item has tqchildren. + signs only if the item has children. */ virtual void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h); diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp index 61d44499..5ff0bb34 100644 --- a/lib/koproperty/editors/cursoredit.cpp +++ b/lib/koproperty/editors/cursoredit.cpp @@ -118,13 +118,13 @@ CursorEdit::value() const void CursorEdit::setValue(const TQVariant &value, bool emitChange) { - ComboBox::setValue(value.toCursor().tqshape(), emitChange); + ComboBox::setValue(value.toCursor().shape(), emitChange); } void CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { - ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape()); + ComboBox::drawViewer(p, cg, r, value.toCursor().shape()); } void diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index 17f6d508..d887a8cd 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -153,7 +153,7 @@ PixmapEdit::selectPixmapFileName() emit valueChanged(this); } #endif*/ - TQString caption( i18n("Insert Image From File (for \"%1\" property)").tqarg(property()->caption()) ); + TQString caption( i18n("Insert Image From File (for \"%1\" property)").arg(property()->caption()) ); #ifdef TQ_WS_WIN TQString recentDir; TQString fileName = TQFileDialog::getOpenFileName( diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp index fee52662..c47c854f 100644 --- a/lib/koproperty/editors/pointedit.cpp +++ b/lib/koproperty/editors/pointedit.cpp @@ -64,8 +64,8 @@ PointEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); - TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + m_edit->setText(TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); + TQToolTip::add(this, TQString("%1, %2").arg(value.toPoint().x()).arg(value.toPoint().y())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ PointEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, con { TQRect rect(r); rect.setBottom(r.bottom()+1); - Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); +// TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); } void diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index ba6fec49..3cebfea8 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -60,10 +60,10 @@ RectEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()). - tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); - TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()). - tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); + m_edit->setText(TQString(RECTEDIT_MASK).arg(value.toRect().x()). + arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); + TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()). + arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); if (emitChange) emit valueChanged(this); @@ -75,12 +75,12 @@ RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y()) - .tqarg(value.toRect().width()).tqarg(value.toRect().height())); + TQString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y()) + .arg(value.toRect().width()).arg(value.toRect().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()) -// .tqarg(value.toRect().width()).tqarg(value.toRect().height())); +// TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()) +// .arg(value.toRect().width()).arg(value.toRect().height())); } void diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp index 2fa29bc4..98075515 100644 --- a/lib/koproperty/editors/sizeedit.cpp +++ b/lib/koproperty/editors/sizeedit.cpp @@ -63,8 +63,8 @@ SizeEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); - TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height())); + m_edit->setText(TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); + TQToolTip::add(this, TQString("%1 x %2").arg(value.toSize().width()).arg(value.toSize().height())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ SizeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); + TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height())); +// TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); } void diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp index 7722d4a2..ba65a92f 100644 --- a/lib/koproperty/editors/sizepolicyedit.cpp +++ b/lib/koproperty/editors/sizepolicyedit.cpp @@ -77,9 +77,9 @@ void SizePolicyEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; - m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). - tqarg(findDescription(value.toSizePolicy().verData())). - tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); + m_edit->setText(TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). + arg(findDescription(value.toSizePolicy().verData())). + arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); TQToolTip::add(this, m_edit->text()); if (emitChange) @@ -94,9 +94,9 @@ SizePolicyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). - tqarg(findDescription(value.toSizePolicy().verData())). - tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); + TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). + arg(findDescription(value.toSizePolicy().verData())). + arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); } TQString diff --git a/lib/koproperty/editors/stringlistedit.cpp b/lib/koproperty/editors/stringlistedit.cpp index fe599e58..54f986c5 100644 --- a/lib/koproperty/editors/stringlistedit.cpp +++ b/lib/koproperty/editors/stringlistedit.cpp @@ -90,7 +90,7 @@ StringListEdit::showEditor() KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); - KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist"); + KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(property()->caption()), &dialog, "editlist"); dialog.setMainWidget(edit); edit->insertStringList(m_list); diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp index 1af1fcd1..65a7d951 100644 --- a/lib/koproperty/editors/symbolcombo.cpp +++ b/lib/koproperty/editors/symbolcombo.cpp @@ -61,7 +61,7 @@ TQVariant SymbolCombo::value() const { if (!(m_edit->text().isNull())) - return m_edit->text().tqat(0).tqunicode(); + return m_edit->text().at(0).tqunicode(); else return 0; } diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h index 8aca5538..f4b0cf36 100644 --- a/lib/koproperty/factory.h +++ b/lib/koproperty/factory.h @@ -81,7 +81,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties to create composed properties Use a composed property when you need more than one editor for a property. Examples are rect, size or point properties. - If you create a composed property, both parent and tqchildren properties must have custom + If you create a composed property, both parent and children properties must have custom (different) types. Child properties are created in CustomProperty constructor of the <b>parent</b> type, by adding CustomProperty::property() as parent in Property constructor.\n @@ -89,7 +89,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject parent's Property::setValue() should be called, making sure that useCustomProperty argument is set to false.\n Parent's handleValue() should be set to false, unless you cannot store the property in a TQVariant. - You just need to update tqchildren's value, making sure that useCustomProperty argument is set + You just need to update children's value, making sure that useCustomProperty argument is set to false. \section custom_editor Using Custom Editors @@ -105,7 +105,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties with value that cannot be stored in a TQVariant You then need to set handleValue() to true. The Widget you create also have to call directly CustomProperty member to store the value. just make sure you call emitPropertyChanged() - when the proerty value changes. Also make sure to avoid infinite recursion if you use tqchildren properties. + when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties. \author Cedric Pasteur <cedric.pasteur@free.fr> \author Alexander Dymo <cloudtemple@mskat.net> diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 49ca2b6c..6c4fa246 100644 --- a/lib/koproperty/property.cpp +++ b/lib/koproperty/property.cpp @@ -43,7 +43,7 @@ class PropertyPrivate : caption(0), listData(0), changed(false), storable(true), readOnly(false), visible(true), autosync(-1), custom(0), useCustomProperty(true), - sets(0), parent(0), tqchildren(0), relatedProperties(0), + sets(0), parent(0), children(0), relatedProperties(0), sortingKey(0) { } @@ -63,7 +63,7 @@ class PropertyPrivate delete caption; caption = 0; delete listData; - delete tqchildren; + delete children; delete relatedProperties; delete custom; delete sets; @@ -99,7 +99,7 @@ class PropertyPrivate // TQValueList<Set*> sets; Property *parent; - TQValueList<Property*> *tqchildren; + TQValueList<Property*> *children; //! list of properties with the same name (when intersecting buffers) TQValueList<Property*> *relatedProperties; @@ -564,9 +564,9 @@ Property::operator= (const Property &property) delete d->listData; d->listData = 0; } - if(d->tqchildren) { - delete d->tqchildren; - d->tqchildren = 0; + if(d->children) { + delete d->children; + d->children = 0; } if(d->relatedProperties) { delete d->relatedProperties; @@ -594,16 +594,16 @@ Property::operator= (const Property &property) } if(property.d->custom) { d->custom = FactoryManager::self()->createCustomProperty(this); - // updates all tqchildren value, using CustomProperty + // updates all children value, using CustomProperty setValue(property.value()); } else { d->value = property.d->value; - if(property.d->tqchildren) { - // no CustomProperty (should never happen), simply copy all tqchildren - d->tqchildren = new TQValueList<Property*>(); - TQValueList<Property*>::ConstIterator endIt = property.d->tqchildren->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property.d->tqchildren->constBegin(); it != endIt; ++it) { + if(property.d->children) { + // no CustomProperty (should never happen), simply copy all children + d->children = new TQValueList<Property*>(); + TQValueList<Property*>::ConstIterator endIt = property.d->children->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property.d->children->constBegin(); it != endIt; ++it) { Property *child = new Property( *(*it) ); addChild(child); } @@ -614,7 +614,7 @@ Property::operator= (const Property &property) d->relatedProperties = new TQValueList<Property*>( *(property.d->relatedProperties)); } - // update these later because they may have been changed when creating tqchildren + // update these later because they may have been changed when creating children d->oldValue = property.d->oldValue; d->changed = property.d->changed; d->sortingKey = property.d->sortingKey; @@ -631,16 +631,16 @@ Property::operator ==(const Property &prop) const ///////////////////////////////////////////////////////////////// const TQValueList<Property*>* -Property::tqchildren() const +Property::children() const { - return d->tqchildren; + return d->children; } Property* Property::child(const TQCString &name) { - TQValueList<Property*>::ConstIterator endIt = d->tqchildren->constEnd(); - for(TQValueList<Property*>::ConstIterator it = d->tqchildren->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = d->children->constEnd(); + for(TQValueList<Property*>::ConstIterator it = d->children->constBegin(); it != endIt; ++it) { if((*it)->name() == name) return *it; } @@ -659,11 +659,11 @@ Property::addChild(Property *prop) if (!prop) return; - if(!d->tqchildren || tqFind( d->tqchildren->begin(), d->tqchildren->end(), prop) == d->tqchildren->end()) { // not in our list - if(!d->tqchildren) - d->tqchildren = new TQValueList<Property*>(); - d->tqchildren->append(prop); - prop->setSortingKey(d->tqchildren->count()); + if(!d->children || tqFind( d->children->begin(), d->children->end(), prop) == d->children->end()) { // not in our list + if(!d->children) + d->children = new TQValueList<Property*>(); + d->children->append(prop); + prop->setSortingKey(d->children->count()); prop->d->parent = this; } else { diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index bc8a503e..5f61ff6b 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -306,9 +306,9 @@ class KOPROPERTY_EXPORT Property /*! \return property icon's string. Can be empty. */ TQString icon() const; - /*! \return a list of all tqchildren for this property, or NULL of there - is no tqchildren for this property */ - const TQValueList<Property*>* tqchildren() const; + /*! \return a list of all children for this property, or NULL of there + is no children for this property */ + const TQValueList<Property*>* children() const; /*! \return a child property for \a name, or NULL if there is no property with that name. */ Property* child(const TQCString &name); @@ -407,7 +407,7 @@ class KOPROPERTY_EXPORT Property protected: /*! Adds \a prop as a child of this property. - The tqchildren will be owned by this property. */ + The children will be owned by this property. */ void addChild(Property *prop); /*! Adds \a set to this property. */ diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp index c026aad0..1c4678c9 100644 --- a/lib/koproperty/test/test.cpp +++ b/lib/koproperty/test/test.cpp @@ -89,7 +89,7 @@ Test::Test() group = "ComplexGroup"; m_set->setGroupDescription(group, "Complex Group"); } - m_set->addProperty(new Property("Rect", this->tqgeometry(),"Rect"), group); + m_set->addProperty(new Property("Rect", this->geometry(),"Rect"), group); m_set->addProperty(new Property("Point", TQPoint(3,4), "Point"), group); m_set->addProperty(new Property("Size", TQPoint(3,4), "Size"), group); diff --git a/lib/kotext/IsoDuration.h b/lib/kotext/IsoDuration.h index c0f8fd6f..ee1cdfb9 100644 --- a/lib/kotext/IsoDuration.h +++ b/lib/kotext/IsoDuration.h @@ -31,7 +31,7 @@ static TQString minutesToISODuration( int mn ) { bool neg = mn < 0; // PT == period of time - see ISO8601 - TQString str = TQString::fromLatin1( "PT00H%1M00S" ).tqarg( TQABS( mn ) ); + TQString str = TQString::fromLatin1( "PT00H%1M00S" ).arg( TQABS( mn ) ); if ( neg ) str.prepend( '-' ); return str; @@ -41,7 +41,7 @@ static TQString daysToISODuration( int days ) { bool neg = days < 0; // P == period, time is ommitted - see ISO8601 - TQString str = TQString::fromLatin1( "P%1D" ).tqarg( TQABS( days ) ); + TQString str = TQString::fromLatin1( "P%1D" ).arg( TQABS( days ) ); if ( neg ) str.prepend( '-' ); return str; diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index edefb8e5..393488c9 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -654,7 +654,7 @@ void KFontChooser_local::setupDisplay() void KFontChooser_local::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; - TQStringList lstSys(dbase.tqfamilies()); + TQStringList lstSys(dbase.families()); // if we have criteria; then check fonts before adding if (fontListCriteria) diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index f2c88bcc..7ca6f1a7 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -952,7 +952,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para TQChar ch = new_wordlist.first().at(i); for (TQStringList::ConstIterator it = new_wordlist.begin(); it != new_wordlist.end(); ++it ) { - if ( (*it).tqat(i).lower() != ch.lower() ) + if ( (*it).at(i).lower() != ch.lower() ) { word = (*it).left(i); //the completion word is truncated here //kdDebug() << "set the word completion to:" << word << endl; @@ -1778,7 +1778,7 @@ void KoAutoFormat::doAutoDetectUrl( KoTextCursor *textEditCursor, KoTextParag *p txtObj->insert( textEditCursor, lastFormat, KoTextObject::customItemChar(), i18n("Insert Variable"), KoTextDocument::HighlightSelection, KoTextObject::DefaultInsertFlags, customItemsMap ); var->recalc(); - parag->tqinvalidate(0); + parag->invalidate(0); parag->setChanged( true ); // adjust index @@ -1819,7 +1819,7 @@ void KoAutoFormat::doAutoIncludeUpperUpper(KoTextCursor* /*textEditCursor*/, KoT break; word.append( ch ); } - if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.tqat(3)!=word.tqat(3).upper() ) + if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.at(3)!=word.at(3).upper() ) { if ( m_twoUpperLetterException.findIndex(word )==-1) m_twoUpperLetterException.append( word); @@ -1856,7 +1856,7 @@ void KoAutoFormat::doAutoIncludeAbbreviation(KoTextCursor* /*textEditCursor*/, K break; wordAfter.append( ch ); } - if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.tqat(0)==wordAfter.tqat(0).lower()) + if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.at(0)==wordAfter.at(0).lower()) { if ( m_upperCaseExceptions.findIndex(word )==-1) m_upperCaseExceptions.append( word ); @@ -2158,14 +2158,14 @@ KCommand *KoAutoFormat::doCapitalizeNameOfDays( KoTextCursor* textEditCursor, Ko TQString replaceStr= m_cacheNameOfDays[pos]; int start = index - replaceStr.length(); int length = replaceStr.length(); - if( word.tqat(0).isLetter() && word.tqat(0)==word.tqat(0).lower() ) + if( word.at(0).isLetter() && word.at(0)==word.at(0).lower() ) { KoTextCursor cursor( parag->document() ); cursor.setParag( parag ); cursor.setIndex( start ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( start + length ); - TQString replacement = replaceStr.tqat(0).upper() + replaceStr.right( length-1 ); + TQString replacement = replaceStr.at(0).upper() + replaceStr.right( length-1 ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); TQString cmdName=i18n("Capitalize Name of Days"); KCommand *cmd =txtObj->replaceSelectionCommand( textEditCursor, replacement, diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index ddcfb1ae..74b35908 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -286,7 +286,7 @@ void KoAutoFormatDia::setupTab1() cbAutoReplaceNumber=new TQCheckBox( tab1 ); cbAutoReplaceNumber->setText( i18n( "We add the 1/2 char at the %1", "Re&place 1/2... with %1..." ) - .tqarg( TQString( "�" ) ) ); + .arg( TQString( "�" ) ) ); TQWhatsThis::add( cbAutoReplaceNumber, i18n( "Most standard fraction notations will be converted when available" ) ); diff --git a/lib/kotext/KoBgSpellCheck.cpp b/lib/kotext/KoBgSpellCheck.cpp index f3b8928b..612f0be7 100644 --- a/lib/kotext/KoBgSpellCheck.cpp +++ b/lib/kotext/KoBgSpellCheck.cpp @@ -135,7 +135,7 @@ void KoBgSpellCheck::spellCheckerMisspelling( const TQString &old, int pos ) #endif markWord( parag, pos, old.length(), true ); // Repaint immediately, since the checking is timer-based (slow), it looks - // slow (chunky) if we only tqrepaint once a paragraph is completely done. + // slow (chunky) if we only repaint once a paragraph is completely done. parag->document()->emitRepaintChanged(); if ( d->startupChecking && d->marked > delayAfterMarked ) { @@ -171,7 +171,7 @@ void KoBgSpellCheck::markWord( KoTextParag* parag, int pos, int length, bool mis #endif parag->setFormat( pos, length, &format, true, KoTextFormat::Misspelled ); parag->setChanged( true ); - // don't tqrepaint here, in the slotParagraphModified case we want to tqrepaint only once at the end + // don't repaint here, in the slotParagraphModified case we want to repaint only once at the end } void KoBgSpellCheck::checkerContinue() diff --git a/lib/kotext/KoCommentDia.cpp b/lib/kotext/KoCommentDia.cpp index be5278e1..9882e6de 100644 --- a/lib/kotext/KoCommentDia.cpp +++ b/lib/kotext/KoCommentDia.cpp @@ -66,7 +66,7 @@ void KoCommentDia::slotAddAuthorName() { TQString date = KGlobal::locale()->formatDate( TQDate::currentDate() ); TQString time = KGlobal::locale()->formatTime( TQTime::currentTime() ); - TQString result = TQString("--------%1 ,%2, %3------\n").tqarg(authorName).tqarg(date).tqarg(time); + TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time); m_multiLine->insertLine( result, m_multiLine->numLines() ); } diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 981ec506..96ff88e1 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -65,8 +65,8 @@ KoBidiContext::~KoBidiContext() delete parent; } -static TQChar *tqshapeBuffer = 0; -static int tqshapeBufSize = 0; +static TQChar *shapeBuffer = 0; +static int shapeBufSize = 0; /* Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on @@ -103,7 +103,7 @@ static int tqshapeBufSize = 0; */ /* - Two small helper functions for arabic shaping. They get the next tqshape causing character on either + Two small helper functions for arabic shaping. They get the next shape causing character on either side of the char in question. Implements rule R1. leftChar() returns true if the char to the left is a left join-causing char @@ -159,7 +159,7 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos) switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change tqshape + // these don't change shape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -204,7 +204,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change tqshape + // these don't change shape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -233,7 +233,7 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in // does only presentation forms B at the moment, but that should be enough for // simple display static const ushort arabicUnicodeMapping[256][2] = { - // base of tqshaped forms, and number-1 of them ( 0 for non shaping, + // base of shaped forms, and number-1 of them ( 0 for non shaping, // 1 for right binding and 3 for dual binding { 0x0600, 0 }, // 0x600 { 0x0601, 0 }, // 0x601 @@ -355,7 +355,7 @@ static const ushort arabicUnicodeMapping[256][2] = { { 0x066e, 0 }, // 0x66e { 0x066f, 0 }, // 0x66f - // ### some glyphs do not have tqshaped mappings in the presentation forms A. + // ### some glyphs do not have shaped mappings in the presentation forms A. // these have the shaping set to 0 for the moment. Will have to find out better mappings for them. { 0x0670, 0 }, // 0x670 { 0xfb50, 1 }, // 0x671 R Alef Wasla @@ -512,7 +512,7 @@ static const ushort arabicUnicodeMapping[256][2] = { }; -// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the tqshape +// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the shape // of the lam can be either initial of medial. So initial maps to the isolated form of the ligature, // medial to the final form static const ushort arabicUnicodeLamAlefMapping[6][4] = { @@ -524,14 +524,14 @@ static const ushort arabicUnicodeLamAlefMapping[6][4] = { { 0xfffd, 0xfffd, 0xfefb, 0xfefc } // 0x627 R Alef }; -static inline int getShape( const TQChar * /* base */, uchar cell, int tqshape, +static inline int getShape( const TQChar * /* base */, uchar cell, int shape, const TQFontMetrics * /* fm */ ) { - uint ch = arabicUnicodeMapping[cell][0] + tqshape; + uint ch = arabicUnicodeMapping[cell][0] + shape; /* - // we revert to the untqshaped glyph in case the tqshaped version doesn't exist + // we revert to the unshaped glyph in case the shaped version doesn't exist if ( fm && !fm->inFont( ch ) ) { - switch( tqshape ) { + switch( shape ) { case KoComplexText::XIsolated: break; // try base form case KoComplexText::XFinal: @@ -551,7 +551,7 @@ static inline int getShape( const TQChar * /* base */, uchar cell, int tqshape, return ch; } -TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) +TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) { if( len < 0 ) len = uc.length() - from; @@ -575,16 +575,16 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } if ( len == 0 ) return TQString(); - if( !tqshapeBuffer || len > tqshapeBufSize ) { - if( tqshapeBuffer ) free( (void *) tqshapeBuffer ); - tqshapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); -// delete [] tqshapeBuffer; -// tqshapeBuffer = new TQChar[ len + 1]; - tqshapeBufSize = len; + if( !shapeBuffer || len > shapeBufSize ) { + if( shapeBuffer ) free( (void *) shapeBuffer ); + shapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); +// delete [] shapeBuffer; +// shapeBuffer = new TQChar[ len + 1]; + shapeBufSize = len; } int lenOut = 0; - TQChar *data = tqshapeBuffer; + TQChar *data = shapeBuffer; if ( dir == TQPainter::RTL ) ch += len - 1; for ( int i = 0; i < len; i++ ) { @@ -601,8 +601,8 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ int pos = i + from; if ( dir == TQPainter::RTL ) pos = from + len - 1 - i; - int tqshape = glyphVariantLogical( uc, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; + int shape = glyphVariantLogical( uc, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // take care of lam-alef ligatures (lam right of alef) ushort map; switch ( c ) { @@ -615,7 +615,7 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ case 0x25: case 0x27: //kdDebug() << " lam of lam-alef ligature" << endl; - map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][tqshape]; + map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][shape]; goto next; default: break; @@ -635,7 +635,7 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ default: break; } - map = getShape( ch, c, tqshape, fm ); + map = getShape( ch, c, shape, fm ); next: *data = map; data++; @@ -649,11 +649,11 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } if ( dir == TQPainter::Auto && !uc.simpleText() ) { - return bidiReorderString( TQConstString( tqshapeBuffer, lenOut ).string() ); + return bidiReorderString( TQConstString( shapeBuffer, lenOut ).string() ); } if ( dir == TQPainter::RTL ) { // reverses the non spacing marks to be again after the base char - TQChar *s = tqshapeBuffer; + TQChar *s = shapeBuffer; int i = 0; while ( i < lenOut ) { if ( s->combiningClass() != 0 ) { @@ -684,17 +684,17 @@ TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQ } } - return TQConstString( tqshapeBuffer, lenOut ).string(); + return TQConstString( shapeBuffer, lenOut ).string(); } -TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) +TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) { const TQChar *ch = str.tqunicode() + pos; if ( ch->row() != 0x06 ) return *ch; else { - int tqshape = glyphVariantLogical( str, pos ); - //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; + int shape = glyphVariantLogical( str, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; // lam aleph ligatures switch ( ch->cell() ) { case 0x44: { // lam @@ -705,7 +705,7 @@ TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQF case 0x23: case 0x25: case 0x27: - return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][tqshape]); + return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][shape]); default: break; } @@ -722,7 +722,7 @@ TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQF default: break; } - return TQChar( getShape( ch, ch->cell(), tqshape, fm ) ); + return TQChar( getShape( ch, ch->cell(), shape, fm ) ); } } @@ -739,7 +739,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str if ( !nmarks ) return TQPointArray(); - TQChar baseChar = KoComplexText::tqshapedCharacter( str, pos ); + TQChar baseChar = KoComplexText::shapedCharacter( str, pos ); TQRect baseRect = f->boundingRect( baseChar ); int baseOffset = f->textWidth( str, pos, 1 ); diff --git a/lib/kotext/KoComplexText.h b/lib/kotext/KoComplexText.h index 7f75d730..8a22d152 100644 --- a/lib/kotext/KoComplexText.h +++ b/lib/kotext/KoComplexText.h @@ -115,8 +115,8 @@ public: static Shape glyphVariant( const TQString &str, int pos); static Shape glyphVariantLogical( const TQString &str, int pos); - static TQString tqshapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); - static TQChar tqshapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); + static TQString shapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); + static TQChar shapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); // positions non spacing marks relative to the base character at position pos. //static TQPointArray positionMarks( TQFontPrivate *f, const TQString &str, int pos, TQRect *boundingRect = 0 ); diff --git a/lib/kotext/KoImportStyleDia.cpp b/lib/kotext/KoImportStyleDia.cpp index 327dbe53..6d9d57d6 100644 --- a/lib/kotext/KoImportStyleDia.cpp +++ b/lib/kotext/KoImportStyleDia.cpp @@ -98,7 +98,7 @@ TQString KoImportStyleDia::generateStyleName( const TQString & templateName ) co int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = m_currentCollection->findStyle( name ) != 0; ++num; } while ( exists ); @@ -111,7 +111,7 @@ TQString KoImportStyleDia::generateStyleDisplayName( const TQString & templateNa int num = 1; bool exists; do { - name = templateName.tqarg( num ); + name = templateName.arg( num ); exists = m_currentCollection->findStyleByDisplayName( name ) != 0; ++num; } while ( exists ); diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 0de6ee87..56adc3a2 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -43,7 +43,7 @@ KoParagCounter::KoParagCounter() m_customBulletChar = TQChar( '-' ); m_customBulletFont = TQString(); m_align = TQt::AlignAuto; - tqinvalidate(); + invalidate(); } bool KoParagCounter::operator==( const KoParagCounter & c2 ) const @@ -83,7 +83,7 @@ unsigned int KoParagCounter::depth() const return m_depth; } -void KoParagCounter::tqinvalidate() +void KoParagCounter::invalidate() { m_cache.number = -1; m_cache.text = TQString(); @@ -144,7 +144,7 @@ void KoParagCounter::load( TQDomElement & element ) m_align = element.attribute("align", "0").toInt(); //AlignAuto as defeult TQString restart = element.attribute("restart"); m_restartCounter = (restart == "true") || (restart == "1"); - tqinvalidate(); + invalidate(); } static int importCounterType( TQChar numFormat ) @@ -259,7 +259,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_DISCBULLET; } } - tqinvalidate(); + invalidate(); } void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const @@ -326,7 +326,7 @@ void KoParagCounter::saveOasisListLevel( KoXmlWriter& listLevelWriter, bool incl listLevelWriter.startElement( "style:list-level-properties" ); listLevelWriter.addAttribute( "fo:text-align", KoParagLayout::saveOasisAlignment( (TQt::AlignmentFlags)m_align ) ); // OASIS has other style properties: text:space-before (indent), text:min-label-width (TODO), - // text:min-label-distance, style:font-name (for bullets), image size and vertical tqalignment. + // text:min-label-distance, style:font-name (for bullets), image size and vertical alignment. listLevelWriter.endElement(); // style:list-level-properties } } @@ -531,66 +531,66 @@ void KoParagCounter::save( TQDomElement & element ) void KoParagCounter::setCustom( TQString c ) { m_custom = c; - tqinvalidate(); + invalidate(); } void KoParagCounter::setCustomBulletCharacter( TQChar c ) { m_customBulletChar = c; - tqinvalidate(); + invalidate(); } void KoParagCounter::setCustomBulletFont( TQString f ) { m_customBulletFont = f; - tqinvalidate(); + invalidate(); } void KoParagCounter::setDepth( unsigned int d ) { m_depth = d; - tqinvalidate(); + invalidate(); } void KoParagCounter::setNumbering( Numbering n ) { m_numbering = n; - tqinvalidate(); + invalidate(); } void KoParagCounter::setPrefix( TQString p ) { m_prefix = p; - tqinvalidate(); + invalidate(); } void KoParagCounter::setStartNumber( int s ) { m_startNumber = s; - tqinvalidate(); + invalidate(); } void KoParagCounter::setDisplayLevels( int l ) { m_displayLevels = l; - tqinvalidate(); + invalidate(); } void KoParagCounter::setAlignment( int a ) { m_align = a; - tqinvalidate(); + invalidate(); } void KoParagCounter::setStyle( Style s ) { m_style = s; - tqinvalidate(); + invalidate(); } void KoParagCounter::setSuffix( TQString s ) { m_suffix = s; - tqinvalidate(); + invalidate(); } int KoParagCounter::startNumber() const @@ -603,7 +603,7 @@ int KoParagCounter::displayLevels() const return m_displayLevels; } -int KoParagCounter::tqalignment() const +int KoParagCounter::alignment() const { return m_align; } @@ -626,7 +626,7 @@ bool KoParagCounter::restartCounter() const void KoParagCounter::setRestartCounter( bool restart ) { m_restartCounter = restart; - tqinvalidate(); + invalidate(); } // Return the text for that level only diff --git a/lib/kotext/KoParagCounter.h b/lib/kotext/KoParagCounter.h index 6758d952..d45b2435 100644 --- a/lib/kotext/KoParagCounter.h +++ b/lib/kotext/KoParagCounter.h @@ -40,7 +40,7 @@ public: /** Invalidate the internal cache. Use it whenever the number associated with this * counter may have changed. */ - void tqinvalidate(); + void invalidate(); /** Return the current value of the counter as a number. */ @@ -172,9 +172,9 @@ public: TQString custom() const; void setCustom( TQString c ); - /** Counter tqalignment + /** Counter alignment */ - int tqalignment() const; + int alignment() const; void setAlignment( int a ); /** diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index 13c48350..1d424b27 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -129,7 +129,7 @@ KoCounterStyleWidget::KoCounterStyleWidget( bool displayDepth, bool onlyStyleTyp grid->addWidget( spnStart, 2, 2); lAlignment = new TQLabel( gStyle, "lAlignment" ); - lAlignment->setText( i18n( "Counter tqalignment:" ) ); + lAlignment->setText( i18n( "Counter alignment:" ) ); grid->addWidget( lAlignment, 2, 3 ); cbAlignment = new KComboBox( gStyle, "cbAlignment" ); @@ -296,11 +296,11 @@ void KoCounterStyleWidget::displayStyle( KoParagCounter::Style style ) spnStart->setValue( m_counter.startNumber() ); cbRestart->setChecked( m_counter.restartCounter() ); - if(m_counter.tqalignment()==TQt::AlignLeft) + if(m_counter.alignment()==TQt::AlignLeft) cbAlignment->setCurrentText(i18n("Align Left")); - else if(m_counter.tqalignment()==TQt::AlignRight) + else if(m_counter.alignment()==TQt::AlignRight) cbAlignment->setCurrentText(i18n("Align Right")); - else if(m_counter.tqalignment()==TQt::AlignAuto) + else if(m_counter.alignment()==TQt::AlignAuto) cbAlignment->setCurrentText(i18n("Align Auto")); else kdError()<<"Not Implemented"<<endl; @@ -812,14 +812,14 @@ void KoStylePreview::setCounter( const KoParagCounter & counter ) { KoTextParag * parag = m_textdoc->firstParag(); parag->setCounter( counter ); - tqrepaint( true ); + repaint( true ); } void KoStylePreview::setStyle( KoParagStyle * style ) { KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( style ); - tqrepaint(true); + repaint(true); } void KoStylePreview::drawContents( TQPainter *painter ) @@ -839,13 +839,13 @@ void KoStylePreview::drawContents( TQPainter *painter ) { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->tqinvalidate(0); + parag->invalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag tqalignment working, + // Center vertically, but not horizontally, to keep the parag alignment working, textRect.moveTopLeft( TQPoint( whiteRect.x(), whiteRect.y() + ( whiteRect.height() - textRect.height() ) / 2 ) ); // Move it from the left border a little @@ -879,8 +879,8 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW frameWidth=9999; } else { length=i18n("Frame width: %1 %2") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } @@ -938,9 +938,9 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW cSpacing->insertItem( i18n( "Line spacing value", "1.5 Lines" ) ); cSpacing->insertItem( i18n( "Line spacing value", "Double" ) ); cSpacing->insertItem( i18n( "Proportional") ); // LS_MULTIPLE, called Proportional like in OO - cSpacing->insertItem( i18n( "Line Distance (%1)" ).tqarg(unitName) ); // LS_CUSTOM - cSpacing->insertItem( i18n( "At Least (%1)" ).tqarg(unitName) ); - cSpacing->insertItem( i18n( "Fixed (%1)").tqarg(unitName) ); // LS_FIXED + cSpacing->insertItem( i18n( "Line Distance (%1)" ).arg(unitName) ); // LS_CUSTOM + cSpacing->insertItem( i18n( "At Least (%1)" ).arg(unitName) ); + cSpacing->insertItem( i18n( "Fixed (%1)").arg(unitName) ); // LS_FIXED connect( cSpacing, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( spacingActivated( int ) ) ); spacingGrid->addWidget( cSpacing, 1, 0 ); @@ -1273,7 +1273,7 @@ int KoParagAlignWidget::pageBreaking() const void KoParagAlignWidget::display( const KoParagLayout & lay ) { - int align = lay.tqalignment; + int align = lay.alignment; prev2->setAlign( align ); clearAligns(); @@ -1302,7 +1302,7 @@ void KoParagAlignWidget::display( const KoParagLayout & lay ) void KoParagAlignWidget::save( KoParagLayout & lay ) { - lay.tqalignment = align(); + lay.alignment = align(); lay.pageBreaking = pageBreaking(); } @@ -1705,7 +1705,7 @@ void KoParagCounterWidget::display( const KoParagLayout & lay ) { void KoParagCounterWidget::updatePreview() { preview->setCounter(m_counter); - preview->tqrepaint(true); + preview->repaint(true); } void KoParagCounterWidget::save( KoParagLayout & lay ) { @@ -1746,8 +1746,8 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram } else { m_toplimit=frameWidth; length=i18n("Frame width: %1 %2") - .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .tqarg(KoUnit::unitName(m_unit)); + .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .arg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } TQVBoxLayout* Form1Layout = new TQVBoxLayout( this ); @@ -2272,7 +2272,7 @@ KoParagLayout KoParagDia::paragLayout() const newLayout.setLineSpacingValue( lineSpacing() ); newLayout.lineSpacingType = lineSpacingType(); newLayout.setTabList( tabListTabulator() ); - newLayout.tqalignment = align(); + newLayout.alignment = align(); newLayout.margins[TQStyleSheetItem::MarginFirstLine] = firstLineIndent(); newLayout.margins[TQStyleSheetItem::MarginLeft] = leftIndent(); newLayout.margins[TQStyleSheetItem::MarginRight] = rightIndent(); diff --git a/lib/kotext/KoParagDia.h b/lib/kotext/KoParagDia.h index 26f68e0b..443bb62f 100644 --- a/lib/kotext/KoParagDia.h +++ b/lib/kotext/KoParagDia.h @@ -147,7 +147,7 @@ private: }; /** - * The widget for editing paragraph tqalignment (tab 2) + * The widget for editing paragraph alignment (tab 2) */ class KOTEXT_EXPORT KoParagAlignWidget : public KoParagLayoutWidget { @@ -549,7 +549,7 @@ public: TQColor backgroundColor() const { return m_decorationsWidget->backgroundColor(); } // Support for "what has changed?" - bool isAlignChanged() const {return oldLayout.tqalignment!=align();} + bool isAlignChanged() const {return oldLayout.alignment!=align();} bool isLineSpacingChanged() const { return (oldLayout.lineSpacingValue() !=lineSpacing() || oldLayout.lineSpacingType != lineSpacingType()); diff --git a/lib/kotext/KoParagDia_p.h b/lib/kotext/KoParagDia_p.h index a1ca5737..48f77ea1 100644 --- a/lib/kotext/KoParagDia_p.h +++ b/lib/kotext/KoParagDia_p.h @@ -66,17 +66,17 @@ public: ~KPagePreview() {} void setLeft( double _left ) - { left = _left; tqrepaint( false ); } + { left = _left; repaint( false ); } void setRight( double _right ) - { right = _right; tqrepaint( false ); } + { right = _right; repaint( false ); } void setFirst( double _first ) - { first = _first; tqrepaint( false ); } + { first = _first; repaint( false ); } void setSpacing( double _spacing ) - { spacing = _spacing; tqrepaint( false ); } + { spacing = _spacing; repaint( false ); } void setBefore( double _before ) - { before = _before; tqrepaint( false ); } + { before = _before; repaint( false ); } void setAfter( double _after ) - { after = _after; tqrepaint( false ); } + { after = _after; repaint( false ); } protected: void drawContents( TQPainter* ); @@ -100,7 +100,7 @@ public: ~KPagePreview2() {} void setAlign( int _align ) - { align = _align; tqrepaint( false ); } + { align = _align; repaint( false ); } protected: void drawContents( TQPainter* ); @@ -124,16 +124,16 @@ public: KoBorder leftBorder()const { return m_leftBorder; } void setLeftBorder( const KoBorder& _leftBorder ) - { m_leftBorder = _leftBorder; tqrepaint( true ); } + { m_leftBorder = _leftBorder; repaint( true ); } KoBorder rightBorder() const { return m_rightBorder; } void setRightBorder( const KoBorder& _rightBorder ) - { m_rightBorder = _rightBorder; tqrepaint( true ); } + { m_rightBorder = _rightBorder; repaint( true ); } KoBorder topBorder()const { return m_topBorder; } void setTopBorder( const KoBorder& _topBorder ) - { m_topBorder = _topBorder; tqrepaint( true ); } + { m_topBorder = _topBorder; repaint( true ); } KoBorder bottomBorder()const { return m_bottomBorder; } void setBottomBorder( const KoBorder& _bottomBorder ) - { m_bottomBorder = _bottomBorder; tqrepaint( true ); } + { m_bottomBorder = _bottomBorder; repaint( true ); } void setBorder( KoBorder::BorderType which, const KoBorder& border); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index fd1a9453..8e5178a5 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -46,7 +46,7 @@ KoParagLayout::KoParagLayout() void KoParagLayout::operator=( const KoParagLayout &tqlayout ) { - tqalignment = tqlayout.tqalignment; + alignment = tqlayout.alignment; for ( int i = 0 ; i < 5 ; ++i ) margins[i] = tqlayout.margins[i]; pageBreaking = tqlayout.pageBreaking; @@ -70,7 +70,7 @@ void KoParagLayout::operator=( const KoParagLayout &tqlayout ) int KoParagLayout::compare( const KoParagLayout & tqlayout ) const { int flags = 0; - if ( tqalignment != tqlayout.tqalignment ) + if ( alignment != tqlayout.alignment ) flags |= Alignment; for ( int i = 0 ; i < 5 ; ++i ) if ( margins[i] != tqlayout.margins[i] ) @@ -119,7 +119,7 @@ int KoParagLayout::compare( const KoParagLayout & tqlayout ) const void KoParagLayout::initialise() { - tqalignment = TQt::AlignAuto; + alignment = TQt::AlignAuto; for ( int i = 0 ; i < 5 ; ++i ) // use memset ? margins[i] = 0; lineSpacingType = LS_SINGLE; @@ -172,14 +172,14 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement } qHeapSort( tabList ); tqlayout.setTabList( tabList ); - tqlayout.tqalignment = TQt::AlignAuto; - element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally + tqlayout.alignment = TQt::AlignAuto; + element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD if ( !flow.isEmpty() ) { - tqlayout.tqalignment = flow=="right" ? TQt::AlignRight : + tqlayout.alignment = flow=="right" ? TQt::AlignRight : flow=="center" ? TQt::AlignHCenter : flow=="justify" ? TQt::AlignJustify : flow=="left" ? TQt::AlignLeft : TQt::AlignAuto; @@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement flow = element.attribute( "value" ); // KWord-0.8 static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify }; if ( !flow.isEmpty() && flow.toInt() < 4 ) - tqlayout.tqalignment = flow2align[flow.toInt()]; + tqlayout.alignment = flow2align[flow.toInt()]; } } @@ -425,12 +425,12 @@ TQt::AlignmentFlags KoParagLayout::loadOasisAlignment( const TQCString& str ) } //static -TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags tqalignment ) +TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment ) { - return tqalignment == TQt::AlignLeft ? "left" : - tqalignment == TQt::AlignRight ? "right" : - tqalignment == TQt::AlignHCenter ? "center" : - tqalignment == TQt::AlignJustify ? "justify" : + return alignment == TQt::AlignLeft ? "left" : + alignment == TQt::AlignRight ? "right" : + alignment == TQt::AlignHCenter ? "center" : + alignment == TQt::AlignJustify ? "justify" : "start"; // i.e. direction-dependent } @@ -443,7 +443,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex // code from OoWriterImport::writeLayout if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) { TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1(); - tqlayout.tqalignment = loadOasisAlignment( align ); + tqlayout.alignment = loadOasisAlignment( align ); } if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode @@ -549,7 +549,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex TQString delimiterChar = tabStop.attributeNS( KoXmlNS::style, "char", TQString() ); // single character if ( !delimiterChar.isEmpty() ) tab.alignChar = delimiterChar[0]; - tab.type = T_DEC_PNT; // "tqalignment on decimal point" + tab.type = T_DEC_PNT; // "alignment on decimal point" } else //if ( type == "left" ) tab.type = T_LEFT; @@ -658,7 +658,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContex } } -void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment ) const +void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const { const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) TQDomDocument doc = parentElem.ownerDocument(); @@ -672,10 +672,10 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment element = doc.createElement( "FLOW" ); parentElem.appendChild( element ); - element.setAttribute( "align", tqalignment==TQt::AlignRight ? "right" : - tqalignment==TQt::AlignHCenter ? "center" : - tqalignment==TQt::AlignJustify ? "justify" : - tqalignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. + element.setAttribute( "align", alignment==TQt::AlignRight ? "right" : + alignment==TQt::AlignHCenter ? "center" : + alignment==TQt::AlignJustify ? "justify" : + alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR ) element.setAttribute( "dir", "R" ); @@ -806,7 +806,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const { - gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)tqalignment ).data() ); + gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)alignment ).data() ); // Don't save the direction for a style, if "auto", so that the // auto-determination of direction based on first char, works. if ( !savingStyle || (TQChar::Direction) direction != TQChar::DirON ) @@ -863,7 +863,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "tqalignment on decimal point" + case T_DEC_PNT: // "alignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); if ( !(*it).alignChar.isNull() ) tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); diff --git a/lib/kotext/KoParagLayout.h b/lib/kotext/KoParagLayout.h index 2c9b9dea..c0582b19 100644 --- a/lib/kotext/KoParagLayout.h +++ b/lib/kotext/KoParagLayout.h @@ -96,7 +96,7 @@ public: char pageBreaking; // Page breaking flags char direction; // TQChar::Direction /// Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify) - char tqalignment; // TQt::AlignmentFlags + char alignment; // TQt::AlignmentFlags KoBorder leftBorder, rightBorder, topBorder, bottomBorder; /// The background color of the paragraph @@ -135,7 +135,7 @@ public: /** Save this parag tqlayout to XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ - void saveParagLayout( TQDomElement & parentElem, int tqalignment ) const; + void saveParagLayout( TQDomElement & parentElem, int alignment ) const; /** Load this parag tqlayout from XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. @@ -151,10 +151,10 @@ public: /// @param context the current context void saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const; - /// Convert an tqalignment string into an tqalignment flag (load) + /// Convert an alignment string into an alignment flag (load) static TQt::AlignmentFlags loadOasisAlignment( const TQCString& str ); - /// Convert an tqalignment flag into an tqalignment string (save) - static TQCString saveOasisAlignment( TQt::AlignmentFlags tqalignment ); + /// Convert an alignment flag into an alignment string (save) + static TQCString saveOasisAlignment( TQt::AlignmentFlags alignment ); private: static int getAttribute(const TQDomElement &element, const char *attributeName, int defaultValue) { diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp index a68c6768..b09fe90e 100644 --- a/lib/kotext/KoParagStyle.cpp +++ b/lib/kotext/KoParagStyle.cpp @@ -88,7 +88,7 @@ void KoParagStyle::setFollowingStyle( KoParagStyle *fst ) void KoParagStyle::saveStyle( TQDomElement & parentElem ) { - m_paragLayout.saveParagLayout( parentElem, m_paragLayout.tqalignment ); + m_paragLayout.saveParagLayout( parentElem, m_paragLayout.alignment ); if ( followingStyle() ) { @@ -207,7 +207,7 @@ TQString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const T // This display-name will probably look nicer in OO, but this also means // no re-use possible between list styles... listStyle.addAttribute( "style:display-name", - i18n( "Numbering Style for %1" ).tqarg( m_displayName ) ); + i18n( "Numbering Style for %1" ).arg( m_displayName ) ); TQString autoListStyleName = genStyles.lookup( listStyle, "L", KoGenStyles::ForceNumbering ); gs.addAttribute( "style:list-style-name", autoListStyleName ); @@ -245,7 +245,7 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ ) if ( !m_parentStyle ) return; if ( !(paragLayoutFlag & KoParagLayout::Alignment) ) - m_paragLayout.tqalignment = m_parentStyle->paragLayout().tqalignment; + m_paragLayout.alignment = m_parentStyle->paragLayout().alignment; if ( !(paragLayoutFlag & KoParagLayout::Margins) ) for ( int i = 0 ; i < 5 ; ++i ) m_paragLayout.margins[i] = m_parentStyle->paragLayout().margins[i]; diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index 374184b3..addbd574 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -375,7 +375,7 @@ bool KoTextCursor::operator==( const KoTextCursor &c ) const void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting ) { - string->tqinvalidate( idx ); + string->invalidate( idx ); tmpIndex = -1; bool justInsert = TRUE; TQString s( str ); @@ -420,7 +420,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko if ( !s.isEmpty() ) string->insert( idx, s ); else - string->tqinvalidate( 0 ); + string->invalidate( 0 ); if ( formatting ) { int len = s.length(); @@ -448,7 +448,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko while ( p ) { p->setParagId( p->prev()->paragId() + 1 ); //p->move( dy ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p = p->next(); } } @@ -963,7 +963,7 @@ bool KoTextCursor::remove() KoTextParag *p = string->next(); delete string; string = p; - string->tqinvalidate( 0 ); + string->invalidate( 0 ); //// kotext string->invalidateCounters(); //// @@ -1520,7 +1520,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct tqalignment. This is a bit messy.... + // set the correct alignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index a5fd6b1a..f3cf9746 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -483,7 +483,7 @@ public: TQSizePolicy::ExpandData expanding() const; bool isEmpty() const; void setGeometry( const TQRect& ) ; - TQRect tqgeometry() const; + TQRect geometry() const; bool hasHeightForWidth() const; int heightForWidth( int ) const; @@ -502,7 +502,7 @@ public: void draw( int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); TQBrush *backGround() const { return background; } - virtual void tqinvalidate(); + virtual void invalidate(); int verticalAlignmentOffset() const; int horizontalAlignmentOffset() const; @@ -552,7 +552,7 @@ public: Placement placement() const { return place; } bool isNested() const { return TRUE; } void resize( int nwidth ); - virtual void tqinvalidate(); + virtual void invalidate(); /// ## TQString anchorAt( TQPainter* p, int x, int y ); virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); @@ -569,7 +569,7 @@ public: TQPtrList<KoTextTableCell> tableCells() const { return cells; } - TQRect tqgeometry() const { return tqlayout ? tqlayout->tqgeometry() : TQRect(); } + TQRect geometry() const { return tqlayout ? tqlayout->geometry() : TQRect(); } bool isStretching() const { return stretch; } private: diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index a41de932..8aaab47b 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -382,8 +382,8 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, { replaceWithAttribut( &cursor, index ); } - // Don't tqrepaint if we're doing batch changes - bool tqrepaint = options() & KReplaceDialog::PromptOnReplace; + // Don't repaint if we're doing batch changes + bool repaint = options() & KReplaceDialog::PromptOnReplace; // Grab replacement string TQString rep = text.mid( matchingIndex, replacementLength ); @@ -395,7 +395,7 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, KCommand *cmd = currentTextObj->replaceSelectionCommand( &cursor, rep, TQString(), KoTextDocument::HighlightSelection, - tqrepaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); + repaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); connect( &m_textIterator, TQT_SIGNAL( currentParagraphModified( int, int, int ) ), this, TQT_SLOT( slotCurrentParagraphModified( int, int, int ) ) ); @@ -587,7 +587,7 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC m_languageItem->setCurrentText( KoGlobal::languageFromTag( m_ctx->m_language ) ); - m_checkVertAlign = new TQCheckBox( i18n( "Vertical tqalignment:" ), page ); + m_checkVertAlign = new TQCheckBox( i18n( "Vertical alignment:" ), page ); m_familyItem = new KFontCombo(page); m_familyItem->setCurrentFont(m_ctx->m_family); diff --git a/lib/kotext/KoStyleCollection.cpp b/lib/kotext/KoStyleCollection.cpp index f8c93f01..fa0818d8 100644 --- a/lib/kotext/KoStyleCollection.cpp +++ b/lib/kotext/KoStyleCollection.cpp @@ -242,7 +242,7 @@ void KoStyleCollection::printDebug() const kdDebug() << "Style " << style << " " << style->name() << " isOutline=" << style->isOutline() << endl; kdDebug() << " format: " << style->format().key() <<endl; static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; - kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().tqalignment] << endl; + kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().alignment] << endl; if ( style->paragLayout().counter ) kdDebug() << " counter level=" << style->paragLayout().counter->depth() << endl; diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index 19840621..2c759282 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -345,7 +345,7 @@ void KoStyleManager::updateGUI() { void KoStyleManager::updatePreview() { d->preview->setStyle(m_currentStyle); - d->preview->tqrepaint(true); + d->preview->repaint(true); } void KoStyleManager::save() { @@ -408,7 +408,7 @@ TQString KoStyleManager::generateUniqueName() void KoStyleManager::addStyle() { save(); - TQString str = i18n( "New Style Template (%1)" ).tqarg(numStyles++); + TQString str = i18n( "New Style Template (%1)" ).arg(numStyles++); if ( m_currentStyle ) { m_currentStyle = new KoParagStyle( *m_currentStyle ); // Create a new style, initializing from the current one diff --git a/lib/kotext/KoStyleManager.h b/lib/kotext/KoStyleManager.h index af848e1d..84c75349 100644 --- a/lib/kotext/KoStyleManager.h +++ b/lib/kotext/KoStyleManager.h @@ -181,7 +181,7 @@ private: Font simple font dia Color simple color dia Spacing and Indents paragraph spacing dia (KWParagDia) -alignments KoParagDia tqalignment tab +alignments KoParagDia alignment tab borders KoParagDia borders tab numbering KoParagDia tab numbering tabulators KoParagDia tab tabs */ diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp index fb496836..1b0f1076 100644 --- a/lib/kotext/KoTextCommand.cpp +++ b/lib/kotext/KoTextCommand.cpp @@ -211,7 +211,7 @@ KoTextCursor * KoParagFormatCommand::execute( KoTextCursor *c ) } while ( p ) { p->setFormat( m_newFormat ); - p->tqinvalidate(0); + p->invalidate(0); if ( p->paragId() == lastParag ) break; p = p->next(); diff --git a/lib/kotext/KoTextCustomItem.h b/lib/kotext/KoTextCustomItem.h index d232bedc..7df4d515 100644 --- a/lib/kotext/KoTextCustomItem.h +++ b/lib/kotext/KoTextCustomItem.h @@ -57,7 +57,7 @@ public: virtual bool ownLine() const { return FALSE; } // Called for "ownline" items virtual void resize( int nwidth ) { width = nwidth; } - virtual void tqinvalidate() {}; + virtual void invalidate() {}; virtual bool isNested() const { return FALSE; } virtual int minimumWidth() const { return 0; } @@ -69,7 +69,7 @@ public: int width; int height; - TQRect tqgeometry() const { return TQRect( xpos, ypos, width, height ); } + TQRect geometry() const { return TQRect( xpos, ypos, width, height ); } virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & ); diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index 126568ef..fe20b049 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -154,13 +154,13 @@ int KoTextDocument::widthUsed() const KoTextParag *p = fParag; int w = 0; while ( p ) { - int a = p->tqalignment(); + int a = p->alignment(); p->setAlignment( TQt::AlignLeft ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p->format(); w = TQMAX( w, p->rect().width() ); p->setAlignment( a ); - p->tqinvalidate( 0 ); + p->invalidate( 0 ); p = p->next(); } return w; @@ -247,11 +247,11 @@ TQString KoTextDocument::plainText() const return buffer; } -void KoTextDocument::tqinvalidate() +void KoTextDocument::invalidate() { KoTextParag *s = fParag; while ( s ) { - s->tqinvalidate( 0 ); + s->invalidate( 0 ); s = s->next(); } } @@ -785,9 +785,9 @@ void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor ) p->move( dy ); //// kotext if ( p->paragLayout().counter ) - p->paragLayout().counter->tqinvalidate(); + p->paragLayout().counter->invalidate(); //// - p->tqinvalidate( 0 ); + p->invalidate( 0 ); //p->setEndState( -1 ); p = p->next(); } diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h index 5f2a0665..8cf9fd4d 100644 --- a/lib/kotext/KoTextDocument.h +++ b/lib/kotext/KoTextDocument.h @@ -94,7 +94,7 @@ public: void setFirstParag( KoTextParag *p ); void setLastParag( KoTextParag *p ); - void tqinvalidate(); + void invalidate(); //void setPreProcessor( KoTextPreProcessor *sh ); //KoTextPreProcessor *preProcessor() const; @@ -189,7 +189,7 @@ public: //bool focusNextPrevChild( bool next ); - int tqalignment() const; + int alignment() const; void setAlignment( int a ); int *tabArray() const; @@ -535,7 +535,7 @@ inline KoTextFormatCollection *KoTextDocument::formatCollection() const return fCollection; } -inline int KoTextDocument::tqalignment() const +inline int KoTextDocument::alignment() const { return align; } diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 24214ae4..9b8e8869 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -675,7 +675,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat void KoTextFormat::update() { //kdDebug(32500) << this << " KoTextFormat::update " << fn.family() << " " << pointSize() << endl; - m_key = TQString(); // tqinvalidate key, recalc at the next key() call + m_key = TQString(); // invalidate key, recalc at the next key() call assert( d ); d->clearCache(); // i.e. recalc at the next screenFont[Metrics]() call } diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp index 7bdfbc0c..d978ba43 100644 --- a/lib/kotext/KoTextFormatter.cpp +++ b/lib/kotext/KoTextFormatter.cpp @@ -131,8 +131,8 @@ int KoTextFormatterCore::leftMargin( bool firstLine, bool includeFirstLineMargin left += parag->firstLineMargin(); // Add the width of the paragraph counter - first line of parag only. if( parag->counter() && - ( parag->counter()->tqalignment() == TQt::AlignLeft || - parag->counter()->tqalignment() == TQt::AlignAuto ) ) + ( parag->counter()->alignment() == TQt::AlignLeft || + parag->counter()->alignment() == TQt::AlignAuto ) ) left += parag->counterWidth(); // in LU pixels } return left; @@ -251,9 +251,9 @@ bool KoTextFormatterCore::format() bool lastWasNonInlineCustom = FALSE; bool abort = false; - int align = parag->tqalignment(); - if ( align == TQt::AlignAuto && doc && doc->tqalignment() != TQt::AlignAuto ) - align = doc->tqalignment(); + int align = parag->alignment(); + if ( align == TQt::AlignAuto && doc && doc->alignment() != TQt::AlignAuto ) + align = doc->alignment(); int col = 0; @@ -810,7 +810,7 @@ KoTextParagLineStart *KoTextFormatterCore::koFormatLine( if (space < 0) space = 0; - // do tqalignment Auto == Left in this case + // do alignment Auto == Left in this case if ( align & TQt::AlignHCenter || align & TQt::AlignRight ) { if ( align & TQt::AlignHCenter ) space /= 2; @@ -949,7 +949,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct tqalignment. This is a bit messy.... + // set the correct alignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index 8732d71d..06394275 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -602,10 +602,10 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, return; const bool checkNewLine = insertFlags & CheckNewLine; const bool removeSelected = ( insertFlags & DoNotRemoveSelected ) == 0; - const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; + const bool repaint = ( insertFlags & DoNotRepaint ) == 0; //kdDebug(32500) << "KoTextObject::insert txt=" << txt << endl; bool tinyRepaint = !checkNewLine; - if ( tqrepaint ) + if ( repaint ) emit hideCursor(); if ( textdoc->hasSelection( selectionId, true ) && removeSelected ) { kdDebug() << k_funcinfo << "removing selection " << selectionId << endl; @@ -673,7 +673,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, } // Speed optimization: if we only type a char, and it doesn't - // tqinvalidate the next parag, only format the current one + // invalidate the next parag, only format the current one // ### This idea is wrong. E.g. when the last parag grows and must create a new page. #if 0 KoTextParag *parag = cursor->parag(); @@ -687,9 +687,9 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, // Doing this here means callers don't have to do it, and cursor can be positionned correctly. ensureFormatted( cursor->parag() ); - // Speed optimization: if we only type a char, only tqrepaint from current line + // Speed optimization: if we only type a char, only repaint from current line // (In fact the one before. When typing a space, a word could move up to the - // line before, we need to tqrepaint it too...) + // line before, we need to repaint it too...) if ( !checkNewLine && tinyRepaint && !wasChanged ) { // insert() called format() which called setChanged(). @@ -703,12 +703,12 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, parag->setLineChanged( origLine - 1 ); // if origLine=0, it'll pass -1, which is 'all' } - if ( tqrepaint ) { + if ( repaint ) { emit repaintChanged( this ); emit ensureCursorVisible(); emit showCursor(); - // we typed the first char of a paragraph in AlignAuto mode -> show correct tqalignment in UI - if ( oldCursor.index() == 0 && oldCursor.parag()->tqalignment() == TQt::AlignAuto ) + // we typed the first char of a paragraph in AlignAuto mode -> show correct alignment in UI + if ( oldCursor.index() == 0 && oldCursor.parag()->alignment() == TQt::AlignAuto ) emit updateUI( true ); } @@ -722,8 +722,8 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, if ( !removeSelected ) { // ## not sure why we do this. I'd prefer leaving the selection unchanged... // but then it'd need adjustements in the offsets etc. - if ( textdoc->removeSelection( selectionId ) && tqrepaint ) - selectionChangedNotify(); // does the tqrepaint + if ( textdoc->removeSelection( selectionId ) && repaint ) + selectionChangedNotify(); // does the repaint } if ( !customItemsMap.isEmpty() && !commandName.isNull() /* see replace-selection; #139890 */ ) { @@ -1066,7 +1066,7 @@ KCommand * KoTextObject::setFormatCommand( KoTextCursor * cursor, KoTextFormat * if ( cursor->parag()->length() == 1 ) { newFormat->addRef(); cursor->parag()->setFormat( newFormat ); - cursor->parag()->tqinvalidate(0); + cursor->parag()->invalidate(0); cursor->parag()->format(); emit repaintChanged( this ); } @@ -1146,7 +1146,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe if ( protectContent() ) return 0L; if ( !textdoc->hasSelection( selectionId, true ) && cursor && - (int)cursor->parag()->tqalignment() == align ) + (int)cursor->parag()->alignment() == align ) return 0L; // No change needed. emit hideCursor(); @@ -1165,7 +1165,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe } formatMore( 2 ); emit repaintChanged( this ); - undoRedoInfo.newParagLayout.tqalignment = align; + undoRedoInfo.newParagLayout.alignment = align; KoTextParagCommand *cmd = new KoTextParagCommand( textdoc, undoRedoInfo.id, undoRedoInfo.eid, undoRedoInfo.oldParagLayouts, undoRedoInfo.newParagLayout, @@ -1547,7 +1547,7 @@ void KoTextObject::removeSelectedText( KoTextCursor * cursor, KoTextDocument::Se undoRedoInfo.clear(); } -KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint ) +KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint ) { if ( protectContent() ) return 0L; @@ -1578,7 +1578,7 @@ KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTex undoRedoInfo.type = UndoRedoInfo::Invalid; // we don't want clear() to create a command undoRedoInfo.clear(); - if ( tqrepaint ) + if ( repaint ) selectionChangedNotify(); return macroCmd; } @@ -1592,8 +1592,8 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ if ( protectContent() ) return 0L; Q_ASSERT( ( insertFlags & DoNotRemoveSelected ) == 0 ); // nonsensical - const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace - if ( tqrepaint ) + const bool repaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace + if ( repaint ) emit hideCursor(); // This could be improved to use a macro command only when there's a selection to remove. KMacroCommand * macroCmd = new KMacroCommand( cmdName ); @@ -1604,7 +1604,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->addRef(); // Remove selected text, if any - KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, tqrepaint ); + KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, repaint ); if ( removeSelCmd ) macroCmd->addCommand( removeSelCmd ); @@ -1625,7 +1625,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->removeRef(); setLastFormattedParag( c1.parag() ); - if ( tqrepaint ) + if ( repaint ) { formatMore( 2 ); emit repaintChanged( this ); @@ -1645,7 +1645,7 @@ KCommand * KoTextObject::insertParagraphCommand( KoTextCursor *cursor ) return replaceSelectionCommand( cursor, "\n", TQString(), KoTextDocument::Standard, CheckNewLine ); } -void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ) +void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool repaint ) { if ( !m_highlightSelectionAdded ) { @@ -1656,20 +1656,20 @@ void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, m_highlightSelectionAdded = true; } - removeHighlight(tqrepaint); // remove previous highlighted selection + removeHighlight(repaint); // remove previous highlighted selection KoTextCursor cursor( textdoc ); cursor.setParag( parag ); cursor.setIndex( index ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( index + length ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); - if ( tqrepaint ) { + if ( repaint ) { parag->setChanged( true ); emit repaintChanged( this ); } } -void KoTextObject::removeHighlight(bool tqrepaint) +void KoTextObject::removeHighlight(bool repaint) { if ( textdoc->hasSelection( KoTextDocument::HighlightSelection, true ) ) { @@ -1677,7 +1677,7 @@ void KoTextObject::removeHighlight(bool tqrepaint) oldParag->setChanged( true ); textdoc->removeSelection( KoTextDocument::HighlightSelection ); } - if ( tqrepaint ) + if ( repaint ) emit repaintChanged( this ); } @@ -1831,7 +1831,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /* } #ifdef DEBUG_FORMAT_MORE TQString id; - if ( m_lastFormatted ) id = TQString(" (%1)").tqarg(m_lastFormatted->paragId()); + if ( m_lastFormatted ) id = TQString(" (%1)").arg(m_lastFormatted->paragId()); kdDebug(32500) << "formatMore finished formatting. " << " bottom=" << bottom << " m_lastFormatted=" << m_lastFormatted << id @@ -2041,13 +2041,13 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty case KoChangeCaseDia::TitleCase: for(uint i=0;i<text.length();i++) { - if(text.tqat(i)!=' ') + if(text.at(i)!=' ') { - TQChar prev = text.tqat(TQMAX(i-1,0)); + TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == ' ' || prev == '\n' || prev == '\t') - text=text.replace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.at(i).upper() ); else - text=text.replace(i, 1, text.tqat(i).lower() ); + text=text.replace(i, 1, text.at(i).lower() ); } } break; @@ -2055,9 +2055,9 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty for(uint i=0;i<text.length();i++) { TQString repl=TQString(text.at(i)); - if(text.tqat(i)!=text.tqat(i).upper()) + if(text.at(i)!=text.at(i).upper()) repl=repl.upper(); - else if(text.tqat(i).lower()!=text.tqat(i)) + else if(text.at(i).lower()!=text.at(i)) repl=repl.lower(); text=text.replace(i, 1, repl ); } @@ -2069,7 +2069,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty { TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == '\n' ||prev.isPunct()) - text=text.replace(i, 1, text.tqat(i).upper() ); + text=text.replace(i, 1, text.at(i).upper() ); } } break; @@ -2167,7 +2167,7 @@ KoTextCursor KoTextObject::pasteOasisText( const TQDomElement &bodyElem, KoOasis context.styleStack().restore(); lastParagraph->setChanged( true ); - lastParagraph->tqinvalidate( 0 ); + lastParagraph->invalidate( 0 ); // Now split this parag, to make room for the next paragraphs resultCursor.setParag( lastParagraph ); @@ -2692,7 +2692,7 @@ KCommand *KoTextFormatInterface::setDefaultFormatCommand() KCommand *KoTextFormatInterface::setAlignCommand(int align) { KoParagLayout format( *currentParagLayoutFormat() ); - format.tqalignment=align; + format.alignment=align; return setParagLayoutFormatCommand(&format,KoParagLayout::Alignment); } diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h index 15574075..90693bed 100644 --- a/lib/kotext/KoTextObject.h +++ b/lib/kotext/KoTextObject.h @@ -251,7 +251,7 @@ public: CheckNewLine = 1, /// < if true, the text to be inserted is checked for '\\n' (as a paragraph delimiter) OverwriteMode = 2, DoNotRemoveSelected = 4, ///< whether to remove selected text before - DoNotRepaint = 8 ///< usually we tqrepaint in insert(), this allows to turn it off + DoNotRepaint = 8 ///< usually we repaint in insert(), this allows to turn it off }; /** @@ -286,7 +286,7 @@ public: KoTextDocument::SelectionId selectionId = KoTextDocument::Standard, int insertFlags = DefaultInsertFlags, // KDE4: TODO use TQFlags CustomItemsMap customItemsMap = CustomItemsMap() ); - KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint = true ); + KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint = true ); KCommand* insertParagraphCommand( KoTextCursor * cursor ); /** @@ -308,8 +308,8 @@ public: /** Highlighting support (for search/replace, spellchecking etc.). * Don't forget to ensure the paragraph is visible. */ - void highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ); - void removeHighlight( bool tqrepaint ); + void highlightPortion( KoTextParag * parag, int index, int length, bool repaint ); + void removeHighlight( bool repaint ); /** Implementation of setFormatCommand from KoTextFormatInterface - apply change to the whole document */ KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ); diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index a081dfda..aba58abc 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -154,7 +154,7 @@ void KoTextParag::setPrev( KoTextParag *s ) doc->setFirstParag( this ); } -void KoTextParag::tqinvalidate( int /*chr, ignored*/ ) +void KoTextParag::invalidate( int /*chr, ignored*/ ) { m_invalid = true; #if 0 @@ -186,7 +186,7 @@ void KoTextParag::setLineChanged( short int line ) void KoTextParag::insert( int index, const TQString &s ) { str->insert( index, s, formatCollection()->defaultFormat() ); - tqinvalidate( index ); + invalidate( index ); //needPreProcess = TRUE; } @@ -209,7 +209,7 @@ void KoTextParag::remove( int index, int len ) } } str->remove( index, len ); - tqinvalidate( 0 ); + invalidate( 0 ); //needPreProcess = TRUE; } @@ -252,7 +252,7 @@ void KoTextParag::join( KoTextParag *s ) extraData()->join( s->extraData() ); }*/ delete s; - tqinvalidate( 0 ); + invalidate( 0 ); //// kotext invalidateCounters(); //// @@ -403,14 +403,14 @@ void KoTextParag::format( int start, bool doMove ) bool makeInvalid = false; //p && p->lastInFrame; //kdDebug(32500) << "might move of dy=" << dy << ". previous's lastInFrame (=makeInvalid): " << makeInvalid << endl; while ( s && dy ) { - if ( s->movedDown ) { // (not in TQRT) : moved down -> tqinvalidate and stop moving down - s->tqinvalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) + if ( s->movedDown ) { // (not in TQRT) : moved down -> invalidate and stop moving down + s->invalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) break; } if ( !s->isFullWidth() ) makeInvalid = TRUE; if ( makeInvalid ) - s->tqinvalidate( 0 ); + s->invalidate( 0 ); s->move( dy ); //if ( s->lastInFrame ) // makeInvalid = TRUE; @@ -600,7 +600,7 @@ void KoTextParag::setFormat( int index, int len, const KoTextFormat *_f, bool us _f->shadowDistanceX() != of->shadowDistanceX() || _f->shadowDistanceY() != of->shadowDistanceY() ) ) { - tqinvalidate( 0 ); + invalidate( 0 ); } if ( flags == -1 || flags == KoTextFormat::Format || !fc ) { #ifdef DEBUG_COLLECTION @@ -690,7 +690,7 @@ void KoTextParag::setDirection( TQChar::Direction d ) { if ( str && str->direction() != d ) { str->setDirection( d ); - tqinvalidate( 0 ); + invalidate( 0 ); //// kotext m_layout.direction = d; invalidateCounters(); // #47178 @@ -837,7 +837,7 @@ void KoTextParag::lineInfo( int l, int &y, int &h, int &bl ) const bl = ( *it )->baseLine; } -uint KoTextParag::tqalignment() const +uint KoTextParag::alignment() const { return align; } @@ -946,15 +946,15 @@ void KoTextParag::setMargin( TQStyleSheetItem::Margin m, double _i ) //kdDebug(32500) << "KoTextParag::setMargin " << m << " margin " << _i << endl; m_layout.margins[m] = _i; if ( m == TQStyleSheetItem::MarginTop && prev() ) - prev()->tqinvalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) - tqinvalidate(0); + prev()->invalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) + invalidate(0); } void KoTextParag::setMargins( const double * margins ) { for ( int i = 0 ; i < 5 ; ++i ) m_layout.margins[i] = margins[i]; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setAlign( int align ) @@ -962,50 +962,50 @@ void KoTextParag::setAlign( int align ) Q_ASSERT( align <= TQt::AlignJustify ); align &= TQt::AlignHorizontal_Mask; setAlignment( align ); - m_layout.tqalignment = align; + m_layout.alignment = align; } int KoTextParag::resolveAlignment() const { - if ( (int)m_layout.tqalignment == TQt::AlignAuto ) + if ( (int)m_layout.alignment == TQt::AlignAuto ) return str->isRightToLeft() ? TQt::AlignRight : TQt::AlignLeft; - return m_layout.tqalignment; + return m_layout.alignment; } void KoTextParag::setLineSpacing( double _i ) { m_layout.setLineSpacingValue(_i); - tqinvalidate(0); + invalidate(0); } void KoTextParag::setLineSpacingType( KoParagLayout::SpacingType _type ) { m_layout.lineSpacingType = _type; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setTopBorder( const KoBorder & _brd ) { m_layout.topBorder = _brd; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setBottomBorder( const KoBorder & _brd ) { m_layout.bottomBorder = _brd; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setJoinBorder( bool join ) { m_layout.joinBorder = join; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setBackgroundColor ( const TQColor& color ) { m_layout.backgroundColor = color; - tqinvalidate(0); + invalidate(0); } void KoTextParag::setNoCounter() @@ -1060,17 +1060,17 @@ void KoTextParag::invalidateCounters() { // Invalidate this paragraph and all the following ones // (Numbering may have changed) - tqinvalidate( 0 ); + invalidate( 0 ); if ( m_layout.counter ) - m_layout.counter->tqinvalidate(); + m_layout.counter->invalidate(); KoTextParag *s = next(); // #### Possible optimization: since any invalidation propagates down, // it's enough to stop at the first paragraph with an already-invalidated counter, isn't it? - // This is only true if nobody else calls counter->tqinvalidate... + // This is only true if nobody else calls counter->invalidate... while ( s ) { if ( s->m_layout.counter ) - s->m_layout.counter->tqinvalidate(); - s->tqinvalidate( 0 ); + s->m_layout.counter->invalidate(); + s->invalidate( 0 ); s = s->next(); } } @@ -1290,7 +1290,7 @@ int KoTextParag::rightMargin() const KoTextZoomHandler * zh = textDocument()->formattingZoomHandler(); int cw=0; if( m_layout.counter && str->isRightToLeft() && - (( m_layout.counter->tqalignment() == TQt::AlignRight ) || ( m_layout.counter->tqalignment() == TQt::AlignAuto ))) + (( m_layout.counter->alignment() == TQt::AlignRight ) || ( m_layout.counter->alignment() == TQt::AlignAuto ))) cw = counterWidth(); return zh->ptToLayoutUnitPixX( @@ -1603,7 +1603,7 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText // we flush before custom items flush = flush || nextchr->isCustom(); // when painting justified we flush on spaces - if ((tqalignment() & TQt::AlignJustify) == TQt::AlignJustify ) + if ((alignment() & TQt::AlignJustify) == TQt::AlignJustify ) //flush = flush || TQTextFormatter::isBreakable( str, i ); flush = flush || chr->whiteSpace; // when underlining or striking "word by word" we flush before/after spaces @@ -2104,7 +2104,7 @@ void KoTextParag::setTabList( const KoTabulatorList &tabList ) { setTabArray( 0 ); } - tqinvalidate( 0 ); + invalidate( 0 ); } /** "Reimplemented" (compared to nextTabDefault) to implement non-left-aligned tabs */ @@ -2244,7 +2244,7 @@ void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int { //kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl; if ( flags & KoParagLayout::Alignment ) - setAlign( tqlayout.tqalignment ); + setAlign( tqlayout.alignment ); if ( flags & KoParagLayout::Margins ) { if ( marginIndex == -1 ) setMargins( tqlayout.margins ); @@ -2290,7 +2290,7 @@ void KoTextParag::setCustomItem( int index, KoTextCustomItem * custom, KoTextFor //addCustomItem(); document()->registerCustomItem( custom, this ); custom->recalc(); // calc value (e.g. for variables) and set initial size - tqinvalidate( 0 ); + invalidate( 0 ); setChanged( true ); } @@ -2349,7 +2349,7 @@ void KoTextParag::printRTDebug( int info ) static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; static const char * const s_linespacing[] = { "Single", "1.5", "2", "custom", "atLeast", "Multiple", "Fixed" }; static const char * const s_dir[] = { "DirL", "DirR", "DirEN", "DirES", "DirET", "DirAN", "DirCS", "DirB", "DirS", "DirWS", "DirON", "DirLRE", "DirLRO", "DirAL", "DirRLE", "DirRLO", "DirPDF", "DirNSM", "DirBN" }; - kdDebug(32500) << " align: " << s_align[tqalignment()] << " resolveAlignment: " << s_align[resolveAlignment()] + kdDebug(32500) << " align: " << s_align[alignment()] << " resolveAlignment: " << s_align[resolveAlignment()] << " isRTL:" << str->isRightToLeft() << " dir: " << s_dir[direction()] << endl; TQRect pixr = pixelRect( textDocument()->paintingZoomHandler() ); @@ -2906,7 +2906,7 @@ void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context setFormat( len - 1, 1, paragFormat(), TRUE ); setChanged( true ); - tqinvalidate( 0 ); + invalidate( 0 ); } void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h index 591242a2..f42c3285 100644 --- a/lib/kotext/KoTextParag.h +++ b/lib/kotext/KoTextParag.h @@ -93,7 +93,7 @@ public: void format( int start = -1, bool doMove = TRUE ); /// Call this to ensure that format() will be called on this paragraph later on - void tqinvalidate( int chr /*ignored*/ = 0 ); + void invalidate( int chr /*ignored*/ = 0 ); /// Returns false if format() needs to be called on this paragraph bool isValid() const; @@ -132,7 +132,7 @@ public: void setAlignment( uint a ); void setAlignmentDirect( uint a ) { align = a; } - uint tqalignment() const; + uint alignment() const; virtual void paint( TQPainter &painter, const TQColorGroup &cg, KoTextCursor *cursor, bool drawSelections, int clipx, int clipy, int clipw, int cliph ); // kotextparag.cc @@ -235,9 +235,9 @@ public: void setLineSpacingType( KoParagLayout::SpacingType _type ); - /** Use this to change the paragraph tqalignment, not KoTextParag::setAlignment ! */ + /** Use this to change the paragraph alignment, not KoTextParag::setAlignment ! */ void setAlign( int align ); - /** Return the real tqalignment: Auto is resolved to either Left or Right */ + /** Return the real alignment: Auto is resolved to either Left or Right */ int resolveAlignment() const; /// The part of the top margin that can be broken by a page break @@ -328,7 +328,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as tqchildren. + * @param parent the xml element that has content as children. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace */ @@ -336,7 +336,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as tqchildren. + * @param parent the xml element that has content as children. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace * @param hasTrailingSpace whether there was trailing literal whitespace in the span's text @@ -525,13 +525,13 @@ inline void KoTextParag::setAlignment( uint a ) if ( a == align ) return; align = a; - tqinvalidate( 0 ); + invalidate( 0 ); } /*inline void KoTextParag::setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; - tqinvalidate( 0 ); + invalidate( 0 ); } inline TQStyleSheetItem::ListStyle KoTextParag::listStyle() const diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index e272422d..6211e1d8 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -900,7 +900,7 @@ bool KoTextView::insertParagraph(const TQPoint &pos) if ( pos.x() + f->width(' ') >= textDocument()->width()) { //FIXME me bidi. - //change parag tqalignment => right tqalignment + //change parag alignment => right alignment last->setAlignment( TQt::AlignRight ); } else @@ -1207,7 +1207,7 @@ bool KoTextView::openLink( KoLinkVariable* variable ) } else { - KMessageBox::sorry( 0, i18n("%1 is not a valid link.").tqarg( variable->url() ) ); + KMessageBox::sorry( 0, i18n("%1 is not a valid link.").arg( variable->url() ) ); return false; } } diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index 4b744faf..70eab87e 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -532,7 +532,7 @@ TQValueList<KoVariable *> KoVariableCollection::recalcVariables(int type) if ( parag ) { //kdDebug(32500) << "KoDoc::recalcVariables -> invalidating parag " << parag->paragId() << endl; - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } } @@ -896,7 +896,7 @@ void KoVariable::recalcAndRepaint() if ( parag ) { //kdDebug(32500) << "KoVariable::recalcAndRepaint -> invalidating parag " << parag->paragId() << endl; - parag->tqinvalidate( 0 ); + parag->invalidate( 0 ); parag->setChanged( true ); } textDocument()->emitRepaintChanged(); @@ -1319,9 +1319,9 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) else if ( value.lower() == "localeshort" ) value = KGlobal::locale()->dateFormatShort(); else if ( value.lower() == "localedatetime" ) - value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormat() ).tqarg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormat() ).arg( KGlobal::locale()->timeFormat() ); else if ( value.lower() == "localedatetimeshort" ) - value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormatShort() ).tqarg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormatShort() ).arg( KGlobal::locale()->timeFormat() ); klocaleFormat = true; } writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) ); diff --git a/lib/kotext/KoVariable.h b/lib/kotext/KoVariable.h index 88f17975..fce8fc2d 100644 --- a/lib/kotext/KoVariable.h +++ b/lib/kotext/KoVariable.h @@ -405,7 +405,7 @@ public: TQVariant varValue() const { return m_varValue; } /** - * Ask this variable to recalculate and to tqrepaint itself + * Ask this variable to recalculate and to repaint itself * Only use this if you're working on a single variable (e.g. popupmenu). * Otherwise, better do the repainting all at once. * @see KoVariableCollection::recalcVariables() diff --git a/lib/kotext/kohyphen/kohyphen.cpp b/lib/kotext/kohyphen/kohyphen.cpp index d8a0374e..abb00a29 100644 --- a/lib/kotext/kohyphen/kohyphen.cpp +++ b/lib/kotext/kohyphen/kohyphen.cpp @@ -177,10 +177,10 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const if ( underscore > -1 ) { lang.truncate( underscore ); if (encodings.find(lang) == encodings.end()) - throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); } else - throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); } if (dicts.find(lang) == dicts.end()) { @@ -199,11 +199,11 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const #ifdef DEBUG_HYPHENATOR kdDebug() << "No dictionary loaded" << endl; #endif - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); } } else - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); } return dicts[lang]; } diff --git a/lib/kotext/tests/kotextformattertest.cpp b/lib/kotext/tests/kotextformattertest.cpp index a13adddb..6721f771 100644 --- a/lib/kotext/tests/kotextformattertest.cpp +++ b/lib/kotext/tests/kotextformattertest.cpp @@ -89,7 +89,7 @@ void KoTextFormatterTest::speedTest() // Format it 50 times for ( uint i = 0 ; i < 50 ; ++i ) { - parag->tqinvalidate(0); + parag->invalidate(0); parag->format(); } doc->clear(false); diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp index f095f596..b85aa4cd 100644 --- a/lib/kross/api/callable.cpp +++ b/lib/kross/api/callable.cpp @@ -47,26 +47,26 @@ const TQString Callable::getClassName() const bool Callable::hasChild(const TQString& name) const { - return m_tqchildren.contains(name); + return m_children.contains(name); } Object::Ptr Callable::getChild(const TQString& name) const { - return m_tqchildren[name]; + return m_children[name]; } TQMap<TQString, Object::Ptr> Callable::getChildren() const { - return m_tqchildren; + return m_children; } bool Callable::addChild(const TQString& name, Object* object) { #ifdef KROSS_API_OBJECT_ADDCHILD_DEBUG krossdebug( TQString("Kross::Api::Callable::addChild() object.name='%1' object.classname='%2'") - .tqarg(name).tqarg(object->getClassName()) ); + .arg(name).arg(object->getClassName()) ); #endif - m_tqchildren.replace(name, Object::Ptr(object)); + m_children.replace(name, Object::Ptr(object)); return true; } @@ -78,9 +78,9 @@ bool Callable::addChild(Callable* object) void Callable::removeChild(const TQString& name) { #ifdef KROSS_API_OBJECT_REMCHILD_DEBUG - krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").tqarg(name) ); + krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").arg(name) ); #endif - m_tqchildren.remove(name); + m_children.remove(name); } void Callable::removeAllChildren() @@ -88,13 +88,13 @@ void Callable::removeAllChildren() #ifdef KROSS_API_OBJECT_REMCHILD_DEBUG krossdebug( "Kross::Api::Callable::removeAllChildren()" ); #endif - m_tqchildren.clear(); + m_children.clear(); } Object::Ptr Callable::call(const TQString& name, List::Ptr args) { #ifdef KROSS_API_CALLABLE_CALL_DEBUG - krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").tqarg(name).tqarg(getName()).tqarg(args ? args->toString() : TQString("")) ); + krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").arg(name).arg(getName()).arg(args ? args->toString() : TQString("")) ); #endif if(name.isEmpty()) // return a self-reference if no functionname is defined. @@ -111,7 +111,7 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) TQString s = Variant::toString(args->item(0)); Object::Ptr obj = getChild(s); if(! obj) - throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").tqarg(getName()).tqarg(s)) ); + throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").arg(getName()).arg(s)) ); return obj; } else if(name == "has") { @@ -123,9 +123,9 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) } else if(name == "list") { TQStringList list; - TQMap<TQString, Object::Ptr> tqchildren = getChildren(); - TQMap<TQString, Object::Ptr>::Iterator it( tqchildren.begin() ); - for(; it != tqchildren.end(); ++it) + TQMap<TQString, Object::Ptr> children = getChildren(); + TQMap<TQString, Object::Ptr>::Iterator it( children.begin() ); + for(; it != children.end(); ++it) list.append( it.key() ); return new Variant(list); } @@ -134,6 +134,6 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) } // If there exists no such object return NULL. - krossdebug( TQString("Object '%1' has no callable object named '%2'.").tqarg(getName()).tqarg(name) ); + krossdebug( TQString("Object '%1' has no callable object named '%2'.").arg(getName()).arg(name) ); return 0; } diff --git a/lib/kross/api/callable.h b/lib/kross/api/callable.h index 63edb067..0e3dd3a6 100644 --- a/lib/kross/api/callable.h +++ b/lib/kross/api/callable.h @@ -92,9 +92,9 @@ namespace Kross { namespace Api { Object::Ptr getChild(const TQString& name) const; /** - * Return all tqchildren. + * Return all children. * - * \return A \a ObjectMap of tqchildren this Object has. + * \return A \a ObjectMap of children this Object has. */ TQMap<TQString, Object::Ptr> getChildren() const; @@ -125,7 +125,7 @@ namespace Kross { namespace Api { void removeChild(const TQString& name); /** - * Remove all tqchildren. + * Remove all children. */ void removeAllChildren(); @@ -138,7 +138,7 @@ namespace Kross { namespace Api { /// Name this callable object has. TQString m_name; /// A list of childobjects. - TQMap<TQString, Object::Ptr> m_tqchildren; + TQMap<TQString, Object::Ptr> m_children; }; }} diff --git a/lib/kross/api/class.h b/lib/kross/api/class.h index de1d898c..6224a61a 100644 --- a/lib/kross/api/class.h +++ b/lib/kross/api/class.h @@ -76,7 +76,7 @@ namespace Kross { namespace Api { /* virtual Object::Ptr call(const TQString& name, List::Ptr arguments) { - krossdebug( TQString("Class::call(%1)").tqarg(name) ); + krossdebug( TQString("Class::call(%1)").arg(name) ); return Event<T>::call(name, arguments); } */ diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h index 26a92117..b75107f7 100644 --- a/lib/kross/api/event.h +++ b/lib/kross/api/event.h @@ -201,13 +201,13 @@ namespace Kross { namespace Api { virtual Object::Ptr call(const TQString& name, List::Ptr arguments) { #ifdef KROSS_API_EVENT_CALL_DEBUG - krossdebug( TQString("Event::call() name='%1' getName()='%2'").tqarg(name).tqarg(getName()) ); + krossdebug( TQString("Event::call() name='%1' getName()='%2'").arg(name).arg(getName()) ); #endif Function* function = m_functions[name]; if(function) { #ifdef KROSS_API_EVENT_CALL_DEBUG - krossdebug( TQString("Event::call() name='%1' is a builtin function.").tqarg(name) ); + krossdebug( TQString("Event::call() name='%1' is a builtin function.").arg(name) ); #endif return function->call(arguments); } diff --git a/lib/kross/api/eventscript.cpp b/lib/kross/api/eventscript.cpp index 43c4c1cb..f9fe9f9a 100644 --- a/lib/kross/api/eventscript.cpp +++ b/lib/kross/api/eventscript.cpp @@ -40,7 +40,7 @@ const TQString EventScript::getClassName() const Object::Ptr EventScript::call(const TQString& name, KSharedPtr<List> arguments) { - krossdebug( TQString("EventScript::call() name=%1 arguments=%2").tqarg(name).tqarg(arguments->toString()) ); + krossdebug( TQString("EventScript::call() name=%1 arguments=%2").arg(name).arg(arguments->toString()) ); //TODO return 0; } diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp index 86e868f5..8f4d2c50 100644 --- a/lib/kross/api/eventsignal.cpp +++ b/lib/kross/api/eventsignal.cpp @@ -46,7 +46,7 @@ const TQString EventSignal::getClassName() const Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> arguments) { #ifdef KROSS_API_EVENTSIGNAL_CALL_DEBUG - krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").tqarg(m_signal).tqarg(arguments->toString()) ); + krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").arg(m_signal).arg(arguments->toString()) ); #endif TQString n = m_signal; @@ -56,7 +56,7 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen int signalid = m_sender->metaObject()->findSignal(n.latin1(), false); if(signalid < 0) - throw new Exception(TQString("No such signal '%1'.").tqarg(n)); + throw new Exception(TQString("No such signal '%1'.").arg(n)); TQUObject* uo = QtObject::toTQUObject(n, arguments); m_sender->qt_emit(signalid, uo); // emit the signal diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp index 56616904..3f6482db 100644 --- a/lib/kross/api/eventslot.cpp +++ b/lib/kross/api/eventslot.cpp @@ -46,7 +46,7 @@ const TQString EventSlot::getClassName() const Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) { #ifdef KROSS_API_EVENTSLOT_CALL_DEBUG - krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").tqarg(m_slot).tqarg(arguments->toString()) ); + krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").arg(m_slot).arg(arguments->toString()) ); #endif TQString n = m_slot; //TODO name; //Variant::toString(args->item(0)); @@ -56,7 +56,7 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) int slotid = m_receiver->metaObject()->findSlot(n.latin1(), false); if(slotid < 0) - throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(n)) ); + throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(n)) ); TQUObject* uo = QtObject::toTQUObject(n, arguments); m_receiver->qt_invoke(slotid, uo); // invoke the slot @@ -72,7 +72,7 @@ TQCString EventSlot::getSlot(const TQCString& signal) int startpos = signature.find("("); int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) { - krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) ); + krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").arg(signal) ); return TQCString(); } TQString signalname = signature.left(startpos); @@ -83,13 +83,13 @@ TQCString EventSlot::getSlot(const TQCString& signal) TQMetaObject* mo = metaObject(); int slotid = mo->findSlot(slot, false); if(slotid < 0) { - krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").tqarg(signal).tqarg(slot) ); + krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").arg(signal).arg(slot) ); return TQCString(); } const TQMetaData* md = mo->slot(slotid, false); if(md->access != TQMetaData::Public) { - krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").tqarg(signal).tqarg(slot) ); + krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").arg(signal).arg(slot) ); return TQCString(); } @@ -97,7 +97,7 @@ TQCString EventSlot::getSlot(const TQCString& signal) //const TQUMethod *method = md->method; krossdebug( TQString("signal=%1 slot=%2 slotid=%3 params=%4 mdname=%5") - .tqarg(signal).tqarg(slot).tqarg(slotid).tqarg(params).tqarg(md->name) ); + .arg(signal).arg(slot).arg(slotid).arg(params).arg(md->name) ); return TQCString("1" + slot); // Emulate the TQT_SLOT(...) macro by adding as first char a "1". } @@ -114,7 +114,7 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T EventSlot* eventslot = create(eventmanager); eventslot->connect(eventmanager, senderobj, signal, function, slot); m_slots.append(eventslot); - krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").arg(senderobj->name()).arg(signal).arg(function) ); } else { m_sender = senderobj; @@ -122,10 +122,10 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T m_function = function; m_slot = myslot; if(! TQObject::connect((TQObject*)senderobj, signal, this, myslot)) { - krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").arg(senderobj->name()).arg(signal).arg(function) ); return false; } - krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").arg(senderobj->name()).arg(signal).arg(function) ); } return true; } @@ -144,7 +144,7 @@ bool EventSlot::disconnect() void EventSlot::call(const TQVariant& variant) { krossdebug( TQString("EventSlot::call() sender='%1' signal='%2' function='%3'") - .tqarg(m_sender->name()).tqarg(m_signal).tqarg(m_function) ); + .arg(m_sender->name()).arg(m_signal).arg(m_function) ); Kross::Api::List* arglist = 0; @@ -159,7 +159,7 @@ void EventSlot::call(const TQVariant& variant) } catch(Exception& e) { //TODO add hadError(), getError() and setError() - krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").tqarg(variant.toString()).tqarg(e.type()).tqarg(e.description()) ); + krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").arg(variant.toString()).arg(e.type()).arg(e.description()) ); } } diff --git a/lib/kross/api/exception.cpp b/lib/kross/api/exception.cpp index c6a0198f..cb0125c4 100644 --- a/lib/kross/api/exception.cpp +++ b/lib/kross/api/exception.cpp @@ -30,7 +30,7 @@ Exception::Exception(const TQString& error, long lineno) , m_error(error) , m_lineno(lineno) { - krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").tqarg(m_error).tqarg(m_lineno) ); + krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").arg(m_error).arg(m_lineno) ); } Exception::~Exception() @@ -45,8 +45,8 @@ const TQString Exception::getClassName() const const TQString Exception::toString() { return (m_lineno != -1) - ? TQString("Exception at line %1: %2").tqarg(m_lineno).tqarg(m_error) - : TQString("Exception: %1").tqarg(m_error); + ? TQString("Exception at line %1: %2").arg(m_lineno).arg(m_error) + : TQString("Exception: %1").arg(m_error); } const TQString Exception::getError() const diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp index 8d266930..86eae479 100644 --- a/lib/kross/api/interpreter.cpp +++ b/lib/kross/api/interpreter.cpp @@ -95,7 +95,7 @@ Interpreter* InterpreterInfo::getInterpreter() if(m_interpreter) // buffered return m_interpreter; - krossdebug( TQString("Loading the interpreter library for %1").tqarg(m_interpretername) ); + krossdebug( TQString("Loading the interpreter library for %1").arg(m_interpretername) ); // Load the krosspython library. KLibLoader *libloader = KLibLoader::self(); @@ -104,10 +104,10 @@ Interpreter* InterpreterInfo::getInterpreter() if(! library) { /* setException( - new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) ) + new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) ) ); */ - krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) ); + krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) ); return 0; } diff --git a/lib/kross/api/list.cpp b/lib/kross/api/list.cpp index 3d894116..9e2baf52 100644 --- a/lib/kross/api/list.cpp +++ b/lib/kross/api/list.cpp @@ -51,8 +51,8 @@ Object::Ptr List::item(uint idx, Object* defaultobject) if(idx >= list.count()) { if(defaultobject) return defaultobject; - krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").tqarg(idx) ); - throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").tqarg(idx)) ); + krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").arg(idx) ); + throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").arg(idx)) ); } return list[idx]; } diff --git a/lib/kross/api/module.h b/lib/kross/api/module.h index 3e58305a..f27bdf5c 100644 --- a/lib/kross/api/module.h +++ b/lib/kross/api/module.h @@ -51,7 +51,7 @@ namespace Kross { namespace Api { explicit Module(const TQString& name) : Class<Module>(name) { - krossdebug( TQString("Kross::Api::Module %1 created").tqarg(name) ); + krossdebug( TQString("Kross::Api::Module %1 created").arg(name) ); } /** @@ -59,7 +59,7 @@ namespace Kross { namespace Api { */ virtual ~Module() { - krossdebug( TQString("Kross::Api::Module %1 destroyed").tqarg(getName()) ); + krossdebug( TQString("Kross::Api::Module %1 destroyed").arg(getName()) ); } /** diff --git a/lib/kross/api/object.cpp b/lib/kross/api/object.cpp index 06ec55d5..43fa8b4b 100644 --- a/lib/kross/api/object.cpp +++ b/lib/kross/api/object.cpp @@ -30,21 +30,21 @@ Object::Object() : KShared() { #ifdef KROSS_API_OBJECT_CTOR_DEBUG - krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) ); + krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) ); #endif } Object::~Object() { #ifdef KROSS_API_OBJECT_DTOR_DEBUG - krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) ); + krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) ); #endif //removeAllChildren(); // not needed cause we use KShared to handle ref-couting and freeing. } const TQString Object::toString() { - return TQString("%1").tqarg(getClassName()); + return TQString("%1").arg(getClassName()); } Object::Ptr Object::call(const TQString& name, List::Ptr arguments) @@ -52,12 +52,12 @@ Object::Ptr Object::call(const TQString& name, List::Ptr arguments) Q_UNUSED(arguments); #ifdef KROSS_API_OBJECT_CALL_DEBUG - krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").tqarg(name).tqarg(getName()).tqarg(getClassName()) ); + krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").arg(name).arg(getName()).arg(getClassName()) ); #endif if(name.isEmpty()) // return a self-reference if no functionname is defined. return this; - throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").tqarg(name)) ); + throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").arg(name)) ); } diff --git a/lib/kross/api/object.h b/lib/kross/api/object.h index 87bd2132..f23a6179 100644 --- a/lib/kross/api/object.h +++ b/lib/kross/api/object.h @@ -142,7 +142,7 @@ template<class T> inline T* Object::fromObject(Object::Ptr object) { T* t = (T*) object.data(); if(! t) - throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").tqarg(object ? object->getClassName() : "")) ); + throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").arg(object ? object->getClassName() : "")) ); return t; } diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp index 04736e2a..5fc1a36a 100644 --- a/lib/kross/api/qtobject.cpp +++ b/lib/kross/api/qtobject.cpp @@ -93,7 +93,7 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) int startpos = signature.find("("); int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) - throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(signature)) ); + throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").arg(signature)) ); //TQString sig = signature.left(startpos); TQString params = signature.mid(startpos + 1, endpos - startpos - 1); @@ -107,19 +107,19 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) //TQString t; //for(int j=0; j<argcount; j++) t += "'" + Variant::toString(arguments->item(j)) + "' "; -//krossdebug( TQString("1 ---------------------: (%1) %2").tqarg(argcount).tqarg(t) ); +//krossdebug( TQString("1 ---------------------: (%1) %2").arg(argcount).arg(t) ); // Fill parameters. uint argcount = arguments ? arguments->count() : 0; for(uint i = 0; i < paramcount; i++) { if(paramlist[i].find(TQSTRING_OBJECT_NAME_STRING) >= 0) { const TQString s = (argcount > i) ? Variant::toString(arguments->item(i)) : TQString(); - //krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(s)); + //krossdebug(TQString("EventSlot::toTQUObject s=%1").arg(s)); static_TQUType_TQString.set( &(uo[i + 1]), s ); } //TODO handle int, long, char*, TQStringList, etc. else { - throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").tqarg(paramlist[i]).tqarg(signature)) ); + throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").arg(paramlist[i]).arg(signature)) ); } } @@ -175,7 +175,7 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args) TQString name = Kross::Api::Variant::toString(args->item(0)); int slotid = m_object->metaObject()->findSlot(name.latin1(), false); if(slotid < 0) - throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) ); + throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(name)) ); TQUObject* uo = QtObject::toTQUObject(name, args); m_object->qt_invoke(slotid, uo); @@ -203,7 +203,7 @@ Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args) TQString name = Kross::Api::Variant::toString(args->item(0)); int signalid = m_object->metaObject()->findSignal(name.latin1(), false); if(signalid < 0) - throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(name)) ); + throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").arg(name)) ); m_object->qt_invoke(signalid, 0); //TODO convert Kross::Api::List::Ptr => TQUObject* return 0; } @@ -211,16 +211,16 @@ Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::connectSignal(Kross::Api::List::Ptr args) { TQString signalname = Kross::Api::Variant::toString(args->item(0)); - TQString signalsignatur = TQString("2%1").tqarg(signalname); + TQString signalsignatur = TQString("2%1").arg(signalname); const char* signalsig = signalsignatur.latin1(); QtObject* obj = Kross::Api::Object::fromObject<Kross::Api::QtObject>(args->item(1)); TQObject* o = obj->getObject(); if(! o) - throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").tqarg(obj->getName())) ); + throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").arg(obj->getName())) ); TQString slotname = Kross::Api::Variant::toString(args->item(2)); - TQString slotsignatur = TQString("1%1").tqarg(slotname); + TQString slotsignatur = TQString("1%1").arg(slotname); const char* slotsig = slotsignatur.latin1(); return new Kross::Api::Variant( diff --git a/lib/kross/api/variant.cpp b/lib/kross/api/variant.cpp index e8d8bc1b..54e8ed7e 100644 --- a/lib/kross/api/variant.cpp +++ b/lib/kross/api/variant.cpp @@ -81,7 +81,7 @@ const TQString Variant::toString(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::String)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toString(); } @@ -89,7 +89,7 @@ int Variant::toInt(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Int)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toInt(); } @@ -97,7 +97,7 @@ uint Variant::toUInt(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::UInt)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toUInt(); } @@ -105,7 +105,7 @@ double Variant::toDouble(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Double)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toDouble(); } @@ -113,7 +113,7 @@ TQ_LLONG Variant::toLLONG(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::LongLong)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toLongLong(); } @@ -121,7 +121,7 @@ TQ_ULLONG Variant::toULLONG(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::ULongLong)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toULongLong(); } @@ -129,7 +129,7 @@ bool Variant::toBool(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Bool)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").arg(variant.typeName()).latin1()) ); return variant.toBool(); } @@ -146,7 +146,7 @@ TQStringList Variant::toStringList(Object::Ptr object) } const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::StringList)) - throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").arg(variant.typeName()).latin1()) ); return variant.toStringList(); } @@ -163,6 +163,6 @@ TQValueList<TQVariant> Variant::toList(Object::Ptr object) } const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::List)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").tqarg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").arg(variant.typeName()).latin1()) ); return variant.toList(); } diff --git a/lib/kross/main/mainmodule.cpp b/lib/kross/main/mainmodule.cpp index dde74502..8c29180f 100644 --- a/lib/kross/main/mainmodule.cpp +++ b/lib/kross/main/mainmodule.cpp @@ -79,7 +79,7 @@ EventSignal::Ptr MainModule::addSignal(const TQString& name, TQObject* sender, T { EventSignal* event = new EventSignal(name, sender, signal); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add signal name='%1' signature='%2'").tqarg(name).tqarg(signal.data()) ); + krosswarning( TQString("Failed to add signal name='%1' signature='%2'").arg(name).arg(signal.data()) ); return 0; } return event; @@ -89,7 +89,7 @@ EventSlot::Ptr MainModule::addSlot(const TQString& name, TQObject* receiver, TQC { EventSlot* event = new EventSlot(name, receiver, slot); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add slot name='%1' signature='%2'").tqarg(name).tqarg(slot.data()) ); + krosswarning( TQString("Failed to add slot name='%1' signature='%2'").arg(name).arg(slot.data()) ); return 0; } return event; @@ -99,7 +99,7 @@ QtObject::Ptr MainModule::addTQObject(TQObject* object, const TQString& name) { QtObject* qtobject = new QtObject(object, name); if(! addChild(name, qtobject)) { - krosswarning( TQString("Failed to add TQObject name='%1'").tqarg(object->name()) ); + krosswarning( TQString("Failed to add TQObject name='%1'").arg(object->name()) ); return 0; } return qtobject; @@ -109,7 +109,7 @@ EventAction::Ptr MainModule::addKAction(KAction* action, const TQString& name) { EventAction* event = new EventAction(name, action); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add KAction name='%1'").tqarg(action->name()) ); + krosswarning( TQString("Failed to add KAction name='%1'").arg(action->name()) ); return 0; } return event; diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp index 646a8746..156eb2ac 100644 --- a/lib/kross/main/manager.cpp +++ b/lib/kross/main/manager.cpp @@ -169,7 +169,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername) setException(0); // clear previous exceptions if(! d->interpreterinfos.contains(interpretername)) { - setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) ); + setException( new Exception(i18n("No such interpreter '%1'").arg(interpretername)) ); return 0; } @@ -206,22 +206,22 @@ Module::Ptr Manager::loadModule(const TQString& modulename) if(module) return module; else - krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").tqarg(modulename) ); + krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").arg(modulename) ); } KLibLoader* loader = KLibLoader::self(); KLibrary* lib = loader->globalLibrary( modulename.latin1() ); if(! lib) { - krosswarning( TQString("Failed to load module '%1': %2").tqarg(modulename).tqarg(loader->lastErrorMessage()) ); + krosswarning( TQString("Failed to load module '%1': %2").arg(modulename).arg(loader->lastErrorMessage()) ); return 0; } - krossdebug( TQString("Successfully loaded module '%1'").tqarg(modulename) ); + krossdebug( TQString("Successfully loaded module '%1'").arg(modulename) ); def_module_func func; func = (def_module_func) lib->symbol("init_module"); if(! func) { - krosswarning( TQString("Failed to determinate init function in module '%1'").tqarg(modulename) ); + krosswarning( TQString("Failed to determinate init function in module '%1'").arg(modulename) ); return 0; } @@ -235,14 +235,14 @@ Module::Ptr Manager::loadModule(const TQString& modulename) lib->unload(); if(! module) { - krosswarning( TQString("Failed to load module '%1'").tqarg(modulename) ); + krosswarning( TQString("Failed to load module '%1'").arg(modulename) ); return 0; } // Don't remember module cause we like to have freeing it handled by the caller. //d->modules.replace(modulename, module); - //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) ); + //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").arg(modulename).arg(module->toString()) ); return module; } diff --git a/lib/kross/main/scriptaction.cpp b/lib/kross/main/scriptaction.cpp index b658a0b1..f7e11618 100644 --- a/lib/kross/main/scriptaction.cpp +++ b/lib/kross/main/scriptaction.cpp @@ -152,9 +152,9 @@ ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement& if(icon.isNull()) icon = KMimeType::iconForURL( KURL(file) ); if(description.isEmpty()) - description = TQString("%1<br>%2").tqarg(text.isEmpty() ? name : text).tqarg(file); + description = TQString("%1<br>%2").arg(text.isEmpty() ? name : text).arg(file); else - description += TQString("<br>%1").tqarg(file); + description += TQString("<br>%1").arg(file); ScriptContainer::setName(file); } @@ -230,8 +230,8 @@ void ScriptAction::activate() TQString errormessage = Kross::Api::ScriptContainer::getException()->getError(); TQString tracedetails = Kross::Api::ScriptContainer::getException()->getTrace(); d->logs << TQString("<b>%1</b><br>%2") - .tqarg( TQStyleSheet::escape(errormessage) ) - .tqarg( TQStyleSheet::escape(tracedetails) ); + .arg( TQStyleSheet::escape(errormessage) ) + .arg( TQStyleSheet::escape(tracedetails) ); emit failed(errormessage, tracedetails); } else { diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp index a345dd02..7f7f980e 100644 --- a/lib/kross/main/scriptcontainer.cpp +++ b/lib/kross/main/scriptcontainer.cpp @@ -87,7 +87,7 @@ ScriptContainer::ScriptContainer(const TQString& name) : MainModule(name) , d( new ScriptContainerPrivate() ) // initialize d-pointer class { - //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").tqarg(name) ); + //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").arg(name) ); d->script = 0; d->name = name; @@ -95,7 +95,7 @@ ScriptContainer::ScriptContainer(const TQString& name) ScriptContainer::~ScriptContainer() { - //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").tqarg(d->name) ); + //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").arg(d->name) ); finalize(); delete d; @@ -164,8 +164,8 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value) if(info->hasOption(name)) { d->options.replace(name, value); return true; - } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) ); - } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) ); + } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").arg(name).arg(value.toString()) ); + } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) ); return false; } @@ -244,19 +244,19 @@ bool ScriptContainer::initialize() finalize(); if(! d->scriptfile.isNull()) { - krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").tqarg(d->scriptfile) ); + krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").arg(d->scriptfile) ); if(d->interpretername.isNull()) { d->interpretername = Manager::scriptManager()->getInterpreternameForFile( d->scriptfile ); if(d->interpretername.isNull()) { - setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").tqarg(d->scriptfile)) ); + setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").arg(d->scriptfile)) ); return false; } } TQFile f( d->scriptfile ); if(! f.open(IO_ReadOnly)) { - setException( new Exception(i18n("Failed to open scriptfile '%1'").tqarg(d->scriptfile)) ); + setException( new Exception(i18n("Failed to open scriptfile '%1'").arg(d->scriptfile)) ); return false; } d->code = TQString( f.readAll() ); @@ -265,13 +265,13 @@ bool ScriptContainer::initialize() Interpreter* interpreter = Manager::scriptManager()->getInterpreter(d->interpretername); if(! interpreter) { - setException( new Exception(i18n("Unknown interpreter '%1'").tqarg(d->interpretername)) ); + setException( new Exception(i18n("Unknown interpreter '%1'").arg(d->interpretername)) ); return false; } d->script = interpreter->createScript(this); if(! d->script) { - setException( new Exception(i18n("Failed to create script for interpreter '%1'").tqarg(d->interpretername)) ); + setException( new Exception(i18n("Failed to create script for interpreter '%1'").arg(d->interpretername)) ); return false; } if(d->script->hadException()) { diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp index bce26d5c..88877f5a 100644 --- a/lib/kross/main/scriptguiclient.cpp +++ b/lib/kross/main/scriptguiclient.cpp @@ -147,10 +147,10 @@ void ScriptGUIClient::reloadInstalledScripts() bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) { - krossdebug( TQString("Install script package: %1").tqarg(scriptpackagefile) ); + krossdebug( TQString("Install script package: %1").arg(scriptpackagefile) ); KTar archive( scriptpackagefile ); if(! archive.open(IO_ReadOnly)) { - KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").tqarg(scriptpackagefile)); + KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").arg(scriptpackagefile)); return false; } @@ -167,17 +167,17 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) if( TQDir(destination).exists() ) { if( KMessageBox::warningContinueCancel(0, - i18n("A script package with the name \"%1\" already exists. Replace this package?" ).tqarg(packagename), + i18n("A script package with the name \"%1\" already exists. Replace this package?" ).arg(packagename), i18n("Replace")) != KMessageBox::Continue ) return false; if(! KIO::NetAccess::del(destination, 0) ) { - KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(destination)); + KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(destination)); return false; } } - krossdebug( TQString("Copy script-package to destination directory: %1").tqarg(destination) ); + krossdebug( TQString("Copy script-package to destination directory: %1").arg(destination) ); const KArchiveDirectory* archivedir = archive.directory(); archivedir->copyTo(destination, true); @@ -188,7 +188,7 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath) { if(! KIO::NetAccess::del(scriptpackagepath, 0) ) { - KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(scriptpackagepath)); + KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(scriptpackagepath)); return false; } reloadInstalledScripts(); @@ -197,18 +197,18 @@ bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath) bool ScriptGUIClient::loadScriptConfigFile(const TQString& scriptconfigfile) { - krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").tqarg(scriptconfigfile) ); + krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").arg(scriptconfigfile) ); TQDomDocument domdoc; TQFile file(scriptconfigfile); if(! file.open(IO_ReadOnly)) { - krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").tqarg(scriptconfigfile) ); + krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").arg(scriptconfigfile) ); return false; } bool ok = domdoc.setContent(&file); file.close(); if(! ok) { - krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").tqarg(scriptconfigfile) ); + krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").arg(scriptconfigfile) ); return false; } @@ -244,7 +244,7 @@ bool ScriptGUIClient::loadScriptConfigDocument(const TQString& scriptconfigfile, else { // else just print a warning and fall through (so, install the action // and don't care any longer of the duplicated name)... - krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").tqarg(action->name()) ); + krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").arg(action->name()) ); } } installedcollection->attach( action ); @@ -353,7 +353,7 @@ bool ScriptGUIClient::executeScriptFile() bool ScriptGUIClient::executeScriptFile(const TQString& file) { - krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").tqarg(file) ); + krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").arg(file) ); ScriptAction::Ptr action = new ScriptAction(file); return executeScriptAction(action); diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp index cb696c5a..e521023e 100644 --- a/lib/kross/main/wdgscriptsmanager.cpp +++ b/lib/kross/main/wdgscriptsmanager.cpp @@ -95,7 +95,7 @@ class ToolTip : public TQToolTip if(item) { TQRect r( m_parent->itemRect(item) ); if(r.isValid() && item->action()) { - tip(r, TQString("<qt>%1</qt>").tqarg(item->action()->toolTip())); + tip(r, TQString("<qt>%1</qt>").arg(item->action()->toolTip())); } } } @@ -287,7 +287,7 @@ void WdgScriptsManager::slotUninstallScript() if( KMessageBox::warningContinueCancel(0, i18n("Uninstall the script package \"%1\" and delete the package's folder \"%2\"?") - .tqarg(item->action()->text()).tqarg(packagepath), + .arg(item->action()->text()).arg(packagepath), i18n("Uninstall")) != KMessageBox::Continue ) { return; @@ -321,7 +321,7 @@ void WdgScriptsManager::slotGetNewScript() { #ifdef KROSS_SUPPORT_NEWSTUFF const TQString appname = KApplication::kApplication()->name(); - const TQString type = TQString("%1/script").tqarg(appname); + const TQString type = TQString("%1/script").arg(appname); if(! d->newstuff) { d->newstuff = new ScriptNewStuff(d->m_scripguiclient, type); @@ -336,7 +336,7 @@ void WdgScriptsManager::slotGetNewScript() TQObject::connect(p, TQT_SIGNAL(providersLoaded(Provider::List*)), d, TQT_SLOT(slotProviders(Provider::List*))); - p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").tqarg(appname)); + p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").arg(appname)); d->exec(); #endif } diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.hxx index 900a347b..3aa790e6 100644 --- a/lib/kross/python/cxx/Objects.hxx +++ b/lib/kross/python/cxx/Objects.hxx @@ -54,7 +54,7 @@ namespace Py // The purpose of this class is to serve as the most general kind of // Python object, for the purpose of writing C++ extensions in Python // Objects hold a PyObject* which they own. This pointer is always a - // valid pointer to a Python object. In tqchildren we must maintain this behavior. + // valid pointer to a Python object. In children we must maintain this behavior. // // Instructions on how to make your own class MyType descended from Object: // (0) Pick a base class, either Object or perhaps SeqBase<T> or MapBase<T>. diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html index 7213ad70..e162e601 100644 --- a/lib/kross/python/cxx/PyCXX.html +++ b/lib/kross/python/cxx/PyCXX.html @@ -303,7 +303,7 @@ returned by such a function, you need to know if the function returns you an <i> or <i>unowned</i> reference. Unowned references are unusual but there are some cases where unowned references are returned.</p> -<p>Usually, <cite>Object</cite> and its tqchildren acquire a new reference when constructed from a +<p>Usually, <cite>Object</cite> and its children acquire a new reference when constructed from a <cite>PyObject *</cite>. This is usually not the right behavior if the reference comes from one of the Python C API calls.</p> @@ -1571,7 +1571,7 @@ converted to a standard string which is passed to std::ostream& operator< <p>The Python exception facility and the C++ exception facility can be merged via the use of try/catch blocks in the bodies of extension objects and module functions.</p> -<h3>Class Exception and its tqchildren</h3> +<h3>Class Exception and its children</h3> <p>A set of classes is provided. Each is derived from class Exception, and represents a particular sort of Python exception, such as IndexError, RuntimeError, ValueError. Each of @@ -1612,7 +1612,7 @@ classes are shown here.</p> </tr> <tr> <td class=code></td> - <td>Constructors for other tqchildren of class Exception</td> + <td>Constructors for other children of class Exception</td> </tr> <tr> <td class=code> </td> diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp index f13cf93a..9d8c3ece 100644 --- a/lib/kross/python/pythonextension.cpp +++ b/lib/kross/python/pythonextension.cpp @@ -31,7 +31,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object) , m_object(object) { #ifdef KROSS_PYTHON_EXTENSION_CTOR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) ); #endif behaviors().name("KrossPythonExtension"); @@ -55,7 +55,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object) PythonExtension::~PythonExtension() { #ifdef KROSS_PYTHON_EXTENSION_DTOR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) ); #endif delete m_proxymethod; } @@ -77,7 +77,7 @@ Py::Object PythonExtension::repr() Py::Object PythonExtension::getattr(const char* n) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").tqarg(n) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").arg(n) ); #endif if(n[0] == '_') { @@ -86,7 +86,7 @@ Py::Object PythonExtension::getattr(const char* n) TQStringList calls = m_object->getCalls(); for(TQStringList::Iterator it = calls.begin(); it != calls.end(); ++it) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").tqarg(n).tqarg(*it) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").arg(n).arg(*it) ); #endif methods.append(Py::String( (*it).latin1() )); } @@ -97,11 +97,11 @@ Py::Object PythonExtension::getattr(const char* n) Py::List members; Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(m_object.data()); if(callable) { - TQMap<TQString, Kross::Api::Object::Ptr> tqchildren = callable->getChildren(); - TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( tqchildren.begin() ); - for(; it != tqchildren.end(); ++it) { + TQMap<TQString, Kross::Api::Object::Ptr> children = callable->getChildren(); + TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( children.begin() ); + for(; it != children.end(); ++it) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").tqarg(n).tqarg(it.key()) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").arg(n).arg(it.key()) ); #endif members.append(Py::String( it.key().latin1() )); } @@ -109,11 +109,11 @@ Py::Object PythonExtension::getattr(const char* n) return members; } - //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").tqarg(n) ); return Py::None(); } - //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").tqarg(n) ); return Py::None(); } + //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").arg(n) ); return Py::None(); } + //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").arg(n) ); return Py::None(); } #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").tqarg(n) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").arg(n) ); #endif return Py::PythonExtension<PythonExtension>::getattr_methods(n); } @@ -130,7 +130,7 @@ Py::Object PythonExtension::getattr(const char* n) Py::Object PythonExtension::getattr_methods(const char* n) { #ifdef KROSS_PYTHON_EXTENSION_GETATTRMETHOD_DEBUG - krossdebug( TQString("PythonExtension::getattr_methods name=%1").tqarg(n) ); + krossdebug( TQString("PythonExtension::getattr_methods name=%1").arg(n) ); #endif return Py::PythonExtension<PythonExtension>::getattr_methods(n); } @@ -138,7 +138,7 @@ Py::Object PythonExtension::getattr_methods(const char* n) int PythonExtension::setattr(const char* name, const Py::Object& value) { #ifdef KROSS_PYTHON_EXTENSION_SETATTR_DEBUG - krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").tqarg(name).tqarg(value.as_string().c_str()) ); + krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").arg(name).arg(value.as_string().c_str()) ); #endif return Py::PythonExtension<PythonExtension>::setattr(name, value); } @@ -185,13 +185,13 @@ Kross::Api::Dict::Ptr PythonExtension::toObject(const Py::Dict& dict) Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object) { #ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").tqarg(object.as_string().c_str()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").arg(object.as_string().c_str()) ); #endif if(object == Py::None()) return 0; PyTypeObject *type = (PyTypeObject*) object.type().ptr(); #ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").tqarg(type->tp_name) ); + krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").arg(type->tp_name) ); #endif if(type == &PyInt_Type) return new Kross::Api::Variant(int(Py::Int(object))); @@ -287,7 +287,7 @@ const Py::List PythonExtension::toPyObject(const TQValueList<TQVariant>& list) const Py::Object PythonExtension::toPyObject(const TQVariant& variant) { #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").tqarg(variant.typeName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").arg(variant.typeName()) ); #endif switch(variant.type()) { @@ -331,7 +331,7 @@ const Py::Object PythonExtension::toPyObject(const TQVariant& variant) } break; default: { - krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").tqarg(variant.typeName()) ); + krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").arg(variant.typeName()) ); return Py::None(); } } @@ -350,7 +350,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) if(classname == "Kross::Api::Variant") { TQVariant v = static_cast<Kross::Api::Variant*>( object.data() )->getValue(); #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").tqarg(v.toString()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").arg(v.toString()) ); #endif return toPyObject(v); } @@ -382,7 +382,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) } #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").tqarg(object->getClassName()) ); + krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").arg(object->getClassName()) ); #endif return Py::asObject( new PythonExtension(object) ); } @@ -390,7 +390,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) const Py::Tuple PythonExtension::toPyTuple(Kross::Api::List::Ptr list) { #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").tqarg(list ? list->getName() : "NULL") ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").arg(list ? list->getName() : "NULL") ); #endif uint count = list ? list->count() : 0; Py::Tuple tuple(count); @@ -409,20 +409,20 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject Kross::Api::List::Ptr arguments = toObject( Py::Tuple(args) ); #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").tqarg(methodname).tqarg(arguments->toString()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").arg(methodname).arg(arguments->toString()) ); #endif Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(self->m_object.data()); if(callable && callable->hasChild(methodname)) { #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").arg(methodname).arg(self->m_object->getName()) ); #endif Py::Object result = toPyObject( callable->getChild(methodname)->call(TQString(), arguments) ); result.increment_reference_count(); return result.ptr(); } #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").arg(methodname).arg(self->m_object->getName()) ); #endif Py::Object result = toPyObject( self->m_object->call(methodname, arguments) ); result.increment_reference_count(); @@ -430,12 +430,12 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject } catch(Py::Exception& e) { const TQString err = Py::value(e).as_string().c_str(); - krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) ); + krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) ); //throw e; } catch(Kross::Api::Exception::Ptr e) { const TQString err = e->toString(); - krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) ); + krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) ); // Don't throw here cause it will end in a crash deep in python. The // error is already handled anyway. //throw Py::Exception( (char*) e->toString().latin1() ); diff --git a/lib/kross/python/pythoninterpreter.cpp b/lib/kross/python/pythoninterpreter.cpp index 23f4b8fb..ded5dbc9 100644 --- a/lib/kross/python/pythoninterpreter.cpp +++ b/lib/kross/python/pythoninterpreter.cpp @@ -122,14 +122,14 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info) // Set the extended sys.path. PySys_SetPath( (char*) path.latin1() ); - krossdebug(TQString("Python ProgramName: %1").tqarg(Py_GetProgramName())); - krossdebug(TQString("Python ProgramFullPath: %1").tqarg(Py_GetProgramFullPath())); - krossdebug(TQString("Python Version: %1").tqarg(Py_GetVersion())); - krossdebug(TQString("Python Platform: %1").tqarg(Py_GetPlatform())); - krossdebug(TQString("Python Prefix: %1").tqarg(Py_GetPrefix())); - krossdebug(TQString("Python ExecPrefix: %1").tqarg(Py_GetExecPrefix())); - krossdebug(TQString("Python Path: %1").tqarg(Py_GetPath())); - krossdebug(TQString("Python System Path: %1").tqarg(path)); + krossdebug(TQString("Python ProgramName: %1").arg(Py_GetProgramName())); + krossdebug(TQString("Python ProgramFullPath: %1").arg(Py_GetProgramFullPath())); + krossdebug(TQString("Python Version: %1").arg(Py_GetVersion())); + krossdebug(TQString("Python Platform: %1").arg(Py_GetPlatform())); + krossdebug(TQString("Python Prefix: %1").arg(Py_GetPrefix())); + krossdebug(TQString("Python ExecPrefix: %1").arg(Py_GetExecPrefix())); + krossdebug(TQString("Python Path: %1").arg(Py_GetPath())); + krossdebug(TQString("Python System Path: %1").arg(path)); // Initialize the main module. d->mainmodule = new PythonModule(this); @@ -179,7 +179,7 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info) PyObject* pyrun = PyRun_String(s.latin1(), Py_file_input, moduledict.ptr(), moduledict.ptr()); if(! pyrun) { Py::Object errobj = Py::value(Py::Exception()); // get last error - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").tqarg(errobj.as_string().c_str())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").arg(errobj.as_string().c_str())) ); } Py_XDECREF(pyrun); // free the reference. diff --git a/lib/kross/python/pythonmodule.cpp b/lib/kross/python/pythonmodule.cpp index 24b43159..48131bb8 100644 --- a/lib/kross/python/pythonmodule.cpp +++ b/lib/kross/python/pythonmodule.cpp @@ -65,7 +65,7 @@ PythonModule::PythonModule(PythonInterpreter* interpreter) PythonModule::~PythonModule() { #ifdef KROSS_PYTHON_MODULE_DEBUG - krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").tqarg(name().c_str()) ); + krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").arg(name().c_str()) ); #endif delete d; @@ -82,16 +82,16 @@ Py::Object PythonModule::import(const Py::Tuple& args) TQString modname = args[0].as_string().c_str(); if(modname.startsWith("kross")) { #ifdef KROSS_PYTHON_MODULE_DEBUG - krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").tqarg(modname) ); + krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").arg(modname) ); #endif if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); + krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); } else { Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname); if(module) return PythonExtension::toPyObject( Kross::Api::Object::Ptr(module) ); - krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) ); + krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) ); } } diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp index 9689d222..e72ad0bb 100644 --- a/lib/kross/python/pythonobject.cpp +++ b/lib/kross/python/pythonobject.cpp @@ -46,7 +46,7 @@ PythonObject::PythonObject(const Py::Object& object) if(o.isSequence()) t += "isSequence "; if(o.isTrue()) t += "isTrue "; if(o.isInstance()) t += "isInstance "; - krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").tqarg( (*i).str().as_string().c_str() ).tqarg(t) ); + krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").arg( (*i).str().as_string().c_str() ).arg(t) ); if(o.isCallable()) m_calls.append( (*i).str().as_string().c_str() ); @@ -64,7 +64,7 @@ const TQString PythonObject::getClassName() const Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::List::Ptr arguments) { - krossdebug( TQString("PythonObject::call(%1)").tqarg(name) ); + krossdebug( TQString("PythonObject::call(%1)").arg(name) ); if(m_pyobject.isInstance()) { //if(! m_calls.contains(n)) throw ... @@ -72,11 +72,11 @@ Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::Lis PyObject* r = PyObject_CallMethod(m_pyobject.ptr(), (char*) name.latin1(), 0); if(! r) { //FIXME happens too if e.g. number of arguments doesn't match !!! Py::Object errobj = Py::value(Py::Exception()); // get last error - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").tqarg(name).tqarg(errobj.as_string().c_str())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").arg(name).arg(errobj.as_string().c_str())) ); } Py::Object result(r, true); - //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").tqarg(name).tqarg(result.as_string().c_str()) ); + //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").arg(name).arg(result.as_string().c_str()) ); return PythonExtension::toObject(result); } /*TODO??? ELSE create class instance for class-definitions??? diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp index 2329a1d1..8887e13d 100644 --- a/lib/kross/python/pythonscript.cpp +++ b/lib/kross/python/pythonscript.cpp @@ -88,7 +88,7 @@ void PythonScript::initialize() try { if(m_scriptcontainer->getCode().isNull()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").tqarg( m_scriptcontainer->getName() )) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").arg( m_scriptcontainer->getName() )) ); if(m_scriptcontainer->getName().isNull()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Name for the script is invalid!")) ); @@ -96,10 +96,10 @@ void PythonScript::initialize() PyObject* pymod = PyModule_New( (char*) m_scriptcontainer->getName().latin1() ); d->m_module = new Py::Module(pymod, true); if(! d->m_module) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").tqarg( m_scriptcontainer->getName() )) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").arg( m_scriptcontainer->getName() )) ); #ifdef KROSS_PYTHON_SCRIPT_INIT_DEBUG - krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) ); + krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) ); #endif // Set the "self" variable to point to the ScriptContainer @@ -131,7 +131,7 @@ void PythonScript::initialize() PyObject* code = 0; bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false,0), true).toBool(); - krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").tqarg(m_scriptcontainer->getName()).tqarg(restricted) ); + krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").arg(m_scriptcontainer->getName()).arg(restricted) ); if(restricted) { // Use the RestrictedPython module wrapped by the PythonSecurity class. @@ -160,7 +160,7 @@ void PythonScript::initialize() } catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").tqarg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").arg(err) ); e.clear(); // exception is handled. clear it now. throw exception; } @@ -170,7 +170,7 @@ void PythonScript::finalize() { #ifdef KROSS_PYTHON_SCRIPT_FINALIZE_DEBUG if(d->m_module) - krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) ); + krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) ); #endif delete d->m_module; d->m_module = 0; @@ -205,7 +205,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error) catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); // exception is handled. clear it now. - krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").tqarg(err) ); + krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").arg(err) ); } PyObject *next; @@ -226,7 +226,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error) //const char* filename = PyString_AsString(frame->f_code->co_filename); //const char* name = PyString_AsString(frame->f_code->co_name); - //errorlist.append( TQString("%1#%2: \"%3\"").tqarg(filename).tqarg(lineno).tqarg(name) ); + //errorlist.append( TQString("%1#%2: \"%3\"").arg(filename).arg(lineno).arg(name) ); next = PyObject_GetAttrString(traceback, "tb_next"); Py_DECREF(traceback); @@ -318,20 +318,20 @@ Kross::Api::Object::Ptr PythonScript::execute() Py::Object result(pyresult, true); #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() result=%1").tqarg(result.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() result=%1").arg(result.as_string().c_str()) ); #endif for(Py::Dict::iterator it = moduledict.begin(); it != moduledict.end(); ++it) { Py::Dict::value_type vt(*it); if(PyClass_Check( vt.second.ptr() )) { #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() class '%1' added.").tqarg(vt.first.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() class '%1' added.").arg(vt.first.as_string().c_str()) ); #endif d->m_classes.append( vt.first.as_string().c_str() ); } else if(vt.second.isCallable()) { #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() function '%1' added.").tqarg(vt.first.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() function '%1' added.").arg(vt.first.as_string().c_str()) ); #endif d->m_functions.append( vt.first.as_string().c_str() ); } @@ -347,13 +347,13 @@ Kross::Api::Object::Ptr PythonScript::execute() errobj = Py::type(e); TQString err = errobj.as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) ); e.clear(); // exception is handled. clear it now. setException( exception ); } catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) ); e.clear(); // exception is handled. clear it now. setException( exception ); } @@ -369,8 +369,8 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: { #ifdef KROSS_PYTHON_SCRIPT_CALLFUNC_DEBUG krossdebug( TQString("PythonScript::callFunction(%1, %2)") - .tqarg(name) - .tqarg(args ? TQString::number(args->count()) : TQString("NULL")) ); + .arg(name) + .arg(args ? TQString::number(args->count()) : TQString("NULL")) ); #endif if(hadException()) return 0; // abort if we had an unresolved exception. @@ -387,7 +387,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: PyObject* func = PyDict_GetItemString(moduledict.ptr(), name.latin1()); if( (! d->m_functions.contains(name)) || (! func) ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg(name)) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. @@ -402,7 +402,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); // exception is handled. clear it now. - setException( new Kross::Api::Exception(TQString("Python Exception: %1").tqarg(err)) ); + setException( new Kross::Api::Exception(TQString("Python Exception: %1").arg(err)) ); } catch(Kross::Api::Exception::Ptr e) { setException(e); @@ -433,16 +433,16 @@ Kross::Api::Object::Ptr PythonScript::classInstance(const TQString& name) // Try to determinate the class. PyObject* pyclass = PyDict_GetItemString(moduledict.ptr(), name.latin1()); if( (! d->m_classes.contains(name)) || (! pyclass) ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").tqarg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").arg(name)) ); PyObject *pyobj = PyInstance_New(pyclass, 0, 0);//aclarg, 0); if(! pyobj) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").tqarg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").arg(name)) ); Py::Object classobject(pyobj, true); #ifdef KROSS_PYTHON_SCRIPT_CLASSINSTANCE_DEBUG - krossdebug( TQString("PythonScript::classInstance() inst='%1'").tqarg(classobject.as_string().c_str()) ); + krossdebug( TQString("PythonScript::classInstance() inst='%1'").arg(classobject.as_string().c_str()) ); #endif return PythonExtension::toObject(classobject); } diff --git a/lib/kross/python/pythonsecurity.cpp b/lib/kross/python/pythonsecurity.cpp index 941ed0c6..9a7712cb 100644 --- a/lib/kross/python/pythonsecurity.cpp +++ b/lib/kross/python/pythonsecurity.cpp @@ -90,7 +90,7 @@ void PythonSecurity::initRestrictedPython() catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").tqarg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").arg(err) ) ); } } @@ -115,12 +115,12 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr PyObject* func = PyDict_GetItemString(m_pymodule->getDict().ptr(), "compile_restricted"); if(! func) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg("compile_restricted")) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. if(! funcobject.isCallable()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").tqarg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").arg("compile_restricted")) ); Py::Tuple args(3); args[0] = Py::String(source.utf8()); @@ -140,17 +140,17 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr /* Py::List ml = mainmoduledict; for(Py::List::size_type mi = 0; mi < ml.length(); ++mi) { - krossdebug( TQString("dir() = %1").tqarg( ml[mi].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").arg( ml[mi].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); } */ Py::Object code(pycode); - krossdebug( TQString("%1 callable=%2").tqarg(code.as_string().c_str()).tqarg(PyCallable_Check(code.ptr())) ); + krossdebug( TQString("%1 callable=%2").arg(code.as_string().c_str()).arg(PyCallable_Check(code.ptr())) ); Py::List l = code.dir(); for(Py::List::size_type i = 0; i < l.length(); ++i) { - krossdebug( TQString("dir() = %1").tqarg( l[i].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(l[i]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").arg( l[i].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(l[i]).dir().as_string().c_str() ) ); } return pycode; @@ -158,7 +158,7 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").tqarg("compile_restricted").tqarg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").arg("compile_restricted").arg(err) ) ); } } diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp index 6c2cb40f..98474bf6 100644 --- a/lib/kross/ruby/rubyextension.cpp +++ b/lib/kross/ruby/rubyextension.cpp @@ -66,7 +66,7 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU TQString funcname = rb_id2name(SYM2ID(argv[0])); TQValueList<Api::Object::Ptr> argsList; #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").tqarg(funcname).tqarg(argc-1)); + krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").arg(funcname).arg(argc-1)); #endif for(int i = 1; i < argc; i++) { @@ -79,13 +79,13 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(object.data()); if(callable && callable->hasChild(funcname)) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").tqarg(funcname).tqarg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").arg(funcname).arg(object->getName()) ); #endif result = callable->getChild(funcname)->call(TQString(), new Api::List(argsList)); } else { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").tqarg(funcname).tqarg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").arg(funcname).arg(object->getName()) ); #endif result = object->call(funcname, new Api::List(argsList)); } @@ -184,7 +184,7 @@ VALUE RubyExtension::convertFromException(Kross::Api::Exception::Ptr exc) Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("RubyExtension::toObject of type %1").tqarg(TYPE(value))); + krossdebug(TQString("RubyExtension::toObject of type %1").arg(TYPE(value))); #endif switch( TYPE( value ) ) { @@ -251,7 +251,7 @@ Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) case T_MODULE: case T_ICLASS: case T_CLASS: - krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").tqarg(TYPE(value))); + krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").arg(TYPE(value))); default: case T_NIL: return 0; @@ -329,7 +329,7 @@ VALUE RubyExtension::toVALUE(const TQVariant& variant) case TQVariant::ULongLong: return UINT2NUM((unsigned long)variant.toULongLong()); default: { - krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").tqarg(variant.typeName()) ); + krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").arg(variant.typeName()) ); return Qundef; } } diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 4a4df32f..6af8ecbe 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -121,9 +121,9 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) #endif TQString modname = StringValuePtr(name); if(modname.startsWith("kross")) { - krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) ); + krossdebug( TQString("RubyInterpreter::require() module=%1").arg(modname) ); if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); + krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); } else { Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname); @@ -136,7 +136,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) // rb_define_variable( ("$" + modname).ascii(), & RubyInterpreter::d->m_modules.insert( mStrVALUE::value_type( modname, rm) ).first->second ); return Qtrue; } - krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) ); + krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) ); } } else { return rb_f_require(obj, name); diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp index 73012b89..948a10ee 100644 --- a/lib/kross/ruby/rubymodule.cpp +++ b/lib/kross/ruby/rubymodule.cpp @@ -37,7 +37,7 @@ RubyModule::RubyModule(Kross::Api::Module::Ptr mod, TQString modname) : d(new Ru { d->m_module = mod; modname = modname.left(1).upper() + modname.right(modname.length() - 1 ); - krossdebug(TQString("Module: %1").tqarg(modname)); + krossdebug(TQString("Module: %1").arg(modname)); VALUE rmodule = rb_define_module(modname.ascii()); rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1); VALUE rm = RubyExtension::toVALUE( mod.data() ); @@ -52,7 +52,7 @@ VALUE RubyModule::method_missing(int argc, VALUE *argv, VALUE self) { #ifdef KROSS_RUBY_MODULE_DEBUG TQString funcname = rb_id2name(SYM2ID(argv[0])); - krossdebug(TQString("Function %1 missing in a module").tqarg(funcname)); + krossdebug(TQString("Function %1 missing in a module").arg(funcname)); #endif VALUE rubyObjectModule = rb_funcall( self, rb_intern("const_get"), 1, ID2SYM(rb_intern("MODULEOBJ")) ); diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp index dc0fbb16..370d4aa7 100644 --- a/lib/kross/ruby/rubyscript.cpp +++ b/lib/kross/ruby/rubyscript.cpp @@ -87,7 +87,7 @@ void RubyScript::compile() #ifdef KROSS_RUBY_SCRIPT_DEBUG krossdebug("Compilation has failed"); #endif - setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error d->m_compile = 0; } #ifdef KROSS_RUBY_SCRIPT_DEBUG @@ -133,7 +133,7 @@ Kross::Api::Object::Ptr RubyScript::execute() #endif setException( RubyExtension::convertToException( ruby_errinfo ) ); } else { - setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error } } diff --git a/lib/kross/runner/main.cpp b/lib/kross/runner/main.cpp index 570e2610..1093a47b 100644 --- a/lib/kross/runner/main.cpp +++ b/lib/kross/runner/main.cpp @@ -82,13 +82,13 @@ int runScriptFile(const TQString& scriptfile) // We had an exception. TQString errormessage = scriptcontainer->getException()->getError(); TQString tracedetails = scriptcontainer->getException()->getTrace(); - std::cerr << TQString("%2\n%1").tqarg(tracedetails).tqarg(errormessage).latin1() << std::endl; + std::cerr << TQString("%2\n%1").arg(tracedetails).arg(errormessage).latin1() << std::endl; return ERROR_EXCEPTION; } } catch(Kross::Api::Exception::Ptr e) { // Normaly that shouldn't be the case... - std::cerr << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl; + std::cerr << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl; return ERROR_UNHALDEDEXCEPTION; } return ERROR_OK; diff --git a/lib/kross/test/main.cpp b/lib/kross/test/main.cpp index 42198201..7f304ba6 100644 --- a/lib/kross/test/main.cpp +++ b/lib/kross/test/main.cpp @@ -107,7 +107,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) if(testclassinstance) { TQValueList<Kross::Api::Object*> ll; Kross::Api::Object* instancecallresult = testclassinstance->call("testClassFunction1", Kross::Api::List::create(ll)); - //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").tqarg( instancecallresult.toString() ) ); + //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").arg( instancecallresult.toString() ) ); } */ @@ -121,7 +121,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) */ } catch(Kross::Api::Exception::Ptr e) { - std::cout << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl; + std::cout << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl; } /*TESTCASE @@ -132,7 +132,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) sc2->execute(); } catch(Kross::Api::Exception& e) { - krossdebug( TQString("EXCEPTION type='%1' description='%2'").tqarg(e.type()).tqarg(e.description()) ); + krossdebug( TQString("EXCEPTION type='%1' description='%2'").arg(e.type()).arg(e.description()) ); } //delete sc2; */ @@ -181,7 +181,7 @@ int main(int argc, char **argv) } } else { - Kross::krosswarning( TQString("Failed to load scriptfile: %1").tqarg(scriptfilename) ); + Kross::krosswarning( TQString("Failed to load scriptfile: %1").arg(scriptfilename) ); result = -1; } diff --git a/lib/kross/test/testobject.cpp b/lib/kross/test/testobject.cpp index eb687d02..884e7e37 100644 --- a/lib/kross/test/testobject.cpp +++ b/lib/kross/test/testobject.cpp @@ -48,24 +48,24 @@ TestObject::~TestObject() uint TestObject::func1(uint i) { - Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").tqarg(i) ); + Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").arg(i) ); return i; } void TestObject::func2(TQString s, int i) { - Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").tqarg(s).tqarg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").arg(s).arg(i)); } TQString TestObject::func3(TQString s, int i) { - Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").tqarg(s).tqarg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").arg(s).arg(i)); return s; } const TQString& TestObject::func4(const TQString& s, int i) const { - Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").tqarg(s).tqarg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").arg(s).arg(i)); return s; } @@ -83,13 +83,13 @@ void TestObject::testSlot2() void TestObject::stdoutSlot(const TQString& s) { - Kross::krossdebug(TQString("stdout: %1").tqarg(s)); + Kross::krossdebug(TQString("stdout: %1").arg(s)); //std::cout << "<stdout> " << s.latin1() << std::endl; } void TestObject::stderrSlot(const TQString& s) { - Kross::krossdebug(TQString("stderr: %1").tqarg(s)); + Kross::krossdebug(TQString("stderr: %1").arg(s)); //std::cout << "<stderr> " << s.latin1() << std::endl; } diff --git a/lib/kross/test/testwindow.cpp b/lib/kross/test/testwindow.cpp index 5aa33958..ec2960b0 100644 --- a/lib/kross/test/testwindow.cpp +++ b/lib/kross/test/testwindow.cpp @@ -53,7 +53,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc"); else Kross::krossdebug("-------------------------222222"); - Kross::krossdebug(TQString("XML-file: %1").tqarg(file)); + Kross::krossdebug(TQString("XML-file: %1").arg(file)); m_scriptextension->setXMLFile(file); //menuFile->insertSeparator(); @@ -99,11 +99,11 @@ void TestWindow::execute() m_scriptcontainer->setCode(m_codeedit->text()); Kross::Api::Object::Ptr result = m_scriptcontainer->execute(); if(m_scriptcontainer->hadException()) { - Kross::krossdebug( TQString("EXCEPTION => %1").tqarg(m_scriptcontainer->getException()->toString()) ); + Kross::krossdebug( TQString("EXCEPTION => %1").arg(m_scriptcontainer->getException()->toString()) ); } else { TQString s = result ? result->toString() : TQString(); - Kross::krossdebug( TQString("DONE => %1").tqarg(s) ); + Kross::krossdebug( TQString("DONE => %1").arg(s) ); } } diff --git a/lib/kwmf/kowmfreadprivate.h b/lib/kwmf/kowmfreadprivate.h index ea95e563..feebe0b3 100644 --- a/lib/kwmf/kowmfreadprivate.h +++ b/lib/kwmf/kowmfreadprivate.h @@ -112,7 +112,7 @@ public: /****************** Text *******************/ /// set text color void setTextColor( TQ_UINT32 size, TQDataStream& stream ); - /// set text tqalignment + /// set text alignment void setTextAlign( TQ_UINT32 size, TQDataStream& stream ); /// draw text void textOut( TQ_UINT32 size, TQDataStream& stream ); diff --git a/lib/kwmf/kwmf.cc b/lib/kwmf/kwmf.cc index 0a0d2c12..d8965537 100644 --- a/lib/kwmf/kwmf.cc +++ b/lib/kwmf/kwmf.cc @@ -351,7 +351,7 @@ bool KWmf::parse( bool isPlaceable; bool isEnhanced; - startedAt = stream.tqdevice()->at(); + startedAt = stream.device()->at(); stream.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! for (int i = 0; i < s_maxHandles; i++) @@ -477,7 +477,7 @@ bool KWmf::parse( } else { - stream.tqdevice()->at(startedAt); + stream.device()->at(startedAt); m_dpi = (unsigned)((double)576 / m_dpi); m_windowOrgX = 0; m_windowOrgY = 0; @@ -487,7 +487,7 @@ bool KWmf::parse( //----- Read as enhanced metafile header - fileAt = stream.tqdevice()->at(); + fileAt = stream.device()->at(); stream >> eheader.iType; stream >> eheader.nSize; stream >> eheader.rclBounds.left; @@ -539,7 +539,7 @@ bool KWmf::parse( { // debug("WMF Header"); //----- Read as standard metafile header - stream.tqdevice()->at(fileAt); + stream.device()->at(fileAt); stream >> header.mtType; stream >> header.mtHeaderSize; stream >> header.mtVersion; @@ -558,7 +558,7 @@ bool KWmf::parse( */ } - walk((size - (stream.tqdevice()->at() - startedAt)) / 2, stream); + walk((size - (stream.device()->at() - startedAt)) / 2, stream); return true; } diff --git a/lib/kwmf/qwmf.cc b/lib/kwmf/qwmf.cc index e9cafee1..aabe4021 100644 --- a/lib/kwmf/qwmf.cc +++ b/lib/kwmf/qwmf.cc @@ -348,7 +348,7 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute ) mWinding = false; mAbsoluteCoord = absolute; - mPainter.tqbegin( const_cast<TQPaintDevice*>(aTarget) ); + mPainter.begin( const_cast<TQPaintDevice*>(aTarget) ); if ( TQWMF_DEBUG ) { kdDebug() << "Bounding box : " << mBBox.left() << " " << mBBox.top() << " " << mBBox.right() << " " << mBBox.bottom() << endl; @@ -762,7 +762,7 @@ void QWinMetaFile::extTextOut( long num, short* parm ) mPainter.translate( -parm[ 1 ], -parm[ 0 ] ); } - // tqalignment + // alignment if ( mTextAlign & 0x06 ) x -= ( width / 2 ); if ( mTextAlign & 0x08 ) diff --git a/lib/kwmf/qwmf.h b/lib/kwmf/qwmf.h index 3bc668c9..cf05d617 100644 --- a/lib/kwmf/qwmf.h +++ b/lib/kwmf/qwmf.h @@ -139,7 +139,7 @@ public: // should be protected but cannot /****************** Text *******************/ /** set text color */ void setTextColor( long num, short* parms ); - /** set text tqalignment */ + /** set text alignment */ void setTextAlign( long num, short* parms ); /** draw text */ void textOut( long num, short* parms ); diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 76e5aa72..894a7b39 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -72,7 +72,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) return false; } m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); - if ( !m_stream->tqopen( iomode ) ) + if ( !m_stream->open( iomode ) ) { delete m_stream; m_stream = 0L; diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp index f3568606..5fff1e83 100644 --- a/lib/store/KoXmlWriter.cpp +++ b/lib/store/KoXmlWriter.cpp @@ -104,7 +104,7 @@ void KoXmlWriter::startElement( const char* tagName, bool indentInside ) { Q_ASSERT( tagName != 0 ); - // Tell parent that it has tqchildren + // Tell parent that it has children bool parentIndent = prepareForChild(); m_tags.push( Tag( tagName, parentIndent && indentInside ) ); diff --git a/lib/store/KoXmlWriter.h b/lib/store/KoXmlWriter.h index 5261dd5f..eaf453d2 100644 --- a/lib/store/KoXmlWriter.h +++ b/lib/store/KoXmlWriter.h @@ -226,7 +226,7 @@ private: : tagName( t ), hasChildren( false ), lastChildIsText( false ), openingTagClosed( false ), indentInside( ind ) {} const char* tagName; - bool hasChildren; ///< element or text tqchildren + bool hasChildren; ///< element or text children bool lastChildIsText; ///< last child is a text node bool openingTagClosed; ///< true once the '\>' in \<tag a="b"\> is written out bool indentInside; ///< whether to indent the contents of this tag diff --git a/lib/store/tests/storedroptest.cpp b/lib/store/tests/storedroptest.cpp index a27bfc41..fccb27c0 100644 --- a/lib/store/tests/storedroptest.cpp +++ b/lib/store/tests/storedroptest.cpp @@ -127,11 +127,11 @@ void StoreDropTest::showZipContents( TQByteArray data, const char* mimeType, boo TQString StoreDropTest::loadTextFile( KoStore* store, const TQString& fileName ) { if ( !store->open( fileName ) ) - return TQString( "%1 not found\n" ).tqarg( fileName ); + return TQString( "%1 not found\n" ).arg( fileName ); TQByteArray data = store->device()->readAll(); store->close(); - TQString txt = TQString( "Found %1: \n" ).tqarg( fileName ); + TQString txt = TQString( "Found %1: \n" ).arg( fileName ); txt += TQString::fromUtf8( data.data(), data.size() ); txt += "\n"; return txt; |