diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 04766b207afba7961d4d802313e426f5a2fbef63 (patch) | |
tree | c888ea1027c793e2d0386a7e5a1a0cd077b03cb3 /lib/kformula | |
parent | b6edfe41c9395f2e20784cbf0e630af6426950a3 (diff) | |
download | koffice-04766b207afba7961d4d802313e426f5a2fbef63.tar.gz koffice-04766b207afba7961d4d802313e426f5a2fbef63.zip |
rename the following methods:
tqparent parent
tqmask mask
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kformula')
65 files changed, 438 insertions, 438 deletions
diff --git a/lib/kformula/DESIGN b/lib/kformula/DESIGN index fc404921..3402d9ee 100644 --- a/lib/kformula/DESIGN +++ b/lib/kformula/DESIGN @@ -20,15 +20,15 @@ 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 tqparent. + already defines that tqchildren must be known by their parent. - knows its bounding rectangle (its size.) The tqchildren are included - in this rect. (The position is relative to the tqparent.) + 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 keep open the possibility of negative positions (out of bounding rect) - draws itself (given a painter); tqchildren are drawn, too - knows all positions where the cursor is allowed to be. (see below) -- knows its tqparent; The topmost element has no tqparent; there is a +- 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) @@ -62,11 +62,11 @@ between parenthesis" i.e. as content child of a delimiterelement) FormulaElement from SequenceElement -------------- -The only element those tqparent is null. The root of the element object +The only element those parent is null. The root of the element object tree. This is the element that is created by the KFormulaDoc and that knows -about it. As every other element knows its tqparent and therefore the +about it. As every other element knows its parent and therefore the FormulaElement we get a chance to pass messages to the outside world. @@ -129,7 +129,7 @@ GeometryElement from BasicElement --------------- One child. -Draw it at a fixed position relative to tqparent or absolute. +Draw it at a fixed position relative to parent or absolute. This is to do dirty things. This element must not be used, kformula will provide you everything @@ -193,9 +193,9 @@ before, between and after its tqchildren, too. - Each element's tqchildren 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 tqparent. +cursor. If there is child left the cursor is passed to the parent. -- If the cursor comes from our tqparent the first or the last child gets +- If the cursor comes from our parent the first or the last child gets it. Depending on the direction in which the cursor moved. Please note that because each element knows its own cursor positions diff --git a/lib/kformula/MatrixDialog.cc b/lib/kformula/MatrixDialog.cc index a0536c1d..c8169f24 100644 --- a/lib/kformula/MatrixDialog.cc +++ b/lib/kformula/MatrixDialog.cc @@ -30,8 +30,8 @@ KFORMULA_NAMESPACE_BEGIN const int DEFAULT_SIZE = 3; const int MAX_SIZE = 200; -MatrixDialog::MatrixDialog( TQWidget *tqparent, int _width, int _height ) - : KDialogBase(tqparent, "Matrix Dialog", true,i18n("Add Matrix"),Ok|Cancel) +MatrixDialog::MatrixDialog( TQWidget *parent, int _width, int _height ) + : KDialogBase(parent, "Matrix Dialog", true,i18n("Add Matrix"),Ok|Cancel) { w = _width; h = _height; diff --git a/lib/kformula/MatrixDialog.h b/lib/kformula/MatrixDialog.h index 06688b90..62e104c9 100644 --- a/lib/kformula/MatrixDialog.h +++ b/lib/kformula/MatrixDialog.h @@ -41,7 +41,7 @@ public: int w; int h; - MatrixDialog( TQWidget *tqparent, int width = 3, int height = 3 ); + MatrixDialog( TQWidget *parent, int width = 3, int height = 3 ); ~MatrixDialog() {} protected slots: diff --git a/lib/kformula/actionelement.cc b/lib/kformula/actionelement.cc index 5fa5a38e..d4ef8ec4 100644 --- a/lib/kformula/actionelement.cc +++ b/lib/kformula/actionelement.cc @@ -22,7 +22,7 @@ KFORMULA_NAMESPACE_BEGIN -ActionElement::ActionElement( BasicElement* tqparent ) : SequenceElement( tqparent ), +ActionElement::ActionElement( BasicElement* parent ) : SequenceElement( parent ), m_selection( 0 ) { } diff --git a/lib/kformula/actionelement.h b/lib/kformula/actionelement.h index 9c7342d5..09c4d0ab 100644 --- a/lib/kformula/actionelement.h +++ b/lib/kformula/actionelement.h @@ -32,7 +32,7 @@ KFORMULA_NAMESPACE_BEGIN class ActionElement : public SequenceElement { typedef SequenceElement inherited; public: - ActionElement( BasicElement* tqparent = 0 ); + ActionElement( BasicElement* parent = 0 ); virtual int buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDomNode n); private: diff --git a/lib/kformula/basicelement.cc b/lib/kformula/basicelement.cc index 1d36193a..096814aa 100644 --- a/lib/kformula/basicelement.cc +++ b/lib/kformula/basicelement.cc @@ -34,7 +34,7 @@ using namespace std; int BasicElement::evilDestructionCount = 0; BasicElement::BasicElement( BasicElement* p ) - : tqparent( p ), m_baseline( 0 ), elementType( 0 ) + : parent( p ), m_baseline( 0 ), elementType( 0 ) { setX( 0 ); setY( 0 ); @@ -49,7 +49,7 @@ BasicElement::~BasicElement() } BasicElement::BasicElement( const BasicElement& other ) - : tqparent( 0 ), + : parent( 0 ), m_baseline( other.m_baseline ), elementType( other.elementType ) { @@ -63,14 +63,14 @@ BasicElement::BasicElement( const BasicElement& other ) bool BasicElement::readOnly( const BasicElement* /*child*/ ) const { - return tqparent->readOnly( this ); + return parent->readOnly( this ); } FormulaElement* BasicElement::formula() { - //if ( tqparent != 0 ) { - return tqparent->formula(); + //if ( parent != 0 ) { + return parent->formula(); //} //return 0; } @@ -99,7 +99,7 @@ LuPixelPoint BasicElement::widgetPos() { luPixel x = 0; luPixel y = 0; - for (BasicElement* element = this; element != 0; element = element->tqparent) { + for (BasicElement* element = this; element != 0; element = element->parent) { x += element->getX(); y += element->getY(); } @@ -174,12 +174,12 @@ TQDomElement BasicElement::getElementDom( TQDomDocument& doc) } -void BasicElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void BasicElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de = doc.createElement( oasisFormat ? "math:" + getElementName() : getElementName() ); writeMathMLAttributes( de ); writeMathMLContent( doc, de, oasisFormat ); - tqparent.appendChild( de ); + parent.appendChild( de ); } bool BasicElement::buildFromDom(TQDomElement element) diff --git a/lib/kformula/basicelement.h b/lib/kformula/basicelement.h index 025dfbc6..1fe46cc1 100644 --- a/lib/kformula/basicelement.h +++ b/lib/kformula/basicelement.h @@ -87,7 +87,7 @@ public: * (The SequenceElement's tqchildren are simply counted.) */ - BasicElement(BasicElement* tqparent = 0); + BasicElement(BasicElement* parent = 0); virtual ~BasicElement(); // deep copy @@ -102,7 +102,7 @@ public: /** * @returns whether the child should be read-only. The idea is - * that a read-only tqparent has read-only tqchildren. + * that a read-only parent has read-only tqchildren. */ virtual bool readOnly( const BasicElement* child ) const; @@ -114,7 +114,7 @@ public: /** * Provide fast access to the rootElement for each child. */ - virtual const FormulaElement* formula() const { return tqparent->formula(); } + virtual const FormulaElement* formula() const { return parent->formula(); } /** * @returns the character that represents this element. Used for @@ -167,7 +167,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -340,9 +340,9 @@ public: // basic support - const BasicElement* getParent() const { return tqparent; } - BasicElement* getParent() { return tqparent; } - void setParent(BasicElement* p) { tqparent = p; } + const BasicElement* getParent() const { return parent; } + BasicElement* getParent() { return parent; } + void setParent(BasicElement* p) { parent = p; } luPixel getX() const { return m_x; } luPixel getY() const { return m_y; } @@ -377,7 +377,7 @@ public: * Same as above, just MathML. * It shouldn't be redefined but for exceptional cases, use the general writeMathML* API instead */ - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; /** * Set this element attribute, build tqchildren and @@ -396,7 +396,7 @@ public: static int getEvilDestructionCount() { return evilDestructionCount; } /** - * @returns our type. This is an object from our tqparent's syntax tree + * @returns our type. This is an object from our parent's syntax tree * or 0 if there was a very bad parsing error. */ ElementType* getElementType() const { return elementType; } @@ -495,11 +495,11 @@ private: double str2size( const TQString& str, SizeType* st, uint index, SizeType type ); /** - * Our tqparent. - * The tqparent might not be null except for the FormulaElement + * Our parent. + * The parent might not be null except for the FormulaElement * that is the top of the element tree. */ - BasicElement* tqparent; + BasicElement* parent; /** * This elements size. @@ -509,7 +509,7 @@ private: luPixel m_height; /** - * Our position relative to our tqparent. + * Our position relative to our parent. */ //KoPoint position; luPixel m_x; diff --git a/lib/kformula/bracketelement.cc b/lib/kformula/bracketelement.cc index 0a599dc0..df51ffa8 100644 --- a/lib/kformula/bracketelement.cc +++ b/lib/kformula/bracketelement.cc @@ -35,8 +35,8 @@ KFORMULA_NAMESPACE_BEGIN -SingleContentElement::SingleContentElement(BasicElement* tqparent ) - : BasicElement( tqparent ) +SingleContentElement::SingleContentElement(BasicElement* parent ) + : BasicElement( parent ) { content = new SequenceElement( this ); } @@ -137,9 +137,9 @@ void SingleContentElement::remove( FormulaCursor* cursor, { switch (cursor->getPos()) { case contentPos: - BasicElement* tqparent = getParent(); - tqparent->selectChild(cursor, this); - tqparent->remove(cursor, removedChildren, direction); + BasicElement* parent = getParent(); + parent->selectChild(cursor, this); + parent->remove(cursor, removedChildren, direction); } } @@ -213,8 +213,8 @@ void SingleContentElement::writeMathMLContent( TQDomDocument& doc, TQDomElement& -BracketElement::BracketElement(SymbolType l, SymbolType r, BasicElement* tqparent) - : SingleContentElement(tqparent), +BracketElement::BracketElement(SymbolType l, SymbolType r, BasicElement* parent) + : SingleContentElement(parent), left( 0 ), right( 0 ), leftType( l ), rightType( r ), m_operator( false ), m_customLeft( false ), m_customRight( false ) @@ -361,7 +361,7 @@ void BracketElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void BracketElement::draw( TQPainter& painter, const LuPixelRect& r, @@ -522,7 +522,7 @@ int BracketElement::readContentFromMathMLDom(TQDomNode& node) if ( m_operator ) { node = node.parentNode(); TQDomNode open = node; - TQDomNode tqparent = node.parentNode(); + TQDomNode parent = node.parentNode(); if ( ! operatorType( node, true ) ) return -1; int nodeNum = searchOperator( node ); @@ -548,7 +548,7 @@ int BracketElement::readContentFromMathMLDom(TQDomNode& node) de.appendChild( node.toElement() ); node = n; } while ( ++i < nodeNum ); - tqparent.insertAfter( de, open ); + parent.insertAfter( de, open ); node = de; kdWarning() << doc.toString() << endl; } @@ -563,8 +563,8 @@ int BracketElement::readContentFromMathMLDom(TQDomNode& node) next = next.nextSibling(); if ( ! next.isNull()) { TQDomDocument doc = node.ownerDocument(); - TQDomNode tqparent = node.parentNode(); - TQString ns = tqparent.prefix(); + TQDomNode parent = node.parentNode(); + TQString ns = parent.prefix(); TQDomElement de = doc.createElementNS( ns, "mrow" ); uint pos = 0; while ( ! node.isNull() ) { @@ -590,8 +590,8 @@ int BracketElement::readContentFromMathMLDom(TQDomNode& node) } node = no; } - tqparent.appendChild( de ); - node = tqparent.firstChild(); + parent.appendChild( de ); + node = parent.firstChild(); while ( ! node.isElement() ) node = node.nextSibling(); } @@ -797,8 +797,8 @@ void BracketElement::writeMathMLAttributes( TQDomElement& element ) const } } -OverlineElement::OverlineElement( BasicElement* tqparent ) - : SingleContentElement( tqparent ) +OverlineElement::OverlineElement( BasicElement* parent ) + : SingleContentElement( parent ) { } @@ -887,7 +887,7 @@ TQString OverlineElement::formulaString() return getContent()->formulaString(); } -void OverlineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void OverlineElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de = doc.createElement( oasisFormat ? "math:mover" : "mover" ); SingleContentElement::writeMathML( doc, de, oasisFormat ); @@ -895,12 +895,12 @@ void OverlineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool // is this the right entity? Mozilla renders it correctly. op.appendChild( doc.createEntityReference( "OverBar" ) ); de.appendChild( op ); - tqparent.appendChild( de ); + parent.appendChild( de ); } -UnderlineElement::UnderlineElement( BasicElement* tqparent ) - : SingleContentElement( tqparent ) +UnderlineElement::UnderlineElement( BasicElement* parent ) + : SingleContentElement( parent ) { } @@ -991,7 +991,7 @@ TQString UnderlineElement::formulaString() return getContent()->formulaString(); } -void UnderlineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void UnderlineElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de = doc.createElement( oasisFormat ? "math:munder" : "munder" ); SingleContentElement::writeMathML( doc, de, oasisFormat ); @@ -999,7 +999,7 @@ void UnderlineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, boo // is this the right entity? Mozilla renders it correctly. op.appendChild( doc.createEntityReference( "UnderBar" ) ); de.appendChild( op ); - tqparent.appendChild( de ); + parent.appendChild( de ); } KFORMULA_NAMESPACE_END diff --git a/lib/kformula/bracketelement.h b/lib/kformula/bracketelement.h index eb0e2613..83879aac 100644 --- a/lib/kformula/bracketelement.h +++ b/lib/kformula/bracketelement.h @@ -40,7 +40,7 @@ class SingleContentElement : public BasicElement { SingleContentElement& operator=( const SingleContentElement& ) { return *this; } public: - SingleContentElement(BasicElement* tqparent = 0); + SingleContentElement(BasicElement* parent = 0); ~SingleContentElement(); SingleContentElement( const SingleContentElement& ); @@ -166,7 +166,7 @@ public: enum { contentPos }; BracketElement(SymbolType left = EmptyBracket, SymbolType right = EmptyBracket, - BasicElement* tqparent = 0); + BasicElement* parent = 0); ~BracketElement(); BracketElement( const BracketElement& ); @@ -209,7 +209,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -303,7 +303,7 @@ class OverlineElement : public SingleContentElement { OverlineElement& operator=( const OverlineElement& ) { return *this; } public: - OverlineElement(BasicElement* tqparent = 0); + OverlineElement(BasicElement* parent = 0); ~OverlineElement(); OverlineElement( const OverlineElement& ); @@ -331,7 +331,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -349,7 +349,7 @@ public: virtual TQString formulaString(); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const; protected: @@ -370,7 +370,7 @@ private: class UnderlineElement : public SingleContentElement { UnderlineElement& operator=( const UnderlineElement& ) { return *this; } public: - UnderlineElement(BasicElement* tqparent = 0); + UnderlineElement(BasicElement* parent = 0); ~UnderlineElement(); UnderlineElement( const UnderlineElement& ); @@ -398,7 +398,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -416,7 +416,7 @@ public: virtual TQString formulaString(); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const; protected: diff --git a/lib/kformula/elementtype.h b/lib/kformula/elementtype.h index 7fc44144..47db40fd 100644 --- a/lib/kformula/elementtype.h +++ b/lib/kformula/elementtype.h @@ -61,7 +61,7 @@ public: /** * @returns the spanned text. seq must be the original - * tqparent sequence. + * parent sequence. */ virtual TQString text( SequenceElement* seq ) const; @@ -223,7 +223,7 @@ public: /** * @returns the spanned text. seq must be the original - * tqparent sequence. + * parent sequence. */ virtual TQString text( SequenceElement* /*seq*/ ) const { return m_text; } diff --git a/lib/kformula/encloseelement.cc b/lib/kformula/encloseelement.cc index 05617361..846f6bb2 100644 --- a/lib/kformula/encloseelement.cc +++ b/lib/kformula/encloseelement.cc @@ -21,7 +21,7 @@ KFORMULA_NAMESPACE_BEGIN -EncloseElement::EncloseElement( BasicElement* tqparent ) : SequenceElement( tqparent ) { +EncloseElement::EncloseElement( BasicElement* parent ) : SequenceElement( parent ) { } bool EncloseElement::readAttributesFromMathMLDom(const TQDomElement& element) diff --git a/lib/kformula/encloseelement.h b/lib/kformula/encloseelement.h index b6b16a0d..758e32a4 100644 --- a/lib/kformula/encloseelement.h +++ b/lib/kformula/encloseelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class EncloseElement : public SequenceElement { typedef SequenceElement inherited; public: - EncloseElement( BasicElement* tqparent = 0 ); + EncloseElement( BasicElement* parent = 0 ); private: virtual bool readAttributesFromMathMLDom(const TQDomElement& element); diff --git a/lib/kformula/errorelement.cc b/lib/kformula/errorelement.cc index c63cf09c..7a685f86 100644 --- a/lib/kformula/errorelement.cc +++ b/lib/kformula/errorelement.cc @@ -23,12 +23,12 @@ KFORMULA_NAMESPACE_BEGIN -ErrorElement::ErrorElement( BasicElement* tqparent ) : SequenceElement( tqparent ) { +ErrorElement::ErrorElement( BasicElement* parent ) : SequenceElement( parent ) { } /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void ErrorElement::draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/errorelement.h b/lib/kformula/errorelement.h index c7d69fed..cfc2735d 100644 --- a/lib/kformula/errorelement.h +++ b/lib/kformula/errorelement.h @@ -27,11 +27,11 @@ KFORMULA_NAMESPACE_BEGIN class ErrorElement : public SequenceElement { typedef SequenceElement inherited; public: - ErrorElement( BasicElement* tqparent = 0 ); + ErrorElement( BasicElement* parent = 0 ); /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/formulacursor.cc b/lib/kformula/formulacursor.cc index b406a002..9fe3afbd 100644 --- a/lib/kformula/formulacursor.cc +++ b/lib/kformula/formulacursor.cc @@ -325,10 +325,10 @@ void FormulaCursor::remove(TQPtrList<BasicElement>& tqchildren, // If there is no child to remove in the sequence // remove the sequence instead. if (sequence->countChildren() == 0) { - BasicElement* tqparent = sequence->getParent(); - if (tqparent != 0) { - tqparent->selectChild(this, sequence); - tqparent->remove(this, tqchildren, direction); + BasicElement* parent = sequence->getParent(); + if (parent != 0) { + parent->selectChild(this, sequence); + parent->remove(this, tqchildren, direction); return; } } @@ -363,12 +363,12 @@ void FormulaCursor::replaceSelectionWith(BasicElement* element, mainChild->goInside(this); insert(list); /* - BasicElement* tqparent = element->getParent(); + BasicElement* parent = element->getParent(); if (direction == beforeCursor) { - tqparent->moveRight(this, element); + parent->moveRight(this, element); } else { - tqparent->moveLeft(this, element); + parent->moveLeft(this, element); } */ element->selectChild(this, mainChild); @@ -412,10 +412,10 @@ BasicElement* FormulaCursor::replaceByMainChildContent(Direction direction) BasicElement* FormulaCursor::removeEnclosingElement(Direction direction) { assert( !isReadOnly() ); - BasicElement* tqparent = getElement()->getParent(); - if (tqparent != 0) { - if (getElement() == tqparent->getMainChild()) { - tqparent->selectChild(this, getElement()); + BasicElement* parent = getElement()->getParent(); + if (parent != 0) { + if (getElement() == parent->getMainChild()) { + parent->selectChild(this, getElement()); return replaceByMainChildContent(direction); } } diff --git a/lib/kformula/formulaelement.cc b/lib/kformula/formulaelement.cc index 19081093..946e595d 100644 --- a/lib/kformula/formulaelement.cc +++ b/lib/kformula/formulaelement.cc @@ -313,18 +313,18 @@ TQString FormulaElement::toLatex() return inherited::toLatex(); //Consider $$ sorround } -void FormulaElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void FormulaElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de; if ( !oasisFormat ) { de = doc.createElementNS( "http://www.w3.org/1998/Math/MathML", "math" ); - tqparent.appendChild( de ); + parent.appendChild( de ); } else { TQDomElement element = doc.createElement( "math:semantics" ); de = doc.createElement( "math:mrow" ); - tqparent.appendChild( element ); + parent.appendChild( element ); element.appendChild( de ); } for ( uint i = 0; i < countChildren(); ++i ) { diff --git a/lib/kformula/formulaelement.h b/lib/kformula/formulaelement.h index 8f230128..e6702668 100644 --- a/lib/kformula/formulaelement.h +++ b/lib/kformula/formulaelement.h @@ -35,7 +35,7 @@ class SymbolTable; /** * The main element. * A formula consists of a FormulaElement and its tqchildren. - * The only element that has no tqparent. + * The only element that has no parent. */ class FormulaElement : public SequenceElement { typedef SequenceElement inherited; @@ -122,7 +122,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -170,7 +170,7 @@ public: virtual KCommand* input( Container* container, TQKeyEvent* event ); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; /** * Appends our attributes to the dom element. diff --git a/lib/kformula/fractionelement.cc b/lib/kformula/fractionelement.cc index fb76a11e..1230bb60 100644 --- a/lib/kformula/fractionelement.cc +++ b/lib/kformula/fractionelement.cc @@ -32,7 +32,7 @@ KFORMULA_NAMESPACE_BEGIN using namespace std; -FractionElement::FractionElement(BasicElement* tqparent) : BasicElement(tqparent), +FractionElement::FractionElement(BasicElement* parent) : BasicElement(parent), m_lineThicknessType( NoSize ), m_numAlign( NoHorizontalAlign ), m_denomAlign( NoHorizontalAlign ), @@ -156,7 +156,7 @@ void FractionElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void FractionElement::draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/fractionelement.h b/lib/kformula/fractionelement.h index 18c870fe..cef69c13 100644 --- a/lib/kformula/fractionelement.h +++ b/lib/kformula/fractionelement.h @@ -36,7 +36,7 @@ public: enum { numeratorPos, denominatorPos }; - FractionElement(BasicElement* tqparent = 0); + FractionElement(BasicElement* parent = 0); ~FractionElement(); FractionElement( const FractionElement& ); @@ -79,7 +79,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/glyphelement.cc b/lib/kformula/glyphelement.cc index 79421f40..9d0b26e6 100644 --- a/lib/kformula/glyphelement.cc +++ b/lib/kformula/glyphelement.cc @@ -25,7 +25,7 @@ KFORMULA_NAMESPACE_BEGIN -GlyphElement::GlyphElement( BasicElement* tqparent ) : TextElement( ' ', false, tqparent ) { +GlyphElement::GlyphElement( BasicElement* parent ) : TextElement( ' ', false, parent ) { } bool GlyphElement::readAttributesFromMathMLDom( const TQDomElement& element ) @@ -106,7 +106,7 @@ void GlyphElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void GlyphElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, diff --git a/lib/kformula/glyphelement.h b/lib/kformula/glyphelement.h index 1d3b6d8d..e3934fce 100644 --- a/lib/kformula/glyphelement.h +++ b/lib/kformula/glyphelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class GlyphElement : public TextElement { typedef TextElement inherited; public: - GlyphElement( BasicElement* tqparent = 0 ); + GlyphElement( BasicElement* parent = 0 ); /** * Calculates our width and height and @@ -40,7 +40,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/identifierelement.cc b/lib/kformula/identifierelement.cc index 324151d5..41cd2600 100644 --- a/lib/kformula/identifierelement.cc +++ b/lib/kformula/identifierelement.cc @@ -32,13 +32,13 @@ KFORMULA_NAMESPACE_BEGIN -IdentifierElement::IdentifierElement( BasicElement* tqparent ) : TokenElement( tqparent ) {} +IdentifierElement::IdentifierElement( BasicElement* parent ) : TokenElement( parent ) {} /* * Token elements' content has to be of homogeneous type. Every token element * must (TODO: check this) appear inside a non-token sequence, and thus, if * the command asks for a different content, a new element has to be created in - * tqparent sequence. + * parent sequence. */ KCommand* IdentifierElement::buildCommand( Container* container, Request* request ) { @@ -67,21 +67,21 @@ KCommand* IdentifierElement::buildCommand( Container* container, Request* reques } if ( countChildren() == 0 || cursor->getPos() == countChildren() ) { - // We are in the last position, so it's easy, call the tqparent to + // We are in the last position, so it's easy, call the parent to // create a new child - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos + 1); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos + 1); + return parent->buildCommand( container, request ); } } if ( cursor->getPos() == 0 ) { - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos ); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos ); + return parent->buildCommand( container, request ); } } @@ -89,7 +89,7 @@ KCommand* IdentifierElement::buildCommand( Container* container, Request* reques // a) Cut from mark to the end // b) Create a new token and add an element from key pressed // c) Create a new token and add elements cut previously - // d) Move cursor to tqparent so that it command execution works fine + // d) Move cursor to parent so that it command execution works fine switch( *request ) { case req_addOperator: { @@ -100,9 +100,9 @@ KCommand* IdentifierElement::buildCommand( Container* container, Request* reques command->addCursor( cursor ); command->addToken( op ); command->addContent( op, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -114,9 +114,9 @@ KCommand* IdentifierElement::buildCommand( Container* container, Request* reques command->addCursor( cursor ); command->addToken( num ); command->addContent( num, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } diff --git a/lib/kformula/identifierelement.h b/lib/kformula/identifierelement.h index 485fc28e..4e137315 100644 --- a/lib/kformula/identifierelement.h +++ b/lib/kformula/identifierelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class IdentifierElement : public TokenElement { typedef TokenElement inherited; public: - IdentifierElement( BasicElement* tqparent = 0 ); + IdentifierElement( BasicElement* parent = 0 ); /** * This is called by the container to get a command depending on diff --git a/lib/kformula/indexelement.cc b/lib/kformula/indexelement.cc index a8d3b68a..25b8997a 100644 --- a/lib/kformula/indexelement.cc +++ b/lib/kformula/indexelement.cc @@ -38,7 +38,7 @@ class IndexSequenceElement : public SequenceElement { typedef SequenceElement inherited; public: - IndexSequenceElement( BasicElement* tqparent = 0 ) : SequenceElement( tqparent ) {} + IndexSequenceElement( BasicElement* parent = 0 ) : SequenceElement( parent ) {} virtual IndexSequenceElement* clone() { return new IndexSequenceElement( *this ); } @@ -90,8 +90,8 @@ KCommand* IndexSequenceElement::buildCommand( Container* container, Request* req } -IndexElement::IndexElement(BasicElement* tqparent) - : BasicElement(tqparent), +IndexElement::IndexElement(BasicElement* parent) + : BasicElement(parent), m_subScriptShiftType( NoSize ), m_superScriptShiftType( NoSize ), m_customAccentUnder( false ), @@ -543,7 +543,7 @@ void IndexElement::calcSizes(const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void IndexElement::draw( TQPainter& painter, const LuPixelRect& r, @@ -983,9 +983,9 @@ void IndexElement::remove(FormulaCursor* cursor, setToLowerLeft(cursor); break; case contentPos: { - BasicElement* tqparent = getParent(); - tqparent->selectChild(cursor, this); - tqparent->remove(cursor, removedChildren, direction); + BasicElement* parent = getParent(); + parent->selectChild(cursor, this); + parent->remove(cursor, removedChildren, direction); break; } case upperMiddlePos: diff --git a/lib/kformula/indexelement.h b/lib/kformula/indexelement.h index b86f0dc4..f3fc1acb 100644 --- a/lib/kformula/indexelement.h +++ b/lib/kformula/indexelement.h @@ -35,7 +35,7 @@ class IndexElement : public BasicElement { IndexElement& operator=( const IndexElement& ) { return *this; } public: - IndexElement(BasicElement* tqparent = 0); + IndexElement(BasicElement* parent = 0); ~IndexElement(); IndexElement( const IndexElement& ); @@ -86,7 +86,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -314,78 +314,78 @@ private: */ class IndexElementIndex : public ElementIndex { public: - IndexElementIndex(IndexElement* p) : tqparent(p) {} - virtual IndexElement* getElement() { return tqparent; } + IndexElementIndex(IndexElement* p) : parent(p) {} + virtual IndexElement* getElement() { return parent; } protected: - IndexElement* tqparent; + IndexElement* parent; }; // We have a (very simple) type for every index. class UpperLeftIndex : public IndexElementIndex { public: - UpperLeftIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + UpperLeftIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToUpperLeft(cursor, direction); } + { parent->moveToUpperLeft(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToUpperLeft(cursor); } + { parent->setToUpperLeft(cursor); } virtual bool hasIndex() const - { return tqparent->hasUpperLeft(); } + { return parent->hasUpperLeft(); } }; class LowerLeftIndex : public IndexElementIndex { public: - LowerLeftIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + LowerLeftIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToLowerLeft(cursor, direction); } + { parent->moveToLowerLeft(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToLowerLeft(cursor); } + { parent->setToLowerLeft(cursor); } virtual bool hasIndex() const - { return tqparent->hasLowerLeft(); } + { return parent->hasLowerLeft(); } }; class UpperMiddleIndex : public IndexElementIndex { public: - UpperMiddleIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + UpperMiddleIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToUpperMiddle(cursor, direction); } + { parent->moveToUpperMiddle(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToUpperMiddle(cursor); } + { parent->setToUpperMiddle(cursor); } virtual bool hasIndex() const - { return tqparent->hasUpperMiddle(); } + { return parent->hasUpperMiddle(); } }; class LowerMiddleIndex : public IndexElementIndex { public: - LowerMiddleIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + LowerMiddleIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToLowerMiddle(cursor, direction); } + { parent->moveToLowerMiddle(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToLowerMiddle(cursor); } + { parent->setToLowerMiddle(cursor); } virtual bool hasIndex() const - { return tqparent->hasLowerMiddle(); } + { return parent->hasLowerMiddle(); } }; class UpperRightIndex : public IndexElementIndex { public: - UpperRightIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + UpperRightIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToUpperRight(cursor, direction); } + { parent->moveToUpperRight(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToUpperRight(cursor); } + { parent->setToUpperRight(cursor); } virtual bool hasIndex() const - { return tqparent->hasUpperRight(); } + { return parent->hasUpperRight(); } }; class LowerRightIndex : public IndexElementIndex { public: - LowerRightIndex(IndexElement* tqparent) : IndexElementIndex(tqparent) {} + LowerRightIndex(IndexElement* parent) : IndexElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToLowerRight(cursor, direction); } + { parent->moveToLowerRight(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToLowerRight(cursor); } + { parent->setToLowerRight(cursor); } virtual bool hasIndex() const - { return tqparent->hasLowerRight(); } + { return parent->hasLowerRight(); } }; diff --git a/lib/kformula/kformulacommand.cc b/lib/kformula/kformulacommand.cc index 178ec399..267038c4 100644 --- a/lib/kformula/kformulacommand.cc +++ b/lib/kformula/kformulacommand.cc @@ -220,7 +220,7 @@ void KFCAddToken::unexecute() { kdDebug( DEBUGID ) << k_funcinfo << endl; FormulaCursor* cursor = getUnexecuteCursor(); - SequenceElement* tqparent = static_cast<SequenceElement*>(cursor->getElement()->getParent()); + SequenceElement* parent = static_cast<SequenceElement*>(cursor->getElement()->getParent()); for ( int i = 0; i < tokenList.count(); i++ ) { SequenceElement* current = static_cast<SequenceElement*>(cursor->getElement()); @@ -228,12 +228,12 @@ void KFCAddToken::unexecute() for ( uint i = 0; i < current->countChildren(); ++i ) { cursor->remove( list, beforeCursor ); } - if ( tqparent ) { - int pos = tqparent->childPos( current ); - cursor->setTo( tqparent, pos + 1); + if ( parent ) { + int pos = parent->childPos( current ); + cursor->setTo( parent, pos + 1); cursor->remove( list, beforeCursor ); if ( pos > 0 ) { - BasicElement* element = tqparent->getChild( pos - 1 ); + BasicElement* element = parent->getChild( pos - 1 ); if (element) element->moveEnd( cursor ); } @@ -306,9 +306,9 @@ void KFCSplitToken::execute() removeSelection->execute(); } splitCursor = cursor->getCursorData(); - SequenceElement* tqparent = static_cast<SequenceElement*>( cursor->getElement() ); - if ( tqparent ) { - cursor->setMark( tqparent->countChildren() ); + SequenceElement* parent = static_cast<SequenceElement*>( cursor->getElement() ); + if ( parent ) { + cursor->setMark( parent->countChildren() ); cursor->setSelection( true ); } cursor->remove( splitList, afterCursor ); @@ -322,8 +322,8 @@ void KFCSplitToken::execute() } KFCAddToken::execute(); cursor = getExecuteCursor(); - if ( tqparent ) { - BasicElement* child = tqparent->getChild( cursor->getPos() ); + if ( parent ) { + BasicElement* child = parent->getChild( cursor->getPos() ); if ( child ) { child->moveEnd( cursor ); } diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h index a63053d7..09001040 100644 --- a/lib/kformula/kformulacommand.h +++ b/lib/kformula/kformulacommand.h @@ -385,7 +385,7 @@ private: /** - * Command to remove the tqparent element. + * Command to remove the parent element. */ class KFCRemoveEnclosing : public Command { @@ -495,7 +495,7 @@ public: void addTextElement( TextElement* element ) { list.append(element); } /** - * Collects all tqparent elements those tqchildren are to be changend. + * Collects all parent elements those tqchildren are to be changend. */ void addElement( BasicElement* element ) { elementList.append( element ); } diff --git a/lib/kformula/kformulaconfigpage.cc b/lib/kformula/kformulaconfigpage.cc index add9c840..21c3b946 100644 --- a/lib/kformula/kformulaconfigpage.cc +++ b/lib/kformula/kformulaconfigpage.cc @@ -54,7 +54,7 @@ KFORMULA_NAMESPACE_BEGIN ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* config, TQVBox* box, char* name ) - : TQObject( box->tqparent(), name ), m_document( document ), m_view( view ), m_config( config ), m_changed( false ) + : TQObject( box->parent(), name ), m_document( document ), m_view( view ), m_config( config ), m_changed( false ) { const ContextStyle& contextStyle = document->getContextStyle( true ); @@ -167,18 +167,18 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi } -TQPushButton* ConfigurePage::buildFontLine( TQWidget* tqparent, +TQPushButton* ConfigurePage::buildFontLine( TQWidget* parent, TQGridLayout* tqlayout, int number, TQFont font, TQString name, TQLabel*& fontName ) { - TQLabel* fontTitle = new TQLabel( name, tqparent ); + TQLabel* fontTitle = new TQLabel( name, parent ); TQString labelName = font.family() + ' ' + TQString::number( font.pointSize() ); - fontName = new TQLabel( labelName, tqparent ); + fontName = new TQLabel( labelName, parent ); fontName->setFont( font ); fontName->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); - TQPushButton* chooseButton = new TQPushButton( i18n( "Choose..." ), tqparent ); + TQPushButton* chooseButton = new TQPushButton( i18n( "Choose..." ), parent ); tqlayout->addWidget( fontTitle, number, 0 ); tqlayout->addWidget( fontName, number, 1 ); @@ -319,8 +319,8 @@ void ConfigurePage::slotChanged() // class UsedFontItem : public KListViewItem { // public: -// UsedFontItem( MathFontsConfigurePage* page, TQListView* tqparent, TQString font ) -// : KListViewItem( tqparent, font ), m_page( page ) {} +// UsedFontItem( MathFontsConfigurePage* page, TQListView* parent, TQString font ) +// : KListViewItem( parent, font ), m_page( page ) {} // int compare( TQListViewItem* i, int col, bool ascending ) const; @@ -343,7 +343,7 @@ void ConfigurePage::slotChanged() // MathFontsConfigurePage::MathFontsConfigurePage( Document* document, TQWidget* view, // KConfig* config, TQVBox* box, char* name ) -// : TQObject( box->tqparent(), name ), m_document( document ), m_view( view ), m_config( config ) +// : TQObject( box->parent(), name ), m_document( document ), m_view( view ), m_config( config ) // { // TQWidget* fontWidget = new TQWidget( box ); // TQGridLayout* fontLayout = new TQGridLayout( fontWidget, 1, 1, KDialog::marginHint(), KDialog::spacingHint() ); diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index 228b4017..17d163f0 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -61,9 +61,9 @@ int FormulaList::compareItems( TQPtrCollection::Item a, TQPtrCollection::Item b } -Document::Document( TQObject *tqparent, const char *name, +Document::Document( TQObject *parent, const char *name, const TQStringList &/*args*/ ) - : TQObject( tqparent, name ), m_wrapper( 0 ), m_formula( 0 ), creationStrategy( 0 ) + : TQObject( parent, name ), m_wrapper( 0 ), m_formula( 0 ), creationStrategy( 0 ) { m_contextStyle = new ContextStyle; setCreationStrategy( "Oasis" ); diff --git a/lib/kformula/kformuladocument.h b/lib/kformula/kformuladocument.h index 62b2dab3..46de5774 100644 --- a/lib/kformula/kformuladocument.h +++ b/lib/kformula/kformuladocument.h @@ -77,7 +77,7 @@ public: /** * Creates a formula document. */ - Document( TQObject *tqparent=0, const char *name=0, + Document( TQObject *parent=0, const char *name=0, const TQStringList &args=TQStringList() ); ~Document(); diff --git a/lib/kformula/kformulawidget.cc b/lib/kformula/kformulawidget.cc index 0de1ad7c..ef5e09a3 100644 --- a/lib/kformula/kformulawidget.cc +++ b/lib/kformula/kformulawidget.cc @@ -35,8 +35,8 @@ #include "kformulawidget.h" -KFormulaWidget::KFormulaWidget(Container* doc, TQWidget* tqparent, const char* name, WFlags f) - : TQWidget(tqparent, name, f | WRepaintNoErase | WResizeNoErase), +KFormulaWidget::KFormulaWidget(Container* doc, TQWidget* parent, const char* name, WFlags f) + : TQWidget(parent, name, f | WRepaintNoErase | WResizeNoErase), formulaView(doc) { connect(doc, TQT_SIGNAL(formulaChanged(int, int)), diff --git a/lib/kformula/kformulawidget.h b/lib/kformula/kformulawidget.h index ead28ddc..1b6d8d98 100644 --- a/lib/kformula/kformulawidget.h +++ b/lib/kformula/kformulawidget.h @@ -50,7 +50,7 @@ class KFormulaWidget : public TQWidget { TQ_OBJECT public: - KFormulaWidget(Container*, TQWidget* tqparent=0, const char* name=0, WFlags f=0); + KFormulaWidget(Container*, TQWidget* parent=0, const char* name=0, WFlags f=0); ~KFormulaWidget(); diff --git a/lib/kformula/main.cc b/lib/kformula/main.cc index dde69731..57344739 100644 --- a/lib/kformula/main.cc +++ b/lib/kformula/main.cc @@ -33,8 +33,8 @@ using namespace KFormula; class TestWidget : public KFormulaWidget { public: - TestWidget(Container* doc, TQWidget* tqparent=0, const char* name=0, WFlags f=0) - : KFormulaWidget(doc, tqparent, name, f) {} + TestWidget(Container* doc, TQWidget* parent=0, const char* name=0, WFlags f=0) + : KFormulaWidget(doc, parent, name, f) {} protected: virtual void keyPressEvent(TQKeyEvent* event); diff --git a/lib/kformula/matrixelement.cc b/lib/kformula/matrixelement.cc index 56062dcd..6b5a5898 100644 --- a/lib/kformula/matrixelement.cc +++ b/lib/kformula/matrixelement.cc @@ -43,7 +43,7 @@ class MatrixSequenceElement : public SequenceElement { typedef SequenceElement inherited; public: - MatrixSequenceElement( BasicElement* tqparent = 0 ) : SequenceElement( tqparent ) {} + MatrixSequenceElement( BasicElement* parent = 0 ) : SequenceElement( parent ) {} virtual MatrixSequenceElement* clone() { return new MatrixSequenceElement( *this ); } @@ -269,8 +269,8 @@ KFCInsertColumn::KFCInsertColumn( const TQString& name, Container* document, Mat } -MatrixElement::MatrixElement(uint rows, uint columns, BasicElement* tqparent) - : BasicElement(tqparent), +MatrixElement::MatrixElement(uint rows, uint columns, BasicElement* parent) + : BasicElement(parent), m_rowNumber( 0 ), m_align( NoAlign ), m_widthType( NoSize ), @@ -509,7 +509,7 @@ void MatrixElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void MatrixElement::draw( TQPainter& painter, const LuPixelRect& rect, @@ -1799,7 +1799,7 @@ class MultilineSequenceElement : public SequenceElement { typedef SequenceElement inherited; public: - MultilineSequenceElement( BasicElement* tqparent = 0 ); + MultilineSequenceElement( BasicElement* parent = 0 ); virtual MultilineSequenceElement* clone() { return new MultilineSequenceElement( *this ); @@ -1846,7 +1846,7 @@ public: /// Return the position of tab i. int tabPos( uint i ); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; private: @@ -1890,9 +1890,9 @@ KFCNewLine::~KFCNewLine() void KFCNewLine::execute() { FormulaCursor* cursor = getExecuteCursor(); - MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() ); - int linePos = tqparent->content.find( m_line ); - tqparent->content.insert( linePos+1, m_newline ); + MultilineElement* parent = static_cast<MultilineElement*>( m_line->getParent() ); + int linePos = parent->content.find( m_line ); + parent->content.insert( linePos+1, m_newline ); // If there are tqchildren to be moved. if ( m_line->countChildren() > static_cast<int>( m_pos ) ) { @@ -1925,11 +1925,11 @@ void KFCNewLine::execute() void KFCNewLine::unexecute() { FormulaCursor* cursor = getExecuteCursor(); - MultilineElement* tqparent = static_cast<MultilineElement*>( m_line->getParent() ); - int linePos = tqparent->content.find( m_line ); + MultilineElement* parent = static_cast<MultilineElement*>( m_line->getParent() ); + int linePos = parent->content.find( m_line ); // Now the command owns the new line again. - m_newline = tqparent->content.at( linePos+1 ); + m_newline = parent->content.at( linePos+1 ); // Tell all cursors to leave this sequence FormulaElement* formula = m_line->formula(); @@ -1951,7 +1951,7 @@ void KFCNewLine::unexecute() else { m_line->moveEnd( cursor ); } - tqparent->content.take( linePos+1 ); + parent->content.take( linePos+1 ); // Tell that something changed formula->changed(); @@ -1959,8 +1959,8 @@ void KFCNewLine::unexecute() } -MultilineSequenceElement::MultilineSequenceElement( BasicElement* tqparent ) - : SequenceElement( tqparent ) +MultilineSequenceElement::MultilineSequenceElement( BasicElement* parent ) + : SequenceElement( parent ) { tabs.setAutoDelete( false ); } @@ -2111,9 +2111,9 @@ int MultilineSequenceElement::tabPos( uint i ) void MultilineSequenceElement::writeMathML( TQDomDocument& doc, - TQDomNode& tqparent, bool oasisFormat ) const + TQDomNode& parent, bool oasisFormat ) const { - // tqparent is required to be a <mtr> tag + // parent is required to be a <mtr> tag TQDomElement tmp = doc.createElement( "TMP" ); @@ -2131,7 +2131,7 @@ void MultilineSequenceElement::writeMathML( TQDomDocument& doc, while ( !n.isNull() ) { // the illegal TabMarkers are tqchildren of the mrow, child of tmp. if ( n.isElement() && n.toElement().tagName() == "TAB" ) { - tqparent.appendChild( mtd ); + parent.appendChild( mtd ); mtd = doc.createElement( oasisFormat ? "math:mtd" : "mtd" ); } else { @@ -2140,12 +2140,12 @@ void MultilineSequenceElement::writeMathML( TQDomDocument& doc, n = n.nextSibling(); } - tqparent.appendChild( mtd ); + parent.appendChild( mtd ); } -MultilineElement::MultilineElement( BasicElement* tqparent ) - : BasicElement( tqparent ) +MultilineElement::MultilineElement( BasicElement* parent ) + : BasicElement( parent ) { content.setAutoDelete( true ); content.append( new MultilineSequenceElement( this ) ); @@ -2217,14 +2217,14 @@ void MultilineElement::moveLeft( FormulaCursor* cursor, BasicElement* from ) getParent()->moveLeft(cursor, this); } else { - // Coming from the tqparent (sequence) we go to + // Coming from the parent (sequence) we go to // the very last position if (from == getParent()) { content.at( content.count()-1 )->moveLeft(cursor, this); } else { // Coming from one of the lines we go to the previous line - // or to the tqparent if there is none. + // or to the parent if there is none. int pos = content.find( static_cast<MultilineSequenceElement*>( from ) ); if ( pos > -1 ) { if ( pos > 0 ) { @@ -2279,14 +2279,14 @@ void MultilineElement::moveUp( FormulaCursor* cursor, BasicElement* from ) getParent()->moveLeft(cursor, this); } else { - // Coming from the tqparent (sequence) we go to + // Coming from the parent (sequence) we go to // the very last position if (from == getParent()) { content.at( content.count()-1 )->moveLeft(cursor, this); } else { // Coming from one of the lines we go to the previous line - // or to the tqparent if there is none. + // or to the parent if there is none. int pos = content.find( static_cast<MultilineSequenceElement*>( from ) ); if ( pos > -1 ) { if ( pos > 0 ) { @@ -2591,7 +2591,7 @@ void MultilineElement::writeDom(TQDomElement element) } } -void MultilineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void MultilineElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de = doc.createElement( oasisFormat ? "math:mtable" : "mtable" ); TQDomElement row; TQDomElement cell; @@ -2606,7 +2606,7 @@ void MultilineElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, boo it.current()->writeMathML( doc, row, oasisFormat ); } - tqparent.appendChild( de ); + parent.appendChild( de ); } /** diff --git a/lib/kformula/matrixelement.h b/lib/kformula/matrixelement.h index 04203257..89426659 100644 --- a/lib/kformula/matrixelement.h +++ b/lib/kformula/matrixelement.h @@ -45,7 +45,7 @@ class MatrixElement : public BasicElement { enum SideType { NoSide, LeftSide, RightSide, LeftOverlapSide, RightOverlapSide }; MatrixElement& operator=( const MatrixElement& ) { return *this; } public: - MatrixElement(uint rows = 1, uint columns = 1, BasicElement* tqparent = 0); + MatrixElement(uint rows = 1, uint columns = 1, BasicElement* parent = 0); ~MatrixElement(); MatrixElement( const MatrixElement& ); @@ -89,7 +89,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -316,7 +316,7 @@ public: * The container this FormulaElement belongs to must not be 0, * except you really know what you are doing. */ - MultilineElement( BasicElement* tqparent = 0 ); + MultilineElement( BasicElement* parent = 0 ); ~MultilineElement(); MultilineElement( const MultilineElement& ); @@ -384,7 +384,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -420,7 +420,7 @@ public: virtual TQString formulaString(); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; protected: diff --git a/lib/kformula/numberelement.cc b/lib/kformula/numberelement.cc index 4532d259..41ddc179 100644 --- a/lib/kformula/numberelement.cc +++ b/lib/kformula/numberelement.cc @@ -31,13 +31,13 @@ KFORMULA_NAMESPACE_BEGIN -NumberElement::NumberElement( BasicElement* tqparent ) : TokenElement( tqparent ) {} +NumberElement::NumberElement( BasicElement* parent ) : TokenElement( parent ) {} /* * Token elements' content has to be of homogeneous type. Every token element * must (TODO: check this) appear inside a non-token sequence, and thus, if * the command asks for a different content, a new element has to be created in - * tqparent sequence. + * parent sequence. */ KCommand* NumberElement::buildCommand( Container* container, Request* request ) { @@ -56,21 +56,21 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) } if ( countChildren() == 0 || cursor->getPos() == countChildren() ) { - // We are in the last position, so it's easy, call the tqparent to + // We are in the last position, so it's easy, call the parent to // create a new child - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos + 1); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos + 1); + return parent->buildCommand( container, request ); } } if ( cursor->getPos() == 0 ) { - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos ); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos ); + return parent->buildCommand( container, request ); } } @@ -78,7 +78,7 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) // a) Cut from mark to the end // b) Create a new token and add an element from key pressed // c) Create a new token and add elements cut previously - // d) Move cursor to tqparent so that it command execution works fine + // d) Move cursor to parent so that it command execution works fine switch( *request ) { case req_addTextChar: { @@ -89,9 +89,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) command->addCursor( cursor ); command->addToken( id ); command->addContent( id, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -106,9 +106,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) TextElement* text = creationStrategy->createTextElement( tr->text()[i] ); command->addContent( id, text ); } - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -121,9 +121,9 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) command->addCursor( cursor ); command->addToken( op ); command->addContent( op, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -136,11 +136,11 @@ KCommand* NumberElement::buildCommand( Container* container, Request* request ) case req_addSymbol: case req_addOneByTwoMatrix: case req_addMatrix: { - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos + 1); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos + 1); + return parent->buildCommand( container, request ); } } default: diff --git a/lib/kformula/numberelement.h b/lib/kformula/numberelement.h index fe6d92e4..3a8295ad 100644 --- a/lib/kformula/numberelement.h +++ b/lib/kformula/numberelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class NumberElement : public TokenElement { typedef TokenElement inherited; public: - NumberElement( BasicElement* tqparent = 0 ); + NumberElement( BasicElement* parent = 0 ); /** * This is called by the container to get a command depending on diff --git a/lib/kformula/operatorelement.cc b/lib/kformula/operatorelement.cc index a9deab3c..66c1fcdc 100644 --- a/lib/kformula/operatorelement.cc +++ b/lib/kformula/operatorelement.cc @@ -39,7 +39,7 @@ KFORMULA_NAMESPACE_BEGIN -OperatorElement::OperatorElement( BasicElement* tqparent ) : TokenElement( tqparent ), +OperatorElement::OperatorElement( BasicElement* parent ) : TokenElement( parent ), m_form( NoForm ), m_lspaceType( ThickMathSpace ), m_rspaceType( ThickMathSpace ), @@ -159,7 +159,7 @@ void OperatorElement::setForm( FormType type ) * Token elements' content has to be of homogeneous type. Every token element * must (TODO: check this) appear inside a non-token sequence, and thus, if * the command asks for a different content, a new element has to be created in - * tqparent sequence. + * parent sequence. */ KCommand* OperatorElement::buildCommand( Container* container, Request* request ) { @@ -178,21 +178,21 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request } if ( countChildren() == 0 || cursor->getPos() == countChildren() ) { - // We are in the last position, so it's easy, call the tqparent to + // We are in the last position, so it's easy, call the parent to // create a new child - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos + 1); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos + 1); + return parent->buildCommand( container, request ); } } if ( cursor->getPos() == 0 ) { - SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() ); - if ( tqparent ) { - uint pos = tqparent->childPos( this ); - cursor->setTo( tqparent, pos ); - return tqparent->buildCommand( container, request ); + SequenceElement* parent = static_cast<SequenceElement*>( getParent() ); + if ( parent ) { + uint pos = parent->childPos( this ); + cursor->setTo( parent, pos ); + return parent->buildCommand( container, request ); } } @@ -200,7 +200,7 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request // a) Cut from mark to the end // b) Create a new token and add an element from key pressed // c) Create a new token and add elements cut previously - // d) Move cursor to tqparent so that it command execution works fine + // d) Move cursor to parent so that it command execution works fine switch( *request ) { case req_addTextChar: { @@ -211,9 +211,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request command->addCursor( cursor ); command->addToken( id ); command->addContent( id, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -228,9 +228,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request TextElement* text = creationStrategy->createTextElement( tr->text()[i] ); command->addContent( id, text ); } - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } @@ -243,9 +243,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request command->addCursor( cursor ); command->addToken( num ); command->addContent( num, text ); - SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() ); - if ( tqparent ) { - cursor->setTo( tqparent, tqparent->childPos( this ) + 1 ); + SequenceElement* parent = static_cast< SequenceElement* >( getParent() ); + if ( parent ) { + cursor->setTo( parent, parent->childPos( this ) + 1 ); } return command; } diff --git a/lib/kformula/operatorelement.h b/lib/kformula/operatorelement.h index 52c35537..f16f02c4 100644 --- a/lib/kformula/operatorelement.h +++ b/lib/kformula/operatorelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class OperatorElement : public TokenElement { typedef TokenElement inherited; public: - OperatorElement( BasicElement* tqparent = 0 ); + OperatorElement( BasicElement* parent = 0 ); void setForm( FormType type ); /** diff --git a/lib/kformula/paddedelement.cc b/lib/kformula/paddedelement.cc index 5270a4f7..f153a339 100644 --- a/lib/kformula/paddedelement.cc +++ b/lib/kformula/paddedelement.cc @@ -22,7 +22,7 @@ KFORMULA_NAMESPACE_BEGIN -PaddedElement::PaddedElement( BasicElement* tqparent ) : SequenceElement( tqparent ), +PaddedElement::PaddedElement( BasicElement* parent ) : SequenceElement( parent ), m_widthType( NoSize ), m_lspaceType( NoSize ), m_heightType( NoSize ), diff --git a/lib/kformula/paddedelement.h b/lib/kformula/paddedelement.h index 811f861e..5df95b74 100644 --- a/lib/kformula/paddedelement.h +++ b/lib/kformula/paddedelement.h @@ -28,7 +28,7 @@ class PaddedElement : public SequenceElement { typedef SequenceElement inherited; enum SizeType { NoSize, RelativeSize, AbsoluteSize, PixelSize, WidthRelativeSize, HeightRelativeSize }; public: - PaddedElement( BasicElement* tqparent = 0 ); + PaddedElement( BasicElement* parent = 0 ); /** * Calculates our width and height and diff --git a/lib/kformula/phantomelement.cc b/lib/kformula/phantomelement.cc index 72b564a6..e2a07fc6 100644 --- a/lib/kformula/phantomelement.cc +++ b/lib/kformula/phantomelement.cc @@ -21,13 +21,13 @@ KFORMULA_NAMESPACE_BEGIN -PhantomElement::PhantomElement( BasicElement* tqparent ) : SequenceElement( tqparent ) +PhantomElement::PhantomElement( BasicElement* parent ) : SequenceElement( parent ) { } /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void PhantomElement::draw( TQPainter&, const LuPixelRect&, const ContextStyle&, diff --git a/lib/kformula/phantomelement.h b/lib/kformula/phantomelement.h index cf89d893..373c3545 100644 --- a/lib/kformula/phantomelement.h +++ b/lib/kformula/phantomelement.h @@ -27,11 +27,11 @@ KFORMULA_NAMESPACE_BEGIN class PhantomElement : public SequenceElement { typedef SequenceElement inherited; public: - PhantomElement( BasicElement* tqparent = 0 ); + PhantomElement( BasicElement* parent = 0 ); /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/prototype/engine.py b/lib/kformula/prototype/engine.py index 0ce870cf..a2a94487 100644 --- a/lib/kformula/prototype/engine.py +++ b/lib/kformula/prototype/engine.py @@ -24,8 +24,8 @@ from qt import * class BasicElement: """The interface for every element.""" - def __init__(self, tqparent): - self.tqparent = tqparent + def __init__(self, parent): + self.parent = parent self.size = QSize() self.pos = QPoint() @@ -47,7 +47,7 @@ class BasicElement: while element != None: x += element.x() y += element.y() - element = element.tqparent + element = element.parent return QPoint(x, y) def elementAt(self, point, startPoint): @@ -79,7 +79,7 @@ class BasicElement: def formula(self): """Returns the FormulaElement we are a child of.""" - return self.tqparent.formula() + return self.parent.formula() def draw(self, painter, styleContext, startPoint): """Draws the whole thing. Including its tqchildren.""" @@ -87,11 +87,11 @@ class BasicElement: def calcSizes(self, styleContext): """Recalculates the size. - position (relative our to tqparent), width and height + position (relative our to parent), width and height will be stored in self.size, the midline offset in self.midline. - Please note: It's up to a tqparent to store its tqchildren's position.""" + Please note: It's up to a parent to store its tqchildren's position.""" pass def mainChild(self): @@ -119,8 +119,8 @@ class SequenceElement (BasicElement): """The element that contains a number of tqchildren. The tqchildren are aligned in one line.""" - def __init__(self, tqparent): - BasicElement.__init__(self, tqparent) + def __init__(self, parent): + BasicElement.__init__(self, parent) self.tqchildren = [] def elementAtCursor(self, cursor): @@ -141,8 +141,8 @@ class SequenceElement (BasicElement): def moveLeft(self, cursor, fromElement): - # Our tqparent asks us for a cursor position. Found. - if fromElement == self.tqparent: + # Our parent asks us for a cursor position. Found. + if fromElement == self.parent: cursor.set(self, len(self.tqchildren)) # We already owned the cursor. Ask next child then. @@ -154,8 +154,8 @@ class SequenceElement (BasicElement): self.tqchildren[cursor.pos()-1].moveLeft(cursor, self) else: # Needed because FormulaElement derives this. - if self.tqparent != None: - self.tqparent.moveLeft(cursor, self) + if self.parent != None: + self.parent.moveLeft(cursor, self) # The cursor came from one of our tqchildren or # something is wrong. @@ -169,8 +169,8 @@ class SequenceElement (BasicElement): def moveRight(self, cursor, fromElement): - # Our tqparent asks us for a cursor position. Found. - if fromElement == self.tqparent: + # Our parent asks us for a cursor position. Found. + if fromElement == self.parent: cursor.set(self, 0) # We already owned the cursor. Ask next child then. @@ -182,8 +182,8 @@ class SequenceElement (BasicElement): self.tqchildren[cursor.pos()].moveRight(cursor, self) else: # Needed because FormulaElement derives this. - if self.tqparent != None: - self.tqparent.moveRight(cursor, self) + if self.parent != None: + self.parent.moveRight(cursor, self) # The cursor came from one of our tqchildren or # something is wrong. @@ -196,27 +196,27 @@ class SequenceElement (BasicElement): def moveUp(self, cursor, fromElement): - if fromElement == self.tqparent: + if fromElement == self.parent: self.moveRight(cursor, self) else: - if self.tqparent != None: - self.tqparent.moveUp(cursor, self) + if self.parent != None: + self.parent.moveUp(cursor, self) def moveDown(self, cursor, fromElement): - if fromElement == self.tqparent: + if fromElement == self.parent: self.moveRight(cursor, self) else: - if self.tqparent != None: - self.tqparent.moveDown(cursor, self) + if self.parent != None: + self.parent.moveDown(cursor, self) def moveHome(self, cursor): if cursor.isSelection(): element = cursor.element() if element != self: - while element.tqparent != self: - element = element.tqparent + while element.parent != self: + element = element.parent cursor.setMarkPos(self.tqchildren.index(element)+1) cursor.set(self, 0) @@ -224,8 +224,8 @@ class SequenceElement (BasicElement): if cursor.isSelection(): element = cursor.element() if element != self: - while element.tqparent != self: - element = element.tqparent + while element.parent != self: + element = element.parent cursor.setMarkPos(self.tqchildren.index(element)) cursor.set(self, len(self.tqchildren)) @@ -279,7 +279,7 @@ class SequenceElement (BasicElement): def setMainChild(self, sequenceElement): if len(self.tqchildren) > 0: self.tqchildren[0] = sequenceElement - sequenceElement.tqparent = self + sequenceElement.parent = self else: self.addChild(sequenceElement) @@ -292,9 +292,9 @@ class SequenceElement (BasicElement): the cursor) with the given element. The replaced sequence becomes the main child of the new element.""" - # it is essential to set up the tqparent pointer for + # it is essential to set up the parent pointer for # the notification to work. - element.tqparent = self + element.parent = self seq = element.makeSequence() if cursor.isSelection(): @@ -319,7 +319,7 @@ class SequenceElement (BasicElement): def replaceElementByMainChild(self, cursor, element): """Replaces the given element with the content of its main child. (The main child is always a SequenceElement.)""" - assert element.tqparent == self + assert element.parent == self self.formula().elementRemoved(element) seq = element.mainChild() @@ -327,7 +327,7 @@ class SequenceElement (BasicElement): self.tqchildren.remove(element) for child in seq.tqchildren: self.tqchildren.insert(pos, child) - child.tqparent = self + child.parent = self pos += 1 cursor.set(self, pos) self.formula().changed() @@ -335,7 +335,7 @@ class SequenceElement (BasicElement): def addChild(self, element): self.tqchildren.append(element) - element.tqparent = self + element.parent = self self.formula().changed() def insertChild(self, cursor, element): @@ -343,7 +343,7 @@ class SequenceElement (BasicElement): The cursor is placed behind the new element.""" pos = cursor.pos() self.tqchildren.insert(pos, element) - element.tqparent = self + element.parent = self cursor.set(self, pos+1) self.formula().changed() @@ -351,7 +351,7 @@ class SequenceElement (BasicElement): """Replaces the element before the cursor with the new one. No range checking. Be careful.""" self.tqchildren[cursor.pos()-1] = element - element.tqparent = self + element.parent = self self.formula().changed() def removeChild(self, cursor, element): @@ -359,8 +359,8 @@ class SequenceElement (BasicElement): cursor.set(self, self.tqchildren.index(element)) self.tqchildren.remove(element) if len(self.tqchildren) == 0: - if self.tqparent != None: - self.tqparent.removeChild(cursor, self) + if self.parent != None: + self.parent.removeChild(cursor, self) return self.formula().changed() @@ -380,8 +380,8 @@ class SequenceElement (BasicElement): self.formula().changed() else: if len(self.tqchildren) == 0: - if self.tqparent != None: - self.tqparent.removeChild(cursor, self) + if self.parent != None: + self.parent.removeChild(cursor, self) def removeChildBefore(self, cursor): pos = cursor.pos()-1 @@ -400,8 +400,8 @@ class SequenceElement (BasicElement): self.formula().changed() else: if len(self.tqchildren) == 0: - if self.tqparent != None: - self.tqparent.removeChild(cursor, self) + if self.parent != None: + self.parent.removeChild(cursor, self) def globalCursorPos(self, pos): @@ -426,7 +426,7 @@ class SequenceElement (BasicElement): class FormulaElement (SequenceElement): """The main element. A formula consists of a FormulaElement and its tqchildren. - The only element that has no tqparent.""" + The only element that has no parent.""" def __init__(self, document): SequenceElement.__init__(self, None) @@ -452,15 +452,15 @@ class FormulaElement (SequenceElement): class TextElement (BasicElement): """One char.""" - def __init__(self, tqparent, char): - BasicElement.__init__(self, tqparent) + def __init__(self, parent, char): + BasicElement.__init__(self, parent) self.char = char def moveLeft(self, cursor, fromElement): - self.tqparent.moveLeft(cursor, self) + self.parent.moveLeft(cursor, self) def moveRight(self, cursor, fromElement): - self.tqparent.moveRight(cursor, self) + self.parent.moveRight(cursor, self) def draw(self, painter, styleContext, startPoint): styleContext.setupPainter(painter) @@ -480,8 +480,8 @@ class IndexElement (BasicElement): def __init__(self, contentElement): if contentElement != None: - BasicElement.__init__(self, contentElement.tqparent) - contentElement.tqparent = self + BasicElement.__init__(self, contentElement.parent) + contentElement.parent = self else: BasicElement.__init__(self, None) @@ -525,9 +525,9 @@ class IndexElement (BasicElement): assert fromElement != None if cursor.isSelection(): - self.tqparent.moveLeft(cursor, self) + self.parent.moveLeft(cursor, self) - elif fromElement == self.tqparent: + elif fromElement == self.parent: if self.lowerRight != None: self.lowerRight.moveLeft(cursor, self) elif self.upperRight != None: @@ -550,25 +550,25 @@ class IndexElement (BasicElement): elif self.upperLeft != None: self.upperLeft.moveLeft(cursor, self) else: - self.tqparent.moveLeft(cursor, self) + self.parent.moveLeft(cursor, self) elif fromElement == self.lowerLeft: if self.upperLeft != None: self.upperLeft.moveLeft(cursor, self) else: - self.tqparent.moveLeft(cursor, self) + self.parent.moveLeft(cursor, self) else: - self.tqparent.moveLeft(cursor, self) + self.parent.moveLeft(cursor, self) def moveRight(self, cursor, fromElement): assert fromElement != None if cursor.isSelection(): - self.tqparent.moveRight(cursor, self) + self.parent.moveRight(cursor, self) - elif fromElement == self.tqparent: + elif fromElement == self.parent: if self.upperLeft != None: self.upperLeft.moveRight(cursor, self) elif self.lowerLeft != None: @@ -591,26 +591,26 @@ class IndexElement (BasicElement): elif self.lowerRight != None: self.lowerRight.moveRight(cursor, self) else: - self.tqparent.moveRight(cursor, self) + self.parent.moveRight(cursor, self) elif fromElement == self.upperRight: if self.lowerRight != None: self.lowerRight.moveRight(cursor, self) else: - self.tqparent.moveRight(cursor, self) + self.parent.moveRight(cursor, self) else: - self.tqparent.moveRight(cursor, self) + self.parent.moveRight(cursor, self) def moveUp(self, cursor, fromElement): assert fromElement != None - if fromElement == self.tqparent: + if fromElement == self.parent: self.content.moveRight(cursor, self) elif fromElement == self.upperLeft or fromElement == self.upperRight: - self.tqparent.moveUp(cursor, self) + self.parent.moveUp(cursor, self) elif fromElement == self.content: if self.upperRight != None: @@ -619,7 +619,7 @@ class IndexElement (BasicElement): #self.upperLeft.moveRight(cursor, self) self.upperLeft.moveLeft(cursor, self) else: - self.tqparent.moveUp(cursor, self) + self.parent.moveUp(cursor, self) elif fromElement == self.lowerLeft: self.content.moveRight(cursor, self) @@ -628,17 +628,17 @@ class IndexElement (BasicElement): self.content.moveLeft(cursor, self) else: # should never happen. - self.tqparent.moveUp(cursor, self) + self.parent.moveUp(cursor, self) def moveDown(self, cursor, fromElement): assert fromElement != None - if fromElement == self.tqparent: + if fromElement == self.parent: self.content.moveRight(cursor, self) elif fromElement == self.lowerLeft or fromElement == self.lowerRight: - self.tqparent.moveDown(cursor, fromElement) + self.parent.moveDown(cursor, fromElement) elif fromElement == self.content: if self.lowerRight != None: @@ -647,7 +647,7 @@ class IndexElement (BasicElement): #self.lowerLeft.moveRight(cursor, self) self.lowerLeft.moveLeft(cursor, self) else: - self.tqparent.moveDown(cursor, self) + self.parent.moveDown(cursor, self) elif fromElement == self.upperLeft: self.content.moveRight(cursor, self) @@ -656,7 +656,7 @@ class IndexElement (BasicElement): self.content.moveLeft(cursor, self) else: # should never happen. - self.tqparent.moveDown(cursor, self) + self.parent.moveDown(cursor, self) def draw(self, painter, styleContext, startPoint): @@ -783,7 +783,7 @@ class IndexElement (BasicElement): def setMainChild(self, sequenceElement): self.content = sequenceElement - self.content.tqparent = self + self.content.parent = self self.formula().changed() def removeChild(self, cursor, element): @@ -804,12 +804,12 @@ class IndexElement (BasicElement): self.content.moveLeft(cursor, self) self.lowerRight = None elif element == self.content: - self.tqparent.removeChild(cursor, self) + self.parent.removeChild(cursor, self) return if self.upperLeft == None and self.lowerLeft == None and \ self.upperRight == None and self.lowerRight == None: - self.tqparent.replaceElementByMainChild(cursor, self) + self.parent.replaceElementByMainChild(cursor, self) else: self.formula().changed() @@ -876,7 +876,7 @@ class Cursor: return self.currentMarkPos def setMarkPos(self, markPos): - """Gets called by elements if the cursor moves up to the tqparent.""" + """Gets called by elements if the cursor moves up to the parent.""" self.selectionFlag = (markPos != -1) self.currentMarkPos = markPos @@ -916,10 +916,10 @@ class Cursor: if isinstance(element, IndexElement): return element if self.pos() == self.sequenceElement.countChildren(): - tqparent = self.sequenceElement.tqparent - if isinstance(tqparent, IndexElement): - if self.sequenceElement == tqparent.mainChild(): - return tqparent + parent = self.sequenceElement.parent + if isinstance(parent, IndexElement): + if self.sequenceElement == parent.mainChild(): + return parent def addUpperRightIndex(self): @@ -929,7 +929,7 @@ class Cursor: self.sequenceElement.replaceCurrentSelection(self, indexElement) index = indexElement.requireUpperRight() - index.moveRight(self, index.tqparent) + index.moveRight(self, index.parent) def addLowerRightIndex(self): @@ -939,7 +939,7 @@ class Cursor: self.sequenceElement.replaceCurrentSelection(self, indexElement) index = indexElement.requireLowerRight() - index.moveRight(self, index.tqparent) + index.moveRight(self, index.parent) def addTextElement(self, char): @@ -1018,8 +1018,8 @@ class Cursor: formula = self.sequenceElement.formula() element = formula.elementAt(mouseEvent.pos(), QPoint(0, 0)) if element != None: - if element.tqparent != None: - element.moveLeft(self, element.tqparent) + if element.parent != None: + element.moveLeft(self, element.parent) self.selectionFlag = 0 self.mouseMarkFlag = 1 self.setMarkPos(self.pos()) @@ -1034,8 +1034,8 @@ class Cursor: formula = self.sequenceElement.formula() element = formula.elementAt(mouseEvent.pos(), QPoint(0, 0)) if element != None: - if element.tqparent != None: - element.tqparent.moveLeft(self, element) + if element.parent != None: + element.parent.moveLeft(self, element) def elementRemoved(self, element): @@ -1046,10 +1046,10 @@ class Cursor: if e == element: # This is meant to catch all cursors that did not # cause the deletion. - e.tqparent.moveRight(self, e) + e.parent.moveRight(self, e) self.sequenceElement.moveHome(self) return - e = e.tqparent + e = e.parent class StyleContext: diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py index 2265635a..585574cf 100755 --- a/lib/kformula/prototype/unicode.py +++ b/lib/kformula/prototype/unicode.py @@ -5,8 +5,8 @@ from qt import * from xml.sax import saxutils, handler, make_parser class Form1(QWidget): - def __init__(self,tqparent = None,name = None,fl = 0): - QWidget.__init__(self,tqparent,name,fl) + def __init__(self,parent = None,name = None,fl = 0): + QWidget.__init__(self,parent,name,fl) if name == None: self.setName('Form1') diff --git a/lib/kformula/rootelement.cc b/lib/kformula/rootelement.cc index f9331f13..5adeb51c 100644 --- a/lib/kformula/rootelement.cc +++ b/lib/kformula/rootelement.cc @@ -38,7 +38,7 @@ class RootSequenceElement : public SequenceElement { typedef SequenceElement inherited; public: - RootSequenceElement( BasicElement* tqparent = 0 ) : SequenceElement( tqparent ) {} + RootSequenceElement( BasicElement* parent = 0 ) : SequenceElement( parent ) {} virtual RootSequenceElement* clone() { return new RootSequenceElement( *this ); } @@ -92,8 +92,8 @@ KCommand* RootSequenceElement::buildCommand( Container* container, Request* requ } -RootElement::RootElement(BasicElement* tqparent) - : BasicElement(tqparent) +RootElement::RootElement(BasicElement* parent) + : BasicElement(parent) { content = new RootSequenceElement( this ); index = 0; @@ -235,7 +235,7 @@ void RootElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void RootElement::draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/rootelement.h b/lib/kformula/rootelement.h index 4908a643..1eacf4d4 100644 --- a/lib/kformula/rootelement.h +++ b/lib/kformula/rootelement.h @@ -38,7 +38,7 @@ public: //enum { contentPos, indexPos }; - RootElement(BasicElement* tqparent = 0); + RootElement(BasicElement* parent = 0); ~RootElement(); RootElement( const RootElement& ); @@ -75,7 +75,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -231,16 +231,16 @@ private: class RootElementIndex : public ElementIndex { public: - RootElementIndex(RootElement* p) : tqparent(p) {} + RootElementIndex(RootElement* p) : parent(p) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToIndex(cursor, direction); } + { parent->moveToIndex(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToIndex(cursor); } + { parent->setToIndex(cursor); } virtual bool hasIndex() const - { return tqparent->hasIndex(); } - virtual RootElement* getElement() { return tqparent; } + { return parent->hasIndex(); } + virtual RootElement* getElement() { return parent; } protected: - RootElement* tqparent; + RootElement* parent; }; diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc index 78a95d95..93293db7 100644 --- a/lib/kformula/sequenceelement.cc +++ b/lib/kformula/sequenceelement.cc @@ -72,8 +72,8 @@ void SequenceElement::setStyle( StyleElement *st ) style = st; } -SequenceElement::SequenceElement(BasicElement* tqparent) - : BasicElement(tqparent), parseTree(0), textSequence(true),singlePipe(true), style(0) +SequenceElement::SequenceElement(BasicElement* parent) + : BasicElement(parent), parseTree(0), textSequence(true),singlePipe(true), style(0) { assert( creationStrategy != 0 ); tqchildren.setAutoDelete(true); @@ -247,7 +247,7 @@ void SequenceElement::setChildrenPositions() /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void SequenceElement::draw( TQPainter& painter, const LuPixelRect& r, @@ -449,7 +449,7 @@ luPixel SequenceElement::getChildPosition( const ContextStyle& context, uint chi */ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) { - // Our tqparent asks us for a cursor position. Found. + // Our parent asks us for a cursor position. Found. if (from == getParent()) { cursor->setTo(this, tqchildren.count()); if ( cursor->isSelectionMode() ) { @@ -502,7 +502,7 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) */ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from) { - // Our tqparent asks us for a cursor position. Found. + // Our parent asks us for a cursor position. Found. if (from == getParent()) { cursor->setTo(this, 0); from->entered( this ); @@ -741,8 +741,8 @@ bool SequenceElement::insert( uint index, BasicElement *child ) // tqchildren.remove(pos); // /* // if len(self.tqchildren) == 0: -// if self.tqparent != None: -// self.tqparent.removeChild(cursor, self) +// if self.parent != None: +// self.parent.removeChild(cursor, self) // return // */ // formula()->changed(); @@ -1411,11 +1411,11 @@ void SequenceElement::getChildrenDom( TQDomDocument& doc, TQDomElement elem, /** * Stores the given tqchildrens MathML dom in the element. */ -void SequenceElement::getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& tqparent, +void SequenceElement::getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& parent, uint from, uint to) { for ( uint i = from; i < to; i++ ) { - tqchildren.at( i )->writeMathML( doc, tqparent, false ); + tqchildren.at( i )->writeMathML( doc, parent, false ); } } @@ -1522,7 +1522,7 @@ void SequenceElement::parse() parseTree = parser.parse(tqchildren); // With the IndexElement dynamically changing its text/non-text - // behaviour we need to reparse your tqparent, too. Hacky! + // behaviour we need to reparse your parent, too. Hacky! BasicElement* p = getParent(); if ( p != 0 ) { SequenceElement* seq = dynamic_cast<SequenceElement*>( p->getParent() ); @@ -1600,8 +1600,8 @@ int SequenceElement::childPos( const BasicElement* child ) const } -NameSequence::NameSequence( BasicElement* tqparent ) - : SequenceElement( tqparent ) +NameSequence::NameSequence( BasicElement* parent ) + : SequenceElement( parent ) { } diff --git a/lib/kformula/sequenceelement.h b/lib/kformula/sequenceelement.h index 9696d3ad..4d32153c 100644 --- a/lib/kformula/sequenceelement.h +++ b/lib/kformula/sequenceelement.h @@ -41,7 +41,7 @@ class SequenceElement : public BasicElement { SequenceElement& operator=( const SequenceElement& ) { return *this; } public: - SequenceElement(BasicElement* tqparent = 0); + SequenceElement(BasicElement* parent = 0); ~SequenceElement(); SequenceElement( const SequenceElement& ); @@ -101,7 +101,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -493,7 +493,7 @@ class NameSequence : public SequenceElement { typedef SequenceElement inherited; public: - NameSequence( BasicElement* tqparent = 0 ); + NameSequence( BasicElement* parent = 0 ); virtual NameSequence* clone() { return new NameSequence( *this ); diff --git a/lib/kformula/spaceelement.cc b/lib/kformula/spaceelement.cc index f3f43d1c..a7e23464 100644 --- a/lib/kformula/spaceelement.cc +++ b/lib/kformula/spaceelement.cc @@ -33,8 +33,8 @@ KFORMULA_NAMESPACE_BEGIN -SpaceElement::SpaceElement( SpaceWidth space, bool tab, BasicElement* tqparent ) - : BasicElement( tqparent ), +SpaceElement::SpaceElement( SpaceWidth space, bool tab, BasicElement* parent ) + : BasicElement( parent ), m_tab( tab ), m_widthType( NoSize ), m_heightType( NoSize ), diff --git a/lib/kformula/spaceelement.h b/lib/kformula/spaceelement.h index 856af25e..a8c5ec9a 100644 --- a/lib/kformula/spaceelement.h +++ b/lib/kformula/spaceelement.h @@ -48,7 +48,7 @@ class SpaceElement : public BasicElement { SpaceElement operator=( const SpaceElement& ) { return *this; } public: - SpaceElement( SpaceWidth space = THIN, bool tab=false, BasicElement* tqparent = 0 ); + SpaceElement( SpaceWidth space = THIN, bool tab=false, BasicElement* parent = 0 ); SpaceElement( const SpaceElement& ); virtual SpaceElement* clone() { @@ -87,7 +87,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/stringelement.cc b/lib/kformula/stringelement.cc index 2f13ad77..e9851033 100644 --- a/lib/kformula/stringelement.cc +++ b/lib/kformula/stringelement.cc @@ -22,7 +22,7 @@ KFORMULA_NAMESPACE_BEGIN -StringElement::StringElement( BasicElement* tqparent ) : TokenElement( tqparent ) +StringElement::StringElement( BasicElement* parent ) : TokenElement( parent ) { } diff --git a/lib/kformula/stringelement.h b/lib/kformula/stringelement.h index 447895db..6195fa45 100644 --- a/lib/kformula/stringelement.h +++ b/lib/kformula/stringelement.h @@ -27,7 +27,7 @@ KFORMULA_NAMESPACE_BEGIN class StringElement : public TokenElement { typedef TokenElement inherited; public: - StringElement( BasicElement* tqparent = 0 ); + StringElement( BasicElement* parent = 0 ); virtual int buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDomNode n); protected: diff --git a/lib/kformula/styleelement.cc b/lib/kformula/styleelement.cc index fc61386c..3bb6b6b1 100644 --- a/lib/kformula/styleelement.cc +++ b/lib/kformula/styleelement.cc @@ -22,7 +22,7 @@ KFORMULA_NAMESPACE_BEGIN -StyleElement::StyleElement( BasicElement* tqparent ) : TokenStyleElement( tqparent ), +StyleElement::StyleElement( BasicElement* parent ) : TokenStyleElement( parent ), m_scriptMinSizeType( NoSize ), m_veryVeryThinMathSpaceType( NoSize ), m_veryThinMathSpaceType( NoSize ), @@ -88,7 +88,7 @@ bool StyleElement::readAttributesFromMathMLDom( const TQDomElement& element ) } TQString backgroundStr = element.attribute( "background" ); if ( ! backgroundStr.isNull() ) { - // TODO: trantqparent background + // TODO: tranparent background m_customBackground = true; if ( backgroundStr[0] != '#' ) { m_background = TQColor( getHtmlColor( backgroundStr ) ); diff --git a/lib/kformula/styleelement.h b/lib/kformula/styleelement.h index 7751a19a..ffe932b1 100644 --- a/lib/kformula/styleelement.h +++ b/lib/kformula/styleelement.h @@ -29,7 +29,7 @@ class StyleElement : public TokenStyleElement { typedef TokenStyleElement inherited; public: - StyleElement( BasicElement* tqparent = 0 ); + StyleElement( BasicElement* parent = 0 ); protected: diff --git a/lib/kformula/symbolaction.cc b/lib/kformula/symbolaction.cc index 6a80eeec..d5aa3176 100644 --- a/lib/kformula/symbolaction.cc +++ b/lib/kformula/symbolaction.cc @@ -101,16 +101,16 @@ void SymbolComboItem::paint( TQPainter *p ) /* * The symbol action * */ -SymbolAction::SymbolAction( TQObject* tqparent, const char* name ) - : KSelectAction( tqparent, name ) +SymbolAction::SymbolAction( TQObject* parent, const char* name ) + : KSelectAction( parent, name ) { setEditable( FALSE ); } SymbolAction::SymbolAction( const TQString& text, const KShortcut& cut, const TQObject* receiver, const char* slot, - TQObject* tqparent, const char* name ) - : KSelectAction( text, cut, receiver, slot, tqparent, name ) + TQObject* parent, const char* name ) + : KSelectAction( text, cut, receiver, slot, parent, name ) { setEditable( FALSE ); } diff --git a/lib/kformula/symbolaction.h b/lib/kformula/symbolaction.h index a8e7eadf..b3158014 100644 --- a/lib/kformula/symbolaction.h +++ b/lib/kformula/symbolaction.h @@ -32,9 +32,9 @@ KFORMULA_NAMESPACE_BEGIN class SymbolAction : public KSelectAction { public: - SymbolAction( TQObject* tqparent = 0, const char* name = 0 ); + SymbolAction( TQObject* parent = 0, const char* name = 0 ); SymbolAction( const TQString& text, const KShortcut& cut, - const TQObject* receiver, const char* slot, TQObject* tqparent, + const TQObject* receiver, const char* slot, TQObject* parent, const char* name = 0 ); int plug( TQWidget*, int index = -1 ); diff --git a/lib/kformula/symbolelement.cc b/lib/kformula/symbolelement.cc index fb2eb69d..a601cea4 100644 --- a/lib/kformula/symbolelement.cc +++ b/lib/kformula/symbolelement.cc @@ -36,7 +36,7 @@ class SymbolSequenceElement : public SequenceElement { typedef SequenceElement inherited; public: - SymbolSequenceElement( BasicElement* tqparent = 0 ) : SequenceElement( tqparent ) {} + SymbolSequenceElement( BasicElement* parent = 0 ) : SequenceElement( parent ) {} /** * This is called by the container to get a command depending on @@ -87,8 +87,8 @@ KCommand* SymbolSequenceElement::buildCommand( Container* container, Request* re } -SymbolElement::SymbolElement(SymbolType type, BasicElement* tqparent) - : BasicElement(tqparent), symbol( 0 ), symbolType( type ) +SymbolElement::SymbolElement(SymbolType type, BasicElement* parent) + : BasicElement(parent), symbol( 0 ), symbolType( type ) { content = new SymbolSequenceElement( this ); upper = 0; @@ -300,7 +300,7 @@ void SymbolElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void SymbolElement::draw( TQPainter& painter, const LuPixelRect& r, @@ -586,9 +586,9 @@ void SymbolElement::remove(FormulaCursor* cursor, setToLower(cursor); break; case contentPos: { - BasicElement* tqparent = getParent(); - tqparent->selectChild(cursor, this); - tqparent->remove(cursor, removedChildren, direction); + BasicElement* parent = getParent(); + parent->selectChild(cursor, this); + parent->remove(cursor, removedChildren, direction); break; } } @@ -852,7 +852,7 @@ TQString SymbolElement::formulaString() return sym + ")"; } -void SymbolElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat ) const +void SymbolElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat ) const { TQDomElement de = doc.createElement( oasisFormat ? "math:mrow" : "mrow" ); TQDomElement mo = doc.createElement( oasisFormat ? "math:mo" : "mo" ); @@ -900,7 +900,7 @@ void SymbolElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool o de.appendChild( between ); content->writeMathML( doc, de, oasisFormat ); - tqparent.appendChild( de ); + parent.appendChild( de ); } KFORMULA_NAMESPACE_END diff --git a/lib/kformula/symbolelement.h b/lib/kformula/symbolelement.h index 877c4493..0133258e 100644 --- a/lib/kformula/symbolelement.h +++ b/lib/kformula/symbolelement.h @@ -36,7 +36,7 @@ public: //enum { contentPos, upperPos, lowerPos }; - SymbolElement(SymbolType type = EmptyBracket, BasicElement* tqparent = 0); + SymbolElement(SymbolType type = EmptyBracket, BasicElement* parent = 0); ~SymbolElement(); SymbolElement( const SymbolElement& ); @@ -74,7 +74,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -227,7 +227,7 @@ public: virtual TQString formulaString(); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; protected: @@ -263,34 +263,34 @@ private: */ class SymbolElementIndex : public ElementIndex { public: - SymbolElementIndex(SymbolElement* p) : tqparent(p) {} - virtual SymbolElement* getElement() { return tqparent; } + SymbolElementIndex(SymbolElement* p) : parent(p) {} + virtual SymbolElement* getElement() { return parent; } protected: - SymbolElement* tqparent; + SymbolElement* parent; }; // We have a (very simple) type for every index. class UpperIndex : public SymbolElementIndex { public: - UpperIndex(SymbolElement* tqparent) : SymbolElementIndex(tqparent) {} + UpperIndex(SymbolElement* parent) : SymbolElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToUpper(cursor, direction); } + { parent->moveToUpper(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToUpper(cursor); } + { parent->setToUpper(cursor); } virtual bool hasIndex() const - { return tqparent->hasUpper(); } + { return parent->hasUpper(); } }; class LowerIndex : public SymbolElementIndex { public: - LowerIndex(SymbolElement* tqparent) : SymbolElementIndex(tqparent) {} + LowerIndex(SymbolElement* parent) : SymbolElementIndex(parent) {} virtual void moveToIndex(FormulaCursor* cursor, Direction direction) - { tqparent->moveToLower(cursor, direction); } + { parent->moveToLower(cursor, direction); } virtual void setToIndex(FormulaCursor* cursor) - { tqparent->setToLower(cursor); } + { parent->setToLower(cursor); } virtual bool hasIndex() const - { return tqparent->hasLower(); } + { return parent->hasLower(); } }; diff --git a/lib/kformula/textelement.cc b/lib/kformula/textelement.cc index c42a6e2f..c9826429 100644 --- a/lib/kformula/textelement.cc +++ b/lib/kformula/textelement.cc @@ -37,8 +37,8 @@ KFORMULA_NAMESPACE_BEGIN -TextElement::TextElement(TQChar ch, bool beSymbol, BasicElement* tqparent) - : BasicElement(tqparent), character(ch), symbol(beSymbol) +TextElement::TextElement(TQChar ch, bool beSymbol, BasicElement* parent) + : BasicElement(parent), character(ch), symbol(beSymbol) { charStyle( anyChar ); charFamily( anyFamily ); @@ -156,7 +156,7 @@ void TextElement::calcSizes( const ContextStyle& context, /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ void TextElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, @@ -351,9 +351,9 @@ const SymbolTable& TextElement::getSymbolTable() const } -void TextElement::writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool ) const +void TextElement::writeMathML( TQDomDocument& doc, TQDomNode& parent, bool ) const { - tqparent.appendChild( doc.createTextNode( getCharacter() ) ); + parent.appendChild( doc.createTextNode( getCharacter() ) ); } /** @@ -501,8 +501,8 @@ TQString TextElement::formulaString() } -EmptyElement::EmptyElement( BasicElement* tqparent ) - : BasicElement( tqparent ) +EmptyElement::EmptyElement( BasicElement* parent ) + : BasicElement( parent ) { } diff --git a/lib/kformula/textelement.h b/lib/kformula/textelement.h index 48eb1d43..99b6e63a 100644 --- a/lib/kformula/textelement.h +++ b/lib/kformula/textelement.h @@ -38,7 +38,7 @@ class TextElement : public BasicElement { TextElement operator=( const TextElement& ) { return *this; } public: - TextElement(TQChar ch = ' ', bool beSymbol = false, BasicElement* tqparent = 0); + TextElement(TQChar ch = ' ', bool beSymbol = false, BasicElement* parent = 0); TextElement( const TextElement& ); virtual TextElement* clone() { @@ -82,7 +82,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, @@ -129,7 +129,7 @@ public: virtual TQString formulaString(); - virtual void writeMathML( TQDomDocument& doc, TQDomNode& tqparent, bool oasisFormat = false ) const ; + virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; protected: @@ -226,7 +226,7 @@ class EmptyElement : public BasicElement { EmptyElement& operator=( const EmptyElement& ) { return *this; } public: - EmptyElement( BasicElement* tqparent = 0 ); + EmptyElement( BasicElement* parent = 0 ); EmptyElement( const EmptyElement& ); virtual EmptyElement* clone() { @@ -253,7 +253,7 @@ public: /** * Draws the whole element including its tqchildren. - * The `parentOrigin' is the point this element's tqparent starts. + * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ virtual void draw( TQPainter& painter, const LuPixelRect& r, diff --git a/lib/kformula/tokenelement.cc b/lib/kformula/tokenelement.cc index bb63c05f..272af51f 100644 --- a/lib/kformula/tokenelement.cc +++ b/lib/kformula/tokenelement.cc @@ -38,7 +38,7 @@ KFORMULA_NAMESPACE_BEGIN -TokenElement::TokenElement( BasicElement* tqparent ) : TokenStyleElement( tqparent ), +TokenElement::TokenElement( BasicElement* parent ) : TokenStyleElement( parent ), m_textOnly( true ) { } diff --git a/lib/kformula/tokenelement.h b/lib/kformula/tokenelement.h index 9982225b..571cc247 100644 --- a/lib/kformula/tokenelement.h +++ b/lib/kformula/tokenelement.h @@ -30,7 +30,7 @@ KFORMULA_NAMESPACE_BEGIN class TokenElement : public TokenStyleElement { typedef TokenStyleElement inherited; public: - TokenElement( BasicElement* tqparent = 0 ); + TokenElement( BasicElement* parent = 0 ); virtual int buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDomNode n); diff --git a/lib/kformula/tokenstyleelement.cc b/lib/kformula/tokenstyleelement.cc index 3b1e6224..c8e4799f 100644 --- a/lib/kformula/tokenstyleelement.cc +++ b/lib/kformula/tokenstyleelement.cc @@ -24,7 +24,7 @@ KFORMULA_NAMESPACE_BEGIN -TokenStyleElement::TokenStyleElement( BasicElement* tqparent ) : SequenceElement( tqparent ), +TokenStyleElement::TokenStyleElement( BasicElement* parent ) : SequenceElement( parent ), m_mathSizeType ( NoSize ), m_charStyle( anyChar ), m_charFamily( anyFamily ), diff --git a/lib/kformula/tokenstyleelement.h b/lib/kformula/tokenstyleelement.h index 3e601ca8..3789a0f4 100644 --- a/lib/kformula/tokenstyleelement.h +++ b/lib/kformula/tokenstyleelement.h @@ -36,7 +36,7 @@ class TokenStyleElement : public SequenceElement { typedef SequenceElement inherited; public: - TokenStyleElement( BasicElement* tqparent = 0 ); + TokenStyleElement( BasicElement* parent = 0 ); virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, |