diff options
Diffstat (limited to 'lib/kformula')
47 files changed, 436 insertions, 436 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; |