diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:56:31 -0600 |
commit | c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54 (patch) | |
tree | 1ee1912ac4bb966475f0db0f2a78678661b4b4a5 /lib | |
parent | 94844816550ad672ccfcdc25659c625546239998 (diff) | |
download | koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.tar.gz koffice-c9cb4f487428aad5d8cda5e3a4b9ad87390d7e54.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 94844816550ad672ccfcdc25659c625546239998.
Diffstat (limited to 'lib')
343 files changed, 2526 insertions, 2526 deletions
diff --git a/lib/kformula/DESIGN b/lib/kformula/DESIGN index a6a7eccb..3402d9ee 100644 --- a/lib/kformula/DESIGN +++ b/lib/kformula/DESIGN @@ -19,21 +19,21 @@ objects from it. Responsebilities (This goes for every derived element and therefore for each one.) -- knows its children. Actually BasicElement doesn't have any. But it - already defines that children must be known by their parent. -- knows its bounding rectangle (its size.) The children are included +- knows its tqchildren. Actually BasicElement doesn't have any. But it + already defines that tqchildren must be known by their parent. +- knows its bounding rectangle (its size.) The tqchildren are included in this rect. (The position is relative to the parent.) -//- knows its middle line. (for alignment) -- knows it's zero point for midline (vertical alignment) and +//- 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); children are drawn, too +- draws itself (given a painter); tqchildren are drawn, too - knows all positions where the cursor is allowed to be. (see below) - knows its parent; The topmost element has no parent; there is a implicit guaranty that the topmost element is always a SequenceElement. - can save and load itself. different formates. (see below) -- all children must be a SequenceElement. Except for SequenceElement's - children that might be of any type. +- all tqchildren must be a SequenceElement. Except for SequenceElement's + tqchildren that might be of any type. - might have its own color. - might have its own font size (see below). @@ -41,14 +41,14 @@ Responsebilities SequenceElement from BasicElement --------------- -Manages a list of children. The children are aligned horizontally at +Manages a list of tqchildren. The tqchildren are aligned horizontally at one middle line. No gaps, no overlaps. -Has no own look. It just draws all its children and is done. Except if +Has no own look. It just draws all its tqchildren and is done. Except if its empty. It looks like an empty space then (i.e. a little square) Has n+1 valid cursor positions where n is the number of -children. These are before, between and after the children. +tqchildren. These are before, between and after the tqchildren. May contain any (type of) element as child @@ -73,20 +73,20 @@ FormulaElement we get a chance to pass messages to the outside world. RootElement from BasicElement ----------- -contains two children. content and index. index is optional. +contains two tqchildren. content and index. index is optional. IndexElement from BasicElement ------------ -contains five children. content and four indexes. all indexes are +contains five tqchildren. content and four indexes. all indexes are optional. If there is no index the element might be replaced by its content. TextElement from BasicElement ----------- -contains one char and no children at all. +contains one char and no tqchildren at all. Might have its own font and size. But preferes to use a reasonalbe @@ -104,7 +104,7 @@ choose with. FractionElement from BasicElement --------------- -2 children: numerator, denominator +2 tqchildren: numerator, denominator DecorationElement from BasicElement @@ -121,7 +121,7 @@ the other side of the decoration. SumIntegralElement from BasicElement //PrefixedElement ------------------ -draws all sorts of mathematical symbols with three children. Above, +draws all sorts of mathematical symbols with three tqchildren. Above, below (or whereever the indices and limits go)and to the right. @@ -142,7 +142,7 @@ typical of a math formula. MatrixElement from BasicElement ------------- -A matrix of children. +A matrix of tqchildren. With all align stuff, internal borders etc, matrix dots handling (i.e. those dots or lines that complete the matrix, not well handled in TeX), etc.. @@ -150,7 +150,7 @@ etc.. SpaceElement from BasicElement ------------ -No children at all. Provides the facility to insert horizontal spaces +No tqchildren at all. Provides the facility to insert horizontal spaces in the formula. (therefore it is similar to TextElement.) @@ -184,14 +184,14 @@ If the cursor points into an element this element is said to own the cursor. There are a few rules that describe how new cursor positions are calculated given the current key: -- An elements cursor positions are its children. The element might not -own the cursor except when it is owned by one of its children. The +- An elements cursor positions are its tqchildren. The element might not +own the cursor except when it is owned by one of its tqchildren. The only exception is SequenceElement which has valid cursor positions -before, between and after its children, too. +before, between and after its tqchildren, too. (Therefore the cursor is always owned by a SequenceElement.) -- Each element's children are ordered. If the cursor leaves one child +- 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 parent. @@ -344,7 +344,7 @@ We want a formula to look different according to its surroundings. (Most obviosly according to the available height and/or width.) It would be great to get something like automatic operator -alignment. So if you type some formulas each on its own line the +tqalignment. So if you type some formulas each on its own line the assigment operators should be automatically in a column. (If the user turns this on.) diff --git a/lib/kformula/MatrixDialog.cc b/lib/kformula/MatrixDialog.cc index ec89326c..c8169f24 100644 --- a/lib/kformula/MatrixDialog.cc +++ b/lib/kformula/MatrixDialog.cc @@ -22,7 +22,7 @@ #include <tqspinbox.h> #include <tqlabel.h> #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> #include <klocale.h> KFORMULA_NAMESPACE_BEGIN diff --git a/lib/kformula/actionelement.cc b/lib/kformula/actionelement.cc index e1dce937..d4ef8ec4 100644 --- a/lib/kformula/actionelement.cc +++ b/lib/kformula/actionelement.cc @@ -69,7 +69,7 @@ void ActionElement::writeMathMLAttributes( TQDomElement& element ) const element.setAttribute( "actiontype", m_actionType ); } if ( m_selection ) { - element.setAttribute( "selection", TQString( "%1" ).arg( m_selection ) ); + element.setAttribute( "selection", TQString( "%1" ).tqarg( m_selection ) ); } } diff --git a/lib/kformula/basicelement.h b/lib/kformula/basicelement.h index 73d031e1..1fe46cc1 100644 --- a/lib/kformula/basicelement.h +++ b/lib/kformula/basicelement.h @@ -53,7 +53,7 @@ class StyleElement; * Basis of every formula element. An element is used basically by * other elements and by the @ref FormulaCursor . * - * Each element knows its size (a rect that includes all children) + * Each element knows its size (a rect that includes all tqchildren) * and how to draw itself. See @ref calcSizes and @ref draw . * * An element might contain valid cursor position. If the cursor @@ -63,11 +63,11 @@ class StyleElement; * cursor that tell how it wants to move. See @ref moveLeft , * @ref moveRight , @ref moveUp , @ref moveDown . * - * To build a tree an element must own children. If there are children + * To build a tree an element must own tqchildren. If there are tqchildren * there must be a main child. This is the child that might be used to * replace the element. See @ref getMainChild(). * - * If there can be children you might want to @ref insert and @ref remove + * If there can be tqchildren you might want to @ref insert and @ref remove * them. After a removal the element might be senseless. * (See @ref isSenseless ) * If it is it must be removed. @@ -81,10 +81,10 @@ class BasicElement public: /* - * Each element might contain children. Each child needs + * Each element might contain tqchildren. Each child needs * its own unique number. It is not guaranteed, however, * that the number stays the same all the time. - * (The SequenceElement's children are simply counted.) + * (The SequenceElement's tqchildren are simply counted.) */ BasicElement(BasicElement* parent = 0); @@ -102,7 +102,7 @@ public: /** * @returns whether the child should be read-only. The idea is - * that a read-only parent has read-only children. + * that a read-only parent has read-only tqchildren. */ virtual bool readOnly( const BasicElement* child ) const; @@ -158,7 +158,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -166,7 +166,7 @@ public: StyleAttributes& style ) = 0; /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -179,7 +179,7 @@ public: /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* /*cmd*/ ) {} @@ -243,7 +243,7 @@ public: */ virtual void entered( SequenceElement* /*child*/ ); - // children + // tqchildren /** * Removes the child. If this was the main child this element might @@ -257,7 +257,7 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild() { return 0; } //virtual void setMainChild(SequenceElement*) {} @@ -265,10 +265,10 @@ public: // editing // - // Insert and remove children. + // Insert and remove tqchildren. /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. * * The list will be emptied but stays the property of the caller. @@ -276,8 +276,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction) {} /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. */ virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction) {} @@ -290,7 +290,7 @@ public: /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless() { return false; } @@ -316,7 +316,7 @@ public: /** - * Callback for the tabs among our children. Needed for alignment. + * Callback for the tabs among our tqchildren. Needed for tqalignment. */ virtual void registerTab( BasicElement* /*tab*/ ) {} @@ -368,7 +368,7 @@ public: /** * @return a TQDomElement that contain as DomChildren the - * children, and as attribute the attribute of this + * tqchildren, and as attribute the attribute of this * element. */ TQDomElement getElementDom( TQDomDocument& doc); @@ -380,13 +380,13 @@ public: virtual void writeMathML( TQDomDocument& doc, TQDomNode& parent, bool oasisFormat = false ) const ; /** - * Set this element attribute, build children and + * Set this element attribute, build tqchildren and * call their buildFromDom. */ bool buildFromDom(TQDomElement element); /** - * Set this element attribute, build children and call + * Set this element attribute, build tqchildren and call * their builFromMathMLDom. * Returns the number of nodes processed or -1 if it failed. */ @@ -445,7 +445,7 @@ protected: * Returns if the SequenceElement could be constructed from the nodes first child. * The node name must match the given name. * - * This is a service for all subclasses that contain children. + * This is a service for all subclasses that contain tqchildren. */ bool buildChild( SequenceElement* child, TQDomNode node, TQString name ); @@ -467,7 +467,7 @@ protected: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -521,7 +521,7 @@ private: * along this line. * * There are elements (like matrix) that don't have a base line. It is - * -1 in this case. The alignment is done using the middle line. + * -1 in this case. The tqalignment is done using the middle line. */ luPixel m_baseline; diff --git a/lib/kformula/bracketelement.cc b/lib/kformula/bracketelement.cc index a3714e60..df51ffa8 100644 --- a/lib/kformula/bracketelement.cc +++ b/lib/kformula/bracketelement.cc @@ -281,7 +281,7 @@ BasicElement* BracketElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void BracketElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -360,7 +360,7 @@ void BracketElement::calcSizes( const ContextStyle& context, /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -707,7 +707,7 @@ int BracketElement::operatorType( TQDomNode& node, bool open ) TQString s = e.text(); if ( s.isNull() ) return -1; - *type = static_cast<SymbolType>( TQString::number( s.at( 0 ).latin1() ).toInt() ); + *type = static_cast<SymbolType>( TQString::number( s.tqat( 0 ).latin1() ).toInt() ); } } else { diff --git a/lib/kformula/bracketelement.h b/lib/kformula/bracketelement.h index baf0ff1e..83879aac 100644 --- a/lib/kformula/bracketelement.h +++ b/lib/kformula/bracketelement.h @@ -62,7 +62,7 @@ public: const LuPixelPoint& point, const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -95,8 +95,8 @@ public: virtual void moveDown(FormulaCursor* cursor, BasicElement* from); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * We remove ourselve if we are requested to remove our content. */ @@ -110,7 +110,7 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild(); @@ -200,7 +200,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -208,7 +208,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -254,7 +254,7 @@ protected: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -322,7 +322,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -330,7 +330,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -343,7 +343,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -389,7 +389,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -397,7 +397,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -410,7 +410,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/config/esstixeight.font b/lib/kformula/config/esstixeight.font index 37cbdfdb..88992333 100644 --- a/lib/kformula/config/esstixeight.font +++ b/lib/kformula/config/esstixeight.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixeight font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 33, 0xE201 37, 0xE205 diff --git a/lib/kformula/config/esstixeleven.font b/lib/kformula/config/esstixeleven.font index d94bd375..41e9fbe1 100644 --- a/lib/kformula/config/esstixeleven.font +++ b/lib/kformula/config/esstixeleven.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixeleven font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixfifteen.font b/lib/kformula/config/esstixfifteen.font index 3df00e54..920be0c1 100644 --- a/lib/kformula/config/esstixfifteen.font +++ b/lib/kformula/config/esstixfifteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixfifteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixfive.font b/lib/kformula/config/esstixfive.font index 9f57fec2..62724a84 100644 --- a/lib/kformula/config/esstixfive.font +++ b/lib/kformula/config/esstixfive.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfive font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 52, 0x2295 53, 0x2297 diff --git a/lib/kformula/config/esstixfour.font b/lib/kformula/config/esstixfour.font index dc6844b9..411a138a 100644 --- a/lib/kformula/config/esstixfour.font +++ b/lib/kformula/config/esstixfour.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfour font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 56, 0x2291 77, 0x2290 diff --git a/lib/kformula/config/esstixfourteen.font b/lib/kformula/config/esstixfourteen.font index 802c47ec..723a4094 100644 --- a/lib/kformula/config/esstixfourteen.font +++ b/lib/kformula/config/esstixfourteen.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixfourteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 99, 0x2138 97, 0x2135 diff --git a/lib/kformula/config/esstixnine.font b/lib/kformula/config/esstixnine.font index 4f4e6197..e294bd6d 100644 --- a/lib/kformula/config/esstixnine.font +++ b/lib/kformula/config/esstixnine.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixnine font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixone.font b/lib/kformula/config/esstixone.font index 9ff6cabf..df3e95ec 100644 --- a/lib/kformula/config/esstixone.font +++ b/lib/kformula/config/esstixone.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixone font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 75, 0x219B 70, 0x219A diff --git a/lib/kformula/config/esstixseven.font b/lib/kformula/config/esstixseven.font index 25a7d01c..37650ee1 100644 --- a/lib/kformula/config/esstixseven.font +++ b/lib/kformula/config/esstixseven.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixseven font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 61, 0x0028 62, 0x0029 diff --git a/lib/kformula/config/esstixseventeen.font b/lib/kformula/config/esstixseventeen.font index c3b8f311..00df77cd 100644 --- a/lib/kformula/config/esstixseventeen.font +++ b/lib/kformula/config/esstixseventeen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixseventeen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixsix.font b/lib/kformula/config/esstixsix.font index a6412a58..43e2752c 100644 --- a/lib/kformula/config/esstixsix.font +++ b/lib/kformula/config/esstixsix.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixsix font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 46, 0x220F 35, 0x222E diff --git a/lib/kformula/config/esstixsixteen.font b/lib/kformula/config/esstixsixteen.font index c212e08d..2a96c0c1 100644 --- a/lib/kformula/config/esstixsixteen.font +++ b/lib/kformula/config/esstixsixteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixsixteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixten.font b/lib/kformula/config/esstixten.font index dd4c2b0f..fa9c5ee2 100644 --- a/lib/kformula/config/esstixten.font +++ b/lib/kformula/config/esstixten.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixten font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 118, 0x2202 86, 0x2207 diff --git a/lib/kformula/config/esstixthirteen.font b/lib/kformula/config/esstixthirteen.font index fc13f891..cee5bf99 100644 --- a/lib/kformula/config/esstixthirteen.font +++ b/lib/kformula/config/esstixthirteen.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixthirteen font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixthree.font b/lib/kformula/config/esstixthree.font index c55acaeb..fe359c1f 100644 --- a/lib/kformula/config/esstixthree.font +++ b/lib/kformula/config/esstixthree.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixthree font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 101, 0x2204 95, 0x227B diff --git a/lib/kformula/config/esstixtwelve.font b/lib/kformula/config/esstixtwelve.font index b82e5d7f..3a4b9d23 100644 --- a/lib/kformula/config/esstixtwelve.font +++ b/lib/kformula/config/esstixtwelve.font @@ -3,5 +3,5 @@ # Unicode mapping for the esstixtwelve font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # diff --git a/lib/kformula/config/esstixtwo.font b/lib/kformula/config/esstixtwo.font index ed83909f..201f95e1 100644 --- a/lib/kformula/config/esstixtwo.font +++ b/lib/kformula/config/esstixtwo.font @@ -3,7 +3,7 @@ # Unicode mapping for the esstixtwo font. You can find it at # ftp://ftp.elsevier.nl/pub/styles/esstix/esstix.zip # -# Each line consist of a char position and its unicode value. +# Each line consist of a char position and its tqunicode value. # 100, 0x2203 99, 0x2200 diff --git a/lib/kformula/config/unicode.tbl b/lib/kformula/config/unicode.tbl index e3e27db8..d86b1df3 100644 --- a/lib/kformula/config/unicode.tbl +++ b/lib/kformula/config/unicode.tbl @@ -1,6 +1,6 @@ # -# KFormula unicode table -# Each line contains the unicode value, the char class +# KFormula tqunicode table +# Each line contains the tqunicode value, the char class # (ORDINARY, BINOP or RELATION) and optionally the # chars TeX name. # diff --git a/lib/kformula/contextstyle.h b/lib/kformula/contextstyle.h index 11a103dd..be4a8bcf 100644 --- a/lib/kformula/contextstyle.h +++ b/lib/kformula/contextstyle.h @@ -312,7 +312,7 @@ private: /** * true means to center the symbol between its indexes. - * false means alignment to the right. + * false means tqalignment to the right. */ bool centerSymbol; diff --git a/lib/kformula/elementtype.cc b/lib/kformula/elementtype.cc index bd2c3373..a2e44ee6 100644 --- a/lib/kformula/elementtype.cc +++ b/lib/kformula/elementtype.cc @@ -406,9 +406,9 @@ void AbstractOperatorType::saveMathML( SequenceElement* se, TQDomDocument& doc, op.appendChild( doc.createTextNode( be->getCharacter() ) ); } else { - // unicode char + // tqunicode char TQString s; - op.appendChild( doc.createEntityReference( s.sprintf( "#x%05X", be->getCharacter().unicode() ) ) ); + op.appendChild( doc.createEntityReference( s.sprintf( "#x%05X", be->getCharacter().tqunicode() ) ) ); } TextElement* te = static_cast<TextElement*>( be ); TQString mathvariant = format2variant( te->getCharStyle(), te->getCharFamily() ); diff --git a/lib/kformula/entities.h b/lib/kformula/entities.h index 38a5a0e8..78e39315 100644 --- a/lib/kformula/entities.h +++ b/lib/kformula/entities.h @@ -38,7 +38,7 @@ struct entityMap { return strcmp( name, right ) < 0; } const char* name; - const uint unicode; + const uint tqunicode; }; extern const entityMap entities[]; diff --git a/lib/kformula/errorelement.cc b/lib/kformula/errorelement.cc index cb1f6c54..7a685f86 100644 --- a/lib/kformula/errorelement.cc +++ b/lib/kformula/errorelement.cc @@ -27,7 +27,7 @@ ErrorElement::ErrorElement( BasicElement* parent ) : SequenceElement( parent ) { } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/errorelement.h b/lib/kformula/errorelement.h index d52f949a..cfc2735d 100644 --- a/lib/kformula/errorelement.h +++ b/lib/kformula/errorelement.h @@ -30,7 +30,7 @@ public: ErrorElement( BasicElement* parent = 0 ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/fontstyle.cc b/lib/kformula/fontstyle.cc index 0df68fcb..0e37028a 100644 --- a/lib/kformula/fontstyle.cc +++ b/lib/kformula/fontstyle.cc @@ -53,7 +53,7 @@ class FontList { public: FontList() { TQFontDatabase db; - const TQStringList lst = db.families(); + const TQStringList lst = db.tqfamilies(); for ( TQStringList::const_iterator it = lst.begin(), end = lst.end() ; it != end ; ++it ) { const TQString name = *it; int i = name.find('['); diff --git a/lib/kformula/fontstyle.h b/lib/kformula/fontstyle.h index 9fcd78b7..8132bbb6 100644 --- a/lib/kformula/fontstyle.h +++ b/lib/kformula/fontstyle.h @@ -48,7 +48,7 @@ public: */ bool init( ContextStyle* context, bool install = true ); - /// the table for ordinary symbols (those that have a unicode value) + /// the table for ordinary symbols (those that have a tqunicode value) const SymbolTable* symbolTable() const { return &m_symbolTable; } SymbolTable* symbolTable() { return &m_symbolTable; } diff --git a/lib/kformula/formulacursor.cc b/lib/kformula/formulacursor.cc index 2257d262..9fe3afbd 100644 --- a/lib/kformula/formulacursor.cc +++ b/lib/kformula/formulacursor.cc @@ -301,21 +301,21 @@ void FormulaCursor::insert(BasicElement* child, Direction direction) insert(list, direction); } -void FormulaCursor::insert(TQPtrList<BasicElement>& children, +void FormulaCursor::insert(TQPtrList<BasicElement>& tqchildren, Direction direction) { assert( !isReadOnly() ); BasicElement* element = getElement(); - element->insert(this, children, direction); + element->insert(this, tqchildren, direction); } /** - * Removes the current selected children and returns them. + * Removes the current selected tqchildren and returns them. * The cursor needs to be normal (that is be inside a SequenceElement) * for this to have any effect. */ -void FormulaCursor::remove(TQPtrList<BasicElement>& children, +void FormulaCursor::remove(TQPtrList<BasicElement>& tqchildren, Direction direction) { assert( !isReadOnly() ); @@ -328,12 +328,12 @@ void FormulaCursor::remove(TQPtrList<BasicElement>& children, BasicElement* parent = sequence->getParent(); if (parent != 0) { parent->selectChild(this, sequence); - parent->remove(this, children, direction); + parent->remove(this, tqchildren, direction); return; } } else { - sequence->remove(this, children, direction); + sequence->remove(this, tqchildren, direction); } } } @@ -383,18 +383,18 @@ void FormulaCursor::replaceSelectionWith(BasicElement* element, BasicElement* FormulaCursor::replaceByMainChildContent(Direction direction) { assert( !isReadOnly() ); - TQPtrList<BasicElement> childrenList; + TQPtrList<BasicElement> tqchildrenList; TQPtrList<BasicElement> list; BasicElement* element = getElement(); SequenceElement* mainChild = element->getMainChild(); if ((mainChild != 0) && (mainChild->countChildren() > 0)) { mainChild->selectAllChildren(this); - remove(childrenList); + remove(tqchildrenList); } element->getParent()->selectChild(this, element); setSelection(false); remove(list); - insert(childrenList, direction); + insert(tqchildrenList, direction); if (list.count() > 0) { return list.take(0); } @@ -582,7 +582,7 @@ MatrixElement* FormulaCursor::getActiveMatrixElement() } /** - * The element is going to leave the formula with and all its children. + * The element is going to leave the formula with and all its tqchildren. */ void FormulaCursor::elementWillVanish(BasicElement* element) { diff --git a/lib/kformula/formulacursor.h b/lib/kformula/formulacursor.h index cca6cf1a..9843abfa 100644 --- a/lib/kformula/formulacursor.h +++ b/lib/kformula/formulacursor.h @@ -152,7 +152,7 @@ public: void insert(BasicElement*, Direction = beforeCursor); /** - * Inserts the listed children at the current position. + * Inserts the listed tqchildren at the current position. * Ignores the selection. * The list will be emptied. */ @@ -160,7 +160,7 @@ public: Direction = beforeCursor); /** - * Removes the current selected children and returns them. + * Removes the current selected tqchildren and returns them. * The cursor needs to be normal (that is be inside a SequenceElement) * for this to have any effect. */ @@ -341,7 +341,7 @@ public: void setCursorData(CursorData* data); /** - * The element is going to leave the formula with and all its children. + * The element is going to leave the formula with and all its tqchildren. */ void elementWillVanish(BasicElement* element); @@ -409,7 +409,7 @@ private: /** * The position the cursor in on inside the element. - * Might be anything from 0 to current->children->size(). + * Might be anything from 0 to current->tqchildren->size(). * * This is where new elements are put in. */ diff --git a/lib/kformula/formulaelement.h b/lib/kformula/formulaelement.h index a7e83e4c..e6702668 100644 --- a/lib/kformula/formulaelement.h +++ b/lib/kformula/formulaelement.h @@ -34,7 +34,7 @@ class SymbolTable; /** * The main element. - * A formula consists of a FormulaElement and its children. + * A formula consists of a FormulaElement and its tqchildren. * The only element that has no parent. */ class FormulaElement : public SequenceElement { @@ -113,7 +113,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -121,7 +121,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -159,7 +159,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/fractionelement.cc b/lib/kformula/fractionelement.cc index 77d93076..1230bb60 100644 --- a/lib/kformula/fractionelement.cc +++ b/lib/kformula/fractionelement.cc @@ -121,7 +121,7 @@ BasicElement* FractionElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void FractionElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -155,7 +155,7 @@ void FractionElement::calcSizes( const ContextStyle& context, /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -332,8 +332,8 @@ void FractionElement::insert(FormulaCursor* cursor, /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * We remove ourselve if we are requested to remove our numerator. * @@ -362,7 +362,7 @@ void FractionElement::remove(FormulaCursor* cursor, /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ bool FractionElement::isSenseless() @@ -373,7 +373,7 @@ bool FractionElement::isSenseless() // main child // -// If an element has children one has to become the main one. +// If an element has tqchildren one has to become the main one. SequenceElement* FractionElement::getMainChild() { @@ -581,13 +581,13 @@ void FractionElement::writeMathMLAttributes( TQDomElement& element ) const { switch ( m_lineThicknessType ) { case AbsoluteSize: - element.setAttribute( "linethickness", TQString( "%1pt" ).arg( m_lineThickness ) ); + element.setAttribute( "linethickness", TQString( "%1pt" ).tqarg( m_lineThickness ) ); break; case RelativeSize: - element.setAttribute( "linethickness", TQString( "%1%" ).arg( m_lineThickness * 100.0 ) ); + element.setAttribute( "linethickness", TQString( "%1%" ).tqarg( m_lineThickness * 100.0 ) ); break; case PixelSize: - element.setAttribute( "linethickness", TQString( "%1px" ).arg( m_lineThickness ) ); + element.setAttribute( "linethickness", TQString( "%1px" ).tqarg( m_lineThickness ) ); break; default: break; diff --git a/lib/kformula/fractionelement.h b/lib/kformula/fractionelement.h index 408c3f3e..cef69c13 100644 --- a/lib/kformula/fractionelement.h +++ b/lib/kformula/fractionelement.h @@ -70,7 +70,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -78,7 +78,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -90,7 +90,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -128,8 +128,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * We remove ourselve if we are requested to remove our numerator. * @@ -141,7 +141,7 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild(); @@ -150,7 +150,7 @@ public: /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless(); @@ -182,7 +182,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/glyphelement.cc b/lib/kformula/glyphelement.cc index 709609cf..9d0b26e6 100644 --- a/lib/kformula/glyphelement.cc +++ b/lib/kformula/glyphelement.cc @@ -69,7 +69,7 @@ bool GlyphElement::readAttributesFromMathMLDom( const TQDomElement& element ) /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void GlyphElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -105,7 +105,7 @@ void GlyphElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -152,7 +152,7 @@ void GlyphElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, void GlyphElement::writeMathMLAttributes( TQDomElement& element ) const { element.setAttribute( "fontfamily", m_fontFamily ); - element.setAttribute( "index", m_char.unicode() ); + element.setAttribute( "index", m_char.tqunicode() ); element.setAttribute( "alt", m_alt ); } diff --git a/lib/kformula/glyphelement.h b/lib/kformula/glyphelement.h index 68833dd0..e3934fce 100644 --- a/lib/kformula/glyphelement.h +++ b/lib/kformula/glyphelement.h @@ -31,7 +31,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -39,7 +39,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/indexelement.cc b/lib/kformula/indexelement.cc index a540a7e1..25b8997a 100644 --- a/lib/kformula/indexelement.cc +++ b/lib/kformula/indexelement.cc @@ -341,7 +341,7 @@ void IndexElement::setMiddleX(int xOffset, int middleWidth) /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void IndexElement::calcSizes(const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -542,7 +542,7 @@ void IndexElement::calcSizes(const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -885,12 +885,12 @@ void IndexElement::moveDown(FormulaCursor* cursor, BasicElement* from) } -// children +// tqchildren // main child // -// If an element has children one has to become the main one. +// If an element has tqchildren one has to become the main one. // void IndexElement::setMainChild(SequenceElement* child) // { @@ -902,7 +902,7 @@ void IndexElement::moveDown(FormulaCursor* cursor, BasicElement* from) /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -954,8 +954,8 @@ void IndexElement::insert(FormulaCursor* cursor, /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -1032,7 +1032,7 @@ void IndexElement::normalize(FormulaCursor* cursor, Direction direction) /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ bool IndexElement::isSenseless() @@ -1659,13 +1659,13 @@ void IndexElement::writeMathMLAttributes( TQDomElement& element ) const if ( tag == "msub" || tag == "msubsup" ) { switch ( m_subScriptShiftType ) { case AbsoluteSize: - element.setAttribute( "subscriptshift", TQString( "%1pt" ).arg( m_subScriptShift ) ); + element.setAttribute( "subscriptshift", TQString( "%1pt" ).tqarg( m_subScriptShift ) ); break; case RelativeSize: - element.setAttribute( "subscriptshift", TQString( "%1%" ).arg( m_subScriptShift * 100.0 ) ); + element.setAttribute( "subscriptshift", TQString( "%1%" ).tqarg( m_subScriptShift * 100.0 ) ); break; case PixelSize: - element.setAttribute( "subscriptshift", TQString( "%1px" ).arg( m_subScriptShift ) ); + element.setAttribute( "subscriptshift", TQString( "%1px" ).tqarg( m_subScriptShift ) ); break; default: break; @@ -1674,13 +1674,13 @@ void IndexElement::writeMathMLAttributes( TQDomElement& element ) const if ( tag == "msup" || tag == "msubsup" ) { switch ( m_superScriptShiftType ) { case AbsoluteSize: - element.setAttribute( "superscriptshift", TQString( "%1pt" ).arg( m_superScriptShift ) ); + element.setAttribute( "superscriptshift", TQString( "%1pt" ).tqarg( m_superScriptShift ) ); break; case RelativeSize: - element.setAttribute( "superscriptshift", TQString( "%1%" ).arg( m_superScriptShift * 100.0 ) ); + element.setAttribute( "superscriptshift", TQString( "%1%" ).tqarg( m_superScriptShift * 100.0 ) ); break; case PixelSize: - element.setAttribute( "superscriptshift", TQString( "%1px" ).arg( m_superScriptShift ) ); + element.setAttribute( "superscriptshift", TQString( "%1px" ).tqarg( m_superScriptShift ) ); break; default: break; diff --git a/lib/kformula/indexelement.h b/lib/kformula/indexelement.h index b8e567b8..f3fc1acb 100644 --- a/lib/kformula/indexelement.h +++ b/lib/kformula/indexelement.h @@ -77,7 +77,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -85,7 +85,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -97,7 +97,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -137,7 +137,7 @@ public: */ virtual void moveDown(FormulaCursor* cursor, BasicElement* from); - // children + // tqchildren /** * Removes the child. If this was the main child this element might @@ -151,7 +151,7 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild() { return content; } //SequenceElement* upperLeft; @@ -163,7 +163,7 @@ public: /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -175,8 +175,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -212,7 +212,7 @@ public: /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ virtual bool isSenseless(); @@ -259,7 +259,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/kformulacommand.cc b/lib/kformula/kformulacommand.cc index 65bfa6c3..267038c4 100644 --- a/lib/kformula/kformulacommand.cc +++ b/lib/kformula/kformulacommand.cc @@ -556,10 +556,10 @@ void CharStyleCommand::execute() TQMap<SequenceElement*, int> parentCollector; styleList.clear(); - uint count = childrenList().count(); + uint count = tqchildrenList().count(); styleList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = childrenList().at( i ); + TextElement* child = tqchildrenList().at( i ); styleList[i] = child->getCharStyle(); child->setCharStyle( charStyle ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; @@ -571,10 +571,10 @@ void CharStyleCommand::execute() void CharStyleCommand::unexecute() { TQMap<SequenceElement*, int> parentCollector; - uint count = childrenList().count(); + uint count = tqchildrenList().count(); //styleList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = childrenList().at( i ); + TextElement* child = tqchildrenList().at( i ); child->setCharStyle( styleList[i] ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; } @@ -595,10 +595,10 @@ void CharFamilyCommand::execute() TQMap<SequenceElement*, int> parentCollector; familyList.clear(); - uint count = childrenList().count(); + uint count = tqchildrenList().count(); familyList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = childrenList().at( i ); + TextElement* child = tqchildrenList().at( i ); familyList[i] = child->getCharFamily(); child->setCharFamily( charFamily ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; @@ -610,10 +610,10 @@ void CharFamilyCommand::execute() void CharFamilyCommand::unexecute() { TQMap<SequenceElement*, int> parentCollector; - uint count = childrenList().count(); + uint count = tqchildrenList().count(); //familyList.reserve( count ); for ( uint i=0; i<count; ++i ) { - TextElement* child = childrenList().at( i ); + TextElement* child = tqchildrenList().at( i ); child->setCharFamily( familyList[i] ); parentCollector[static_cast<SequenceElement*>( child->getParent() )] = 1; } diff --git a/lib/kformula/kformulacommand.h b/lib/kformula/kformulacommand.h index bc1703be..09001040 100644 --- a/lib/kformula/kformulacommand.h +++ b/lib/kformula/kformulacommand.h @@ -495,13 +495,13 @@ public: void addTextElement( TextElement* element ) { list.append(element); } /** - * Collects all parent elements those children are to be changend. + * Collects all parent elements those tqchildren are to be changend. */ void addElement( BasicElement* element ) { elementList.append( element ); } protected: - TQPtrList<TextElement>& childrenList() { return list; } + TQPtrList<TextElement>& tqchildrenList() { return list; } void collectChildren(); @@ -520,7 +520,7 @@ private: /** - * Changes the char style of a number of elements an their children. + * Changes the char style of a number of elements an their tqchildren. */ class CharStyleCommand : public FontCommand { public: @@ -539,7 +539,7 @@ private: /** - * Changes the char family of a number of elements an their children. + * Changes the char family of a number of elements an their tqchildren. */ class CharFamilyCommand : public FontCommand { public: diff --git a/lib/kformula/kformulacompatibility.h b/lib/kformula/kformulacompatibility.h index a221854c..9be5c7ba 100644 --- a/lib/kformula/kformulacompatibility.h +++ b/lib/kformula/kformulacompatibility.h @@ -51,8 +51,8 @@ private: TQDomElement findIndexNode(const TQDomDocument& doc, TQDomElement sequence); - ushort nextToken() { return formulaString[pos++].unicode(); } - ushort lookAhead(uint i) const { return formulaString[pos+i].unicode(); } + ushort nextToken() { return formulaString[pos++].tqunicode(); } + ushort lookAhead(uint i) const { return formulaString[pos+i].tqunicode(); } void pushback() { pos--; } bool hasNext() const { return pos < formulaString.length(); } diff --git a/lib/kformula/kformulaconfigpage.cc b/lib/kformula/kformulaconfigpage.cc index 593defa3..21c3b946 100644 --- a/lib/kformula/kformulaconfigpage.cc +++ b/lib/kformula/kformulaconfigpage.cc @@ -23,7 +23,7 @@ #include <tqcheckbox.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmap.h> #include <tqradiobutton.h> #include <tqspinbox.h> @@ -63,7 +63,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi TQGroupBox *gbox = new TQGroupBox( i18n( "Fonts" ), box ); gbox->setColumnLayout( 0, Qt::Horizontal ); - TQGridLayout* grid = new TQGridLayout( gbox->layout(), 5, 3 ); + TQGridLayout* grid = new TQGridLayout( gbox->tqlayout(), 5, 3 ); grid->setSpacing( KDialog::spacingHint() ); grid->setColStretch(1, 1); @@ -108,7 +108,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi // hlBox = new TQGroupBox( i18n( "Highlight Colors" ), box ); // hlBox->setColumnLayout( 0, Qt::Horizontal ); -// grid = new TQGridLayout( hlBox->layout(), 5, 2 ); +// grid = new TQGridLayout( hlBox->tqlayout(), 5, 2 ); // grid->setSpacing( KDialog::spacingHint() ); // TQLabel* defaultLabel = new TQLabel( hlBox, "defaultLabel" ); @@ -168,7 +168,7 @@ ConfigurePage::ConfigurePage( Document* document, TQWidget* view, KConfig* confi TQPushButton* ConfigurePage::buildFontLine( TQWidget* parent, - TQGridLayout* layout, int number, TQFont font, TQString name, + TQGridLayout* tqlayout, int number, TQFont font, TQString name, TQLabel*& fontName ) { TQLabel* fontTitle = new TQLabel( name, parent ); @@ -180,9 +180,9 @@ TQPushButton* ConfigurePage::buildFontLine( TQWidget* parent, TQPushButton* chooseButton = new TQPushButton( i18n( "Choose..." ), parent ); - layout->addWidget( fontTitle, number, 0 ); - layout->addWidget( fontName, number, 1 ); - layout->addWidget( chooseButton, number, 2 ); + tqlayout->addWidget( fontTitle, number, 0 ); + tqlayout->addWidget( fontName, number, 1 ); + tqlayout->addWidget( chooseButton, number, 2 ); return chooseButton; } diff --git a/lib/kformula/kformulaconfigpage.h b/lib/kformula/kformulaconfigpage.h index 2649ffa3..e3ff716a 100644 --- a/lib/kformula/kformulaconfigpage.h +++ b/lib/kformula/kformulaconfigpage.h @@ -76,7 +76,7 @@ protected slots: private: - TQPushButton* buildFontLine( TQWidget* fontWidget, TQGridLayout* layout, int number, + TQPushButton* buildFontLine( TQWidget* fontWidget, TQGridLayout* tqlayout, int number, TQFont font, TQString name, TQLabel*& fontName ); void updateFontLabel( TQFont font, TQLabel* label ); diff --git a/lib/kformula/kformulacontainer.cc b/lib/kformula/kformulacontainer.cc index 46f3415a..774c7e79 100644 --- a/lib/kformula/kformulacontainer.cc +++ b/lib/kformula/kformulacontainer.cc @@ -25,7 +25,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqstring.h> -#include <textstream.h> +#include <tqtextstream.h> #include <kdebug.h> #include <klocale.h> @@ -339,10 +339,10 @@ void Container::paste() { if (!hasValidCursor()) return; - TQClipboard* clipboard = TQApplication::clipboard(); + TQClipboard* clipboard = TQApplication::tqclipboard(); const TQMimeSource* source = clipboard->data(); if (source->provides( MimeSource::selectionMimeType() )) { - TQByteArray data = source->encodedData( MimeSource::selectionMimeType() ); + TQByteArray data = source->tqencodedData( MimeSource::selectionMimeType() ); TQDomDocument formula; formula.setContent(data); paste( formula, i18n("Paste") ); @@ -374,7 +374,7 @@ void Container::copy() if (cursor != 0) { TQDomDocument formula = document()->createMathMLDomDocument(); cursor->copy( formula ); - TQClipboard* clipboard = TQApplication::clipboard(); + TQClipboard* clipboard = TQApplication::tqclipboard(); clipboard->setData(new MimeSource(document(), formula)); } } diff --git a/lib/kformula/kformulacontainer.h b/lib/kformula/kformulacontainer.h index 0b25ae00..d87e8184 100644 --- a/lib/kformula/kformulacontainer.h +++ b/lib/kformula/kformulacontainer.h @@ -21,7 +21,7 @@ #ifndef KFORMULACONTAINER_H #define KFORMULACONTAINER_H -#include <clipboard.h> +#include <tqclipboard.h> #include <tqdom.h> #include <tqimage.h> #include <tqptrlist.h> @@ -347,7 +347,7 @@ signals: void errorMsg( const TQString& ); /** - * The element is going to leave the formula with and all its children. + * The element is going to leave the formula with and all its tqchildren. */ void elementWillVanish(BasicElement* element); diff --git a/lib/kformula/kformuladefs.h b/lib/kformula/kformuladefs.h index 855121c7..80879f98 100644 --- a/lib/kformula/kformuladefs.h +++ b/lib/kformula/kformuladefs.h @@ -163,7 +163,7 @@ enum TokenElementType { * The struct used to store static font data. */ struct InternFontTable { - short unicode; + short tqunicode; TQChar pos; CharClass cl; CharStyle style; diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index ecd621ee..17d163f0 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -200,7 +200,7 @@ TQDomDocument Document::createDomDocument() } /** - * Create a MathML Dom Document, deprecates KFO Dom Document for internal layout + * Create a MathML Dom Document, deprecates KFO Dom Document for internal tqlayout * TODO: Shouldn't this go to KoDocument ? */ TQDomDocument Document::createMathMLDomDocument() @@ -969,7 +969,7 @@ void DocumentWrapper::insertSymbol() { if ( hasFormula() && m_document->m_contextStyle->symbolTable().contains( m_selectedName ) ) { - TQChar ch = m_document->m_contextStyle->symbolTable().unicode( m_selectedName ); + TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( m_selectedName ); if ( ch != TQChar::null ) { TextCharRequest r( ch, true ); formula()->performRequest( &r ); @@ -985,7 +985,7 @@ void DocumentWrapper::insertSymbol( TQString name ) { if ( hasFormula() ) { if ( m_document->m_contextStyle->symbolTable().contains( name ) ) { - TQChar ch = m_document->m_contextStyle->symbolTable().unicode( name ); + TQChar ch = m_document->m_contextStyle->symbolTable().tqunicode( name ); if ( ch != TQChar::null ) { TextCharRequest r( ch, true ); formula()->performRequest( &r ); @@ -1075,7 +1075,7 @@ void DocumentWrapper::textItalic() void DocumentWrapper::delimiterLeft() { TQString left = m_leftBracket->currentText(); - switch ( left.at(0).latin1() ) { + switch ( left.tqat(0).latin1() ) { case '[': case ']': case '{': @@ -1086,7 +1086,7 @@ void DocumentWrapper::delimiterLeft() case ')': case '/': case '\\': - m_leftBracketChar = static_cast<SymbolType>( left.at(0).latin1() ); + m_leftBracketChar = static_cast<SymbolType>( left.tqat(0).latin1() ); break; case '|': m_leftBracketChar = LeftLineBracket; @@ -1100,7 +1100,7 @@ void DocumentWrapper::delimiterLeft() void DocumentWrapper::delimiterRight() { TQString right = m_rightBracket->currentText(); - switch ( right.at(0).latin1() ) { + switch ( right.tqat(0).latin1() ) { case '[': case ']': case '{': @@ -1111,7 +1111,7 @@ void DocumentWrapper::delimiterRight() case ')': case '/': case '\\': - m_rightBracketChar = static_cast<SymbolType>( right.at(0).latin1() ); + m_rightBracketChar = static_cast<SymbolType>( right.tqat(0).latin1() ); break; case '|': m_rightBracketChar = RightLineBracket; @@ -1174,7 +1174,7 @@ void DocumentWrapper::initSymbolNamesAction() for ( TQStringList::Iterator it = names.begin(); it != names.end(); ++it, ++i ) { - chars[ i ] = st.unicode( *it ); + chars[ i ] = st.tqunicode( *it ); } m_symbolNamesAction->setSymbols( names, m_document->m_contextStyle->getMathFont(), chars ); m_selectedName = names[0]; diff --git a/lib/kformula/kformuladocument.h b/lib/kformula/kformuladocument.h index 4d757262..46de5774 100644 --- a/lib/kformula/kformuladocument.h +++ b/lib/kformula/kformuladocument.h @@ -188,7 +188,7 @@ public: static TQDomDocument createDomDocument(); /** - * Create a MathML Dom Document, deprecates KFO Dom Document for internal layout + * Create a MathML Dom Document, deprecates KFO Dom Document for internal tqlayout * TODO: Shouldn't this go to KoDocument ? */ TQDomDocument createMathMLDomDocument(); diff --git a/lib/kformula/kformulamimesource.cc b/lib/kformula/kformulamimesource.cc index 4c7df0c7..58a6ad35 100644 --- a/lib/kformula/kformulamimesource.cc +++ b/lib/kformula/kformulamimesource.cc @@ -99,7 +99,7 @@ bool MimeSource::provides( const char * format) const return false; } -TQByteArray MimeSource::encodedData ( const char *format ) const +TQByteArray MimeSource::tqencodedData ( const char *format ) const { TQString fmt=format; //case sensitive? diff --git a/lib/kformula/kformulamimesource.h b/lib/kformula/kformulamimesource.h index 3a94eaef..a58255eb 100644 --- a/lib/kformula/kformulamimesource.h +++ b/lib/kformula/kformulamimesource.h @@ -39,7 +39,7 @@ public: virtual const char* format ( int n = 0 ) const; virtual bool provides ( const char * ) const; - virtual TQByteArray encodedData ( const char * ) const; + virtual TQByteArray tqencodedData ( const char * ) const; virtual const SymbolTable& getSymbolTable() const; diff --git a/lib/kformula/kformulaview.h b/lib/kformula/kformulaview.h index cb9c715b..9562bbfe 100644 --- a/lib/kformula/kformulaview.h +++ b/lib/kformula/kformulaview.h @@ -141,7 +141,7 @@ protected slots: /** * The cursor has been moved by the container. - * We need to repaint if it was ours. + * We need to tqrepaint if it was ours. */ void slotCursorMoved(FormulaCursor* cursor); diff --git a/lib/kformula/kformulawidget.cc b/lib/kformula/kformulawidget.cc index 1014a66e..ef5e09a3 100644 --- a/lib/kformula/kformulawidget.cc +++ b/lib/kformula/kformulawidget.cc @@ -69,11 +69,11 @@ void KFormulaWidget::setReadOnly(bool ro) void KFormulaWidget::paintEvent(TQPaintEvent* event) { - // Always repaint the buffer. This is not so much more work - // than it seems to be as each cursor movement requires a repaint. + // Always tqrepaint the buffer. This is not so much more work + // than it seems to be as each cursor movement requires a tqrepaint. TQPainter p( &buffer ); //p.translate( -fr.x(), -fr.y() ); - formulaView.draw( p, event->rect(), colorGroup() ); + formulaView.draw( p, event->rect(), tqcolorGroup() ); TQPainter painter; painter.begin(this); @@ -128,7 +128,7 @@ void KFormulaWidget::slotFormulaChanged(int width, int height) // Magic numbers just to see the cursor. resize(width + 5, height + 5); buffer.resize(width + 5, height + 5); - // repaint is needed even if the size doesn't change. + // tqrepaint is needed even if the size doesn't change. //update(); } diff --git a/lib/kformula/main.cc b/lib/kformula/main.cc index 4d80e1c8..57344739 100644 --- a/lib/kformula/main.cc +++ b/lib/kformula/main.cc @@ -5,12 +5,12 @@ #include <tqaccel.h> #include <tqdom.h> #include <tqfile.h> -#include <layout.h> +#include <tqlayout.h> #include <tqptrlist.h> #include <tqmainwindow.h> #include <tqpainter.h> #include <tqstring.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqwidget.h> #include <tqfileinfo.h> @@ -277,7 +277,7 @@ int main(int argc, char** argv) // Make sure there are no elements in the clipboard. // Okey for a debug app. - TQApplication::clipboard()->clear(); + TQApplication::tqclipboard()->clear(); int destruct = BasicElement::getEvilDestructionCount(); if (destruct != 0) { diff --git a/lib/kformula/matrixelement.cc b/lib/kformula/matrixelement.cc index 7371113f..6b5a5898 100644 --- a/lib/kformula/matrixelement.cc +++ b/lib/kformula/matrixelement.cc @@ -430,7 +430,7 @@ BasicElement* MatrixElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void MatrixElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -508,7 +508,7 @@ void MatrixElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -1260,7 +1260,7 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const { TQString rownumber; if ( m_rowNumber ) { - rownumber = TQString( " %1" ).arg( m_rowNumber ); + rownumber = TQString( " %1" ).tqarg( m_rowNumber ); } switch ( m_align ) { case TopAlign: @@ -1352,15 +1352,15 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const columnwidth.append( "fit " ); break; case AbsoluteSize: - columnwidth.append( TQString( "%1pt " ).arg( *lengthIt ) ); + columnwidth.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); lengthIt++; break; case RelativeSize: - columnwidth.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); + columnwidth.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); lengthIt++; break; case PixelSize: - columnwidth.append( TQString( "%1px " ).arg( *lengthIt ) ); + columnwidth.append( TQString( "%1px " ).tqarg( *lengthIt ) ); lengthIt++; break; case NegativeVeryVeryThinMathSpace: @@ -1417,13 +1417,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const element.setAttribute( "width", "auto" ); break; case AbsoluteSize: - element.setAttribute( "width", TQString( "%1pt" ).arg( m_width ) ); + element.setAttribute( "width", TQString( "%1pt" ).tqarg( m_width ) ); break; case RelativeSize: - element.setAttribute( "width", TQString( "%1% " ).arg( m_width * 100.0 ) ); + element.setAttribute( "width", TQString( "%1% " ).tqarg( m_width * 100.0 ) ); break; case PixelSize: - element.setAttribute( "width", TQString( "%1px " ).arg( m_width ) ); + element.setAttribute( "width", TQString( "%1px " ).tqarg( m_width ) ); break; default: break; @@ -1434,13 +1434,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const typeIt != m_rowSpacingType.end(); typeIt++, lengthIt++ ) { switch ( *typeIt ) { case AbsoluteSize: - rowspacing.append( TQString( "%1pt " ).arg( *lengthIt ) ); + rowspacing.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); break; case RelativeSize: - rowspacing.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); + rowspacing.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); break; case PixelSize: - rowspacing.append( TQString( "%1px " ).arg( *lengthIt ) ); + rowspacing.append( TQString( "%1px " ).tqarg( *lengthIt ) ); break; default: break; @@ -1455,15 +1455,15 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const typeIt != m_columnSpacingType.end(); typeIt++ ) { switch ( *typeIt ) { case AbsoluteSize: - columnspacing.append( TQString( "%1pt " ).arg( *lengthIt ) ); + columnspacing.append( TQString( "%1pt " ).tqarg( *lengthIt ) ); lengthIt++; break; case RelativeSize: - columnspacing.append( TQString( "%1% " ).arg( *lengthIt * 100.0 ) ); + columnspacing.append( TQString( "%1% " ).tqarg( *lengthIt * 100.0 ) ); lengthIt++; break; case PixelSize: - columnspacing.append( TQString( "%1px " ).arg( *lengthIt ) ); + columnspacing.append( TQString( "%1px " ).tqarg( *lengthIt ) ); lengthIt++; break; case NegativeVeryVeryThinMathSpace: @@ -1571,13 +1571,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const TQString framespacing; switch ( m_frameHSpacingType ) { case AbsoluteSize: - framespacing.append( TQString( "%1pt " ).arg( m_frameHSpacing ) ); + framespacing.append( TQString( "%1pt " ).tqarg( m_frameHSpacing ) ); break; case RelativeSize: - framespacing.append( TQString( "%1% " ).arg( m_frameHSpacing * 100.0 ) ); + framespacing.append( TQString( "%1% " ).tqarg( m_frameHSpacing * 100.0 ) ); break; case PixelSize: - framespacing.append( TQString( "%1px " ).arg( m_frameHSpacing ) ); + framespacing.append( TQString( "%1px " ).tqarg( m_frameHSpacing ) ); break; case NegativeVeryVeryThinMathSpace: framespacing.append( "negativeveryverythinmathspace " ); @@ -1626,13 +1626,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_frameVSpacingType ) { case AbsoluteSize: - framespacing.append( TQString( "%1pt " ).arg( m_frameVSpacing ) ); + framespacing.append( TQString( "%1pt " ).tqarg( m_frameVSpacing ) ); break; case RelativeSize: - framespacing.append( TQString( "%1% " ).arg( m_frameVSpacing * 100.0 ) ); + framespacing.append( TQString( "%1% " ).tqarg( m_frameVSpacing * 100.0 ) ); break; case PixelSize: - framespacing.append( TQString( "%1px " ).arg( m_frameVSpacing ) ); + framespacing.append( TQString( "%1px " ).tqarg( m_frameVSpacing ) ); break; case NegativeVeryVeryThinMathSpace: framespacing.append( "negativeveryverythinmathspace " ); @@ -1709,13 +1709,13 @@ void MatrixElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_minLabelSpacingType ) { case AbsoluteSize: - element.setAttribute( "minlabelspacing", TQString( "%1pt" ).arg( m_minLabelSpacing ) ); + element.setAttribute( "minlabelspacing", TQString( "%1pt" ).tqarg( m_minLabelSpacing ) ); break; case RelativeSize: - element.setAttribute( "minlabelspacing", TQString( "%1%" ).arg( m_minLabelSpacing * 100.0 ) ); + element.setAttribute( "minlabelspacing", TQString( "%1%" ).tqarg( m_minLabelSpacing * 100.0 ) ); break; case PixelSize: - element.setAttribute( "minlabelspacing", TQString( "%1px" ).arg( m_minLabelSpacing ) ); + element.setAttribute( "minlabelspacing", TQString( "%1px" ).tqarg( m_minLabelSpacing ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( "minlabelspacing", "negativeveryverythinmathspace" ); @@ -1810,7 +1810,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -1894,7 +1894,7 @@ void KFCNewLine::execute() int linePos = parent->content.find( m_line ); parent->content.insert( linePos+1, m_newline ); - // If there are children to be moved. + // If there are tqchildren to be moved. if ( m_line->countChildren() > static_cast<int>( m_pos ) ) { // Remove anything after position pos from the current line @@ -1935,7 +1935,7 @@ void KFCNewLine::unexecute() FormulaElement* formula = m_line->formula(); formula->elementRemoval( m_newline ); - // If there are children to be moved. + // If there are tqchildren to be moved. if ( m_newline->countChildren() > 0 ) { // Remove anything from the line to be deleted @@ -2129,7 +2129,7 @@ void MultilineSequenceElement::writeMathML( TQDomDocument& doc, // The mrow, if it exists. TQDomNode n = tmp.firstChild().firstChild(); while ( !n.isNull() ) { - // the illegal TabMarkers are children of the mrow, child of tmp. + // the illegal TabMarkers are tqchildren of the mrow, child of tmp. if ( n.isElement() && n.toElement().tagName() == "TAB" ) { parent.appendChild( mtd ); mtd = doc.createElement( oasisFormat ? "math:mtd" : "mtd" ); diff --git a/lib/kformula/matrixelement.h b/lib/kformula/matrixelement.h index 7320bf2b..89426659 100644 --- a/lib/kformula/matrixelement.h +++ b/lib/kformula/matrixelement.h @@ -80,7 +80,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -88,7 +88,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -100,7 +100,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -153,14 +153,14 @@ public: virtual SequenceElement* getMainChild(); /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. */ //virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. */ //virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction); @@ -184,14 +184,14 @@ public: /** * Returns wether the element has no more useful - * children (except its main child) and should therefore + * tqchildren (except its main child) and should therefore * be replaced by its main child's content. */ //virtual bool isSenseless(); /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -375,7 +375,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -383,7 +383,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -395,7 +395,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -414,7 +414,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/operatorelement.cc b/lib/kformula/operatorelement.cc index 27dbbdd6..66c1fcdc 100644 --- a/lib/kformula/operatorelement.cc +++ b/lib/kformula/operatorelement.cc @@ -488,13 +488,13 @@ void OperatorElement::writeSizeAttribute( TQDomElement& element, const TQString element.setAttribute( attr, "infinity" ); break; case AbsoluteSize: - element.setAttribute( attr, TQString( "%1pt" ).arg( length ) ); + element.setAttribute( attr, TQString( "%1pt" ).tqarg( length ) ); break; case RelativeSize: - element.setAttribute( attr, TQString( "%1% " ).arg( length * 100.0 ) ); + element.setAttribute( attr, TQString( "%1% " ).tqarg( length * 100.0 ) ); break; case PixelSize: - element.setAttribute( attr, TQString( "%1px " ).arg( length ) ); + element.setAttribute( attr, TQString( "%1px " ).tqarg( length ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( attr, "negativeveryverythinmathspace" ); diff --git a/lib/kformula/paddedelement.cc b/lib/kformula/paddedelement.cc index e4f28ce7..f153a339 100644 --- a/lib/kformula/paddedelement.cc +++ b/lib/kformula/paddedelement.cc @@ -36,7 +36,7 @@ PaddedElement::PaddedElement( BasicElement* parent ) : SequenceElement( parent ) /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void PaddedElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -233,18 +233,18 @@ void PaddedElement::writeSizeAttribute( TQDomElement element, const TQString& st } switch ( st ) { case WidthRelativeSize: - element.setAttribute( str, prefix + TQString( "%1 width" ).arg( s ) ); + element.setAttribute( str, prefix + TQString( "%1 width" ).tqarg( s ) ); break; case HeightRelativeSize: - element.setAttribute( str, prefix + TQString( "%1 height" ).arg( s ) ); + element.setAttribute( str, prefix + TQString( "%1 height" ).tqarg( s ) ); case AbsoluteSize: - element.setAttribute( str, prefix + TQString( "%1pt" ).arg( s ) ); + element.setAttribute( str, prefix + TQString( "%1pt" ).tqarg( s ) ); break; case RelativeSize: - element.setAttribute( str, prefix + TQString( "%1%" ).arg( s * 100.0 ) ); + element.setAttribute( str, prefix + TQString( "%1%" ).tqarg( s * 100.0 ) ); break; case PixelSize: - element.setAttribute( str, prefix + TQString( "%1px" ).arg( s ) ); + element.setAttribute( str, prefix + TQString( "%1px" ).tqarg( s ) ); break; default: break; diff --git a/lib/kformula/paddedelement.h b/lib/kformula/paddedelement.h index f50489c8..5df95b74 100644 --- a/lib/kformula/paddedelement.h +++ b/lib/kformula/paddedelement.h @@ -32,7 +32,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, diff --git a/lib/kformula/phantomelement.cc b/lib/kformula/phantomelement.cc index 78b0a1cb..e2a07fc6 100644 --- a/lib/kformula/phantomelement.cc +++ b/lib/kformula/phantomelement.cc @@ -26,7 +26,7 @@ PhantomElement::PhantomElement( BasicElement* parent ) : SequenceElement( parent } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/phantomelement.h b/lib/kformula/phantomelement.h index 6fe9a953..373c3545 100644 --- a/lib/kformula/phantomelement.h +++ b/lib/kformula/phantomelement.h @@ -30,7 +30,7 @@ public: PhantomElement( BasicElement* parent = 0 ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ diff --git a/lib/kformula/prototype/engine.py b/lib/kformula/prototype/engine.py index f1391069..a2a94487 100644 --- a/lib/kformula/prototype/engine.py +++ b/lib/kformula/prototype/engine.py @@ -82,7 +82,7 @@ class BasicElement: return self.parent.formula() def draw(self, painter, styleContext, startPoint): - """Draws the whole thing. Including its children.""" + """Draws the whole thing. Including its tqchildren.""" pass def calcSizes(self, styleContext): @@ -91,7 +91,7 @@ class BasicElement: will be stored in self.size, the midline offset in self.midline. - Please note: It's up to a parent to store its children's position.""" + Please note: It's up to a parent to store its tqchildren's position.""" pass def mainChild(self): @@ -116,22 +116,22 @@ class BasicElement: class SequenceElement (BasicElement): - """The element that contains a number of children. - The children are aligned in one line.""" + """The element that contains a number of tqchildren. + The tqchildren are aligned in one line.""" def __init__(self, parent): BasicElement.__init__(self, parent) - self.children = [] + self.tqchildren = [] def elementAtCursor(self, cursor): """Returns the element before the cursor.""" if cursor.pos() > 0: - return self.children[cursor.pos()-1] + return self.tqchildren[cursor.pos()-1] def elementAt(self, point, startPoint): r = BasicElement.elementAt(self, point, startPoint) if r != None: - for child in self.children: + for child in self.tqchildren: r = child.elementAt(point, QPoint(startPoint.x()+child.x(), startPoint.y()+child.y())) if r != None: @@ -143,7 +143,7 @@ class SequenceElement (BasicElement): # Our parent asks us for a cursor position. Found. if fromElement == self.parent: - cursor.set(self, len(self.children)) + cursor.set(self, len(self.tqchildren)) # We already owned the cursor. Ask next child then. elif fromElement == self: @@ -151,16 +151,16 @@ class SequenceElement (BasicElement): if cursor.isSelection(): cursor.set (self, cursor.pos()-1) else: - self.children[cursor.pos()-1].moveLeft(cursor, self) + self.tqchildren[cursor.pos()-1].moveLeft(cursor, self) else: # Needed because FormulaElement derives this. if self.parent != None: self.parent.moveLeft(cursor, self) - # The cursor came from one of our children or + # The cursor came from one of our tqchildren or # something is wrong. else: - fromPos = self.children.index(fromElement) + fromPos = self.tqchildren.index(fromElement) cursor.set(self, fromPos) if cursor.isSelection(): if not cursor.mouseMark(): @@ -175,20 +175,20 @@ class SequenceElement (BasicElement): # We already owned the cursor. Ask next child then. elif fromElement == self: - if cursor.pos() < len(self.children): + if cursor.pos() < len(self.tqchildren): if cursor.isSelection(): cursor.set (self, cursor.pos()+1) else: - self.children[cursor.pos()].moveRight(cursor, self) + self.tqchildren[cursor.pos()].moveRight(cursor, self) else: # Needed because FormulaElement derives this. if self.parent != None: self.parent.moveRight(cursor, self) - # The cursor came from one of our children or + # The cursor came from one of our tqchildren or # something is wrong. else: - fromPos = self.children.index(fromElement) + fromPos = self.tqchildren.index(fromElement) cursor.set(self, fromPos+1) if cursor.isSelection(): if not cursor.mouseMark(): @@ -217,7 +217,7 @@ class SequenceElement (BasicElement): if element != self: while element.parent != self: element = element.parent - cursor.setMarkPos(self.children.index(element)+1) + cursor.setMarkPos(self.tqchildren.index(element)+1) cursor.set(self, 0) def moveEnd(self, cursor): @@ -226,14 +226,14 @@ class SequenceElement (BasicElement): if element != self: while element.parent != self: element = element.parent - cursor.setMarkPos(self.children.index(element)) - cursor.set(self, len(self.children)) + cursor.setMarkPos(self.tqchildren.index(element)) + cursor.set(self, len(self.tqchildren)) def draw(self, painter, styleContext, startPoint): x, y = startPoint.x(), startPoint.y() - if len(self.children) > 0: - for child in self.children: + if len(self.tqchildren) > 0: + for child in self.tqchildren: cX = child.x() cY = child.y() child.draw(painter, styleContext, QPoint(x+cX, y+cY)) @@ -246,11 +246,11 @@ class SequenceElement (BasicElement): painter.drawRect(x, y, self.width(), self.height()) def calcSizes(self, styleContext): - if len(self.children) > 0: + if len(self.tqchildren) > 0: x = self.x() y = self.y() width = toMidline = fromMidline = 0 - for child in self.children: + for child in self.tqchildren: child.calcSizes(styleContext) child.setX(width) width += child.width() @@ -263,7 +263,7 @@ class SequenceElement (BasicElement): self.setHeight(toMidline+fromMidline) self.midline = toMidline - for child in self.children: + for child in self.tqchildren: child.setY(self.midline - child.midline) else: @@ -272,13 +272,13 @@ class SequenceElement (BasicElement): self.midline = 5 def mainChild(self): - if len(self.children) > 0: - return self.children[0] + if len(self.tqchildren) > 0: + return self.tqchildren[0] return None def setMainChild(self, sequenceElement): - if len(self.children) > 0: - self.children[0] = sequenceElement + if len(self.tqchildren) > 0: + self.tqchildren[0] = sequenceElement sequenceElement.parent = self else: self.addChild(sequenceElement) @@ -301,14 +301,14 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.children.pop(f) + child = self.tqchildren.pop(f) self.formula().elementRemoved(child) seq.addChild(child) - self.children.insert(f, element) + self.tqchildren.insert(f, element) cursor.setMarkPos(-1) cursor.set(self, f+1) elif cursor.pos() > 0: - seq.addChild(self.children[cursor.pos()-1]) + seq.addChild(self.tqchildren[cursor.pos()-1]) self.replaceChild(cursor, element) else: self.insertChild(cursor, element) @@ -323,10 +323,10 @@ class SequenceElement (BasicElement): self.formula().elementRemoved(element) seq = element.mainChild() - pos = self.children.index(element) - self.children.remove(element) - for child in seq.children: - self.children.insert(pos, child) + pos = self.tqchildren.index(element) + self.tqchildren.remove(element) + for child in seq.tqchildren: + self.tqchildren.insert(pos, child) child.parent = self pos += 1 cursor.set(self, pos) @@ -334,7 +334,7 @@ class SequenceElement (BasicElement): def addChild(self, element): - self.children.append(element) + self.tqchildren.append(element) element.parent = self self.formula().changed() @@ -342,7 +342,7 @@ class SequenceElement (BasicElement): """Inserts the new element at the cursor position. The cursor is placed behind the new element.""" pos = cursor.pos() - self.children.insert(pos, element) + self.tqchildren.insert(pos, element) element.parent = self cursor.set(self, pos+1) self.formula().changed() @@ -350,15 +350,15 @@ class SequenceElement (BasicElement): def replaceChild(self, cursor, element): """Replaces the element before the cursor with the new one. No range checking. Be careful.""" - self.children[cursor.pos()-1] = element + self.tqchildren[cursor.pos()-1] = element element.parent = self self.formula().changed() def removeChild(self, cursor, element): self.formula().elementRemoved(element) - cursor.set(self, self.children.index(element)) - self.children.remove(element) - if len(self.children) == 0: + cursor.set(self, self.tqchildren.index(element)) + self.tqchildren.remove(element) + if len(self.tqchildren) == 0: if self.parent != None: self.parent.removeChild(cursor, self) return @@ -370,16 +370,16 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.children.pop(f) + child = self.tqchildren.pop(f) self.formula().elementRemoved(child) cursor.setMarkPos(-1) cursor.set(self, f) self.formula().changed() - elif pos < len(self.children): - self.children.pop(pos) + elif pos < len(self.tqchildren): + self.tqchildren.pop(pos) self.formula().changed() else: - if len(self.children) == 0: + if len(self.tqchildren) == 0: if self.parent != None: self.parent.removeChild(cursor, self) @@ -389,17 +389,17 @@ class SequenceElement (BasicElement): f = min(cursor.pos(), cursor.markPos()) t = max(cursor.pos(), cursor.markPos()) for i in range(f, t): - child = self.children.pop(f) + child = self.tqchildren.pop(f) self.formula().elementRemoved(child) cursor.setMarkPos(-1) cursor.set(self, f) self.formula().changed() elif pos >= 0: - self.children.pop(pos) + self.tqchildren.pop(pos) cursor.set(self, pos) self.formula().changed() else: - if len(self.children) == 0: + if len(self.tqchildren) == 0: if self.parent != None: self.parent.removeChild(cursor, self) @@ -408,10 +408,10 @@ class SequenceElement (BasicElement): """Returns the position after the child at the position in global Coords.""" point = self.globalPos() - if pos < len(self.children): - d = self.children[pos].x() + if pos < len(self.tqchildren): + d = self.tqchildren[pos].x() else: - if len(self.children) > 0: + if len(self.tqchildren) > 0: d = self.width() else: d = 2 @@ -420,12 +420,12 @@ class SequenceElement (BasicElement): return point def countChildren(self): - return len(self.children) + return len(self.tqchildren) class FormulaElement (SequenceElement): """The main element. - A formula consists of a FormulaElement and its children. + A formula consists of a FormulaElement and its tqchildren. The only element that has no parent.""" def __init__(self, document): @@ -436,7 +436,7 @@ class FormulaElement (SequenceElement): return self def changed(self): - """Is called by its children if the formula changed in any way.""" + """Is called by its tqchildren if the formula changed in any way.""" self.document.changed() def elementRemoved(self, element): diff --git a/lib/kformula/prototype/gensymbolfontmap.py b/lib/kformula/prototype/gensymbolfontmap.py index a1373815..0f9f3a11 100644 --- a/lib/kformula/prototype/gensymbolfontmap.py +++ b/lib/kformula/prototype/gensymbolfontmap.py @@ -3,7 +3,7 @@ import time from xml.sax import saxutils, handler, make_parser -unicodetable = { "normal":{}, "bold":{}, "italic":{}, +tqunicodetable = { "normal":{}, "bold":{}, "italic":{}, "slant":{}, "boldItalic":{} } fonttable = {} @@ -14,7 +14,7 @@ class ContentGenerator(handler.ContentHandler): self.font = None def startElement(self, name, attrs): - if name == 'unicodetable': + if name == 'tqunicodetable': self.font = None for (name, value) in attrs.items(): if name == "font" and value: @@ -31,7 +31,7 @@ class ContentGenerator(handler.ContentHandler): elif name == "style": style = value if number != '': - unicodetable[style][number] = (latexName, charClass) + tqunicodetable[style][number] = (latexName, charClass) fonttable[self.font].append((key, number, style)) def fontkey(font, style, number): @@ -43,9 +43,9 @@ def fontkey(font, style, number): def writeFontTable(fontname, f): f.write('\n\nstatic InternFontTable ' + fontname + 'Map[] = {\n') - for style in unicodetable: - for key in unicodetable[style]: - latexName, charClass = unicodetable[style][key] + for style in tqunicodetable: + for key in tqunicodetable[style]: + latexName, charClass = tqunicodetable[style][key] pos = fontkey(fontname, style, key) if pos: f.write(' { ' + key + ', ' + hex(pos) + ', ' + charClass + ', ' + style + 'Char },\n') @@ -107,14 +107,14 @@ def main(): writeFontTable(fn, f) f.close() - f = open('../unicodenames.cc', 'w') + f = open('../tqunicodenames.cc', 'w') write_header(f) - print >>f, 'struct UnicodeNameTable { short unicode; const char* name; };' + print >>f, 'struct UnicodeNameTable { short tqunicode; const char* name; };' print >>f, 'static UnicodeNameTable nameTable[] = {' nameDir = {} table = {} - for style in unicodetable: - table.update(unicodetable[style]) + for style in tqunicodetable: + table.update(tqunicodetable[style]) for key in table: latexName, charClass = table[key] @@ -128,10 +128,10 @@ def main(): -def make_unicode_table(): +def make_tqunicode_table(): header = [] codes = {} - f = open('../config/unicode.tbl', 'r') + f = open('../config/tqunicode.tbl', 'r') for line in f.xreadlines(): if line[0] == '#': header.append(line.strip()) @@ -142,14 +142,14 @@ def make_unicode_table(): codes[line.split(',')[0].strip()] = line f.close() - for key in unicodetable: - latexName, charClass = unicodetable[key] + for key in tqunicodetable: + latexName, charClass = tqunicodetable[key] if len(latexName) > 0: codes[key] = key + ', ' + charClass + ', ' + latexName.replace('\\', '') else: codes[key] = key + ', ' + charClass - f = open('../config/unicode.tbl', 'w') + f = open('../config/tqunicode.tbl', 'w') for line in header: print >> f, line for key in codes: @@ -174,8 +174,8 @@ def make_font_table(font): ## for line in header: ## print >> f, line #print >> f, "name = " + font - for key in unicodetable: - latexName, charClass = unicodetable[key] + for key in tqunicodetable: + latexName, charClass = tqunicodetable[key] pos = fontkey(font, key) if pos: print >> f, str(pos), key, charClass, latexName @@ -186,30 +186,30 @@ def make_all_font_tables(): make_font_table(font) -def symbol_entry(pos, unicode, charClass, name): +def symbol_entry(pos, tqunicode, charClass, name): return ' <entry key="%d" number="%s" name="%s" class="%s"/>' % \ - (pos, unicode, name, charClass) + (pos, tqunicode, name, charClass) def compare_font(font): for line in file(font+".font"): list = line.split() pos = int(list[0]) - unicode = list[1] + tqunicode = list[1] charClass = list[2] if len(list)>3: name = list[3] else: name = "" - if (pos, unicode) not in fonttable[font]: - print "not in font", font, (pos, unicode) - print symbol_entry(pos, unicode, charClass, name) - if unicode not in unicodetable: - print font, unicode, (name, charClass) - print symbol_entry(pos, unicode, charClass, name) - elif unicodetable[unicode] != (name, charClass): - print font, unicode, pos, unicodetable[unicode], "!=", (name, charClass) + if (pos, tqunicode) not in fonttable[font]: + print "not in font", font, (pos, tqunicode) + print symbol_entry(pos, tqunicode, charClass, name) + if tqunicode not in tqunicodetable: + print font, tqunicode, (name, charClass) + print symbol_entry(pos, tqunicode, charClass, name) + elif tqunicodetable[tqunicode] != (name, charClass): + print font, tqunicode, pos, tqunicodetable[tqunicode], "!=", (name, charClass) def compare(): fontnames = [ "symbol", @@ -241,10 +241,10 @@ if __name__ == '__main__': parser.parse("symbol.xml") #print fonttable - #print unicodetable + #print tqunicodetable #compare() main() - #make_unicode_table() + #make_tqunicode_table() #make_all_font_tables() diff --git a/lib/kformula/prototype/unicode.py b/lib/kformula/prototype/unicode.py index 3559711d..585574cf 100755 --- a/lib/kformula/prototype/unicode.py +++ b/lib/kformula/prototype/unicode.py @@ -130,7 +130,7 @@ class Widget(QWidget): print >> f, '<?xml version="1.0" encoding="iso-8859-1"?>' print >> f, '<table>' for font in self.fonts: - print >> f, ' <unicodetable font="' + font + '">' + print >> f, ' <tqunicodetable font="' + font + '">' for (key, number, latexName, charClass) in self.fonts[font]: if not charClass or charClass == '': charClass = 'ORDINARY' @@ -140,7 +140,7 @@ class Widget(QWidget): '" class="' + str(charClass) + \ '"/>' - print >> f, ' </unicodetable>' + print >> f, ' </tqunicodetable>' print >> f, '</table>' f.close() @@ -152,7 +152,7 @@ class ContentGenerator(handler.ContentHandler): self.currentFont = None def startElement(self, name, attrs): - if name == 'unicodetable': + if name == 'tqunicodetable': for (name, value) in attrs.items(): if name == "font": self.currentFont = value diff --git a/lib/kformula/rootelement.cc b/lib/kformula/rootelement.cc index 82a5870c..5adeb51c 100644 --- a/lib/kformula/rootelement.cc +++ b/lib/kformula/rootelement.cc @@ -176,7 +176,7 @@ BasicElement* RootElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void RootElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -234,7 +234,7 @@ void RootElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -434,8 +434,8 @@ void RootElement::insert(FormulaCursor* cursor, } /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * We remove ourselve if we are requested to remove our content. */ @@ -476,7 +476,7 @@ void RootElement::normalize(FormulaCursor* cursor, Direction direction) // main child // -// If an element has children one has to become the main one. +// If an element has tqchildren one has to become the main one. SequenceElement* RootElement::getMainChild() { diff --git a/lib/kformula/rootelement.h b/lib/kformula/rootelement.h index f4286ab4..1eacf4d4 100644 --- a/lib/kformula/rootelement.h +++ b/lib/kformula/rootelement.h @@ -66,7 +66,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -74,7 +74,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -86,7 +86,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -124,8 +124,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * We remove ourselve if we are requested to remove our content. */ @@ -139,7 +139,7 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild(); SequenceElement* getRadiant() { return index; } @@ -175,7 +175,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/scripts/bycodes.py b/lib/kformula/scripts/bycodes.py index 16d71959..35b79a55 100755 --- a/lib/kformula/scripts/bycodes.py +++ b/lib/kformula/scripts/bycodes.py @@ -25,11 +25,11 @@ import qt def decode( fd, font, line ): begin = string.find( line, '"' ) end = string.find( line, '"', begin + 1) - unicode = line[begin + 2:end] # Remove 'U' from string aswell + tqunicode = line[begin + 2:end] # Remove 'U' from string aswell char_list = [] - separation = string.find( unicode, '-' ) + separation = string.find( tqunicode, '-' ) if separation != -1: - second = unicode + second = tqunicode while separation != -1: first = second[0:separation] second = second[separation + 2:] @@ -38,13 +38,13 @@ def decode( fd, font, line ): if separation == -1: char_list.append( string.atoi( second, 16 ) ) else: - char_list.append( string.atoi ( unicode, 16 ) ) + char_list.append( string.atoi ( tqunicode, 16 ) ) fm = qt.QFontMetrics( qt.QFont( font ) ) in_font = True for c in char_list: if not fm.inFont( qt.QChar( c ) ): in_font = False - fd.write( unicode + ' ' + str( in_font ) + '\n') + fd.write( tqunicode + ' ' + str( in_font ) + '\n') def parse( file, font ): fd = open( file ) diff --git a/lib/kformula/scripts/bynames.py b/lib/kformula/scripts/bynames.py index afb9ece5..0829cf90 100755 --- a/lib/kformula/scripts/bynames.py +++ b/lib/kformula/scripts/bynames.py @@ -66,7 +66,7 @@ struct entityMap { return qstrcmp( name, right ) < 0; } const char* name; - const uint unicode; + const uint tqunicode; }; extern const entityMap entities[]; diff --git a/lib/kformula/sequenceelement.cc b/lib/kformula/sequenceelement.cc index e3573174..93293db7 100644 --- a/lib/kformula/sequenceelement.cc +++ b/lib/kformula/sequenceelement.cc @@ -76,7 +76,7 @@ SequenceElement::SequenceElement(BasicElement* parent) : BasicElement(parent), parseTree(0), textSequence(true),singlePipe(true), style(0) { assert( creationStrategy != 0 ); - children.setAutoDelete(true); + tqchildren.setAutoDelete(true); } @@ -88,12 +88,12 @@ SequenceElement::~SequenceElement() SequenceElement::SequenceElement( const SequenceElement& other ) : BasicElement( other ) { - children.setAutoDelete(true); - uint count = other.children.count(); + tqchildren.setAutoDelete(true); + uint count = other.tqchildren.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = children.at(i)->clone(); + BasicElement* child = tqchildren.at(i)->clone(); child->setParent( this ); - children.append( child ); + tqchildren.append( child ); } } @@ -121,18 +121,18 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, LuPixelPoint myPos(parentOrigin.x() + getX(), parentOrigin.y() + getY()); - uint count = children.count(); + uint count = tqchildren.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = children.at(i); + BasicElement* child = tqchildren.at(i); e = child->goToPos(cursor, handled, point, myPos); if (e != 0) { if (!handled) { handled = true; if ((point.x() - myPos.x()) < (e->getX() + e->getWidth()*2/3)) { - cursor->setTo(this, children.find(e)); + cursor->setTo(this, tqchildren.find(e)); } else { - cursor->setTo(this, children.find(e)+1); + cursor->setTo(this, tqchildren.find(e)+1); } } return e; @@ -143,11 +143,11 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, //int dy = point.y() - myPos.y(); for (uint i = 0; i < count; i++) { - BasicElement* child = children.at(i); + BasicElement* child = tqchildren.at(i); if (dx < child->getX()) { cursor->setTo( this, i ); handled = true; - return children.at( i ); + return tqchildren.at( i ); } } @@ -161,9 +161,9 @@ BasicElement* SequenceElement::goToPos( FormulaCursor* cursor, bool& handled, bool SequenceElement::isEmpty() { - uint count = children.count(); + uint count = tqchildren.count(); for (uint i = 0; i < count; i++) { - BasicElement* child = children.at(i); + BasicElement* child = tqchildren.at(i); if (!child->isInvisible()) { return false; } @@ -174,7 +174,7 @@ bool SequenceElement::isEmpty() /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void SequenceElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -190,7 +190,7 @@ void SequenceElement::calcSizes( const ContextStyle& context, width += context.ptToPixelX( getSpaceBefore( context, tstyle, factor ) ); // Let's do all normal elements that have a base line. - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); @@ -237,7 +237,7 @@ void SequenceElement::calcSizes( const ContextStyle& context, void SequenceElement::setChildrenPositions() { - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); child->setY(getBaseline() - child->getBaseline()); @@ -246,7 +246,7 @@ void SequenceElement::setChildrenPositions() /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -264,7 +264,7 @@ void SequenceElement::draw( TQPainter& painter, const LuPixelRect& r, // return; if (!isEmpty()) { - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); for (int i = 0 ; it.current(); i++) { BasicElement* child = it.current(); if (!child->isInvisible()) { @@ -308,7 +308,7 @@ void SequenceElement::draw( TQPainter& painter, const LuPixelRect& r, void SequenceElement::dispatchFontCommand( FontCommand* cmd ) { - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); for ( ; it.current(); ++it ) { BasicElement* child = it.current(); child->dispatchFontCommand( cmd ); @@ -420,12 +420,12 @@ void SequenceElement::drawCursor( TQPainter& painter, const ContextStyle& contex luPixel SequenceElement::getChildPosition( const ContextStyle& context, uint child ) { - if (child < children.count()) { - return children.at(child)->getX(); + if (child < tqchildren.count()) { + return tqchildren.at(child)->getX(); } else { - if (children.count() > 0) { - return children.at(child-1)->getX() + children.at(child-1)->getWidth(); + if (tqchildren.count() > 0) { + return tqchildren.at(child-1)->getX() + tqchildren.at(child-1)->getWidth(); } else { return context.ptToLayoutUnitPixX( 2 ); @@ -451,9 +451,9 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) { // Our parent asks us for a cursor position. Found. if (from == getParent()) { - cursor->setTo(this, children.count()); + cursor->setTo(this, tqchildren.count()); if ( cursor->isSelectionMode() ) { - cursor->setMark( children.count() ); + cursor->setMark( tqchildren.count() ); } from->entered( this ); } @@ -464,7 +464,7 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) cursor->setTo(this, cursor->getPos()-1); // invisible elements are not visible so we move on. - if (children.at(cursor->getPos())->isInvisible()) { + if (tqchildren.at(cursor->getPos())->isInvisible()) { moveLeft(cursor, this); } } @@ -479,12 +479,12 @@ void SequenceElement::moveLeft(FormulaCursor* cursor, BasicElement* from) } } - // The cursor came from one of our children or + // The cursor came from one of our tqchildren or // something is wrong. else { - int fromPos = children.find(from); + int fromPos = tqchildren.find(from); if ( fromPos > 0 ) { - children.at( fromPos - 1)->moveLeft( cursor, this ); + tqchildren.at( fromPos - 1)->moveLeft( cursor, this ); } // invisible elements are not visible so we move on. @@ -511,11 +511,11 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from) // We already owned the cursor. Ask next child then. else if (from == this) { uint pos = cursor->getPos(); - if (pos < children.count()) { + if (pos < tqchildren.count()) { cursor->setTo(this, pos+1); // invisible elements are not visible so we move on. - if (children.at(pos)->isInvisible()) { + if (tqchildren.at(pos)->isInvisible()) { moveRight(cursor, this); } } @@ -530,12 +530,12 @@ void SequenceElement::moveRight(FormulaCursor* cursor, BasicElement* from) } } - // The cursor came from one of our children or + // The cursor came from one of our tqchildren or // something is wrong. else { - int fromPos = children.find(from); - if ( fromPos < children.count() - 1 ) { - children.at( fromPos + 1 )->moveDown( cursor, this ); + int fromPos = tqchildren.find(from); + if ( fromPos < tqchildren.count() - 1 ) { + tqchildren.at( fromPos + 1 )->moveDown( cursor, this ); } else { cursor->setTo(this, fromPos+1); @@ -557,7 +557,7 @@ void SequenceElement::moveWordLeft(FormulaCursor* cursor) { uint pos = cursor->getPos(); if (pos > 0) { - ElementType* type = children.at(pos-1)->getElementType(); + ElementType* type = tqchildren.at(pos-1)->getElementType(); if (type != 0) { cursor->setTo(this, type->start()); } @@ -571,8 +571,8 @@ void SequenceElement::moveWordLeft(FormulaCursor* cursor) void SequenceElement::moveWordRight(FormulaCursor* cursor) { uint pos = cursor->getPos(); - if (pos < children.count()) { - ElementType* type = children.at(pos)->getElementType(); + if (pos < tqchildren.count()) { + ElementType* type = tqchildren.at(pos)->getElementType(); if (type != 0) { cursor->setTo(this, type->end()); } @@ -596,7 +596,7 @@ void SequenceElement::moveUp(FormulaCursor* cursor, BasicElement* from) else if ( from == this ) { if ( getParent() != 0 ) { uint pos = cursor->getPos(); - if ( pos < (children.count() - 1) / 2 ) { + if ( pos < (tqchildren.count() - 1) / 2 ) { getParent()->moveLeft( cursor, this ); } else { @@ -630,8 +630,8 @@ void SequenceElement::moveDown(FormulaCursor* cursor, BasicElement* from) } else if (from == this) { uint pos = cursor->getPos(); - if (pos < children.count()) { - children.at(pos)->moveDown(cursor, this); + if (pos < tqchildren.count()) { + tqchildren.at(pos)->moveDown(cursor, this); } } else { @@ -639,7 +639,7 @@ void SequenceElement::moveDown(FormulaCursor* cursor, BasicElement* from) getParent()->moveDown(cursor, this); } else { - cursor->setTo( this, children.count() ); + cursor->setTo( this, tqchildren.count() ); from->entered( this ); // formula()->moveOutBelow( cursor ); } @@ -658,7 +658,7 @@ void SequenceElement::moveHome(FormulaCursor* cursor) while (element->getParent() != this) { element = element->getParent(); } - cursor->setMark(children.find(element)+1); + cursor->setMark(tqchildren.find(element)+1); } } cursor->setTo(this, 0); @@ -676,16 +676,16 @@ void SequenceElement::moveEnd(FormulaCursor* cursor) while (element->getParent() != this) { element = element->getParent(); if (element == 0) { - cursor->setMark(children.count()); + cursor->setMark(tqchildren.count()); break; } } if (element != 0) { - cursor->setMark(children.find(element)); + cursor->setMark(tqchildren.find(element)); } } } - cursor->setTo(this, children.count()); + cursor->setTo(this, tqchildren.count()); } /** @@ -705,11 +705,11 @@ void SequenceElement::goInside(FormulaCursor* cursor) void SequenceElement::goInsideLast(FormulaCursor* cursor) { cursor->setSelection(false); - cursor->setTo(this, children.count()); + cursor->setTo(this, tqchildren.count()); } -// children +// tqchildren /** * Insert a new child in the sequence @@ -723,7 +723,7 @@ void SequenceElement::goInsideLast(FormulaCursor* cursor) bool SequenceElement::insert( uint index, BasicElement *child ) { - return children.insert( index, child ); + return tqchildren.insert( index, child ); } /** @@ -735,12 +735,12 @@ bool SequenceElement::insert( uint index, BasicElement *child ) */ // void SequenceElement::removeChild(FormulaCursor* cursor, BasicElement* child) // { -// int pos = children.find(child); +// int pos = tqchildren.find(child); // formula()->elementRemoval(child, pos); // cursor->setTo(this, pos); -// children.remove(pos); +// tqchildren.remove(pos); // /* -// if len(self.children) == 0: +// if len(self.tqchildren) == 0: // if self.parent != None: // self.parent.removeChild(cursor, self) // return @@ -750,7 +750,7 @@ bool SequenceElement::insert( uint index, BasicElement *child ) /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. The inserted elements will * be selected. * @@ -765,7 +765,7 @@ void SequenceElement::insert(FormulaCursor* cursor, for (uint i = 0; i < count; i++) { BasicElement* child = newChildren.take(0); child->setParent(this); - children.insert(pos+i, child); + tqchildren.insert(pos+i, child); } if (direction == beforeCursor) { cursor->setTo(this, pos+count, pos); @@ -780,8 +780,8 @@ void SequenceElement::insert(FormulaCursor* cursor, /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * The ownership of the list is passed to the caller. */ @@ -803,9 +803,9 @@ void SequenceElement::remove(FormulaCursor* cursor, int pos = cursor->getPos() - 1; if (pos >= 0) { while (pos >= 0) { - BasicElement* child = children.at(pos); + BasicElement* child = tqchildren.at(pos); formula()->elementRemoval(child); - children.take(pos); + tqchildren.take(pos); removedChildren.prepend(child); if (!child->isInvisible()) { break; @@ -818,11 +818,11 @@ void SequenceElement::remove(FormulaCursor* cursor, } else { uint pos = cursor->getPos(); - if (pos < children.count()) { - while (pos < children.count()) { - BasicElement* child = children.at(pos); + if (pos < tqchildren.count()) { + while (pos < tqchildren.count()) { + BasicElement* child = tqchildren.at(pos); formula()->elementRemoval(child); - children.take(pos); + tqchildren.take(pos); removedChildren.append(child); if (!child->isInvisible()) { break; @@ -841,13 +841,13 @@ void SequenceElement::remove(FormulaCursor* cursor, /** - * Removes the children at pos and appends it to the list. + * Removes the tqchildren at pos and appends it to the list. */ void SequenceElement::removeChild(TQPtrList<BasicElement>& removedChildren, int pos) { - BasicElement* child = children.at(pos); + BasicElement* child = tqchildren.at(pos); formula()->elementRemoval(child); - children.take(pos); + tqchildren.take(pos); removedChildren.append(child); //cerr << *removedChildren.at(0) << endl; formula()->changed(); @@ -872,12 +872,12 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct { if ( direction == beforeCursor ) { if ( cursor->getPos() > 0 ) { - return children.at( cursor->getPos() - 1 ); + return tqchildren.at( cursor->getPos() - 1 ); } } else { - if ( cursor->getPos() < tqRound( children.count() ) ) { - return children.at( cursor->getPos() ); + if ( cursor->getPos() < tqRound( tqchildren.count() ) ) { + return tqchildren.at( cursor->getPos() ); } } return 0; @@ -890,7 +890,7 @@ BasicElement* SequenceElement::getChild( FormulaCursor* cursor, Direction direct */ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child) { - int pos = children.find(child); + int pos = tqchildren.find(child); if (pos > -1) { cursor->setTo(this, pos+1, pos); } @@ -898,7 +898,7 @@ void SequenceElement::selectChild(FormulaCursor* cursor, BasicElement* child) void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child) { - int childPos = children.find(child); + int childPos = tqchildren.find(child); if (childPos > -1) { int pos = cursor->getPos(); if (pos > childPos) { @@ -914,11 +914,11 @@ void SequenceElement::childWillVanish(FormulaCursor* cursor, BasicElement* child /** - * Selects all children. The cursor is put behind, the mark before them. + * Selects all tqchildren. The cursor is put behind, the mark before them. */ void SequenceElement::selectAllChildren(FormulaCursor* cursor) { - cursor->setTo(this, children.count(), 0); + cursor->setTo(this, tqchildren.count(), 0); } bool SequenceElement::onlyTextSelected( FormulaCursor* cursor ) @@ -1116,7 +1116,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request case req_addIndex: { if ( cursor->getPos() > 0 && !cursor->isSelection() ) { IndexElement* element = - dynamic_cast<IndexElement*>( children.at( cursor->getPos()-1 ) ); + dynamic_cast<IndexElement*>( tqchildren.at( cursor->getPos()-1 ) ); if ( element != 0 ) { element->goInside( cursor ); return element->buildCommand( container, request ); @@ -1184,7 +1184,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request const SymbolTable& table = container->document()->getSymbolTable(); if (table.greekLetters().find(element->getCharacter()) != -1) { KFCReplace* command = new KFCReplace( i18n( "Change Char to Symbol" ), container ); - TextElement* symbol = creationStrategy->createTextElement( table.unicodeFromSymbolFont( element->getCharacter() ), true ); + TextElement* symbol = creationStrategy->createTextElement( table.tqunicodeFromSymbolFont( element->getCharacter() ), true ); command->addElement( symbol ); return command; } @@ -1206,7 +1206,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request CharStyleCommand* cmd = new CharStyleCommand( cs, i18n( "Change Char Style" ), container ); int end = cursor->getSelectionEnd(); for ( int i = cursor->getSelectionStart(); i<end; ++i ) { - cmd->addElement( children.at( i ) ); + cmd->addElement( tqchildren.at( i ) ); } return cmd; } @@ -1219,7 +1219,7 @@ KCommand* SequenceElement::buildCommand( Container* container, Request* request CharFamilyCommand* cmd = new CharFamilyCommand( cf, i18n( "Change Char Family" ), container ); int end = cursor->getSelectionEnd(); for ( int i = cursor->getSelectionStart(); i<end; ++i ) { - cmd->addElement( children.at( i ) ); + cmd->addElement( tqchildren.at( i ) ); } return cmd; } @@ -1311,8 +1311,8 @@ KCommand* SequenceElement::input( Container* container, TQKeyEvent* event ) KCommand* SequenceElement::input( Container* container, TQChar ch ) { - int unicode = ch.unicode(); - switch (unicode) { + int tqunicode = ch.tqunicode(); + switch (tqunicode) { case '(': { BracketRequest r( container->document()->leftBracketChar(), container->document()->rightBracketChar() ); @@ -1397,25 +1397,25 @@ KCommand* SequenceElement::input( Container* container, TQChar ch ) } /** - * Stores the given childrens dom in the element. + * Stores the given tqchildrens dom in the element. */ void SequenceElement::getChildrenDom( TQDomDocument& doc, TQDomElement elem, uint from, uint to) { for (uint i = from; i < to; i++) { - TQDomElement tmpEleDom=children.at(i)->getElementDom(doc); + TQDomElement tmpEleDom=tqchildren.at(i)->getElementDom(doc); elem.appendChild(tmpEleDom); } } /** - * Stores the given childrens MathML dom in the element. + * Stores the given tqchildrens MathML dom in the element. */ void SequenceElement::getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& parent, uint from, uint to) { for ( uint i = from; i < to; i++ ) { - children.at( i )->writeMathML( doc, parent, false ); + tqchildren.at( i )->writeMathML( doc, parent, false ); } } @@ -1467,7 +1467,7 @@ void SequenceElement::writeDom(TQDomElement element) { BasicElement::writeDom(element); - uint count = children.count(); + uint count = tqchildren.count(); TQDomDocument doc = element.ownerDocument(); getChildrenDom(doc, element, 0, count); } @@ -1495,7 +1495,7 @@ bool SequenceElement::readContentFromDom(TQDomNode& node) return false; } - return buildChildrenFromDom(children, node); + return buildChildrenFromDom(tqchildren, node); } @@ -1504,9 +1504,9 @@ void SequenceElement::parse() delete parseTree; textSequence = true; - for (BasicElement* element = children.first(); + for (BasicElement* element = tqchildren.first(); element != 0; - element = children.next()) { + element = tqchildren.next()) { // Those types are gone. Make sure they won't // be used. @@ -1519,7 +1519,7 @@ void SequenceElement::parse() const SymbolTable& symbols = formula()->getSymbolTable(); SequenceParser parser(symbols); - parseTree = parser.parse(children); + parseTree = parser.parse(tqchildren); // With the IndexElement dynamically changing its text/non-text // behaviour we need to reparse your parent, too. Hacky! @@ -1544,9 +1544,9 @@ bool SequenceElement::isFirstOfToken( BasicElement* child ) TQString SequenceElement::toLatex() { TQString content; - uint count = children.count(); + uint count = tqchildren.count(); for ( uint i = 0; i < count; i++ ) { - BasicElement* child = children.at( i ); + BasicElement* child = tqchildren.at( i ); // if ( isFirstOfToken( child ) ) { // content += ""; // } @@ -1559,9 +1559,9 @@ TQString SequenceElement::toLatex() TQString SequenceElement::formulaString() { TQString content; - uint count = children.count(); + uint count = tqchildren.count(); for ( uint i = 0; i < count; i++ ) { - BasicElement* child = children.at( i ); + BasicElement* child = tqchildren.at( i ); //if ( isFirstOfToken( child ) ) { // content += " "; //} @@ -1573,7 +1573,7 @@ TQString SequenceElement::formulaString() void SequenceElement::writeMathMLContent( TQDomDocument& doc, TQDomElement& element, bool oasisFormat ) const { - for ( TQPtrListIterator<BasicElement> it( children ); it.current(); ++it ) { + for ( TQPtrListIterator<BasicElement> it( tqchildren ); it.current(); ++it ) { it.current()->writeMathML( doc, element, oasisFormat ); } } @@ -1581,7 +1581,7 @@ void SequenceElement::writeMathMLContent( TQDomDocument& doc, TQDomElement& elem const BasicElement* SequenceElement::getChild( uint i ) const { - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); it += i; return it.current(); } @@ -1589,7 +1589,7 @@ const BasicElement* SequenceElement::getChild( uint i ) const int SequenceElement::childPos( const BasicElement* child ) const { - TQPtrListIterator<BasicElement> it( children ); + TQPtrListIterator<BasicElement> it( tqchildren ); uint count = it.count(); for ( uint i=0; i<count; ++i, ++it ) { if ( it.current() == child ) { @@ -1700,8 +1700,8 @@ KCommand* NameSequence::buildCommand( Container* container, Request* request ) KCommand* NameSequence::input( Container* container, TQChar ch ) { - int unicode = ch.unicode(); - switch (unicode) { + int tqunicode = ch.tqunicode(); + switch (tqunicode) { case '(': case '[': case '|': @@ -1746,12 +1746,12 @@ void NameSequence::setElementType( ElementType* t ) BasicElement* NameSequence::replaceElement( const SymbolTable& table ) { TQString name = buildName(); - TQChar ch = table.unicode( name ); + TQChar ch = table.tqunicode( name ); if ( !ch.isNull() ) { return new TextElement( ch, true ); } else { - ch = table.unicode( i18n( name.latin1() ) ); + ch = table.tqunicode( i18n( name.latin1() ) ); if ( !ch.isNull() ) { return new TextElement( ch, true ); } @@ -1782,7 +1782,7 @@ BasicElement* NameSequence::createElement( TQString type ) // void NameSequence::parse() // { -// // A name sequence is known as name and so are its children. +// // A name sequence is known as name and so are its tqchildren. // // Caution: this is fake! // for ( int i = 0; i < countChildren(); i++ ) { // getChild( i )->setElementType( getElementType() ); @@ -1891,7 +1891,7 @@ int SequenceElement::readContentFromMathMLDom(TQDomNode& node) return -1; } - return buildChildrenFromMathMLDom(children, node); + return buildChildrenFromMathMLDom(tqchildren, node); } int SequenceElement::buildMathMLChild( TQDomNode node ) @@ -1915,7 +1915,7 @@ int SequenceElement::buildMathMLChild( TQDomNode node ) child->setStyle(style); } if (child->buildFromMathMLDom(e) != -1) { - children.append(child); + tqchildren.append(child); } else { delete child; diff --git a/lib/kformula/sequenceelement.h b/lib/kformula/sequenceelement.h index f9fb2ce6..4d32153c 100644 --- a/lib/kformula/sequenceelement.h +++ b/lib/kformula/sequenceelement.h @@ -34,8 +34,8 @@ class SymbolTable; class ElementCreationStrategy; /** - * The element that contains a number of children. - * The children are aligned in one line. + * The element that contains a number of tqchildren. + * The tqchildren are aligned in one line. */ class SequenceElement : public BasicElement { SequenceElement& operator=( const SequenceElement& ) { return *this; } @@ -92,7 +92,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -100,7 +100,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -112,7 +112,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -202,10 +202,10 @@ public: virtual void goInsideLast(FormulaCursor* cursor); - // children + // tqchildren /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. The inserted elements will * be selected. * @@ -214,8 +214,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. */ virtual void remove(FormulaCursor*, TQPtrList<BasicElement>&, Direction); @@ -244,18 +244,18 @@ public: virtual void childWillVanish(FormulaCursor* cursor, BasicElement* child); /** - * @returns the number of children we have. + * @returns the number of tqchildren we have. */ - uint countChildren() const { return children.count(); } + uint countChildren() const { return tqchildren.count(); } /** * @returns whether the child has the given number. */ bool isChildNumber( uint pos, BasicElement* child ) - { return children.at( pos ) == child; } + { return tqchildren.at( pos ) == child; } /** - * Selects all children. The cursor is put behind, the mark before them. + * Selects all tqchildren. The cursor is put behind, the mark before them. */ void selectAllChildren(FormulaCursor* cursor); @@ -288,12 +288,12 @@ public: virtual void parse(); /** - * Stores the given childrens dom in the element. + * Stores the given tqchildrens dom in the element. */ void getChildrenDom( TQDomDocument& doc, TQDomElement elem, uint from, uint to); /** - * Stores the given childrens MathML dom in the element. + * Stores the given tqchildrens MathML dom in the element. */ void getChildrenMathMLDom( TQDomDocument& doc, TQDomNode& elem, uint from, uint to ); @@ -306,7 +306,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -315,10 +315,10 @@ public: /** * @returns the child at position i. */ - BasicElement* getChild(uint i) { return children.at(i); } + BasicElement* getChild(uint i) { return tqchildren.at(i); } const BasicElement* getChild(uint i) const; - int childPos( BasicElement* child ) { return children.find( child ); } + int childPos( BasicElement* child ) { return tqchildren.find( child ); } int childPos( const BasicElement* child ) const; class ChildIterator { @@ -407,7 +407,7 @@ protected: virtual bool readContentFromDom(TQDomNode& node); /** - * Sets the childrens' positions after their size has been + * Sets the tqchildrens' positions after their size has been * calculated. * * @see #calcSizes @@ -458,16 +458,16 @@ protected: private: /** - * Removes the children at pos and appends it to the list. + * Removes the tqchildren at pos and appends it to the list. */ void removeChild(TQPtrList<BasicElement>& removedChildren, int pos); /** - * Our children. Be sure to notify the rootElement before + * Our tqchildren. Be sure to notify the rootElement before * you remove any. */ - TQPtrList<BasicElement> children; + TQPtrList<BasicElement> tqchildren; /** * the syntax tree of the sequence @@ -603,7 +603,7 @@ protected: /** * @returns whether the child is the first element of its token. - * This can never happen here. Our children reuse our own + * This can never happen here. Our tqchildren reuse our own * element type. */ virtual bool isFirstOfToken( BasicElement* ) { return false; } diff --git a/lib/kformula/spaceelement.cc b/lib/kformula/spaceelement.cc index 1fb4f553..a7e23464 100644 --- a/lib/kformula/spaceelement.cc +++ b/lib/kformula/spaceelement.cc @@ -288,13 +288,13 @@ void SpaceElement::writeMathMLAttributes( TQDomElement& element ) const { switch ( m_widthType ) { case AbsoluteSize: - element.setAttribute( "width", TQString( "%1pt" ).arg( m_width ) ); + element.setAttribute( "width", TQString( "%1pt" ).tqarg( m_width ) ); break; case RelativeSize: - element.setAttribute( "width", TQString( "%1%" ).arg( m_width * 100.0 ) ); + element.setAttribute( "width", TQString( "%1%" ).tqarg( m_width * 100.0 ) ); break; case PixelSize: - element.setAttribute( "width", TQString( "%1px" ).arg( m_width ) ); + element.setAttribute( "width", TQString( "%1px" ).tqarg( m_width ) ); break; case NegativeVeryVeryThinMathSpace: element.setAttribute( "width", "negativeveryverythinmathspace" ); @@ -343,26 +343,26 @@ void SpaceElement::writeMathMLAttributes( TQDomElement& element ) const } switch ( m_heightType ) { case AbsoluteSize: - element.setAttribute( "height", TQString( "%1pt" ).arg( m_height ) ); + element.setAttribute( "height", TQString( "%1pt" ).tqarg( m_height ) ); break; case RelativeSize: - element.setAttribute( "height", TQString( "%1%" ).arg( m_height * 100.0 ) ); + element.setAttribute( "height", TQString( "%1%" ).tqarg( m_height * 100.0 ) ); break; case PixelSize: - element.setAttribute( "height", TQString( "%1px" ).arg( m_height ) ); + element.setAttribute( "height", TQString( "%1px" ).tqarg( m_height ) ); break; default: break; } switch ( m_depthType ) { case AbsoluteSize: - element.setAttribute( "depth", TQString( "%1pt" ).arg( m_depth ) ); + element.setAttribute( "depth", TQString( "%1pt" ).tqarg( m_depth ) ); break; case RelativeSize: - element.setAttribute( "depth", TQString( "%1%" ).arg( m_depth * 100.0 ) ); + element.setAttribute( "depth", TQString( "%1%" ).tqarg( m_depth * 100.0 ) ); break; case PixelSize: - element.setAttribute( "depth", TQString( "%1px" ).arg( m_depth ) ); + element.setAttribute( "depth", TQString( "%1px" ).tqarg( m_depth ) ); break; default: break; diff --git a/lib/kformula/spaceelement.h b/lib/kformula/spaceelement.h index 46397509..a8c5ec9a 100644 --- a/lib/kformula/spaceelement.h +++ b/lib/kformula/spaceelement.h @@ -78,7 +78,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -86,7 +86,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -105,7 +105,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/styleelement.cc b/lib/kformula/styleelement.cc index de760453..3bb6b6b1 100644 --- a/lib/kformula/styleelement.cc +++ b/lib/kformula/styleelement.cc @@ -135,13 +135,13 @@ void StyleElement::writeMathMLAttributes( TQDomElement& element ) const if ( m_relativeScriptLevel && m_scriptLevel >= 0 ) { prefix = "+"; } - element.setAttribute( "scriptlevel", prefix + TQString( "%1" ).arg( m_scriptLevel ) ); + element.setAttribute( "scriptlevel", prefix + TQString( "%1" ).tqarg( m_scriptLevel ) ); } if ( m_customDisplayStyle ) { element.setAttribute( "displaystyle", m_displayStyle ? "true" : "false" ); } if ( m_customScriptSizeMultiplier ) { - element.setAttribute( "scriptsizemultiplier", TQString( "%1" ).arg( m_scriptSizeMultiplier ) ); + element.setAttribute( "scriptsizemultiplier", TQString( "%1" ).tqarg( m_scriptSizeMultiplier ) ); } writeSizeAttribute( element, "scriptminsize", m_scriptMinSizeType, m_scriptMinSize ); if ( m_customBackground ) { @@ -373,13 +373,13 @@ void StyleElement::writeSizeAttribute( TQDomElement element, const TQString& str { switch ( st ) { case AbsoluteSize: - element.setAttribute( str, TQString( "%1pt" ).arg( s ) ); + element.setAttribute( str, TQString( "%1pt" ).tqarg( s ) ); break; case RelativeSize: - element.setAttribute( str, TQString( "%1%" ).arg( s * 100.0 ) ); + element.setAttribute( str, TQString( "%1%" ).tqarg( s * 100.0 ) ); break; case PixelSize: - element.setAttribute( str, TQString( "%1px" ).arg( s ) ); + element.setAttribute( str, TQString( "%1px" ).tqarg( s ) ); break; default: break; diff --git a/lib/kformula/symbolaction.cc b/lib/kformula/symbolaction.cc index e26f3fef..d5aa3176 100644 --- a/lib/kformula/symbolaction.cc +++ b/lib/kformula/symbolaction.cc @@ -91,7 +91,7 @@ void SymbolComboItem::paint( TQPainter *p ) p->setFont( m_font ); TQFontMetrics fm( p->fontMetrics() ); p->drawText( 3, fm.ascent() + fm.leading() / 2, - TQString( "%1" ).arg( TQChar( m_symbol ) ) ); + TQString( "%1" ).tqarg( TQChar( m_symbol ) ) ); p->setFont( KGlobalSettings::generalFont() ); fm = p->fontMetrics(); @@ -128,7 +128,7 @@ int SymbolAction::plug( TQWidget* w, int index ) TQT_SLOT( slotActivated( const TQString & ) ) ); cb->setEnabled( isEnabled() ); bar->insertWidget( id_, comboWidth(), cb, index ); - cb->setMinimumWidth( cb->sizeHint().width() ); + cb->setMinimumWidth( cb->tqsizeHint().width() ); addContainer( bar, id_ ); @@ -166,7 +166,7 @@ void SymbolAction::updateItems( int id ) for( uint i = 0; i < items().count(); ++i ) { new SymbolComboItem( *items().at( i ), m_font, m_chars.at( i ), cb ); } - cb->setMinimumWidth( cb->sizeHint().width() ); + cb->setMinimumWidth( cb->tqsizeHint().width() ); } } } diff --git a/lib/kformula/symbolelement.cc b/lib/kformula/symbolelement.cc index 31787b16..a601cea4 100644 --- a/lib/kformula/symbolelement.cc +++ b/lib/kformula/symbolelement.cc @@ -192,7 +192,7 @@ BasicElement* SymbolElement::goToPos( FormulaCursor* cursor, bool& handled, /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void SymbolElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -299,7 +299,7 @@ void SymbolElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -502,11 +502,11 @@ void SymbolElement::moveDown(FormulaCursor* cursor, BasicElement* from) } } -// children +// tqchildren // main child // -// If an element has children one has to become the main one. +// If an element has tqchildren one has to become the main one. // void SymbolElement::setMainChild(SequenceElement* child) // { @@ -518,7 +518,7 @@ void SymbolElement::moveDown(FormulaCursor* cursor, BasicElement* from) /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -557,8 +557,8 @@ void SymbolElement::insert(FormulaCursor* cursor, } /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will diff --git a/lib/kformula/symbolelement.h b/lib/kformula/symbolelement.h index ab9b5d89..0133258e 100644 --- a/lib/kformula/symbolelement.h +++ b/lib/kformula/symbolelement.h @@ -65,7 +65,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -73,7 +73,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -85,7 +85,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -125,7 +125,7 @@ public: */ virtual void moveDown(FormulaCursor* cursor, BasicElement* from); - // children + // tqchildren /** * Removes the child. If this was the main child this element might @@ -139,14 +139,14 @@ public: // main child // - // If an element has children one has to become the main one. + // If an element has tqchildren one has to become the main one. virtual SequenceElement* getMainChild() { return content; } //virtual void setMainChild(SequenceElement*); /** - * Inserts all new children at the cursor position. Places the + * Inserts all new tqchildren at the cursor position. Places the * cursor according to the direction. * * You only can insert one index at a time. So the list must contain @@ -158,8 +158,8 @@ public: virtual void insert(FormulaCursor*, TQPtrList<BasicElement>&, Direction); /** - * Removes all selected children and returns them. Places the - * cursor to where the children have been. + * Removes all selected tqchildren and returns them. Places the + * cursor to where the tqchildren have been. * * The cursor has to be inside one of our indexes which is supposed * to be empty. The index will be removed and the cursor will @@ -221,7 +221,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/symboltable.cc b/lib/kformula/symboltable.cc index 369cf6c3..42c4a8e6 100644 --- a/lib/kformula/symboltable.cc +++ b/lib/kformula/symboltable.cc @@ -23,7 +23,7 @@ #include <tqregexp.h> #include <tqstring.h> #include <tqstringlist.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqfontmetrics.h> #include <kconfig.h> @@ -44,12 +44,12 @@ KFORMULA_NAMESPACE_BEGIN SymbolFontHelper::SymbolFontHelper() : greek("abgdezhqiklmnxpvrstufjcywGDTQLXPSUFYVW") { - for ( uint i = 0; symbolMap[ i ].unicode != 0; i++ ) { - compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].unicode; + for ( uint i = 0; symbolMap[ i ].tqunicode != 0; i++ ) { + compatibility[ symbolMap[ i ].pos ] = symbolMap[ i ].tqunicode; } } -TQChar SymbolFontHelper::unicodeFromSymbolFont( TQChar pos ) const +TQChar SymbolFontHelper::tqunicodeFromSymbolFont( TQChar pos ) const { if ( compatibility.contains( pos ) ) { return compatibility[ pos.latin1() ]; @@ -66,17 +66,17 @@ SymbolTable::SymbolTable() void SymbolTable::init( const TQFont& font ) { backupFont = font; - for ( int i=0; operatorTable[i].unicode != 0; ++i ) { - names[TQChar( operatorTable[i].unicode )] = get_name( operatorTable[i] ); - entries[get_name( operatorTable[i] )] = TQChar( operatorTable[i].unicode ); + for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { + names[TQChar( operatorTable[i].tqunicode )] = get_name( operatorTable[i] ); + entries[get_name( operatorTable[i] )] = TQChar( operatorTable[i].tqunicode ); } - for ( int i=0; arrowTable[i].unicode != 0; ++i ) { - names[TQChar( arrowTable[i].unicode )] = get_name( arrowTable[i] ); - entries[get_name( arrowTable[i] )] = TQChar( arrowTable[i].unicode ); + for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { + names[TQChar( arrowTable[i].tqunicode )] = get_name( arrowTable[i] ); + entries[get_name( arrowTable[i] )] = TQChar( arrowTable[i].tqunicode ); } - for ( int i=0; greekTable[i].unicode != 0; ++i ) { - names[TQChar( greekTable[i].unicode )] = get_name( greekTable[i] ); - entries[get_name( greekTable[i] )] = TQChar( greekTable[i].unicode ); + for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { + names[TQChar( greekTable[i].tqunicode )] = get_name( greekTable[i] ); + entries[get_name( greekTable[i] )] = TQChar( greekTable[i].tqunicode ); } } @@ -85,7 +85,7 @@ bool SymbolTable::contains(TQString name) const return entries.find( name ) != entries.end(); } -TQChar SymbolTable::unicode(TQString name) const +TQChar SymbolTable::tqunicode(TQString name) const { return entries[ name ]; } @@ -112,9 +112,9 @@ CharClass SymbolTable::charClass( TQChar symbol ) const } -TQChar SymbolTable::unicodeFromSymbolFont( TQChar pos ) const +TQChar SymbolTable::tqunicodeFromSymbolFont( TQChar pos ) const { - return symbolFontHelper.unicodeFromSymbolFont( pos ); + return symbolFontHelper.tqunicodeFromSymbolFont( pos ); } @@ -128,13 +128,13 @@ TQStringList SymbolTable::allNames() const { TQStringList list; - for ( int i=0; operatorTable[i].unicode != 0; ++i ) { + for ( int i=0; operatorTable[i].tqunicode != 0; ++i ) { list.append( get_name( operatorTable[i] )); } - for ( int i=0; arrowTable[i].unicode != 0; ++i ) { + for ( int i=0; arrowTable[i].tqunicode != 0; ++i ) { list.append( get_name( arrowTable[i] )); } - for ( int i=0; greekTable[i].unicode != 0; ++i ) { + for ( int i=0; greekTable[i].tqunicode != 0; ++i ) { list.append( get_name( greekTable[i] ) ); } return list; @@ -144,7 +144,7 @@ TQStringList SymbolTable::allNames() const TQString SymbolTable::get_name( struct UnicodeNameTable entry ) const { if ( !*entry.name ) { - return "U" + TQString( "%1" ).arg( entry.unicode, 4, 16 ).upper(); + return "U" + TQString( "%1" ).tqarg( entry.tqunicode, 4, 16 ).upper(); } return entry.name; } diff --git a/lib/kformula/symboltable.h b/lib/kformula/symboltable.h index 7820af81..d4a19f03 100644 --- a/lib/kformula/symboltable.h +++ b/lib/kformula/symboltable.h @@ -51,14 +51,14 @@ public: TQString greekLetters() const { return greek; } /** - * @returns the unicode value of the symbol font char. + * @returns the tqunicode value of the symbol font char. */ - TQChar unicodeFromSymbolFont( TQChar pos ) const; + TQChar tqunicodeFromSymbolFont( TQChar pos ) const; private: /** - * symbol font char -> unicode mapping. + * symbol font char -> tqunicode mapping. */ TQMap<TQChar, TQChar> compatibility; @@ -91,7 +91,7 @@ public: * @returns the char in the symbol font that belongs to * the given name. */ - TQChar unicode( TQString name ) const; + TQChar tqunicode( TQString name ) const; TQString name( TQChar symbol ) const; TQFont font( TQChar symbol, const TQFont& f ) const; @@ -104,9 +104,9 @@ public: TQString greekLetters() const; /** - * @returns the unicode value of the symbol font char. + * @returns the tqunicode value of the symbol font char. */ - TQChar unicodeFromSymbolFont( TQChar pos ) const; + TQChar tqunicodeFromSymbolFont( TQChar pos ) const; /** * @returns all known names as strings. @@ -121,12 +121,12 @@ private: TQString get_name( UnicodeNameTable entry ) const; /** - * unicode -> name mapping. + * tqunicode -> name mapping. */ NameTable names; /** - * Name -> unicode mapping. + * Name -> tqunicode mapping. */ EntryTable entries; diff --git a/lib/kformula/textelement.cc b/lib/kformula/textelement.cc index 7f146b49..c9826429 100644 --- a/lib/kformula/textelement.cc +++ b/lib/kformula/textelement.cc @@ -66,7 +66,7 @@ TokenType TextElement::getTokenType() const return getSymbolTable().charClass( character ); } - switch ( character.unicode() ) { + switch ( character.tqunicode() ) { case '+': case '-': case '*': @@ -106,7 +106,7 @@ bool TextElement::isInvisible() const /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ void TextElement::calcSizes( const ContextStyle& context, ContextStyle::TextStyle tstyle, @@ -155,7 +155,7 @@ void TextElement::calcSizes( const ContextStyle& context, } /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -202,7 +202,7 @@ void TextElement::draw( TQPainter& painter, const LuPixelRect& /*r*/, ElementType* token = getElementType(); if ( ( token != 0 ) && !symbol ) { TQString text = token->text( static_cast<SequenceElement*>( getParent() ) ); -// kdDebug() << "draw text: " << text[0].unicode() +// kdDebug() << "draw text: " << text[0].tqunicode() // << " " << painter.font().family().latin1() // << endl; painter.fillRect( context.layoutUnitToPixelX( parentOrigin.x() ), @@ -401,10 +401,10 @@ bool TextElement::readAttributesFromDom(TQDomElement element) if(!symbolStr.isNull()) { int symbolInt = symbolStr.toInt(); if ( symbolInt == 1 ) { - character = getSymbolTable().unicodeFromSymbolFont(character); + character = getSymbolTable().tqunicodeFromSymbolFont(character); } if ( symbolInt == 2 ) { - switch ( character.unicode() ) { + switch ( character.tqunicode() ) { case 0x03D5: character = 0x03C6; break; case 0x03C6: character = 0x03D5; break; case 0x03Ba: character = 0x03BA; break; diff --git a/lib/kformula/textelement.h b/lib/kformula/textelement.h index 1a64ce80..99b6e63a 100644 --- a/lib/kformula/textelement.h +++ b/lib/kformula/textelement.h @@ -73,7 +73,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -81,7 +81,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -93,7 +93,7 @@ public: const LuPixelPoint& parentOrigin ); /** - * Dispatch this FontCommand to all our TextElement children. + * Dispatch this FontCommand to all our TextElement tqchildren. */ virtual void dispatchFontCommand( FontCommand* cmd ); @@ -123,7 +123,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); @@ -244,7 +244,7 @@ public: /** * Calculates our width and height and - * our children's parentPosition. + * our tqchildren's parentPosition. */ virtual void calcSizes( const ContextStyle& cstyle, ContextStyle::TextStyle tstyle, @@ -252,7 +252,7 @@ public: StyleAttributes& style ); /** - * Draws the whole element including its children. + * Draws the whole element including its tqchildren. * The `parentOrigin' is the point this element's parent starts. * We can use our parentPosition to get our own origin then. */ @@ -266,7 +266,7 @@ public: /** * @returns the latex representation of the element and - * of the element's children + * of the element's tqchildren */ virtual TQString toLatex(); diff --git a/lib/kformula/tokenelement.cc b/lib/kformula/tokenelement.cc index 6addc385..272af51f 100644 --- a/lib/kformula/tokenelement.cc +++ b/lib/kformula/tokenelement.cc @@ -67,7 +67,7 @@ int TokenElement::buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDo kdWarning() << "Invalid entity refererence: " << entity << endl; } else { - TextElement* child = new TextElement( TQChar( pos->unicode ) ); + TextElement* child = new TextElement( TQChar( pos->tqunicode ) ); child->setParent(this); child->setCharFamily( charFamily() ); child->setCharStyle( charStyle() ); @@ -97,7 +97,7 @@ int TokenElement::buildChildrenFromMathMLDom(TQPtrList<BasicElement>& list, TQDo n = n.nextSibling(); } // parse(); - kdWarning() << "Num of children " << list.count() << endl; + kdWarning() << "Num of tqchildren " << list.count() << endl; return 1; } diff --git a/lib/kformula/tokenstyleelement.cc b/lib/kformula/tokenstyleelement.cc index fcce16e7..c8e4799f 100644 --- a/lib/kformula/tokenstyleelement.cc +++ b/lib/kformula/tokenstyleelement.cc @@ -344,13 +344,13 @@ void TokenStyleElement::writeMathMLAttributes( TQDomElement& element ) const // mathsize attribute switch ( m_mathSizeType ) { case AbsoluteSize: - element.setAttribute( "mathsize", TQString( "%1pt" ).arg( m_mathSize ) ); + element.setAttribute( "mathsize", TQString( "%1pt" ).tqarg( m_mathSize ) ); break; case RelativeSize: - element.setAttribute( "mathsize", TQString( "%1%" ).arg( m_mathSize * 100.0 ) ); + element.setAttribute( "mathsize", TQString( "%1%" ).tqarg( m_mathSize * 100.0 ) ); break; case PixelSize: - element.setAttribute( "mathsize", TQString( "%1px" ).arg( m_mathSize ) ); + element.setAttribute( "mathsize", TQString( "%1px" ).tqarg( m_mathSize ) ); break; default: break; @@ -370,13 +370,13 @@ void TokenStyleElement::writeMathMLAttributes( TQDomElement& element ) const // fontsize attribute switch ( m_fontSizeType ) { case AbsoluteSize: - element.setAttribute( "fontsize", TQString( "%1pt" ).arg( m_fontSize ) ); + element.setAttribute( "fontsize", TQString( "%1pt" ).tqarg( m_fontSize ) ); break; case RelativeSize: - element.setAttribute( "fontsize", TQString( "%1%" ).arg( m_fontSize * 100.0 ) ); + element.setAttribute( "fontsize", TQString( "%1%" ).tqarg( m_fontSize * 100.0 ) ); break; case PixelSize: - element.setAttribute( "fontsize", TQString( "%3px" ).arg( m_fontSize ) ); + element.setAttribute( "fontsize", TQString( "%3px" ).tqarg( m_fontSize ) ); break; default: break; diff --git a/lib/kformula/unicodetable.cc b/lib/kformula/unicodetable.cc index 23dc8636..ad9a7f74 100644 --- a/lib/kformula/unicodetable.cc +++ b/lib/kformula/unicodetable.cc @@ -19,7 +19,7 @@ KFORMULA_NAMESPACE_BEGIN -struct UnicodeNameTable { short unicode; const char* name; }; +struct UnicodeNameTable { short tqunicode; const char* name; }; static UnicodeNameTable greekTable[] = { { 0x03B1, "alpha" }, diff --git a/lib/kofficecore/KoApplication.cpp b/lib/kofficecore/KoApplication.cpp index a4cfcc14..d127f444 100644 --- a/lib/kofficecore/KoApplication.cpp +++ b/lib/kofficecore/KoApplication.cpp @@ -180,10 +180,10 @@ bool KoApplication::start() paths = KGlobal::dirs()->findAllResources("data", appName +"/templates/" + desktopName ); } if ( paths.isEmpty()) { - KMessageBox::error(0L, i18n("No template found for: %1 ").arg(desktopName) ); + KMessageBox::error(0L, i18n("No template found for: %1 ").tqarg(desktopName) ); delete shell; } else if ( paths.count() > 1 ) { - KMessageBox::error(0L, i18n("Too many templates found for: %1").arg(desktopName) ); + KMessageBox::error(0L, i18n("Too many templates found for: %1").tqarg(desktopName) ); delete shell; } } @@ -203,7 +203,7 @@ bool KoApplication::start() kdDebug(30003) << "Template loaded..." << endl; n++; } else { - KMessageBox::error(0L, i18n("Template %1 failed to load.").arg(templateURL.prettyURL()) ); + KMessageBox::error(0L, i18n("Template %1 failed to load.").tqarg(templateURL.prettyURL()) ); delete shell; } } diff --git a/lib/kofficecore/KoApplicationIface.cc b/lib/kofficecore/KoApplicationIface.cc index 3348e873..042a39a8 100644 --- a/lib/kofficecore/KoApplicationIface.cc +++ b/lib/kofficecore/KoApplicationIface.cc @@ -45,7 +45,7 @@ DCOPRef KoApplicationIface::createDocument( const TQString &nativeFormat ) KoDocumentEntry entry = KoDocumentEntry::queryByMimeType( nativeFormat ); if ( entry.isEmpty() ) { - KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).arg( nativeFormat ) ); + KMessageBox::questionYesNo( 0, i18n( "Unknown KOffice MimeType %s. Check your installation." ).tqarg( nativeFormat ) ); return DCOPRef(); } KoDocument* doc = entry.createDoc( 0 ); diff --git a/lib/kofficecore/KoChild.cpp b/lib/kofficecore/KoChild.cpp index c78ee70f..41dfee8f 100644 --- a/lib/kofficecore/KoChild.cpp +++ b/lib/kofficecore/KoChild.cpp @@ -34,7 +34,7 @@ public: { } - TQRect m_geometry; + TQRect m_tqgeometry; double m_rotation; double m_shearX; @@ -74,14 +74,14 @@ void KoChild::setGeometry( const TQRect &rect, bool noEmit ) if ( !d->m_lock ) d->m_old = framePointArray(); - d->m_geometry = rect; + d->m_tqgeometry = rect; // Embedded objects should have a minimum size of 3, so they can be selected - if( d->m_geometry.width() < 3 ) - d->m_geometry.setWidth( 3 ); + if( d->m_tqgeometry.width() < 3 ) + d->m_tqgeometry.setWidth( 3 ); - if( d->m_geometry.height() < 3 ) - d->m_geometry.setHeight( 3 ); + if( d->m_tqgeometry.height() < 3 ) + d->m_tqgeometry.setHeight( 3 ); updateMatrix(); @@ -89,9 +89,9 @@ void KoChild::setGeometry( const TQRect &rect, bool noEmit ) emit changed( this ); } -TQRect KoChild::geometry() const +TQRect KoChild::tqgeometry() const { - return d->m_geometry; + return d->m_tqgeometry; } TQRegion KoChild::region( const TQWMatrix &matrix ) const @@ -101,7 +101,7 @@ TQRegion KoChild::region( const TQWMatrix &matrix ) const TQPointArray KoChild::pointArray( const TQWMatrix &matrix ) const { - return pointArray( TQRect( 0, 0, d->m_geometry.width(), d->m_geometry.height() ), matrix ); + return pointArray( TQRect( 0, 0, d->m_tqgeometry.width(), d->m_tqgeometry.height() ), matrix ); } //bool KoChild::contains( const TQPoint &point ) const @@ -123,9 +123,9 @@ void KoChild::setClipRegion( TQPainter &painter, bool combine ) { painter.setClipping( true ); if ( combine && !painter.clipRegion().isEmpty() ) - painter.setClipRegion( region( painter.worldMatrix() ).intersect( painter.clipRegion() ) ); + painter.setClipRegion( region( painter.tqworldMatrix() ).intersect( painter.clipRegion() ) ); else - painter.setClipRegion( region( painter.worldMatrix() ) ); + painter.setClipRegion( region( painter.tqworldMatrix() ) ); } void KoChild::setScaling( double x, double y ) @@ -218,7 +218,7 @@ void KoChild::transform( TQPainter &painter ) { setClipRegion( painter, true ); - TQWMatrix m = painter.worldMatrix(); + TQWMatrix m = painter.tqworldMatrix(); m = d->m_matrix * m; m.scale( d->m_scaleX, d->m_scaleY ); painter.setWorldMatrix( m ); @@ -232,13 +232,13 @@ void KoChild::setContentsPos( int x, int y ) TQRect KoChild::contentRect() const { - return TQRect( d->m_contentsX, d->m_contentsY, int(d->m_geometry.width() / d->m_scaleX), - int(d->m_geometry.height() / d->m_scaleY) ); + return TQRect( d->m_contentsX, d->m_contentsY, int(d->m_tqgeometry.width() / d->m_scaleX), + int(d->m_tqgeometry.height() / d->m_scaleY) ); } TQPointArray KoChild::framePointArray( const TQWMatrix &matrix ) const { - return pointArray( TQRect( -6, -6, d->m_geometry.width() + 12, d->m_geometry.height() + 12 ), matrix ); + return pointArray( TQRect( -6, -6, d->m_tqgeometry.width() + 12, d->m_tqgeometry.height() + 12 ), matrix ); } TQRegion KoChild::frameRegion( const TQWMatrix &matrix, bool solid ) const @@ -281,7 +281,7 @@ void KoChild::updateMatrix() TQWMatrix m; m.rotate( d->m_rotation ); - m.translate( -d->m_rotationPoint.x() + d->m_geometry.x(), -d->m_rotationPoint.y() + d->m_geometry.y() ); + m.translate( -d->m_rotationPoint.x() + d->m_tqgeometry.x(), -d->m_rotationPoint.y() + d->m_tqgeometry.y() ); m.translate( p.x(), p.y() ); m.shear( d->m_shearX, d->m_shearY ); @@ -343,21 +343,21 @@ KoChild::Gadget KoChild::gadgetHitTest( const TQPoint &p ) if ( TQRegion( pointArray( TQRect( -5, -5, 5, 5 ) ) ).contains( p ) ) return TopLeft; - if ( TQRegion( pointArray( TQRect( d->m_geometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, -5, 5, 5 ) ) ).contains( p ) ) return TopMid; - if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), -5, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), -5, 5, 5 ) ) ).contains( p ) ) return TopRight; - if ( TQRegion( pointArray( TQRect( -5, d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) return MidLeft; - if ( TQRegion( pointArray( TQRect( -5, d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( -5, d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomLeft; - if ( TQRegion( pointArray( TQRect( d->m_geometry.width() / 2 - 3, - d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width() / 2 - 3, + d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomMid; - if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), d->m_geometry.height(), 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), d->m_tqgeometry.height(), 5, 5 ) ) ).contains( p ) ) return BottomRight; - if ( TQRegion( pointArray( TQRect( d->m_geometry.width(), - d->m_geometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) + if ( TQRegion( pointArray( TQRect( d->m_tqgeometry.width(), + d->m_tqgeometry.height() / 2 - 3, 5, 5 ) ) ).contains( p ) ) return MidRight; return Move; diff --git a/lib/kofficecore/KoChild.h b/lib/kofficecore/KoChild.h index fe345e2e..b7285deb 100644 --- a/lib/kofficecore/KoChild.h +++ b/lib/kofficecore/KoChild.h @@ -24,7 +24,7 @@ #include <koffice_export.h> /** - * KoChild is an abstract base class that represents the geometry + * KoChild is an abstract base class that represents the tqgeometry * associated with an embedded document. In general it handles its position * relative to the embedded document's parent. * @@ -60,7 +60,7 @@ public: virtual ~KoChild(); /** - * Sets a new geometry for this child document. + * Sets a new tqgeometry for this child document. * Use noEmit = true if you do not want the 'changed'-signal to be emitted */ void setGeometry( const TQRect &rect, bool noEmit = false ); @@ -74,7 +74,7 @@ public: * * @see #setGeometry */ - TQRect geometry() const; + TQRect tqgeometry() const; /** * @return the region of this child part relative to the @@ -189,10 +189,10 @@ public: /** * @return the contents rectangle that is visible. - * This value depends on the scaling and the geometry. + * This value depends on the scaling and the tqgeometry. * This is the value that is passed to KoDocument::paintContent. * - * @see #xScaling #geometry + * @see #xScaling #tqgeometry */ virtual TQRect contentRect() const; @@ -204,7 +204,7 @@ public: virtual TQRegion frameRegion( const TQWMatrix& matrix = TQWMatrix(), bool solid = false ) const; /** - * @return the frame geometry including a border (6 pixels) as a point + * @return the frame tqgeometry including a border (6 pixels) as a point * array with 4 points, one for each corner, transformed by given matrix. */ virtual TQPointArray framePointArray( const TQWMatrix &matrix = TQWMatrix() ) const; @@ -234,11 +234,11 @@ public: void unlock(); /** - * If the child is locked, geometry changes + * If the child is locked, tqgeometry changes * (including scaling, rotation, ...) are not backed up. * * As long as this child is locked, the backed up - * geometry state can be recovered with oldPointArray. + * tqgeometry state can be recovered with oldPointArray. * * @return true when this child is locked. * @@ -247,7 +247,7 @@ public: bool locked() const; /** - * @return the backed up geometry transformed by given matrix. + * @return the backed up tqgeometry transformed by given matrix. */ virtual TQPointArray oldPointArray( const TQWMatrix &matrix ); diff --git a/lib/kofficecore/KoContainerHandler.cpp b/lib/kofficecore/KoContainerHandler.cpp index ae4dbeab..bd4bb489 100644 --- a/lib/kofficecore/KoContainerHandler.cpp +++ b/lib/kofficecore/KoContainerHandler.cpp @@ -47,7 +47,7 @@ public: KoChild::Gadget gadget, const TQPoint& point ) : m_gadget(gadget), m_view(view), m_child(child), m_parentMatrix(matrix) { - m_geometryStart = child->geometry(); + m_geometryStart = child->tqgeometry(); m_matrix = child->matrix() * matrix; m_invertParentMatrix = matrix.invert(); @@ -84,11 +84,11 @@ KoPartResizeHandler::~KoPartResizeHandler() d=0L; } -void KoPartResizeHandler::repaint(TQRegion &rgn) +void KoPartResizeHandler::tqrepaint(TQRegion &rgn) { rgn = rgn.unite( d->m_child->frameRegion( d->m_parentMatrix, true ) ); // rgn.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset()); - ((TQWidget*)target())->repaint( rgn ); + ((TQWidget*)target())->tqrepaint( rgn ); } bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) @@ -128,7 +128,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y() + y, d->m_geometryStart.width() - x, d->m_geometryStart.height() - y ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::TopMid: @@ -137,7 +137,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y, d->m_geometryStart.width(), d->m_geometryStart.height() - y ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::TopRight: @@ -147,7 +147,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y() + y, d->m_geometryStart.width() + x, d->m_geometryStart.height() - y ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::MidLeft: @@ -156,7 +156,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(), d->m_geometryStart.width() - x, d->m_geometryStart.height() ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::MidRight: @@ -165,7 +165,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width() + x, d->m_geometryStart.height() ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::BottomLeft: @@ -175,7 +175,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x() + x, d->m_geometryStart.y(), d->m_geometryStart.width() - x, d->m_geometryStart.height() + y ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::BottomMid: @@ -184,7 +184,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width(), d->m_geometryStart.height() + y ) ); - repaint(rgn); + tqrepaint(rgn); } break; case KoChild::BottomRight: @@ -194,7 +194,7 @@ bool KoPartResizeHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_child->setGeometry( TQRect( d->m_geometryStart.x(), d->m_geometryStart.y(), d->m_geometryStart.width() + x, d->m_geometryStart.height() + y ) ); - repaint(rgn); + tqrepaint(rgn); } break; default: @@ -214,7 +214,7 @@ public: m_parentMatrix(matrix) { m_invertParentMatrix = matrix.invert(); m_mouseDragStart = m_invertParentMatrix.map( point ); - m_geometryDragStart = m_dragChild->geometry(); + m_geometryDragStart = m_dragChild->tqgeometry(); m_rotationDragStart = m_dragChild->rotationPoint(); } ~KoPartMoveHandlerPrivate() {} @@ -263,7 +263,7 @@ bool KoPartMoveHandler::eventFilter( TQObject*, TQEvent* ev ) d->m_rotationDragStart.y() + pos.y() - d->m_mouseDragStart.y() ) ); bound = bound.unite( d->m_dragChild->frameRegion( d->m_parentMatrix, false ) ); // bound.translate(- d->m_view->canvasXOffset(), - d->m_view->canvasYOffset()); - ((TQWidget*)target())->repaint( bound ); + ((TQWidget*)target())->tqrepaint( bound ); return true; } diff --git a/lib/kofficecore/KoContainerHandler.h b/lib/kofficecore/KoContainerHandler.h index 0187128d..0ea9ba35 100644 --- a/lib/kofficecore/KoContainerHandler.h +++ b/lib/kofficecore/KoContainerHandler.h @@ -68,7 +68,7 @@ public: ~KoPartResizeHandler(); protected: - void repaint(TQRegion &rgn); + void tqrepaint(TQRegion &rgn); bool eventFilter( TQObject*, TQEvent* ); private: diff --git a/lib/kofficecore/KoDetailsPane.cpp b/lib/kofficecore/KoDetailsPane.cpp index 51fd1111..ecbd496f 100644 --- a/lib/kofficecore/KoDetailsPane.cpp +++ b/lib/kofficecore/KoDetailsPane.cpp @@ -24,7 +24,7 @@ #include <tqimage.h> #include <tqheader.h> #include <tqrect.h> -#include <brush.h> +#include <tqbrush.h> #include <tqpainter.h> #include <tqsimplerichtext.h> #include <tqevent.h> @@ -296,7 +296,7 @@ KoRecentDocumentsPane::KoRecentDocumentsPane(TQWidget* parent, KInstance* instan fileList.setAutoDelete(false); do { - TQString key = TQString("File%1").arg(i); + TQString key = TQString("File%1").tqarg(i); value = instance->config()->readPathEntry(key); if(!value.isEmpty()) { @@ -369,9 +369,9 @@ void KoRecentDocumentsPane::selectionChanged(TQListViewItem* item) KFileItem* fileItem = static_cast<KoFileListItem*>(item)->fileItem(); TQString details = "<center><table border=\"0\">"; details += i18n("File modification date and time. %1 is date time", "<tr><td><b>Modified:</b></td><td>%1</td></tr>") - .arg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME)); + .tqarg(fileItem->timeString(KIO::UDS_MODIFICATION_TIME)); details += i18n("File access date and time. %1 is date time", "<tr><td><b>Accessed:</b></td><td>%1</td></tr>") - .arg(fileItem->timeString(KIO::UDS_ACCESS_TIME)); + .tqarg(fileItem->timeString(KIO::UDS_ACCESS_TIME)); details += "</table></center>"; m_detailsLabel->setText(details); } else { diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp index eab229e3..ba3c9d54 100644 --- a/lib/kofficecore/KoDocument.cpp +++ b/lib/kofficecore/KoDocument.cpp @@ -59,7 +59,7 @@ #include <tqpainter.h> #include <tqtimer.h> #include <tqxml.h> -#include <layout.h> +#include <tqlayout.h> #include <config.h> #include <assert.h> @@ -120,7 +120,7 @@ public: } TQPtrList<KoView> m_views; - TQPtrList<KoDocumentChild> m_children; + TQPtrList<KoDocumentChild> m_tqchildren; TQPtrList<KoMainWindow> m_shells; TQValueList<TQDomDocument> m_viewBuildDocuments; @@ -271,7 +271,7 @@ KoDocument::~KoDocument() { d->m_autoSaveTimer.stop(); - TQPtrListIterator<KoDocumentChild> childIt( d->m_children ); + TQPtrListIterator<KoDocumentChild> childIt( d->m_tqchildren ); for (; childIt.current(); ++childIt ) disconnect( childIt.current(), TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotChildDestroyed() ) ); @@ -285,8 +285,8 @@ KoDocument::~KoDocument() delete d->m_startUpWidget; d->m_startUpWidget = 0; - d->m_children.setAutoDelete( true ); - d->m_children.clear(); + d->m_tqchildren.setAutoDelete( true ); + d->m_tqchildren.clear(); d->m_shells.setAutoDelete( true ); d->m_shells.clear(); @@ -401,7 +401,7 @@ bool KoDocument::saveFile() backup = url(); else backup = d->m_backupPath +"/"+url().fileName(); - backup.setPath( backup.path() + TQString::fromLatin1("~") ); + backup.setPath( backup.path() + TQString::tqfromLatin1("~") ); KFileItem item( entry, url() ); Q_ASSERT( item.name() == url().fileName() ); KIO::NetAccess::file_copy( url(), backup, item.permissions(), true /*overwrite*/, false /*resume*/, shells().current() ); @@ -418,7 +418,7 @@ bool KoDocument::saveFile() if ( !d->filterManager ) d->filterManager = new KoFilterManager( this ); - KoFilter::ConversionStatus status = d->filterManager->exp0rt( m_file, outputMimeType ); + KoFilter::ConversiontqStatus status = d->filterManager->exp0rt( m_file, outputMimeType ); ret = status == KoFilter::OK; suppressErrorDialog = (status == KoFilter::UserCancelled || status == KoFilter::BadConversionGraph ); } else { @@ -591,7 +591,7 @@ void KoDocument::setManager( KParts::PartManager *manager ) if ( manager ) { - TQPtrListIterator<KoDocumentChild> it( d->m_children ); + TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); for (; it.current(); ++it ) if ( it.current()->document() ) manager->addPart( it.current()->document(), false ); @@ -606,7 +606,7 @@ void KoDocument::setReadWrite( bool readwrite ) for (; vIt.current(); ++vIt ) vIt.current()->updateReadWrite( readwrite ); - TQPtrListIterator<KoDocumentChild> dIt( d->m_children ); + TQPtrListIterator<KoDocumentChild> dIt( d->m_tqchildren ); for (; dIt.current(); ++dIt ) if ( dIt.current()->document() ) dIt.current()->document()->setReadWrite( readwrite ); @@ -651,7 +651,7 @@ void KoDocument::insertChild( KoDocumentChild *child ) { setModified( true ); - d->m_children.append( child ); + d->m_tqchildren.append( child ); connect( child, TQT_SIGNAL( changed( KoChild * ) ), this, TQT_SLOT( slotChildChanged( KoChild * ) ) ); @@ -681,12 +681,12 @@ void KoDocument::slotChildDestroyed() setModified( true ); const KoDocumentChild *child = static_cast<const KoDocumentChild *>( sender() ); - d->m_children.removeRef( child ); + d->m_tqchildren.removeRef( child ); } -const TQPtrList<KoDocumentChild>& KoDocument::children() const +const TQPtrList<KoDocumentChild>& KoDocument::tqchildren() const { - return d->m_children; + return d->m_tqchildren; } KParts::Part *KoDocument::hitTest( TQWidget *widget, const TQPoint &globalPos ) @@ -718,7 +718,7 @@ KoView* KoDocument::hitTestView() KoDocument* KoDocument::hitTest( const TQPoint &pos, const TQWMatrix &matrix ) { // Call KoDocumentChild::hitTest for any child document - TQPtrListIterator<KoDocumentChild> it( d->m_children ); + TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); for (; it.current(); ++it ) { KoDocument *doc = it.current()->hitTest( pos, matrix ); @@ -732,7 +732,7 @@ KoDocument* KoDocument::hitTest( const TQPoint &pos, const TQWMatrix &matrix ) KoDocumentChild *KoDocument::child( KoDocument *doc ) { - TQPtrListIterator<KoDocumentChild> it( d->m_children ); + TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); for (; it.current(); ++it ) if ( it.current()->document() == doc ) return it.current(); @@ -786,7 +786,7 @@ void KoDocument::paintEverything( TQPainter &painter, const TQRect &rect, bool t void KoDocument::paintChildren( TQPainter &painter, const TQRect &/*rect*/, KoView *view, double zoomX, double zoomY ) { - TQPtrListIterator<KoDocumentChild> it( d->m_children ); + TQPtrListIterator<KoDocumentChild> it( d->m_tqchildren ); for (; it.current(); ++it ) { // #### todo: paint only if child is visible inside rect @@ -863,8 +863,8 @@ bool KoDocument::isModified() const //kdDebug(30003)<<k_funcinfo<<" Modified doc='"<<url().url()<<"' extern="<<isStoredExtern()<<endl; return true; } - // Then go through internally stored children (considered to be part of this doc) - TQPtrListIterator<KoDocumentChild> it = children(); + // Then go through internally stored tqchildren (considered to be part of this doc) + TQPtrListIterator<KoDocumentChild> it = tqchildren(); for (; it.current(); ++it ) { KoDocument *doc = it.current()->document(); @@ -876,9 +876,9 @@ bool KoDocument::isModified() const bool KoDocument::saveChildren( KoStore* _store ) { - //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; int i = 0; - TQPtrListIterator<KoDocumentChild> it( children() ); + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for( ; it.current(); ++it ) { KoDocument* childDoc = it.current()->document(); if (childDoc && !it.current()->isDeleted()) @@ -900,8 +900,8 @@ bool KoDocument::saveChildren( KoStore* _store ) bool KoDocument::saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter ) { - //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; - TQPtrListIterator<KoDocumentChild> it( children() ); + //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for( ; it.current(); ++it ) { KoDocument* childDoc = it.current()->document(); if ( childDoc && !it.current()->isDeleted() ) @@ -924,9 +924,9 @@ bool KoDocument::saveExternalChildren() return true; } - //kdDebug(30003)<<k_funcinfo<<" checking children of doc='"<<url().url()<<"'"<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking tqchildren of doc='"<<url().url()<<"'"<<endl; KoDocumentChild *ch; - TQPtrListIterator<KoDocumentChild> it = children(); + TQPtrListIterator<KoDocumentChild> it = tqchildren(); for (; (ch = it.current()); ++it ) { if ( !ch->isDeleted() ) @@ -935,7 +935,7 @@ bool KoDocument::saveExternalChildren() if ( doc && doc->isStoredExtern() && doc->isModified() ) { kdDebug(30003)<<" save external doc='"<<url().url()<<"'"<<endl; - doc->setDoNotSaveExtDoc(); // Only save doc + it's internal children + doc->setDoNotSaveExtDoc(); // Only save doc + it's internal tqchildren if ( !doc->save() ) return false; // error } @@ -1031,7 +1031,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "meta.xml" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "meta.xml" ); delete store; return false; } @@ -1039,7 +1039,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) if ( store->open( "Thumbnails/thumbnail.png" ) ) { if ( !saveOasisPreview( store, manifestWriter ) || !store->close() ) { - d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" ); + d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" ); delete store; return false; } @@ -1047,7 +1047,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "Thumbnails/thumbnail.png" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "Thumbnails/thumbnail.png" ); delete store; return false; } @@ -1055,7 +1055,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) // Write out manifest file if ( !oasisStore.closeManifestWriter() ) { - d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).arg( "META-INF/manifest.xml" ); + d->lastErrorMessage = i18n( "Error while trying to write '%1'. Partition full?" ).tqarg( "META-INF/manifest.xml" ); delete store; return false; } @@ -1064,7 +1064,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - // Save internal children first since they might get a new url + // Save internal tqchildren first since they might get a new url if ( !saveChildren( store ) && !oasis ) { if ( d->lastErrorMessage.isEmpty() ) @@ -1086,7 +1086,7 @@ bool KoDocument::saveNativeFormat( const TQString & file ) } else { - d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).arg( "maindoc.xml" ); + d->lastErrorMessage = i18n( "Not able to write '%1'. Partition full?" ).tqarg( "maindoc.xml" ); delete store; return false; } @@ -1146,7 +1146,7 @@ bool KoDocument::saveToStore( KoStore* _store, const TQString & _path ) else // ugly hack to pass a relative URI m_url = KURL( INTERNAL_PREFIX + _path ); - // To make the children happy cd to the correct directory + // To make the tqchildren happy cd to the correct directory _store->pushDirectory(); _store->enterDirectory( _path ); @@ -1222,7 +1222,7 @@ TQPixmap KoDocument::generatePreview( const TQSize& size ) docHeight = m_pageLayout.ptHeight / 72 * KoGlobal::dpiY(); } else { - // If we don't have a page layout, just draw the top left hand corner + // If we don't have a page tqlayout, just draw the top left hand corner docWidth = 500.0; docHeight = 500.0; } @@ -1274,7 +1274,7 @@ TQString KoDocument::autoSaveFile( const TQString & path ) const // Never saved? Use a temp file in $HOME then // Yes, two open unnamed docs will overwrite each other's autosave file, // but hmm, we can only do something if that's in the same process anyway... - TQString ret = TQDir::homeDirPath() + "/." + TQString::fromLatin1(instance()->instanceName()) + ".autosave" + extension; + TQString ret = TQDir::homeDirPath() + "/." + TQString::tqfromLatin1(instance()->instanceName()) + ".autosave" + extension; return ret; } else @@ -1297,7 +1297,7 @@ bool KoDocument::checkAutoSaveFile() TQString dateStr = date.toString(Qt::LocalDate); int res = KMessageBox::warningYesNoCancel( 0, i18n( "An autosaved file for an unnamed document exists in %1.\nThis file is dated %2\nDo you want to open it?" ) - .arg(asf, dateStr) ); + .tqarg(asf, dateStr) ); switch(res) { case KMessageBox::Yes : { KURL url; @@ -1349,7 +1349,7 @@ bool KoDocument::openURL( const KURL & _url ) // Reimplemented, to add a check for autosave files and to improve error reporting if ( !_url.isValid() ) { - d->lastErrorMessage = i18n( "Malformed URL\n%1" ).arg( _url.url() ); // ## used anywhere ? + d->lastErrorMessage = i18n( "Malformed URL\n%1" ).tqarg( _url.url() ); // ## used anywhere ? return false; } if ( !closeURL() ) @@ -1408,7 +1408,7 @@ bool KoDocument::openFile() TQApplication::restoreOverrideCursor(); if ( d->m_autoErrorHandlingEnabled ) // Maybe offer to create a new document with that name ? - KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(m_file) ); + KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(m_file) ); d->m_bLoading = false; return false; } @@ -1456,7 +1456,7 @@ bool KoDocument::openFile() if ( !isNativeFormat( typeName.latin1() ) ) { if ( !d->filterManager ) d->filterManager = new KoFilterManager( this ); - KoFilter::ConversionStatus status; + KoFilter::ConversiontqStatus status; importedFile = d->filterManager->import( m_file, status ); if ( status != KoFilter::OK ) { @@ -1516,7 +1516,7 @@ bool KoDocument::openFile() { TQString errorMsg( i18n( "Could not open\n%2.\nReason: %1" ) ); TQString docUrl = url().prettyURL( 0, KURL::StripFileProtocol ); - KMessageBox::error( 0L, errorMsg.arg(msg).arg(docUrl) ); + KMessageBox::error( 0L, errorMsg.tqarg(msg).tqarg(docUrl) ); } d->m_bLoading = false; @@ -1623,7 +1623,7 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDom if (!store->open(filename)) { kdWarning(30003) << "Entry " << filename << " not found!" << endl; - d->lastErrorMessage = i18n( "Could not find %1" ).arg( filename ); + d->lastErrorMessage = i18n( "Could not find %1" ).tqarg( filename ); return false; } // Error variables for TQDomDocument::setContent @@ -1636,8 +1636,8 @@ bool KoDocument::oldLoadAndParse(KoStore* store, const TQString& filename, TQDom << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; d->lastErrorMessage = i18n( "Parsing error in %1 at line %2, column %3\nError message: %4" ) - .arg( filename ).arg( errorLine ).arg( errorColumn ) - .arg( i18n ( "TQXml", errorMsg.utf8() ) ); + .tqarg( filename ).tqarg( errorLine ).tqarg( errorColumn ) + .tqarg( i18n ( "TQXml", errorMsg.utf8() ) ); store->close(); return false; } @@ -1650,12 +1650,12 @@ bool KoDocument::loadNativeFormat( const TQString & file ) TQFileInfo fileInfo( file ); if ( !fileInfo.exists() ) // check duplicated from openURL, but this is useful for templates { - d->lastErrorMessage = i18n("The file %1 does not exist.").arg(file); + d->lastErrorMessage = i18n("The file %1 does not exist.").tqarg(file); return false; } if ( !fileInfo.isFile() ) { - d->lastErrorMessage = i18n( "%1 is not a file." ).arg(file); + d->lastErrorMessage = i18n( "%1 is not a file." ).tqarg(file); return false; } @@ -1733,7 +1733,7 @@ bool KoDocument::loadNativeFormat( const TQString & file ) << " Line: " << errorLine << " Column: " << errorColumn << endl << " Message: " << errorMsg << endl; d->lastErrorMessage = i18n( "parsing error in the main document at line %1, column %2\nError message: %3" ) - .arg( errorLine ).arg( errorColumn ).arg( i18n ( errorMsg.utf8() ) ); + .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( errorMsg.utf8() ) ); res=false; } @@ -1756,7 +1756,7 @@ bool KoDocument::loadNativeFormatFromStore( const TQString& file ) if ( store->bad() ) { - d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).arg( file ); + d->lastErrorMessage = i18n( "Not a valid KOffice file: %1" ).tqarg( file ); delete store; TQApplication::restoreOverrideCursor(); return false; @@ -1795,7 +1795,7 @@ bool KoDocument::loadNativeFormatFromStore( const TQString& file ) if ( !loadChildren( store ) ) { - kdError(30003) << "ERROR: Could not load children" << endl; + kdError(30003) << "ERROR: Could not load tqchildren" << endl; // Don't abort, proceed nonetheless } @@ -1865,7 +1865,7 @@ bool KoDocument::loadFromStore( KoStore* _store, const TQString& url ) if ( !loadChildren( _store ) ) { - kdError(30003) << "ERROR: Could not load children" << endl; + kdError(30003) << "ERROR: Could not load tqchildren" << endl; #if 0 return false; #endif @@ -1967,7 +1967,7 @@ void KoDocument::setModified( bool mod ) m_bEmpty = FALSE; } else { // When saving this document, all non-external child documents get saved too. - TQPtrListIterator<KoDocumentChild> it = children(); + TQPtrListIterator<KoDocumentChild> it = tqchildren(); for (; it.current(); ++it ) { KoDocument *doc = it.current()->document(); @@ -2002,7 +2002,7 @@ int KoDocument::queryCloseDia() name = i18n( "Untitled" ); int res = KMessageBox::warningYesNoCancel( 0L, - i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name)); + i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name)); switch(res) { @@ -2023,9 +2023,9 @@ int KoDocument::queryCloseDia() int KoDocument::queryCloseExternalChildren() { - //kdDebug(30003)<<k_funcinfo<<" checking for children in: "<<url().url()<<endl; + //kdDebug(30003)<<k_funcinfo<<" checking for tqchildren in: "<<url().url()<<endl; setDoNotSaveExtDoc(false); - TQPtrListIterator<KoDocumentChild> it( children() ); + TQPtrListIterator<KoDocumentChild> it( tqchildren() ); for (; it.current(); ++it ) { if ( !it.current()->isDeleted() ) @@ -2082,7 +2082,7 @@ void KoDocument::setTitleModified() // Get caption from document info (title(), in about page) if ( documentInfo() ) { - KoDocumentInfoPage * page = documentInfo()->page( TQString::fromLatin1("about") ); + KoDocumentInfoPage * page = documentInfo()->page( TQString::tqfromLatin1("about") ); if (page) caption = static_cast<KoDocumentInfoAbout *>(page)->title(); } @@ -2133,12 +2133,12 @@ TQDomDocument KoDocument::createDomDocument( const TQString& tagName, const TQSt TQDomDocument KoDocument::createDomDocument( const TQString& appName, const TQString& tagName, const TQString& version ) { TQDomImplementation impl; - TQString url = TQString("http://www.koffice.org/DTD/%1-%1.dtd").arg(appName).arg(version); + TQString url = TQString("http://www.koffice.org/DTD/%1-%1.dtd").tqarg(appName).tqarg(version); TQDomDocumentType dtype = impl.createDocumentType( tagName, - TQString("-//KDE//DTD %1 %1//EN").arg(appName).arg(version), + TQString("-//KDE//DTD %1 %1//EN").tqarg(appName).tqarg(version), url ); // The namespace URN doesn't need to include the version number. - TQString namespaceURN = TQString("http://www.koffice.org/DTD/%1").arg(appName); + TQString namespaceURN = TQString("http://www.koffice.org/DTD/%1").tqarg(appName); TQDomDocument doc = impl.createDocument( namespaceURN, tagName, dtype ); doc.insertBefore( doc.createProcessingInstruction( "xml", "version=\"1.0\" encoding=\"UTF-8\"" ), doc.documentElement() ); return doc; @@ -2233,7 +2233,7 @@ KService::Ptr KoDocument::readNativeService( KInstance *instance ) // Try by path first, so that we find the global one (which has the native mimetype) // even if the user created a kword.desktop in ~/.kde/share/applnk or any subdir of it. // If he created it under ~/.kde/share/applnk/Office/ then no problem anyway. - service = KService::serviceByDesktopPath( TQString::fromLatin1("Office/%1.desktop").arg(instname) ); + service = KService::serviceByDesktopPath( TQString::tqfromLatin1("Office/%1.desktop").tqarg(instname) ); } if ( !service ) service = KService::serviceByDesktopName( instname ); @@ -2364,11 +2364,11 @@ void KoDocument::showSavingErrorDialog() { if ( d->lastErrorMessage.isEmpty() ) { - KMessageBox::error( 0L, i18n( "Could not save\n%1" ).arg( m_file ) ); + KMessageBox::error( 0L, i18n( "Could not save\n%1" ).tqarg( m_file ) ); } else if ( d->lastErrorMessage != "USER_CANCELED" ) { - KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).arg( m_file, d->lastErrorMessage ) ); + KMessageBox::error( 0L, i18n( "Could not save %1\nReason: %2" ).tqarg( m_file, d->lastErrorMessage ) ); } } @@ -2376,11 +2376,11 @@ void KoDocument::showLoadingErrorDialog() { if ( d->lastErrorMessage.isEmpty() ) { - KMessageBox::error( 0L, i18n( "Could not open\n%1" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ) ) ); + KMessageBox::error( 0L, i18n( "Could not open\n%1" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ) ) ); } else if ( d->lastErrorMessage != "USER_CANCELED" ) { - KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).arg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) ); + KMessageBox::error( 0L, i18n( "Could not open %1\nReason: %2" ).tqarg( url().prettyURL( 0, KURL::StripFileProtocol ), d->lastErrorMessage ) ); } } @@ -2656,7 +2656,7 @@ bool KoDocument::showEmbedInitDialog(TQWidget* parent) { KDialogBase dlg(parent, "EmbedInitDialog", true, i18n("Embedding Object"), 0, KDialogBase::NoDefault); KoOpenPane* pane = createOpenPane(&dlg, instance(), templateType()); - pane->layout()->setMargin(0); + pane->tqlayout()->setMargin(0); dlg.setMainWidget(pane); dlg.setInitialSize(dlg.configDialogSize("EmbedInitDialog")); connect(this, TQT_SIGNAL(closeEmbedInitDialog()), &dlg, TQT_SLOT(slotOk())); diff --git a/lib/kofficecore/KoDocument.h b/lib/kofficecore/KoDocument.h index 1a5d0805..ac6de7e8 100644 --- a/lib/kofficecore/KoDocument.h +++ b/lib/kofficecore/KoDocument.h @@ -385,7 +385,7 @@ public: * @param painter The painter object onto which will be drawn. * @param rect The rect that should be used in the painter object. * @param transparent If true then the entire rectangle is erased before painting. - * @param view The KoView is needed to fiddle about with the active widget, when painting children. + * @param view The KoView is needed to fiddle about with the active widget, when painting tqchildren. * @param zoomX The zoom value to be applied to X coordinates when painting. * @param zoomY The zoom value to be applied to Y coordinates when painting. */ @@ -399,7 +399,7 @@ public: virtual TQPixmap generatePreview( const TQSize& size ); /** - * Paints all of the documents children into the given painter object. + * Paints all of the documents tqchildren into the given painter object. * * @param painter The painter object onto which will be drawn. * @param rect The rect that should be used in the painter object. @@ -427,7 +427,7 @@ public: /** * Paints the data itself. Normally called by paintEverything(). It does not - * paint the children. + * paint the tqchildren. * It's this method that %KOffice Parts have to implement. * * @param painter The painter object onto which will be drawn. @@ -659,17 +659,17 @@ public: static int defaultAutoSave() { return s_defaultAutoSave; } /** - * @return the list of all children. Do not modify the + * @return the list of all tqchildren. Do not modify the * returned list. */ - const TQPtrList<KoDocumentChild>& children() const; + const TQPtrList<KoDocumentChild>& tqchildren() const; /** * @return the KoDocumentChild associated with the given Document, but only if * @p doc is a direct child of this document. * * This is a convenience function. You could get the same result - * by traversing the list returned by children(). + * by traversing the list returned by tqchildren(). */ KoDocumentChild *child( KoDocument *doc ); @@ -741,7 +741,7 @@ public: virtual bool isStoredExtern() const; /** - * @return the page layout associated with this document (margins, pageSize, etc). + * @return the page tqlayout associated with this document (margins, pageSize, etc). * Override this if you want to provide different sized pages. * * @see KoPageLayout @@ -771,14 +771,14 @@ public: int queryCloseDia(); /** - * @brief Set when we do not want to save external children when saving our 'main' doc. + * @brief Set when we do not want to save external tqchildren when saving our 'main' doc. * - * This makes it possible to save 'main' doc + all its internal children first, then - * go on to save external children. Typically used by query close. + * This makes it possible to save 'main' doc + all its internal tqchildren first, then + * go on to save external tqchildren. Typically used by query close. * Use: * @code * doc->setDoNotSaveExtDoc(); - * doc->save(); // saves doc and its internal children, + * doc->save(); // saves doc and its internal tqchildren, * //also calls saveExternalChildren() which sets setDoNotSaveExtDoc(false) * doc->saveExternalChildren(); * @endcode @@ -1029,7 +1029,7 @@ protected: * * An example implementation may look like this: * @code - * TQPtrListIterator<KoDocumentChild> it( children() ); + * TQPtrListIterator<KoDocumentChild> it( tqchildren() ); * for( ; it.current(); ++it ) * { * if ( !it.current()->loadDocument( _store ) ) @@ -1043,16 +1043,16 @@ protected: virtual bool loadChildren( KoStore* ); /** - * Saves all internal children (only!). - * @see saveExternalChildren if you have external children. + * Saves all internal tqchildren (only!). + * @see saveExternalChildren if you have external tqchildren. * Returns true on success. */ virtual bool saveChildren( KoStore* store ); /** - * Saves all internal children (only!), to the store, using the OASIS format. + * Saves all internal tqchildren (only!), to the store, using the OASIS format. * This is called automatically during saveNativeFormat. - * @see saveExternalChildren if you have external children. + * @see saveExternalChildren if you have external tqchildren. * Returns true on success. */ virtual bool saveChildrenOasis( KoStore* store, KoXmlWriter* manifestWriter ); @@ -1077,7 +1077,7 @@ protected: virtual bool completeSaving( KoStore* store ); /** - * Inserts the new child in the list of children and emits the + * Inserts the new child in the list of tqchildren and emits the * childChanged() signal. * * At the same time this method marks this document as modified. @@ -1098,9 +1098,9 @@ protected: KoPageLayout m_pageLayout; /** - * Saves all externally stored children. + * Saves all externally stored tqchildren. * Returns true on success. - * @see #saveChildren for internal children + * @see #saveChildren for internal tqchildren */ virtual bool saveExternalChildren(); diff --git a/lib/kofficecore/KoDocumentChild.cpp b/lib/kofficecore/KoDocumentChild.cpp index c71c7609..0767ab04 100644 --- a/lib/kofficecore/KoDocumentChild.cpp +++ b/lib/kofficecore/KoDocumentChild.cpp @@ -67,13 +67,13 @@ public: bool m_deleted; }; -KoDocumentChild::KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& geometry ) +KoDocumentChild::KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& tqgeometry ) : KoChild( parent ) { d = new KoDocumentChildPrivate; d->m_parent = parent; d->m_doc = doc; - setGeometry( geometry ); + setGeometry( tqgeometry ); d->m_deleted = false; if ( doc ) doc->setStoreInternal( !doc->hasExternURL() ); @@ -88,11 +88,11 @@ KoDocumentChild::KoDocumentChild( KoDocument* parent ) d->m_deleted = false; } -void KoDocumentChild::setDocument( KoDocument *doc, const TQRect &geometry ) +void KoDocumentChild::setDocument( KoDocument *doc, const TQRect &tqgeometry ) { kdDebug()<<k_funcinfo<<"doc: "<<doc->url().url()<<endl; d->m_doc = doc; - setGeometry( geometry ); + setGeometry( tqgeometry ); updateMatrix(); } @@ -213,7 +213,7 @@ bool KoDocumentChild::loadDocument( KoStore* store ) KMimeType::Ptr mime = KMimeType::mimeType( m_tmpMimeType ); if ( mime->name() != KMimeType::defaultMimeType() ) mimeName = mime->comment(); - d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) ); + d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) ); } return res; } @@ -252,7 +252,7 @@ bool KoDocumentChild::loadOasisDocument( KoStore* store, const TQDomDocument& ma KMimeType::Ptr mime = KMimeType::mimeType( mimeType ); if ( mime->name() != KMimeType::defaultMimeType() ) mimeName = mime->comment(); - d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).arg( mimeName ) ); + d->m_doc->setProperty( "unavailReason", i18n( "No handler found for %1" ).tqarg( mimeName ) ); } return res; } @@ -306,7 +306,7 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr TQApplication::restoreOverrideCursor(); // For security reasons we need to ask confirmation if the url is remote int result = KMessageBox::warningYesNoCancel( - 0, i18n( "This document contains an external link to a remote document\n%1").arg(m_tmpURL), + 0, i18n( "This document contains an external link to a remote document\n%1").tqarg(m_tmpURL), i18n( "Confirmation Required" ), i18n( "Download" ), i18n( "Skip" ) ); if ( result == KMessageBox::Cancel ) @@ -335,9 +335,9 @@ bool KoDocumentChild::loadDocumentInternal( KoStore* store, const KoDocumentEntr d->m_doc->setProperty( "realURL", tmpURL ); // so that it gets saved correctly d->m_doc->setStoreInternal( true ); if ( internalURL ) - d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).arg( errorMessage ) ); + d->m_doc->setProperty( "unavailReason", i18n( "Could not load embedded object:\n%1" ).tqarg( errorMessage ) ); else - d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).arg( tmpURL, errorMessage ) ); + d->m_doc->setProperty( "unavailReason", i18n( "Could not load external document %1:\n%2" ).tqarg( tmpURL, errorMessage ) ); } return res; } @@ -409,7 +409,7 @@ bool KoDocumentChild::saveOasis( KoStore* store, KoXmlWriter* manifestWriter ) } else { - // To make the children happy cd to the correct directory + // To make the tqchildren happy cd to the correct directory store->pushDirectory(); store->enterDirectory( name ); @@ -454,7 +454,7 @@ void KoDocumentChild::saveOasisAttributes( KoXmlWriter &xmlWriter, const TQStrin d->m_doc->setURL( u ); } - //<draw:object draw:style-name="standard" draw:id="1" draw:layer="layout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> + //<draw:object draw:style-name="standard" draw:id="1" draw:layer="tqlayout" svg:width="14.973cm" svg:height="4.478cm" svg:x="11.641cm" svg:y="14.613cm" xlink:href="#./Object 1" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/> xmlWriter.addAttribute( "xlink:type", "simple" ); xmlWriter.addAttribute( "xlink:show", "embed" ); xmlWriter.addAttribute( "xlink:actuate", "onLoad" ); @@ -480,10 +480,10 @@ TQDomElement KoDocumentChild::save( TQDomDocument& doc, bool uppercase ) e.setAttribute( "mime", d->m_doc->nativeFormatMimeType().data() ); kdDebug() << "KoDocumentChild::save mime=" << d->m_doc->nativeFormatMimeType() << endl; TQDomElement rect = doc.createElement( ( uppercase ? "RECT" : "rect" ) ); - rect.setAttribute( "x", geometry().left() ); - rect.setAttribute( "y", geometry().top() ); - rect.setAttribute( "w", geometry().width() ); - rect.setAttribute( "h", geometry().height() ); + rect.setAttribute( "x", tqgeometry().left() ); + rect.setAttribute( "y", tqgeometry().top() ); + rect.setAttribute( "w", tqgeometry().width() ); + rect.setAttribute( "h", tqgeometry().height() ); e.appendChild(rect); return e; } diff --git a/lib/kofficecore/KoDocumentChild.h b/lib/kofficecore/KoDocumentChild.h index 50029cee..de3704c0 100644 --- a/lib/kofficecore/KoDocumentChild.h +++ b/lib/kofficecore/KoDocumentChild.h @@ -45,7 +45,7 @@ class KOFFICECORE_EXPORT KoDocumentChild : public KoChild Q_OBJECT TQ_OBJECT public: - KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& geometry ); + KoDocumentChild( KoDocument* parent, KoDocument* doc, const TQRect& tqgeometry ); /** * When using this constructor you must call @ref #setDocument before @@ -59,7 +59,7 @@ public: * Call this function only directly after calling the constructor * that takes only a parent as argument. */ - virtual void setDocument( KoDocument *doc, const TQRect &geometry ); + virtual void setDocument( KoDocument *doc, const TQRect &tqgeometry ); /** * @return document contained in this child diff --git a/lib/kofficecore/KoDocumentInfo.cpp b/lib/kofficecore/KoDocumentInfo.cpp index 1c9400c6..cd4ecbaf 100644 --- a/lib/kofficecore/KoDocumentInfo.cpp +++ b/lib/kofficecore/KoDocumentInfo.cpp @@ -122,7 +122,7 @@ bool KoDocumentInfo::saveOasis( KoStore* store ) xmlWriter->startElement( "office:meta" ); xmlWriter->startElement( "meta:generator"); - xmlWriter->addTextNode( TQString( "KOffice/%1" ).arg( KOFFICE_VERSION_STRING ) ); + xmlWriter->addTextNode( TQString( "KOffice/%1" ).tqarg( KOFFICE_VERSION_STRING ) ); xmlWriter->endElement(); TQStringList lst = pages(); TQStringList::ConstIterator it = lst.begin(); @@ -232,7 +232,7 @@ void KoDocumentInfoAuthor::initParameters() m_emailCfg = new KConfig( "emaildefaults", true ); m_emailCfg->setGroup( "Defaults" ); TQString group = m_emailCfg->readEntry("Profile","Default"); - m_emailCfg->setGroup(TQString("PROFILE_%1").arg(group)); + m_emailCfg->setGroup(TQString("PROFILE_%1").tqarg(group)); if ( m_fullName.isNull() ) // only if null. Empty means the user made it explicitly empty. { @@ -629,7 +629,7 @@ KoDocumentInfoAbout::KoDocumentInfoAbout( KoDocumentInfo* info ) m_docInfo = info; m_editingCycles = 0; m_initialCreator = m_docInfo->creator(); - m_creationDate = TQDateTime::currentDateTime(); + m_creationDate = TQDateTime::tqcurrentDateTime(); } void KoDocumentInfoAbout::saveParameters() @@ -637,7 +637,7 @@ void KoDocumentInfoAbout::saveParameters() KoDocument* doc = dynamic_cast< KoDocument* >( m_docInfo->parent() ); if ( m_firstSave && doc && !doc->isAutosaving() ) m_editingCycles++; - m_modificationDate = TQDateTime::currentDateTime(); + m_modificationDate = TQDateTime::tqcurrentDateTime(); m_firstSave = false; } @@ -878,7 +878,7 @@ void KoDocumentInfoAbout::resetMetaData() { m_editingCycles = 0; m_initialCreator = m_docInfo->creator(); - m_creationDate = TQDateTime::currentDateTime(); + m_creationDate = TQDateTime::tqcurrentDateTime(); m_modificationDate = TQDateTime(); } diff --git a/lib/kofficecore/KoDocumentInfoDlg.cpp b/lib/kofficecore/KoDocumentInfoDlg.cpp index a4aa21fc..5973dbb4 100644 --- a/lib/kofficecore/KoDocumentInfoDlg.cpp +++ b/lib/kofficecore/KoDocumentInfoDlg.cpp @@ -49,7 +49,7 @@ #include <kdebug.h> #include <ktempfile.h> #include <kmimetype.h> -#include <layout.h> +#include <tqlayout.h> #include <klistview.h> #include <tqgrid.h> #include <tqmap.h> @@ -191,7 +191,7 @@ void KoDocumentInfoDlg::deleteInfo() void KoDocumentInfoDlg::resetMetaData() { - TQString s = KGlobal::locale()->formatDateTime( TQDateTime::currentDateTime() ); + TQString s = KGlobal::locale()->formatDateTime( TQDateTime::tqcurrentDateTime() ); d->m_aboutWidget->labelCreated->setText( s + ", " + d->m_info->creator() ); d->m_aboutWidget->labelModified->setText( "" ); d->m_aboutWidget->labelRevision->setText( "0" ); diff --git a/lib/kofficecore/KoFileDialog.cpp b/lib/kofficecore/KoFileDialog.cpp index 1c3a7fcb..2a7bd315 100644 --- a/lib/kofficecore/KoFileDialog.cpp +++ b/lib/kofficecore/KoFileDialog.cpp @@ -90,9 +90,9 @@ void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter, int idx = 1; // 0 is the native format if ( addUncompressed ) - filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").arg( type->comment() ), idx++ ); + filterWidget->changeItem( i18n("%1 (Uncompressed XML Files)").tqarg( type->comment() ), idx++ ); if ( addFlatXML ) - filterWidget->changeItem( i18n("%1 (Flat XML File)").arg( type->comment() ), idx++ ); + filterWidget->changeItem( i18n("%1 (Flat XML File)").tqarg( type->comment() ), idx++ ); // if you add an entry here, update numSpecialEntries above and specialEntrySelected() below // For native format... @@ -109,7 +109,7 @@ void KoFileDialog::setSpecialMimeFilter( TQStringList& mimeFilter, KMimeType::Ptr mime = KMimeType::mimeType (*mimeFilterIt); TQString compatString = mime->property ("X-KDE-CompatibleApplication").toString (); if (!compatString.isEmpty ()) - filterWidget->changeItem (i18n ("%1 (%2 Compatible)").arg (mime->comment ()).arg (compatString), i); + filterWidget->changeItem (i18n ("%1 (%2 Compatible)").tqarg (mime->comment ()).tqarg (compatString), i); } } diff --git a/lib/kofficecore/KoFilter.cpp b/lib/kofficecore/KoFilter.cpp index 1e5beb47..628d5f17 100644 --- a/lib/kofficecore/KoFilter.cpp +++ b/lib/kofficecore/KoFilter.cpp @@ -54,7 +54,7 @@ TQString KoEmbeddingFilter::mimeTypeByExtension( const TQString& extension ) // We need to resort to an ugly hack to determine the mimetype // from the extension, as kservicetypefactory.h isn't installed KURL url; - url.setPath( TQString( "dummy.%1" ).arg( extension ) ); + url.setPath( TQString( "dummy.%1" ).tqarg( extension ) ); KMimeType::Ptr m( KMimeType::findByURL( url, 0, true, true ) ); return m->name(); } @@ -65,7 +65,7 @@ KoEmbeddingFilter::KoEmbeddingFilter() : KoFilter() } int KoEmbeddingFilter::embedPart( const TQCString& from, TQCString& to, - KoFilter::ConversionStatus& status, const TQString& key ) + KoFilter::ConversiontqStatus& status, const TQString& key ) { ++( m_partStack.top()->m_lruPartIndex ); diff --git a/lib/kofficecore/KoFilter.h b/lib/kofficecore/KoFilter.h index cafad774..77439648 100644 --- a/lib/kofficecore/KoFilter.h +++ b/lib/kofficecore/KoFilter.h @@ -61,7 +61,7 @@ public: * Feel free to add some more error conditions @em before the last item * if it's needed. */ - enum ConversionStatus { OK, StupidError, UsageError, CreationError, FileNotFound, + enum ConversiontqStatus { OK, StupidError, UsageError, CreationError, FileNotFound, StorageCreationError, BadMimeType, BadConversionGraph, EmbeddedDocError, WrongFormat, NotImplemented, ParsingError, InternalError, UnexpectedEOF, @@ -79,10 +79,10 @@ public: * * @param from The mimetype of the source file/document * @param to The mimetype of the destination file/document - * @return The error status, see the @ref #ConversionStatus enum. + * @return The error status, see the @ref #ConversiontqStatus enum. * KoFilter::OK means that everything is alright. */ - virtual ConversionStatus convert( const TQCString& from, const TQCString& to ) = 0; + virtual ConversiontqStatus convert( const TQCString& from, const TQCString& to ) = 0; signals: /** @@ -201,7 +201,7 @@ protected: * within the embedding filter). */ int embedPart( const TQCString& from, TQCString& to, - KoFilter::ConversionStatus& status, + KoFilter::ConversiontqStatus& status, const TQString& key = TQString() ); /** @@ -262,7 +262,7 @@ private: /** * This struct keeps track of the last used index for a - * child part and all references to existing children + * child part and all references to existing tqchildren * We use it to build a whole stack, one PartState per * embedding level. * @internal diff --git a/lib/kofficecore/KoFilterChain.cpp b/lib/kofficecore/KoFilterChain.cpp index 62d93aa5..471d6098 100644 --- a/lib/kofficecore/KoFilterChain.cpp +++ b/lib/kofficecore/KoFilterChain.cpp @@ -46,7 +46,7 @@ KoFilterChain::ChainLink::ChainLink( KoFilterChain* chain, KoFilterEntry::Ptr fi { } -KoFilter::ConversionStatus KoFilterChain::ChainLink::invokeFilter( const ChainLink* const parentChainLink ) +KoFilter::ConversiontqStatus KoFilterChain::ChainLink::invokeFilter( const ChainLink* const parentChainLink ) { if ( !m_filterEntry ) { kdError( 30500 ) << "This filter entry is null. Strange stuff going on." << endl; @@ -63,7 +63,7 @@ KoFilter::ConversionStatus KoFilterChain::ChainLink::invokeFilter( const ChainLi if ( parentChainLink ) setupCommunication( parentChainLink->m_filter ); - KoFilter::ConversionStatus status = m_filter->convert( m_from, m_to ); + KoFilter::ConversiontqStatus status = m_filter->convert( m_from, m_to ); delete m_filter; m_filter=0; return status; @@ -90,8 +90,8 @@ void KoFilterChain::ChainLink::setupCommunication( const KoFilter* const parentF if ( !parentFilter ) return; - const TQMetaObject* const parent = parentFilter->metaObject(); - const TQMetaObject* const child = m_filter->metaObject(); + const TQMetaObject* const parent = parentFilter->tqmetaObject(); + const TQMetaObject* const child = m_filter->tqmetaObject(); if ( !parent || !child ) return; @@ -131,9 +131,9 @@ KoFilterChain::~KoFilterChain() manageIO(); // Called for the 2nd time in a row -> clean up } -KoFilter::ConversionStatus KoFilterChain::invokeChain() +KoFilter::ConversiontqStatus KoFilterChain::invokeChain() { - KoFilter::ConversionStatus status = KoFilter::OK; + KoFilter::ConversiontqStatus status = KoFilter::OK; m_state = Beginning; int count = m_chainLinks.count(); @@ -568,7 +568,7 @@ KoStoreDevice* KoFilterChain::storageInitEmbedding( const TQString& name ) return storageCleanupHelper( &m_outputStorage ); } - if ( !m_outputStorage->enterDirectory( TQString( "part%1" ).arg( lruPartIndex ) ) ) + if ( !m_outputStorage->enterDirectory( TQString( "part%1" ).tqarg( lruPartIndex ) ) ) return storageCleanupHelper( &m_outputStorage ); return storageCreateFirstStream( name, &m_outputStorage, &m_outputStorageDevice ); diff --git a/lib/kofficecore/KoFilterChain.h b/lib/kofficecore/KoFilterChain.h index a044eebe..d926c613 100644 --- a/lib/kofficecore/KoFilterChain.h +++ b/lib/kofficecore/KoFilterChain.h @@ -69,7 +69,7 @@ public: * @return The return status of the conversion. KoFilter::OK * if everything is alright. */ - KoFilter::ConversionStatus invokeChain(); + KoFilter::ConversiontqStatus invokeChain(); /** * Tells the @ref KoFilterManager the output file of the @@ -182,7 +182,7 @@ private: ChainLink( KoFilterChain* chain, KoFilterEntry::Ptr filterEntry, const TQCString& from, const TQCString& to ); - KoFilter::ConversionStatus invokeFilter( const ChainLink* const parentChainLink ); + KoFilter::ConversiontqStatus invokeFilter( const ChainLink* const parentChainLink ); TQCString from() const { return m_from; } TQCString to() const { return m_to; } diff --git a/lib/kofficecore/KoFilterManager.cpp b/lib/kofficecore/KoFilterManager.cpp index 2b44459c..31a1e43e 100644 --- a/lib/kofficecore/KoFilterManager.cpp +++ b/lib/kofficecore/KoFilterManager.cpp @@ -25,7 +25,7 @@ #include <tqfile.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqptrlist.h> #include <tqapplication.h> @@ -59,13 +59,13 @@ KoFilterChooser::KoFilterChooser (TQWidget *parent, const TQStringList &mimeType setMainWidget (page); // looks too squashed together without * 2 - TQVBoxLayout *layout = new TQVBoxLayout (page, marginHint (), spacingHint () * 2); + TQVBoxLayout *tqlayout = new TQVBoxLayout (page, marginHint (), spacingHint () * 2); TQLabel *filterLabel = new TQLabel (i18n ("Select a filter:"), page, "filterlabel"); - layout->addWidget (filterLabel); + tqlayout->addWidget (filterLabel); m_filterList = new KListBox (page, "filterlist"); - layout->addWidget (m_filterList); + tqlayout->addWidget (m_filterList); Q_ASSERT (!m_mimeTypes.isEmpty ()); for (TQStringList::ConstIterator it = m_mimeTypes.begin (); @@ -138,7 +138,7 @@ KoFilterManager::~KoFilterManager() delete d; } -TQString KoFilterManager::import( const TQString& url, KoFilter::ConversionStatus& status ) +TQString KoFilterManager::import( const TQString& url, KoFilter::ConversiontqStatus& status ) { // Find the mime type for the file to be imported. KURL u; @@ -231,7 +231,7 @@ TQString KoFilterManager::import( const TQString& url, KoFilter::ConversionStatu return TQString(); } -KoFilter::ConversionStatus KoFilterManager::exp0rt( const TQString& url, TQCString& mimeType ) +KoFilter::ConversiontqStatus KoFilterManager::exp0rt( const TQString& url, TQCString& mimeType ) { bool userCancelled = false; @@ -482,7 +482,7 @@ TQStringList KoFilterManager::mimeFilter( const TQCString& mimetype, Direction d // TODO maybe use the fake vertex trick from the method below, to make the search faster? TQStringList nativeMimeTypes; - nativeMimeTypes.append( TQString::fromLatin1( mimetype ) ); + nativeMimeTypes.append( TQString::tqfromLatin1( mimetype ) ); nativeMimeTypes += extraNativeMimeTypes; // Add the native mimetypes first so that they are on top. @@ -583,7 +583,7 @@ bool KoFilterManager::filterAvailable( KoFilterEntry::Ptr entry ) void KoFilterManager::importErrorHelper( const TQString& mimeType, const bool suppressDialog ) { - TQString tmp = i18n("Could not import file of type\n%1").arg( mimeType ); + TQString tmp = i18n("Could not import file of type\n%1").tqarg( mimeType ); // ###### FIXME: use KLibLoader::lastErrorMessage() here if (!suppressDialog) KMessageBox::error( 0L, tmp, i18n("Missing Import Filter") ); } diff --git a/lib/kofficecore/KoFilterManager.h b/lib/kofficecore/KoFilterManager.h index 11158012..5f0641f4 100644 --- a/lib/kofficecore/KoFilterManager.h +++ b/lib/kofficecore/KoFilterManager.h @@ -81,7 +81,7 @@ public: * If the TQString which is returned isEmpty() and the status is OK, * then we imported the file directly into the document. */ - TQString import( const TQString& url, KoFilter::ConversionStatus& status ); + TQString import( const TQString& url, KoFilter::ConversiontqStatus& status ); /** * @brief Exports the given file/document to the specified URL/mimetype. * @@ -89,7 +89,7 @@ public: * and when the method returns @p mimeType contains this mimetype. * Oh, well, export is a C++ keyword ;) */ - KoFilter::ConversionStatus exp0rt( const TQString& url, TQCString& mimeType ); + KoFilter::ConversiontqStatus exp0rt( const TQString& url, TQCString& mimeType ); diff --git a/lib/kofficecore/KoFrame.cpp b/lib/kofficecore/KoFrame.cpp index f9b3930e..4909e1e0 100644 --- a/lib/kofficecore/KoFrame.cpp +++ b/lib/kofficecore/KoFrame.cpp @@ -254,7 +254,7 @@ void KoFrame::mouseMoveEvent( TQMouseEvent* ev ) TQPoint p = parentWidget()->mapFromGlobal( ev->globalPos() ); move( TQPoint( p.x() + d->m_framePos.x() - d->m_mousePressPos.x(), p.y() + d->m_framePos.y() - d->m_mousePressPos.y() ) ); - // The other modes change the geometry so they call resizeEvent. + // The other modes change the tqgeometry so they call resizeEvent. // This one doesn't, so it has to emit geometryChangedby itself. emit geometryChanged(); //kdDebug() << "KoFrame::mouseMoveEvent koFrame position is " << x() << "," << y() << endl; diff --git a/lib/kofficecore/KoGenStyles.cpp b/lib/kofficecore/KoGenStyles.cpp index e140ac50..5c8f680f 100644 --- a/lib/kofficecore/KoGenStyles.cpp +++ b/lib/kofficecore/KoGenStyles.cpp @@ -225,7 +225,7 @@ void KoGenStyle::writeStyle( KoXmlWriter* writer, KoGenStyles& styles, const cha } if ( !m_familyName.isEmpty() ) const_cast<KoGenStyle *>( this )-> - addAttribute( "style:family", TQString::fromLatin1( m_familyName ) ); + addAttribute( "style:family", TQString::tqfromLatin1( m_familyName ) ); else { if ( qstrcmp( elementName, "style:style" ) == 0 ) kdWarning(30003) << "User style " << name << " is without family - invalid. m_type=" << m_type << endl; diff --git a/lib/kofficecore/KoGenStyles.h b/lib/kofficecore/KoGenStyles.h index d7516732..2a54f944 100644 --- a/lib/kofficecore/KoGenStyles.h +++ b/lib/kofficecore/KoGenStyles.h @@ -274,7 +274,7 @@ public: { /** * DefaultType depends on family: e.g. paragraph-properties if family=paragraph - * or on the type of style (e.g. page-layout -> page-layout-properties). + * or on the type of style (e.g. page-tqlayout -> page-tqlayout-properties). * (In fact that tag name is the one passed to writeStyle) */ DefaultType = 0, diff --git a/lib/kofficecore/KoGlobal.cpp b/lib/kofficecore/KoGlobal.cpp index 3c979f93..8ba1c077 100644 --- a/lib/kofficecore/KoGlobal.cpp +++ b/lib/kofficecore/KoGlobal.cpp @@ -136,7 +136,7 @@ void KoGlobal::createListOfLanguages() // currently have en_GB or en_US etc. const TQStringList translationList = KGlobal::dirs()->findAllResources("locale", - TQString::fromLatin1("*/entry.desktop")); + TQString::tqfromLatin1("*/entry.desktop")); for ( TQStringList::ConstIterator it = translationList.begin(); it != translationList.end(); ++it ) { diff --git a/lib/kofficecore/KoMainWindow.cpp b/lib/kofficecore/KoMainWindow.cpp index 248d3ed3..1219bf09 100644 --- a/lib/kofficecore/KoMainWindow.cpp +++ b/lib/kofficecore/KoMainWindow.cpp @@ -499,19 +499,19 @@ void KoMainWindow::updateCaption() // Get caption from document info (title(), in about page) if ( rootDocument()->documentInfo() ) { - KoDocumentInfoPage * page = rootDocument()->documentInfo()->page( TQString::fromLatin1("about") ); + KoDocumentInfoPage * page = rootDocument()->documentInfo()->page( TQString::tqfromLatin1("about") ); if (page) caption = static_cast<KoDocumentInfoAbout *>(page)->title(); } const TQString url = rootDocument()->url().prettyURL( 0, KURL::StripFileProtocol ); if ( !caption.isEmpty() && !url.isEmpty() ) - caption = TQString( "%1 - %2" ).arg( caption ).arg( url ); + caption = TQString( "%1 - %2" ).tqarg( caption ).tqarg( url ); else if ( caption.isEmpty() ) caption = url; setCaption( caption, rootDocument()->isModified() ); if ( !rootDocument()->url().fileName(false).isEmpty() ) - d->m_paSave->setToolTip( i18n("Save as %1").arg(rootDocument()->url().fileName(false)) ); + d->m_paSave->setToolTip( i18n("Save as %1").tqarg(rootDocument()->url().fileName(false)) ); else d->m_paSave->setToolTip( i18n("Save") ); } @@ -544,7 +544,7 @@ bool KoMainWindow::openDocument( const KURL & url ) { if ( !KIO::NetAccess::exists(url,true,0) ) { - KMessageBox::error(0L, i18n("The file %1 does not exist.").arg(url.url()) ); + KMessageBox::error(0L, i18n("The file %1 does not exist.").tqarg(url.url()) ); m_recent->removeURL(url); //remove the file from the recent-opened-file-list saveRecentFiles(); return false; @@ -677,7 +677,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) const bool neverHeardOfIt = ( mime->name() == KMimeType::defaultMimeType() ); TQString comment = neverHeardOfIt ? - i18n( "%1 (unknown file type)" ).arg( outputFormat.data() ) + i18n( "%1 (unknown file type)" ).tqarg( outputFormat.data() ) : mime->comment(); // Warn the user @@ -689,7 +689,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) this, i18n( "<qt>Saving as a %1 may result in some loss of formatting." "<p>Do you still want to save in this format?</qt>" ) - .arg( TQString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later + .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later i18n( "Confirm Save" ), KStdGuiItem::save (), "NonNativeSaveConfirmation", @@ -703,7 +703,7 @@ bool KoMainWindow::exportConfirmation( const TQCString &outputFormat ) this, i18n( "<qt>Exporting as a %1 may result in some loss of formatting." "<p>Do you still want to export to this format?</qt>" ) - .arg( TQString( "<b>%1</b>" ).arg( comment ) ), // in case we want to remove the bold later + .tqarg( TQString( "<b>%1</b>" ).tqarg( comment ) ), // in case we want to remove the bold later i18n( "Confirm Export" ), i18n ("Export"), "NonNativeExportConfirmation", // different to the one used for Save (above) @@ -1039,7 +1039,7 @@ bool KoMainWindow::queryClose() name = i18n( "Untitled" ); int res = KMessageBox::warningYesNoCancel( this, - i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).arg(name), + i18n( "<p>The document <b>'%1'</b> has been modified.</p><p>Do you want to save it?</p>" ).tqarg(name), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()); @@ -1212,7 +1212,7 @@ void KoMainWindow::print(bool quick) { if ( title.isEmpty() ) { // #139905 - breaks message freeze though //const TQString programName = instance()->aboutData() ? instance()->aboutData()->programName() : instance()->instanceName(); - //title = i18n("%1 unsaved document (%2)").arg(programName).arg(KGlobal::locale()->formatDate(TQDate::currentDate(), true/*short*/)); + //title = i18n("%1 unsaved document (%2)").tqarg(programName).tqarg(KGlobal::locale()->formatDate(TQDate::tqcurrentDate(), true/*short*/)); } printer.setDocName( title ); printer.setDocFileName( fileName ); @@ -1529,9 +1529,9 @@ void KoMainWindow::slotActivePartChanged( KParts::Part *newPart ) if ( it.current()->inherits("KToolBar") ) { KToolBar * tb = static_cast<KToolBar *>(it.current()); - KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").arg( tb->text() ), 0, + KToggleAction * act = new KToggleAction( i18n("Show %1 Toolbar").tqarg( tb->text() ), 0, actionCollection(), tb->name() ); - act->setCheckedState(i18n("Hide %1 Toolbar").arg( tb->text() )); + act->setCheckedState(i18n("Hide %1 Toolbar").tqarg( tb->text() )); connect( act, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( slotToolbarToggled( bool ) ) ); act->setChecked ( !tb->isHidden() ); d->m_toolbarList.append( act ); @@ -1618,7 +1618,7 @@ void KoMainWindow::slotEmailFile() else { fileURL = rootDocument()->url().url(); - theSubject = i18n("Document - %1").arg(rootDocument()->url().fileName(false)); + theSubject = i18n("Document - %1").tqarg(rootDocument()->url().fileName(false)); urls.append( fileURL ); } diff --git a/lib/kofficecore/KoOasisStore.cpp b/lib/kofficecore/KoOasisStore.cpp index fa1642e7..ea99ce8a 100644 --- a/lib/kofficecore/KoOasisStore.cpp +++ b/lib/kofficecore/KoOasisStore.cpp @@ -145,7 +145,7 @@ bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, T if (!m_store->open(fileName)) { kdWarning(30003) << "Entry " << fileName << " not found!" << endl; - errorMessage = i18n( "Could not find %1" ).arg( fileName ); + errorMessage = i18n( "Could not find %1" ).tqarg( fileName ); return false; } // Error variables for TQDomDocument::setContent @@ -168,7 +168,7 @@ bool KoOasisStore::loadAndParse( const TQString& fileName, TQDomDocument& doc, T << " In line: " << errorLine << ", column: " << errorColumn << endl << " Error message: " << errorMsg << endl; errorMessage = i18n( "Parsing error in the main document at line %1, column %2\nError message: %3" ) - .arg( errorLine ).arg( errorColumn ).arg( i18n ( "TQXml", errorMsg.utf8() ) ); + .tqarg( errorLine ).tqarg( errorColumn ).tqarg( i18n ( "TQXml", errorMsg.utf8() ) ); } else { diff --git a/lib/kofficecore/KoOasisStyles.cpp b/lib/kofficecore/KoOasisStyles.cpp index 04a0eb20..fe88a11b 100644 --- a/lib/kofficecore/KoOasisStyles.cpp +++ b/lib/kofficecore/KoOasisStyles.cpp @@ -26,7 +26,7 @@ #include <tqbuffer.h> #include <kglobal.h> #include <klocale.h> -#include <brush.h> +#include <tqbrush.h> #include <KoStyleStack.h> class KoOasisStyles::Private @@ -194,9 +194,9 @@ void KoOasisStyles::insertStyle( const TQDomElement& e, bool styleAutoStyles ) //kdDebug(30003) << "Style: '" << name << "' loaded " << endl; } } else if ( ns == KoXmlNS::style && ( - localName == "page-layout" + localName == "page-tqlayout" || localName == "font-decl" - || localName == "presentation-page-layout" ) ) + || localName == "presentation-page-tqlayout" ) ) { if ( m_styles.find( name ) != 0 ) kdDebug(30003) << "Style: '" << name << "' already exists" << endl; diff --git a/lib/kofficecore/KoOasisStyles.h b/lib/kofficecore/KoOasisStyles.h index e73eab0e..dfa9e468 100644 --- a/lib/kofficecore/KoOasisStyles.h +++ b/lib/kofficecore/KoOasisStyles.h @@ -47,8 +47,8 @@ public: /** * Look up a style by name. - * This method can find styles defined by the tags "style:page-layout", - * "style:presentation-page-layout", or "style:font-decl". + * This method can find styles defined by the tags "style:page-tqlayout", + * "style:presentation-page-tqlayout", or "style:font-decl". * Do NOT use this method for style:style styles. * * @param name the style name @@ -148,7 +148,7 @@ private: KoOasisStyles& operator=( const KoOasisStyles & ); // forbidden private: - TQDict<TQDomElement> m_styles; // page-layout, font-decl etc. + TQDict<TQDomElement> m_styles; // page-tqlayout, font-decl etc. TQDict<TQDomElement> m_defaultStyle; TQDomElement m_officeStyle; diff --git a/lib/kofficecore/KoOpenPane.cpp b/lib/kofficecore/KoOpenPane.cpp index 15da9151..83978239 100644 --- a/lib/kofficecore/KoOpenPane.cpp +++ b/lib/kofficecore/KoOpenPane.cpp @@ -20,7 +20,7 @@ #include "KoOpenPane.h" #include <tqvbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqheader.h> #include <tqwidgetstack.h> #include <tqlabel.h> diff --git a/lib/kofficecore/KoPageLayout.cpp b/lib/kofficecore/KoPageLayout.cpp index c3965d45..05eff10b 100644 --- a/lib/kofficecore/KoPageLayout.cpp +++ b/lib/kofficecore/KoPageLayout.cpp @@ -59,7 +59,7 @@ KoGenStyle KoPageLayout::saveOasis() const void KoPageLayout::loadOasis(const TQDomElement &style) { - TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-layout-properties" ) ); + TQDomElement properties( KoDom::namedItemNS( style, KoXmlNS::style, "page-tqlayout-properties" ) ); if ( !properties.isNull() ) { ptWidth = KoUnit::parseValue(properties.attributeNS( KoXmlNS::fo, "page-width", TQString() ) ); @@ -82,18 +82,18 @@ void KoPageLayout::loadOasis(const TQDomElement &style) KoPageLayout KoPageLayout::standardLayout() { - KoPageLayout layout; - layout.format = KoPageFormat::defaultFormat(); - layout.orientation = PG_PORTRAIT; - layout.ptWidth = MM_TO_POINT( KoPageFormat::width( layout.format, layout.orientation ) ); - layout.ptHeight = MM_TO_POINT( KoPageFormat::height( layout.format, layout.orientation ) ); - layout.ptLeft = MM_TO_POINT( 20.0 ); - layout.ptRight = MM_TO_POINT( 20.0 ); - layout.ptTop = MM_TO_POINT( 20.0 ); - layout.ptBottom = MM_TO_POINT( 20.0 ); - layout.ptPageEdge = -1; - layout.ptBindingSide = -1; - return layout; + KoPageLayout tqlayout; + tqlayout.format = KoPageFormat::defaultFormat(); + tqlayout.orientation = PG_PORTRAIT; + tqlayout.ptWidth = MM_TO_POINT( KoPageFormat::width( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptHeight = MM_TO_POINT( KoPageFormat::height( tqlayout.format, tqlayout.orientation ) ); + tqlayout.ptLeft = MM_TO_POINT( 20.0 ); + tqlayout.ptRight = MM_TO_POINT( 20.0 ); + tqlayout.ptTop = MM_TO_POINT( 20.0 ); + tqlayout.ptBottom = MM_TO_POINT( 20.0 ); + tqlayout.ptPageEdge = -1; + tqlayout.ptBindingSide = -1; + return tqlayout; } struct PageFormatInfo @@ -149,12 +149,12 @@ int KoPageFormat::printerPageSize( KoFormat format ) { if ( format == PG_SCREEN ) { - kdWarning() << "You use the page layout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; + kdWarning() << "You use the page tqlayout SCREEN. Printing in DIN A4 LANDSCAPE." << endl; return KPrinter::A4; } else if ( format == PG_CUSTOM ) { - kdWarning() << "The used page layout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; + kdWarning() << "The used page tqlayout (CUSTOM) is not supported by KPrinter. Printing in A4." << endl; return KPrinter::A4; } else if ( format <= PG_LAST_FORMAT ) @@ -198,15 +198,15 @@ KoFormat KoPageFormat::guessFormat( double width, double height ) TQString KoPageFormat::formatString( KoFormat format ) { if ( format <= PG_LAST_FORMAT ) - return TQString::fromLatin1( pageFormatInfo[ format ].shortName ); - return TQString::fromLatin1( "A4" ); + return TQString::tqfromLatin1( pageFormatInfo[ format ].shortName ); + return TQString::tqfromLatin1( "A4" ); } KoFormat KoPageFormat::formatFromString( const TQString & string ) { for ( int i = 0 ; i <= PG_LAST_FORMAT ; ++i ) { - if (string == TQString::fromLatin1( pageFormatInfo[ i ].shortName )) + if (string == TQString::tqfromLatin1( pageFormatInfo[ i ].shortName )) return pageFormatInfo[ i ].format; } // We do not know the format name, so we have a custom format diff --git a/lib/kofficecore/KoPageLayout.h b/lib/kofficecore/KoPageLayout.h index f854b1eb..4d4dc6cc 100644 --- a/lib/kofficecore/KoPageLayout.h +++ b/lib/kofficecore/KoPageLayout.h @@ -154,7 +154,7 @@ enum KoHFType { }; /** - * This structure defines the page layout, including + * This structure defines the page tqlayout, including * its size in pt, its format (e.g. A4), orientation, unit, margins etc. */ struct KoPageLayout @@ -194,17 +194,17 @@ struct KoPageLayout } /** - * Save this page layout to OASIS. + * Save this page tqlayout to OASIS. */ KOFFICECORE_EXPORT KoGenStyle saveOasis() const; /** - * Load this page layout from OASIS + * Load this page tqlayout from OASIS */ KOFFICECORE_EXPORT void loadOasis(const TQDomElement &style); /** - * @return a page layout with the default page size depending on the locale settings, + * @return a page tqlayout with the default page size depending on the locale settings, * default margins (2 cm), and portrait orientation. * @since 1.4 */ diff --git a/lib/kofficecore/KoPictureEps.cpp b/lib/kofficecore/KoPictureEps.cpp index 62269f05..9edbc981 100644 --- a/lib/kofficecore/KoPictureEps.cpp +++ b/lib/kofficecore/KoPictureEps.cpp @@ -25,7 +25,7 @@ #include <tqpainter.h> #include <tqpaintdevicemetrics.h> #include <tqfile.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqregexp.h> #include <tqimage.h> #include <tqpixmap.h> @@ -244,7 +244,7 @@ void KoPictureEps::draw(TQPainter& painter, int x, int y, int width, int height, TQPaintDeviceMetrics metrics (painter.device()); kdDebug(30003) << "Metrics: X: " << metrics.logicalDpiX() << " x Y: " << metrics.logicalDpiX() << " (in KoPictureEps::draw)" << endl; - if ( painter.device()->isExtDev() ) // Is it an external device (i.e. printer) + if ( painter.tqdevice()->isExtDev() ) // Is it an external device (i.e. printer) { kdDebug(30003) << "Drawing for a printer (in KoPictureEps::draw)" << endl; // For printing, always re-sample the image, as a printer has never the same resolution than a display. @@ -399,7 +399,7 @@ bool KoPictureEps::loadData(const TQByteArray& array, const TQString& /* extensi kdError(30003) << "Not standard bounding box: " << line << endl; return false; } - kdDebug(30003) << "Reg. Exp. Found: " << exp.capturedTexts() << endl; + kdDebug(30003) << "Reg. Exp. Found: " << exp.tqcapturedTexts() << endl; rect.setLeft((int)exp.cap(1).toDouble()); rect.setTop((int)exp.cap(2).toDouble()); rect.setRight((int)exp.cap(3).toDouble()); diff --git a/lib/kofficecore/KoPictureImage.cpp b/lib/kofficecore/KoPictureImage.cpp index b0b28ff3..c0775ac7 100644 --- a/lib/kofficecore/KoPictureImage.cpp +++ b/lib/kofficecore/KoPictureImage.cpp @@ -95,7 +95,7 @@ void KoPictureImage::draw(TQPainter& painter, int x, int y, int width, int heigh if ( !width || !height ) return; TQSize origSize = getOriginalSize(); - const bool scaleImage = painter.device()->isExtDev() // we are printing + const bool scaleImage = painter.tqdevice()->isExtDev() // we are printing && ((width <= origSize.width()) || (height <= origSize.height())); if( scaleImage ) { diff --git a/lib/kofficecore/KoPictureKey.cpp b/lib/kofficecore/KoPictureKey.cpp index ea2869a9..0badb429 100644 --- a/lib/kofficecore/KoPictureKey.cpp +++ b/lib/kofficecore/KoPictureKey.cpp @@ -139,8 +139,8 @@ void KoPictureKey::loadAttributes( const TQDomElement &elem ) TQString KoPictureKey::toString() const { // We do not use the default TQDateTime::toString has it does not show microseconds - return TQString::fromLatin1( "%1 %2" ) - .arg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); + return TQString::tqfromLatin1( "%1 %2" ) + .tqarg( m_filename, m_lastModified.toString("yyyy-MM-dd hh:mm:ss.zzz") ); } void KoPictureKey::setKeyFromFile (const TQString& filename) diff --git a/lib/kofficecore/KoQueryTrader.cpp b/lib/kofficecore/KoQueryTrader.cpp index 84a1be4b..0003d00d 100644 --- a/lib/kofficecore/KoQueryTrader.cpp +++ b/lib/kofficecore/KoQueryTrader.cpp @@ -76,14 +76,14 @@ KoDocument* KoDocumentEntry::createDoc( KoDocument* parent, const char* name ) c KoDocumentEntry KoDocumentEntry::queryByMimeType( const TQString & mimetype ) { - TQString constr = TQString::fromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).arg( mimetype ).arg( mimetype ); + TQString constr = TQString::tqfromLatin1( "[X-KDE-NativeMimeType] == '%1' or '%2' in [X-KDE-ExtraNativeMimeTypes]" ).tqarg( mimetype ).tqarg( mimetype ); TQValueList<KoDocumentEntry> vec = query( false,constr ); if ( vec.isEmpty() ) { kdWarning(30003) << "Got no results with " << constr << endl; // Fallback to the old way (which was probably wrong, but better be safe) - TQString constr = TQString::fromLatin1( "'%1' in ServiceTypes" ).arg( mimetype ); + TQString constr = TQString::tqfromLatin1( "'%1' in ServiceTypes" ).tqarg( mimetype ); vec = query( constr ); if ( vec.isEmpty() ) { diff --git a/lib/kofficecore/KoSpeaker.cpp b/lib/kofficecore/KoSpeaker.cpp index e309cc7e..75c8fec8 100644 --- a/lib/kofficecore/KoSpeaker.cpp +++ b/lib/kofficecore/KoSpeaker.cpp @@ -33,14 +33,14 @@ #include <tqtabbar.h> #include <tqgroupbox.h> #include <tqlineedit.h> -#include <textedit.h> +#include <tqtextedit.h> #include <tqlistview.h> #include <tqlistbox.h> #include <tqiconview.h> #include <tqtable.h> #include <tqgridview.h> #include <tqregexp.h> -#include <stylesheet.h> +#include <tqstylesheet.h> // KDE includes. #include <kapplication.h> @@ -136,7 +136,7 @@ void KoSpeaker::probe() TQPoint pos; bool spoke = false; if ( d->m_speakFlags & SpeakFocusWidget ) { - w = kapp->focusWidget(); + w = kapp->tqfocusWidget(); if (w) { spoke = maybeSayWidget(w); if (!spoke) diff --git a/lib/kofficecore/KoTemplates.h b/lib/kofficecore/KoTemplates.h index d65fab44..98c3ef72 100644 --- a/lib/kofficecore/KoTemplates.h +++ b/lib/kofficecore/KoTemplates.h @@ -80,9 +80,9 @@ public: void addDir(const TQString &dir) { m_dirs.append(dir); m_touched=true; } int sortingWeight() const { return m_sortingWeight; } void setSortingWeight(int weight) { m_sortingWeight = weight; } - /// If all children are hidden, we are hidden too + /// If all tqchildren are hidden, we are hidden too bool isHidden() const; - /// if we should hide, we hide all the children + /// if we should hide, we hide all the tqchildren void setHidden(bool hidden=true) const; KoTemplate *first() { return m_templates.first(); } diff --git a/lib/kofficecore/KoUnit.cpp b/lib/kofficecore/KoUnit.cpp index 3ba89f24..cc882345 100644 --- a/lib/kofficecore/KoUnit.cpp +++ b/lib/kofficecore/KoUnit.cpp @@ -183,15 +183,15 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) { if ( ok ) *ok = true; - if ( _unitName == TQString::fromLatin1( "mm" ) ) return U_MM; - if ( _unitName == TQString::fromLatin1( "cm" ) ) return U_CM; - if ( _unitName == TQString::fromLatin1( "dm" ) ) return U_DM; - if ( _unitName == TQString::fromLatin1( "in" ) - || _unitName == TQString::fromLatin1("inch") /*compat*/ ) return U_INCH; - if ( _unitName == TQString::fromLatin1( "pi" ) ) return U_PI; - if ( _unitName == TQString::fromLatin1( "dd" ) ) return U_DD; - if ( _unitName == TQString::fromLatin1( "cc" ) ) return U_CC; - if ( _unitName == TQString::fromLatin1( "pt" ) ) return U_PT; + if ( _unitName == TQString::tqfromLatin1( "mm" ) ) return U_MM; + if ( _unitName == TQString::tqfromLatin1( "cm" ) ) return U_CM; + if ( _unitName == TQString::tqfromLatin1( "dm" ) ) return U_DM; + if ( _unitName == TQString::tqfromLatin1( "in" ) + || _unitName == TQString::tqfromLatin1("inch") /*compat*/ ) return U_INCH; + if ( _unitName == TQString::tqfromLatin1( "pi" ) ) return U_PI; + if ( _unitName == TQString::tqfromLatin1( "dd" ) ) return U_DD; + if ( _unitName == TQString::tqfromLatin1( "cc" ) ) return U_CC; + if ( _unitName == TQString::tqfromLatin1( "pt" ) ) return U_PT; if ( ok ) *ok = false; return U_PT; @@ -199,14 +199,14 @@ KoUnit::Unit KoUnit::unit( const TQString &_unitName, bool* ok ) TQString KoUnit::unitName( Unit _unit ) { - if ( _unit == U_MM ) return TQString::fromLatin1( "mm" ); - if ( _unit == U_CM ) return TQString::fromLatin1( "cm" ); - if ( _unit == U_DM ) return TQString::fromLatin1( "dm" ); - if ( _unit == U_INCH ) return TQString::fromLatin1( "in" ); - if ( _unit == U_PI ) return TQString::fromLatin1( "pi" ); - if ( _unit == U_DD ) return TQString::fromLatin1( "dd" ); - if ( _unit == U_CC ) return TQString::fromLatin1( "cc" ); - return TQString::fromLatin1( "pt" ); + if ( _unit == U_MM ) return TQString::tqfromLatin1( "mm" ); + if ( _unit == U_CM ) return TQString::tqfromLatin1( "cm" ); + if ( _unit == U_DM ) return TQString::tqfromLatin1( "dm" ); + if ( _unit == U_INCH ) return TQString::tqfromLatin1( "in" ); + if ( _unit == U_PI ) return TQString::tqfromLatin1( "pi" ); + if ( _unit == U_DD ) return TQString::tqfromLatin1( "dd" ); + if ( _unit == U_CC ) return TQString::tqfromLatin1( "cc" ); + return TQString::tqfromLatin1( "pt" ); } void KoUnit::saveOasis(KoXmlWriter* settingsWriter, Unit _unit) diff --git a/lib/kofficecore/KoView.cpp b/lib/kofficecore/KoView.cpp index 634a1393..debb9f7c 100644 --- a/lib/kofficecore/KoView.cpp +++ b/lib/kofficecore/KoView.cpp @@ -42,7 +42,7 @@ public: { m_inOperation = false; m_zoom = 1.0; - m_children.setAutoDelete( true ); + m_tqchildren.setAutoDelete( true ); m_manager = 0L; m_tempActiveWidget = 0L; m_dcopObject = 0; @@ -56,7 +56,7 @@ public: TQGuardedPtr<KoDocument> m_doc; // our KoDocument TQGuardedPtr<KParts::PartManager> m_manager; double m_zoom; - TQPtrList<KoViewChild> m_children; + TQPtrList<KoViewChild> m_tqchildren; TQWidget *m_tempActiveWidget; KoViewIface *m_dcopObject; bool m_registered; // are we registered at the part manager? @@ -339,10 +339,10 @@ void KoView::partActivateEvent( KParts::PartActivateEvent *event ) if ( child->isRectangle() && !child->isTransparent() ) { KoViewChild *viewChild = new KoViewChild( child, this ); - d->m_children.append( viewChild ); + d->m_tqchildren.append( viewChild ); TQApplication::setOverrideCursor(waitCursor); - // This is the long operation (due to toolbar layout stuff) + // This is the long operation (due to toolbar tqlayout stuff) d->m_manager->setActivePart( child->document(), viewChild->frame()->view() ); TQApplication::restoreOverrideCursor(); @@ -484,7 +484,7 @@ void KoView::paintEverything( TQPainter &painter, const TQRect &rect, bool trans KoViewChild *KoView::child( KoView *view ) { - TQPtrListIterator<KoViewChild> it( d->m_children ); + TQPtrListIterator<KoViewChild> it( d->m_tqchildren ); for (; it.current(); ++it ) if ( it.current()->frame()->view() == view ) return it.current(); @@ -494,7 +494,7 @@ KoViewChild *KoView::child( KoView *view ) KoViewChild *KoView::child( KoDocument *doc ) { - TQPtrListIterator<KoViewChild> it( d->m_children ); + TQPtrListIterator<KoViewChild> it( d->m_tqchildren ); for (; it.current(); ++it ) if ( it.current()->documentChild()->document() == doc ) return it.current(); @@ -554,7 +554,7 @@ void KoView::slotChildActivated( bool a ) docChild->document()->setViewBuildDocument( chFrame->view(), chFrame->view()->xmlguiBuildDocument() ); } - d->m_children.remove( ch ); + d->m_tqchildren.remove( ch ); d->m_manager->addPart( docChild->document(), false ); // the destruction of the view removed the part from the partmanager. re-add it :) @@ -671,12 +671,12 @@ void KoView::endOperation() KoMainWindow * KoView::shell() const { - return dynamic_cast<KoMainWindow *>( topLevelWidget() ); + return dynamic_cast<KoMainWindow *>( tqtopLevelWidget() ); } KMainWindow * KoView::mainWindow() const { - return dynamic_cast<KMainWindow *>( topLevelWidget() ); + return dynamic_cast<KMainWindow *>( tqtopLevelWidget() ); } KStatusBar * KoView::statusBar() const @@ -741,11 +741,11 @@ KoViewChild::KoViewChild( KoDocumentChild *child, KoView *_parentView ) /* KoViewChild has basically three geometries to keep in sync. - - The KoDocumentChild geometry (i.e. the embedded object's geometry, unzoomed) - - Its own geometry (used for hit-test etc.) - - The KoFrame geometry (the graphical widget for moving the object when active) + - The KoDocumentChild tqgeometry (i.e. the embedded object's tqgeometry, unzoomed) + - Its own tqgeometry (used for hit-test etc.) + - The KoFrame tqgeometry (the graphical widget for moving the object when active) - So we need to subtract the scrollview's offset for the frame geometry, since it's a widget. + So we need to subtract the scrollview's offset for the frame tqgeometry, since it's a widget. The rules are (R1) frameGeometry = viewGeometry(childGeometry) "+" m_frame->{left|right|top|bottom}Border() - scrollview offset, @@ -779,8 +779,8 @@ KoViewChild::~KoViewChild() void KoViewChild::slotFrameGeometryChanged() { - // Set our geometry from the frame geometry (R2 reversed) - TQRect geom = m_frame->geometry(); + // Set our tqgeometry from the frame tqgeometry (R2 reversed) + TQRect geom = m_frame->tqgeometry(); int b = m_frame->border(); TQRect borderRect( geom.x() + b + parentView()->canvasXOffset(), geom.y() + b + parentView()->canvasYOffset(), @@ -790,7 +790,7 @@ void KoViewChild::slotFrameGeometryChanged() if(m_child) { - // Set the child geometry from the frame geometry (R1 reversed) + // Set the child tqgeometry from the frame tqgeometry (R1 reversed) TQRect borderLessRect( geom.x() + m_frame->leftBorder() + parentView()->canvasXOffset(), geom.y() + m_frame->topBorder() + parentView()->canvasYOffset(), geom.width() - m_frame->leftBorder() - m_frame->rightBorder(), @@ -799,8 +799,8 @@ void KoViewChild::slotFrameGeometryChanged() // We don't want to trigger slotDocGeometryChanged again lock(); TQRect childGeom = parentView()->reverseViewTransformations( borderLessRect ); - kdDebug() << "KoChild::slotFrameGeometryChanged child geometry " - << ( geometry() == childGeom ? "already " : "set to " ) + kdDebug() << "KoChild::slotFrameGeometryChanged child tqgeometry " + << ( tqgeometry() == childGeom ? "already " : "set to " ) << childGeom << endl; m_child->setGeometry( childGeom ); unlock(); @@ -811,15 +811,15 @@ void KoViewChild::slotDocGeometryChanged() { if ( locked() ) return; - // Set frame geometry from child geometry (R1) + // Set frame tqgeometry from child tqgeometry (R1) // The frame's resizeEvent will call slotFrameGeometryChanged. - TQRect geom = parentView()->applyViewTransformations( m_child->geometry() ); + TQRect geom = parentView()->applyViewTransformations( m_child->tqgeometry() ); TQRect borderRect( geom.x() - m_frame->leftBorder() - parentView()->canvasXOffset(), geom.y() - m_frame->topBorder() - parentView()->canvasYOffset(), geom.width() + m_frame->leftBorder() + m_frame->rightBorder(), geom.height() + m_frame->topBorder() + m_frame->bottomBorder() ); - kdDebug() << "KoViewChild::slotDocGeometryChanged frame geometry " - << ( m_frame->geometry() == borderRect ? "already " : "set to " ) + kdDebug() << "KoViewChild::slotDocGeometryChanged frame tqgeometry " + << ( m_frame->tqgeometry() == borderRect ? "already " : "set to " ) << borderRect << endl; m_frame->setGeometry( borderRect ); diff --git a/lib/kofficecore/KoXmlReader.cpp b/lib/kofficecore/KoXmlReader.cpp index 16a08f0c..3b2d3efb 100644 --- a/lib/kofficecore/KoXmlReader.cpp +++ b/lib/kofficecore/KoXmlReader.cpp @@ -305,7 +305,7 @@ KoXmlNodeData::KoXmlNodeData() fastLoading = false; // assume true, it will be set to false by XML parser when this node - // apparently has children AND the children are not loaded + // apparently has tqchildren AND the tqchildren are not loaded loaded = true; } @@ -534,7 +534,7 @@ void KoXmlNodeData::loadChildren( int depth ) !doc->xmlReader->feature( "http://xml.org/sax/features/namespace-prefixes" ); - // XML snippet for the children, including this element + // XML snippet for the tqchildren, including this element TQString snippet = doc->buffer.mid( startPos, endPos-startPos+1 ); // now parse all subnodes diff --git a/lib/kofficecore/Koversiondialog.cpp b/lib/kofficecore/Koversiondialog.cpp index f55d4abb..188d5888 100644 --- a/lib/kofficecore/Koversiondialog.cpp +++ b/lib/kofficecore/Koversiondialog.cpp @@ -19,12 +19,12 @@ #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmultilineedit.h> #include <tqpushbutton.h> #include <tqtoolbutton.h> #include <tqapplication.h> -#include <layout.h> +#include <tqlayout.h> #include <kiconloader.h> #include <kbuttonbox.h> #include <kdebug.h> diff --git a/lib/kofficecore/THOUGHTS b/lib/kofficecore/THOUGHTS index f0121aa9..fc936fdc 100644 --- a/lib/kofficecore/THOUGHTS +++ b/lib/kofficecore/THOUGHTS @@ -30,7 +30,7 @@ solve zooming and "scrolling" problems. One ugly problem also is what we will do about performance problems on repainting a part. Some time ago we got a mail on KOffice where some guy asked what to do about making that embedded painting faster. The reason is -that we *always* repaint the whole area, no matter what. This can easily be +that we *always* tqrepaint the whole area, no matter what. This can easily be optimized to a WNorthWestGravity like behavior, because you can't edit those embedded parts anyway, so even kchart and other non-WNG apps support that. ( we have to translate the painter, of course). @@ -44,7 +44,7 @@ whether they are the root views (not embedded), or they are *active* embedded views. There only has to be a KoView object. There is *one* zoom factor for both axes (x/y) and the whole -content (text, objects, children,...) is zoomed accordingly. +content (text, objects, tqchildren,...) is zoomed accordingly. This kind of zooming is like the zoom support you know from other applications. diff --git a/lib/kofficecore/kkbdaccessextensions.cpp b/lib/kofficecore/kkbdaccessextensions.cpp index a9a1cb2a..9535c14a 100644 --- a/lib/kofficecore/kkbdaccessextensions.cpp +++ b/lib/kofficecore/kkbdaccessextensions.cpp @@ -77,7 +77,7 @@ class KPanelKbdSizerIcon : public TQCursor void setShape(int shayp) { - if (shayp != shape()) { + if (shayp != tqshape()) { // Must restore and override to get the icon to refresh. if (isActive) kapp->restoreOverrideCursor(); TQCursor::setShape((Qt::CursorShape)shayp); @@ -274,7 +274,7 @@ bool KKbdAccessExtensions::eventFilter( TQObject *o, TQEvent *e ) TQWidgetList* KKbdAccessExtensions::getAllPanels() { - TQWidgetList* allWidgets = kapp->allWidgets(); + TQWidgetList* allWidgets = kapp->tqallWidgets(); TQWidgetList* allPanels = new TQWidgetList; TQWidget* widget = allWidgets->first(); while (widget) { @@ -390,7 +390,7 @@ void KKbdAccessExtensions::showIcon() { if (!d->panel) return; TQPoint p; - // kdDebug() << "KKbdAccessExtensions::showIcon: topLevelWidget = " << d->panel->topLevelWidget()->name() << endl; + // kdDebug() << "KKbdAccessExtensions::showIcon: tqtopLevelWidget = " << d->panel->tqtopLevelWidget()->name() << endl; if (::tqqt_cast<TQSplitter*>( d->panel )) { TQSplitter* splitter = dynamic_cast<TQSplitter *>(d->panel); int handleNdx = d->handleNdx - 1; @@ -413,8 +413,8 @@ void KKbdAccessExtensions::showIcon() p = dockWindow->pos(); if (dockWindow->area()) { // kdDebug() << "KKbdAccessExtensions::showIcon: pos = " << p << " of window = " << dockWindow->parentWidget()->name() << endl; - p = dockWindow->parentWidget()->mapTo(dockWindow->topLevelWidget(), p); - // kdDebug() << "KKbdAccessExtensions::showIcon: mapTo = " << p << " of window = " << dockWindow->topLevelWidget()->name() << endl; + p = dockWindow->parentWidget()->mapTo(dockWindow->tqtopLevelWidget(), p); + // kdDebug() << "KKbdAccessExtensions::showIcon: mapTo = " << p << " of window = " << dockWindow->tqtopLevelWidget()->name() << endl; // TODO: How to get the handle width? if (d->handleNdx == 1) { d->icon->setShape(TQt::SizeHorCursor); @@ -440,7 +440,7 @@ void KKbdAccessExtensions::showIcon() // else Handle is above the dock window. } } - p = dockWindow->topLevelWidget()->mapToGlobal(p); + p = dockWindow->tqtopLevelWidget()->mapToGlobal(p); } else { d->icon->setShape(TQt::SizeAllCursor); p = TQPoint(dockWindow->width() / 2, dockWindow->height() / 2); @@ -571,7 +571,7 @@ void KKbdAccessExtensions::displayAccessKeys() } // Find all visible, focusable widgets and create a TQLabel for each. Don't exceed // available list of access keys. - TQWidgetList* allWidgets = kapp->allWidgets(); + TQWidgetList* allWidgets = kapp->tqallWidgets(); TQWidget* widget = allWidgets->first(); int accessCount = 0; int maxAccessCount = availableAccessKeys.length(); diff --git a/lib/kofficecore/koDetailsPaneBase.ui b/lib/kofficecore/koDetailsPaneBase.ui index 0b64d5eb..c29e4a46 100644 --- a/lib/kofficecore/koDetailsPaneBase.ui +++ b/lib/kofficecore/koDetailsPaneBase.ui @@ -58,7 +58,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -82,7 +82,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -96,7 +96,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -158,7 +158,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -177,7 +177,7 @@ <property name="text"> <string></string> </property> - <property name="alignment"> + <property name="tqalignment"> <set>AlignCenter</set> </property> </widget> @@ -191,7 +191,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> @@ -208,7 +208,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>0</width> <height>20</height> diff --git a/lib/kofficecore/koDocumentInfoAboutWidget.ui b/lib/kofficecore/koDocumentInfoAboutWidget.ui index 9e100ed2..cf65eb81 100644 --- a/lib/kofficecore/koDocumentInfoAboutWidget.ui +++ b/lib/kofficecore/koDocumentInfoAboutWidget.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <hbox> <property name="name"> @@ -31,7 +31,7 @@ <property name="name"> <cstring>pixmapLabel</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>56</width> <height>56</height> @@ -67,7 +67,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <grid> <property name="name"> @@ -96,7 +96,7 @@ </widget> <widget class="TQLayoutWidget" row="3" column="0"> <property name="name"> - <cstring>layout14</cstring> + <cstring>tqlayout14</cstring> </property> <vbox> <property name="name"> @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -173,7 +173,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> @@ -189,7 +189,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>90</width> <height>70</height> @@ -206,7 +206,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> @@ -277,13 +277,13 @@ <property name="name"> <cstring>pbReset</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>24</height> </size> </property> - <property name="maximumSize"> + <property name="tqmaximumSize"> <size> <width>32767</width> <height>24</height> @@ -321,7 +321,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>16</height> diff --git a/lib/kofficecore/koDocumentInfoAuthorWidget.ui b/lib/kofficecore/koDocumentInfoAuthorWidget.ui index bce29446..60353b91 100644 --- a/lib/kofficecore/koDocumentInfoAuthorWidget.ui +++ b/lib/kofficecore/koDocumentInfoAuthorWidget.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -31,7 +31,7 @@ <property name="name"> <cstring>labelAuthor</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>56</width> <height>56</height> @@ -61,7 +61,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout16</cstring> + <cstring>tqlayout16</cstring> </property> <grid> <property name="name"> @@ -227,7 +227,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -264,7 +264,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> diff --git a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui index bc650f10..2a8a531e 100644 --- a/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui +++ b/lib/kofficecore/koDocumentInfoUserMetadataWidget.ui @@ -26,7 +26,7 @@ </widget> <widget class="TQLayoutWidget" row="0" column="1"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -36,7 +36,7 @@ <property name="name"> <cstring>kPushButton2</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>130</width> <height>0</height> @@ -64,7 +64,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>101</height> diff --git a/lib/kofficecore/koOpenPaneBase.ui b/lib/kofficecore/koOpenPaneBase.ui index c0076afa..a85ecb38 100644 --- a/lib/kofficecore/koOpenPaneBase.ui +++ b/lib/kofficecore/koOpenPaneBase.ui @@ -25,7 +25,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <vbox> <property name="name"> @@ -71,7 +71,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <vbox> <property name="name"> diff --git a/lib/kofficecore/tests/filter_graph.cpp b/lib/kofficecore/tests/filter_graph.cpp index 7ce1ed77..baead627 100644 --- a/lib/kofficecore/tests/filter_graph.cpp +++ b/lib/kofficecore/tests/filter_graph.cpp @@ -52,7 +52,7 @@ int main( int /*argc*/, char ** /*argv*/ ) if ( !key.isEmpty() ) { output += " \""; output += key.latin1(); - output += "\" [shape=box, style=filled, fillcolor=lightblue];\n"; + output += "\" [tqshape=box, style=filled, fillcolor=lightblue];\n"; if ( vertices.find( key ) == vertices.end() ) vertices.append( key ); } diff --git a/lib/kofficecore/tests/koxmlreadertest.cpp b/lib/kofficecore/tests/koxmlreadertest.cpp index a298bd50..5056e416 100644 --- a/lib/kofficecore/tests/koxmlreadertest.cpp +++ b/lib/kofficecore/tests/koxmlreadertest.cpp @@ -22,7 +22,7 @@ #include <tqstring.h> #include <tqcstring.h> #include <tqbuffer.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqdatetime.h> #include <tqfile.h> @@ -639,7 +639,7 @@ void testDocument() CHECK( doc.previousSibling().isNull(), true ); CHECK( doc.nextSibling().isNull(), true ); - // make sure its children are fine + // make sure its tqchildren are fine KoXmlElement rootElement; rootElement = doc.firstChild().toElement(); CHECK( rootElement.isNull(), false ); @@ -1419,9 +1419,9 @@ void testSimpleOpenDocumentPresentation() xmlstream << " <office:presentation>"; xmlstream << " <draw:page draw:name=\"Title\" draw:style-name=\"dp1\" "; xmlstream << " draw:master-page-name=\"lyt-cool\" "; - xmlstream << " presentation:presentation-page-layout-name=\"AL1T0\">"; + xmlstream << " presentation:presentation-page-tqlayout-name=\"AL1T0\">"; xmlstream << " <draw:frame presentation:style-name=\"pr1\" "; - xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"layout\" "; + xmlstream << " draw:text-style-name=\"P2\" draw:layer=\"tqlayout\" "; xmlstream << " svg:width=\"23.912cm\" svg:height=\"3.508cm\" "; xmlstream << " svg:x=\"2.058cm\" svg:y=\"1.543cm\" "; xmlstream << " presentation:class=\"title\" "; @@ -1431,7 +1431,7 @@ void testSimpleOpenDocumentPresentation() xmlstream << " </draw:text-box>"; xmlstream << " </draw:frame>"; xmlstream << " <draw:frame presentation:style-name=\"pr2\" "; - xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"layout\""; + xmlstream << " draw:text-style-name=\"P3\" draw:layer=\"tqlayout\""; xmlstream << " svg:width=\"23.912cm\" svg:height=\"13.231cm\""; xmlstream << " svg:x=\"2.058cm\" svg:y=\"5.838cm\" "; xmlstream << " presentation:class=\"subtitle\">"; @@ -1440,8 +1440,8 @@ void testSimpleOpenDocumentPresentation() xmlstream << " </draw:text-box>"; xmlstream << " </draw:frame>"; xmlstream << " <presentation:notes draw:style-name=\"dp2\">"; - xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"layout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>"; - xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"layout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">"; + xmlstream << " <draw:page-thumbnail draw:style-name=\"gr1\" draw:layer=\"tqlayout\" svg:width=\"13.706cm\" svg:height=\"10.28cm\" svg:x=\"3.647cm\" svg:y=\"2.853cm\" draw:page-number=\"1\" presentation:class=\"page\"/>"; + xmlstream << " <draw:frame presentation:style-name=\"pr3\" draw:text-style-name=\"P1\" draw:layer=\"tqlayout\" svg:width=\"14.518cm\" svg:height=\"11.411cm\" svg:x=\"3.249cm\" svg:y=\"14.13cm\" presentation:class=\"notes\" presentation:placeholder=\"true\">"; xmlstream << " <draw:text-box/>"; xmlstream << " </draw:frame>"; xmlstream << " </presentation:notes>"; @@ -1587,7 +1587,7 @@ void testSimpleOpenDocumentPresentation() CHECK( titlePageElement.attributeNS(drawNS,"style-name",""), TQString("dp1") ); CHECK( titlePageElement.attributeNS(drawNS,"master-page-name",""), TQString("lyt-cool") ); CHECK( titlePageElement.attributeNS(presentationNS, - "presentation-page-layout-name",""), TQString("AL1T0") ); + "presentation-page-tqlayout-name",""), TQString("AL1T0") ); // <draw:frame> for the title frame KoXmlElement titleFrameElement; @@ -1605,7 +1605,7 @@ void testSimpleOpenDocumentPresentation() CHECK( titleFrameElement.attributeNS(presentationNS,"class",""), TQString("title") ); CHECK( titleFrameElement.attributeNS(presentationNS,"user-transformed",""), TQString("true") ); CHECK( titleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P2") ); - CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), TQString("layout") ); + CHECK( titleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") ); CHECK( titleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") ); CHECK( titleFrameElement.attributeNS(svgNS,"height",""), TQString("3.508cm") ); CHECK( titleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") ); @@ -1655,7 +1655,7 @@ void testSimpleOpenDocumentPresentation() CHECK( subtitleFrameElement.attributeNS(presentationNS,"class",""), TQString("subtitle") ); CHECK( subtitleFrameElement.hasAttributeNS(presentationNS,"user-transformed"), false ); CHECK( subtitleFrameElement.attributeNS(drawNS,"text-style-name",""), TQString("P3") ); - CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), TQString("layout") ); + CHECK( subtitleFrameElement.attributeNS(drawNS,"layer",""), TQString("tqlayout") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"width",""), TQString("23.912cm") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"height",""), TQString("13.231cm") ); CHECK( subtitleFrameElement.attributeNS(svgNS,"x",""), TQString("2.058cm") ); @@ -1887,7 +1887,7 @@ void testLargeOpenDocumentSpreadsheet() xmlstream << "<office:spreadsheet>"; for( int i = 0; i < sheetCount; i++ ) { - TQString sheetName = TQString("Sheet%1").arg(i+1); + TQString sheetName = TQString("Sheet%1").tqarg(i+1); xmlstream << "<table:table table:name=\"" << sheetName; xmlstream << "\" table:print=\"false\">"; for( int j = 0; j < rowCount; j++ ) @@ -1981,7 +1981,7 @@ void testLargeOpenDocumentSpreadsheet() tableElement = spreadsheetElement.firstChild().toElement(); for( int table=0; table < sheetCount; table++ ) { - TQString tableName = TQString("Sheet%1").arg(table+1); + TQString tableName = TQString("Sheet%1").tqarg(table+1); CHECK( tableElement.isNull(), false ); CHECK( tableElement.isElement(), true ); CHECK( tableElement.localName(), TQString("table") ); diff --git a/lib/kofficeui/KoBrush.h b/lib/kofficeui/KoBrush.h index 7314649a..1134b05e 100644 --- a/lib/kofficeui/KoBrush.h +++ b/lib/kofficeui/KoBrush.h @@ -21,7 +21,7 @@ #ifndef KOBRUSH_H #define KOBRUSH_H -#include <brush.h> +#include <tqbrush.h> class KoGenStyle; class KoGenStyles; diff --git a/lib/kofficeui/KoCharSelectDia.cpp b/lib/kofficeui/KoCharSelectDia.cpp index 422e4e66..c8b104a9 100644 --- a/lib/kofficeui/KoCharSelectDia.cpp +++ b/lib/kofficeui/KoCharSelectDia.cpp @@ -20,7 +20,7 @@ #include "KoCharSelectDia.h" #include "KoCharSelectDia.moc" -#include <layout.h> +#include <tqlayout.h> #include <klocale.h> #include <kcharselect.h> @@ -58,7 +58,7 @@ void KoCharSelectDia::initDialog(const TQChar &_chr, const TQString &_font, bool charSelect = new KCharSelect( page, "", _font, _chr ); connect(charSelect, TQT_SIGNAL(doubleClicked()),this, TQT_SLOT(slotDoubleClicked())); - charSelect->resize( charSelect->sizeHint() ); + charSelect->resize( charSelect->tqsizeHint() ); charSelect->enableFontCombo( true ); grid->addWidget( charSelect, 0, 0 ); diff --git a/lib/kofficeui/KoCommandHistory.cpp b/lib/kofficeui/KoCommandHistory.cpp index 8d4284da..27c51e79 100644 --- a/lib/kofficeui/KoCommandHistory.cpp +++ b/lib/kofficeui/KoCommandHistory.cpp @@ -19,7 +19,7 @@ */ #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlistbox.h> #include <kaction.h> @@ -53,7 +53,7 @@ void KoListBox::contentsMouseMoveEvent ( TQMouseEvent * e) } } -TQSize KoListBox::sizeHint() const +TQSize KoListBox::tqsizeHint() const { return TQSize(TQMIN(maxItemWidth() + verticalScrollBar()->width() + 4, 400), TQMIN(count() * itemHeight() + horizontalScrollBar()->height() + 4,300)); @@ -188,7 +188,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) { m_first=false; if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); } if((m_redo != 0) && m_redo->isEnabled()) { m_redo->setEnabled(false); @@ -203,7 +203,7 @@ void KoCommandHistory::addCommand(KCommand *command, bool execute) { d->m_present=command; if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); } if (m_redo != 0) { m_redo->setEnabled(false); @@ -229,7 +229,7 @@ void KoCommandHistory::undo() { if (m_redo != 0) { m_redo->setEnabled(true); - m_redo->setText(i18n("&Redo: %1").arg(d->m_present->name())); + m_redo->setText(i18n("&Redo: %1").tqarg(d->m_present->name())); } int index; if((index=m_commands.findRef(d->m_present))!=-1 && m_commands.prev()!=0) { @@ -238,7 +238,7 @@ void KoCommandHistory::undo() { emit commandExecuted(commandUndone); if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); } --index; if(index==d->m_savedAt) @@ -282,13 +282,13 @@ void KoCommandHistory::redo() { if (m_undo != 0) { m_undo->setEnabled(true); - m_undo->setText(i18n("&Undo: %1").arg(d->m_present->name())); + m_undo->setText(i18n("&Undo: %1").tqarg(d->m_present->name())); } if(m_commands.next()!=0) { if (m_redo != 0) { m_redo->setEnabled(true); - m_redo->setText(i18n("&Redo: %1").arg(m_commands.current()->name())); + m_redo->setText(i18n("&Redo: %1").tqarg(m_commands.current()->name())); } } else { @@ -365,7 +365,7 @@ void KoCommandHistory::slotUndoAboutToShow() if (m_commands.findRef(d->m_present)!=-1) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { - lst.append(i18n("Undo: %1").arg(m_commands.current()->name())); + lst.append(i18n("Undo: %1").tqarg(m_commands.current()->name())); m_commands.prev(); } d->m_undoListBox->insertStringList( lst ); @@ -411,12 +411,12 @@ void KoCommandHistory::slotRedoAboutToShow() if (m_first) { d->m_present = m_commands.first(); - lst.append(i18n("Redo: %1").arg(d->m_present->name())); + lst.append(i18n("Redo: %1").tqarg(d->m_present->name())); } if (m_commands.findRef(d->m_present)!=-1 && m_commands.next()) while ( m_commands.current() && i<10 ) // TODO make number of items configurable ? { - lst.append(i18n("Redo: %1").arg(m_commands.current()->name())); + lst.append(i18n("Redo: %1").tqarg(m_commands.current()->name())); m_commands.next(); } d->m_redoListBox->insertStringList( lst ); diff --git a/lib/kofficeui/KoCommandHistory.h b/lib/kofficeui/KoCommandHistory.h index 89b83744..8522da3b 100644 --- a/lib/kofficeui/KoCommandHistory.h +++ b/lib/kofficeui/KoCommandHistory.h @@ -39,7 +39,7 @@ public: KoListBox( TQWidget *parent = 0, const char *name = 0, WFlags f = 0 ); protected: virtual void contentsMouseMoveEvent ( TQMouseEvent * ); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; signals: void changeNumberOfSelectedItem( int ); }; diff --git a/lib/kofficeui/KoContextCelp.cpp b/lib/kofficeui/KoContextCelp.cpp index b893037c..82f786e8 100644 --- a/lib/kofficeui/KoContextCelp.cpp +++ b/lib/kofficeui/KoContextCelp.cpp @@ -23,7 +23,7 @@ #include <tqregion.h> #include <tqfont.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqsimplerichtext.h> #include <kpixmap.h> @@ -61,7 +61,7 @@ void KoVerticalLabel::paintEvent( TQPaintEvent* ) KPixmap pm; pm.resize( height(), width() ); TQPainter p( &pm ); - p.fillRect( 0, 0, height(), width(), colorGroup().background() ); + p.fillRect( 0, 0, height(), width(), tqcolorGroup().background() ); p.setFont( font() ); p.drawText( 0, 0, height(), width(), AlignCenter, m_text ); p.end(); @@ -90,9 +90,9 @@ void KoHelpNavButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); else - p.setPen( colorGroup().text() ); + p.setPen( tqcolorGroup().text() ); p.drawPixmap( 1, 1, m_bitmap ); } } // KoHelpNavButton::paintEvent @@ -142,9 +142,9 @@ void KoTinyButton::paintEvent( TQPaintEvent* ) if ( isEnabled() ) { if ( m_pressed ) - p.setPen( colorGroup().highlight() ); + p.setPen( tqcolorGroup().highlight() ); else - p.setPen( colorGroup().text() ); + p.setPen( tqcolorGroup().text() ); p.drawPixmap( width() / 2 - 2, 1, m_bitmap ); } } // KoTinyButton::paintEvent @@ -265,20 +265,20 @@ bool KoHelpView::eventFilter( TQObject*, TQEvent* e ) void KoHelpView::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - currentText->draw( &p, 0, 0, TQRect(), colorGroup() ); + currentText->draw( &p, 0, 0, TQRect(), tqcolorGroup() ); } // KoHelpView::paintEvent KoHelpWidget::KoHelpWidget( TQString help, TQWidget* parent ) : TQWidget( parent ) { - TQGridLayout* layout = new TQGridLayout( this, 3, 3 ); - layout->setMargin( 2 ); - layout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); - layout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 ); - layout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); - layout->addColSpacing( 0, 5 ); - layout->addColSpacing( 2, 5 ); - layout->setColStretch( 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( this, 3, 3 ); + tqlayout->setMargin( 2 ); + tqlayout->addWidget( m_upButton = new KoHelpNavButton( KoHelpNavButton::Up, this ), 0, 1, AlignHCenter ); + tqlayout->addWidget( m_helpViewport = new TQWidget( this ), 1, 1 ); + tqlayout->addWidget( m_downButton = new KoHelpNavButton( KoHelpNavButton::Down, this ), 2, 1, AlignHCenter ); + tqlayout->addColSpacing( 0, 5 ); + tqlayout->addColSpacing( 2, 5 ); + tqlayout->setColStretch( 1, 1 ); m_helpView = new KoHelpView( m_helpViewport ); m_helpViewport->setBackgroundMode( PaletteLight ); @@ -370,20 +370,20 @@ void KoHelpWidget::stopScrolling() KoContextHelpPopup::KoContextHelpPopup( TQWidget* parent ) : TQWidget( parent, "", WType_Dialog | WStyle_Customize | WStyle_NoBorder ) { - TQGridLayout* layout = new TQGridLayout( this ); + TQGridLayout* tqlayout = new TQGridLayout( this ); TQHBoxLayout* buttonLayout; - layout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - buttonLayout = new TQHBoxLayout( layout ); - //layout->addLayout( buttonLayout, 2, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); + tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + buttonLayout = new TQHBoxLayout( tqlayout ); + //tqlayout->addLayout( buttonLayout, 2, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 2, 1, 1 ); buttonLayout->add( m_close = new KoTinyButton( KoTinyButton::Close, this ) ); buttonLayout->add( m_sticky = new KoTinyButton( KoTinyButton::Sticky, this ) ); - layout->addColSpacing( 2, 2 ); - layout->addRowSpacing( 3, 2 ); - layout->setMargin( 3 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + tqlayout->addColSpacing( 2, 2 ); + tqlayout->addRowSpacing( 3, 2 ); + tqlayout->setMargin( 3 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); buttonLayout->setSpacing( 1 ); setMinimumSize( 180, 180 ); @@ -450,7 +450,7 @@ void KoContextHelpPopup::resizeEvent( TQResizeEvent* ) void KoContextHelpPopup::paintEvent( TQPaintEvent* ) { TQPainter p( this ); - p.fillRect( 0, 0, width(), height(), colorGroup().light() ); + p.fillRect( 0, 0, width(), height(), tqcolorGroup().light() ); p.setPen( black ); p.drawRect( 0, 0, width(), height() ); p.fillRect( width() - 3, 0, width() - 1, height() - 1, black ); @@ -537,13 +537,13 @@ KoContextHelpWidget::KoContextHelpWidget( TQWidget* parent, const char* name ) : TQWidget( parent, name ) { setCaption( i18n( "Context Help" ) ); - TQGridLayout* layout = new TQGridLayout( this ); - layout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); - layout->setMargin( 2 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( this ); + tqlayout->addWidget( m_helpIcon = new TQLabel( this ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( this ), 1, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", this ), 0, 1, 1, 1 ); + tqlayout->setMargin( 2 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); this->setMinimumSize( 180, 120 ); this->show(); setContextHelp( i18n( "Context Help" ), i18n( "Here will be shown help according to your actions" ), 0 ); @@ -567,13 +567,13 @@ KoContextHelpDocker::KoContextHelpDocker( TQWidget* parent, const char* name ) { setCaption( i18n( "Context Help" ) ); TQWidget* mainWidget = new TQWidget( this ); - TQGridLayout* layout = new TQGridLayout( mainWidget ); - layout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 ); - layout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); - layout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); - layout->setMargin( 2 ); - layout->setSpacing( 1 ); - layout->setRowStretch( 1, 1 ); + TQGridLayout* tqlayout = new TQGridLayout( mainWidget ); + tqlayout->addWidget( m_helpIcon = new TQLabel( mainWidget ), 0, 0 ); + tqlayout->addWidget( m_helpTitle = new KoVerticalLabel( mainWidget ), 1, 0 ); + tqlayout->addMultiCellWidget( m_helpViewer = new KoHelpWidget( "", mainWidget ), 0, 1, 1, 1 ); + tqlayout->setMargin( 2 ); + tqlayout->setSpacing( 1 ); + tqlayout->setRowStretch( 1, 1 ); mainWidget->setMinimumSize( 180, 120 ); mainWidget->show(); setWidget( mainWidget ); diff --git a/lib/kofficeui/KoEditPath.cpp b/lib/kofficeui/KoEditPath.cpp index 3870ede4..19fd8c92 100644 --- a/lib/kofficeui/KoEditPath.cpp +++ b/lib/kofficeui/KoEditPath.cpp @@ -19,7 +19,7 @@ #include <tdeversion.h> #include <klocale.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpushbutton.h> #include <tqlistbox.h> #include "KoEditPath.h" @@ -75,7 +75,7 @@ KoChangePathDia::KoChangePathDia( const TQString & _path, TQWidget *parent, cons TQVBox *page =makeVBoxMainWidget(); new TQLabel( i18n("Location:"), page); m_urlReq = new KURLRequester(page); - m_urlReq->setMinimumWidth( m_urlReq->sizeHint().width() * 3 ); + m_urlReq->setMinimumWidth( m_urlReq->tqsizeHint().width() * 3 ); m_urlReq->lineEdit()->setText( _path ); m_urlReq->fileDialog()->setMode(KFile::Directory | KFile::LocalOnly); diff --git a/lib/kofficeui/KoGeneralPropertyUi.ui b/lib/kofficeui/KoGeneralPropertyUi.ui index 399bc900..688688c2 100644 --- a/lib/kofficeui/KoGeneralPropertyUi.ui +++ b/lib/kofficeui/KoGeneralPropertyUi.ui @@ -21,7 +21,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout13</cstring> + <cstring>tqlayout13</cstring> </property> <hbox> <property name="name"> @@ -157,7 +157,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> diff --git a/lib/kofficeui/KoGuideLineDia.cpp b/lib/kofficeui/KoGuideLineDia.cpp index 1f0fcff0..a889b3d8 100644 --- a/lib/kofficeui/KoGuideLineDia.cpp +++ b/lib/kofficeui/KoGuideLineDia.cpp @@ -25,7 +25,7 @@ #include <tqhbox.h> #include <tqvbox.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqradiobutton.h> #include <klocale.h> @@ -60,7 +60,7 @@ KoGuideLineDia::KoGuideLineDia( TQWidget *parent, KoPoint &pos, KoRect &rect, TQButtonGroup *group = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Orientation" ), vbox ); group->setRadioButtonExclusive( true ); - //group->layout(); + //group->tqlayout(); m_hButton = new TQRadioButton( i18n( "Horizontal" ), group ); m_vButton = new TQRadioButton( i18n( "Vertical" ), group ); diff --git a/lib/kofficeui/KoGuides.cpp b/lib/kofficeui/KoGuides.cpp index 870fddc6..01f6e745 100644 --- a/lib/kofficeui/KoGuides.cpp +++ b/lib/kofficeui/KoGuides.cpp @@ -69,10 +69,10 @@ private: int m_pos; }; -const KoGuides::SnapStatus KoGuides::SNAP_NONE = 0; -const KoGuides::SnapStatus KoGuides::SNAP_HORIZ = 1; -const KoGuides::SnapStatus KoGuides::SNAP_VERT = 2; -const KoGuides::SnapStatus KoGuides::SNAP_BOTH = 3; +const KoGuides::SnaptqStatus KoGuides::SNAP_NONE = 0; +const KoGuides::SnaptqStatus KoGuides::SNAP_HORIZ = 1; +const KoGuides::SnaptqStatus KoGuides::SNAP_VERT = 2; +const KoGuides::SnaptqStatus KoGuides::SNAP_BOTH = 3; KoGuides::KoGuides( KoView *view, KoZoomHandler *zoomHandler ) : m_view( view ) @@ -365,11 +365,11 @@ void KoGuides::getGuideLines( TQValueList<double> &horizontalPos, TQValueList<do } -void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff ) +void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ) { - if( !(snapStatus & SNAP_VERT)) + if( !(snaptqStatus & SNAP_VERT)) diff.setX(10000); - if( !(snapStatus & SNAP_HORIZ)) + if( !(snaptqStatus & SNAP_HORIZ)) diff.setY(10000); for ( int i = 0; i < GL_END; ++i ) @@ -380,60 +380,60 @@ void KoGuides::snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, if ( ( *it )->orientation == Qt::Horizontal ) { double tmp = (*it)->position - rect.top(); - if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snapStatus |= SNAP_HORIZ; + snaptqStatus |= SNAP_HORIZ; } } tmp = (*it)->position - rect.bottom(); - if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snapStatus |= SNAP_HORIZ; + snaptqStatus |= SNAP_HORIZ; } } } else { double tmp = (*it)->position - rect.left(); - if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snapStatus |= SNAP_VERT; + snaptqStatus |= SNAP_VERT; } } tmp = (*it)->position - rect.right(); - if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snapStatus |= SNAP_VERT; + snaptqStatus |= SNAP_VERT; } } } } } - if(!(snapStatus & SNAP_VERT)) + if(!(snaptqStatus & SNAP_VERT)) diff.setX( 0 ); - if(!(snapStatus & SNAP_HORIZ)) + if(!(snaptqStatus & SNAP_HORIZ)) diff.setY( 0 ); } -void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff ) +void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ) { - if( !(snapStatus & SNAP_VERT)) + if( !(snaptqStatus & SNAP_VERT)) diff.setX(10000); - if( !(snapStatus & SNAP_HORIZ)) + if( !(snaptqStatus & SNAP_HORIZ)) diff.setY(10000); for ( int i = 0; i < GL_END; ++i ) @@ -444,34 +444,34 @@ void KoGuides::snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, if ( ( *it )->orientation == Qt::Horizontal ) { double tmp = (*it)->position - pos.y(); - if ( snapStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) + if ( snaptqStatus & SNAP_HORIZ || TQABS( tmp ) < m_zoomHandler->unzoomItY( snap ) ) { if(TQABS( tmp ) < TQABS(diff.y())) { diff.setY( tmp ); - snapStatus |= SNAP_HORIZ; + snaptqStatus |= SNAP_HORIZ; } } } else { double tmp = (*it)->position - pos.x(); - if ( snapStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) + if ( snaptqStatus & SNAP_VERT || TQABS( tmp ) < m_zoomHandler->unzoomItX( snap ) ) { if(TQABS( tmp ) < TQABS(diff.x())) { diff.setX( tmp ); - snapStatus |= SNAP_VERT; + snaptqStatus |= SNAP_VERT; } } } } } - if(!(snapStatus & SNAP_VERT)) + if(!(snaptqStatus & SNAP_VERT)) diff.setX( 0 ); - if(!(snapStatus & SNAP_HORIZ)) + if(!(snaptqStatus & SNAP_HORIZ)) diff.setY( 0 ); } @@ -530,7 +530,7 @@ void KoGuides::repaintSnapping( const KoRect &snappedRect ) } -void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus ) +void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus ) { bool needRepaint = false; for ( int i = 0; i < GL_END; ++i ) @@ -538,7 +538,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStat TQValueList<KoGuideLine *>::const_iterator it = m_guideLines[i].begin(); for ( ; it != m_guideLines[i].end(); ++it ) { - if ( ( *it )->orientation == Qt::Horizontal && ( snapStatus & SNAP_HORIZ ) ) + if ( ( *it )->orientation == Qt::Horizontal && ( snaptqStatus & SNAP_HORIZ ) ) { if( virtuallyEqual( snappedPoint.y(), (*it)->position ) ) { @@ -556,7 +556,7 @@ void KoGuides::repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStat } else { - if ( snapStatus & SNAP_VERT ) + if ( snaptqStatus & SNAP_VERT ) { if( virtuallyEqual( snappedPoint.x(), (*it)->position ) ) { @@ -754,7 +754,7 @@ void KoGuides::slotRemove() void KoGuides::paint() { - m_view->canvas()->repaint( false ); + m_view->canvas()->tqrepaint( false ); } diff --git a/lib/kofficeui/KoGuides.h b/lib/kofficeui/KoGuides.h index c1f66138..b98b0472 100644 --- a/lib/kofficeui/KoGuides.h +++ b/lib/kofficeui/KoGuides.h @@ -58,8 +58,8 @@ public: */ void paintGuides( TQPainter &painter ); - typedef int SnapStatus; - static const SnapStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH; + typedef int SnaptqStatus; + static const SnaptqStatus SNAP_NONE, SNAP_HORIZ, SNAP_VERT, SNAP_BOTH; /** * @brief Handle mousePressEvent @@ -148,17 +148,17 @@ public: * @brief Snap rect to guidelines * * This looks for a guide which is in reach for the guide as defined in snap. - * This method has the abillity to combine more calls. The snapStatus and diff args are both input and - * output. On first call you should set snapStatus to 0. The return value would then show in which + * This method has the abillity to combine more calls. The snaptqStatus and diff args are both input and + * output. On first call you should set snaptqStatus to 0. The return value would then show in which * directions it has snapped. If you combine several KoGuides you can let these output arguments * be input for the next koGuide. That way you'll always catch the nearest guide. * * @param rect the rect which should be snapped * @param snap the distance within the guide should snap - but always snap if already snapped - * @param snapStatus if horiz,vert or both directions are snapped (both in and out param). + * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param). * @param diff distance away from guide. Only valid if status is snapping (both in and out param) */ - void snapToGuideLines( KoRect &rect, int snap, SnapStatus &snapStatus, KoPoint &diff ); + void snapToGuideLines( KoRect &rect, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ); /** * @brief Snap rect to guidelines @@ -167,13 +167,13 @@ public: * * @param pos the position which should be snapped * @param snap the distance wherein the guide should snap - but always snap if already snapped - * @param snapStatus if horiz,vert or both directions are snapped (both in and out param) + * @param snaptqStatus if horiz,vert or both directions are snapped (both in and out param) * @param diff distance away from guide. Only valid if status is snapping (both in and out param) */ - void snapToGuideLines( KoPoint &pos, int snap, SnapStatus &snapStatus, KoPoint &diff ); + void snapToGuideLines( KoPoint &pos, int snap, SnaptqStatus &snaptqStatus, KoPoint &diff ); /** - * @brief repaint guides if any changed snapping status + * @brief tqrepaint guides if any changed snapping status * * This issues a paint request if any guides have changed snapping status. * @@ -182,16 +182,16 @@ public: void repaintSnapping( const KoRect &snappedRect ); /** - * @brief repaint guides if any changed snapping status + * @brief tqrepaint guides if any changed snapping status * * This issues a paint request if any guides have changed snapping status. * * @param snappedPoint the point after it has been snapped */ - void repaintSnapping( const KoPoint &snappedPoint, SnapStatus snapStatus ); + void repaintSnapping( const KoPoint &snappedPoint, SnaptqStatus snaptqStatus ); /** - * @brief repaint guides so none is snapped + * @brief tqrepaint guides so none is snapped * * This issues a paint request if any guides have changed snapping status. * It also effectively un-snaps all since it doesn't take an argument @@ -253,9 +253,9 @@ signals: /** * @brief This signal is emitted when guides start/stop painting. * - * With this signal it is possible to only repaint the guides in the paint + * With this signal it is possible to only tqrepaint the guides in the paint * method of the canvas. Just set/unset a flag when this signal is emmited. - * This signal is emitted before and after a repaint is done. + * This signal is emitted before and after a tqrepaint is done. * * @param state true when starting painting guides, false when stopping. */ diff --git a/lib/kofficeui/KoInsertLink.cpp b/lib/kofficeui/KoInsertLink.cpp index 50b04c60..342889c4 100644 --- a/lib/kofficeui/KoInsertLink.cpp +++ b/lib/kofficeui/KoInsertLink.cpp @@ -20,7 +20,7 @@ #include <kapplication.h> #include <klocale.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvbox.h> #include <kdebug.h> #include <tqlabel.h> @@ -484,7 +484,7 @@ fileLinkPage::fileLinkPage( TQWidget *parent , char *name ) else recentFile->insertStringList( lst); - recentFile->setSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + recentFile->tqsetSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Fixed ); connect( recentFile , TQT_SIGNAL(highlighted ( const TQString &)), this, TQT_SLOT( slotSelectRecentFile( const TQString & ))); diff --git a/lib/kofficeui/KoKoolBar.cpp b/lib/kofficeui/KoKoolBar.cpp index 1db0ee9b..5f42caae 100644 --- a/lib/kofficeui/KoKoolBar.cpp +++ b/lib/kofficeui/KoKoolBar.cpp @@ -218,7 +218,7 @@ KoKoolBarBox::KoKoolBarBox( KoKoolBar *_bar ) : setFrameShape( StyledPanel ); setFrameShadow( Sunken ); // setBackgroundMode( PaletteBase ); - setBackgroundColor( colorGroup().background() ); + setBackgroundColor( tqcolorGroup().background() ); } void KoKoolBarBox::setActiveGroup( KoKoolBarGroup *_grp ) diff --git a/lib/kofficeui/KoPageLayoutColumns.cpp b/lib/kofficeui/KoPageLayoutColumns.cpp index be51e60e..8ea3b0b9 100644 --- a/lib/kofficeui/KoPageLayoutColumns.cpp +++ b/lib/kofficeui/KoPageLayoutColumns.cpp @@ -23,20 +23,20 @@ #include <KoUnitWidgets.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> -KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout) +KoPageLayoutColumns::KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout) : KoPageLayoutColumnsBase(parent) { m_columns = columns; TQHBoxLayout *lay = new TQHBoxLayout(previewPane); - m_preview = new KoPagePreview( previewPane, "Preview", layout ); + m_preview = new KoPagePreview( previewPane, "Preview", tqlayout ); lay->addWidget(m_preview); lay = new TQHBoxLayout(columnSpacingPane); m_spacing = new KoUnitDoubleSpinBox( columnSpacingPane ); m_spacing->setValue( m_columns.ptColumnSpacing ); m_spacing->setUnit( unit ); double dStep = KoUnit::fromUserValue( 0.2, unit ); - m_spacing->setMinMaxStep( 0, layout.ptWidth/2, dStep ); + m_spacing->setMinMaxStep( 0, tqlayout.ptWidth/2, dStep ); lay->addWidget(m_spacing); labelSpacing->setBuddy( m_spacing ); nColumns->setValue( m_columns.columns ); @@ -63,8 +63,8 @@ void KoPageLayoutColumns::nSpaceChanged( double spacing ) { emit propertyChange(m_columns); } -void KoPageLayoutColumns::setLayout(KoPageLayout &layout) { - m_preview->setPageLayout( layout ); +void KoPageLayoutColumns::setLayout(KoPageLayout &tqlayout) { + m_preview->setPageLayout( tqlayout ); } #include <KoPageLayoutColumns.moc> diff --git a/lib/kofficeui/KoPageLayoutColumns.h b/lib/kofficeui/KoPageLayoutColumns.h index b9dcd6c2..8ebac1b2 100644 --- a/lib/kofficeui/KoPageLayoutColumns.h +++ b/lib/kofficeui/KoPageLayoutColumns.h @@ -43,15 +43,15 @@ public: * @param parent the parent widget * @param columns the KoColumns data structure that this dialog should be initialzed with * @param unit the unit-type (mm/cm/inch) that the dialog should show - * @param layout the page layout that the preview should be initialzed with. + * @param tqlayout the page tqlayout that the preview should be initialzed with. */ - KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& layout); + KoPageLayoutColumns(TQWidget *parent, const KoColumns& columns, KoUnit::Unit unit, const KoPageLayout& tqlayout); /** - * Update the page preview widget with the param layout. - * @param layout the new layout + * Update the page preview widget with the param tqlayout. + * @param tqlayout the new tqlayout */ - void setLayout(KoPageLayout &layout); + void setLayout(KoPageLayout &tqlayout); public slots: /** diff --git a/lib/kofficeui/KoPageLayoutColumnsBase.ui b/lib/kofficeui/KoPageLayoutColumnsBase.ui index 07cced25..325fe45e 100644 --- a/lib/kofficeui/KoPageLayoutColumnsBase.ui +++ b/lib/kofficeui/KoPageLayoutColumnsBase.ui @@ -56,7 +56,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>20</height> diff --git a/lib/kofficeui/KoPageLayoutDia.cpp b/lib/kofficeui/KoPageLayoutDia.cpp index 24e32a7a..0b410bf1 100644 --- a/lib/kofficeui/KoPageLayoutDia.cpp +++ b/lib/kofficeui/KoPageLayoutDia.cpp @@ -34,7 +34,7 @@ #include <kmessagebox.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqlineedit.h> #include <tqbuttongroup.h> @@ -49,10 +49,10 @@ /******************************************************************/ /*===================== constrcutor ==============================*/ -KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& layout ) +KoPagePreview::KoPagePreview( TQWidget* parent, const char *name, const KoPageLayout& tqlayout ) : TQGroupBox( i18n( "Page Preview" ), parent, name ) { - setPageLayout( layout ); + setPageLayout( tqlayout ); columns = 1; setMinimumSize( 150, 150 ); } @@ -62,15 +62,15 @@ KoPagePreview::~KoPagePreview() { } -/*=================== set layout =================================*/ -void KoPagePreview::setPageLayout( const KoPageLayout &layout ) +/*=================== set tqlayout =================================*/ +void KoPagePreview::setPageLayout( const KoPageLayout &tqlayout ) { // resolution[XY] is in pixel per pt double resolutionX = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiX()) ); double resolutionY = POINT_TO_INCH( static_cast<double>(KoGlobal::dpiY()) ); - m_pageWidth = layout.ptWidth * resolutionX; - m_pageHeight = layout.ptHeight * resolutionY; + m_pageWidth = tqlayout.ptWidth * resolutionX; + m_pageHeight = tqlayout.ptHeight * resolutionY; double zh = 110.0 / m_pageHeight; double zw = 110.0 / m_pageWidth; @@ -79,19 +79,19 @@ void KoPagePreview::setPageLayout( const KoPageLayout &layout ) m_pageWidth *= z; m_pageHeight *= z; - m_textFrameX = layout.ptLeft * resolutionX * z; - m_textFrameY = layout.ptTop * resolutionY * z; - m_textFrameWidth = m_pageWidth - ( layout.ptLeft + layout.ptRight ) * resolutionX * z; - m_textFrameHeight = m_pageHeight - ( layout.ptTop + layout.ptBottom ) * resolutionY * z; + m_textFrameX = tqlayout.ptLeft * resolutionX * z; + m_textFrameY = tqlayout.ptTop * resolutionY * z; + m_textFrameWidth = m_pageWidth - ( tqlayout.ptLeft + tqlayout.ptRight ) * resolutionX * z; + m_textFrameHeight = m_pageHeight - ( tqlayout.ptTop + tqlayout.ptBottom ) * resolutionY * z; - repaint( true ); + tqrepaint( true ); } -/*=================== set layout =================================*/ +/*=================== set tqlayout =================================*/ void KoPagePreview::setPageColumns( const KoColumns &_columns ) { columns = _columns.columns; - repaint( true ); + tqrepaint( true ); } /*======================== draw contents =========================*/ @@ -129,7 +129,7 @@ void KoPagePreview::drawContents( TQPainter *painter ) /*==================== constructor ===============================*/ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& layout, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, int tabs, KoUnit::Unit unit, bool modal ) : KDialogBase( KDialogBase::Tabbed, i18n("Page Layout"), KDialogBase::Ok | KDialogBase::Cancel, @@ -137,7 +137,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_unit = unit; m_pageSizeTab = 0; m_columnsTab = 0; @@ -154,7 +154,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, /*==================== constructor ===============================*/ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& layout, + const KoPageLayout& tqlayout, const KoHeadFoot& hf, const KoColumns& columns, const KoKWHeaderFooter& kwhf, @@ -164,7 +164,7 @@ KoPageLayoutDia::KoPageLayoutDia( TQWidget* parent, const char* name, { flags = tabs; - m_layout = layout; + m_layout = tqlayout; m_column = columns; m_unit = unit; m_pageSizeTab = 0; @@ -186,14 +186,14 @@ KoPageLayoutDia::~KoPageLayoutDia() } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, tabs, unit ); if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); unit = dlg->unit(); } @@ -204,15 +204,15 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, int tabs } /*======================= show dialog ============================*/ -bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumns& columns, +bool KoPageLayoutDia::pageLayout( KoPageLayout& tqlayout, KoHeadFoot& hf, KoColumns& columns, KoKWHeaderFooter &_kwhf, int tabs, KoUnit::Unit& unit, TQWidget* parent ) { bool res = false; - KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", layout, hf, columns, _kwhf, tabs, unit ); + KoPageLayoutDia *dlg = new KoPageLayoutDia( parent, "PageLayout", tqlayout, hf, columns, _kwhf, tabs, unit ); if ( dlg->exec() == TQDialog::Accepted ) { res = true; - if ( tabs & FORMAT_AND_BORDERS ) layout = dlg->layout(); + if ( tabs & FORMAT_AND_BORDERS ) tqlayout = dlg->tqlayout(); if ( tabs & HEADER_AND_FOOTER ) hf = dlg->headFoot(); if ( tabs & COLUMNS ) columns = dlg->columns(); if ( tabs & KW_HEADER_AND_FOOTER ) _kwhf = dlg->headerFooter(); @@ -224,7 +224,7 @@ bool KoPageLayoutDia::pageLayout( KoPageLayout& layout, KoHeadFoot& hf, KoColumn return res; } -/*===================== get a standard page layout ===============*/ +/*===================== get a standard page tqlayout ===============*/ KoPageLayout KoPageLayoutDia::standardLayout() { return KoPageLayout::standardLayout(); @@ -261,17 +261,17 @@ void KoPageLayoutDia::setupTab1( bool enableBorders ) this, TQT_SLOT (sizeUpdated( KoPageLayout&))); } -void KoPageLayoutDia::sizeUpdated(KoPageLayout &layout) { - m_layout.ptWidth = layout.ptWidth; - m_layout.ptHeight = layout.ptHeight; - m_layout.ptLeft = layout.ptLeft; - m_layout.ptRight = layout.ptRight; - m_layout.ptTop = layout.ptTop; - m_layout.ptBottom = layout.ptBottom; - m_layout.format = layout.format; - m_layout.orientation = layout.orientation; +void KoPageLayoutDia::sizeUpdated(KoPageLayout &tqlayout) { + m_layout.ptWidth = tqlayout.ptWidth; + m_layout.ptHeight = tqlayout.ptHeight; + m_layout.ptLeft = tqlayout.ptLeft; + m_layout.ptRight = tqlayout.ptRight; + m_layout.ptTop = tqlayout.ptTop; + m_layout.ptBottom = tqlayout.ptBottom; + m_layout.format = tqlayout.format; + m_layout.orientation = tqlayout.orientation; if(m_columnsTab) - m_columnsTab->setLayout(layout); + m_columnsTab->setLayout(tqlayout); } /*================ setup header and footer tab ===================*/ @@ -282,9 +282,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) // ------------- header --------------- TQGroupBox *gHead = new TQGroupBox( 0, Qt::Vertical, i18n( "Head Line" ), tab2 ); - gHead->layout()->setSpacing(KDialog::spacingHint()); - gHead->layout()->setMargin(KDialog::marginHint()); - TQGridLayout *headGrid = new TQGridLayout( gHead->layout(), 2, 3 ); + gHead->tqlayout()->setSpacing(KDialog::spacingHint()); + gHead->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *headGrid = new TQGridLayout( gHead->tqlayout(), 2, 3 ); TQLabel *lHeadLeft = new TQLabel( i18n( "Left:" ), gHead ); headGrid->addWidget( lHeadLeft, 0, 0 ); @@ -311,9 +311,9 @@ void KoPageLayoutDia::setupTab2( const KoHeadFoot& hf ) // ------------- footer --------------- TQGroupBox *gFoot = new TQGroupBox( 0, Qt::Vertical, i18n( "Foot Line" ), tab2 ); - gFoot->layout()->setSpacing(KDialog::spacingHint()); - gFoot->layout()->setMargin(KDialog::marginHint()); - TQGridLayout *footGrid = new TQGridLayout( gFoot->layout(), 2, 3 ); + gFoot->tqlayout()->setSpacing(KDialog::spacingHint()); + gFoot->tqlayout()->setMargin(KDialog::marginHint()); + TQGridLayout *footGrid = new TQGridLayout( gFoot->tqlayout(), 2, 3 ); TQLabel *lFootLeft = new TQLabel( i18n( "Left:" ), gFoot ); footGrid->addWidget( lFootLeft, 0, 0 ); @@ -362,7 +362,7 @@ void KoPageLayoutDia::setupTab3() TQWidget *tab3 = addPage(i18n( "Col&umns" )); TQHBoxLayout *lay = new TQHBoxLayout(tab3); m_columnsTab = new KoPageLayoutColumns(tab3, m_column, m_unit, m_layout); - m_columnsTab->layout()->setMargin(0); + m_columnsTab->tqlayout()->setMargin(0); lay->addWidget(m_columnsTab); m_columnsTab->show(); connect (m_columnsTab, TQT_SIGNAL( propertyChange(KoColumns&)), @@ -382,7 +382,7 @@ void KoPageLayoutDia::setupTab4(const KoKWHeaderFooter kwhf ) TQWidget *tab4 = addPage(i18n( "H&eader && Footer" )); TQHBoxLayout *lay = new TQHBoxLayout(tab4); m_headerTab = new KoPageLayoutHeader(tab4, m_unit, kwhf); - m_headerTab->layout()->setMargin(0); + m_headerTab->tqlayout()->setMargin(0); lay->addWidget(m_headerTab); m_headerTab->show(); diff --git a/lib/kofficeui/KoPageLayoutDia.h b/lib/kofficeui/KoPageLayoutDia.h index 1ed23ec5..21fe7df3 100644 --- a/lib/kofficeui/KoPageLayoutDia.h +++ b/lib/kofficeui/KoPageLayoutDia.h @@ -61,7 +61,7 @@ public: ~KoPagePreview(); /** - * set page layout + * set page tqlayout */ void setPageLayout( const KoPageLayout& ); void setPageColumns( const KoColumns& ); @@ -78,7 +78,7 @@ protected: class KoPageLayoutDiaPrivate; /** - * With this dialog the user can specify the layout of the paper during printing. + * With this dialog the user can specify the tqlayout of the paper during printing. */ class KOFFICEUI_EXPORT KoPageLayoutDia : public KDialogBase { @@ -92,14 +92,14 @@ public: * * @param parent The parent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param flags a variable with all features this dialog should show. * @param unit The unit to use for displaying the values to the user. * @param modal Whether the dialog is modal or not. */ KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& layout, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, int flags, KoUnit::Unit unit, bool modal=true ); @@ -108,7 +108,7 @@ public: * * @param parent The parent of the dialog. * @param name The name of the dialog. - * @param layout The layout. + * @param tqlayout The tqlayout. * @param headfoot The header and the footer. * @param columns The number of columns on the page. * @param kwheadfoot The KWord header and footer. @@ -116,7 +116,7 @@ public: * @param unit The unit to use for displaying the values to the user */ KoPageLayoutDia( TQWidget* parent, const char* name, - const KoPageLayout& layout, + const KoPageLayout& tqlayout, const KoHeadFoot& headfoot, const KoColumns& columns, const KoKWHeaderFooter& kwheadfoot, @@ -128,26 +128,26 @@ public: ~KoPageLayoutDia(); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ static bool pageLayout( KoPageLayout&, KoHeadFoot&, int tabs, KoUnit::Unit& unit, TQWidget* parent = 0 ); /** - * Show page layout dialog. + * Show page tqlayout dialog. * See constructor for documentation on the parameters */ static bool pageLayout( KoPageLayout&, KoHeadFoot&, KoColumns&, KoKWHeaderFooter&, int tabs, KoUnit::Unit& unit, TQWidget* parent = 0 ); /** - * Retrieves a standard page layout. + * Retrieves a standard page tqlayout. * Deprecated: better use KoPageLayout::standardLayout() */ static KDE_DEPRECATED KoPageLayout standardLayout(); /** - * Returns the layout + * Returns the tqlayout */ - const KoPageLayout& layout() const { return m_layout; } + const KoPageLayout& tqlayout() const { return m_layout; } /** * Returns the header and footer information @@ -177,7 +177,7 @@ private: TQLineEdit *eFootMid; TQLineEdit *eFootRight; - // layout + // tqlayout KoPageLayout m_layout; KoColumns m_column; @@ -189,7 +189,7 @@ protected slots: virtual void slotOk(); private slots: - void sizeUpdated(KoPageLayout &layout); + void sizeUpdated(KoPageLayout &tqlayout); void columnsUpdated(KoColumns &columns); private: diff --git a/lib/kofficeui/KoPageLayoutHeader.cpp b/lib/kofficeui/KoPageLayoutHeader.cpp index 5878ead5..00296957 100644 --- a/lib/kofficeui/KoPageLayoutHeader.cpp +++ b/lib/kofficeui/KoPageLayoutHeader.cpp @@ -20,7 +20,7 @@ #include <KoPageLayoutHeader.moc> #include <KoUnitWidgets.h> -#include <layout.h> +#include <tqlayout.h> #include <tqcheckbox.h> KoPageLayoutHeader::KoPageLayoutHeader(TQWidget *parent, KoUnit::Unit unit, const KoKWHeaderFooter &kwhf) diff --git a/lib/kofficeui/KoPageLayoutHeaderBase.ui b/lib/kofficeui/KoPageLayoutHeaderBase.ui index 7f36378e..b3bd7978 100644 --- a/lib/kofficeui/KoPageLayoutHeaderBase.ui +++ b/lib/kofficeui/KoPageLayoutHeaderBase.ui @@ -45,7 +45,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -61,7 +61,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>21</width> <height>20</height> @@ -120,7 +120,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <hbox> <property name="name"> @@ -136,7 +136,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>41</width> <height>20</height> @@ -187,7 +187,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>40</width> <height>20</height> diff --git a/lib/kofficeui/KoPageLayoutSize.cpp b/lib/kofficeui/KoPageLayoutSize.cpp index 0e8e034c..6ddf9409 100644 --- a/lib/kofficeui/KoPageLayoutSize.cpp +++ b/lib/kofficeui/KoPageLayoutSize.cpp @@ -28,15 +28,15 @@ #include <kdebug.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqradiobutton.h> #include <tqhbox.h> #include <tqvgroupbox.h> #include <tqhbuttongroup.h> -KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) +KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayout, KoUnit::Unit unit,const KoColumns& columns, bool unitChooser, bool enableBorders) : TQWidget(parent), m_blockSignals(false) { - m_layout = layout; + m_layout = tqlayout; m_unit = unit; TQGridLayout *grid1 = new TQGridLayout( this, 5, 2, 0, KDialog::spacingHint() ); @@ -61,7 +61,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, else { TQString str=KoUnit::unitDescription(unit); - TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").arg(str), this ); + TQLabel *lpgUnit = new TQLabel( i18n("All values are given in %1.").tqarg(str), this ); grid1->addWidget( lpgUnit, 0, 0, TQt::AlignLeft ); } @@ -130,7 +130,7 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, marginsFrame->setMargin( KDialog::marginHint() ); grid1->addWidget( marginsFrame, 3, 0 ); - TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->layout(), 3, 3, + TQGridLayout *marginsLayout = new TQGridLayout( marginsFrame->tqlayout(), 3, 3, KDialog::spacingHint() ); // left margin @@ -160,9 +160,9 @@ KoPageLayoutSize::KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, // ------------- spacers ----------- TQWidget* spacer1 = new TQWidget( this ); TQWidget* spacer2 = new TQWidget( this ); - spacer1->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer1->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); - spacer2->setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, + spacer2->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ) ); grid1->addWidget( spacer1, 4, 0 ); grid1->addWidget( spacer2, 4, 1 ); diff --git a/lib/kofficeui/KoPageLayoutSize.h b/lib/kofficeui/KoPageLayoutSize.h index 6d50e014..d917b349 100644 --- a/lib/kofficeui/KoPageLayoutSize.h +++ b/lib/kofficeui/KoPageLayoutSize.h @@ -42,13 +42,13 @@ public: /** * Contructor * @param parent the parent widget - * @param layout the page layout that this widget should be initialzed with. + * @param tqlayout the page tqlayout that this widget should be initialzed with. * @param unit the unit-type (mm/cm/inch) that the dialog should show * @param columns the KoColumns (amout of columns) that the preview should be initialized with * @param unitChooser if true a combobox with the unit-type is shown for the user to change * @param enableBorders if true enable the user to change the margins (aka borders) of the page */ - KoPageLayoutSize(TQWidget *parent, const KoPageLayout& layout, KoUnit::Unit unit, + KoPageLayoutSize(TQWidget *parent, const KoPageLayout& tqlayout, KoUnit::Unit unit, const KoColumns& columns, bool unitChooser, bool enableBorders); /** @@ -78,11 +78,11 @@ public slots: signals: /** * Emitted whenever the user changed something in the dialog. - * @param layout the update layout structure with currently displayed info. + * @param tqlayout the update tqlayout structure with currently displayed info. * Note that the info may not be fully correct and physically possible (in which * case queryClose will return false) */ - void propertyChange(KoPageLayout &layout); + void propertyChange(KoPageLayout &tqlayout); protected: TQComboBox *cpgFormat; diff --git a/lib/kofficeui/KoPartSelectAction.cpp b/lib/kofficeui/KoPartSelectAction.cpp index 17bda1e3..ca24b89a 100644 --- a/lib/kofficeui/KoPartSelectAction.cpp +++ b/lib/kofficeui/KoPartSelectAction.cpp @@ -64,7 +64,7 @@ void KoPartSelectAction::init() // Called when selecting a part void KoPartSelectAction::slotActionActivated() { - TQString servName = TQString::fromLatin1( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); + TQString servName = TQString::tqfromLatin1( TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->name() ); KService::Ptr serv = KService::serviceByName( servName ); m_documentEntry = KoDocumentEntry( serv ); emit activated(); diff --git a/lib/kofficeui/KoPartSelectDia.cpp b/lib/kofficeui/KoPartSelectDia.cpp index 144b8a08..b5271b97 100644 --- a/lib/kofficeui/KoPartSelectDia.cpp +++ b/lib/kofficeui/KoPartSelectDia.cpp @@ -56,7 +56,7 @@ KoPartSelectDia::KoPartSelectDia( TQWidget* parent, const char* name ) : selectionChanged( 0 ); setFocus(); - resize( listview->sizeHint().width() + 20, 300 ); + resize( listview->tqsizeHint().width() + 20, 300 ); } void KoPartSelectDia::selectionChanged( TQListViewItem *item ) diff --git a/lib/kofficeui/KoPictureFilePreview.cpp b/lib/kofficeui/KoPictureFilePreview.cpp index e06f2127..7baed8f9 100644 --- a/lib/kofficeui/KoPictureFilePreview.cpp +++ b/lib/kofficeui/KoPictureFilePreview.cpp @@ -24,7 +24,7 @@ #include <klocale.h> #include <kurl.h> #include <tqbitmap.h> -#include <layout.h> +#include <tqlayout.h> #include <tqfileinfo.h> #include <tqpainter.h> #include <tqscrollview.h> diff --git a/lib/kofficeui/KoRuler.cpp b/lib/kofficeui/KoRuler.cpp index b11b0604..212becd7 100644 --- a/lib/kofficeui/KoRuler.cpp +++ b/lib/kofficeui/KoRuler.cpp @@ -44,7 +44,7 @@ public: bool whileMovingBorderLeft, whileMovingBorderRight; bool whileMovingBorderTop, whileMovingBorderBottom; TQPixmap pmFirst, pmLeft; - KoPageLayout layout; + KoPageLayout tqlayout; KoTabChooser *tabChooser; KoTabulatorList tabList; // Do we have to remove a certain tab in the DC Event? @@ -93,7 +93,7 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->canvas = _canvas; orientation = _orientation; - d->layout = _layout; + d->tqlayout = _layout; d->flags = _flags; d->m_bReadWrite=true; @@ -125,11 +125,11 @@ KoRuler::KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orienta d->removeTab.type = T_INVALID; if ( orientation == Qt::Horizontal ) { - frameStart = tqRound( zoomIt(d->layout.ptLeft) ); - d->frameEnd = tqRound( zoomIt(d->layout.ptWidth - d->layout.ptRight) ); + frameStart = tqRound( zoomIt(d->tqlayout.ptLeft) ); + d->frameEnd = tqRound( zoomIt(d->tqlayout.ptWidth - d->tqlayout.ptRight) ); } else { - frameStart = tqRound( zoomIt(d->layout.ptTop) ); - d->frameEnd = tqRound( zoomIt(d->layout.ptHeight - d->layout.ptBottom) ); + frameStart = tqRound( zoomIt(d->tqlayout.ptTop) ); + d->frameEnd = tqRound( zoomIt(d->tqlayout.ptHeight - d->tqlayout.ptBottom) ); } m_bFrameStartSet = false; @@ -209,12 +209,12 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Use a double-buffer pixmap TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); - int totalw = tqRound( zoomIt(d->layout.ptWidth) ); + int totalw = tqRound( zoomIt(d->tqlayout.ptWidth) ); TQString str; - p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -279,13 +279,13 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Draw ending bar (at page width) //int constant=zoomIt(1); //p.drawLine( totalw - diffx + constant, 1, totalw - diffx + constant, height() - 1 ); - //p.setPen( colorGroup().color( TQColorGroup::Base ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); //p.drawLine( totalw - diffx, 1, totalw - diffx, height() - 1 ); // Draw starting bar (at 0) - //p.setPen( colorGroup().color( TQColorGroup::Text ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); //p.drawLine( -diffx, 1, -diffx, height() - 1 ); - //p.setPen( colorGroup().color( TQColorGroup::Base ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); //p.drawLine( -diffx - constant, 1, -diffx - constant, height() - 1 ); // Draw the indents triangles @@ -307,7 +307,7 @@ void KoRuler::drawHorizontal( TQPainter *_painter ) // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( colorGroup().color( TQColorGroup::Text ) ); + p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); p.drawLine( mposX, 1, mposX, height() - 1 ); } hasToDelete = false; @@ -325,7 +325,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) { int ptPos = 0; - _painter.setPen( TQPen( colorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); + _painter.setPen( TQPen( tqcolorGroup().color( TQColorGroup::Text ), 2, SolidLine ) ); // Check if we're in a mousemove event, removing a tab. // In that case, we'll have to skip drawing that one. bool willRemove = d->mousePressed && willRemoveTab( d->oldMy ) && d->currTab.type != T_INVALID; @@ -356,7 +356,7 @@ void KoRuler::drawTabs( TQPainter &_painter ) _painter.drawLine( ptPos + 4, height() - 4, ptPos + 20 - 4, height() - 4 ); _painter.drawLine( ptPos + 20 / 2, 4, ptPos + 20 / 2, height() - 4 ); _painter.fillRect( ptPos + 20 / 2 + 2, height() - 9, 3, 3, - colorGroup().color( TQColorGroup::Text ) ); + tqcolorGroup().color( TQColorGroup::Text ) ); } break; default: break; } @@ -371,9 +371,9 @@ void KoRuler::drawVertical( TQPainter *_painter ) resize( TQMAX( fm.height() + 4, 20 ), height() ); TQPainter p( &buffer ); - p.fillRect( 0, 0, width(), height(), TQBrush( colorGroup().brush( TQColorGroup::Background ) ) ); + p.fillRect( 0, 0, width(), height(), TQBrush( tqcolorGroup().brush( TQColorGroup::Background ) ) ); - int totalh = tqRound( zoomIt(d->layout.ptHeight) ); + int totalh = tqRound( zoomIt(d->tqlayout.ptHeight) ); // Clip rect - this gives basically always a rect like (2,2,width-2,height-2) TQRect paintRect = _painter->clipRegion( TQPainter::CoordPainter ).boundingRect(); // Ruler rect @@ -382,7 +382,7 @@ void KoRuler::drawVertical( TQPainter *_painter ) if ( paintRect.intersects( rulerRect ) ) { TQString str; - p.setBrush( colorGroup().brush( TQColorGroup::Base ) ); + p.setBrush( tqcolorGroup().brush( TQColorGroup::Base ) ); // Draw white rect TQRect r; @@ -454,19 +454,19 @@ void KoRuler::drawVertical( TQPainter *_painter ) // Draw ending bar (at page height) //p.drawLine( 1, totalh - diffy + 1, width() - 1, totalh - diffy + 1 ); - //p.setPen( colorGroup().color( TQColorGroup::Base ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, totalh - diffy, width() - 1, totalh - diffy ); // Draw starting bar (at 0) - //p.setPen( colorGroup().color( TQColorGroup::Text ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); //p.drawLine( 1, -diffy, width() - 1, -diffy ); - //p.setPen( colorGroup().color( TQColorGroup::Base ) ); + //p.setPen( tqcolorGroup().color( TQColorGroup::Base ) ); //p.drawLine( 1, -diffy - 1, width() - 1, -diffy - 1 ); } // Show the mouse position if ( d->action == A_NONE && showMPos ) { - p.setPen( colorGroup().color( TQColorGroup::Text ) ); + p.setPen( tqcolorGroup().color( TQColorGroup::Text ) ); p.drawLine( 1, mposY, width() - 1, mposY ); } hasToDelete = false; @@ -598,7 +598,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) if ( d->canvas ) drawLine(d->oldMx, -1); update(); - emit newPageLayout( d->layout ); + emit newPageLayout( d->tqlayout ); } else if ( d->action == A_BR_TOP || d->action == A_BR_BOTTOM ) { d->whileMovingBorderTop = false; d->whileMovingBorderBottom = false; @@ -610,7 +610,7 @@ void KoRuler::mouseReleaseEvent( TQMouseEvent *e ) p.end(); } update(); - emit newPageLayout( d->layout ); + emit newPageLayout( d->tqlayout ); } else if ( d->action == A_FIRST_INDENT ) { if ( d->canvas ) drawLine(d->oldMx, -1); @@ -667,12 +667,12 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) hasToDelete = false; int pw = d->frameEnd - frameStart; - int ph = tqRound(zoomIt(d->layout.ptHeight)); + int ph = tqRound(zoomIt(d->tqlayout.ptHeight)); int left = frameStart - diffx; - int top = tqRound(zoomIt(d->layout.ptTop)); + int top = tqRound(zoomIt(d->tqlayout.ptTop)); top -= diffy; int right = d->frameEnd - diffx; - int bottom = tqRound(zoomIt(d->layout.ptBottom)); + int bottom = tqRound(zoomIt(d->tqlayout.ptBottom)); bottom = ph - bottom - diffy; // Cumulate first-line-indent int ip_first = tqRound( zoomIt( i_first + ( d->rtl ? d->i_right : i_left) ) ); @@ -693,13 +693,13 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) /////// ###### // At the moment, moving the left and right border indicators // is disabled when setFrameStartEnd has been called (i.e. in KWord) - // Changing the layout margins directly from it would be utterly wrong + // Changing the tqlayout margins directly from it would be utterly wrong // (just try the 2-columns modes...). What needs to be done is: // emitting a signal frameResized in mouseReleaseEvent, when a left/right // border has been moved, and in kword we need to update the margins from // there, if the left border of the 1st column or the right border of the // last column was moved... and find what to do with the other borders. - // And for normal frames, resize the frame without touching the page layout. + // And for normal frames, resize the frame without touching the page tqlayout. // All that is too much for now -> disabling. if ( !m_bFrameStartSet ) { @@ -747,7 +747,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_LEFT: { if ( d->canvas && mx < right-10 && mx+diffx-2 > 0) { drawLine( d->oldMx, mx ); - d->layout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); + d->tqlayout.ptLeft = unZoomIt(static_cast<double>(mx + diffx)); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -770,7 +770,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) case A_BR_RIGHT: { if ( d->canvas && mx > left+10 && mx+diffx <= pw-2) { drawLine( d->oldMx, mx ); - d->layout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); + d->tqlayout.ptRight = unZoomIt(static_cast<double>(pw - ( mx + diffx ))); if( ip_left > right-left-15 ) { ip_left=right-left-15; ip_left=ip_left<0 ? 0 : ip_left; @@ -895,7 +895,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->layout.ptTop = unZoomIt(static_cast<double>(my + diffy)); + d->tqlayout.ptTop = unZoomIt(static_cast<double>(my + diffy)); d->oldMx = mx; d->oldMy = my; update(); @@ -910,7 +910,7 @@ void KoRuler::mouseMoveEvent( TQMouseEvent *e ) p.drawLine( 0, d->oldMy, d->canvas->width(), d->oldMy ); p.drawLine( 0, my, d->canvas->width(), my ); p.end(); - d->layout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); + d->tqlayout.ptBottom = unZoomIt(static_cast<double>(ph - ( my + diffy ))); d->oldMx = mx; d->oldMy = my; update(); @@ -984,7 +984,7 @@ void KoRuler::handleDoubleClick() // Double-clicked nothing d->action = A_NONE; - emit doubleClicked(); // usually page layout dialog + emit doubleClicked(); // usually page tqlayout dialog } void KoRuler::setTabList( const KoTabulatorList & _tabList ) @@ -1176,7 +1176,7 @@ void KoRuler::slotMenuActivated( int i ) } } -TQSize KoRuler::minimumSizeHint() const +TQSize KoRuler::tqminimumSizeHint() const { TQSize size; TQFont font = KGlobalSettings::toolBarFont(); @@ -1188,14 +1188,14 @@ TQSize KoRuler::minimumSizeHint() const return size; } -TQSize KoRuler::sizeHint() const +TQSize KoRuler::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } void KoRuler::setPageLayout( const KoPageLayout& _layout ) { - d->layout = _layout; + d->tqlayout = _layout; update(); } diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h index 352e6820..5cea5678 100644 --- a/lib/kofficeui/KoRuler.h +++ b/lib/kofficeui/KoRuler.h @@ -96,7 +96,7 @@ class KoRulerPrivate; * and supports zooming, tabulators, paragraph indents, showing the mouse position, etc. * * It also offers a popupmenu upon right-clicking, for changing the unit, - * the page layout, or removing a tab. + * the page tqlayout, or removing a tab. */ class KOFFICEUI_EXPORT KoRuler : public TQFrame { @@ -139,7 +139,7 @@ public: const double& zoom() const { return m_zoom; } /** - * Set the page layout, see @ref KoPageLayout. + * Set the page tqlayout, see @ref KoPageLayout. * This defines the size of the page and the margins, * from which the size of the ruler is deducted. */ @@ -246,12 +246,12 @@ public: /** * Reimplemented from TQWidget */ - virtual TQSize minimumSizeHint() const; + virtual TQSize tqminimumSizeHint() const; /** * Reimplemented from TQWidget */ - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; signals: void newPageLayout( const KoPageLayout & ); diff --git a/lib/kofficeui/KoTabBar.cpp b/lib/kofficeui/KoTabBar.cpp index 02c34f2d..e33ce12c 100644 --- a/lib/kofficeui/KoTabBar.cpp +++ b/lib/kofficeui/KoTabBar.cpp @@ -37,7 +37,7 @@ // TODO // improvement possibilities // - use offscreen buffer to reduce flicker even more -// - keep track of tabs, only (re)layout when necessary +// - keep track of tabs, only (re)tqlayout when necessary // - paint all tabs to buffer, show only by shifting // - customizable button pixmaps // - use TQStyle to paint the tabs & buttons (is it good/possible?) @@ -57,7 +57,7 @@ public: // read-only: no mouse drag, double-click, right-click bool readOnly; - // if true, layout is from right to left + // if true, tqlayout is from right to left bool reverseLayout; // list of all tabs, in order of appearance @@ -273,20 +273,20 @@ void KoTabBarPrivate::drawTab( TQPainter& painter, TQRect& rect, const TQString& painter.save(); // fill it first - TQBrush bg = tabbar->colorGroup().background(); - if( active ) bg = TQBrush(tabbar->colorGroup().base()); + TQBrush bg = tabbar->tqcolorGroup().background(); + if( active ) bg = TQBrush(tabbar->tqcolorGroup().base()); painter.setBrush( bg ); painter.setPen( TQPen( TQt::NoPen ) ); painter.drawPolygon( polygon ); // draw the lines - painter.setPen( tabbar->colorGroup().dark() ); + painter.setPen( tabbar->tqcolorGroup().dark() ); if( !active ) painter.drawLine( rect.x()-25, rect.y(), rect.right()+25, rect.top() ); // TQt4: painter.setRenderHint( TQPainter::Antialiasing ); painter.drawPolyline( polygon ); - painter.setPen( tabbar->colorGroup().buttonText() ); + painter.setPen( tabbar->tqcolorGroup().buttonText() ); TQFont f = painter.font(); if( active ) f.setBold( true ); painter.setFont( f ); @@ -660,10 +660,10 @@ void KoTabBar::paintEvent( TQPaintEvent* ) TQPainter painter; TQPixmap pm( size() ); - pm.fill( colorGroup().background() ); - painter.begin( TQT_TQPAINTDEVICE(&pm), this ); + pm.fill( tqcolorGroup().background() ); + painter.tqbegin( TQT_TQPAINTDEVICE(&pm), this ); - painter.setPen( colorGroup().dark() ); + painter.setPen( tqcolorGroup().dark() ); painter.drawLine( 0, 0, width(), 0 ); if( !d->reverseLayout ) @@ -722,9 +722,9 @@ void KoTabBar::resizeEvent( TQResizeEvent* ) update(); } -TQSize KoTabBar::sizeHint() const +TQSize KoTabBar::tqsizeHint() const { - return TQSize( 40, tqstyle().pixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); + return TQSize( 40, tqstyle().tqpixelMetric( TQStyle::PM_ScrollBarExtent, this ) ); } void KoTabBar::renameTab( const TQString& old_name, const TQString& new_name ) diff --git a/lib/kofficeui/KoTabBar.h b/lib/kofficeui/KoTabBar.h index 0c4233b4..39cf03b8 100644 --- a/lib/kofficeui/KoTabBar.h +++ b/lib/kofficeui/KoTabBar.h @@ -219,7 +219,7 @@ public slots: */ void clear(); - TQSize sizeHint() const; + TQSize tqsizeHint() const; signals: diff --git a/lib/kofficeui/KoTabChooser.cpp b/lib/kofficeui/KoTabChooser.cpp index 19d93764..ed891e89 100644 --- a/lib/kofficeui/KoTabChooser.cpp +++ b/lib/kofficeui/KoTabChooser.cpp @@ -94,7 +94,7 @@ void KoTabChooser::mousePressEvent( TQMouseEvent *e ) else if ( flags & TAB_RIGHT ) currType = TAB_RIGHT; } break; } - repaint( true ); + tqrepaint( true ); } break; case Qt::RightButton: { TQPoint pnt( TQCursor::pos() ); diff --git a/lib/kofficeui/KoTabChooser.h b/lib/kofficeui/KoTabChooser.h index fb9a0591..31ad0f85 100644 --- a/lib/kofficeui/KoTabChooser.h +++ b/lib/kofficeui/KoTabChooser.h @@ -71,10 +71,10 @@ protected: KoTabChooserPrivate *d; protected slots: - void rbLeft() { currType = TAB_LEFT; repaint( true ); } - void rbCenter() { currType = TAB_CENTER; repaint( true ); } - void rbRight() { currType = TAB_RIGHT; repaint( true ); } - void rbDecPoint() { currType = TAB_DEC_PNT; repaint( true ); } + void rbLeft() { currType = TAB_LEFT; tqrepaint( true ); } + void rbCenter() { currType = TAB_CENTER; tqrepaint( true ); } + void rbRight() { currType = TAB_RIGHT; tqrepaint( true ); } + void rbDecPoint() { currType = TAB_DEC_PNT; tqrepaint( true ); } }; diff --git a/lib/kofficeui/KoTemplateChooseDia.cpp b/lib/kofficeui/KoTemplateChooseDia.cpp index 6fe4f550..1e526133 100644 --- a/lib/kofficeui/KoTemplateChooseDia.cpp +++ b/lib/kofficeui/KoTemplateChooseDia.cpp @@ -47,7 +47,7 @@ #include <kaboutdata.h> #include <tqapplication.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtabwidget.h> #include <tqcombobox.h> #include <tqcheckbox.h> @@ -84,7 +84,7 @@ class MyFileDialog : public KFileDialog ok = TQFile::exists( url.path() ); if ( !ok ) { // Maybe offer to create a new document with that name? (see alos KoDocument::openFile) - KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); } } return ok; @@ -165,7 +165,7 @@ class KoTemplateChooseDiaPrivate { // choose a file MyFileDialog *m_filedialog; - // for the layout + // for the tqlayout TQTabWidget* tabWidget; TQWidget* newTab; TQWidget* existingTab; @@ -298,13 +298,13 @@ KoTemplateChooseDia::DialogType KoTemplateChooseDia::getDialogType() const { /*================================================================*/ // private -void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * layout) +void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { d->m_recent = new KoTCDRecentFilesIconView(widgetbase, "recent files"); // I prefer the icons to be in "most recent first" order (DF) d->m_recent->setSorting( static_cast<TQDir::SortSpec>( TQDir::Time | TQDir::Reversed ) ); - layout->addWidget(d->m_recent,0,0); + tqlayout->addWidget(d->m_recent,0,0); TQString oldGroup = d->m_instance->config()->group(); d->m_instance->config()->setGroup( "RecentFiles" ); @@ -312,7 +312,7 @@ void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout int i = 0; TQString value; do { - TQString key=TQString( "File%1" ).arg( i ); + TQString key=TQString( "File%1" ).tqarg( i ); value=d->m_instance->config()->readPathEntry( key ); if ( !value.isEmpty() ) { // Support for tdelibs-3.5's new RecentFiles format: name[url] @@ -342,7 +342,7 @@ void KoTemplateChooseDia::setupRecentDialog(TQWidget * widgetbase, TQGridLayout /*================================================================*/ // private -void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * layout) +void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { TQString dir = TQString(); TQPoint point( 0, 0 ); @@ -353,7 +353,7 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * "file dialog", false); - layout->addWidget(d->m_filedialog,0,0); + tqlayout->addWidget(d->m_filedialog,0,0); d->m_filedialog->reparent( widgetbase , point ); //d->m_filedialog->setOperationMode( KFileDialog::Opening); @@ -387,20 +387,20 @@ void KoTemplateChooseDia::setupFileDialog(TQWidget * widgetbase, TQGridLayout * /*================================================================*/ // private -void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * layout) +void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout) { d->m_jwidget = new KJanusWidget( widgetbase, "kjanuswidget", KJanusWidget::IconList); - layout->addWidget(d->m_jwidget,0,0); + tqlayout->addWidget(d->m_jwidget,0,0); d->boxdescription = new TQVGroupBox( i18n("Selected Template"), widgetbase, "boxdescription"); - layout->addWidget(d->boxdescription, 1, 0 ); + tqlayout->addWidget(d->boxdescription, 1, 0 ); // config KConfigGroup grp( d->m_instance->config(), "TemplateChooserDialog" ); @@ -429,11 +429,11 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou group->name(), group->first()->loadPicture(d->m_instance)); - TQGridLayout * layout = new TQGridLayout(frame); + TQGridLayout * tqlayout = new TQGridLayout(frame); KoTCDIconCanvas *canvas = new KoTCDIconCanvas( frame ); - layout->addWidget(canvas,0,0); + tqlayout->addWidget(canvas,0,0); - canvas->setBackgroundColor( colorGroup().base() ); + canvas->setBackgroundColor( tqcolorGroup().base() ); canvas->setResizeMode(TQIconView::Adjust); canvas->setWordWrapIconText( true ); canvas->show(); @@ -478,10 +478,10 @@ void KoTemplateChooseDia::setupTemplateDialog(TQWidget * widgetbase, TQGridLayou currentChanged(itemtoselect); // setup the checkbox - TQString translatedstring = i18n("Always start %1 with the selected template").arg(d->m_nativeName); + TQString translatedstring = i18n("Always start %1 with the selected template").tqarg(d->m_nativeName); d->m_nodiag = new TQCheckBox ( translatedstring , widgetbase); - layout->addWidget(d->m_nodiag, 2, 0); + tqlayout->addWidget(d->m_nodiag, 2, 0); TQString startwithoutdialog = grp.readEntry( "NoStartDlg" ); bool ischecked = startwithoutdialog == TQString("yes"); @@ -642,7 +642,7 @@ void KoTemplateChooseDia::slotOk() static const char* const s_returnTypes[] = { 0 /*Cancel ;)*/, "Template", "File", "Empty" }; if ( d->m_returnType <= Empty ) { - grp.writeEntry( "LastReturnType", TQString::fromLatin1(s_returnTypes[d->m_returnType]) ); + grp.writeEntry( "LastReturnType", TQString::tqfromLatin1(s_returnTypes[d->m_returnType]) ); if (d->m_returnType == Template) { grp.writeEntry( "TemplateTab", d->m_jwidget->activePageIndex() ); @@ -706,7 +706,7 @@ bool KoTemplateChooseDia::collectInfo() KURL url = item->url(); if(url.isLocalFile() && !TQFile::exists(url.path())) { - KMessageBox::error( this, i18n( "The file %1 does not exist." ).arg( url.path() ) ); + KMessageBox::error( this, i18n( "The file %1 does not exist." ).tqarg( url.path() ) ); return false; } d->m_fullTemplateName = url.url(); @@ -793,12 +793,12 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) // and another one for deciding what's the text of the tooltip... const KFileItem *fi = ( (KFileIconViewItem*)item )->fileInfo(); TQString toolTipText = fi->url().prettyURL( 0, KURL::StripFileProtocol ); - toolTip = new TQLabel( TQString::fromLatin1(" %1 ").arg(toolTipText), 0, + toolTip = new TQLabel( TQString::tqfromLatin1(" %1 ").tqarg(toolTipText), 0, "myToolTip", WStyle_StaysOnTop | WStyle_Customize | WStyle_NoBorder | WStyle_Tool | WX11BypassWM ); toolTip->setFrameStyle( TQFrame::Plain | TQFrame::Box ); toolTip->setLineWidth( 1 ); - toolTip->setAlignment( AlignLeft | AlignTop ); + toolTip->tqsetAlignment( AlignLeft | AlignTop ); toolTip->move( TQCursor::pos() + TQPoint( 14, 14 ) ); toolTip->adjustSize(); TQRect screen = TQApplication::desktop()->screenGeometry( @@ -810,7 +810,7 @@ void KoTCDRecentFilesIconView::showToolTip( TQIconViewItem* item ) toolTip->move(toolTip->x(), screen.bottom()-toolTip->y()-toolTip->height()+toolTip->y()); } toolTip->setFont( TQToolTip::font() ); - toolTip->setPalette( TQToolTip::palette(), TRUE ); + toolTip->tqsetPalette( TQToolTip::palette(), TRUE ); toolTip->show(); } diff --git a/lib/kofficeui/KoTemplateChooseDia.h b/lib/kofficeui/KoTemplateChooseDia.h index 9363477d..677c11b1 100644 --- a/lib/kofficeui/KoTemplateChooseDia.h +++ b/lib/kofficeui/KoTemplateChooseDia.h @@ -236,9 +236,9 @@ private: TQString descriptionText(const TQString &name, const TQString &description); void setupDialog(); - void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * layout); - void setupFileDialog(TQWidget * widgetbase, TQGridLayout * layout); - void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * layout); + void setupTemplateDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); + void setupFileDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); + void setupRecentDialog(TQWidget * widgetbase, TQGridLayout * tqlayout); bool collectInfo(); bool noStartupDlg() const; diff --git a/lib/kofficeui/KoTemplateCreateDia.cpp b/lib/kofficeui/KoTemplateCreateDia.cpp index 53770a42..6243b9dc 100644 --- a/lib/kofficeui/KoTemplateCreateDia.cpp +++ b/lib/kofficeui/KoTemplateCreateDia.cpp @@ -23,7 +23,7 @@ #include <KoTemplateCreateDia.h> #include <tqfile.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlabel.h> #include <tqgroupbox.h> #include <tqradiobutton.h> @@ -142,15 +142,15 @@ KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstan TQVBoxLayout *rightbox=new TQVBoxLayout(mbox); TQGroupBox *pixbox=new TQGroupBox(i18n("Picture"), mainwidget); rightbox->addWidget(pixbox); - TQVBoxLayout *pixlayout=new TQVBoxLayout(pixbox, KDialogBase::marginHint(), + TQVBoxLayout *pixtqlayout=new TQVBoxLayout(pixbox, KDialogBase::marginHint(), KDialogBase::spacingHint()); - pixlayout->addSpacing(pixbox->fontMetrics().height()/2); - pixlayout->addStretch(1); + pixtqlayout->addSpacing(pixbox->fontMetrics().height()/2); + pixtqlayout->addStretch(1); d->m_default=new TQRadioButton(i18n("&Default"), pixbox); d->m_default->setChecked(true); connect(d->m_default, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefault())); - pixlayout->addWidget(d->m_default); - TQHBoxLayout *custombox=new TQHBoxLayout(pixlayout); + pixtqlayout->addWidget(d->m_default); + TQHBoxLayout *custombox=new TQHBoxLayout(pixtqlayout); d->m_custom=new TQRadioButton(i18n("Custom"), pixbox); d->m_custom->setChecked(false); connect(d->m_custom, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotCustom())); @@ -159,19 +159,19 @@ KoTemplateCreateDia::KoTemplateCreateDia( const TQCString &templateType, KInstan connect(d->m_select, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelect())); custombox->addWidget(d->m_select, 1); custombox->addStretch(1); - pixlayout->addStretch(1); + pixtqlayout->addStretch(1); label=new TQLabel(i18n("Preview:"), pixbox); - pixlayout->addWidget(label); - TQHBoxLayout *previewbox=new TQHBoxLayout(pixlayout); + pixtqlayout->addWidget(label); + TQHBoxLayout *previewbox=new TQHBoxLayout(pixtqlayout); previewbox->addStretch(10); d->m_preview=new TQLabel(pixbox); // setPixmap() -> auto resize? previewbox->addWidget(d->m_preview); previewbox->addStretch(10); - pixlayout->addStretch(8); + pixtqlayout->addStretch(8); d->m_defaultTemplate = new TQCheckBox( i18n("Use the new template as default"), mainwidget ); d->m_defaultTemplate->setChecked( true ); - TQToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").arg(instance->aboutData()->programName() ) ); + TQToolTip::add( d->m_defaultTemplate, i18n("Use the new template every time %1 starts").tqarg(instance->aboutData()->programName() ) ); rightbox->addWidget( d->m_defaultTemplate ); enableButtonOK(false); diff --git a/lib/kofficeui/KoToolBox.cpp b/lib/kofficeui/KoToolBox.cpp index 556dce02..db4d6467 100644 --- a/lib/kofficeui/KoToolBox.cpp +++ b/lib/kofficeui/KoToolBox.cpp @@ -22,7 +22,7 @@ #include <tqtoolbutton.h> #include <tqlabel.h> #include <tqtooltip.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpixmap.h> #include <tqtoolbar.h> #include <tqdockwindow.h> diff --git a/lib/kofficeui/KoToolBox.h b/lib/kofficeui/KoToolBox.h index 7b31d847..764ce4c1 100644 --- a/lib/kofficeui/KoToolBox.h +++ b/lib/kofficeui/KoToolBox.h @@ -104,7 +104,7 @@ public: TQWidget* getNextParent(); private: - TQPtrList<TQWidget> m_children; + TQPtrList<TQWidget> m_tqchildren; TQBoxLayout *m_layout; TQWidget *m_leftRow; diff --git a/lib/kofficeui/KoTooluButton.cpp b/lib/kofficeui/KoTooluButton.cpp index abe449b2..7260bbea 100644 --- a/lib/kofficeui/KoTooluButton.cpp +++ b/lib/kofficeui/KoTooluButton.cpp @@ -53,12 +53,12 @@ KoColorPanel::~KoColorPanel() { } -TQSize KoColorPanel::sizeHint() const +TQSize KoColorPanel::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } -TQSize KoColorPanel::minimumSizeHint() const +TQSize KoColorPanel::tqminimumSizeHint() const { return TQSize( COLS << 4, lines() << 4 ); } @@ -109,7 +109,7 @@ void KoColorPanel::clear() if ( m_colorMap.isEmpty() ) return; - TQSize area( minimumSizeHint() ); + TQSize area( tqminimumSizeHint() ); m_colorMap.clear(); init(); updateGeometry(); @@ -136,7 +136,7 @@ void KoColorPanel::insertDefaultColors() return; m_defaultsAdded = true; - int currentRow = m_nextPosition.y; // we have to repaint this row below + int currentRow = m_nextPosition.y; // we have to tqrepaint this row below // Note: No checking for duplicates, so take care when you modify that list insertColor(TQColor( 255 , 0 , 0 ), i18n( "color", "Red" ), false); @@ -294,9 +294,9 @@ void KoColorPanel::insertDefaultColors() insertColor(TQColor( 0 , 0 , 205 ), i18n( "color", "MediumBlue" ), false); insertColor(TQColor( 0 , 0 , 128 ), i18n( "color", "Navy" ), false); - finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we repaint anyway + finalizeInsertion( m_nextPosition ); // with a no-op paint() call as we tqrepaint anyway updateGeometry(); - // we have to repaint the "old" current row explicitly due + // we have to tqrepaint the "old" current row explicitly due // to WStaticContents update( 0, currentRow << 4, COLS << 4, 16 ); } @@ -369,7 +369,7 @@ void KoColorPanel::paintEvent( TQPaintEvent* e ) if ( hasFocus() && m_focusPosition.x != -1 && m_focusPosition.y != -1 && mapFromPosition( m_focusPosition ).intersects( e->rect() ) ) tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), - colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); --lns; // Attention: We just avoid some lns - 1 statements @@ -580,7 +580,7 @@ void KoColorPanel::updateFocusPosition( const Position& newPosition ) if ( it != m_colorMap.end() ) { // draw at the new focus position tqstyle().tqdrawPrimitive( TQStyle::PE_Panel, &p, TQRect( m_focusPosition.x << 4, m_focusPosition.y << 4, TILESIZE, TILESIZE ), - colorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); + tqcolorGroup(), TQStyle::Style_Sunken | TQStyle::Style_Enabled ); p.fillRect( ( m_focusPosition.x << 4 ) + 2, ( m_focusPosition.y << 4 ) + 2, 12, 12, it.data() ); } @@ -663,21 +663,21 @@ KoToolButton::~KoToolButton() { } -TQSize KoToolButton::sizeHint() const +TQSize KoToolButton::tqsizeHint() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } -TQSize KoToolButton::minimumSizeHint() const +TQSize KoToolButton::tqminimumSizeHint() const { - TQSize size = KToolBarButton::minimumSizeHint(); + TQSize size = KToolBarButton::tqminimumSizeHint(); size.setWidth( size.width() + ARROW_WIDTH ); return size; } -TQSize KoToolButton::minimumSize() const +TQSize KoToolButton::tqminimumSize() const { - return minimumSizeHint(); + return tqminimumSizeHint(); } void KoToolButton::colorSelected( const TQColor& color ) @@ -691,7 +691,7 @@ void KoToolButton::drawButton(TQPainter *_painter) TQStyle::SCFlags active = TQStyle::SC_None; TQStyle::SCFlags arrowActive = TQStyle::SC_None; TQStyleOption opt; - TQColorGroup cg( colorGroup() ); + TQColorGroup cg( tqcolorGroup() ); if ( isEnabled() ) { flags |= TQStyle::Style_Enabled; @@ -712,10 +712,10 @@ void KoToolButton::drawButton(TQPainter *_painter) // Draw styled toolbuttons _painter->setClipRect( 0, 0, width() - ARROW_WIDTH, height() ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( 0, 0, width() - ARROW_WIDTH, height() ), cg, flags, TQStyle::SC_ToolButton, active, opt ); _painter->setClipRect( width() - ARROW_WIDTH, 0, ARROW_WIDTH, height() ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, _painter, this, TQRect( width(), 0, ARROW_WIDTH, height() ), cg, arrowFlags, TQStyle::SC_ToolButton, arrowActive, opt ); _painter->setClipping( false ); @@ -724,7 +724,7 @@ void KoToolButton::drawButton(TQPainter *_painter) cg, flags, opt ); if ( KToolBarButton::isRaised() || m_arrowPressed ) - qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, colorGroup(), true ); + qDrawShadeLine( _painter, width() - ARROW_WIDTH - 1, 0, width() - ARROW_WIDTH - 1, height() - 1, tqcolorGroup(), true ); int dx, dy; TQFont tmp_font( KGlobalSettings::toolBarFont() ); @@ -798,11 +798,11 @@ void KoToolButton::drawButton(TQPainter *_painter) if (!textLabel().isNull() && !textRect.isNull()) { _painter->setFont( KGlobalSettings::toolBarFont() ); if ( !isEnabled() ) - _painter->setPen( palette().disabled().dark() ); + _painter->setPen( tqpalette().disabled().dark() ); else if( KToolBarButton::isRaised() ) _painter->setPen( KGlobalSettings::toolBarHighlightColor() ); else - _painter->setPen( colorGroup().buttonText() ); + _painter->setPen( tqcolorGroup().buttonText() ); _painter->drawText( textRect, textFlags, textLabel() ); } } @@ -838,15 +838,15 @@ void KoToolButton::init() // We are interested in the mouse clicks on the arrow button m_popup->installEventFilter( this ); - ARROW_WIDTH = tqstyle().pixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; + ARROW_WIDTH = tqstyle().tqpixelMetric(TQStyle::PM_MenuButtonIndicator) + 4; kdDebug() << "##################### Arrow: " << ARROW_WIDTH << endl; } void KoToolButton::buttonShift( int& dx, int& dy ) { if ( isDown() && !m_arrowPressed ) { - dx += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftHorizontal ); - dy += tqstyle().pixelMetric( TQStyle::PM_ButtonShiftVertical ); + dx += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ); + dy += tqstyle().tqpixelMetric( TQStyle::PM_ButtonShiftVertical ); } } diff --git a/lib/kofficeui/KoTooluButton.h b/lib/kofficeui/KoTooluButton.h index 804b270b..1374f6d2 100644 --- a/lib/kofficeui/KoTooluButton.h +++ b/lib/kofficeui/KoTooluButton.h @@ -34,8 +34,8 @@ public: KoColorPanel( TQWidget* parent = 0, const char* name = 0 ); virtual ~KoColorPanel(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; enum MenuStyle { Plain, CustomColors }; static TQPopupMenu* createColorPopup( MenuStyle style, const TQColor& defaultColor, @@ -163,9 +163,9 @@ public: virtual ~KoToolButton(); - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; - virtual TQSize minimumSize() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; + virtual TQSize tqminimumSize() const; public slots: void colorSelected( const TQColor& color ); diff --git a/lib/kofficeui/KoUnitWidgets.cpp b/lib/kofficeui/KoUnitWidgets.cpp index a5af7bdf..476e35b3 100644 --- a/lib/kofficeui/KoUnitWidgets.cpp +++ b/lib/kofficeui/KoUnitWidgets.cpp @@ -24,7 +24,7 @@ #include <kglobal.h> #include <klocale.h> #include <tqpushbutton.h> -#include <layout.h> +#include <tqlayout.h> // ---------------------------------------------------------------- @@ -90,7 +90,7 @@ KoUnitDoubleValidator::validate( TQString &s, int &pos ) const TQString KoUnitDoubleBase::getVisibleText( double value ) const { - const TQString num ( TQString( "%1%2").arg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); + const TQString num ( TQString( "%1%2").tqarg( KGlobal::locale()->formatNumber( value, m_precision ), KoUnit::unitName( m_unit ) ) ); kdDebug(30004) << "getVisibleText: " << TQString::number( value, 'f', 12 ) << " => " << num << endl; return num; } @@ -223,7 +223,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, const char *name ) : KLineEdit( parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - setAlignment( TQt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -235,7 +235,7 @@ KoUnitDoubleLineEdit::KoUnitDoubleLineEdit( TQWidget *parent, double lower, doub : KLineEdit( parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - setAlignment( TQt::AlignRight ); + tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); setValidator( m_validator ); setUnit( unit ); @@ -287,7 +287,7 @@ double KoUnitDoubleLineEdit::value( void ) const KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, const char *name ) : KComboBox( true, parent, name ), KoUnitDoubleBase( KoUnit::U_PT, 2 ), m_value( 0.0 ), m_lower( 0.0 ), m_upper( 9999.99 ), m_lowerInPoints( 0.0 ), m_upperInPoints( 9999.99 ) { - lineEdit()->setAlignment( TQt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); lineEdit()->setValidator( m_validator ); setUnit( KoUnit::U_PT ); @@ -300,7 +300,7 @@ KoUnitDoubleComboBox::KoUnitDoubleComboBox( TQWidget *parent, double lower, doub : KComboBox( true, parent, name ), KoUnitDoubleBase( unit, precision ), m_value( value ), m_lower( lower ), m_upper( upper ), m_lowerInPoints( lower ), m_upperInPoints( upper ) { - lineEdit()->setAlignment( TQt::AlignRight ); + lineEdit()->tqsetAlignment( TQt::AlignRight ); m_validator = new KoUnitDoubleValidator( this, TQT_TQOBJECT(this) ); lineEdit()->setValidator( m_validator ); setUnit( unit ); @@ -379,48 +379,48 @@ double KoUnitDoubleComboBox::value( void ) const KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *parent, const char *name ) : TQWidget( parent ), m_step( 1.0 ) { - TQGridLayout *layout = new TQGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); + tqlayout->addWidget( up, 0, 0 ); connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); + tqlayout->addWidget( down, 1, 0 ); connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( 0.0, KoUnit::U_PT ), KoUnit::ptToUnit( 9999.99, KoUnit::U_PT ), 0.0, KoUnit::U_PT, 2, name ); connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } KoUnitDoubleSpinComboBox::KoUnitDoubleSpinComboBox( TQWidget *parent, double lower, double upper, double step, double value, KoUnit::Unit unit, unsigned int precision, const char *name ) : TQWidget( parent ), m_step( step )//, m_lowerInPoints( lower ), m_upperInPoints( upper ) { - TQGridLayout *layout = new TQGridLayout( this, 2, 3 ); - //layout->setMargin( 2 ); + TQGridLayout *tqlayout = new TQGridLayout( this, 2, 3 ); + //tqlayout->setMargin( 2 ); TQPushButton *up = new TQPushButton( "+", this ); //up->setFlat( true ); up->setMaximumHeight( 15 ); up->setMaximumWidth( 15 ); - layout->addWidget( up, 0, 0 ); + tqlayout->addWidget( up, 0, 0 ); connect( up, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotUpClicked() ) ); TQPushButton *down = new TQPushButton( "-", this ); down->setMaximumHeight( 15 ); down->setMaximumWidth( 15 ); - layout->addWidget( down, 1, 0 ); + tqlayout->addWidget( down, 1, 0 ); connect( down, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotDownClicked() ) ); m_combo = new KoUnitDoubleComboBox( this, KoUnit::ptToUnit( lower, unit ), KoUnit::ptToUnit( upper, unit ), value, unit, precision, name ); connect( m_combo, TQT_SIGNAL( valueChanged( double ) ), this, TQT_SIGNAL( valueChanged( double ) ) ); - layout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); + tqlayout->addMultiCellWidget( m_combo, 0, 1, 2, 2 ); } void diff --git a/lib/kofficeui/KoZoomAction.cpp b/lib/kofficeui/KoZoomAction.cpp index df1bac4d..7f9e4139 100644 --- a/lib/kofficeui/KoZoomAction.cpp +++ b/lib/kofficeui/KoZoomAction.cpp @@ -69,10 +69,10 @@ void KoZoomAction::setZoom( const TQString& text ) // update items with new sorted zoom values TQStringList values; for (TQValueList<int>::Iterator it = list.begin(); it != list.end(); ++it ) - values.append( i18n("%1%").arg(*it) ); + values.append( i18n("%1%").tqarg(*it) ); setItems( values ); - TQString zoomStr = i18n("%1%").arg( zoom ); + TQString zoomStr = i18n("%1%").tqarg( zoom ); setCurrentItem( values.findIndex( zoomStr ) ); } @@ -92,21 +92,21 @@ void KoZoomAction::init() setEditable( true ); TQStringList values; - values << i18n("%1%").arg("33"); - values << i18n("%1%").arg("50"); - values << i18n("%1%").arg("75"); - values << i18n("%1%").arg("100"); - values << i18n("%1%").arg("125"); - values << i18n("%1%").arg("150"); - values << i18n("%1%").arg("200"); - values << i18n("%1%").arg("250"); - values << i18n("%1%").arg("350"); - values << i18n("%1%").arg("400"); - values << i18n("%1%").arg("450"); - values << i18n("%1%").arg("500"); + values << i18n("%1%").tqarg("33"); + values << i18n("%1%").tqarg("50"); + values << i18n("%1%").tqarg("75"); + values << i18n("%1%").tqarg("100"); + values << i18n("%1%").tqarg("125"); + values << i18n("%1%").tqarg("150"); + values << i18n("%1%").tqarg("200"); + values << i18n("%1%").tqarg("250"); + values << i18n("%1%").tqarg("350"); + values << i18n("%1%").tqarg("400"); + values << i18n("%1%").tqarg("450"); + values << i18n("%1%").tqarg("500"); setItems( values ); - setCurrentItem( values.findIndex( i18n("%1%").arg( 100 ) ) ); + setCurrentItem( values.findIndex( i18n("%1%").tqarg( 100 ) ) ); connect( this, TQT_SIGNAL( activated( const TQString& ) ), TQT_SLOT( activated( const TQString& ) ) ); diff --git a/lib/kofficeui/Kolinewidthaction.cpp b/lib/kofficeui/Kolinewidthaction.cpp index c2d86aa6..c812c1c6 100644 --- a/lib/kofficeui/Kolinewidthaction.cpp +++ b/lib/kofficeui/Kolinewidthaction.cpp @@ -24,7 +24,7 @@ #include <tqbitmap.h> #include <tqwhatsthis.h> #include <tqmenubar.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlabel.h> #include <kpopupmenu.h> diff --git a/lib/kofficeui/kcoloractions.cpp b/lib/kofficeui/kcoloractions.cpp index e09ef63d..c0da86e9 100644 --- a/lib/kofficeui/kcoloractions.cpp +++ b/lib/kofficeui/kcoloractions.cpp @@ -266,7 +266,7 @@ int KSelectColorAction::plug( TQWidget* w, int index ) menu->setItemEnabled( id, false ); if ( !whatsThis().isEmpty() ) - menu->setWhatsThis( id, whatsThisWithIcon() ); + menu->tqsetWhatsThis( id, whatsThisWithIcon() ); addContainer( menu, id ); connect( menu, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); @@ -341,7 +341,7 @@ TQString KSelectColorAction::whatsThisWithIcon() const { TQString text = whatsThis(); if (!icon().isEmpty()) - return TQString::fromLatin1("<img source=\"small|%1\"> %2").arg(icon()).arg(text); + return TQString::tqfromLatin1("<img source=\"small|%1\"> %2").tqarg(icon()).tqarg(text); return text; } diff --git a/lib/kofficeui/tests/coloraction_test.cpp b/lib/kofficeui/tests/coloraction_test.cpp index 4739ee81..729285bb 100644 --- a/lib/kofficeui/tests/coloraction_test.cpp +++ b/lib/kofficeui/tests/coloraction_test.cpp @@ -18,7 +18,7 @@ * Boston, MA 02110-1301, USA. */ -#include <layout.h> +#include <tqlayout.h> #include <tqvgroupbox.h> #include <tqpopupmenu.h> #include <tqmenubar.h> @@ -36,19 +36,19 @@ TopLevel::TopLevel( TQWidget* parent, const char* name) : TQMainWindow( parent, name ) { - setCaption( TQString::fromLatin1( "KColorAction test application" ) ); + setCaption( TQString::tqfromLatin1( "KColorAction test application" ) ); TQWidget *w = new TQWidget( this ); setCentralWidget( w ); TQBoxLayout* l = new TQHBoxLayout( w, KDialog::marginHint(), KDialog::spacingHint() ); - TQGroupBox* b1 = new TQVGroupBox( TQString::fromLatin1( "KoColorPanel 1" ), w ); + TQGroupBox* b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 1" ), w ); panel = new KoColorPanel( b1, "panel1" ); connect( panel, TQT_SIGNAL( colorSelected( const TQColor& ) ), TQT_SLOT( slotColorSelected( const TQColor& ) ) ); //panel->insertDefaultColors(); l->addWidget( b1 ); - b1 = new TQVGroupBox( TQString::fromLatin1( "KoColorPanel 2" ), w ); + b1 = new TQVGroupBox( TQString::tqfromLatin1( "KoColorPanel 2" ), w ); ( void ) new KoColorPanel( b1, "panel2" ); l->addWidget( b1 ); diff --git a/lib/kofficeui/tkaction.cpp b/lib/kofficeui/tkaction.cpp index c62b7745..6a7d198a 100644 --- a/lib/kofficeui/tkaction.cpp +++ b/lib/kofficeui/tkaction.cpp @@ -22,7 +22,7 @@ #include "tkcombobox.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <ktoolbar.h> #include <kiconloader.h> @@ -120,19 +120,19 @@ void TKAction::updateLayout() } } -TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* children) +TQWidget* TKAction::createLayout(TQWidget* parent, TQWidget* tqchildren) { TQWidget* base = new TQWidget(parent,"KTToolBarLayout"); TQLabel* textLabel = new TQLabel(base,"text"); textLabel->setMinimumHeight(1); TQLabel* pixLabel = new TQLabel(base,"pixmap"); - children->reparent(base,TQPoint(0,0)); - children->setName("widget"); - TQHBoxLayout* layout = new TQHBoxLayout(base,0,3); - layout->setResizeMode(TQLayout::Minimum); - layout->addWidget(textLabel); - layout->addWidget(pixLabel); - layout->addWidget(children,1); + tqchildren->reparent(base,TQPoint(0,0)); + tqchildren->setName("widget"); + TQHBoxLayout* tqlayout = new TQHBoxLayout(base,0,3); + tqlayout->setResizeMode(TQLayout::Minimum); + tqlayout->addWidget(textLabel); + tqlayout->addWidget(pixLabel); + tqlayout->addWidget(tqchildren,1); updateLayout(base); return base; @@ -166,9 +166,9 @@ void TKAction::updateLayout(TQWidget* base) } else pixLabel->hide(); - base->setFixedWidth( w->sizeHint().width() + - (textLabel->isVisible() ? textLabel->sizeHint().width():0) + - (pixLabel->isVisible() ? pixLabel->sizeHint().width():0) ); + base->setFixedWidth( w->tqsizeHint().width() + + (textLabel->isVisible() ? textLabel->tqsizeHint().width():0) + + (pixLabel->isVisible() ? pixLabel->tqsizeHint().width():0) ); } /******************************************************************************/ TKBaseSelectAction::TKBaseSelectAction( TQObject* parent, const char* name ) @@ -191,7 +191,7 @@ int TKBaseSelectAction::plug(TQWidget* widget, int index) TKComboBox* cb = new TKComboBox(m_editable,bar); initComboBox(cb); - cb->setMinimumWidth( cb->sizeHint().width() ); + cb->setMinimumWidth( cb->tqsizeHint().width() ); TQWidget* base = createLayout(bar,cb); bar->insertWidget( id_, 100, base, index ); diff --git a/lib/kofficeui/tkaction.h b/lib/kofficeui/tkaction.h index b9a84a41..26b4069d 100644 --- a/lib/kofficeui/tkaction.h +++ b/lib/kofficeui/tkaction.h @@ -44,7 +44,7 @@ public: protected: virtual void initToolBarButton(TKToolBarButton*); - TQWidget* createLayout(TQWidget* parent, TQWidget* children); + TQWidget* createLayout(TQWidget* parent, TQWidget* tqchildren); void updateLayout(); virtual void updateLayout(TQWidget*); diff --git a/lib/kofficeui/tkcoloractions.cpp b/lib/kofficeui/tkcoloractions.cpp index a425421c..1449d0fb 100644 --- a/lib/kofficeui/tkcoloractions.cpp +++ b/lib/kofficeui/tkcoloractions.cpp @@ -22,7 +22,7 @@ #include "tkcoloractions.h" #include "tktoolbarbutton.h" -#include <layout.h> +#include <tqlayout.h> #include <kcolordialog.h> #include <ktoolbar.h> #include <tqpainter.h> diff --git a/lib/kofficeui/tkcombobox.cpp b/lib/kofficeui/tkcombobox.cpp index cd20f790..d1cb7ac2 100644 --- a/lib/kofficeui/tkcombobox.cpp +++ b/lib/kofficeui/tkcombobox.cpp @@ -59,7 +59,7 @@ void TKComboBox::paintEvent(TQPaintEvent*) int bh = height()-4; TQPainter p( this ); - const TQColorGroup& g = colorGroup(); + const TQColorGroup& g = tqcolorGroup(); TQRect fr(2,2,width()-4,height()-4); @@ -87,8 +87,8 @@ void TKComboBox::paintEvent(TQPaintEvent*) TQPixmap pixmap(arrow_down); - tqstyle().drawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), colorGroup() ); - tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, colorGroup(), isEnabled(), &pixmap, TQString() ); + tqstyle().tqdrawControl( TQStyle::CE_PushButton, &p, this, TQRect( bx, by, bw, bh ), tqcolorGroup() ); + tqstyle().drawItem( &p, TQRect( bx, by, bw, bh), AlignCenter, tqcolorGroup(), isEnabled(), &pixmap, TQString() ); if ( hasFocus()) { tqstyle().tqdrawPrimitive( TQStyle::PE_FocusRect, &p, fr, g ); diff --git a/lib/kofficeui/tktoolbarbutton.cpp b/lib/kofficeui/tktoolbarbutton.cpp index 5f829589..b0520a2c 100644 --- a/lib/kofficeui/tktoolbarbutton.cpp +++ b/lib/kofficeui/tktoolbarbutton.cpp @@ -182,7 +182,7 @@ void TKToolBarButton::setEnabled( bool enabled ) void TKToolBarButton::setText( const TQString& text) { d->m_text = text; - repaint(false); + tqrepaint(false); } void TKToolBarButton::setIcon( const TQString& icon ) @@ -281,7 +281,7 @@ void TKToolBarButton::setDelayedPopup (TQPopupMenu *p, bool toggle ) void TKToolBarButton::setRaised(bool f) { d->m_isRaised = f; - repaint(false); + tqrepaint(false); } void TKToolBarButton::setAutoRaised(bool f) @@ -308,7 +308,7 @@ void TKToolBarButton::enterEvent(TQEvent *) } else { TQToolButton::setPixmap(disabledPixmap); } - repaint(false); + tqrepaint(false); } } @@ -332,7 +332,7 @@ bool TKToolBarButton::eventFilter(TQObject *o, TQEvent *ev) case TQEvent::Hide: on(false); setDown(false); - if ( !geometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) + if ( !tqgeometry().contains(parentWidget()->mapFromGlobal(TQCursor::pos())) ) leaveEvent(0L); return false; break; @@ -353,14 +353,14 @@ void TKToolBarButton::drawButton( TQPainter* p ) #define DRAW_PIXMAP_AND_TEXT \ int x = 3;\ if (pixmap()) {\ - tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, colorGroup(), isEnabled(), pixmap(), TQString() );\ + tqstyle().drawItem( p, TQRect( x, 0, pixmap()->width(), height() ), AlignCenter, tqcolorGroup(), isEnabled(), pixmap(), TQString() );\ if (d->m_iconMode==TK::IconAndText && !d->m_text.isEmpty()) {\ x += pixmap()->width() + 3;\ }\ }\ if ((d->m_iconMode==TK::IconAndText||d->m_iconMode==TK::TextOnly) && !d->m_text.isEmpty()) {\ TQFontMetrics fm(KGlobalSettings::toolBarFont());\ - tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, colorGroup(), isEnabled(), 0, d->m_text );\ + tqstyle().drawItem( p, TQRect( x, 0, fm.width(d->m_text), height() ), AlignCenter, tqcolorGroup(), isEnabled(), 0, d->m_text );\ } const char* arrow[] = { @@ -384,20 +384,20 @@ void TKToolBarButton::drawButton( TQPainter* p ) if (d->m_isRaised) flags |= TQStyle::Style_Raised; if (hasFocus()) flags |= TQStyle::Style_HasFocus; - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), colorGroup(), flags, TQStyle::SC_ToolButton ); - tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, colorGroup(), isEnabled(), &arrow_pix, TQString() ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( 0, 0, width()-12, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, TQRect( width()-13, 0, 13, height() ), tqcolorGroup(), flags, TQStyle::SC_ToolButton ); + tqstyle().drawItem( p, TQRect( width()-13, 0, 13, height() ), AlignCenter, tqcolorGroup(), isEnabled(), &arrow_pix, TQString() ); if ( d->m_isRaised ) - qDrawShadeLine( p, width()-12, 0, width()-12, height(), colorGroup(), true ); + qDrawShadeLine( p, width()-12, 0, width()-12, height(), tqcolorGroup(), true ); DRAW_PIXMAP_AND_TEXT } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); + tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); DRAW_PIXMAP_AND_TEXT int z = f ? 1:0; p->drawPixmap(width()-11+z,(height()-4)/2+z ,arrow_pix); } } else { - tqstyle().drawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? colorGroup() : palette().disabled(), f ); + tqstyle().tqdrawControl( TQStyle::CE_PushButton, p, this, TQRect( 0, 0, width(), height() ), isEnabled() ? tqcolorGroup() : tqpalette().disabled(), f ); DRAW_PIXMAP_AND_TEXT } } @@ -409,7 +409,7 @@ void TKToolBarButton::paletteChange(const TQPalette &) TQToolButton::setPixmap( disabledPixmap ); else TQToolButton::setPixmap( defaultPixmap ); - repaint(false); + tqrepaint(false); } void TKToolBarButton::makeDefaultPixmap() @@ -430,14 +430,14 @@ void TKToolBarButton::makeDisabledPixmap() disabledPixmap = effect.apply(activePixmap, KIcon::Toolbar, KIcon::DisabledState); } -TQSize TKToolBarButton::sizeHint() const +TQSize TKToolBarButton::tqsizeHint() const { - return minimumSize(); + return tqminimumSize(); } -TQSize TKToolBarButton::minimumSizeHint() const +TQSize TKToolBarButton::tqminimumSizeHint() const { - return minimumSize(); + return tqminimumSize(); } void TKToolBarButton::showMenu() @@ -502,7 +502,7 @@ void TKToolBarButton::slotToggled() void TKToolBarButton::on(bool flag) { d->m_isOn = flag; - repaint(); + tqrepaint(); } void TKToolBarButton::toggle() @@ -519,14 +519,14 @@ void TKToolBarButton::setToggle(bool flag) disconnect(this, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(slotToggled())); modeChange(); - repaint(); + tqrepaint(); } void TKToolBarButton::setIconMode( TK::IconMode m ) { d->m_iconMode = m; modeChange(); - repaint(); + tqrepaint(); } #include <tktoolbarbutton.moc> diff --git a/lib/kofficeui/tktoolbarbutton.h b/lib/kofficeui/tktoolbarbutton.h index 883d7811..3cec2f57 100644 --- a/lib/kofficeui/tktoolbarbutton.h +++ b/lib/kofficeui/tktoolbarbutton.h @@ -180,8 +180,8 @@ public: TQPixmap getActivePixmap() const; - virtual TQSize sizeHint() const; - virtual TQSize minimumSizeHint() const; + virtual TQSize tqsizeHint() const; + virtual TQSize tqminimumSizeHint() const; signals: void buttonClicked(); diff --git a/lib/kopainter/koColorChooser.cc b/lib/kopainter/koColorChooser.cc index dc70b921..e2406a79 100644 --- a/lib/kopainter/koColorChooser.cc +++ b/lib/kopainter/koColorChooser.cc @@ -21,7 +21,7 @@ #include "koColorChooser.h" #include <tqcolor.h> -#include <layout.h> +#include <tqlayout.h> #include <tqspinbox.h> #include <tqtabwidget.h> diff --git a/lib/kopainter/koColorSlider.cc b/lib/kopainter/koColorSlider.cc index 6e7c0239..6c1f8230 100644 --- a/lib/kopainter/koColorSlider.cc +++ b/lib/kopainter/koColorSlider.cc @@ -60,14 +60,14 @@ void KoColorFrame::slotSetColor1(const TQColor &c) mC1 = c; mColorChanged = true; mPixChanged = true; - repaint(); + tqrepaint(); } void KoColorFrame::slotSetColor2(const TQColor &c) { mC2 = c; mColorChanged = true; - repaint(); + tqrepaint(); } void KoColorFrame::drawContents(TQPainter *p) diff --git a/lib/kopainter/koFrameButton.cc b/lib/kopainter/koFrameButton.cc index d5f2dada..c87fe230 100644 --- a/lib/kopainter/koFrameButton.cc +++ b/lib/kopainter/koFrameButton.cc @@ -37,7 +37,7 @@ TQLabel(parent, name) setFrameStyle(Panel | Raised); setLineWidth(1); setText(text); - setAlignment(AlignHCenter | AlignVCenter); + tqsetAlignment(AlignHCenter | AlignVCenter); mActive = false; mToggle = false; } diff --git a/lib/kopainter/koIconChooser.cc b/lib/kopainter/koIconChooser.cc index 6d122592..4604bbbd 100644 --- a/lib/kopainter/koIconChooser.cc +++ b/lib/kopainter/koIconChooser.cc @@ -26,7 +26,7 @@ #include <tqcursor.h> #include <tqapplication.h> #include <tqhbox.h> -#include <layout.h> +#include <tqlayout.h> #include <kdebug.h> KoPixmapWidget::KoPixmapWidget(const TQPixmap &aPixmap, TQWidget *parent, const char *name): @@ -166,7 +166,7 @@ void KoIconChooser::setCurrentItem(KoIconItem *item) mCurRow = index / mNCols; mCurCol = index % mNCols; - // repaint the old and the new item + // tqrepaint the old and the new item repaintCell(oldRow, oldCol); repaintCell(mCurRow, mCurCol); @@ -446,7 +446,7 @@ KoPatternChooser::KoPatternChooser( const TQPtrList<KoIconItem> &list, TQWidget for( itr.toFirst(); itr.current(); ++itr ) chooser->addItem( itr.current() ); - TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 1, -1, "main layout" ); + TQVBoxLayout *mainLayout = new TQVBoxLayout( this, 1, -1, "main tqlayout" ); mainLayout->addWidget( chooser, 10 ); } diff --git a/lib/kopainter/ko_cmyk_widget.cc b/lib/kopainter/ko_cmyk_widget.cc index 01c71d84..1eb9eece 100644 --- a/lib/kopainter/ko_cmyk_widget.cc +++ b/lib/kopainter/ko_cmyk_widget.cc @@ -22,7 +22,7 @@ #include "ko_cmyk_widget.h" -#include <layout.h> +#include <tqlayout.h> #include <tqhbox.h> #include <tqlabel.h> #include <tqspinbox.h> @@ -41,7 +41,7 @@ KoCMYKWidget::KoCMYKWidget(TQWidget *parent, const char *name) : super(parent, name) { m_ColorButton = new KDualColorButton(this); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); TQGridLayout *mGrid = new TQGridLayout(this, 4, 5, 5, 2); /* setup color sliders */ diff --git a/lib/kopainter/ko_color_wheel.cc b/lib/kopainter/ko_color_wheel.cc index f309125c..0c268849 100644 --- a/lib/kopainter/ko_color_wheel.cc +++ b/lib/kopainter/ko_color_wheel.cc @@ -49,7 +49,7 @@ void KoColorWheel::drawWheel( TQPixmap *pixmap ) TQPoint center(size/2, size/2); TQImage image( size, size, 32 ); - image.fill(colorGroup ().background().pixel()); + image.fill(tqcolorGroup ().background().pixel()); TQColor col; int a, b, h, s; diff --git a/lib/kopainter/ko_gray_widget.cc b/lib/kopainter/ko_gray_widget.cc index fb59947e..e40031b5 100644 --- a/lib/kopainter/ko_gray_widget.cc +++ b/lib/kopainter/ko_gray_widget.cc @@ -19,7 +19,7 @@ #include "ko_gray_widget.h" -#include <layout.h> +#include <tqlayout.h> #include <tqhbox.h> #include <tqlabel.h> #include <tqspinbox.h> @@ -36,7 +36,7 @@ KoGrayWidget::KoGrayWidget(TQWidget *parent, const char *name) : super(parent, n m_ColorButton = new KDualColorButton(this); Q_CHECK_PTR(m_ColorButton); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2); /* setup color sliders */ diff --git a/lib/kopainter/ko_hsv_widget.cc b/lib/kopainter/ko_hsv_widget.cc index 840c0b2d..c870248a 100644 --- a/lib/kopainter/ko_hsv_widget.cc +++ b/lib/kopainter/ko_hsv_widget.cc @@ -21,7 +21,7 @@ #include "ko_color_wheel.h" #include <kselect.h> -#include <layout.h> +#include <tqlayout.h> #include <tqhbox.h> #include <tqlabel.h> #include <tqspinbox.h> @@ -37,7 +37,7 @@ KoHSVWidget::KoHSVWidget(TQWidget *parent, const char *name) : super(parent, name) { m_ColorButton = new KDualColorButton(this); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); TQGridLayout *mGrid = new TQGridLayout(this, 5, 7, 5, 2); m_colorwheel = new KoColorWheel(this); @@ -96,7 +96,7 @@ KoHSVWidget::KoHSVWidget(TQWidget *parent, const char *name) : super(parent, nam connect(mSIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSChanged(int))); connect(mVIn, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotVChanged(int))); - //setFixedSize(mGrid -> minimumSize()); + //setFixedSize(mGrid -> tqminimumSize()); m_autovalue = true; // So on the initial selection of h or v, s gets set to 255. update(TQt::black, TQt::white); @@ -236,7 +236,7 @@ void KoHSVWidget::update(const KoColor & fgColor, const KoColor & bgColor) mSIn->blockSignals(false); mVIn->blockSignals(false); m_VSelector->blockSignals(false); - m_VSelector->repaint(false); + m_VSelector->tqrepaint(false); m_colorwheel->blockSignals(false); } diff --git a/lib/kopainter/ko_rgb_widget.cc b/lib/kopainter/ko_rgb_widget.cc index 1eadfc96..5eaef38e 100644 --- a/lib/kopainter/ko_rgb_widget.cc +++ b/lib/kopainter/ko_rgb_widget.cc @@ -21,7 +21,7 @@ #include "ko_rgb_widget.h" -#include <layout.h> +#include <tqlayout.h> #include <tqhbox.h> #include <tqlabel.h> #include <tqspinbox.h> @@ -38,7 +38,7 @@ KoRGBWidget::KoRGBWidget(TQWidget *parent, const char *name) : super(parent, name) { m_ColorButton = new KDualColorButton(this); - m_ColorButton -> setFixedSize(m_ColorButton->sizeHint()); + m_ColorButton -> setFixedSize(m_ColorButton->tqsizeHint()); TQGridLayout *mGrid = new TQGridLayout(this, 3, 5, 5, 2); /* setup color sliders */ diff --git a/lib/kopainter/kogradientmanager.cc b/lib/kopainter/kogradientmanager.cc index a2265d59..c95a5671 100644 --- a/lib/kopainter/kogradientmanager.cc +++ b/lib/kopainter/kogradientmanager.cc @@ -21,7 +21,7 @@ #include "svgnamedcolors.h" -#include <textstream.h> +#include <tqtextstream.h> #include <tqcstring.h> #include <kdebug.h> diff --git a/lib/kopalette/kopalette.cc b/lib/kopalette/kopalette.cc index ed9df8e6..600dad1c 100644 --- a/lib/kopalette/kopalette.cc +++ b/lib/kopalette/kopalette.cc @@ -21,12 +21,12 @@ #include <tqlabel.h> #include <tqtoolbutton.h> #include <tqtabwidget.h> -#include <layout.h> +#include <tqlayout.h> #include <tqtooltip.h> #include <tqwhatsthis.h> #include <tqimage.h> #include <tqpixmap.h> -#include <layout.h> +#include <tqlayout.h> #include <kdebug.h> #include <kglobal.h> @@ -54,8 +54,8 @@ KoPalette::KoPalette(TQWidget * parent, const char * name) setHorizontallyStretchable(false); setNewLine(true); - layout() -> setSpacing(0); - layout() -> setMargin(0); + tqlayout() -> setSpacing(0); + tqlayout() -> setMargin(0); resetFont(); } @@ -82,7 +82,7 @@ KoPalette::~KoPalette() void KoPalette::setMainWidget(TQWidget * widget) { setWidget(widget); - resize( TQSize(285, 233).expandedTo(minimumSizeHint()) ); + resize( TQSize(285, 233).expandedTo(tqminimumSizeHint()) ); clearWState( WState_Polished ); widget->setFont(m_font); m_page = widget; diff --git a/lib/kopalette/kopalette.h b/lib/kopalette/kopalette.h index 3ea6c475..48d9cb3c 100644 --- a/lib/kopalette/kopalette.h +++ b/lib/kopalette/kopalette.h @@ -25,7 +25,7 @@ #include <tqpixmap.h> #include <tqstring.h> #include <tqfont.h> -#include <layout.h> +#include <tqlayout.h> #include <koffice_export.h> #include "kopalettemanager.h" diff --git a/lib/kopalette/kopalettemanager.cc b/lib/kopalette/kopalettemanager.cc index 91d237a3..94ea8d4d 100644 --- a/lib/kopalette/kopalettemanager.cc +++ b/lib/kopalette/kopalettemanager.cc @@ -165,8 +165,8 @@ void KoPaletteManager::addWidget(TQWidget * widget, } KToggleAction * a; - a = new KToggleAction(i18n("Show %1").arg(widget->caption()), 0, m_mapper, TQT_SLOT(map()), m_actionCollection); - a->setCheckedState(i18n("Hide %1").arg(widget->caption())); + a = new KToggleAction(i18n("Show %1").tqarg(widget->caption()), 0, m_mapper, TQT_SLOT(map()), m_actionCollection); + a->setCheckedState(i18n("Hide %1").tqarg(widget->caption())); m_mapper->setMapping(a, m_widgetNames->count()); // This is the position at which we'll insert the action m_actions->insert( name, a ); diff --git a/lib/kopalette/kopalettemanager.h b/lib/kopalette/kopalettemanager.h index dd8f1686..be9e7126 100644 --- a/lib/kopalette/kopalettemanager.h +++ b/lib/kopalette/kopalettemanager.h @@ -172,7 +172,7 @@ public slots: void showAllPalettes(bool shown); /** - * Restores the palette configuration to the default layout, i.e, the layout + * Restores the palette configuration to the default tqlayout, i.e, the tqlayout * preferred by each docker. */ virtual void slotReset(); diff --git a/lib/koproperty/editor.cpp b/lib/koproperty/editor.cpp index 59983222..6ffdcf5c 100644 --- a/lib/koproperty/editor.cpp +++ b/lib/koproperty/editor.cpp @@ -27,7 +27,7 @@ #include "widget.h" #include <tqpushbutton.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmap.h> #include <tqguardedptr.h> #include <tqheader.h> @@ -233,7 +233,7 @@ Editor::fill() } } -// repaint(); +// tqrepaint(); if (firstChild()) { @@ -271,12 +271,12 @@ Editor::addItem(const TQCString &name, EditorItem *parent) // Create child items item->setOpen(true); - if(!property->children()) + if(!property->tqchildren()) return; last = 0; - TQValueList<Property*>::ConstIterator endIt = property->children()->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property->children()->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = property->tqchildren()->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property->tqchildren()->constBegin(); it != endIt; ++it) { //! \todo allow to have child prop with child items too if( *it && (*it)->isVisible() ) last = new EditorItem(this, item, *it, last); @@ -366,7 +366,7 @@ Editor::changeSetInternal(Set *set, bool preservePrevSelection, const TQCString& if (item) { d->itemToSelectLater = item; TQTimer::singleShot(10, this, TQT_SLOT(selectItemLater())); - //d->doNotSetFocusOnSelection = !hasParent(this, focusWidget()); + //d->doNotSetFocusOnSelection = !hasParent(this, tqfocusWidget()); //setSelected(item, true); //d->doNotSetFocusOnSelection = false; // ensureItemVisible(item); @@ -590,7 +590,7 @@ Editor::slotClicked(TQListViewItem *it) if (d->currentWidget) { if (d->currentWidget->visibleFlag()) { d->currentWidget->show(); - if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->focusWidget()) )) + if (hasParent( TQT_TQOBJECT(this), TQT_TQOBJECT(kapp->tqfocusWidget()) )) d->currentWidget->setFocus(); } } @@ -652,7 +652,7 @@ Editor::createWidgetForProperty(Property *property, bool changeWidgetProperty) this, TQT_SLOT(slotWidgetRejectInput(Widget*)) ); } - //update geometry earlier, because Widget::setValue() can depend on widget's geometry + //update tqgeometry earlier, because Widget::setValue() can depend on widget's tqgeometry updateEditorGeometry(d->currentItem, widget); if(widget && (!widget->property() || changeWidgetProperty)) @@ -720,10 +720,10 @@ Editor::updateGroupLabelsPosition() EditorGroupItem *group = dynamic_cast<EditorGroupItem*>(d->topItem->firstChild()); while(group) { - TQRect r = itemRect((TQListViewItem*) group); + TQRect r = tqitemRect((TQListViewItem*) group); if(group->label()) { group->label()->setGeometry(r); - group->label()->repaint(); + group->label()->tqrepaint(); } group = dynamic_cast<EditorGroupItem*>(group->nextSibling()); } @@ -747,8 +747,8 @@ Editor::showUndoButton( bool show ) if (!d->currentItem || !d->currentWidget || (d->currentWidget && d->currentWidget->isReadOnly())) return; - int y = viewportToContents(TQPoint(0, itemRect(d->currentItem).y())).y(); - TQRect geometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); + int y = viewportToContents(TQPoint(0, tqitemRect(d->currentItem).y())).y(); + TQRect tqgeometry(columnWidth(0), y, columnWidth(1) + 1, d->currentItem->height()); d->undoButton->resize(d->baseRowHeight, d->currentItem->height()); updateEditorGeometry(true, show); @@ -756,21 +756,21 @@ Editor::showUndoButton( bool show ) if (!show) { /* if (d->currentWidget) { if (d->currentWidget->leavesTheSpaceForRevertButton()) { - geometry.setWidth(geometry.width()-d->undoButton->width()); + tqgeometry.setWidth(tqgeometry.width()-d->undoButton->width()); } - d->currentWidget->resize(geometry.width(), geometry.height()); + d->currentWidget->resize(tqgeometry.width(), tqgeometry.height()); }*/ d->undoButton->hide(); return; } - TQPoint p = contentsToViewport(TQPoint(0, geometry.y())); - d->undoButton->move(geometry.x() + geometry.width() + TQPoint p = contentsToViewport(TQPoint(0, tqgeometry.y())); + d->undoButton->move(tqgeometry.x() + tqgeometry.width() -((d->currentWidget && d->currentWidget->hasBorders())?1:0)/*editor is moved by 1 to left*/ - d->undoButton->width(), p.y()); // if (d->currentWidget) { // d->currentWidget->move(d->currentWidget->x(), p.y()); -// d->currentWidget->resize(geometry.width()-d->undoButton->width(), geometry.height()); +// d->currentWidget->resize(tqgeometry.width()-d->undoButton->width(), tqgeometry.height()); // } d->undoButton->show(); } @@ -791,7 +791,7 @@ Editor::slotExpanded(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } void @@ -815,7 +815,7 @@ Editor::slotCollapsed(TQListViewItem *item) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } void @@ -826,7 +826,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) Q_UNUSED(newSize); /*for (TQListViewItemIterator it(this); it.current(); ++it) { if (section == 0 && dynamic_cast<EditorGroupItem*>(it.current())) { - it.current()->repaint(); + it.current()->tqrepaint(); } }*/ /* @@ -843,7 +843,7 @@ Editor::slotColumnSizeChanged(int section, int oldSize, int newSize) } }*/ // repaintContents(); -// repaint(); +// tqrepaint(); updateEditorGeometry(); update(); } @@ -869,10 +869,10 @@ Editor::slotColumnSizeChanged(int section) } TQSize -Editor::sizeHint() const +Editor::tqsizeHint() const { return TQSize( TQFontMetrics(font()).width(columnText(0)+columnText(1)+" "), - KListView::sizeHint().height()); + KListView::tqsizeHint().height()); } void @@ -1021,7 +1021,7 @@ Editor::setSorting( int column, bool ascending ) updateEditorGeometry(); updateGroupLabelsPosition(); repaintContents(); - repaint(); + tqrepaint(); } #include "editor.moc" diff --git a/lib/koproperty/editor.h b/lib/koproperty/editor.h index 05725529..c3ab0c2e 100644 --- a/lib/koproperty/editor.h +++ b/lib/koproperty/editor.h @@ -77,7 +77,7 @@ class KOPROPERTY_EXPORT Editor : public KListView virtual ~Editor(); - virtual TQSize sizeHint() const; + virtual TQSize tqsizeHint() const; virtual void setFocus(); virtual void setSorting( int column, bool ascending = true ); diff --git a/lib/koproperty/editoritem.cpp b/lib/koproperty/editoritem.cpp index dc1bb19e..653cbe0a 100644 --- a/lib/koproperty/editoritem.cpp +++ b/lib/koproperty/editoritem.cpp @@ -31,7 +31,7 @@ #include <tqheader.h> #include <tqstyle.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <kdebug.h> #include <kiconloader.h> @@ -98,7 +98,7 @@ class GroupWidgetBase : public TQWidget , m_isOpen(true) , m_mouseDown(false) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); } void setText( const TQString &text ) @@ -121,9 +121,9 @@ class GroupWidgetBase : public TQWidget m_isOpen = set; } - virtual TQSize sizeHint () const + virtual TQSize tqsizeHint () const { - TQSize s( TQWidget::sizeHint() ); + TQSize s( TQWidget::tqsizeHint() ); s.setHeight(fontMetrics().height()*2); return s; } @@ -133,9 +133,9 @@ class GroupWidgetBase : public TQWidget TQRect r(rect()); TQPainter p(this); TQStyle::StyleFlags flags = m_mouseDown ? TQStyle::Style_Down : TQStyle::Style_Default; - kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, palette().active(), flags); + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_HeaderSection, &p, r, tqpalette().active(), flags); - paintListViewExpander(&p, this, r.height()+2, palette().active(), isOpen()); + paintListViewExpander(&p, this, r.height()+2, tqpalette().active(), isOpen()); if (!m_miniicon.isNull()) { p.drawPixmap(24, (r.height()-m_miniicon.height())/2, m_miniicon); } @@ -143,7 +143,7 @@ class GroupWidgetBase : public TQWidget if (!m_titleStr.isNull()) { int indent = 16 + (m_miniicon.isNull() ? 0 : (m_miniicon.width()+4)); - p.setPen(palette().active().text()); + p.setPen(tqpalette().active().text()); TQFont f = p.font(); f.setBold(true); p.setFont(f); @@ -208,7 +208,7 @@ GroupContainer::GroupContainer(const TQString& title, TQWidget* parent) : TQWidget(parent) , d(new Private()) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed, 0, 1)); d->lyr = new TQVBoxLayout(this); d->groupWidget = new GroupWidgetBase(this); d->groupWidget->setText( title ); @@ -245,7 +245,7 @@ bool GroupContainer::event( TQEvent * e ) { d->contents->show(); else d->contents->hide(); - d->lyr->invalidate(); + d->lyr->tqinvalidate(); update(); } } @@ -563,7 +563,7 @@ EditorGroupItem::paintCell(TQPainter *p, const TQColorGroup & cg, int column, in // return; /*p->setPen( KPROPEDITOR_ITEM_BORDER_COLOR ); //! \todo custom color? - p->setClipRect(listView()->itemRect(this)); + p->setClipRect(listView()->tqitemRect(this)); if(column == 1) p->translate(-listView()->columnWidth(0) + 20, 0); int totalWidth = listView()->columnWidth(0) + listView()->columnWidth(1) - 20; diff --git a/lib/koproperty/editoritem.h b/lib/koproperty/editoritem.h index fc703239..9f2c75c2 100644 --- a/lib/koproperty/editoritem.h +++ b/lib/koproperty/editoritem.h @@ -72,7 +72,7 @@ class EditorItem : public KListViewItem virtual void paintCell(TQPainter *p, const TQColorGroup & cg, int column, int width, int align); /*! Reimplemented from KListViewItem to draw custom contents. It takes care of drawing the [+] and [-] - signs only if the item has children. + signs only if the item has tqchildren. */ virtual void paintBranches(TQPainter *p, const TQColorGroup &cg, int w, int y, int h); diff --git a/lib/koproperty/editors/booledit.cpp b/lib/koproperty/editors/booledit.cpp index 09d55e94..886f20d8 100644 --- a/lib/koproperty/editors/booledit.cpp +++ b/lib/koproperty/editors/booledit.cpp @@ -30,7 +30,7 @@ #include <tqtoolbutton.h> #include <tqpainter.h> #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqbitmap.h> using namespace KoProperty; @@ -45,8 +45,8 @@ BoolEdit::BoolEdit(Property *property, TQWidget *parent, const char *name) m_toggle->setFocusPolicy(TQ_WheelFocus); m_toggle->setUsesTextLabel(true); m_toggle->setTextPosition(TQToolButton::Right); - m_toggle->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); - //we're not using layout to because of problems with button size + m_toggle->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + //we're not using tqlayout to because of problems with button size m_toggle->move(0, 0); m_toggle->resize(width(), height()); setFocusWidget(m_toggle); diff --git a/lib/koproperty/editors/coloredit.cpp b/lib/koproperty/editors/coloredit.cpp index f72009e3..a9ab1f1a 100644 --- a/lib/koproperty/editors/coloredit.cpp +++ b/lib/koproperty/editors/coloredit.cpp @@ -21,7 +21,7 @@ #include "coloredit.h" #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqcolor.h> #include <tqpainter.h> @@ -36,7 +36,7 @@ ColorButton::ColorButton(Property *property, TQWidget *parent, const char *name) m_edit = new KColorCombo(this); m_edit->setFocusPolicy(TQ_NoFocus); connect(m_edit, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotValueChanged(int))); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); setFocusWidget(m_edit); diff --git a/lib/koproperty/editors/combobox.cpp b/lib/koproperty/editors/combobox.cpp index 1dd35a8d..343a9ed9 100644 --- a/lib/koproperty/editors/combobox.cpp +++ b/lib/koproperty/editors/combobox.cpp @@ -19,7 +19,7 @@ */ #include "combobox.h" -#include <layout.h> +#include <tqlayout.h> #include <tqmap.h> #include <tqvariant.h> #include <tqpainter.h> @@ -37,7 +37,7 @@ ComboBox::ComboBox(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new KComboBox(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/cursoredit.cpp b/lib/koproperty/editors/cursoredit.cpp index 5ff0bb34..61d44499 100644 --- a/lib/koproperty/editors/cursoredit.cpp +++ b/lib/koproperty/editors/cursoredit.cpp @@ -118,13 +118,13 @@ CursorEdit::value() const void CursorEdit::setValue(const TQVariant &value, bool emitChange) { - ComboBox::setValue(value.toCursor().shape(), emitChange); + ComboBox::setValue(value.toCursor().tqshape(), emitChange); } void CursorEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, const TQVariant &value) { - ComboBox::drawViewer(p, cg, r, value.toCursor().shape()); + ComboBox::drawViewer(p, cg, r, value.toCursor().tqshape()); } void diff --git a/lib/koproperty/editors/dateedit.cpp b/lib/koproperty/editors/dateedit.cpp index d6e5c751..0df8532a 100644 --- a/lib/koproperty/editors/dateedit.cpp +++ b/lib/koproperty/editors/dateedit.cpp @@ -23,7 +23,7 @@ #include <tqdatetimeedit.h> #include <tqrangecontrol.h> #include <tqobjectlist.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqpainter.h> @@ -37,7 +37,7 @@ DateEdit::DateEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQDateEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/datetimeedit.cpp b/lib/koproperty/editors/datetimeedit.cpp index 9355f934..6e12641a 100644 --- a/lib/koproperty/editors/datetimeedit.cpp +++ b/lib/koproperty/editors/datetimeedit.cpp @@ -23,7 +23,7 @@ #include <tqdatetimeedit.h> #include <tqrangecontrol.h> #include <tqobjectlist.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqvariant.h> @@ -37,7 +37,7 @@ DateTimeEdit::DateTimeEdit(Property *property, TQWidget *parent, const char *nam { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQDateTimeEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/fontedit.cpp b/lib/koproperty/editors/fontedit.cpp index 09cd7388..634641b8 100644 --- a/lib/koproperty/editors/fontedit.cpp +++ b/lib/koproperty/editors/fontedit.cpp @@ -24,7 +24,7 @@ #include <tqpushbutton.h> #include <tqpainter.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqfont.h> #include <tqfontmetrics.h> @@ -47,7 +47,7 @@ class FontEditRequester : public KFontRequester FontEditRequester(TQWidget* parent) : KFontRequester(parent) { - label()->setPaletteBackgroundColor(palette().active().base()); + label()->setPaletteBackgroundColor(tqpalette().active().base()); label()->setMinimumWidth(0); label()->setFrameShape(TQFrame::Box); label()->setIndent(-1); @@ -55,13 +55,13 @@ class FontEditRequester : public KFontRequester label()->setFocusPolicy(TQ_ClickFocus); KAcceleratorManager::setNoAccel(label()); #endif - layout()->remove(label()); - layout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); - delete layout(); + tqlayout()->remove(label()); + tqlayout()->remove(button());//->reparent(this, 0, TQPoint(0,0)); + delete tqlayout(); button()->setText(i18n("...")); TQToolTip::add(button(), i18n("Change font")); button()->setFocusPolicy(TQ_NoFocus); - button()->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + button()->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQFontMetrics fm(button()->font()); button()->setFixedWidth(fm.width(button()->text()+' ')); } diff --git a/lib/koproperty/editors/linestyledit.cpp b/lib/koproperty/editors/linestyledit.cpp index 5c3c5b51..e7f5b2f8 100644 --- a/lib/koproperty/editors/linestyledit.cpp +++ b/lib/koproperty/editors/linestyledit.cpp @@ -24,7 +24,7 @@ #include <tqpainter.h> #include <tqpixmap.h> #include <tqcombobox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> using namespace KoProperty; @@ -140,7 +140,7 @@ LineStyleEdit::LineStyleEdit(Property *property, TQWidget *parent, const char *n { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQComboBox(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/pixmapedit.cpp b/lib/koproperty/editors/pixmapedit.cpp index 3742ae03..92ab746d 100644 --- a/lib/koproperty/editors/pixmapedit.cpp +++ b/lib/koproperty/editors/pixmapedit.cpp @@ -23,7 +23,7 @@ #include "editoritem.h" #include "property.h" -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqlabel.h> #include <tqcursor.h> @@ -58,22 +58,22 @@ PixmapEdit::PixmapEdit(Property *property, TQWidget *parent, const char *name) m_edit = new TQLabel(this, "m_edit"); TQToolTip::add(m_edit, i18n("Click to show image preview")); - m_edit->setAlignment(TQt::AlignLeft | TQt::AlignVCenter); + m_edit->tqsetAlignment(TQt::AlignLeft | TQt::AlignVCenter); m_edit->setMinimumHeight(5); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed); m_edit->setBackgroundMode(TQt::PaletteBase); m_edit->setMouseTracking(true); setBackgroundMode(TQt::PaletteBase); m_button = new TQPushButton(i18n("..."), this, "m_button"); TQToolTip::add(m_button, i18n("Insert image from file")); - m_button->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + m_button->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); TQFontMetrics fm(m_button->font()); m_button->setFixedWidth(fm.width(m_button->text()+' ')); m_button->setFocusPolicy(TQ_NoFocus); m_popup = new TQLabel(0, "m_popup", TQt::WStyle_Customize|TQt::WStyle_NoBorder|TQt::WX11BypassWM|WStyle_StaysOnTop); - m_popup->setPaletteBackgroundColor(m_popup->palette().active().base()); + m_popup->setPaletteBackgroundColor(m_popup->tqpalette().active().base()); m_popup->setFrameStyle(TQFrame::Plain|TQFrame::Box); m_popup->setMargin(2); m_popup->setLineWidth(1); @@ -153,7 +153,7 @@ PixmapEdit::selectPixmapFileName() emit valueChanged(this); } #endif*/ - TQString caption( i18n("Insert Image From File (for \"%1\" property)").arg(property()->caption()) ); + TQString caption( i18n("Insert Image From File (for \"%1\" property)").tqarg(property()->caption()) ); #ifdef TQ_WS_WIN TQString recentDir; TQString fileName = TQFileDialog::getOpenFileName( diff --git a/lib/koproperty/editors/pointedit.cpp b/lib/koproperty/editors/pointedit.cpp index 30d3c7d6..6983dd68 100644 --- a/lib/koproperty/editors/pointedit.cpp +++ b/lib/koproperty/editors/pointedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -41,10 +41,10 @@ PointEdit::PointEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // setFocusWidget(m_edit); @@ -64,8 +64,8 @@ PointEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); - TQToolTip::add(this, TQString("%1, %2").arg(value.toPoint().x()).arg(value.toPoint().y())); + m_edit->setText(TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); + TQToolTip::add(this, TQString("%1, %2").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ PointEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, con { TQRect rect(r); rect.setBottom(r.bottom()+1); - Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).arg(value.toPoint().x()).arg(value.toPoint().y())); + Widget::drawViewer(p, cg, rect, TQString(POINTEDIT_MASK).tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").arg(value.toPoint().x()).arg(value.toPoint().y())); +// TQString("[ %1, %2 ]").tqarg(value.toPoint().x()).tqarg(value.toPoint().y())); } void diff --git a/lib/koproperty/editors/rectedit.cpp b/lib/koproperty/editors/rectedit.cpp index c97451ea..ba6fec49 100644 --- a/lib/koproperty/editors/rectedit.cpp +++ b/lib/koproperty/editors/rectedit.cpp @@ -21,7 +21,7 @@ #include "editoritem.h" #include <tqvariant.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -39,7 +39,7 @@ RectEdit::RectEdit(Property *property, TQWidget *parent, const char *name) setHasBorders(false); m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); m_edit->setWordWrap( TQTextEdit::NoWrap ); m_edit->setMinimumHeight(5); setEditor(m_edit); @@ -60,10 +60,10 @@ RectEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(RECTEDIT_MASK).arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); - TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").arg(value.toRect().x()). - arg(value.toRect().y()).arg(value.toRect().width()).arg(value.toRect().height())); + m_edit->setText(TQString(RECTEDIT_MASK).tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); + TQToolTip::add(this, i18n("Position: %1, %2\nSize: %3 x %4").tqarg(value.toRect().x()). + tqarg(value.toRect().y()).tqarg(value.toRect().width()).tqarg(value.toRect().height())); if (emitChange) emit valueChanged(this); @@ -75,12 +75,12 @@ RectEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(RECTEDIT_MASK).arg(value.toRect().x()).arg(value.toRect().y()) - .arg(value.toRect().width()).arg(value.toRect().height())); + TQString(RECTEDIT_MASK).tqarg(value.toRect().x()).tqarg(value.toRect().y()) + .tqarg(value.toRect().width()).tqarg(value.toRect().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2, %3, %4 ]").arg(value.toRect().x()).arg(value.toRect().y()) -// .arg(value.toRect().width()).arg(value.toRect().height())); +// TQString("[ %1, %2, %3, %4 ]").tqarg(value.toRect().x()).tqarg(value.toRect().y()) +// .tqarg(value.toRect().width()).tqarg(value.toRect().height())); } void diff --git a/lib/koproperty/editors/sizeedit.cpp b/lib/koproperty/editors/sizeedit.cpp index b5dd6be5..05422119 100644 --- a/lib/koproperty/editors/sizeedit.cpp +++ b/lib/koproperty/editors/sizeedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqtooltip.h> @@ -41,9 +41,9 @@ SizeEdit::SizeEdit(Property *property, TQWidget *parent, const char *name) m_edit = new KActiveLabel(this); m_edit->setFocusPolicy(TQ_NoFocus); // m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); - m_edit->setPaletteBackgroundColor(palette().active().base()); + m_edit->setPaletteBackgroundColor(tqpalette().active().base()); // m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // setFocusWidget(m_edit); @@ -63,8 +63,8 @@ SizeEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; m_edit->selectAll(false); - m_edit->setText(TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); - TQToolTip::add(this, TQString("%1 x %2").arg(value.toSize().width()).arg(value.toSize().height())); + m_edit->setText(TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); + TQToolTip::add(this, TQString("%1 x %2").tqarg(value.toSize().width()).tqarg(value.toSize().height())); if (emitChange) emit valueChanged(this); @@ -76,10 +76,10 @@ SizeEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, cons TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString(SIZEEDIT_MASK).arg(value.toSize().width()).arg(value.toSize().height())); + TQString(SIZEEDIT_MASK).tqarg(value.toSize().width()).tqarg(value.toSize().height())); // p->eraseRect(r); // p->drawText(r, TQt::AlignLeft | TQt::AlignVCenter | TQt::SingleLine, -// TQString("[ %1, %2 ]").arg(value.toSize().width()).arg(value.toSize().height())); +// TQString("[ %1, %2 ]").tqarg(value.toSize().width()).tqarg(value.toSize().height())); } void diff --git a/lib/koproperty/editors/sizepolicyedit.cpp b/lib/koproperty/editors/sizepolicyedit.cpp index 0b13292b..125e0a26 100644 --- a/lib/koproperty/editors/sizepolicyedit.cpp +++ b/lib/koproperty/editors/sizepolicyedit.cpp @@ -22,7 +22,7 @@ #include "editoritem.h" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqsizepolicy.h> #include <tqmap.h> @@ -42,7 +42,7 @@ SizePolicyEdit::SizePolicyEdit(Property *property, TQWidget *parent, const char m_edit = new TQLabel(this); m_edit->setIndent(KPROPEDITOR_ITEM_MARGIN); m_edit->setBackgroundMode(TQt::PaletteBase); -// m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); +// m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); // l->addWidget(m_edit); @@ -77,9 +77,9 @@ void SizePolicyEdit::setValue(const TQVariant &value, bool emitChange) { m_value = value; - m_edit->setText(TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). - arg(findDescription(value.toSizePolicy().verData())). - arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); + m_edit->setText(TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). + tqarg(findDescription(value.toSizePolicy().verData())). + tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); TQToolTip::add(this, m_edit->text()); if (emitChange) @@ -94,9 +94,9 @@ SizePolicyEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r TQRect rect(r); rect.setBottom(r.bottom()+1); Widget::drawViewer(p, cg, rect, - TQString("%1/%2/%3/%4").arg(findDescription(value.toSizePolicy().horData())). - arg(findDescription(value.toSizePolicy().verData())). - arg(value.toSizePolicy().horStretch()).arg(value.toSizePolicy().verStretch())); + TQString("%1/%2/%3/%4").tqarg(findDescription(value.toSizePolicy().horData())). + tqarg(findDescription(value.toSizePolicy().verData())). + tqarg(value.toSizePolicy().horStretch()).tqarg(value.toSizePolicy().verStretch())); } TQString diff --git a/lib/koproperty/editors/spinbox.cpp b/lib/koproperty/editors/spinbox.cpp index d2020d2c..8e890419 100644 --- a/lib/koproperty/editors/spinbox.cpp +++ b/lib/koproperty/editors/spinbox.cpp @@ -22,7 +22,7 @@ #include "property.h" -#include <layout.h> +#include <tqlayout.h> #include <tqobjectlist.h> #include <tqvariant.h> #include <tqpainter.h> @@ -36,7 +36,7 @@ using namespace KoProperty; IntSpinBox::IntSpinBox(int lower, int upper, int step, int value, int base, IntEdit *parent, const char *name) : KIntSpinBox(lower, upper, step, value, base, parent, name) { - editor()->setAlignment(TQt::AlignLeft); + editor()->tqsetAlignment(TQt::AlignLeft); installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true ); @@ -179,7 +179,7 @@ IntEdit::setReadOnlyInternal(bool readOnly) DoubleSpinBox::DoubleSpinBox (double lower, double upper, double step, double value, int precision, DoubleEdit *parent) : KDoubleSpinBox(lower, upper, step, value, precision, parent) { - editor()->setAlignment(TQt::AlignLeft); + editor()->tqsetAlignment(TQt::AlignLeft); installEventFilter(editor()); installEventFilter(this); TQObjectList *spinwidgets = queryList( TQSPINWIDGET_OBJECT_NAME_STRING, 0, false, true ); @@ -247,7 +247,7 @@ DoubleEdit::DoubleEdit(Property *property, TQWidget *parent, const char *name) 0, precision.toInt(), this); if (!minValueText.isNull()) m_edit->setSpecialValueText(minValueText.toString()); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); setEditor(m_edit); diff --git a/lib/koproperty/editors/stringedit.cpp b/lib/koproperty/editors/stringedit.cpp index c78b6edb..55d8b3ed 100644 --- a/lib/koproperty/editors/stringedit.cpp +++ b/lib/koproperty/editors/stringedit.cpp @@ -20,7 +20,7 @@ #include "stringedit.h" -#include <layout.h> +#include <tqlayout.h> #include <tqlineedit.h> #include <tqvariant.h> @@ -31,7 +31,7 @@ StringEdit::StringEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQLineEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMargin(1); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/stringlistedit.cpp b/lib/koproperty/editors/stringlistedit.cpp index f5a1de39..56bf1145 100644 --- a/lib/koproperty/editors/stringlistedit.cpp +++ b/lib/koproperty/editors/stringlistedit.cpp @@ -21,7 +21,7 @@ #include "stringlistedit.h" #include <tqlineedit.h> -#include <layout.h> +#include <tqlayout.h> #include <tqdialog.h> #include <tqpainter.h> #include <tqvariant.h> @@ -46,12 +46,12 @@ StringListEdit::StringListEdit(Property *property, TQWidget *parent, const char m_edit = new TQLineEdit(this); m_edit->setLineWidth(0); m_edit->setReadOnly(true); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); m_selectButton = new TQPushButton("...", this); - m_selectButton->setSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); + m_selectButton->tqsetSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Expanding); l->addWidget(m_selectButton); setFocusWidget(m_selectButton); @@ -87,10 +87,10 @@ StringListEdit::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r void StringListEdit::showEditor() { - KDialogBase dialog(this->topLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), + KDialogBase dialog(this->tqtopLevelWidget(), "stringlist_dialog", true, i18n("Edit List of Items"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); - KEditListBox *edit = new KEditListBox(i18n("Contents of %1").arg(property()->caption()), &dialog, "editlist"); + KEditListBox *edit = new KEditListBox(i18n("Contents of %1").tqarg(property()->caption()), &dialog, "editlist"); dialog.setMainWidget(edit); edit->insertStringList(m_list); diff --git a/lib/koproperty/editors/symbolcombo.cpp b/lib/koproperty/editors/symbolcombo.cpp index 9bb503d9..53394d54 100644 --- a/lib/koproperty/editors/symbolcombo.cpp +++ b/lib/koproperty/editors/symbolcombo.cpp @@ -20,7 +20,7 @@ #include <tqlineedit.h> #include <tqpushbutton.h> -#include <layout.h> +#include <tqlayout.h> #include <tqpainter.h> #include <tqvariant.h> @@ -41,12 +41,12 @@ SymbolCombo::SymbolCombo(Property *property, TQWidget *parent, const char *name) m_edit = new TQLineEdit(this); m_edit->setLineWidth(0); m_edit->setReadOnly(true); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); m_edit->setMaxLength(1); l->addWidget(m_edit); m_select = new TQPushButton("...", this); - m_select->setSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); + m_select->tqsetSizePolicy(TQSizePolicy::Maximum, TQSizePolicy::MinimumExpanding); m_select->setMinimumHeight(5); l->addWidget(m_select); @@ -61,7 +61,7 @@ TQVariant SymbolCombo::value() const { if (!(m_edit->text().isNull())) - return m_edit->text().at(0).unicode(); + return m_edit->text().tqat(0).tqunicode(); else return 0; } @@ -90,7 +90,7 @@ SymbolCombo::drawViewer(TQPainter *p, const TQColorGroup &cg, const TQRect &r, c void SymbolCombo::selectChar() { - KDialogBase dialog(this->topLevelWidget(), "charselect_dialog", true, i18n("Select Char"), + KDialogBase dialog(this->tqtopLevelWidget(), "charselect_dialog", true, i18n("Select Char"), KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, false); KCharSelect *select = new KCharSelect(&dialog, "select_char"); diff --git a/lib/koproperty/editors/timeedit.cpp b/lib/koproperty/editors/timeedit.cpp index a6ede613..674d2c89 100644 --- a/lib/koproperty/editors/timeedit.cpp +++ b/lib/koproperty/editors/timeedit.cpp @@ -24,7 +24,7 @@ #include <tqrangecontrol.h> #include <tqobjectlist.h> #include <tqpainter.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <tqdatetime.h> @@ -38,7 +38,7 @@ TimeEdit::TimeEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new TQTimeEdit(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); diff --git a/lib/koproperty/editors/urledit.cpp b/lib/koproperty/editors/urledit.cpp index 02734776..8c150de2 100644 --- a/lib/koproperty/editors/urledit.cpp +++ b/lib/koproperty/editors/urledit.cpp @@ -20,7 +20,7 @@ #include "urledit.h" -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> #include <kurlrequester.h> @@ -36,14 +36,14 @@ URLEdit::URLEdit(Property *property, TQWidget *parent, const char *name) { TQHBoxLayout *l = new TQHBoxLayout(this, 0, 0); m_edit = new KURLRequester(this); - m_edit->setSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); + m_edit->tqsetSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding); m_edit->setMinimumHeight(5); l->addWidget(m_edit); setProperty(property); connect(m_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotValueChanged(const TQString&))); - m_edit->setSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); + m_edit->tqsetSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding); } URLEdit::~URLEdit() diff --git a/lib/koproperty/factory.h b/lib/koproperty/factory.h index f4b0cf36..8aca5538 100644 --- a/lib/koproperty/factory.h +++ b/lib/koproperty/factory.h @@ -81,7 +81,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties to create composed properties Use a composed property when you need more than one editor for a property. Examples are rect, size or point properties. - If you create a composed property, both parent and children properties must have custom + If you create a composed property, both parent and tqchildren properties must have custom (different) types. Child properties are created in CustomProperty constructor of the <b>parent</b> type, by adding CustomProperty::property() as parent in Property constructor.\n @@ -89,7 +89,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject parent's Property::setValue() should be called, making sure that useCustomProperty argument is set to false.\n Parent's handleValue() should be set to false, unless you cannot store the property in a TQVariant. - You just need to update children's value, making sure that useCustomProperty argument is set + You just need to update tqchildren's value, making sure that useCustomProperty argument is set to false. \section custom_editor Using Custom Editors @@ -105,7 +105,7 @@ class KOPROPERTY_EXPORT CustomPropertyFactory : public TQObject \section custom_prop_composed Using Custom Properties with value that cannot be stored in a TQVariant You then need to set handleValue() to true. The Widget you create also have to call directly CustomProperty member to store the value. just make sure you call emitPropertyChanged() - when the proerty value changes. Also make sure to avoid infinite recursion if you use children properties. + when the proerty value changes. Also make sure to avoid infinite recursion if you use tqchildren properties. \author Cedric Pasteur <cedric.pasteur@free.fr> \author Alexander Dymo <cloudtemple@mskat.net> diff --git a/lib/koproperty/property.cpp b/lib/koproperty/property.cpp index 6c4fa246..49ca2b6c 100644 --- a/lib/koproperty/property.cpp +++ b/lib/koproperty/property.cpp @@ -43,7 +43,7 @@ class PropertyPrivate : caption(0), listData(0), changed(false), storable(true), readOnly(false), visible(true), autosync(-1), custom(0), useCustomProperty(true), - sets(0), parent(0), children(0), relatedProperties(0), + sets(0), parent(0), tqchildren(0), relatedProperties(0), sortingKey(0) { } @@ -63,7 +63,7 @@ class PropertyPrivate delete caption; caption = 0; delete listData; - delete children; + delete tqchildren; delete relatedProperties; delete custom; delete sets; @@ -99,7 +99,7 @@ class PropertyPrivate // TQValueList<Set*> sets; Property *parent; - TQValueList<Property*> *children; + TQValueList<Property*> *tqchildren; //! list of properties with the same name (when intersecting buffers) TQValueList<Property*> *relatedProperties; @@ -564,9 +564,9 @@ Property::operator= (const Property &property) delete d->listData; d->listData = 0; } - if(d->children) { - delete d->children; - d->children = 0; + if(d->tqchildren) { + delete d->tqchildren; + d->tqchildren = 0; } if(d->relatedProperties) { delete d->relatedProperties; @@ -594,16 +594,16 @@ Property::operator= (const Property &property) } if(property.d->custom) { d->custom = FactoryManager::self()->createCustomProperty(this); - // updates all children value, using CustomProperty + // updates all tqchildren value, using CustomProperty setValue(property.value()); } else { d->value = property.d->value; - if(property.d->children) { - // no CustomProperty (should never happen), simply copy all children - d->children = new TQValueList<Property*>(); - TQValueList<Property*>::ConstIterator endIt = property.d->children->constEnd(); - for(TQValueList<Property*>::ConstIterator it = property.d->children->constBegin(); it != endIt; ++it) { + if(property.d->tqchildren) { + // no CustomProperty (should never happen), simply copy all tqchildren + d->tqchildren = new TQValueList<Property*>(); + TQValueList<Property*>::ConstIterator endIt = property.d->tqchildren->constEnd(); + for(TQValueList<Property*>::ConstIterator it = property.d->tqchildren->constBegin(); it != endIt; ++it) { Property *child = new Property( *(*it) ); addChild(child); } @@ -614,7 +614,7 @@ Property::operator= (const Property &property) d->relatedProperties = new TQValueList<Property*>( *(property.d->relatedProperties)); } - // update these later because they may have been changed when creating children + // update these later because they may have been changed when creating tqchildren d->oldValue = property.d->oldValue; d->changed = property.d->changed; d->sortingKey = property.d->sortingKey; @@ -631,16 +631,16 @@ Property::operator ==(const Property &prop) const ///////////////////////////////////////////////////////////////// const TQValueList<Property*>* -Property::children() const +Property::tqchildren() const { - return d->children; + return d->tqchildren; } Property* Property::child(const TQCString &name) { - TQValueList<Property*>::ConstIterator endIt = d->children->constEnd(); - for(TQValueList<Property*>::ConstIterator it = d->children->constBegin(); it != endIt; ++it) { + TQValueList<Property*>::ConstIterator endIt = d->tqchildren->constEnd(); + for(TQValueList<Property*>::ConstIterator it = d->tqchildren->constBegin(); it != endIt; ++it) { if((*it)->name() == name) return *it; } @@ -659,11 +659,11 @@ Property::addChild(Property *prop) if (!prop) return; - if(!d->children || tqFind( d->children->begin(), d->children->end(), prop) == d->children->end()) { // not in our list - if(!d->children) - d->children = new TQValueList<Property*>(); - d->children->append(prop); - prop->setSortingKey(d->children->count()); + if(!d->tqchildren || tqFind( d->tqchildren->begin(), d->tqchildren->end(), prop) == d->tqchildren->end()) { // not in our list + if(!d->tqchildren) + d->tqchildren = new TQValueList<Property*>(); + d->tqchildren->append(prop); + prop->setSortingKey(d->tqchildren->count()); prop->d->parent = this; } else { diff --git a/lib/koproperty/property.h b/lib/koproperty/property.h index 9f097c61..bc8a503e 100644 --- a/lib/koproperty/property.h +++ b/lib/koproperty/property.h @@ -104,7 +104,7 @@ enum PropertyType { //predefined custom types ValueFromList = 2000 /**<string value from a list*/, - Symbol = 2001 /**<unicode symbol code*/, + Symbol = 2001 /**<tqunicode symbol code*/, FontName /**<font name, e.g. "times new roman"*/, FileURL /**<url of a file*/, PictureFileURL /**<url of a pixmap*/, @@ -306,9 +306,9 @@ class KOPROPERTY_EXPORT Property /*! \return property icon's string. Can be empty. */ TQString icon() const; - /*! \return a list of all children for this property, or NULL of there - is no children for this property */ - const TQValueList<Property*>* children() const; + /*! \return a list of all tqchildren for this property, or NULL of there + is no tqchildren for this property */ + const TQValueList<Property*>* tqchildren() const; /*! \return a child property for \a name, or NULL if there is no property with that name. */ Property* child(const TQCString &name); @@ -407,7 +407,7 @@ class KOPROPERTY_EXPORT Property protected: /*! Adds \a prop as a child of this property. - The children will be owned by this property. */ + The tqchildren will be owned by this property. */ void addChild(Property *prop); /*! Adds \a set to this property. */ diff --git a/lib/koproperty/test/test.cpp b/lib/koproperty/test/test.cpp index 1c4678c9..df0ec956 100644 --- a/lib/koproperty/test/test.cpp +++ b/lib/koproperty/test/test.cpp @@ -65,10 +65,10 @@ Test::Test() m_set->addProperty(new Property("Bool", TQVariant(true, 4), "Bool"), group); m_set->addProperty(p = new Property("3 States", TQVariant(), "3 States", "", Boolean), group); p->setOption("3rdState", "None"); - m_set->addProperty(p = new Property("Date", TQDate::currentDate(),"Date"), group); + m_set->addProperty(p = new Property("Date", TQDate::tqcurrentDate(),"Date"), group); p->setIcon("date"); m_set->addProperty(new Property("Time", TQTime::currentTime(),"Time"), group); - m_set->addProperty(new Property("DateTime", TQDateTime::currentDateTime(),"Date/Time"), group); + m_set->addProperty(new Property("DateTime", TQDateTime::tqcurrentDateTime(),"Date/Time"), group); TQStringList list;//keys list << "myitem" << "otheritem" << "3rditem"; @@ -89,7 +89,7 @@ Test::Test() group = "ComplexGroup"; m_set->setGroupDescription(group, "Complex Group"); } - m_set->addProperty(new Property("Rect", this->geometry(),"Rect"), group); + m_set->addProperty(new Property("Rect", this->tqgeometry(),"Rect"), group); m_set->addProperty(new Property("Point", TQPoint(3,4), "Point"), group); m_set->addProperty(new Property("Size", TQPoint(3,4), "Size"), group); @@ -107,7 +107,7 @@ Test::Test() p->setIcon("fonts"); m_set->addProperty(new Property("Cursor", TQCursor(TQt::WaitCursor),"Cursor"), group); m_set->addProperty(new Property("LineStyle", 3, "Line Style", "", LineStyle), group); - m_set->addProperty(new Property("SizePolicy", sizePolicy(), "Size Policy"), group); + m_set->addProperty(new Property("SizePolicy", tqsizePolicy(), "Size Policy"), group); // kdDebug() << m_set->groupNames() << endl; diff --git a/lib/koproperty/widget.cpp b/lib/koproperty/widget.cpp index 3d6153ae..b0169a96 100644 --- a/lib/koproperty/widget.cpp +++ b/lib/koproperty/widget.cpp @@ -192,7 +192,7 @@ Widget::setEditor(TQWidget* editor) d->editor = editor; if (!d->editor) return; - d->editor->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); + d->editor->tqsetSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); d->editor->move(0,0); } diff --git a/lib/koproperty/widgetproxy.cpp b/lib/koproperty/widgetproxy.cpp index 1a4ba02b..a4558319 100644 --- a/lib/koproperty/widgetproxy.cpp +++ b/lib/koproperty/widgetproxy.cpp @@ -22,7 +22,7 @@ #include "widget.h" #include "factory.h" -#include <layout.h> +#include <tqlayout.h> #include <tqvariant.h> namespace KoProperty { @@ -30,7 +30,7 @@ class WidgetProxyPrivate { public: WidgetProxyPrivate() - : property(0), widget(0), type(Invalid), layout(0) + : property(0), widget(0), type(Invalid), tqlayout(0) {} ~WidgetProxyPrivate() {} @@ -38,7 +38,7 @@ class WidgetProxyPrivate Widget *widget; PropertyType type; - TQHBoxLayout *layout; + TQHBoxLayout *tqlayout; }; } @@ -49,7 +49,7 @@ WidgetProxy::WidgetProxy(TQWidget *parent, const char *name) { d = new WidgetProxyPrivate(); d->property = new Property(); - d->layout = new TQHBoxLayout(this, 0, 0); + d->tqlayout = new TQHBoxLayout(this, 0, 0); } WidgetProxy::~WidgetProxy() @@ -118,7 +118,7 @@ WidgetProxy::setWidget() if (d->widget) { d->widget->reparent(this, TQPoint(0,0), true); - d->layout->addWidget(d->widget); + d->tqlayout->addWidget(d->widget); } } diff --git a/lib/kotext/DESIGN b/lib/kotext/DESIGN index 12bc2940..4fd1e479 100644 --- a/lib/kotext/DESIGN +++ b/lib/kotext/DESIGN @@ -26,17 +26,17 @@ Zoomed: (aka Normal) Internal: The former two were mostly for objects like frames etc, not for text. Text (the individual - words and characters) are positioned with the layout coordinates. Layout is similar to the + words and characters) are positioned with the tqlayout coordinates. Layout is similar to the Zoomed system, but always uses the same resolution. This resolution is sufficiently high to - do the layout in integers, and not really lose info. + do the tqlayout in integers, and not really lose info. - This is the high-resolution unit in which the text layout is done, + This is the high-resolution unit in which the text tqlayout is done, currently set to 1440 DPI. Everything known the QRT classes will be in this coordinate system (including the QTextFormats). When painting, we apply the current zoom and resolution to find the right font size to use, and we have to catch up with rounding differences. However the position of the words - (i.e. layout) is the one determined previously in layout units. KoZoomHandler - offers methods for converting between layout units and zoom-dependent points + (i.e. tqlayout) is the one determined previously in tqlayout units. KoZoomHandler + offers methods for converting between tqlayout units and zoom-dependent points and pixels. Note that the Internal coordinate system starts at the topleft corner of @@ -73,14 +73,14 @@ Document (pt values, in double, KoPoint, KoRect.) | |--KWTextFrameSet::documentToInternal V -Internal coordinates (the coordinates given to QRT - in "layout units") -Note that there are pixels and pts in the layout unit system too ! +Internal coordinates (the coordinates given to QRT - in "tqlayout units") +Note that there are pixels and pts in the tqlayout unit system too ! There are conversions between LU points and document points, but also direct conversions between LU pixels and view pixels. Font sizes ========== -A 12pt font will lead to a layout font of ptToLayoutUnit(12)=20*12=240pt - +A 12pt font will lead to a tqlayout font of ptToLayoutUnit(12)=20*12=240pt - that's the value stored in the QTextFormat. However font metrics are calculated from the 100%-zoom-level font (e.g. 12pt for a 12pt font) diff --git a/lib/kotext/DateFormatWidget.cpp b/lib/kotext/DateFormatWidget.cpp index 49749f91..c93807a3 100644 --- a/lib/kotext/DateFormatWidget.cpp +++ b/lib/kotext/DateFormatWidget.cpp @@ -147,7 +147,7 @@ void DateFormatWidget::updateLabel() { KoVariableDateFormat format; format.setFormatProperties( resultString() ); - TQDateTime ct = TQDateTime::currentDateTime().addDays( correctValue() ); + TQDateTime ct = TQDateTime::tqcurrentDateTime().addDays( correctValue() ); label->setText( format.convert( ct ) ); } diff --git a/lib/kotext/IsoDuration.h b/lib/kotext/IsoDuration.h index ee1cdfb9..6ccb2891 100644 --- a/lib/kotext/IsoDuration.h +++ b/lib/kotext/IsoDuration.h @@ -31,7 +31,7 @@ static TQString minutesToISODuration( int mn ) { bool neg = mn < 0; // PT == period of time - see ISO8601 - TQString str = TQString::fromLatin1( "PT00H%1M00S" ).arg( TQABS( mn ) ); + TQString str = TQString::tqfromLatin1( "PT00H%1M00S" ).tqarg( TQABS( mn ) ); if ( neg ) str.prepend( '-' ); return str; @@ -41,7 +41,7 @@ static TQString daysToISODuration( int days ) { bool neg = days < 0; // P == period, time is ommitted - see ISO8601 - TQString str = TQString::fromLatin1( "P%1D" ).arg( TQABS( days ) ); + TQString str = TQString::tqfromLatin1( "P%1D" ).tqarg( TQABS( days ) ); if ( neg ) str.prepend( '-' ); return str; diff --git a/lib/kotext/KFontDialog_local.cpp b/lib/kotext/KFontDialog_local.cpp index 7afeb354..beaeb9f9 100644 --- a/lib/kotext/KFontDialog_local.cpp +++ b/lib/kotext/KFontDialog_local.cpp @@ -34,7 +34,7 @@ #include <tqfont.h> #include <tqgroupbox.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqscrollbar.h> #include <tqstringlist.h> #include <tqfontdatabase.h> @@ -69,7 +69,7 @@ static int minimumListWidth( const TQListBox *list ) } if( w == 0 ) { w = 40; } w += list->frameWidth() * 2; - w += list->verticalScrollBar()->sizeHint().width(); + w += list->verticalScrollBar()->tqsizeHint().width(); return w; } @@ -297,7 +297,7 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name, sampleEdit->setFont(tmpFont); sampleEdit->setText(i18n("The Quick Brown Fox Jumps Over The Lazy Dog")); sampleEdit->setMinimumHeight( sampleEdit->fontMetrics().lineSpacing() ); - sampleEdit->setAlignment(TQt::AlignCenter); + sampleEdit->tqsetAlignment(TQt::AlignCenter); gridLayout->addMultiCellWidget(sampleEdit, 4, 4, 0, 2); TQString sampleEditWhatsThisText = i18n("This sample text illustrates the current settings. " @@ -333,8 +333,8 @@ KFontChooser_local::KFontChooser_local(TQWidget *parent, const char *name, setSizeIsRelative( *sizeIsRelativeState ); KConfig *config = KGlobal::config(); - KConfigGroupSaver saver(config, TQString::fromLatin1("General")); - showXLFDArea(config->readBoolEntry(TQString::fromLatin1("fontSelectorShowXLFD"), false)); + KConfigGroupSaver saver(config, TQString::tqfromLatin1("General")); + showXLFDArea(config->readBoolEntry(TQString::tqfromLatin1("fontSelectorShowXLFD"), false)); } KFontChooser_local::~KFontChooser_local() @@ -405,9 +405,9 @@ TQButton::ToggleState KFontChooser_local::sizeIsRelative() const : TQButton::NoChange; } -TQSize KFontChooser_local::sizeHint( void ) const +TQSize KFontChooser_local::tqsizeHint( void ) const { - return minimumSizeHint(); + return tqminimumSizeHint(); } @@ -473,7 +473,7 @@ void KFontChooser_local::family_chosen_slot(const TQString& family) TQFontDatabase dbase; - TQStringList styles = TQStringList(dbase.styles(currentFamily)); + TQStringList styles = TQStringList(dbase.tqstyles(currentFamily)); styleListBox->clear(); currentStyles.clear(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { @@ -539,7 +539,7 @@ void KFontChooser_local::style_chosen_slot(const TQString& style) fillSizeList(); } else { // is bitmap font. //sampleEdit->setPaletteBackgroundPixmap( BitmapPixmap ); // TODO - TQValueList<int> sizes = dbase.smoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); + TQValueList<int> sizes = dbase.tqsmoothSizes(familyListBox->currentText(), currentStyles[currentStyle]); if(sizes.count() > 0) { TQValueList<int>::iterator it; diff=1000; @@ -654,7 +654,7 @@ void KFontChooser_local::setupDisplay() void KFontChooser_local::getFontList( TQStringList &list, uint fontListCriteria) { TQFontDatabase dbase; - TQStringList lstSys(dbase.families()); + TQStringList lstSys(dbase.tqfamilies()); // if we have criteria; then check fonts before adding if (fontListCriteria) @@ -694,13 +694,13 @@ void KFontChooser_local::addFont( TQStringList &list, const char *xfont ) if ( !ptr ) return; - TQString font = TQString::fromLatin1(ptr + 1); + TQString font = TQString::tqfromLatin1(ptr + 1); int pos; if ( ( pos = font.find( '-' ) ) > 0 ) { font.truncate( pos ); - if ( font.find( TQString::fromLatin1("open look"), 0, false ) >= 0 ) + if ( font.find( TQString::tqfromLatin1("open look"), 0, false ) >= 0 ) return; TQStringList::Iterator it = list.begin(); diff --git a/lib/kotext/KFontDialog_local.h b/lib/kotext/KFontDialog_local.h index 943ce724..b9d4853c 100644 --- a/lib/kotext/KFontDialog_local.h +++ b/lib/kotext/KFontDialog_local.h @@ -263,7 +263,7 @@ public: /** * Reimplemented for internal reasons. */ - virtual TQSize sizeHint( void ) const; + virtual TQSize tqsizeHint( void ) const; signals: /** diff --git a/lib/kotext/KoAutoFormat.cpp b/lib/kotext/KoAutoFormat.cpp index 7ca6f1a7..c859d26c 100644 --- a/lib/kotext/KoAutoFormat.cpp +++ b/lib/kotext/KoAutoFormat.cpp @@ -932,7 +932,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para uint maxlength = 0; for ( TQStringList::ConstIterator it = wordlist.begin(); it != wordlist.end(); ++it ) // several completion words were found { - if ( (*it).startsWith( lastWord, false ) && new_wordlist.find(*it) == new_wordlist.end() ) //the completion words that begin with lastWord + if ( (*it).tqstartsWith( lastWord, false ) && new_wordlist.find(*it) == new_wordlist.end() ) //the completion words that begin with lastWord { if ( (*it).length() > maxlength ) maxlength = (*it).length(); @@ -952,7 +952,7 @@ bool KoAutoFormat::doCompletion( KoTextCursor* textEditCursor, KoTextParag *para TQChar ch = new_wordlist.first().at(i); for (TQStringList::ConstIterator it = new_wordlist.begin(); it != new_wordlist.end(); ++it ) { - if ( (*it).at(i).lower() != ch.lower() ) + if ( (*it).tqat(i).lower() != ch.lower() ) { word = (*it).left(i); //the completion word is truncated here //kdDebug() << "set the word completion to:" << word << endl; @@ -1063,7 +1063,7 @@ void KoAutoFormat::showToolTipBox(KoTextParag *parag, int index, TQWidget *widg m_completionBox->setText(word); m_completionBox->setLastWord(lastWord); m_completionBox->adjustSize(); - int const height = m_completionBox->sizeHint().height(); + int const height = m_completionBox->tqsizeHint().height(); m_completionBox->move( show_pos.x(), show_pos.y() - height ); if (!m_completionBox->isShown() ) @@ -1778,7 +1778,7 @@ void KoAutoFormat::doAutoDetectUrl( KoTextCursor *textEditCursor, KoTextParag *p txtObj->insert( textEditCursor, lastFormat, KoTextObject::customItemChar(), i18n("Insert Variable"), KoTextDocument::HighlightSelection, KoTextObject::DefaultInsertFlags, customItemsMap ); var->recalc(); - parag->invalidate(0); + parag->tqinvalidate(0); parag->setChanged( true ); // adjust index @@ -1819,7 +1819,7 @@ void KoAutoFormat::doAutoIncludeUpperUpper(KoTextCursor* /*textEditCursor*/, KoT break; word.append( ch ); } - if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.at(3)!=word.at(3).upper() ) + if( word.length() > 2 && word.left(2)==word.left(2).upper() && word.tqat(3)!=word.tqat(3).upper() ) { if ( m_twoUpperLetterException.findIndex(word )==-1) m_twoUpperLetterException.append( word); @@ -1856,7 +1856,7 @@ void KoAutoFormat::doAutoIncludeAbbreviation(KoTextCursor* /*textEditCursor*/, K break; wordAfter.append( ch ); } - if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.at(0)==wordAfter.at(0).lower()) + if( word.length()>1 && !wordAfter.isEmpty() && wordAfter.tqat(0)==wordAfter.tqat(0).lower()) { if ( m_upperCaseExceptions.findIndex(word )==-1) m_upperCaseExceptions.append( word ); @@ -2158,14 +2158,14 @@ KCommand *KoAutoFormat::doCapitalizeNameOfDays( KoTextCursor* textEditCursor, Ko TQString replaceStr= m_cacheNameOfDays[pos]; int start = index - replaceStr.length(); int length = replaceStr.length(); - if( word.at(0).isLetter() && word.at(0)==word.at(0).lower() ) + if( word.tqat(0).isLetter() && word.tqat(0)==word.tqat(0).lower() ) { KoTextCursor cursor( parag->document() ); cursor.setParag( parag ); cursor.setIndex( start ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( start + length ); - TQString replacement = replaceStr.at(0).upper() + replaceStr.right( length-1 ); + TQString replacement = replaceStr.tqat(0).upper() + replaceStr.right( length-1 ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); TQString cmdName=i18n("Capitalize Name of Days"); KCommand *cmd =txtObj->replaceSelectionCommand( textEditCursor, replacement, diff --git a/lib/kotext/KoAutoFormatDia.cpp b/lib/kotext/KoAutoFormatDia.cpp index 30a110a0..e6dce371 100644 --- a/lib/kotext/KoAutoFormatDia.cpp +++ b/lib/kotext/KoAutoFormatDia.cpp @@ -28,7 +28,7 @@ #include <klistview.h> #include <kstandarddirs.h> -#include <layout.h> +#include <tqlayout.h> #include <tqwhatsthis.h> #include <tqcheckbox.h> #include <tqpushbutton.h> @@ -286,7 +286,7 @@ void KoAutoFormatDia::setupTab1() cbAutoReplaceNumber=new TQCheckBox( tab1 ); cbAutoReplaceNumber->setText( i18n( "We add the 1/2 char at the %1", "Re&place 1/2... with %1..." ) - .arg( TQString( "�" ) ) ); + .tqarg( TQString( "�" ) ) ); TQWhatsThis::add( cbAutoReplaceNumber, i18n( "Most standard fraction notations will be converted when available" ) ); @@ -331,11 +331,11 @@ void KoAutoFormatDia::setupTab1() hbox->addSpacing( 20 ); hbox->setSpacing(KDialog::spacingHint()); pbBulletStyle = new TQPushButton( tab1 ); - pbBulletStyle->setFixedSize( pbBulletStyle->sizeHint() ); + pbBulletStyle->setFixedSize( pbBulletStyle->tqsizeHint() ); hbox->addWidget( pbBulletStyle ); pbDefaultBulletStyle = new TQPushButton( tab1 ); pbDefaultBulletStyle->setText(i18n("Default")); - pbDefaultBulletStyle->setFixedSize( pbDefaultBulletStyle->sizeHint() ); + pbDefaultBulletStyle->setFixedSize( pbDefaultBulletStyle->tqsizeHint() ); hbox->addWidget( pbDefaultBulletStyle ); hbox->addStretch( 1 ); @@ -393,10 +393,10 @@ void KoAutoFormatDia::setupTab2() hbox->addSpacing( 20 ); pbDoubleQuote1 = new TQPushButton( tab2 ); - pbDoubleQuote1->setFixedSize( pbDoubleQuote1->sizeHint() ); + pbDoubleQuote1->setFixedSize( pbDoubleQuote1->tqsizeHint() ); pbDoubleQuote2 = new TQPushButton( tab2 ); - pbDoubleQuote2->setFixedSize( pbDoubleQuote2->sizeHint() ); + pbDoubleQuote2->setFixedSize( pbDoubleQuote2->tqsizeHint() ); if (TQApplication::reverseLayout()) { hbox->addWidget( pbDoubleQuote2 ); @@ -410,7 +410,7 @@ void KoAutoFormatDia::setupTab2() pbDoubleDefault = new TQPushButton( tab2 ); pbDoubleDefault->setText(i18n("Default")); - pbDoubleDefault->setFixedSize( pbDoubleDefault->sizeHint() ); + pbDoubleDefault->setFixedSize( pbDoubleDefault->tqsizeHint() ); hbox->addWidget( pbDoubleDefault ); hbox->addStretch( 1 ); @@ -434,10 +434,10 @@ void KoAutoFormatDia::setupTab2() hbox->addSpacing( 20 ); pbSimpleQuote1 = new TQPushButton( tab2 ); - pbSimpleQuote1->setFixedSize( pbSimpleQuote1->sizeHint() ); + pbSimpleQuote1->setFixedSize( pbSimpleQuote1->tqsizeHint() ); pbSimpleQuote2 = new TQPushButton( tab2 ); - pbSimpleQuote2->setFixedSize( pbSimpleQuote2->sizeHint() ); + pbSimpleQuote2->setFixedSize( pbSimpleQuote2->tqsizeHint() ); if (TQApplication::reverseLayout()) { hbox->addWidget( pbSimpleQuote2 ); @@ -451,7 +451,7 @@ void KoAutoFormatDia::setupTab2() pbSimpleDefault = new TQPushButton( tab2 ); pbSimpleDefault->setText(i18n("Default")); - pbSimpleDefault->setFixedSize( pbSimpleDefault->sizeHint() ); + pbSimpleDefault->setFixedSize( pbSimpleDefault->tqsizeHint() ); hbox->addWidget( pbSimpleDefault ); hbox->addStretch( 1 ); diff --git a/lib/kotext/KoBgSpellCheck.cpp b/lib/kotext/KoBgSpellCheck.cpp index 612f0be7..f3b8928b 100644 --- a/lib/kotext/KoBgSpellCheck.cpp +++ b/lib/kotext/KoBgSpellCheck.cpp @@ -135,7 +135,7 @@ void KoBgSpellCheck::spellCheckerMisspelling( const TQString &old, int pos ) #endif markWord( parag, pos, old.length(), true ); // Repaint immediately, since the checking is timer-based (slow), it looks - // slow (chunky) if we only repaint once a paragraph is completely done. + // slow (chunky) if we only tqrepaint once a paragraph is completely done. parag->document()->emitRepaintChanged(); if ( d->startupChecking && d->marked > delayAfterMarked ) { @@ -171,7 +171,7 @@ void KoBgSpellCheck::markWord( KoTextParag* parag, int pos, int length, bool mis #endif parag->setFormat( pos, length, &format, true, KoTextFormat::Misspelled ); parag->setChanged( true ); - // don't repaint here, in the slotParagraphModified case we want to repaint only once at the end + // don't tqrepaint here, in the slotParagraphModified case we want to tqrepaint only once at the end } void KoBgSpellCheck::checkerContinue() diff --git a/lib/kotext/KoChangeCaseDia.cpp b/lib/kotext/KoChangeCaseDia.cpp index cde58f0a..8f7c2515 100644 --- a/lib/kotext/KoChangeCaseDia.cpp +++ b/lib/kotext/KoChangeCaseDia.cpp @@ -36,7 +36,7 @@ KoChangeCaseDia::KoChangeCaseDia( TQWidget *parent, const char *name ) TQButtonGroup *grp = new TQButtonGroup( 1, Qt::Horizontal, i18n( "Case" ),page ); grp->setRadioButtonExclusive( TRUE ); - grp->layout(); + grp->tqlayout(); m_upperCase=new TQRadioButton( i18n("&Uppercase"), grp ); m_lowerCase=new TQRadioButton( i18n("&Lowercase"), grp ); diff --git a/lib/kotext/KoCommentDia.cpp b/lib/kotext/KoCommentDia.cpp index 370befe8..a6c8b2bb 100644 --- a/lib/kotext/KoCommentDia.cpp +++ b/lib/kotext/KoCommentDia.cpp @@ -21,7 +21,7 @@ #include <tqvbox.h> #include <tqmultilineedit.h> #include "KoCommentDia.h" -#include <layout.h> +#include <tqlayout.h> #include <tqpushbutton.h> #include <kglobal.h> #include <tqdatetime.h> @@ -64,9 +64,9 @@ TQString KoCommentDia::commentText() void KoCommentDia::slotAddAuthorName() { - TQString date = KGlobal::locale()->formatDate( TQDate::currentDate() ); + TQString date = KGlobal::locale()->formatDate( TQDate::tqcurrentDate() ); TQString time = KGlobal::locale()->formatTime( TQTime::currentTime() ); - TQString result = TQString("--------%1 ,%2, %3------\n").arg(authorName).arg(date).arg(time); + TQString result = TQString("--------%1 ,%2, %3------\n").tqarg(authorName).tqarg(date).tqarg(time); m_multiLine->insertLine( result, m_multiLine->numLines() ); } diff --git a/lib/kotext/KoCompletionBase.ui b/lib/kotext/KoCompletionBase.ui index babc467c..12ae9d5d 100644 --- a/lib/kotext/KoCompletionBase.ui +++ b/lib/kotext/KoCompletionBase.ui @@ -29,7 +29,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout9</cstring> + <cstring>tqlayout9</cstring> </property> <hbox> <property name="name"> @@ -45,7 +45,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout8</cstring> + <cstring>tqlayout8</cstring> </property> <vbox> <property name="name"> @@ -83,7 +83,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>31</height> @@ -129,7 +129,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout11</cstring> + <cstring>tqlayout11</cstring> </property> <grid> <property name="name"> @@ -254,7 +254,7 @@ This option is most important when Automatically add words to completion list is </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout10</cstring> + <cstring>tqlayout10</cstring> </property> <hbox> <property name="name"> @@ -289,7 +289,7 @@ This option is most important when Automatically add words to completion list is <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>20</height> @@ -302,7 +302,7 @@ This option is most important when Automatically add words to completion list is </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -329,7 +329,7 @@ This option is most important when Automatically add words to completion list is <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>101</width> <height>20</height> diff --git a/lib/kotext/KoCompletionDia.cpp b/lib/kotext/KoCompletionDia.cpp index 2f5729b2..66d8d374 100644 --- a/lib/kotext/KoCompletionDia.cpp +++ b/lib/kotext/KoCompletionDia.cpp @@ -25,7 +25,7 @@ #include <kcompletion.h> #include <kconfig.h> #include <kdebug.h> -#include <layout.h> +#include <tqlayout.h> #include <tqvbox.h> #include <tqcheckbox.h> #include <tqpushbutton.h> @@ -40,7 +40,7 @@ KoCompletionDia::KoCompletionDia( TQWidget *parent, const char *name, KoAutoForm { TQVBox *page = makeVBoxMainWidget(); m_widget = new KoCompletion(page, autoFormat); - m_widget->layout()->setMargin(0); + m_widget->tqlayout()->setMargin(0); connect( this, TQT_SIGNAL( user1Clicked() ), m_widget, TQT_SLOT(slotResetConf())); setButtonWhatsThis(Ok,i18n("This will save your options.")); setButtonWhatsThis(Cancel,i18n("This will abort all changes.")); @@ -57,7 +57,7 @@ KoCompletion::KoCompletion(TQWidget *parent, KoAutoFormat *autoFormat) : KoCompl m_autoFormat( *autoFormat ), m_docAutoFormat( autoFormat ) { - connect(cbAllowCompletion, TQT_SIGNAL(toggled ( bool )), this, TQT_SLOT( changeButtonStatus())); + connect(cbAllowCompletion, TQT_SIGNAL(toggled ( bool )), this, TQT_SLOT( changeButtontqStatus())); TQStringList lst; lst << i18n( "Enter" ); lst << i18n( "Tab" ); @@ -74,10 +74,10 @@ KoCompletion::KoCompletion(TQWidget *parent, KoAutoFormat *autoFormat) : KoCompl connect( pbSaveCompletionEntry, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotSaveCompletionEntry())); slotResetConf(); // aka load config - changeButtonStatus(); + changeButtontqStatus(); } -void KoCompletion::changeButtonStatus() { +void KoCompletion::changeButtontqStatus() { bool state = cbAllowCompletion->isChecked(); completionBox->setEnabled( state); @@ -122,7 +122,7 @@ void KoCompletion::slotResetConf() { default: m_completionKeyAction->setCurrentItem( 0 ); } - changeButtonStatus(); + changeButtontqStatus(); } void KoCompletion::slotAddCompletionEntry() { diff --git a/lib/kotext/KoCompletionDia.h b/lib/kotext/KoCompletionDia.h index 98927e0b..1aefb39a 100644 --- a/lib/kotext/KoCompletionDia.h +++ b/lib/kotext/KoCompletionDia.h @@ -35,7 +35,7 @@ public: void saveSettings(); protected slots: - void changeButtonStatus(); + void changeButtontqStatus(); void slotResetConf(); void slotAddCompletionEntry(); void slotRemoveCompletionEntry(); diff --git a/lib/kotext/KoComplexText.cpp b/lib/kotext/KoComplexText.cpp index 475f439d..54599d07 100644 --- a/lib/kotext/KoComplexText.cpp +++ b/lib/kotext/KoComplexText.cpp @@ -65,14 +65,14 @@ KoBidiContext::~KoBidiContext() delete parent; } -static TQChar *shapeBuffer = 0; -static int shapeBufSize = 0; +static TQChar *tqshapeBuffer = 0; +static int tqshapeBufSize = 0; /* Arabic shaping obeys a number of rules according to the joining classes (see Unicode book, section on arabic). - Each unicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). + Each tqunicode char has a joining class (right, dual (left&right), center (joincausing) or transparent). transparent joining is not encoded in TQChar::joining(), but applies to all combining marks and format marks. Right join-causing: dual + center @@ -103,7 +103,7 @@ static int shapeBufSize = 0; */ /* - Two small helper functions for arabic shaping. They get the next shape causing character on either + Two small helper functions for arabic shaping. They get the next tqshape causing character on either side of the char in question. Implements rule R1. leftChar() returns true if the char to the left is a left join-causing char @@ -113,7 +113,7 @@ static inline const TQChar *prevChar( const TQString &str, int pos ) { //kdDebug() << "leftChar: pos=" << pos << endl; pos--; - const TQChar *ch = str.unicode() + pos; + const TQChar *ch = str.tqunicode() + pos; while( pos > -1 ) { if( !ch->isMark() ) return ch; @@ -127,7 +127,7 @@ static inline const TQChar *nextChar( const TQString &str, int pos) { pos++; int len = str.length(); - const TQChar *ch = str.unicode() + pos; + const TQChar *ch = str.tqunicode() + pos; while( pos < len ) { //kdDebug() << "rightChar: " << pos << " isLetter=" << ch.isLetter() << ", joining=" << ch.joining() << endl; if( !ch->isMark() ) @@ -155,11 +155,11 @@ KoComplexText::Shape KoComplexText::glyphVariant( const TQString &str, int pos) { // ignores L1 - L3, done in the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change shape + // these don't change tqshape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -200,11 +200,11 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in { // ignores L1 - L3, ligatures are job of the codec TQChar::Joining joining = str[pos].joining(); - //kdDebug() << "checking " << str[pos].unicode() << ", joining=" << joining << endl; + //kdDebug() << "checking " << str[pos].tqunicode() << ", joining=" << joining << endl; switch ( joining ) { case TQChar::OtherJoining: case TQChar::Center: - // these don't change shape + // these don't change tqshape return XIsolated; case TQChar::Right: // only rule R2 applies @@ -229,11 +229,11 @@ KoComplexText::Shape KoComplexText::glyphVariantLogical( const TQString &str, in // ------------------------------------------------------------- -// The unicode to unicode shaping codec. +// The tqunicode to tqunicode shaping codec. // does only presentation forms B at the moment, but that should be enough for // simple display static const ushort arabicUnicodeMapping[256][2] = { - // base of shaped forms, and number-1 of them ( 0 for non shaping, + // base of tqshaped forms, and number-1 of them ( 0 for non shaping, // 1 for right binding and 3 for dual binding { 0x0600, 0 }, // 0x600 { 0x0601, 0 }, // 0x601 @@ -355,7 +355,7 @@ static const ushort arabicUnicodeMapping[256][2] = { { 0x066e, 0 }, // 0x66e { 0x066f, 0 }, // 0x66f - // ### some glyphs do not have shaped mappings in the presentation forms A. + // ### some glyphs do not have tqshaped mappings in the presentation forms A. // these have the shaping set to 0 for the moment. Will have to find out better mappings for them. { 0x0670, 0 }, // 0x670 { 0xfb50, 1 }, // 0x671 R Alef Wasla @@ -512,7 +512,7 @@ static const ushort arabicUnicodeMapping[256][2] = { }; -// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the shape +// this is a bit tricky. Alef always binds to the right, so the second parameter descibing the tqshape // of the lam can be either initial of medial. So initial maps to the isolated form of the ligature, // medial to the final form static const ushort arabicUnicodeLamAlefMapping[6][4] = { @@ -524,14 +524,14 @@ static const ushort arabicUnicodeLamAlefMapping[6][4] = { { 0xfffd, 0xfffd, 0xfefb, 0xfefc } // 0x627 R Alef }; -static inline int getShape( const TQChar * /* base */, uchar cell, int shape, +static inline int getShape( const TQChar * /* base */, uchar cell, int tqshape, const TQFontMetrics * /* fm */ ) { - uint ch = arabicUnicodeMapping[cell][0] + shape; + uint ch = arabicUnicodeMapping[cell][0] + tqshape; /* - // we revert to the unshaped glyph in case the shaped version doesn't exist + // we revert to the untqshaped glyph in case the tqshaped version doesn't exist if ( fm && !fm->inFont( ch ) ) { - switch( shape ) { + switch( tqshape ) { case KoComplexText::XIsolated: break; // try base form case KoComplexText::XFinal: @@ -551,7 +551,7 @@ static inline int getShape( const TQChar * /* base */, uchar cell, int shape, return ch; } -TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) +TQString KoComplexText::tqshapedString(const TQString& uc, int from, int len, TQPainter::TextDirection dir, const TQFontMetrics *fm ) { if( len < 0 ) len = uc.length() - from; @@ -561,13 +561,13 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa // we have to ignore NSMs at the beginning and add at the end. int num = uc.length() - from - len; - const TQChar *ch = uc.unicode() + from + len; + const TQChar *ch = uc.tqunicode() + from + len; while ( num > 0 && ch->combiningClass() != 0 ) { ch++; num--; len++; } - ch = uc.unicode() + from; + ch = uc.tqunicode() + from; while ( len > 0 && ch->combiningClass() != 0 ) { ch++; len--; @@ -575,16 +575,16 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa } if ( len == 0 ) return TQString(); - if( !shapeBuffer || len > shapeBufSize ) { - if( shapeBuffer ) free( (void *) shapeBuffer ); - shapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); -// delete [] shapeBuffer; -// shapeBuffer = new TQChar[ len + 1]; - shapeBufSize = len; + if( !tqshapeBuffer || len > tqshapeBufSize ) { + if( tqshapeBuffer ) free( (void *) tqshapeBuffer ); + tqshapeBuffer = (TQChar *) malloc( len*sizeof( TQChar ) ); +// delete [] tqshapeBuffer; +// tqshapeBuffer = new TQChar[ len + 1]; + tqshapeBufSize = len; } int lenOut = 0; - TQChar *data = shapeBuffer; + TQChar *data = tqshapeBuffer; if ( dir == TQPainter::RTL ) ch += len - 1; for ( int i = 0; i < len; i++ ) { @@ -601,8 +601,8 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa int pos = i + from; if ( dir == TQPainter::RTL ) pos = from + len - 1 - i; - int shape = glyphVariantLogical( uc, pos ); - //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + int tqshape = glyphVariantLogical( uc, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; // take care of lam-alef ligatures (lam right of alef) ushort map; switch ( c ) { @@ -615,7 +615,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa case 0x25: case 0x27: //kdDebug() << " lam of lam-alef ligature" << endl; - map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][shape]; + map = arabicUnicodeLamAlefMapping[pch->cell() - 0x22][tqshape]; goto next; default: break; @@ -627,7 +627,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( uc, pos )->unicode() == 0x0644 ) { + if ( prevChar( uc, pos )->tqunicode() == 0x0644 ) { // have a lam alef ligature //kdDebug() << " alef of lam-alef ligature" << endl; goto skip; @@ -635,7 +635,7 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa default: break; } - map = getShape( ch, c, shape, fm ); + map = getShape( ch, c, tqshape, fm ); next: *data = map; data++; @@ -649,11 +649,11 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa } if ( dir == TQPainter::Auto && !uc.simpleText() ) { - return bidiReorderString( TQConstString( shapeBuffer, lenOut ).string() ); + return bidiReorderString( TQConstString( tqshapeBuffer, lenOut ).string() ); } if ( dir == TQPainter::RTL ) { // reverses the non spacing marks to be again after the base char - TQChar *s = shapeBuffer; + TQChar *s = tqshapeBuffer; int i = 0; while ( i < lenOut ) { if ( s->combiningClass() != 0 ) { @@ -684,17 +684,17 @@ TQString KoComplexText::shapedString(const TQString& uc, int from, int len, TQPa } } - return TQConstString( shapeBuffer, lenOut ).string(); + return TQConstString( tqshapeBuffer, lenOut ).string(); } -TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) +TQChar KoComplexText::tqshapedCharacter( const TQString &str, int pos, const TQFontMetrics *fm ) { - const TQChar *ch = str.unicode() + pos; + const TQChar *ch = str.tqunicode() + pos; if ( ch->row() != 0x06 ) return *ch; else { - int shape = glyphVariantLogical( str, pos ); - //kdDebug() << "mapping U+" << ch->unicode() << " to shape " << shape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][shape] << endl; + int tqshape = glyphVariantLogical( str, pos ); + //kdDebug() << "mapping U+" << ch->tqunicode() << " to tqshape " << tqshape << " glyph=0x" << arabicUnicodeMapping[ch->cell()][tqshape] << endl; // lam aleph ligatures switch ( ch->cell() ) { case 0x44: { // lam @@ -705,7 +705,7 @@ TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFon case 0x23: case 0x25: case 0x27: - return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][shape]); + return TQChar(arabicUnicodeLamAlefMapping[nch->cell() - 0x22][tqshape]); default: break; } @@ -716,13 +716,13 @@ TQChar KoComplexText::shapedCharacter( const TQString &str, int pos, const TQFon case 0x23: // alef with hamza above case 0x25: // alef with hamza below case 0x27: // alef - if ( prevChar( str, pos )->unicode() == 0x0644 ) + if ( prevChar( str, pos )->tqunicode() == 0x0644 ) // have a lam alef ligature return TQChar(0); default: break; } - return TQChar( getShape( ch, ch->cell(), shape, fm ) ); + return TQChar( getShape( ch, ch->cell(), tqshape, fm ) ); } } @@ -739,7 +739,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str if ( !nmarks ) return TQPointArray(); - TQChar baseChar = KoComplexText::shapedCharacter( str, pos ); + TQChar baseChar = KoComplexText::tqshapedCharacter( str, pos ); TQRect baseRect = f->boundingRect( baseChar ); int baseOffset = f->textWidth( str, pos, 1 ); @@ -842,7 +842,7 @@ TQPointArray KoComplexText::positionMarks( TQFontPrivate *f, const TQString &str default: break; } - //kdDebug() << "char=" << mark.unicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; + //kdDebug() << "char=" << mark.tqunicode() << " combiningClass = " << cmb << " offset=" << p.x() << "/" << p.y() << endl; markRect.moveBy( p.x(), p.y() ); p += TQPoint( -baseOffset, 0 ); attachmentRect |= markRect; @@ -864,7 +864,7 @@ static TQChar::Direction basicDirection(const TQString &str, int start = 0) { int len = str.length(); int pos = start > len ? len -1 : start; - const TQChar *uc = str.unicode() + pos; + const TQChar *uc = str.tqunicode() + pos; while( pos < len ) { switch( uc->direction() ) { @@ -913,7 +913,7 @@ TQPtrList<KoTextRun> *KoComplexText::bidiReorderLine( KoBidiControl *control, co } } - KoBidiStatus status = control->status; + KoBiditqStatus status = control->status; TQChar::Direction dir = TQChar::DirON; int sor = start; @@ -1406,8 +1406,8 @@ TQString KoComplexText::bidiReorderString( const TQString &str, TQChar::Directio int len = str.length(); TQString visual; visual.setUnicode( 0, len ); - TQChar *vch = (TQChar *)visual.unicode(); - const TQChar *ch = str.unicode(); + TQChar *vch = (TQChar *)visual.tqunicode(); + const TQChar *ch = str.tqunicode(); while( lineStart < len ) { lineEnd = lineStart; while( *ch != '\n' && lineEnd < len ) { diff --git a/lib/kotext/KoComplexText.h b/lib/kotext/KoComplexText.h index 8a22d152..72abfbed 100644 --- a/lib/kotext/KoComplexText.h +++ b/lib/kotext/KoComplexText.h @@ -62,8 +62,8 @@ #ifndef TQT_NO_COMPLEXTEXT // bidi helper classes. Internal to TQt -struct TQ_EXPORT KoBidiStatus { - KoBidiStatus() { +struct TQ_EXPORT KoBiditqStatus { + KoBiditqStatus() { eor = TQChar::DirON; lastStrong = TQChar::DirON; last = TQChar:: DirON; @@ -87,12 +87,12 @@ struct TQ_EXPORT KoBidiContext : public TQShared { struct TQ_EXPORT KoBidiControl { KoBidiControl() { context = 0; } - KoBidiControl( KoBidiContext *c, KoBidiStatus s) + KoBidiControl( KoBidiContext *c, KoBiditqStatus s) { context = c; if( context ) context->ref(); status = s; } ~KoBidiControl() { if ( context && context->deref() ) delete context; } void setContext( KoBidiContext *c ) { if ( context == c ) return; if ( context && context->deref() ) delete context; context = c; context->ref(); } KoBidiContext *context; - KoBidiStatus status; + KoBiditqStatus status; }; struct TQ_EXPORT KoTextRun { @@ -115,8 +115,8 @@ public: static Shape glyphVariant( const TQString &str, int pos); static Shape glyphVariantLogical( const TQString &str, int pos); - static TQString shapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); - static TQChar shapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); + static TQString tqshapedString( const TQString &str, int from = 0, int len = -1, TQPainter::TextDirection dir = TQPainter::Auto, const TQFontMetrics *fm = 0); + static TQChar tqshapedCharacter(const TQString &str, int pos, const TQFontMetrics *fm = 0); // positions non spacing marks relative to the base character at position pos. //static TQPointArray positionMarks( TQFontPrivate *f, const TQString &str, int pos, TQRect *boundingRect = 0 ); diff --git a/lib/kotext/KoCreateStyleDia.cpp b/lib/kotext/KoCreateStyleDia.cpp index fb7d9b9d..e4b9f339 100644 --- a/lib/kotext/KoCreateStyleDia.cpp +++ b/lib/kotext/KoCreateStyleDia.cpp @@ -33,7 +33,7 @@ KoCreateStyleDia::KoCreateStyleDia( const TQStringList & _list, TQWidget *parent TQVBox *page = makeVBoxMainWidget(); new TQLabel(i18n("Please specify a new style name:"), page); m_styleName = new TQLineEdit( page ); - m_styleName->setMinimumWidth( m_styleName->sizeHint().width() * 3 ); + m_styleName->setMinimumWidth( m_styleName->tqsizeHint().width() * 3 ); connect( m_styleName, TQT_SIGNAL(textChanged ( const TQString & )), this, TQT_SLOT(nameChanged( const TQString &))); m_styleName->setFocus(); diff --git a/lib/kotext/KoCustomVariablesDia.cpp b/lib/kotext/KoCustomVariablesDia.cpp index f3b84121..aa74d133 100644 --- a/lib/kotext/KoCustomVariablesDia.cpp +++ b/lib/kotext/KoCustomVariablesDia.cpp @@ -67,7 +67,7 @@ void KoVariableNameDia::init() row1->setSpacing( KDialog::spacingHint() ); TQLabel *l = new TQLabel( i18n( "Name:" ), row1 ); - l->setFixedSize( l->sizeHint() ); + l->setFixedSize( l->tqsizeHint() ); names = new TQComboBox( TRUE, row1 ); names->setFocus(); @@ -108,9 +108,9 @@ void KoCustomVariablesListItem::setup() { TQListViewItem::setup(); setHeight( TQMAX( listView()->fontMetrics().height(), - editWidget->sizeHint().height() ) ); - //if ( listView()->columnWidth( 1 ) < editWidget->sizeHint().width() ) - // listView()->setColumnWidth( 1, editWidget->sizeHint().width() ); + editWidget->tqsizeHint().height() ) ); + //if ( listView()->columnWidth( 1 ) < editWidget->tqsizeHint().width() ) + // listView()->setColumnWidth( 1, editWidget->tqsizeHint().width() ); } void KoCustomVariablesListItem::update() @@ -297,13 +297,13 @@ void KoCustomVarDialog::init() TQHBox *row1 = new TQHBox( back ); row1->setSpacing( KDialog::spacingHint() ); TQLabel *ln = new TQLabel( i18n( "Name:" ), row1 ); - ln->setFixedSize( ln->sizeHint() ); + ln->setFixedSize( ln->tqsizeHint() ); m_name = new KLineEdit( row1 ); TQHBox *row2 = new TQHBox( back ); row2->setSpacing( KDialog::spacingHint() ); TQLabel *lv = new TQLabel( i18n( "Value:" ), row2 ); - lv->setFixedSize( lv->sizeHint() ); + lv->setFixedSize( lv->tqsizeHint() ); m_value = new KLineEdit( row2 ); } diff --git a/lib/kotext/KoImportStyleDia.cpp b/lib/kotext/KoImportStyleDia.cpp index 1cab9dae..327dbe53 100644 --- a/lib/kotext/KoImportStyleDia.cpp +++ b/lib/kotext/KoImportStyleDia.cpp @@ -19,7 +19,7 @@ #include <klocale.h> #include <tqvbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlineedit.h> #include <tqpushbutton.h> #include <tqlistbox.h> @@ -98,7 +98,7 @@ TQString KoImportStyleDia::generateStyleName( const TQString & templateName ) co int num = 1; bool exists; do { - name = templateName.arg( num ); + name = templateName.tqarg( num ); exists = m_currentCollection->findStyle( name ) != 0; ++num; } while ( exists ); @@ -111,7 +111,7 @@ TQString KoImportStyleDia::generateStyleDisplayName( const TQString & templateNa int num = 1; bool exists; do { - name = templateName.arg( num ); + name = templateName.tqarg( num ); exists = m_currentCollection->findStyleByDisplayName( name ) != 0; ++num; } while ( exists ); diff --git a/lib/kotext/KoParagCounter.cpp b/lib/kotext/KoParagCounter.cpp index 9810e8b0..6126d6c5 100644 --- a/lib/kotext/KoParagCounter.cpp +++ b/lib/kotext/KoParagCounter.cpp @@ -43,7 +43,7 @@ KoParagCounter::KoParagCounter() m_customBulletChar = TQChar( '-' ); m_customBulletFont = TQString(); m_align = TQt::AlignAuto; - invalidate(); + tqinvalidate(); } bool KoParagCounter::operator==( const KoParagCounter & c2 ) const @@ -83,7 +83,7 @@ unsigned int KoParagCounter::depth() const return m_depth; } -void KoParagCounter::invalidate() +void KoParagCounter::tqinvalidate() { m_cache.number = -1; m_cache.text = TQString(); @@ -144,7 +144,7 @@ void KoParagCounter::load( TQDomElement & element ) m_align = element.attribute("align", "0").toInt(); //AlignAuto as defeult TQString restart = element.attribute("restart"); m_restartCounter = (restart == "true") || (restart == "1"); - invalidate(); + tqinvalidate(); } static int importCounterType( TQChar numFormat ) @@ -216,7 +216,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, TQString bulletChar = listStyle.attributeNS( KoXmlNS::text, "bullet-char", TQString() ); if ( !bulletChar.isEmpty() ) { // Reverse engineering, I found those codes: - switch( bulletChar[0].unicode() ) { + switch( bulletChar[0].tqunicode() ) { case 0x2022: // small disc -> circle m_style = STYLE_CIRCLEBULLET; break; @@ -235,7 +235,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_BOXBULLET; break; default: - kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.unicode(), 16 ) << endl; + kdDebug() << "Unhandled bullet code 0x" << TQString::number( (uint)m_customBulletChar.tqunicode(), 16 ) << endl; // fallback case 0x2794: // arrow case 0x2717: // cross @@ -259,7 +259,7 @@ void KoParagCounter::loadOasisListStyle( const TQDomElement& listStyle, m_style = STYLE_DISCBULLET; } } - invalidate(); + tqinvalidate(); } void KoParagCounter::saveOasis( KoGenStyle& listStyle, bool savingStyle ) const @@ -326,7 +326,7 @@ void KoParagCounter::saveOasisListLevel( KoXmlWriter& listLevelWriter, bool incl listLevelWriter.startElement( "style:list-level-properties" ); listLevelWriter.addAttribute( "fo:text-align", KoParagLayout::saveOasisAlignment( (TQt::AlignmentFlags)m_align ) ); // OASIS has other style properties: text:space-before (indent), text:min-label-width (TODO), - // text:min-label-distance, style:font-name (for bullets), image size and vertical alignment. + // text:min-label-distance, style:font-name (for bullets), image size and vertical tqalignment. listLevelWriter.endElement(); // style:list-level-properties } } @@ -504,7 +504,7 @@ void KoParagCounter::save( TQDomElement & element ) element.setAttribute( "depth", m_depth ); if ( (Style)m_style == STYLE_CUSTOMBULLET ) { - element.setAttribute( "bullet", m_customBulletChar.unicode() ); + element.setAttribute( "bullet", m_customBulletChar.tqunicode() ); if ( !m_customBulletFont.isEmpty() ) element.setAttribute( "bulletfont", m_customBulletFont ); } @@ -531,66 +531,66 @@ void KoParagCounter::save( TQDomElement & element ) void KoParagCounter::setCustom( TQString c ) { m_custom = c; - invalidate(); + tqinvalidate(); } void KoParagCounter::setCustomBulletCharacter( TQChar c ) { m_customBulletChar = c; - invalidate(); + tqinvalidate(); } void KoParagCounter::setCustomBulletFont( TQString f ) { m_customBulletFont = f; - invalidate(); + tqinvalidate(); } void KoParagCounter::setDepth( unsigned int d ) { m_depth = d; - invalidate(); + tqinvalidate(); } void KoParagCounter::setNumbering( Numbering n ) { m_numbering = n; - invalidate(); + tqinvalidate(); } void KoParagCounter::setPrefix( TQString p ) { m_prefix = p; - invalidate(); + tqinvalidate(); } void KoParagCounter::setStartNumber( int s ) { m_startNumber = s; - invalidate(); + tqinvalidate(); } void KoParagCounter::setDisplayLevels( int l ) { m_displayLevels = l; - invalidate(); + tqinvalidate(); } -void KoParagCounter::setAlignment( int a ) +void KoParagCounter::tqsetAlignment( int a ) { m_align = a; - invalidate(); + tqinvalidate(); } void KoParagCounter::setStyle( Style s ) { m_style = s; - invalidate(); + tqinvalidate(); } void KoParagCounter::setSuffix( TQString s ) { m_suffix = s; - invalidate(); + tqinvalidate(); } int KoParagCounter::startNumber() const @@ -603,7 +603,7 @@ int KoParagCounter::displayLevels() const return m_displayLevels; } -int KoParagCounter::alignment() const +int KoParagCounter::tqalignment() const { return m_align; } @@ -626,7 +626,7 @@ bool KoParagCounter::restartCounter() const void KoParagCounter::setRestartCounter( bool restart ) { m_restartCounter = restart; - invalidate(); + tqinvalidate(); } // Return the text for that level only @@ -839,7 +839,7 @@ const TQCString RNThousands[] = {"", "m", "mm", "mmm"}; TQString KoParagCounter::makeRomanNumber( int n ) { if ( n >= 0 ) - return TQString::fromLatin1( RNThousands[ ( n / 1000 ) ] + + return TQString::tqfromLatin1( RNThousands[ ( n / 1000 ) ] + RNHundreds[ ( n / 100 ) % 10 ] + RNTens[ ( n / 10 ) % 10 ] + RNUnits[ ( n ) % 10 ] ); @@ -973,7 +973,7 @@ void KoParagCounter::printRTDebug( KoTextParag* parag ) if ( restartCounter() ) additionalInfo = "[restartCounter]"; if ( m_style == STYLE_CUSTOMBULLET ) - additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.unicode() ) + additionalInfo += " [customBullet: " + TQString::number( m_customBulletChar.tqunicode() ) + " in font '" + m_customBulletFont + "']"; static const char * const s_numbering[] = { "List", "Chapter", "None", "Footnote" }; kdDebug(32500) << " Counter style=" << style() diff --git a/lib/kotext/KoParagCounter.h b/lib/kotext/KoParagCounter.h index d45b2435..dbedb3e8 100644 --- a/lib/kotext/KoParagCounter.h +++ b/lib/kotext/KoParagCounter.h @@ -40,7 +40,7 @@ public: /** Invalidate the internal cache. Use it whenever the number associated with this * counter may have changed. */ - void invalidate(); + void tqinvalidate(); /** Return the current value of the counter as a number. */ @@ -172,10 +172,10 @@ public: TQString custom() const; void setCustom( TQString c ); - /** Counter alignment + /** Counter tqalignment */ - int alignment() const; - void setAlignment( int a ); + int tqalignment() const; + void tqsetAlignment( int a ); /** * Return the format to use for the counter. diff --git a/lib/kotext/KoParagDecorationTab.ui b/lib/kotext/KoParagDecorationTab.ui index 131e1b0c..4c93c261 100644 --- a/lib/kotext/KoParagDecorationTab.ui +++ b/lib/kotext/KoParagDecorationTab.ui @@ -131,7 +131,7 @@ modified in the preview.</p></string> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>200</width> <height>200</height> @@ -361,7 +361,7 @@ regardless of the style of the preceeding and subsequent paragraphs.</p></ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>250</width> <height>21</height> diff --git a/lib/kotext/KoParagDia.cpp b/lib/kotext/KoParagDia.cpp index ed7700e2..2bc0262d 100644 --- a/lib/kotext/KoParagDia.cpp +++ b/lib/kotext/KoParagDia.cpp @@ -50,7 +50,7 @@ #include <tqvbox.h> #include <tqhbox.h> #include <tqtooltip.h> -#include <layout.h> +#include <tqlayout.h> #include <tqapplication.h> #include <tqwidgetstack.h> @@ -129,7 +129,7 @@ KoCounterStyleWidget::KoCounterStyleWidget( bool displayDepth, bool onlyStyleTyp grid->addWidget( spnStart, 2, 2); lAlignment = new TQLabel( gStyle, "lAlignment" ); - lAlignment->setText( i18n( "Counter alignment:" ) ); + lAlignment->setText( i18n( "Counter tqalignment:" ) ); grid->addWidget( lAlignment, 2, 3 ); cbAlignment = new KComboBox( gStyle, "cbAlignment" ); @@ -205,7 +205,7 @@ void KoCounterStyleWidget::alignmentChanged(const TQString& s) kdError()<<"Not Implemented"<<endl; return; } - m_counter.setAlignment(a); + m_counter.tqsetAlignment(a); emit sig_alignmentChanged(a); } @@ -296,11 +296,11 @@ void KoCounterStyleWidget::displayStyle( KoParagCounter::Style style ) spnStart->setValue( m_counter.startNumber() ); cbRestart->setChecked( m_counter.restartCounter() ); - if(m_counter.alignment()==TQt::AlignLeft) + if(m_counter.tqalignment()==TQt::AlignLeft) cbAlignment->setCurrentText(i18n("Align Left")); - else if(m_counter.alignment()==TQt::AlignRight) + else if(m_counter.tqalignment()==TQt::AlignRight) cbAlignment->setCurrentText(i18n("Align Right")); - else if(m_counter.alignment()==TQt::AlignAuto) + else if(m_counter.tqalignment()==TQt::AlignAuto) cbAlignment->setCurrentText(i18n("Align Auto")); else kdError()<<"Not Implemented"<<endl; @@ -812,14 +812,14 @@ void KoStylePreview::setCounter( const KoParagCounter & counter ) { KoTextParag * parag = m_textdoc->firstParag(); parag->setCounter( counter ); - repaint( true ); + tqrepaint( true ); } void KoStylePreview::setStyle( KoParagStyle * style ) { KoTextParag * parag = m_textdoc->firstParag(); parag->applyStyle( style ); - repaint(true); + tqrepaint(true); } void KoStylePreview::drawContents( TQPainter *painter ) @@ -830,7 +830,7 @@ void KoStylePreview::drawContents( TQPainter *painter ) TQRect whiteRect( r.x() + 10, r.y() + 10, r.width() - 20, r.height() - 20 ); - TQColorGroup cg = TQApplication::palette().active(); + TQColorGroup cg = TQApplication::tqpalette().active(); painter->fillRect( whiteRect, cg.brush( TQColorGroup::Base ) ); KoTextParag * parag = m_textdoc->firstParag(); @@ -839,13 +839,13 @@ void KoStylePreview::drawContents( TQPainter *painter ) { // For centering to work, and to even get word wrapping when the thing is too big :) m_textdoc->setWidth( widthLU ); - parag->invalidate(0); + parag->tqinvalidate(0); } parag->format(); TQRect textRect = parag->pixelRect( m_zoomHandler ); - // Center vertically, but not horizontally, to keep the parag alignment working, + // Center vertically, but not horizontally, to keep the parag tqalignment working, textRect.moveTopLeft( TQPoint( whiteRect.x(), whiteRect.y() + ( whiteRect.height() - textRect.height() ) / 2 ) ); // Move it from the left border a little @@ -879,8 +879,8 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW frameWidth=9999; } else { length=i18n("Frame width: %1 %2") - .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .arg(KoUnit::unitName(m_unit)); + .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .tqarg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } @@ -890,12 +890,12 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW TQLabel * lLimit = new TQLabel(length , indentFrame ); if(frameWidth!=-1) { - lLimit->setAlignment( AlignRight ); + lLimit->tqsetAlignment( AlignRight ); indentGrid->addWidget( lLimit, 1,0 ); } TQLabel * lLeft = new TQLabel( i18n("&Left:"), indentFrame ); - lLeft->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lLeft->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lLeft, 1, 0 ); eLeft = new KoUnitDoubleSpinBox( indentFrame, 0, 9999, 1, 0.0, m_unit ); @@ -904,7 +904,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW connect( eLeft, TQT_SIGNAL( valueChangedPt(double ) ), this, TQT_SLOT( leftChanged( double ) ) ); TQLabel * lRight = new TQLabel( i18n("&Right:"), indentFrame ); - lRight->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lRight->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lRight, 2, 0 ); eRight = new KoUnitDoubleSpinBox( indentFrame, 0, 9999, 1, 0.0, m_unit ); @@ -913,7 +913,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW connect( eRight, TQT_SIGNAL( valueChangedPt( double ) ), this, TQT_SLOT( rightChanged( double ) ) ); TQLabel * lFirstLine = new TQLabel( i18n("&First line:"), indentFrame ); - lFirstLine->setAlignment( TQt::AlignVCenter | TQt::AlignRight ); + lFirstLine->tqsetAlignment( TQt::AlignVCenter | TQt::AlignRight ); indentGrid->addWidget( lFirstLine, 3, 0 ); eFirstLine = new KoUnitDoubleSpinBox( indentFrame, -9999, 9999, 1, 0.0, m_unit ); @@ -938,9 +938,9 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW cSpacing->insertItem( i18n( "Line spacing value", "1.5 Lines" ) ); cSpacing->insertItem( i18n( "Line spacing value", "Double" ) ); cSpacing->insertItem( i18n( "Proportional") ); // LS_MULTIPLE, called Proportional like in OO - cSpacing->insertItem( i18n( "Line Distance (%1)" ).arg(unitName) ); // LS_CUSTOM - cSpacing->insertItem( i18n( "At Least (%1)" ).arg(unitName) ); - cSpacing->insertItem( i18n( "Fixed (%1)").arg(unitName) ); // LS_FIXED + cSpacing->insertItem( i18n( "Line Distance (%1)" ).tqarg(unitName) ); // LS_CUSTOM + cSpacing->insertItem( i18n( "At Least (%1)" ).tqarg(unitName) ); + cSpacing->insertItem( i18n( "Fixed (%1)").tqarg(unitName) ); // LS_FIXED connect( cSpacing, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( spacingActivated( int ) ) ); spacingGrid->addWidget( cSpacing, 1, 0 ); @@ -974,7 +974,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW KDialog::marginHint(), KDialog::spacingHint() ); TQLabel * lBefore = new TQLabel( i18n("Before:"), pSpaceFrame ); - lBefore->setAlignment( AlignRight ); + lBefore->tqsetAlignment( AlignRight ); pSpaceGrid->addWidget( lBefore, 1, 0 ); eBefore = new KoUnitDoubleSpinBox( pSpaceFrame, 0, 9999, CM_TO_POINT(1), 0.0, m_unit ); @@ -983,7 +983,7 @@ KoIndentSpacingWidget::KoIndentSpacingWidget( KoUnit::Unit unit, double _frameW pSpaceGrid->addWidget( eBefore, 1, 1 ); TQLabel * lAfter = new TQLabel( i18n("After:"), pSpaceFrame ); - lAfter->setAlignment( AlignRight ); + lAfter->tqsetAlignment( AlignRight ); pSpaceGrid->addWidget( lAfter, 2, 0 ); eAfter = new KoUnitDoubleSpinBox( pSpaceFrame, 0, 9999, 1, 0.0, m_unit ); @@ -1273,7 +1273,7 @@ int KoParagAlignWidget::pageBreaking() const void KoParagAlignWidget::display( const KoParagLayout & lay ) { - int align = lay.alignment; + int align = lay.tqalignment; prev2->setAlign( align ); clearAligns(); @@ -1302,7 +1302,7 @@ void KoParagAlignWidget::display( const KoParagLayout & lay ) void KoParagAlignWidget::save( KoParagLayout & lay ) { - lay.alignment = align(); + lay.tqalignment = align(); lay.pageBreaking = pageBreaking(); } @@ -1605,10 +1605,10 @@ KoParagCounterWidget::KoParagCounterWidget( bool disableAll, TQWidget * parent, gNumbering = new TQButtonGroup( this, "numberingGroup" ); gNumbering->setTitle( i18n( "Numbering" ) ); gNumbering->setColumnLayout(0, Qt::Vertical ); - gNumbering->layout()->setSpacing( 0 ); - gNumbering->layout()->setMargin( 0 ); - TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->layout() ); - numberingGroupLayout->setAlignment( TQt::AlignTop ); + gNumbering->tqlayout()->setSpacing( 0 ); + gNumbering->tqlayout()->setMargin( 0 ); + TQHBoxLayout *numberingGroupLayout = new TQHBoxLayout( gNumbering->tqlayout() ); + numberingGroupLayout->tqsetAlignment( TQt::AlignTop ); numberingGroupLayout->setSpacing( KDialog::spacingHint() ); numberingGroupLayout->setMargin( KDialog::marginHint() ); @@ -1705,7 +1705,7 @@ void KoParagCounterWidget::display( const KoParagLayout & lay ) { void KoParagCounterWidget::updatePreview() { preview->setCounter(m_counter); - preview->repaint(true); + preview->tqrepaint(true); } void KoParagCounterWidget::save( KoParagLayout & lay ) { @@ -1746,8 +1746,8 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram } else { m_toplimit=frameWidth; length=i18n("Frame width: %1 %2") - .arg(KoUnit::toUserStringValue(frameWidth,m_unit)) - .arg(KoUnit::unitName(m_unit)); + .tqarg(KoUnit::toUserStringValue(frameWidth,m_unit)) + .tqarg(KoUnit::unitName(m_unit)); frameWidth=KoUnit::toUserValue(frameWidth,m_unit); } TQVBoxLayout* Form1Layout = new TQVBoxLayout( this ); @@ -1770,10 +1770,10 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram gPosition = new TQGroupBox( this, "gPosition" ); gPosition->setTitle( i18n( "Po&sition" ) ); gPosition->setColumnLayout(0, Qt::Vertical ); - gPosition->layout()->setSpacing( 0 ); - gPosition->layout()->setMargin( 0 ); - TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->layout() ); - GroupBox2Layout->setAlignment( TQt::AlignTop ); + gPosition->tqlayout()->setSpacing( 0 ); + gPosition->tqlayout()->setMargin( 0 ); + TQVBoxLayout* GroupBox2Layout = new TQVBoxLayout( gPosition->tqlayout() ); + GroupBox2Layout->tqsetAlignment( TQt::AlignTop ); GroupBox2Layout->setSpacing( KDialog::spacingHint() ); GroupBox2Layout->setMargin( KDialog::marginHint() ); @@ -1798,10 +1798,10 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram bgAlign = new TQButtonGroup( this ); bgAlign->setTitle( i18n( "Alignment" ) ); bgAlign->setColumnLayout(0, Qt::Vertical ); - bgAlign->layout()->setSpacing( 0 ); - bgAlign->layout()->setMargin( 0 ); - TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->layout() ); - ButtonGroup1Layout->setAlignment( TQt::AlignTop ); + bgAlign->tqlayout()->setSpacing( 0 ); + bgAlign->tqlayout()->setMargin( 0 ); + TQVBoxLayout* ButtonGroup1Layout = new TQVBoxLayout( bgAlign->tqlayout() ); + ButtonGroup1Layout->tqsetAlignment( TQt::AlignTop ); ButtonGroup1Layout->setSpacing( KDialog::spacingHint() ); ButtonGroup1Layout->setMargin( KDialog::marginHint() ); @@ -1837,7 +1837,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram gTabLeader = new TQGroupBox( this, "gTabLeader" ); gTabLeader->setTitle( i18n( "Tab Leader" ) ); TQVBoxLayout* GroupBox5Layout = new TQVBoxLayout( gTabLeader ); - GroupBox5Layout->setAlignment( TQt::AlignTop ); + GroupBox5Layout->tqsetAlignment( TQt::AlignTop ); GroupBox5Layout->setSpacing( KDialog::spacingHint() ); GroupBox5Layout->setMargin( KDialog::marginHint() ); GroupBox5Layout->addSpacing( fontMetrics().height() / 2 ); // groupbox title @@ -1850,7 +1850,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram TQLabel* TextLabel2 = new TQLabel( gTabLeader); TextLabel2->setText( i18n( "&Filling:" ) ); - TextLabel2->setAlignment( AlignRight ); + TextLabel2->tqsetAlignment( AlignRight ); fillingGrid->addWidget( TextLabel2, 0, 0 ); cFilling = new TQComboBox( FALSE, gTabLeader); @@ -1864,7 +1864,7 @@ KoParagTabulatorsWidget::KoParagTabulatorsWidget( KoUnit::Unit unit, double fram fillingGrid->addWidget( cFilling, 0, 1 ); TQLabel * TextLabel3 = new TQLabel( i18n("&Width:"), gTabLeader ); - TextLabel3->setAlignment( AlignRight ); + TextLabel3->tqsetAlignment( AlignRight ); fillingGrid->addWidget( TextLabel3, 1, 0 ); eWidth = new KoUnitDoubleSpinBox( gTabLeader ); @@ -2159,31 +2159,31 @@ KoParagDia::KoParagDia( TQWidget* parent, const char* name, { TQVBox * page = addVBoxPage( i18n( "Indent && S&pacing" ) ); m_indentSpacingWidget = new KoIndentSpacingWidget( unit,_frameWidth,page, "indent-spacing" ); - m_indentSpacingWidget->layout()->setMargin(0); + m_indentSpacingWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_ALIGN ) { TQVBox * page = addVBoxPage( i18n( "General &Layout" ) ); m_alignWidget = new KoParagAlignWidget( breakLine, page, "align" ); - m_alignWidget->layout()->setMargin(0); + m_alignWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_DECORATION ) { TQVBox * page = addVBoxPage( i18n( "D&ecorations" ) ); m_decorationsWidget = new KoParagDecorationWidget( page, "decorations"); - m_decorationsWidget->layout()->setMargin(0); + m_decorationsWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_NUMBERING ) { TQVBox * page = addVBoxPage( i18n( "B&ullets/Numbers" ) ); m_counterWidget = new KoParagCounterWidget( disableAll , page, "numbers" ); - m_counterWidget->layout()->setMargin(0); + m_counterWidget->tqlayout()->setMargin(0); } if ( m_flags & PD_TABS ) { TQVBox * page = addVBoxPage( i18n( "&Tabulators" ) ); m_tabulatorsWidget = new KoParagTabulatorsWidget( unit,_frameWidth, page, "tabs"); - m_tabulatorsWidget->layout()->setMargin(0); + m_tabulatorsWidget->tqlayout()->setMargin(0); } connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotReset())); @@ -2272,7 +2272,7 @@ KoParagLayout KoParagDia::paragLayout() const newLayout.setLineSpacingValue( lineSpacing() ); newLayout.lineSpacingType = lineSpacingType(); newLayout.setTabList( tabListTabulator() ); - newLayout.alignment = align(); + newLayout.tqalignment = align(); newLayout.margins[TQStyleSheetItem::MarginFirstLine] = firstLineIndent(); newLayout.margins[TQStyleSheetItem::MarginLeft] = leftIndent(); newLayout.margins[TQStyleSheetItem::MarginRight] = rightIndent(); diff --git a/lib/kotext/KoParagDia.h b/lib/kotext/KoParagDia.h index 2f3cc751..c4bbed92 100644 --- a/lib/kotext/KoParagDia.h +++ b/lib/kotext/KoParagDia.h @@ -24,7 +24,7 @@ #include <kdialogbase.h> #include <tqstringlist.h> #include <tqptrlist.h> -#include <stylesheet.h> +#include <tqstylesheet.h> #include <KoRuler.h> #include <KoUnit.h> #include <KoUnitWidgets.h> @@ -95,7 +95,7 @@ public: /** return the (i18n-ed) name of the tab */ virtual TQString tabName() = 0; - // Return the part of the paraglayout that this widget cares about + // Return the part of the paragtqlayout that this widget cares about int flag() const { return m_flag; } private: @@ -147,7 +147,7 @@ private: }; /** - * The widget for editing paragraph alignment (tab 2) + * The widget for editing paragraph tqalignment (tab 2) */ class KOTEXT_EXPORT KoParagAlignWidget : public KoParagLayoutWidget { @@ -369,7 +369,7 @@ protected slots: void restartChanged(bool b) {m_counter.setRestartCounter(b); } void depthChanged(int i) {m_counter.setDepth(i); updatePreview();} void displayLevelsChanged(int i) {m_counter.setDisplayLevels(i); updatePreview();} - void alignmentChanged(int i) {m_counter.setAlignment(i); updatePreview();} + void alignmentChanged(int i) {m_counter.tqsetAlignment(i); updatePreview();} void slotChangeCustomBullet( const TQString & f, TQChar c); void styleChanged (KoParagCounter::Style st ); @@ -549,7 +549,7 @@ public: TQColor backgroundColor() const { return m_decorationsWidget->backgroundColor(); } // Support for "what has changed?" - bool isAlignChanged() const {return oldLayout.alignment!=align();} + bool isAlignChanged() const {return oldLayout.tqalignment!=align();} bool isLineSpacingChanged() const { return (oldLayout.lineSpacingValue() !=lineSpacing() || oldLayout.lineSpacingType != lineSpacingType()); diff --git a/lib/kotext/KoParagDia_p.h b/lib/kotext/KoParagDia_p.h index 48f77ea1..a1ca5737 100644 --- a/lib/kotext/KoParagDia_p.h +++ b/lib/kotext/KoParagDia_p.h @@ -66,17 +66,17 @@ public: ~KPagePreview() {} void setLeft( double _left ) - { left = _left; repaint( false ); } + { left = _left; tqrepaint( false ); } void setRight( double _right ) - { right = _right; repaint( false ); } + { right = _right; tqrepaint( false ); } void setFirst( double _first ) - { first = _first; repaint( false ); } + { first = _first; tqrepaint( false ); } void setSpacing( double _spacing ) - { spacing = _spacing; repaint( false ); } + { spacing = _spacing; tqrepaint( false ); } void setBefore( double _before ) - { before = _before; repaint( false ); } + { before = _before; tqrepaint( false ); } void setAfter( double _after ) - { after = _after; repaint( false ); } + { after = _after; tqrepaint( false ); } protected: void drawContents( TQPainter* ); @@ -100,7 +100,7 @@ public: ~KPagePreview2() {} void setAlign( int _align ) - { align = _align; repaint( false ); } + { align = _align; tqrepaint( false ); } protected: void drawContents( TQPainter* ); @@ -124,16 +124,16 @@ public: KoBorder leftBorder()const { return m_leftBorder; } void setLeftBorder( const KoBorder& _leftBorder ) - { m_leftBorder = _leftBorder; repaint( true ); } + { m_leftBorder = _leftBorder; tqrepaint( true ); } KoBorder rightBorder() const { return m_rightBorder; } void setRightBorder( const KoBorder& _rightBorder ) - { m_rightBorder = _rightBorder; repaint( true ); } + { m_rightBorder = _rightBorder; tqrepaint( true ); } KoBorder topBorder()const { return m_topBorder; } void setTopBorder( const KoBorder& _topBorder ) - { m_topBorder = _topBorder; repaint( true ); } + { m_topBorder = _topBorder; tqrepaint( true ); } KoBorder bottomBorder()const { return m_bottomBorder; } void setBottomBorder( const KoBorder& _bottomBorder ) - { m_bottomBorder = _bottomBorder; repaint( true ); } + { m_bottomBorder = _bottomBorder; tqrepaint( true ); } void setBorder( KoBorder::BorderType which, const KoBorder& border); diff --git a/lib/kotext/KoParagLayout.cpp b/lib/kotext/KoParagLayout.cpp index 37fbbfb5..fd1a9453 100644 --- a/lib/kotext/KoParagLayout.cpp +++ b/lib/kotext/KoParagLayout.cpp @@ -44,72 +44,72 @@ KoParagLayout::KoParagLayout() initialise(); } -void KoParagLayout::operator=( const KoParagLayout &layout ) +void KoParagLayout::operator=( const KoParagLayout &tqlayout ) { - alignment = layout.alignment; + tqalignment = tqlayout.tqalignment; for ( int i = 0 ; i < 5 ; ++i ) - margins[i] = layout.margins[i]; - pageBreaking = layout.pageBreaking; - leftBorder = layout.leftBorder; - rightBorder = layout.rightBorder; - topBorder = layout.topBorder; - bottomBorder = layout.bottomBorder; - joinBorder = layout.joinBorder; - backgroundColor = layout.backgroundColor; - if ( layout.counter ) - counter = new KoParagCounter( *layout.counter ); + margins[i] = tqlayout.margins[i]; + pageBreaking = tqlayout.pageBreaking; + leftBorder = tqlayout.leftBorder; + rightBorder = tqlayout.rightBorder; + topBorder = tqlayout.topBorder; + bottomBorder = tqlayout.bottomBorder; + joinBorder = tqlayout.joinBorder; + backgroundColor = tqlayout.backgroundColor; + if ( tqlayout.counter ) + counter = new KoParagCounter( *tqlayout.counter ); else counter = 0L; - lineSpacing = layout.lineSpacing; - lineSpacingType = layout.lineSpacingType; - style = layout.style; - direction = layout.direction; - setTabList( layout.tabList() ); + lineSpacing = tqlayout.lineSpacing; + lineSpacingType = tqlayout.lineSpacingType; + style = tqlayout.style; + direction = tqlayout.direction; + setTabList( tqlayout.tabList() ); } -int KoParagLayout::compare( const KoParagLayout & layout ) const +int KoParagLayout::compare( const KoParagLayout & tqlayout ) const { int flags = 0; - if ( alignment != layout.alignment ) + if ( tqalignment != tqlayout.tqalignment ) flags |= Alignment; for ( int i = 0 ; i < 5 ; ++i ) - if ( margins[i] != layout.margins[i] ) + if ( margins[i] != tqlayout.margins[i] ) { flags |= Margins; break; } - if ( pageBreaking != layout.pageBreaking ) + if ( pageBreaking != tqlayout.pageBreaking ) flags |= PageBreaking; - if ( leftBorder != layout.leftBorder - || rightBorder != layout.rightBorder - || topBorder != layout.topBorder - || bottomBorder != layout.bottomBorder - || joinBorder != layout.joinBorder ) + if ( leftBorder != tqlayout.leftBorder + || rightBorder != tqlayout.rightBorder + || topBorder != tqlayout.topBorder + || bottomBorder != tqlayout.bottomBorder + || joinBorder != tqlayout.joinBorder ) flags |= Borders; - if ( layout.counter ) + if ( tqlayout.counter ) { if ( counter ) { - if ( ! ( *layout.counter == *counter ) ) + if ( ! ( *tqlayout.counter == *counter ) ) flags |= BulletNumber; } else - if ( layout.counter->numbering() != KoParagCounter::NUM_NONE ) + if ( tqlayout.counter->numbering() != KoParagCounter::NUM_NONE ) flags |= BulletNumber; } else if ( counter && counter->numbering() != KoParagCounter::NUM_NONE ) flags |= BulletNumber; - if ( lineSpacing != layout.lineSpacing - || lineSpacingType != layout.lineSpacingType ) + if ( lineSpacing != tqlayout.lineSpacing + || lineSpacingType != tqlayout.lineSpacingType ) flags |= LineSpacing; - //if ( style != layout.style ) + //if ( style != tqlayout.style ) // flags |= Style; - if ( m_tabList != layout.m_tabList ) + if ( m_tabList != tqlayout.m_tabList ) flags |= Tabulator; - if ( backgroundColor != layout.backgroundColor) + if ( backgroundColor != tqlayout.backgroundColor) flags |= BackgroundColor; // This method is used for the GUI stuff only, so we don't have a flag @@ -119,7 +119,7 @@ int KoParagLayout::compare( const KoParagLayout & layout ) const void KoParagLayout::initialise() { - alignment = TQt::AlignAuto; + tqalignment = TQt::AlignAuto; for ( int i = 0 ; i < 5 ; ++i ) // use memset ? margins[i] = 0; lineSpacingType = LS_SINGLE; @@ -141,13 +141,13 @@ KoParagLayout::~KoParagLayout() delete counter; } -void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion ) +void KoParagLayout::loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion ) { - // layout is an input and output parameter + // tqlayout is an input and output parameter // It can have been initialized already, e.g. by copying from a style // (we don't do that anymore though). - // Load the paragraph tabs - we load into a clean list, not mixing with those already in "layout" + // Load the paragraph tabs - we load into a clean list, not mixing with those already in "tqlayout" // We can't apply the 'default comes from the style' in this case, because // there is no way to differentiate between "I want no tabs in the parag" // and "use default from style". @@ -171,15 +171,15 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& } } qHeapSort( tabList ); - layout.setTabList( tabList ); - layout.alignment = TQt::AlignAuto; - element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called alignment internally + tqlayout.setTabList( tabList ); + tqlayout.tqalignment = TQt::AlignAuto; + element = parentElem.namedItem( "FLOW" ).toElement(); // Flow is what is now called tqalignment internally if ( !element.isNull() ) { TQString flow = element.attribute( "align" ); // KWord-1.0 DTD if ( !flow.isEmpty() ) { - layout.alignment = flow=="right" ? TQt::AlignRight : + tqlayout.tqalignment = flow=="right" ? TQt::AlignRight : flow=="center" ? TQt::AlignHCenter : flow=="justify" ? TQt::AlignJustify : flow=="left" ? TQt::AlignLeft : TQt::AlignAuto; @@ -187,9 +187,9 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& TQString dir = element.attribute( "dir" ); // KWord-1.2 if ( !dir.isEmpty() ) { if ( dir == "L" ) - layout.direction = TQChar::DirL; + tqlayout.direction = TQChar::DirL; else if ( dir == "R" ) - layout.direction = TQChar::DirR; + tqlayout.direction = TQChar::DirR; else kdWarning() << "Unexpected value for paragraph direction: " << dir << endl; } @@ -197,7 +197,7 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& flow = element.attribute( "value" ); // KWord-0.8 static const int flow2align[] = { TQt::AlignAuto, TQt::AlignRight, TQt::AlignHCenter, TQt::AlignJustify }; if ( !flow.isEmpty() && flow.toInt() < 4 ) - layout.alignment = flow2align[flow.toInt()]; + tqlayout.tqalignment = flow2align[flow.toInt()]; } } @@ -205,34 +205,34 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& { element = parentElem.namedItem( "OHEAD" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "OFOOT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "IFIRST" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "pt", 0.0 ); element = parentElem.namedItem( "ILEFT" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) - layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "pt", 0.0 ); } // KWord-1.0 DTD element = parentElem.namedItem( "INDENTS" ).toElement(); if ( !element.isNull() ) { - layout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 ); - layout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 ); - layout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = getAttribute( element, "first", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginLeft] = getAttribute( element, "left", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginRight] = getAttribute( element, "right", 0.0 ); } element = parentElem.namedItem( "OFFSETS" ).toElement(); if ( !element.isNull() ) { - layout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 ); - layout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginTop] = getAttribute( element, "before", 0.0 ); + tqlayout.margins[TQStyleSheetItem::MarginBottom] = getAttribute( element, "after", 0.0 ); } if ( docVersion < 2 ) @@ -240,8 +240,8 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& element = parentElem.namedItem( "LINESPACE" ).toElement(); // used by KWord-0.8 if ( !element.isNull() ) { - layout.lineSpacingType = KoParagLayout::LS_CUSTOM; - layout.lineSpacing = getAttribute( element, "pt", 0.0 ); + tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; + tqlayout.lineSpacing = getAttribute( element, "pt", 0.0 ); } } @@ -254,18 +254,18 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& TQString value = element.attribute( "value" ); if ( value == "oneandhalf" ) { - layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; - layout.lineSpacing = 0; + tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + tqlayout.lineSpacing = 0; } else if ( value == "double" ) { - layout.lineSpacingType = KoParagLayout::LS_DOUBLE; - layout.lineSpacing = 0; + tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; + tqlayout.lineSpacing = 0; } else { - layout.lineSpacingType = KoParagLayout::LS_CUSTOM; - layout.lineSpacing = value.toDouble(); + tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; + tqlayout.lineSpacing = value.toDouble(); } } else @@ -273,36 +273,36 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& TQString type = element.attribute( "type" ); if ( type == "oneandhalf" ) { - layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; - layout.lineSpacing = 0; + tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + tqlayout.lineSpacing = 0; } else if ( type == "double" ) { - layout.lineSpacingType = KoParagLayout::LS_DOUBLE; - layout.lineSpacing = 0; + tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; + tqlayout.lineSpacing = 0; } else if ( type == "custom" ) { - layout.lineSpacingType = KoParagLayout::LS_CUSTOM; - layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; + tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "atleast" ) { - layout.lineSpacingType = KoParagLayout::LS_AT_LEAST; - layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST; + tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "multiple" ) { - layout.lineSpacingType = KoParagLayout::LS_MULTIPLE; - layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE; + tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "fixed" ) { - layout.lineSpacingType = KoParagLayout::LS_FIXED; - layout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); + tqlayout.lineSpacingType = KoParagLayout::LS_FIXED; + tqlayout.lineSpacing = element.attribute( "spacingvalue" ).toDouble(); } else if ( type == "single" ) // not used; just in case future versions use it. - layout.lineSpacingType = KoParagLayout::LS_SINGLE; + tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE; } } @@ -323,37 +323,37 @@ void KoParagLayout::loadParagLayout( KoParagLayout& layout, const TQDomElement& if ( !element.isNull() ) pageBreaking |= KoParagLayout::HardFrameBreakBefore; } - layout.pageBreaking = pageBreaking; + tqlayout.pageBreaking = pageBreaking; element = parentElem.namedItem( "LEFTBORDER" ).toElement(); if ( !element.isNull() ) - layout.leftBorder = KoBorder::loadBorder( element ); + tqlayout.leftBorder = KoBorder::loadBorder( element ); else - layout.leftBorder.setPenWidth(0); + tqlayout.leftBorder.setPenWidth(0); element = parentElem.namedItem( "RIGHTBORDER" ).toElement(); if ( !element.isNull() ) - layout.rightBorder = KoBorder::loadBorder( element ); + tqlayout.rightBorder = KoBorder::loadBorder( element ); else - layout.rightBorder.setPenWidth(0); + tqlayout.rightBorder.setPenWidth(0); element = parentElem.namedItem( "TOPBORDER" ).toElement(); if ( !element.isNull() ) - layout.topBorder = KoBorder::loadBorder( element ); + tqlayout.topBorder = KoBorder::loadBorder( element ); else - layout.topBorder.setPenWidth(0); + tqlayout.topBorder.setPenWidth(0); element = parentElem.namedItem( "BOTTOMBORDER" ).toElement(); if ( !element.isNull() ) - layout.bottomBorder = KoBorder::loadBorder( element ); + tqlayout.bottomBorder = KoBorder::loadBorder( element ); else - layout.bottomBorder.setPenWidth(0); + tqlayout.bottomBorder.setPenWidth(0); element = parentElem.namedItem( "COUNTER" ).toElement(); if ( !element.isNull() ) { - layout.counter = new KoParagCounter; - layout.counter->load( element ); + tqlayout.counter = new KoParagCounter; + tqlayout.counter->load( element ); } // Compatibility with KOffice-1.2 @@ -425,38 +425,38 @@ TQt::AlignmentFlags KoParagLayout::loadOasisAlignment( const TQCString& str ) } //static -TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags alignment ) +TQCString KoParagLayout::saveOasisAlignment( TQt::AlignmentFlags tqalignment ) { - return alignment == TQt::AlignLeft ? "left" : - alignment == TQt::AlignRight ? "right" : - alignment == TQt::AlignHCenter ? "center" : - alignment == TQt::AlignJustify ? "justify" : + return tqalignment == TQt::AlignLeft ? "left" : + tqalignment == TQt::AlignRight ? "right" : + tqalignment == TQt::AlignHCenter ? "center" : + tqalignment == TQt::AlignJustify ? "justify" : "start"; // i.e. direction-dependent } -void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context ) +void KoParagLayout::loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context ) { context.styleStack().setTypeProperties( "paragraph" ); - // layout is an input and output parameter + // tqlayout is an input and output parameter // It can have been initialized already, e.g. by copying from a style // code from OoWriterImport::writeLayout if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-align" ) ) { TQCString align = context.styleStack().attributeNS( KoXmlNS::fo, "text-align" ).latin1(); - layout.alignment = loadOasisAlignment( align ); + tqlayout.tqalignment = loadOasisAlignment( align ); } if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "writing-mode" ) ) { // http://web4.w3.org/TR/xsl/slice7.html#writing-mode // LTR is lr-tb. RTL is rl-tb TQString writingMode = context.styleStack().attributeNS( KoXmlNS::style, "writing-mode" ); - layout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL; + tqlayout.direction = ( writingMode=="rl-tb" || writingMode=="rl" ) ? TQChar::DirR : TQChar::DirL; } // Indentation (margins) if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-left" ) || // 3.11.19 context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-right" ) ) { - layout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) ); - layout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) ); + tqlayout.margins[TQStyleSheetItem::MarginLeft] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-left" ) ); + tqlayout.margins[TQStyleSheetItem::MarginRight] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-right" ) ); // *text-indent must always be bound to either margin-left or margin-right double first = 0; if ( context.styleStack().attributeNS( KoXmlNS::style, "auto-text-indent") == "true" ) // style:auto-text-indent takes precedence @@ -467,14 +467,14 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& else if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "text-indent") ) first = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "text-indent") ); - layout.margins[TQStyleSheetItem::MarginFirstLine] = first; + tqlayout.margins[TQStyleSheetItem::MarginFirstLine] = first; } // Offset before and after paragraph if( context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-top") || // 3.11.22 context.styleStack().hasAttributeNS( KoXmlNS::fo, "margin-bottom")) { - layout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) ); - layout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) ); + tqlayout.margins[TQStyleSheetItem::MarginTop] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-top" ) ); + tqlayout.margins[TQStyleSheetItem::MarginBottom] = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::fo, "margin-bottom" ) ); } // Line spacing @@ -483,23 +483,23 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& TQString value = context.styleStack().attributeNS( KoXmlNS::fo, "line-height" ); if ( value != "normal" ) { if ( value == "100%" ) - layout.lineSpacingType = KoParagLayout::LS_SINGLE; + tqlayout.lineSpacingType = KoParagLayout::LS_SINGLE; else if( value=="150%") - layout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; + tqlayout.lineSpacingType = KoParagLayout::LS_ONEANDHALF; else if( value=="200%") - layout.lineSpacingType = KoParagLayout::LS_DOUBLE; + tqlayout.lineSpacingType = KoParagLayout::LS_DOUBLE; else if ( value.find('%') > -1 ) { value = value.remove( '%' ); double percent = value.toDouble(); - layout.lineSpacingType = KoParagLayout::LS_MULTIPLE; - layout.lineSpacing = percent / 100.0; - kdDebug(33001) << "line-height =" << percent << ", " << layout.lineSpacing << ", " << percent/100 << endl; + tqlayout.lineSpacingType = KoParagLayout::LS_MULTIPLE; + tqlayout.lineSpacing = percent / 100.0; + kdDebug(33001) << "line-height =" << percent << ", " << tqlayout.lineSpacing << ", " << percent/100 << endl; } else // fixed value { - layout.lineSpacingType = KoParagLayout::LS_FIXED; - layout.lineSpacing = KoUnit::parseValue( value ); + tqlayout.lineSpacingType = KoParagLayout::LS_FIXED; + tqlayout.lineSpacing = KoUnit::parseValue( value ); } } } @@ -512,8 +512,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& // Did we make the wrong choice in kotext? //kdWarning() << "Unimplemented support for style:line-height-at-least: " << value << endl; // Well let's see if this makes a big difference. - layout.lineSpacingType = KoParagLayout::LS_AT_LEAST; - layout.lineSpacing = KoUnit::parseValue( value ); + tqlayout.lineSpacingType = KoParagLayout::LS_AT_LEAST; + tqlayout.lineSpacing = KoUnit::parseValue( value ); } // Line-spacing is mutually exclusive with line-height and line-height-at-least else if ( context.styleStack().hasAttributeNS( KoXmlNS::style, "line-spacing") ) // 3.11.3 @@ -521,8 +521,8 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& double value = KoUnit::parseValue( context.styleStack().attributeNS( KoXmlNS::style, "line-spacing" ) ); if ( value != 0.0 ) { - layout.lineSpacingType = KoParagLayout::LS_CUSTOM; - layout.lineSpacing = value; + tqlayout.lineSpacingType = KoParagLayout::LS_CUSTOM; + tqlayout.lineSpacing = value; } } @@ -530,7 +530,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& KoTabulatorList tabList; if ( context.styleStack().hasChildNodeNS( KoXmlNS::style, "tab-stops" ) ) { // 3.11.10 TQDomElement tabStops = context.styleStack().childNodeNS( KoXmlNS::style, "tab-stops" ); - //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in layout." << endl; + //kdDebug(30519) << k_funcinfo << tabStops.childNodes().count() << " tab stops in tqlayout." << endl; TQDomElement tabStop; forEachElement( tabStop, tabStops ) { @@ -540,7 +540,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& KoTabulator tab; tab.ptPos = KoUnit::parseValue( tabStop.attributeNS( KoXmlNS::style, "position", TQString() ) ); // Tab stop positions in the XML are relative to the left-margin - tab.ptPos += layout.margins[TQStyleSheetItem::MarginLeft]; + tab.ptPos += tqlayout.margins[TQStyleSheetItem::MarginLeft]; if ( type == "center" ) tab.type = T_CENTER; else if ( type == "right" ) @@ -549,7 +549,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& TQString delimiterChar = tabStop.attributeNS( KoXmlNS::style, "char", TQString() ); // single character if ( !delimiterChar.isEmpty() ) tab.alignChar = delimiterChar[0]; - tab.type = T_DEC_PNT; // "alignment on decimal point" + tab.type = T_DEC_PNT; // "tqalignment on decimal point" } else //if ( type == "left" ) tab.type = T_LEFT; @@ -573,7 +573,7 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& } else { - // Fallback: convert leaderChar's unicode value + // Fallback: convert leaderChar's tqunicode value TQString leaderChar = tabStop.attributeNS( KoXmlNS::style, "leader-text", TQString() ); if ( !leaderChar.isEmpty() ) { @@ -594,27 +594,27 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& } //for } qHeapSort( tabList ); - layout.setTabList( tabList ); + tqlayout.setTabList( tabList ); - layout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" ); + tqlayout.joinBorder = !( context.styleStack().attributeNS( KoXmlNS::style, "join-border") == "false" ); // Borders if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","left") ) - layout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") ); + tqlayout.leftBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","left") ); else - layout.leftBorder.setPenWidth(0); + tqlayout.leftBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","right") ) - layout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") ); + tqlayout.rightBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","right") ); else - layout.rightBorder.setPenWidth(0); + tqlayout.rightBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","top") ) - layout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") ); + tqlayout.topBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","top") ); else - layout.topBorder.setPenWidth(0); + tqlayout.topBorder.setPenWidth(0); if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "border","bottom") ) - layout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") ); + tqlayout.bottomBorder.loadFoBorder( context.styleStack().attributeNS( KoXmlNS::fo, "border","bottom") ); else - layout.bottomBorder.setPenWidth(0); + tqlayout.bottomBorder.setPenWidth(0); // Page breaking @@ -647,148 +647,148 @@ void KoParagLayout::loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& pageBreaking |= KoParagLayout::KeepWithNext; } } - layout.pageBreaking = pageBreaking; + tqlayout.pageBreaking = pageBreaking; // Paragraph background color - fo:background-color // The background color for parts of a paragraph that have no text underneath if ( context.styleStack().hasAttributeNS( KoXmlNS::fo, "background-color" ) ) { TQString bgColor = context.styleStack().attributeNS( KoXmlNS::fo, "background-color"); if (bgColor != "transparent") - layout.backgroundColor.setNamedColor( bgColor ); + tqlayout.backgroundColor.setNamedColor( bgColor ); } } -void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) const +void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int tqalignment ) const { - const KoParagLayout& layout = *this; // code moved from somewhere else;) + const KoParagLayout& tqlayout = *this; // code moved from somewhere else;) TQDomDocument doc = parentElem.ownerDocument(); TQDomElement element = doc.createElement( "NAME" ); parentElem.appendChild( element ); - if ( layout.style ) - element.setAttribute( "value", layout.style->displayName() ); + if ( tqlayout.style ) + element.setAttribute( "value", tqlayout.style->displayName() ); //else // kdWarning() << "KoParagLayout::saveParagLayout: style==0!" << endl; element = doc.createElement( "FLOW" ); parentElem.appendChild( element ); - element.setAttribute( "align", alignment==TQt::AlignRight ? "right" : - alignment==TQt::AlignHCenter ? "center" : - alignment==TQt::AlignJustify ? "justify" : - alignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. + element.setAttribute( "align", tqalignment==TQt::AlignRight ? "right" : + tqalignment==TQt::AlignHCenter ? "center" : + tqalignment==TQt::AlignJustify ? "justify" : + tqalignment==TQt::AlignAuto ? "auto" : "left" ); // Note: styles can have AlignAuto. Not paragraphs. - if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirR ) + if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirR ) element.setAttribute( "dir", "R" ); else - if ( static_cast<TQChar::Direction>(layout.direction) == TQChar::DirL ) + if ( static_cast<TQChar::Direction>(tqlayout.direction) == TQChar::DirL ) element.setAttribute( "dir", "L" ); - if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 || - layout.margins[TQStyleSheetItem::MarginLeft] != 0 || - layout.margins[TQStyleSheetItem::MarginRight] != 0 ) + if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 || + tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 || + tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 ) { element = doc.createElement( "INDENTS" ); parentElem.appendChild( element ); - if ( layout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ) - element.setAttribute( "first", layout.margins[TQStyleSheetItem::MarginFirstLine] ); - if ( layout.margins[TQStyleSheetItem::MarginLeft] != 0 ) - element.setAttribute( "left", layout.margins[TQStyleSheetItem::MarginLeft] ); - if ( layout.margins[TQStyleSheetItem::MarginRight] != 0 ) - element.setAttribute( "right", layout.margins[TQStyleSheetItem::MarginRight] ); + if ( tqlayout.margins[TQStyleSheetItem::MarginFirstLine] != 0 ) + element.setAttribute( "first", tqlayout.margins[TQStyleSheetItem::MarginFirstLine] ); + if ( tqlayout.margins[TQStyleSheetItem::MarginLeft] != 0 ) + element.setAttribute( "left", tqlayout.margins[TQStyleSheetItem::MarginLeft] ); + if ( tqlayout.margins[TQStyleSheetItem::MarginRight] != 0 ) + element.setAttribute( "right", tqlayout.margins[TQStyleSheetItem::MarginRight] ); } - if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 || - layout.margins[TQStyleSheetItem::MarginBottom] != 0 ) + if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 || + tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) { element = doc.createElement( "OFFSETS" ); parentElem.appendChild( element ); - if ( layout.margins[TQStyleSheetItem::MarginTop] != 0 ) - element.setAttribute( "before", layout.margins[TQStyleSheetItem::MarginTop] ); - if ( layout.margins[TQStyleSheetItem::MarginBottom] != 0 ) - element.setAttribute( "after", layout.margins[TQStyleSheetItem::MarginBottom] ); + if ( tqlayout.margins[TQStyleSheetItem::MarginTop] != 0 ) + element.setAttribute( "before", tqlayout.margins[TQStyleSheetItem::MarginTop] ); + if ( tqlayout.margins[TQStyleSheetItem::MarginBottom] != 0 ) + element.setAttribute( "after", tqlayout.margins[TQStyleSheetItem::MarginBottom] ); } - if ( layout.lineSpacingType != LS_SINGLE ) + if ( tqlayout.lineSpacingType != LS_SINGLE ) { element = doc.createElement( "LINESPACING" ); parentElem.appendChild( element ); - if ( layout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) { + if ( tqlayout.lineSpacingType == KoParagLayout::LS_ONEANDHALF ) { element.setAttribute( "type", "oneandhalf" ); element.setAttribute( "value", "oneandhalf" ); //compatibility with koffice 1.2 } - else if ( layout.lineSpacingType == KoParagLayout::LS_DOUBLE ) { + else if ( tqlayout.lineSpacingType == KoParagLayout::LS_DOUBLE ) { element.setAttribute( "type", "double" ); element.setAttribute( "value", "double" ); //compatibility with koffice 1.2 } - else if ( layout.lineSpacingType == KoParagLayout::LS_CUSTOM ) + else if ( tqlayout.lineSpacingType == KoParagLayout::LS_CUSTOM ) { element.setAttribute( "type", "custom" ); - element.setAttribute( "spacingvalue", layout.lineSpacing); - element.setAttribute( "value", layout.lineSpacing ); //compatibility with koffice 1.2 + element.setAttribute( "spacingvalue", tqlayout.lineSpacing); + element.setAttribute( "value", tqlayout.lineSpacing ); //compatibility with koffice 1.2 } - else if ( layout.lineSpacingType == KoParagLayout::LS_AT_LEAST ) + else if ( tqlayout.lineSpacingType == KoParagLayout::LS_AT_LEAST ) { element.setAttribute( "type", "atleast" ); - element.setAttribute( "spacingvalue", layout.lineSpacing); + element.setAttribute( "spacingvalue", tqlayout.lineSpacing); } - else if ( layout.lineSpacingType == KoParagLayout::LS_MULTIPLE ) + else if ( tqlayout.lineSpacingType == KoParagLayout::LS_MULTIPLE ) { element.setAttribute( "type", "multiple" ); - element.setAttribute( "spacingvalue", layout.lineSpacing); + element.setAttribute( "spacingvalue", tqlayout.lineSpacing); } - else if ( layout.lineSpacingType == KoParagLayout::LS_FIXED ) + else if ( tqlayout.lineSpacingType == KoParagLayout::LS_FIXED ) { element.setAttribute( "type", "fixed" ); - element.setAttribute( "spacingvalue", layout.lineSpacing); + element.setAttribute( "spacingvalue", tqlayout.lineSpacing); } else kdDebug()<<" error in lineSpacing Type\n"; } - if ( layout.pageBreaking != 0 ) + if ( tqlayout.pageBreaking != 0 ) { element = doc.createElement( "PAGEBREAKING" ); parentElem.appendChild( element ); - if ( layout.pageBreaking & KoParagLayout::KeepLinesTogether ) + if ( tqlayout.pageBreaking & KoParagLayout::KeepLinesTogether ) element.setAttribute( "linesTogether", "true" ); - if ( layout.pageBreaking & KoParagLayout::HardFrameBreakBefore ) + if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakBefore ) element.setAttribute( "hardFrameBreak", "true" ); - if ( layout.pageBreaking & KoParagLayout::HardFrameBreakAfter ) + if ( tqlayout.pageBreaking & KoParagLayout::HardFrameBreakAfter ) element.setAttribute( "hardFrameBreakAfter", "true" ); } - if ( layout.leftBorder.penWidth() > 0 ) + if ( tqlayout.leftBorder.penWidth() > 0 ) { element = doc.createElement( "LEFTBORDER" ); parentElem.appendChild( element ); - layout.leftBorder.save( element ); + tqlayout.leftBorder.save( element ); } - if ( layout.rightBorder.penWidth() > 0 ) + if ( tqlayout.rightBorder.penWidth() > 0 ) { element = doc.createElement( "RIGHTBORDER" ); parentElem.appendChild( element ); - layout.rightBorder.save( element ); + tqlayout.rightBorder.save( element ); } - if ( layout.topBorder.penWidth() > 0 ) + if ( tqlayout.topBorder.penWidth() > 0 ) { element = doc.createElement( "TOPBORDER" ); parentElem.appendChild( element ); - layout.topBorder.save( element ); + tqlayout.topBorder.save( element ); } - if ( layout.bottomBorder.penWidth() > 0 ) + if ( tqlayout.bottomBorder.penWidth() > 0 ) { element = doc.createElement( "BOTTOMBORDER" ); parentElem.appendChild( element ); - layout.bottomBorder.save( element ); + tqlayout.bottomBorder.save( element ); } - if ( layout.counter && layout.counter->numbering() != KoParagCounter::NUM_NONE ) + if ( tqlayout.counter && tqlayout.counter->numbering() != KoParagCounter::NUM_NONE ) { element = doc.createElement( "COUNTER" ); parentElem.appendChild( element ); - if ( layout.counter ) - layout.counter->save( element ); + if ( tqlayout.counter ) + tqlayout.counter->save( element ); } - KoTabulatorList tabList = layout.tabList(); + KoTabulatorList tabList = tqlayout.tabList(); KoTabulatorList::ConstIterator it = tabList.begin(); for ( ; it != tabList.end() ; it++ ) { @@ -806,7 +806,7 @@ void KoParagLayout::saveParagLayout( TQDomElement & parentElem, int alignment ) void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const { - gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)alignment ).data() ); + gs.addProperty( "fo:text-align", saveOasisAlignment( (TQt::AlignmentFlags)tqalignment ).data() ); // Don't save the direction for a style, if "auto", so that the // auto-determination of direction based on first char, works. if ( !savingStyle || (TQChar::Direction) direction != TQChar::DirON ) @@ -863,7 +863,7 @@ void KoParagLayout::saveOasis( KoGenStyle& gs, KoSavingContext& context, bool sa case T_RIGHT: tabsWriter.addAttribute( "style:type", "right" ); break; - case T_DEC_PNT: // "alignment on decimal point" + case T_DEC_PNT: // "tqalignment on decimal point" tabsWriter.addAttribute( "style:type", "char" ); if ( !(*it).alignChar.isNull() ) tabsWriter.addAttribute( "style:char", TQString( (*it).alignChar ) ); diff --git a/lib/kotext/KoParagLayout.h b/lib/kotext/KoParagLayout.h index 975fdaf0..2c9b9dea 100644 --- a/lib/kotext/KoParagLayout.h +++ b/lib/kotext/KoParagLayout.h @@ -40,7 +40,7 @@ class KOTEXT_EXPORT KoParagLayout { public: KoParagLayout(); - KoParagLayout( const KoParagLayout &layout ) { operator=( layout ); } + KoParagLayout( const KoParagLayout &tqlayout ) { operator=( tqlayout ); } ~KoParagLayout(); @@ -96,7 +96,7 @@ public: char pageBreaking; // Page breaking flags char direction; // TQChar::Direction /// Alignment flag (AlignAuto/AlignLeft/AlignRight/AlignJustify) - char alignment; // TQt::AlignmentFlags + char tqalignment; // TQt::AlignmentFlags KoBorder leftBorder, rightBorder, topBorder, bottomBorder; /// The background color of the paragraph @@ -122,39 +122,39 @@ public: const KoTabulatorList& tabList() const { return m_tabList; } //! Assignment operator for KoParagLayout - /** Copy a paragraph layout. + /** Copy a paragraph tqlayout. * * If you're modifying this, you might also need to modify * KoTextParag::setParagLayout */ void operator=( const KoParagLayout & ); - /** Return a set of flags showing the differences between this and 'layout' */ - int compare( const KoParagLayout & layout ) const; + /** Return a set of flags showing the differences between this and 'tqlayout' */ + int compare( const KoParagLayout & tqlayout ) const; - /** Save this parag layout to XML. + /** Save this parag tqlayout to XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ - void saveParagLayout( TQDomElement & parentElem, int alignment ) const; + void saveParagLayout( TQDomElement & parentElem, int tqalignment ) const; - /** Load this parag layout from XML. + /** Load this parag tqlayout from XML. * This format is used by KWord for paragraphs, and by KPresenter+KWord for styles. */ - static void loadParagLayout( KoParagLayout& layout, const TQDomElement& parentElem, int docVersion = 2 ); + static void loadParagLayout( KoParagLayout& tqlayout, const TQDomElement& parentElem, int docVersion = 2 ); - /// Load this parag layout from Oasis XML - static void loadOasisParagLayout( KoParagLayout& layout, KoOasisContext& context ); - /// Save this parag layout to Oasis XML + /// Load this parag tqlayout from Oasis XML + static void loadOasisParagLayout( KoParagLayout& tqlayout, KoOasisContext& context ); + /// Save this parag tqlayout to Oasis XML /// @param savingStyle true if this is saved as part of a user style, /// false when saving a paragraph /// @param gs the style where all the properties will be saved to /// @param context the current context void saveOasis( KoGenStyle& gs, KoSavingContext& context, bool savingStyle ) const; - /// Convert an alignment string into an alignment flag (load) + /// Convert an tqalignment string into an tqalignment flag (load) static TQt::AlignmentFlags loadOasisAlignment( const TQCString& str ); - /// Convert an alignment flag into an alignment string (save) - static TQCString saveOasisAlignment( TQt::AlignmentFlags alignment ); + /// Convert an tqalignment flag into an tqalignment string (save) + static TQCString saveOasisAlignment( TQt::AlignmentFlags tqalignment ); private: static int getAttribute(const TQDomElement &element, const char *attributeName, int defaultValue) { diff --git a/lib/kotext/KoParagStyle.cpp b/lib/kotext/KoParagStyle.cpp index fcae882c..a68c6768 100644 --- a/lib/kotext/KoParagStyle.cpp +++ b/lib/kotext/KoParagStyle.cpp @@ -88,7 +88,7 @@ void KoParagStyle::setFollowingStyle( KoParagStyle *fst ) void KoParagStyle::saveStyle( TQDomElement & parentElem ) { - m_paragLayout.saveParagLayout( parentElem, m_paragLayout.alignment ); + m_paragLayout.saveParagLayout( parentElem, m_paragLayout.tqalignment ); if ( followingStyle() ) { @@ -103,12 +103,12 @@ void KoParagStyle::saveStyle( TQDomElement & parentElem ) void KoParagStyle::loadStyle( TQDomElement & parentElem, int docVersion ) { - KoParagLayout layout; - KoParagLayout::loadParagLayout( layout, parentElem, docVersion ); + KoParagLayout tqlayout; + KoParagLayout::loadParagLayout( tqlayout, parentElem, docVersion ); // This way, KoTextParag::setParagLayout also sets the style pointer, to this style - layout.style = this; - m_paragLayout = layout; + tqlayout.style = this; + m_paragLayout = tqlayout; // Load name TQDomElement nameElem = parentElem.namedItem("NAME").toElement(); @@ -138,8 +138,8 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context context.styleStack().save(); context.addStyles( &styleElem, "paragraph" ); // Load all parents - only because we don't support inheritance. - KoParagLayout layout; - KoParagLayout::loadOasisParagLayout( layout, context ); + KoParagLayout tqlayout; + KoParagLayout::loadOasisParagLayout( tqlayout, context ); // loadOasisParagLayout doesn't load the counter. It's modelled differently for parags and for styles. int level = 0; @@ -172,15 +172,15 @@ void KoParagStyle::loadStyle( TQDomElement & styleElem, KoOasisContext& context const TQDomElement listStyle = context.listStyleStack().currentListStyle(); // The tag is either text:list-level-style-number or text:list-level-style-bullet const bool ordered = listStyle.localName() == "list-level-style-number"; - Q_ASSERT( !layout.counter ); - layout.counter = new KoParagCounter; - layout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true ); + Q_ASSERT( !tqlayout.counter ); + tqlayout.counter = new KoParagCounter; + tqlayout.counter->loadOasis( context, -1, ordered, m_bOutline, level, true ); context.listStyleStack().pop(); } // This way, KoTextParag::setParagLayout also sets the style pointer, to this style - layout.style = this; - m_paragLayout = layout; + tqlayout.style = this; + m_paragLayout = tqlayout; m_format.load( context ); @@ -207,7 +207,7 @@ TQString KoParagStyle::saveStyle( KoGenStyles& genStyles, int styleType, const T // This display-name will probably look nicer in OO, but this also means // no re-use possible between list styles... listStyle.addAttribute( "style:display-name", - i18n( "Numbering Style for %1" ).arg( m_displayName ) ); + i18n( "Numbering Style for %1" ).tqarg( m_displayName ) ); TQString autoListStyleName = genStyles.lookup( listStyle, "L", KoGenStyles::ForceNumbering ); gs.addAttribute( "style:list-style-name", autoListStyleName ); @@ -245,7 +245,7 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ ) if ( !m_parentStyle ) return; if ( !(paragLayoutFlag & KoParagLayout::Alignment) ) - m_paragLayout.alignment = m_parentStyle->paragLayout().alignment; + m_paragLayout.tqalignment = m_parentStyle->paragLayout().tqalignment; if ( !(paragLayoutFlag & KoParagLayout::Margins) ) for ( int i = 0 ; i < 5 ; ++i ) m_paragLayout.margins[i] = m_parentStyle->paragLayout().margins[i]; @@ -269,9 +269,9 @@ void KoParagStyle::propagateChanges( int paragLayoutFlag, int /*formatFlag*/ ) #if 0 if ( paragLayoutFlag == KoParagLayout::All ) { - setDirection( static_cast<TQChar::Direction>(layout.direction) ); + setDirection( static_cast<TQChar::Direction>(tqlayout.direction) ); // Don't call applyStyle from here, it would overwrite any paragraph-specific settings - setStyle( layout.style ); + setStyle( tqlayout.style ); } #endif // TODO a flag for the "is outline" bool? Otherwise we have no way to inherit diff --git a/lib/kotext/KoParagStyle.h b/lib/kotext/KoParagStyle.h index 0e396b64..190ad345 100644 --- a/lib/kotext/KoParagStyle.h +++ b/lib/kotext/KoParagStyle.h @@ -49,7 +49,7 @@ protected: /** * A paragraph style is a combination of a character style - * and paragraph-layout attributes, all grouped under a name. + * and paragraph-tqlayout attributes, all grouped under a name. */ class KOTEXT_EXPORT KoParagStyle : public KoCharStyle { @@ -71,10 +71,10 @@ public: KoParagStyle *followingStyle() const { return m_followingStyle; } void setFollowingStyle( KoParagStyle *fst ); - /// Saves the name, layout, the following style and the outline bool. Not the format. + /// Saves the name, tqlayout, the following style and the outline bool. Not the format. /// @deprecated (1.3 format) void saveStyle( TQDomElement & parentElem ); - /// Loads the name, layout and the outline bool. Not the "following style" nor the format. + /// Loads the name, tqlayout and the outline bool. Not the "following style" nor the format. /// (1.3 format) void loadStyle( TQDomElement & parentElem, int docVersion = 2 ); diff --git a/lib/kotext/KoRichText.cpp b/lib/kotext/KoRichText.cpp index cfce5f31..42e8d2b0 100644 --- a/lib/kotext/KoRichText.cpp +++ b/lib/kotext/KoRichText.cpp @@ -47,7 +47,7 @@ #include <tdeversion.h> #include <kglobal.h> #include <klocale.h> -#include <textengine_p.h> +#include <tqtextengine_p.h> //#define DEBUG_COLLECTION //#define DEBUG_TABLE_RENDERING @@ -310,7 +310,7 @@ KoTextCursor *KoTextAlignmentCommand::execute( KoTextCursor *c ) if ( !p ) return c; while ( p ) { - p->setAlignment( newAlign ); + p->tqsetAlignment( newAlign ); if ( p->paragId() == lastParag ) break; p = p->next(); @@ -326,7 +326,7 @@ KoTextCursor *KoTextAlignmentCommand::unexecute( KoTextCursor *c ) int i = 0; while ( p ) { if ( i < (int)oldAligns.size() ) - p->setAlignment( oldAligns.at( i ) ); + p->tqsetAlignment( oldAligns.at( i ) ); if ( p->paragId() == lastParag ) break; p = p->next(); @@ -375,7 +375,7 @@ bool KoTextCursor::operator==( const KoTextCursor &c ) const void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<KoTextStringChar> *formatting ) { - string->invalidate( idx ); + string->tqinvalidate( idx ); tmpIndex = -1; bool justInsert = TRUE; TQString s( str ); @@ -420,7 +420,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko if ( !s.isEmpty() ) string->insert( idx, s ); else - string->invalidate( 0 ); + string->tqinvalidate( 0 ); if ( formatting ) { int len = s.length(); @@ -448,7 +448,7 @@ void KoTextCursor::insert( const TQString &str, bool checkNewLine, TQMemArray<Ko while ( p ) { p->setParagId( p->prev()->paragId() + 1 ); //p->move( dy ); - p->invalidate( 0 ); + p->tqinvalidate( 0 ); p = p->next(); } } @@ -963,7 +963,7 @@ bool KoTextCursor::remove() KoTextParag *p = string->next(); delete string; string = p; - string->invalidate( 0 ); + string->tqinvalidate( 0 ); //// kotext string->invalidateCounters(); //// @@ -1332,7 +1332,7 @@ TQString KoTextString::toString( const TQMemArray<KoTextStringChar> &data ) int l = data.size(); s.setUnicode( 0, l ); KoTextStringChar *c = data.data(); - TQChar *uc = (TQChar *)s.unicode(); + TQChar *uc = (TQChar *)s.tqunicode(); while ( l-- ) { *uc = c->c; uc++; @@ -1348,7 +1348,7 @@ TQString KoTextString::toReverseString() const int l = length(); s.setUnicode(0, l); KoTextStringChar *c = data.data() + (l-1); - TQChar *uc = (TQChar *)s.unicode(); + TQChar *uc = (TQChar *)s.tqunicode(); while ( l-- ) { *uc = c->c; uc++; @@ -1505,7 +1505,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para str.setUnicode( 0, last - start + 1 ); // fill string with logically ordered chars. KoTextStringChar *ch = startChar; - TQChar *qch = (TQChar *)str.unicode(); + TQChar *qch = (TQChar *)str.tqunicode(); while ( ch <= lastChar ) { *qch = ch->c; qch++; @@ -1520,7 +1520,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct alignment. This is a bit messy.... + // set the correct tqalignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) @@ -1562,7 +1562,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para c->rightToLeft = TRUE; c->startOfRun = FALSE; int ww = 0; - if ( c->c.unicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { + if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->c == '\n' || c->isCustom() ) { ww = c->width; } else { ww = c->format()->width( ' ' ); @@ -1589,7 +1589,7 @@ KoTextParagLineStart *KoTextFormatterBase::bidiReorderLine( KoTextParag * /*para c->rightToLeft = FALSE; c->startOfRun = FALSE; int ww = 0; - if ( c->c.unicode() >= 32 || c->c == '\t' || c->isCustom() ) { + if ( c->c.tqunicode() >= 32 || c->c == '\t' || c->isCustom() ) { ww = c->width; } else { ww = c->format()->width( ' ' ); diff --git a/lib/kotext/KoRichText.h b/lib/kotext/KoRichText.h index 8e82bd9c..44c360d5 100644 --- a/lib/kotext/KoRichText.h +++ b/lib/kotext/KoRichText.h @@ -45,7 +45,7 @@ #include <tqsize.h> #include <tqvaluelist.h> #include <tqobject.h> -#include <stylesheet.h> +#include <tqstylesheet.h> #include <tqpainter.h> #include "KoComplexText.h" @@ -93,7 +93,7 @@ public: // this is the same struct as in qtextengine_p.h. Don't change! uchar softBreak :1; // Potential linebreak point - uchar whiteSpace :1; // A unicode whitespace character, except NBSP, ZWNBSP + uchar whiteSpace :1; // A tqunicode whitespace character, except NBSP, ZWNBSP uchar charStop :1; // Valid cursor position (for left/right arrow) uchar wordStop :1; // Valid cursor position (for ctrl + left/right arrow) (TODO: use) //uchar nobreak :1; @@ -477,13 +477,13 @@ public: KoTextTableCell( KoTextTable* table, int row, int column ); virtual ~KoTextTableCell(); - TQSize sizeHint() const ; - TQSize minimumSize() const ; - TQSize maximumSize() const ; + TQSize tqsizeHint() const ; + TQSize tqminimumSize() const ; + TQSize tqmaximumSize() const ; TQSizePolicy::ExpandData expanding() const; bool isEmpty() const; void setGeometry( const TQRect& ) ; - TQRect geometry() const; + TQRect tqgeometry() const; bool hasHeightForWidth() const; int heightForWidth( int ) const; @@ -502,7 +502,7 @@ public: void draw( int x, int y, int cx, int cy, int cw, int ch, const TQColorGroup& cg, bool selected ); TQBrush *backGround() const { return background; } - virtual void invalidate(); + virtual void tqinvalidate(); int verticalAlignmentOffset() const; int horizontalAlignmentOffset() const; @@ -552,7 +552,7 @@ public: Placement placement() const { return place; } bool isNested() const { return TRUE; } void resize( int nwidth ); - virtual void invalidate(); + virtual void tqinvalidate(); /// ## TQString anchorAt( TQPainter* p, int x, int y ); virtual bool enter( KoTextCursor *c, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); @@ -564,12 +564,12 @@ public: TQString richText() const; - int minimumWidth() const { return layout ? layout->minimumSize().width() : 0; } - int widthHint() const { return ( layout ? layout->sizeHint().width() : 0 ) + 2 * outerborder; } + int minimumWidth() const { return tqlayout ? tqlayout->tqminimumSize().width() : 0; } + int widthHint() const { return ( tqlayout ? tqlayout->tqsizeHint().width() : 0 ) + 2 * outerborder; } TQPtrList<KoTextTableCell> tableCells() const { return cells; } - TQRect geometry() const { return layout ? layout->geometry() : TQRect(); } + TQRect tqgeometry() const { return tqlayout ? tqlayout->tqgeometry() : TQRect(); } bool isStretching() const { return stretch; } private: @@ -577,7 +577,7 @@ private: void addCell( KoTextTableCell* cell ); private: - TQGridLayout* layout; + TQGridLayout* tqlayout; TQPtrList<KoTextTableCell> cells; TQPainter* painter; int cachewidth; @@ -697,7 +697,7 @@ struct KoTextParagLineStart #endif { } #ifndef TQT_NO_COMPLEXTEXT - KoTextParagLineStart( KoBidiContext *c, KoBidiStatus s ) : y(0), baseLine(0), h(0), + KoTextParagLineStart( KoBidiContext *c, KoBiditqStatus s ) : y(0), baseLine(0), h(0), lineSpacing( 0 ), hyphenated( false ), status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } #endif @@ -728,7 +728,7 @@ public: short lineSpacing; bool hyphenated; #ifndef TQT_NO_COMPLEXTEXT - KoBidiStatus status; + KoBiditqStatus status; #endif int w; diff --git a/lib/kotext/KoSearchDia.cpp b/lib/kotext/KoSearchDia.cpp index 955b3f1c..a41de932 100644 --- a/lib/kotext/KoSearchDia.cpp +++ b/lib/kotext/KoSearchDia.cpp @@ -39,7 +39,7 @@ #include <tqradiobutton.h> #include <tqregexp.h> #include <tqspinbox.h> -#include <layout.h> +#include <tqlayout.h> KoSearchContext::KoSearchContext() { @@ -382,8 +382,8 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, { replaceWithAttribut( &cursor, index ); } - // Don't repaint if we're doing batch changes - bool repaint = options() & KReplaceDialog::PromptOnReplace; + // Don't tqrepaint if we're doing batch changes + bool tqrepaint = options() & KReplaceDialog::PromptOnReplace; // Grab replacement string TQString rep = text.mid( matchingIndex, replacementLength ); @@ -395,7 +395,7 @@ void KoFindReplace::replace( const TQString &text, int matchingIndex, KCommand *cmd = currentTextObj->replaceSelectionCommand( &cursor, rep, TQString(), KoTextDocument::HighlightSelection, - repaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); + tqrepaint ? KoTextObject::DefaultInsertFlags : KoTextObject::DoNotRepaint ); connect( &m_textIterator, TQT_SIGNAL( currentParagraphModified( int, int, int ) ), this, TQT_SLOT( slotCurrentParagraphModified( int, int, int ) ) ); @@ -587,7 +587,7 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC m_languageItem->setCurrentText( KoGlobal::languageFromTag( m_ctx->m_language ) ); - m_checkVertAlign = new TQCheckBox( i18n( "Vertical alignment:" ), page ); + m_checkVertAlign = new TQCheckBox( i18n( "Vertical tqalignment:" ), page ); m_familyItem = new KFontCombo(page); m_familyItem->setCurrentFont(m_ctx->m_family); @@ -605,25 +605,25 @@ KoFormatDia::KoFormatDia( TQWidget* parent, const TQString & _caption, KoSearchC TQButtonGroup *grpBold = new TQButtonGroup( 1, Qt::Vertical, page ); grpBold->setRadioButtonExclusive( TRUE ); - grpBold->layout(); + grpBold->tqlayout(); m_boldYes=new TQRadioButton( i18n("Yes"), grpBold ); m_boldNo=new TQRadioButton( i18n("No"), grpBold ); TQButtonGroup *grpItalic = new TQButtonGroup( 1, Qt::Vertical, page ); grpItalic->setRadioButtonExclusive( TRUE ); - grpItalic->layout(); + grpItalic->tqlayout(); m_italicYes=new TQRadioButton( i18n("Yes"), grpItalic ); m_italicNo=new TQRadioButton( i18n("No"), grpItalic ); TQButtonGroup *grpShadow = new TQButtonGroup( 1, Qt::Vertical, page ); grpShadow->setRadioButtonExclusive( TRUE ); - grpShadow->layout(); + grpShadow->tqlayout(); m_shadowYes=new TQRadioButton( i18n("Yes"), grpShadow ); m_shadowNo=new TQRadioButton( i18n("No"), grpShadow ); TQButtonGroup *grpWordByWord = new TQButtonGroup( 1, Qt::Vertical, page ); grpWordByWord->setRadioButtonExclusive( TRUE ); - grpWordByWord->layout(); + grpWordByWord->tqlayout(); m_wordByWordYes=new TQRadioButton( i18n("Yes"), grpWordByWord ); m_wordByWordNo=new TQRadioButton( i18n("No"), grpWordByWord ); diff --git a/lib/kotext/KoStyleCollection.cpp b/lib/kotext/KoStyleCollection.cpp index fa0818d8..f8c93f01 100644 --- a/lib/kotext/KoStyleCollection.cpp +++ b/lib/kotext/KoStyleCollection.cpp @@ -242,7 +242,7 @@ void KoStyleCollection::printDebug() const kdDebug() << "Style " << style << " " << style->name() << " isOutline=" << style->isOutline() << endl; kdDebug() << " format: " << style->format().key() <<endl; static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; - kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().alignment] << endl; + kdDebug() << " align: " << s_align[(TQt::AlignmentFlags)style->paragLayout().tqalignment] << endl; if ( style->paragLayout().counter ) kdDebug() << " counter level=" << style->paragLayout().counter->depth() << endl; diff --git a/lib/kotext/KoStyleCollection.h b/lib/kotext/KoStyleCollection.h index 811bbaea..66a244e5 100644 --- a/lib/kotext/KoStyleCollection.h +++ b/lib/kotext/KoStyleCollection.h @@ -68,7 +68,7 @@ public: * Overloaded for convenience. */ KoParagStyle* findStyle( const TQString & name ) const { - return static_cast<KoParagStyle*>( KoUserStyleCollection::findStyle( name, TQString::fromLatin1( "Standard" ) ) ); + return static_cast<KoParagStyle*>( KoUserStyleCollection::findStyle( name, TQString::tqfromLatin1( "Standard" ) ) ); } /** diff --git a/lib/kotext/KoStyleManager.cpp b/lib/kotext/KoStyleManager.cpp index 871b8f98..e5a7dbfa 100644 --- a/lib/kotext/KoStyleManager.cpp +++ b/lib/kotext/KoStyleManager.cpp @@ -33,7 +33,7 @@ #include <tqlabel.h> #include <tqcombobox.h> #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> /******************************************************************/ /* Class: KoStyleManager */ @@ -86,7 +86,7 @@ KoStyleManager::KoStyleManager( TQWidget *_parent, KoUnit::Unit unit, newTab = new KoStyleParagTab( m_tabs ); KoParagLayoutWidget *decorations = new KoParagDecorationWidget( newTab ); - decorations->layout()->setMargin(KDialog::marginHint()); + decorations->tqlayout()->setMargin(KDialog::marginHint()); newTab->setWidget( decorations ); addTab( newTab ); @@ -122,7 +122,7 @@ void KoStyleManager::addTab( KoStyleManagerTab * tab ) { m_tabsList.append( tab ); m_tabs->insertTab( tab, tab->tabName() ); - tab->layout()->activate(); + tab->tqlayout()->activate(); } void KoStyleManager::setupWidget(const KoStyleCollection& styleCollection) @@ -185,15 +185,15 @@ void KoStyleManager::addGeneralTab( int flags ) { tabLayout->setMargin( KDialog::marginHint() ); m_nameString = new TQLineEdit( tab ); - m_nameString->resize(m_nameString->sizeHint() ); + m_nameString->resize(m_nameString->tqsizeHint() ); connect( m_nameString, TQT_SIGNAL( textChanged( const TQString &) ), this, TQT_SLOT( renameStyle(const TQString &) ) ); tabLayout->addWidget( m_nameString, 0, 1 ); TQLabel *nameLabel = new TQLabel( tab ); nameLabel->setText( i18n( "Name:" ) ); - nameLabel->resize(nameLabel->sizeHint()); - nameLabel->setAlignment( AlignRight | AlignVCenter ); + nameLabel->resize(nameLabel->tqsizeHint()); + nameLabel->tqsetAlignment( AlignRight | AlignVCenter ); tabLayout->addWidget( nameLabel, 0, 0 ); @@ -203,7 +203,7 @@ void KoStyleManager::addGeneralTab( int flags ) { TQLabel *nextStyleLabel = new TQLabel( tab ); nextStyleLabel->setText( i18n( "Next style:" ) ); - nextStyleLabel->setAlignment( AlignRight | AlignVCenter ); + nextStyleLabel->tqsetAlignment( AlignRight | AlignVCenter ); tabLayout->addWidget( nextStyleLabel, 1, 0 ); @@ -212,7 +212,7 @@ void KoStyleManager::addGeneralTab( int flags ) { TQLabel *inheritStyleLabel = new TQLabel( tab ); inheritStyleLabel->setText( i18n( "Inherit style:" ) ); - inheritStyleLabel->setAlignment( AlignRight | AlignVCenter ); + inheritStyleLabel->tqsetAlignment( AlignRight | AlignVCenter ); tabLayout->addWidget( inheritStyleLabel, 2, 0 ); @@ -345,7 +345,7 @@ void KoStyleManager::updateGUI() { void KoStyleManager::updatePreview() { d->preview->setStyle(m_currentStyle); - d->preview->repaint(true); + d->preview->tqrepaint(true); } void KoStyleManager::save() { @@ -408,7 +408,7 @@ TQString KoStyleManager::generateUniqueName() void KoStyleManager::addStyle() { save(); - TQString str = i18n( "New Style Template (%1)" ).arg(numStyles++); + TQString str = i18n( "New Style Template (%1)" ).tqarg(numStyles++); if ( m_currentStyle ) { m_currentStyle = new KoParagStyle( *m_currentStyle ); // Create a new style, initializing from the current one diff --git a/lib/kotext/KoStyleManager.h b/lib/kotext/KoStyleManager.h index b562e1f6..af848e1d 100644 --- a/lib/kotext/KoStyleManager.h +++ b/lib/kotext/KoStyleManager.h @@ -137,7 +137,7 @@ protected: KoParagStyle *m_style; }; -// A tab to edit parts of the parag-layout of the style +// A tab to edit parts of the parag-tqlayout of the style // Acts as a wrapper around KoParagLayoutWidget [which doesn't know about styles]. class KOTEXT_EXPORT KoStyleParagTab : public KoStyleManagerTab { @@ -181,7 +181,7 @@ private: Font simple font dia Color simple color dia Spacing and Indents paragraph spacing dia (KWParagDia) -alignments KoParagDia alignment tab +alignments KoParagDia tqalignment tab borders KoParagDia borders tab numbering KoParagDia tab numbering tabulators KoParagDia tab tabs */ diff --git a/lib/kotext/KoTextCommand.cpp b/lib/kotext/KoTextCommand.cpp index 875c1e71..fb496836 100644 --- a/lib/kotext/KoTextCommand.cpp +++ b/lib/kotext/KoTextCommand.cpp @@ -96,7 +96,7 @@ KoTextCursor * KoTextDeleteCommand::unexecute( KoTextCursor *c ) while ( p ) { if ( lit != m_oldParagLayouts.end() ) { - kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paraglayout to parag " << p->paragId() << endl; + kdDebug(32500) << "KoTextDeleteCommand::unexecute applying paragtqlayout to parag " << p->paragId() << endl; p->setParagLayout( *lit ); } else @@ -211,7 +211,7 @@ KoTextCursor * KoParagFormatCommand::execute( KoTextCursor *c ) } while ( p ) { p->setFormat( m_newFormat ); - p->invalidate(0); + p->tqinvalidate(0); if ( p->paragId() == lastParag ) break; p = p->next(); diff --git a/lib/kotext/KoTextCustomItem.h b/lib/kotext/KoTextCustomItem.h index 7df4d515..d232bedc 100644 --- a/lib/kotext/KoTextCustomItem.h +++ b/lib/kotext/KoTextCustomItem.h @@ -57,7 +57,7 @@ public: virtual bool ownLine() const { return FALSE; } // Called for "ownline" items virtual void resize( int nwidth ) { width = nwidth; } - virtual void invalidate() {}; + virtual void tqinvalidate() {}; virtual bool isNested() const { return FALSE; } virtual int minimumWidth() const { return 0; } @@ -69,7 +69,7 @@ public: int width; int height; - TQRect geometry() const { return TQRect( xpos, ypos, width, height ); } + TQRect tqgeometry() const { return TQRect( xpos, ypos, width, height ); } virtual bool enter( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); virtual bool enterAt( KoTextCursor *, KoTextDocument *&doc, KoTextParag *¶g, int &idx, int &ox, int &oy, const TQPoint & ); diff --git a/lib/kotext/KoTextDocument.cpp b/lib/kotext/KoTextDocument.cpp index 35adf814..b3f24708 100644 --- a/lib/kotext/KoTextDocument.cpp +++ b/lib/kotext/KoTextDocument.cpp @@ -154,13 +154,13 @@ int KoTextDocument::widthUsed() const KoTextParag *p = fParag; int w = 0; while ( p ) { - int a = p->alignment(); - p->setAlignment( TQt::AlignLeft ); - p->invalidate( 0 ); + int a = p->tqalignment(); + p->tqsetAlignment( TQt::AlignLeft ); + p->tqinvalidate( 0 ); p->format(); w = TQMAX( w, p->rect().width() ); - p->setAlignment( a ); - p->invalidate( 0 ); + p->tqsetAlignment( a ); + p->tqinvalidate( 0 ); p = p->next(); } return w; @@ -247,11 +247,11 @@ TQString KoTextDocument::plainText() const return buffer; } -void KoTextDocument::invalidate() +void KoTextDocument::tqinvalidate() { KoTextParag *s = fParag; while ( s ) { - s->invalidate( 0 ); + s->tqinvalidate( 0 ); s = s->next(); } } @@ -729,7 +729,7 @@ void KoTextDocument::setFormat( int id, const KoTextFormat *f, int flags ) if ( !hasSelection( id ) ) return; - TQApplication::clipboard()->setText( selectedText( id ) ); + TQApplication::tqclipboard()->setText( selectedText( id ) ); #endif }*/ @@ -785,9 +785,9 @@ void KoTextDocument::removeSelectedText( int id, KoTextCursor *cursor ) p->move( dy ); //// kotext if ( p->paragLayout().counter ) - p->paragLayout().counter->invalidate(); + p->paragLayout().counter->tqinvalidate(); //// - p->invalidate( 0 ); + p->tqinvalidate( 0 ); //p->setEndState( -1 ); p = p->next(); } @@ -1217,7 +1217,7 @@ void KoTextDocument::drawWithoutDoubleBuffer( TQPainter *p, const TQRect &cr, co TQRect pr( parag->pixelRect( zoomHandler ) ); pr.setLeft( 0 ); pr.setWidth( TQWIDGETSIZE_MAX ); - // The cliprect is checked in layout units, in KoTextParag::paint + // The cliprect is checked in tqlayout units, in KoTextParag::paint TQRect crect_lu( parag->rect() ); if ( !cr.isNull() && !cr.intersects( pr ) ) { @@ -1295,7 +1295,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, // The test on mat is almost like isIdentity(), but allows for translation. //// ##### The way to fix this: initialize the pixmap to be fully transparent instead // of being white. - TQWMatrix mat = p->worldMatrix(); + TQWMatrix mat = p->tqworldMatrix(); if ( ( mat.m11() != 1.0 || mat.m22() != 1.0 || mat.m12() != 0.0 || mat.m21() != 0.0 ) && brush.style() != TQt::SolidPattern ) useDoubleBuffer = FALSE; @@ -1350,7 +1350,7 @@ void KoTextDocument::drawParagWYSIWYG( TQPainter *p, KoTextParag *parag, int cx, #endif //painter->setBrushOrigin( painter->brushOrigin() + rect.topLeft() - ir.topLeft() ); - // The cliprect is checked in layout units, in KoTextParag::paint + // The cliprect is checked in tqlayout units, in KoTextParag::paint TQRect crect_lu( zoomHandler->pixelToLayoutUnit( crect ) ); #ifdef DEBUG_PAINTING kdDebug(32500) << "KoTextDocument::drawParagWYSIWYG crect_lu=" << crect_lu << endl; diff --git a/lib/kotext/KoTextDocument.h b/lib/kotext/KoTextDocument.h index 8cf9fd4d..8cdc1b52 100644 --- a/lib/kotext/KoTextDocument.h +++ b/lib/kotext/KoTextDocument.h @@ -94,7 +94,7 @@ public: void setFirstParag( KoTextParag *p ); void setLastParag( KoTextParag *p ); - void invalidate(); + void tqinvalidate(); //void setPreProcessor( KoTextPreProcessor *sh ); //KoTextPreProcessor *preProcessor() const; @@ -189,8 +189,8 @@ public: //bool focusNextPrevChild( bool next ); - int alignment() const; - void setAlignment( int a ); + int tqalignment() const; + void tqsetAlignment( int a ); int *tabArray() const; int tabStopWidth() const; @@ -535,12 +535,12 @@ inline KoTextFormatCollection *KoTextDocument::formatCollection() const return fCollection; } -inline int KoTextDocument::alignment() const +inline int KoTextDocument::tqalignment() const { return align; } -inline void KoTextDocument::setAlignment( int a ) +inline void KoTextDocument::tqsetAlignment( int a ) { align = a; } diff --git a/lib/kotext/KoTextFormat.cpp b/lib/kotext/KoTextFormat.cpp index 2554d4ee..24214ae4 100644 --- a/lib/kotext/KoTextFormat.cpp +++ b/lib/kotext/KoTextFormat.cpp @@ -675,7 +675,7 @@ void KoTextFormat::save( KoGenStyle& gs, KoSavingContext& context, KoTextFormat void KoTextFormat::update() { //kdDebug(32500) << this << " KoTextFormat::update " << fn.family() << " " << pointSize() << endl; - m_key = TQString(); // invalidate key, recalc at the next key() call + m_key = TQString(); // tqinvalidate key, recalc at the next key() call assert( d ); d->clearCache(); // i.e. recalc at the next screenFont[Metrics]() call } @@ -1179,8 +1179,8 @@ TQFont KoTextFormat::smallCapsFont( const KoTextZoomHandler* zh, bool applyZoom int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const KoTextStringChar* c, const KoTextParag* parag, int i ) const { - ushort unicode = c->c.unicode(); - if ( !c->charStop || unicode == 0xad || unicode == 0x2028 ) + ushort tqunicode = c->c.tqunicode(); + if ( !c->charStop || tqunicode == 0xad || tqunicode == 0x2028 ) return 0; Q_ASSERT( !c->isCustom() ); // actually it's a bit stupid to call this for custom items if( c->isCustom() ) { @@ -1209,13 +1209,13 @@ int KoTextFormat::charWidth( const KoTextZoomHandler* zh, bool applyZoom, const pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); } else { // Use the m_screenWidths[] array when possible, even faster - Q_ASSERT( unicode < 256 ); - pixelww = d->m_screenWidths[ unicode ]; + Q_ASSERT( tqunicode < 256 ); + pixelww = d->m_screenWidths[ tqunicode ]; // Not in cache yet -> calculate if ( pixelww == 0 ) { pixelww = this->screenFontMetrics( zh ).width( displayedChar( c->c ) ); Q_ASSERT( pixelww < 65535 ); - d->m_screenWidths[ unicode ] = pixelww; + d->m_screenWidths[ tqunicode ] = pixelww; } } } @@ -1319,7 +1319,7 @@ TQString KoTextFormat::displayedString( const TQString& str )const TQChar KoTextFormat::displayedChar( TQChar c )const { - if ( c.unicode() == 0xa0 ) // nbsp + if ( c.tqunicode() == 0xa0 ) // nbsp return ' '; switch ( m_attributeFont ) { case ATT_NONE: diff --git a/lib/kotext/KoTextFormat.h b/lib/kotext/KoTextFormat.h index 4c155b91..0e7c1a13 100644 --- a/lib/kotext/KoTextFormat.h +++ b/lib/kotext/KoTextFormat.h @@ -75,7 +75,7 @@ public: // caching for speedup when formatting TQFont* m_screenFont; // font to be used when painting (zoom-dependent) TQFontMetrics* m_screenFontMetrics; // font metrics on screen (zoom-dependent) - TQFont* m_refFont; // font to be used when formatting text for layout units + TQFont* m_refFont; // font to be used when formatting text for tqlayout units TQFontMetrics* m_refFontMetrics; // font metrics for m_refFontMetrics int m_refAscent; int m_refDescent; @@ -308,7 +308,7 @@ public: /** * @return the reference font, i.e. with the size specified by the user. - * This is used at text layout time (e.g. kotextformatter) + * This is used at text tqlayout time (e.g. kotextformatter) */ TQFont refFont() const; diff --git a/lib/kotext/KoTextFormatter.cpp b/lib/kotext/KoTextFormatter.cpp index 552bcf27..7bdfbc0c 100644 --- a/lib/kotext/KoTextFormatter.cpp +++ b/lib/kotext/KoTextFormatter.cpp @@ -131,8 +131,8 @@ int KoTextFormatterCore::leftMargin( bool firstLine, bool includeFirstLineMargin left += parag->firstLineMargin(); // Add the width of the paragraph counter - first line of parag only. if( parag->counter() && - ( parag->counter()->alignment() == TQt::AlignLeft || - parag->counter()->alignment() == TQt::AlignAuto ) ) + ( parag->counter()->tqalignment() == TQt::AlignLeft || + parag->counter()->tqalignment() == TQt::AlignAuto ) ) left += parag->counterWidth(); // in LU pixels } return left; @@ -196,7 +196,7 @@ bool KoTextFormatterCore::format() // but with counters/margins this might be different). This is why // we call determineCharWidth() again from within the loop. TQPair<int, int> widths = determineCharWidth(); - int ww = widths.first; // width in layout units + int ww = widths.first; // width in tqlayout units #ifndef REF_IS_LU int pixelww = widths.second; // width in pixels #endif @@ -251,9 +251,9 @@ bool KoTextFormatterCore::format() bool lastWasNonInlineCustom = FALSE; bool abort = false; - int align = parag->alignment(); - if ( align == TQt::AlignAuto && doc && doc->alignment() != TQt::AlignAuto ) - align = doc->alignment(); + int align = parag->tqalignment(); + if ( align == TQt::AlignAuto && doc && doc->tqalignment() != TQt::AlignAuto ) + align = doc->tqalignment(); int col = 0; @@ -516,11 +516,11 @@ bool KoTextFormatterCore::format() spaceAfterLine -= c->width; //else - if ( c->c.unicode() == 0xad || hyphenated ) // soft hyphen or hyphenation + if ( c->c.tqunicode() == 0xad || hyphenated ) // soft hyphen or hyphenation { // Recalculate its width, the hyphen will appear finally (important for the parag rect) int width = KoTextZoomHandler::ptToLayoutUnitPt( c->format()->refFontMetrics().width( TQChar(0xad) ) ); - if ( c->c.unicode() == 0xad ) + if ( c->c.tqunicode() == 0xad ) c->width = width; spaceAfterLine -= width; } @@ -810,7 +810,7 @@ KoTextParagLineStart *KoTextFormatterCore::koFormatLine( if (space < 0) space = 0; - // do alignment Auto == Left in this case + // do tqalignment Auto == Left in this case if ( align & TQt::AlignHCenter || align & TQt::AlignRight ) { if ( align & TQt::AlignHCenter ) space /= 2; @@ -934,7 +934,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( str.setUnicode( 0, last - start + 1 ); // fill string with logically ordered chars. KoTextStringChar *ch = startChar; - TQChar *qch = (TQChar *)str.unicode(); + TQChar *qch = (TQChar *)str.tqunicode(); while ( ch <= lastChar ) { *qch = ch->c; qch++; @@ -949,7 +949,7 @@ KoTextParagLineStart *KoTextFormatterCore::koBidiReorderLine( // now construct the reordered string out of the runs... int numSpaces = 0; - // set the correct alignment. This is a bit messy.... + // set the correct tqalignment. This is a bit messy.... if( align == TQt::AlignAuto ) { // align according to directionality of the paragraph... if ( text->isRightToLeft() ) diff --git a/lib/kotext/KoTextObject.cpp b/lib/kotext/KoTextObject.cpp index afd18909..30bf6dd3 100644 --- a/lib/kotext/KoTextObject.cpp +++ b/lib/kotext/KoTextObject.cpp @@ -564,7 +564,7 @@ void KoTextObject::doKeyboardAction( KoTextCursor * cursor, KoTextFormat * & /*c undoRedoInfo.oldParagLayouts << parag->paragLayout(); } if ( cursor->atParagEnd() ) { - // Get paraglayout from next parag (next can't be 0 here) + // Get paragtqlayout from next parag (next can't be 0 here) KoParagLayout paragLayout = parag->next()->paragLayout(); if ( cursor->remove() ) { @@ -602,10 +602,10 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, return; const bool checkNewLine = insertFlags & CheckNewLine; const bool removeSelected = ( insertFlags & DoNotRemoveSelected ) == 0; - const bool repaint = ( insertFlags & DoNotRepaint ) == 0; + const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; //kdDebug(32500) << "KoTextObject::insert txt=" << txt << endl; bool tinyRepaint = !checkNewLine; - if ( repaint ) + if ( tqrepaint ) emit hideCursor(); if ( textdoc->hasSelection( selectionId, true ) && removeSelected ) { kdDebug() << k_funcinfo << "removing selection " << selectionId << endl; @@ -673,7 +673,7 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, } // Speed optimization: if we only type a char, and it doesn't - // invalidate the next parag, only format the current one + // tqinvalidate the next parag, only format the current one // ### This idea is wrong. E.g. when the last parag grows and must create a new page. #if 0 KoTextParag *parag = cursor->parag(); @@ -687,9 +687,9 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, // Doing this here means callers don't have to do it, and cursor can be positionned correctly. ensureFormatted( cursor->parag() ); - // Speed optimization: if we only type a char, only repaint from current line + // Speed optimization: if we only type a char, only tqrepaint from current line // (In fact the one before. When typing a space, a word could move up to the - // line before, we need to repaint it too...) + // line before, we need to tqrepaint it too...) if ( !checkNewLine && tinyRepaint && !wasChanged ) { // insert() called format() which called setChanged(). @@ -703,12 +703,12 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, parag->setLineChanged( origLine - 1 ); // if origLine=0, it'll pass -1, which is 'all' } - if ( repaint ) { + if ( tqrepaint ) { emit repaintChanged( this ); emit ensureCursorVisible(); emit showCursor(); - // we typed the first char of a paragraph in AlignAuto mode -> show correct alignment in UI - if ( oldCursor.index() == 0 && oldCursor.parag()->alignment() == TQt::AlignAuto ) + // we typed the first char of a paragraph in AlignAuto mode -> show correct tqalignment in UI + if ( oldCursor.index() == 0 && oldCursor.parag()->tqalignment() == TQt::AlignAuto ) emit updateUI( true ); } @@ -722,8 +722,8 @@ void KoTextObject::insert( KoTextCursor * cursor, KoTextFormat * currentFormat, if ( !removeSelected ) { // ## not sure why we do this. I'd prefer leaving the selection unchanged... // but then it'd need adjustements in the offsets etc. - if ( textdoc->removeSelection( selectionId ) && repaint ) - selectionChangedNotify(); // does the repaint + if ( textdoc->removeSelection( selectionId ) && tqrepaint ) + selectionChangedNotify(); // does the tqrepaint } if ( !customItemsMap.isEmpty() && !commandName.isNull() /* see replace-selection; #139890 */ ) { @@ -748,7 +748,7 @@ void KoTextObject::pasteText( KoTextCursor * cursor, const TQString & text, KoTe kdDebug(32500) << "KoTextObject::pasteText cursor parag=" << cursor->parag()->paragId() << endl; TQString t = text; // Need to convert CRLF to NL - TQRegExp crlf( TQString::fromLatin1("\r\n") ); + TQRegExp crlf( TQString::tqfromLatin1("\r\n") ); t.replace( crlf, TQChar('\n') ); // Convert non-printable chars for ( int i=0; (uint) i<t.length(); i++ ) { @@ -1066,7 +1066,7 @@ KCommand * KoTextObject::setFormatCommand( KoTextCursor * cursor, KoTextFormat * if ( cursor->parag()->length() == 1 ) { newFormat->addRef(); cursor->parag()->setFormat( newFormat ); - cursor->parag()->invalidate(0); + cursor->parag()->tqinvalidate(0); cursor->parag()->format(); emit repaintChanged( this ); } @@ -1146,7 +1146,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe if ( protectContent() ) return 0L; if ( !textdoc->hasSelection( selectionId, true ) && cursor && - (int)cursor->parag()->alignment() == align ) + (int)cursor->parag()->tqalignment() == align ) return 0L; // No change needed. emit hideCursor(); @@ -1165,7 +1165,7 @@ KCommand * KoTextObject::setAlignCommand( KoTextCursor * cursor, int align, KoTe } formatMore( 2 ); emit repaintChanged( this ); - undoRedoInfo.newParagLayout.alignment = align; + undoRedoInfo.newParagLayout.tqalignment = align; KoTextParagCommand *cmd = new KoTextParagCommand( textdoc, undoRedoInfo.id, undoRedoInfo.eid, undoRedoInfo.oldParagLayouts, undoRedoInfo.newParagLayout, @@ -1547,7 +1547,7 @@ void KoTextObject::removeSelectedText( KoTextCursor * cursor, KoTextDocument::Se undoRedoInfo.clear(); } -KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint ) +KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint ) { if ( protectContent() ) return 0L; @@ -1578,7 +1578,7 @@ KCommand * KoTextObject::removeSelectedTextCommand( KoTextCursor * cursor, KoTex undoRedoInfo.type = UndoRedoInfo::Invalid; // we don't want clear() to create a command undoRedoInfo.clear(); - if ( repaint ) + if ( tqrepaint ) selectionChangedNotify(); return macroCmd; } @@ -1592,8 +1592,8 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ if ( protectContent() ) return 0L; Q_ASSERT( ( insertFlags & DoNotRemoveSelected ) == 0 ); // nonsensical - const bool repaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace - if ( repaint ) + const bool tqrepaint = ( insertFlags & DoNotRepaint ) == 0; // DoNotRepaint is set during search/replace + if ( tqrepaint ) emit hideCursor(); // This could be improved to use a macro command only when there's a selection to remove. KMacroCommand * macroCmd = new KMacroCommand( cmdName ); @@ -1604,7 +1604,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->addRef(); // Remove selected text, if any - KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, repaint ); + KCommand* removeSelCmd = removeSelectedTextCommand( cursor, selectionId, tqrepaint ); if ( removeSelCmd ) macroCmd->addCommand( removeSelCmd ); @@ -1625,7 +1625,7 @@ KCommand* KoTextObject::replaceSelectionCommand( KoTextCursor * cursor, const TQ format->removeRef(); setLastFormattedParag( c1.parag() ); - if ( repaint ) + if ( tqrepaint ) { formatMore( 2 ); emit repaintChanged( this ); @@ -1645,7 +1645,7 @@ KCommand * KoTextObject::insertParagraphCommand( KoTextCursor *cursor ) return replaceSelectionCommand( cursor, "\n", TQString(), KoTextDocument::Standard, CheckNewLine ); } -void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool repaint ) +void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ) { if ( !m_highlightSelectionAdded ) { @@ -1656,20 +1656,20 @@ void KoTextObject::highlightPortion( KoTextParag * parag, int index, int length, m_highlightSelectionAdded = true; } - removeHighlight(repaint); // remove previous highlighted selection + removeHighlight(tqrepaint); // remove previous highlighted selection KoTextCursor cursor( textdoc ); cursor.setParag( parag ); cursor.setIndex( index ); textdoc->setSelectionStart( KoTextDocument::HighlightSelection, &cursor ); cursor.setIndex( index + length ); textdoc->setSelectionEnd( KoTextDocument::HighlightSelection, &cursor ); - if ( repaint ) { + if ( tqrepaint ) { parag->setChanged( true ); emit repaintChanged( this ); } } -void KoTextObject::removeHighlight(bool repaint) +void KoTextObject::removeHighlight(bool tqrepaint) { if ( textdoc->hasSelection( KoTextDocument::HighlightSelection, true ) ) { @@ -1677,7 +1677,7 @@ void KoTextObject::removeHighlight(bool repaint) oldParag->setChanged( true ); textdoc->removeSelection( KoTextDocument::HighlightSelection ); } - if ( repaint ) + if ( tqrepaint ) emit repaintChanged( this ); } @@ -1831,7 +1831,7 @@ bool KoTextObject::formatMore( int count /* = 10 */, bool emitAfterFormatting /* } #ifdef DEBUG_FORMAT_MORE TQString id; - if ( m_lastFormatted ) id = TQString(" (%1)").arg(m_lastFormatted->paragId()); + if ( m_lastFormatted ) id = TQString(" (%1)").tqarg(m_lastFormatted->paragId()); kdDebug(32500) << "formatMore finished formatting. " << " bottom=" << bottom << " m_lastFormatted=" << m_lastFormatted << id @@ -2041,13 +2041,13 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty case KoChangeCaseDia::TitleCase: for(uint i=0;i<text.length();i++) { - if(text.at(i)!=' ') + if(text.tqat(i)!=' ') { - TQChar prev = text.at(TQMAX(i-1,0)); + TQChar prev = text.tqat(TQMAX(i-1,0)); if(i==0 || prev == ' ' || prev == '\n' || prev == '\t') - text=text.replace(i, 1, text.at(i).upper() ); + text=text.replace(i, 1, text.tqat(i).upper() ); else - text=text.replace(i, 1, text.at(i).lower() ); + text=text.replace(i, 1, text.tqat(i).lower() ); } } break; @@ -2055,9 +2055,9 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty for(uint i=0;i<text.length();i++) { TQString repl=TQString(text.at(i)); - if(text.at(i)!=text.at(i).upper()) + if(text.tqat(i)!=text.tqat(i).upper()) repl=repl.upper(); - else if(text.at(i).lower()!=text.at(i)) + else if(text.tqat(i).lower()!=text.tqat(i)) repl=repl.lower(); text=text.replace(i, 1, repl ); } @@ -2069,7 +2069,7 @@ TQString KoTextObject::textChangedCase(const TQString& _text,KoChangeCaseDia::Ty { TQChar prev = text.at(TQMAX(i-1,0)); if(i==0 || prev == '\n' ||prev.isPunct()) - text=text.replace(i, 1, text.at(i).upper() ); + text=text.replace(i, 1, text.tqat(i).upper() ); } } break; @@ -2167,7 +2167,7 @@ KoTextCursor KoTextObject::pasteOasisText( const TQDomElement &bodyElem, KoOasis context.styleStack().restore(); lastParagraph->setChanged( true ); - lastParagraph->invalidate( 0 ); + lastParagraph->tqinvalidate( 0 ); // Now split this parag, to make room for the next paragraphs resultCursor.setParag( lastParagraph ); @@ -2692,7 +2692,7 @@ KCommand *KoTextFormatInterface::setDefaultFormatCommand() KCommand *KoTextFormatInterface::setAlignCommand(int align) { KoParagLayout format( *currentParagLayoutFormat() ); - format.alignment=align; + format.tqalignment=align; return setParagLayoutFormatCommand(&format,KoParagLayout::Alignment); } diff --git a/lib/kotext/KoTextObject.h b/lib/kotext/KoTextObject.h index 7970a323..15574075 100644 --- a/lib/kotext/KoTextObject.h +++ b/lib/kotext/KoTextObject.h @@ -64,11 +64,11 @@ public: */ virtual KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ) = 0; - /** Interface for accessing the current parag layout */ + /** Interface for accessing the current parag tqlayout */ virtual const KoParagLayout * currentParagLayoutFormat() const = 0; - /** Interface for changing the paragraph layout. - * @param newLayout pointer to the new layout to apply + /** Interface for changing the paragraph tqlayout. + * @param newLayout pointer to the new tqlayout to apply * @param flags one of the KoParagLayout flags * @param marginIndex type of margin. Only used if flags==KoParagLayout::Margins */ @@ -251,7 +251,7 @@ public: CheckNewLine = 1, /// < if true, the text to be inserted is checked for '\\n' (as a paragraph delimiter) OverwriteMode = 2, DoNotRemoveSelected = 4, ///< whether to remove selected text before - DoNotRepaint = 8 ///< usually we repaint in insert(), this allows to turn it off + DoNotRepaint = 8 ///< usually we tqrepaint in insert(), this allows to turn it off }; /** @@ -286,7 +286,7 @@ public: KoTextDocument::SelectionId selectionId = KoTextDocument::Standard, int insertFlags = DefaultInsertFlags, // KDE4: TODO use TQFlags CustomItemsMap customItemsMap = CustomItemsMap() ); - KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool repaint = true ); + KCommand * removeSelectedTextCommand( KoTextCursor * cursor, KoTextDocument::SelectionId selectionId, bool tqrepaint = true ); KCommand* insertParagraphCommand( KoTextCursor * cursor ); /** @@ -308,8 +308,8 @@ public: /** Highlighting support (for search/replace, spellchecking etc.). * Don't forget to ensure the paragraph is visible. */ - void highlightPortion( KoTextParag * parag, int index, int length, bool repaint ); - void removeHighlight( bool repaint ); + void highlightPortion( KoTextParag * parag, int index, int length, bool tqrepaint ); + void removeHighlight( bool tqrepaint ); /** Implementation of setFormatCommand from KoTextFormatInterface - apply change to the whole document */ KCommand *setFormatCommand( const KoTextFormat *format, int flags, bool zoomFont = false ); @@ -345,7 +345,7 @@ public: * @param cursor the current cursor; used if there is no selection. Can be 0L if there is one. * @param style the KoParagStyle to apply * @param selectionId the id of the selection, usually Standard or Temp - * @param paragLayoutFlags which settings from the paragraph layout to apply + * @param paragLayoutFlags which settings from the paragraph tqlayout to apply * @param formatFlags which settings from the text format to apply * @param createUndoRedo if true, an undo/redo command will be created and emitted * @param interactive if true, the text will be reformatted/repainted to show the new style @@ -429,7 +429,7 @@ public: /** * Abort the current formatMore() loop, or prevent the next one from starting. * Use with care. This is e.g. for KWFootNoteVariable, so that it can do - * a frame layout before formatting the main text again. + * a frame tqlayout before formatting the main text again. * It is important to make sure that formatMore will be called again ;) */ void abortFormatting(); diff --git a/lib/kotext/KoTextParag.cpp b/lib/kotext/KoTextParag.cpp index cc1aecb9..23754c28 100644 --- a/lib/kotext/KoTextParag.cpp +++ b/lib/kotext/KoTextParag.cpp @@ -154,7 +154,7 @@ void KoTextParag::setPrev( KoTextParag *s ) doc->setFirstParag( this ); } -void KoTextParag::invalidate( int /*chr, ignored*/ ) +void KoTextParag::tqinvalidate( int /*chr, ignored*/ ) { m_invalid = true; #if 0 @@ -186,7 +186,7 @@ void KoTextParag::setLineChanged( short int line ) void KoTextParag::insert( int index, const TQString &s ) { str->insert( index, s, formatCollection()->defaultFormat() ); - invalidate( index ); + tqinvalidate( index ); //needPreProcess = TRUE; } @@ -209,7 +209,7 @@ void KoTextParag::remove( int index, int len ) } } str->remove( index, len ); - invalidate( 0 ); + tqinvalidate( 0 ); //needPreProcess = TRUE; } @@ -252,7 +252,7 @@ void KoTextParag::join( KoTextParag *s ) extraData()->join( s->extraData() ); }*/ delete s; - invalidate( 0 ); + tqinvalidate( 0 ); //// kotext invalidateCounters(); //// @@ -403,14 +403,14 @@ void KoTextParag::format( int start, bool doMove ) bool makeInvalid = false; //p && p->lastInFrame; //kdDebug(32500) << "might move of dy=" << dy << ". previous's lastInFrame (=makeInvalid): " << makeInvalid << endl; while ( s && dy ) { - if ( s->movedDown ) { // (not in TQRT) : moved down -> invalidate and stop moving down - s->invalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) + if ( s->movedDown ) { // (not in TQRT) : moved down -> tqinvalidate and stop moving down + s->tqinvalidate( 0 ); // (there is no point in moving down a parag that has a frame break...) break; } if ( !s->isFullWidth() ) makeInvalid = TRUE; if ( makeInvalid ) - s->invalidate( 0 ); + s->tqinvalidate( 0 ); s->move( dy ); //if ( s->lastInFrame ) // makeInvalid = TRUE; @@ -600,7 +600,7 @@ void KoTextParag::setFormat( int index, int len, const KoTextFormat *_f, bool us _f->shadowDistanceX() != of->shadowDistanceX() || _f->shadowDistanceY() != of->shadowDistanceY() ) ) { - invalidate( 0 ); + tqinvalidate( 0 ); } if ( flags == -1 || flags == KoTextFormat::Format || !fc ) { #ifdef DEBUG_COLLECTION @@ -690,7 +690,7 @@ void KoTextParag::setDirection( TQChar::Direction d ) { if ( str && str->direction() != d ) { str->setDirection( d ); - invalidate( 0 ); + tqinvalidate( 0 ); //// kotext m_layout.direction = d; invalidateCounters(); // #47178 @@ -837,7 +837,7 @@ void KoTextParag::lineInfo( int l, int &y, int &h, int &bl ) const bl = ( *it )->baseLine; } -uint KoTextParag::alignment() const +uint KoTextParag::tqalignment() const { return align; } @@ -946,66 +946,66 @@ void KoTextParag::setMargin( TQStyleSheetItem::Margin m, double _i ) //kdDebug(32500) << "KoTextParag::setMargin " << m << " margin " << _i << endl; m_layout.margins[m] = _i; if ( m == TQStyleSheetItem::MarginTop && prev() ) - prev()->invalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) - invalidate(0); + prev()->tqinvalidate(0); // for top margin (post-1.1: remove this, not necessary anymore) + tqinvalidate(0); } void KoTextParag::setMargins( const double * margins ) { for ( int i = 0 ; i < 5 ; ++i ) m_layout.margins[i] = margins[i]; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setAlign( int align ) { Q_ASSERT( align <= TQt::AlignJustify ); align &= TQt::AlignHorizontal_Mask; - setAlignment( align ); - m_layout.alignment = align; + tqsetAlignment( align ); + m_layout.tqalignment = align; } int KoTextParag::resolveAlignment() const { - if ( (int)m_layout.alignment == TQt::AlignAuto ) + if ( (int)m_layout.tqalignment == TQt::AlignAuto ) return str->isRightToLeft() ? TQt::AlignRight : TQt::AlignLeft; - return m_layout.alignment; + return m_layout.tqalignment; } void KoTextParag::setLineSpacing( double _i ) { m_layout.setLineSpacingValue(_i); - invalidate(0); + tqinvalidate(0); } void KoTextParag::setLineSpacingType( KoParagLayout::SpacingType _type ) { m_layout.lineSpacingType = _type; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setTopBorder( const KoBorder & _brd ) { m_layout.topBorder = _brd; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setBottomBorder( const KoBorder & _brd ) { m_layout.bottomBorder = _brd; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setJoinBorder( bool join ) { m_layout.joinBorder = join; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setBackgroundColor ( const TQColor& color ) { m_layout.backgroundColor = color; - invalidate(0); + tqinvalidate(0); } void KoTextParag::setNoCounter() @@ -1060,17 +1060,17 @@ void KoTextParag::invalidateCounters() { // Invalidate this paragraph and all the following ones // (Numbering may have changed) - invalidate( 0 ); + tqinvalidate( 0 ); if ( m_layout.counter ) - m_layout.counter->invalidate(); + m_layout.counter->tqinvalidate(); KoTextParag *s = next(); // #### Possible optimization: since any invalidation propagates down, // it's enough to stop at the first paragraph with an already-invalidated counter, isn't it? - // This is only true if nobody else calls counter->invalidate... + // This is only true if nobody else calls counter->tqinvalidate... while ( s ) { if ( s->m_layout.counter ) - s->m_layout.counter->invalidate(); - s->invalidate( 0 ); + s->m_layout.counter->tqinvalidate(); + s->tqinvalidate( 0 ); s = s->next(); } } @@ -1290,13 +1290,13 @@ int KoTextParag::rightMargin() const KoTextZoomHandler * zh = textDocument()->formattingZoomHandler(); int cw=0; if( m_layout.counter && str->isRightToLeft() && - (( m_layout.counter->alignment() == TQt::AlignRight ) || ( m_layout.counter->alignment() == TQt::AlignAuto ))) + (( m_layout.counter->tqalignment() == TQt::AlignRight ) || ( m_layout.counter->tqalignment() == TQt::AlignAuto ))) cw = counterWidth(); return zh->ptToLayoutUnitPixX( m_layout.margins[ TQStyleSheetItem::MarginRight ] + m_layout.rightBorder.width() ) - + cw; /* in layout units already */ + + cw; /* in tqlayout units already */ } int KoTextParag::firstLineMargin() const @@ -1597,13 +1597,13 @@ void KoTextParag::paintLines( TQPainter &painter, const TQColorGroup &cg, KoText // we flush before and after tabs flush = flush || ( chr->c == '\t' || nextchr->c == '\t' ); // we flush on soft hypens - flush = flush || ( chr->c.unicode() == 0xad ); + flush = flush || ( chr->c.tqunicode() == 0xad ); // we flush on custom items flush = flush || chr->isCustom(); // we flush before custom items flush = flush || nextchr->isCustom(); // when painting justified we flush on spaces - if ((alignment() & TQt::AlignJustify) == TQt::AlignJustify ) + if ((tqalignment() & TQt::AlignJustify) == TQt::AlignJustify ) //flush = flush || TQTextFormatter::isBreakable( str, i ); flush = flush || chr->whiteSpace; // when underlining or striking "word by word" we flush before/after spaces @@ -1847,7 +1847,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s // 3) Paint TQString str( s ); - if ( str[ (int)str.length() - 1 ].unicode() == 0xad ) + if ( str[ (int)str.length() - 1 ].tqunicode() == 0xad ) str.remove( str.length() - 1, 1 ); painter.setPen( TQPen( textColor ) ); painter.setFont( font ); @@ -1877,7 +1877,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s } KoTextParag::drawFontEffects( &painter, format, zh, font, textColor, startX, baseLine, bw, lastY, h, str[start] ); - if ( str[ start ] != '\t' && str[ start ].unicode() != 0xad ) { + if ( str[ start ] != '\t' && str[ start ].tqunicode() != 0xad ) { str = format->displayedString( str ); // #### This converts the whole string, instead of from start to start+len! if ( format->vAlign() == KoTextFormat::AlignNormal ) { int posY = lastY + baseLine; @@ -1965,7 +1965,7 @@ void KoTextParag::drawParagStringInternal( TQPainter &painter, const TQString &s #ifdef DEBUG_PAINT //kdDebug(32500) << "we are drawing the end of line " << line << ". Auto-hyphenated: " << lineHyphenated( line ) << endl; #endif - bool drawHyphen = at( start+len-1 )->c.unicode() == 0xad; + bool drawHyphen = at( start+len-1 )->c.tqunicode() == 0xad; drawHyphen = drawHyphen || lineHyphenated( line ); if ( drawHyphen ) { #ifdef DEBUG_PAINT @@ -2059,7 +2059,7 @@ void KoTextParag::copyParagData( KoTextParag *parag ) //else // kdWarning() << "Paragraph has no style " << paragId() << endl; - // No "following style" setting, or same style -> copy layout & format of previous paragraph + // No "following style" setting, or same style -> copy tqlayout & format of previous paragraph if (!styleApplied) { setParagLayout( parag->paragLayout() ); @@ -2082,7 +2082,7 @@ void KoTextParag::copyParagData( KoTextParag *parag ) // Note: we don't call the original KoTextParag::copyParagData on purpose. // We don't want setListStyle to get called - it ruins our stylesheetitems // And we don't care about copying the stylesheetitems directly, - // applying the parag layout will create them + // applying the parag tqlayout will create them } void KoTextParag::setTabList( const KoTabulatorList &tabList ) @@ -2104,7 +2104,7 @@ void KoTextParag::setTabList( const KoTabulatorList &tabList ) { setTabArray( 0 ); } - invalidate( 0 ); + tqinvalidate( 0 ); } /** "Reimplemented" (compared to nextTabDefault) to implement non-left-aligned tabs */ @@ -2240,43 +2240,43 @@ void KoTextParag::applyStyle( KoParagStyle *style ) setFormat( newFormat ); } -void KoTextParag::setParagLayout( const KoParagLayout & layout, int flags, int marginIndex ) +void KoTextParag::setParagLayout( const KoParagLayout & tqlayout, int flags, int marginIndex ) { //kdDebug(32500) << "KoTextParag::setParagLayout flags=" << flags << endl; if ( flags & KoParagLayout::Alignment ) - setAlign( layout.alignment ); + setAlign( tqlayout.tqalignment ); if ( flags & KoParagLayout::Margins ) { if ( marginIndex == -1 ) - setMargins( layout.margins ); + setMargins( tqlayout.margins ); else - setMargin( (TQStyleSheetItem::Margin)marginIndex, layout.margins[marginIndex] ); + setMargin( (TQStyleSheetItem::Margin)marginIndex, tqlayout.margins[marginIndex] ); } if ( flags & KoParagLayout::LineSpacing ) { - setLineSpacingType( layout.lineSpacingType ); - setLineSpacing( layout.lineSpacingValue() ); + setLineSpacingType( tqlayout.lineSpacingType ); + setLineSpacing( tqlayout.lineSpacingValue() ); } if ( flags & KoParagLayout::Borders ) { - setLeftBorder( layout.leftBorder ); - setRightBorder( layout.rightBorder ); - setTopBorder( layout.topBorder ); - setBottomBorder( layout.bottomBorder ); - setJoinBorder( layout.joinBorder ); + setLeftBorder( tqlayout.leftBorder ); + setRightBorder( tqlayout.rightBorder ); + setTopBorder( tqlayout.topBorder ); + setBottomBorder( tqlayout.bottomBorder ); + setJoinBorder( tqlayout.joinBorder ); } if ( flags & KoParagLayout::BackgroundColor ) { - setBackgroundColor( layout.backgroundColor ); + setBackgroundColor( tqlayout.backgroundColor ); } if ( flags & KoParagLayout::BulletNumber ) - setCounter( layout.counter ); + setCounter( tqlayout.counter ); if ( flags & KoParagLayout::Tabulator ) - setTabList( layout.tabList() ); + setTabList( tqlayout.tabList() ); if ( flags == KoParagLayout::All ) { - setDirection( static_cast<TQChar::Direction>(layout.direction) ); + setDirection( static_cast<TQChar::Direction>(tqlayout.direction) ); // Don't call applyStyle from here, it would overwrite any paragraph-specific settings - setStyle( layout.style ); + setStyle( tqlayout.style ); } } @@ -2290,7 +2290,7 @@ void KoTextParag::setCustomItem( int index, KoTextCustomItem * custom, KoTextFor //addCustomItem(); document()->registerCustomItem( custom, this ); custom->recalc(); // calc value (e.g. for variables) and set initial size - invalidate( 0 ); + tqinvalidate( 0 ); setChanged( true ); } @@ -2349,7 +2349,7 @@ void KoTextParag::printRTDebug( int info ) static const char * const s_align[] = { "Auto", "Left", "Right", "ERROR", "HCenter", "ERR", "ERR", "ERR", "Justify", }; static const char * const s_linespacing[] = { "Single", "1.5", "2", "custom", "atLeast", "Multiple", "Fixed" }; static const char * const s_dir[] = { "DirL", "DirR", "DirEN", "DirES", "DirET", "DirAN", "DirCS", "DirB", "DirS", "DirWS", "DirON", "DirLRE", "DirLRO", "DirAL", "DirRLE", "DirRLO", "DirPDF", "DirNSM", "DirBN" }; - kdDebug(32500) << " align: " << s_align[alignment()] << " resolveAlignment: " << s_align[resolveAlignment()] + kdDebug(32500) << " align: " << s_align[tqalignment()] << " resolveAlignment: " << s_align[resolveAlignment()] << " isRTL:" << str->isRightToLeft() << " dir: " << s_dir[direction()] << endl; TQRect pixr = pixelRect( textDocument()->paintingZoomHandler() ); @@ -2421,7 +2421,7 @@ void KoTextParag::printRTDebug( int info ) attrs.truncate( attrs.length() - 1 ); kdDebug(32500) << i << ": '" << TQString(ch.c).rightJustify(2) - << "' (" << TQString::number( ch.c.unicode() ).rightJustify(3) << ")" + << "' (" << TQString::number( ch.c.tqunicode() ).rightJustify(3) << ")" << " x(LU)=" << ch.x << " w(LU)=" << ch.width//s->width(i) << " x(PIX)=" << pixelx @@ -2849,7 +2849,7 @@ void KoTextParag::loadOasisSpan( const TQDomElement& parent, KoOasisContext& con KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleCollection *styleCollection, bool findStyle ) { - KoParagLayout layout; + KoParagLayout tqlayout; // Only when loading paragraphs, not when loading styles if ( findStyle ) @@ -2877,17 +2877,17 @@ KoParagLayout KoTextParag::loadParagLayout( KoOasisContext& context, KoStyleColl style = styleCollection->findStyle( "Standard" ); } Q_ASSERT(style); - layout.style = style; + tqlayout.style = style; } - KoParagLayout::loadOasisParagLayout( layout, context ); + KoParagLayout::loadOasisParagLayout( tqlayout, context ); - return layout; + return tqlayout; } void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context, KoStyleCollection *styleCollection, uint& pos ) { - // First load layout from style + // First load tqlayout from style KoParagLayout paragLayout = loadParagLayout( context, styleCollection, true ); setParagLayout( paragLayout ); @@ -2906,7 +2906,7 @@ void KoTextParag::loadOasis( const TQDomElement& parent, KoOasisContext& context setFormat( len - 1, 1, paragFormat(), TRUE ); setChanged( true ); - invalidate( 0 ); + tqinvalidate( 0 ); } void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, @@ -2915,7 +2915,7 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, { KoGenStyles& mainStyles = context.mainStyles(); - // Write paraglayout to styles (with parent == the parag's style) + // Write paragtqlayout to styles (with parent == the parag's style) TQString parentStyleName; if ( m_layout.style ) parentStyleName = m_layout.style->name(); @@ -2924,11 +2924,11 @@ void KoTextParag::saveOasis( KoXmlWriter& writer, KoSavingContext& context, paragFormat()->save( autoStyle, context ); m_layout.saveOasis( autoStyle, context, false ); - // First paragraph is special, it includes page-layout info (for word-processing at least) + // First paragraph is special, it includes page-tqlayout info (for word-processing at least) if ( !prev() ) { if ( context.variableSettings() ) autoStyle.addProperty( "style:page-number", context.variableSettings()->startingPageNumber() ); - // Well we support only one page layout, so the first parag always points to "Standard". + // Well we support only one page tqlayout, so the first parag always points to "Standard". autoStyle.addAttribute( "style:master-page-name", "Standard" ); } @@ -3212,7 +3212,7 @@ void KoTextParag::drawFormattingChars( TQPainter &painter, int start, int len, #endif if ( ch.isCustom() ) continue; - if ( (ch.c == ' ' || ch.c.unicode() == 0x00a0U) + if ( (ch.c == ' ' || ch.c.tqunicode() == 0x00a0U) && (whichFormattingChars & FormattingSpace)) { // Don't use ch.pixelwidth here. We want a square with diff --git a/lib/kotext/KoTextParag.h b/lib/kotext/KoTextParag.h index d8e0c29b..e27a9afc 100644 --- a/lib/kotext/KoTextParag.h +++ b/lib/kotext/KoTextParag.h @@ -93,7 +93,7 @@ public: void format( int start = -1, bool doMove = TRUE ); /// Call this to ensure that format() will be called on this paragraph later on - void invalidate( int chr /*ignored*/ = 0 ); + void tqinvalidate( int chr /*ignored*/ = 0 ); /// Returns false if format() needs to be called on this paragraph bool isValid() const; @@ -130,9 +130,9 @@ public: void setFormat( int index, int len, const KoTextFormat *f, bool useCollection = TRUE, int flags = -1 ); - void setAlignment( uint a ); - void setAlignmentDirect( uint a ) { align = a; } - uint alignment() const; + void tqsetAlignment( uint a ); + void tqsetAlignmentDirect( uint a ) { align = a; } + uint tqalignment() const; virtual void paint( TQPainter &painter, const TQColorGroup &cg, KoTextCursor *cursor, bool drawSelections, int clipx, int clipy, int clipw, int cliph ); // kotextparag.cc @@ -214,7 +214,7 @@ public: /** Sets all or some parameters from a paragLayout struct. * @param flags selects which settings to apply, see KoParagLayout's enum. */ - virtual void setParagLayout( const KoParagLayout &layout, int flags = KoParagLayout::All, + virtual void setParagLayout( const KoParagLayout &tqlayout, int flags = KoParagLayout::All, int marginIndex = -1 ); const KoParagLayout & paragLayout() { return m_layout; } @@ -235,9 +235,9 @@ public: void setLineSpacingType( KoParagLayout::SpacingType _type ); - /** Use this to change the paragraph alignment, not KoTextParag::setAlignment ! */ + /** Use this to change the paragraph tqalignment, not KoTextParag::tqsetAlignment ! */ void setAlign( int align ); - /** Return the real alignment: Auto is resolved to either Left or Right */ + /** Return the real tqalignment: Auto is resolved to either Left or Right */ int resolveAlignment() const; /// The part of the top margin that can be broken by a page break @@ -328,7 +328,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as children. + * @param parent the xml element that has content as tqchildren. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace */ @@ -336,7 +336,7 @@ public: /** * Load a section of text from a oasis based xml tree. - * @param parent the xml element that has content as children. + * @param parent the xml element that has content as tqchildren. * @param context the context * @param stripLeadingSpace whether to remove leading literal whitespace * @param hasTrailingSpace whether there was trailing literal whitespace in the span's text @@ -520,18 +520,18 @@ inline KoTextDocument *KoTextParag::document() const return doc; } -inline void KoTextParag::setAlignment( uint a ) +inline void KoTextParag::tqsetAlignment( uint a ) { if ( a == align ) return; align = a; - invalidate( 0 ); + tqinvalidate( 0 ); } /*inline void KoTextParag::setListStyle( TQStyleSheetItem::ListStyle ls ) { lstyle = ls; - invalidate( 0 ); + tqinvalidate( 0 ); } inline TQStyleSheetItem::ListStyle KoTextParag::listStyle() const diff --git a/lib/kotext/KoTextView.cpp b/lib/kotext/KoTextView.cpp index aadeff06..32e82b73 100644 --- a/lib/kotext/KoTextView.cpp +++ b/lib/kotext/KoTextView.cpp @@ -41,7 +41,7 @@ #include <tqapplication.h> #include <tqtimer.h> -#include <clipboard.h> +#include <tqclipboard.h> class KoTextView::KoTextViewPrivate { @@ -291,7 +291,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ break; } default: { - //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].unicode() << " state=" << e->state() << endl; + //kdDebug(32500) << "KoTextView::keyPressEvent ascii=" << e->ascii() << " text=" << e->text()[0].tqunicode() << " state=" << e->state() << endl; if (e->key() == TQt::Key_Tab) { if (doToolTipCompletion(m_cursor, m_cursor->parag(), m_cursor->index() - 1, e->key()) ) @@ -331,7 +331,7 @@ void KoTextView::handleKeyPressEvent( TQKeyEvent * e, TQWidget *widget, const TQ // Bidi support: need to reverse mirrored chars (e.g. parenthesis) KoTextParag *p = m_cursor->parag(); if ( p && p->string() && p->string()->isRightToLeft() ) { - TQChar *c = (TQChar *)text.unicode(); + TQChar *c = (TQChar *)text.tqunicode(); int l = text.length(); while( l-- ) { if ( c->mirrored() ) @@ -611,7 +611,7 @@ KoTextCursor KoTextView::selectWordUnderCursor( const KoTextCursor& cursor, int const bool isWordDelimiter = ch.isSpace() || ch.category() == TQChar::Punctuation_Open // e.g. '(' || ch.category() == TQChar::Punctuation_Close // e.g. ')' - || ch.category() == TQChar::Punctuation_Other // see http://www.fileformat.info/info/unicode/category/Po/list.htm + || ch.category() == TQChar::Punctuation_Other // see http://www.fileformat.info/info/tqunicode/category/Po/list.htm ; if( !beginFound && !isWordDelimiter ) @@ -643,9 +643,9 @@ KoTextCursor KoTextView::selectParagUnderCursor( const KoTextCursor& cursor, int { textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); emit copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); } return c2; } @@ -808,9 +808,9 @@ void KoTextView::handleMouseReleaseEvent() textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); emit copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); } inDoubleClick = FALSE; @@ -831,9 +831,9 @@ void KoTextView::handleMouseDoubleClickEvent( TQMouseEvent*ev, const TQPoint& i *m_cursor = selectWordUnderCursor( *m_cursor ); textObject()->selectionChangedNotify(); // Copy the selection. - TQApplication::clipboard()->setSelectionMode( true ); + TQApplication::tqclipboard()->setSelectionMode( true ); emit copy(); - TQApplication::clipboard()->setSelectionMode( false ); + TQApplication::tqclipboard()->setSelectionMode( false ); possibleTripleClick=true; @@ -900,8 +900,8 @@ bool KoTextView::insertParagraph(const TQPoint &pos) if ( pos.x() + f->width(' ') >= textDocument()->width()) { //FIXME me bidi. - //change parag alignment => right alignment - last->setAlignment( TQt::AlignRight ); + //change parag tqalignment => right tqalignment + last->tqsetAlignment( TQt::AlignRight ); } else { @@ -1207,7 +1207,7 @@ bool KoTextView::openLink( KoLinkVariable* variable ) } else { - KMessageBox::sorry( 0, i18n("%1 is not a valid link.").arg( variable->url() ) ); + KMessageBox::sorry( 0, i18n("%1 is not a valid link.").tqarg( variable->url() ) ); return false; } } @@ -1450,10 +1450,10 @@ void KoTextView::copyTextOfComment() { KURL::List lst; lst.append( var->note() ); - TQApplication::clipboard()->setSelectionMode(true); - TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::clipboard()->setSelectionMode(false); - TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); } } @@ -1476,13 +1476,13 @@ KoParagStyle * KoTextView::createStyleFromSelection(const TQString & name) if ( textDocument()->hasSelection( KoTextDocument::Standard ) ) cursor = textDocument()->selectionStartCursor( KoTextDocument::Standard ); KoParagStyle * style = new KoParagStyle (name); - KoParagLayout layout(cursor.parag()->paragLayout()); - layout.style = style; + KoParagLayout tqlayout(cursor.parag()->paragLayout()); + tqlayout.style = style; style->setFollowingStyle( style ); style->format() = *(cursor.parag()->at(cursor.index())->format()); - style->paragLayout() = layout; - // Select this new style - hmm only the parag layout, we don't want to erase any text-formatting + style->paragLayout() = tqlayout; + // Select this new style - hmm only the parag tqlayout, we don't want to erase any text-formatting cursor.parag()->setParagLayout( style->paragLayout() ); return style; } @@ -1500,7 +1500,7 @@ void KoTextView::updateStyleFromSelection( KoParagStyle* style ) void KoTextView::addBookmarks(const TQString &url) { - TQString filename = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml") ); + TQString filename = locateLocal( "data", TQString::tqfromLatin1("konqueror/bookmarks.xml") ); KBookmarkManager *bookManager = KBookmarkManager::managerForFile( filename,false ); KBookmarkGroup group = bookManager->root(); group.addBookmark( bookManager, url, KURL( url)); @@ -1515,10 +1515,10 @@ void KoTextView::copyLink() { KURL::List lst; lst.append( var->url() ); - TQApplication::clipboard()->setSelectionMode(true); - TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); - TQApplication::clipboard()->setSelectionMode(false); - TQApplication::clipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::tqclipboard()->setSelectionMode(true); + TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); + TQApplication::tqclipboard()->setSelectionMode(false); + TQApplication::tqclipboard()->setData( new KURLDrag(lst, 0, 0) ); } } diff --git a/lib/kotext/KoTextZoomHandler.h b/lib/kotext/KoTextZoomHandler.h index d1bc6025..f8c2ef12 100644 --- a/lib/kotext/KoTextZoomHandler.h +++ b/lib/kotext/KoTextZoomHandler.h @@ -33,7 +33,7 @@ public: //// Support for WYSIWYG text layouting ///// - /** The "[zoomed] view pixel" -> "layout unit pixel" conversions. */ + /** The "[zoomed] view pixel" -> "tqlayout unit pixel" conversions. */ int pixelToLayoutUnitX( int x ) const; int pixelToLayoutUnitY( int y ) const; TQPoint pixelToLayoutUnit( const TQPoint &p ) const @@ -43,7 +43,7 @@ public: { return TQRect( pixelToLayoutUnit( r.topLeft() ), pixelToLayoutUnit( r.bottomRight() ) ); } - /** The "layout unit pixel" -> "[zoomed] view pixel" conversions. */ + /** The "tqlayout unit pixel" -> "[zoomed] view pixel" conversions. */ int layoutUnitToPixelX( int lupix ) const; int layoutUnitToPixelY( int lupix ) const; @@ -89,26 +89,26 @@ public: } /** - * Given the font size for the font in layout units, in pt (use pointSize()) + * Given the font size for the font in tqlayout units, in pt (use pointSize()) * this returns the font size to use on screen the current zoom, in pt (use setPointSizeFloat()), */ double layoutUnitToFontSize( int luSize, bool /*forPrint*/ ) const; - // Note: For converting fontsizes from/to layout units and zoom-independent + // Note: For converting fontsizes from/to tqlayout units and zoom-independent // pt sizes (like the one the user sees, e.g. 12pt), // use ptToLayoutUnit and layoutUnitToPt, not layoutToFontSize. - // The conversions below convert between an internal text layout resolution of + // The conversions below convert between an internal text tqlayout resolution of // ~1440 DPI (by default) and the point-size for the fonts (those known by the user). // Those conversions don't depend on the zoom level. /** Change the factor that converts between pointsizes - * and layout units (by default 20 - for 1440 DPI at 72 DPI) */ + * and tqlayout units (by default 20 - for 1440 DPI at 72 DPI) */ static void setPtToLayoutUnitFactor( int factor ) { m_layoutUnitFactor = factor; } /** Not zoom dependent. Simply convert a pt value (e.g. a frame) - * to high-resolution layout unit coordinates (in pt). */ + * to high-resolution tqlayout unit coordinates (in pt). */ static double ptToLayoutUnitPt( double pt ) { return pt * static_cast<double>( m_layoutUnitFactor ); } /** Same thing for integer values, e.g. a font size in pt */ diff --git a/lib/kotext/KoVariable.cpp b/lib/kotext/KoVariable.cpp index 489752f0..fa1b03fe 100644 --- a/lib/kotext/KoVariable.cpp +++ b/lib/kotext/KoVariable.cpp @@ -123,7 +123,7 @@ void KoVariableSettings::saveOasis( KoXmlWriter &settingsWriter ) const settingsWriter.addConfigItem( "displayfieldcode", m_displayFieldCode); // m_startingPageNumber isn't saved to OASIS. Applications must use either // style:page-number in the first parag of a page (see KoTextParag), or - // style:first-page-number in style:page-layout, for spreadsheets etc. + // style:first-page-number in style:page-tqlayout, for spreadsheets etc. if ( d->m_lastPrintingDate.isValid()) settingsWriter.addConfigItem("lastPrintingDate", d->m_lastPrintingDate.toString(Qt::ISODate)); @@ -532,7 +532,7 @@ TQValueList<KoVariable *> KoVariableCollection::recalcVariables(int type) if ( parag ) { //kdDebug(32500) << "KoDoc::recalcVariables -> invalidating parag " << parag->paragId() << endl; - parag->invalidate( 0 ); + parag->tqinvalidate( 0 ); parag->setChanged( true ); } } @@ -896,7 +896,7 @@ void KoVariable::recalcAndRepaint() if ( parag ) { //kdDebug(32500) << "KoVariable::recalcAndRepaint -> invalidating parag " << parag->paragId() << endl; - parag->invalidate( 0 ); + parag->tqinvalidate( 0 ); parag->setChanged( true ); } textDocument()->emitRepaintChanged(); @@ -978,7 +978,7 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int //p->drawText( x, posY, str ); // We can't just drawText, it wouldn't use the same kerning as the one // that resize() planned for [which is zoom-independent]. - // We need to do the layout using layout units instead, so for simplicity + // We need to do the tqlayout using tqlayout units instead, so for simplicity // I just draw every char individually (whereas KoTextFormatter/KoTextParag // detect runs of text that can be drawn together) const int len = str.length(); @@ -988,9 +988,9 @@ void KoVariable::drawCustomItemHelper( TQPainter* p, int x, int y, int wpix, int { const TQChar ch = str[i]; p->drawText( x, posY, TQString(ch) ); - // Do like KoTextFormatter: do the layout in layout units. + // Do like KoTextFormatter: do the tqlayout in tqlayout units. xLU += KoTextZoomHandler::ptToLayoutUnitPt( fm.width( ch ) ); - // And then compute the X position in pixels from the layout unit X. + // And then compute the X position in pixels from the tqlayout unit X. x = zh->layoutUnitToPixelX( xLU ); } @@ -1211,7 +1211,7 @@ void KoDateVariable::resize() void KoDateVariable::recalc() { if ( m_subtype == VST_DATE_CURRENT ) - m_varValue = TQDateTime(TQDateTime::currentDateTime().addDays(m_correctDate)); + m_varValue = TQDateTime(TQDateTime::tqcurrentDateTime().addDays(m_correctDate)); else if ( m_subtype == VST_DATE_LAST_PRINTING ) m_varValue = m_varColl->variableSetting()->lastPrintingDate(); else if ( m_subtype == VST_DATE_CREATE_FILE ) @@ -1222,7 +1222,7 @@ void KoDateVariable::recalc() { // Only if never set before (i.e. upon insertion) if ( m_varValue.isNull() ) - m_varValue = TQDateTime(TQDateTime::currentDateTime().addDays(m_correctDate)); + m_varValue = TQDateTime(TQDateTime::tqcurrentDateTime().addDays(m_correctDate)); } resize(); } @@ -1319,9 +1319,9 @@ void KoDateVariable::saveOasis( KoXmlWriter& writer, KoSavingContext& context ) else if ( value.lower() == "localeshort" ) value = KGlobal::locale()->dateFormatShort(); else if ( value.lower() == "localedatetime" ) - value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormat() ).arg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormat() ).tqarg( KGlobal::locale()->timeFormat() ); else if ( value.lower() == "localedatetimeshort" ) - value = TQString( "%1 %2" ).arg( KGlobal::locale()->dateFormatShort() ).arg( KGlobal::locale()->timeFormat() ); + value = TQString( "%1 %2" ).tqarg( KGlobal::locale()->dateFormatShort() ).tqarg( KGlobal::locale()->timeFormat() ); klocaleFormat = true; } writer.addAttribute( "style:data-style-name", KoOasisStyles::saveOasisDateStyle(context.mainStyles(), value, klocaleFormat ) ); @@ -2505,7 +2505,7 @@ void KoLinkVariable::drawCustomItem( TQPainter* p, int x, int y, int wpix, int h /******************************************************************/ KoNoteVariable::KoNoteVariable( KoTextDocument *textdoc, const TQString & _note,KoVariableFormat *varFormat,KoVariableCollection *_varColl ) : KoVariable( textdoc, varFormat,_varColl ) - , m_createdNoteDate( TQDate::currentDate() ) + , m_createdNoteDate( TQDate::tqcurrentDate() ) { m_varValue = TQVariant( _note ); } diff --git a/lib/kotext/KoVariable.h b/lib/kotext/KoVariable.h index fce8fc2d..88f17975 100644 --- a/lib/kotext/KoVariable.h +++ b/lib/kotext/KoVariable.h @@ -405,7 +405,7 @@ public: TQVariant varValue() const { return m_varValue; } /** - * Ask this variable to recalculate and to repaint itself + * Ask this variable to recalculate and to tqrepaint itself * Only use this if you're working on a single variable (e.g. popupmenu). * Otherwise, better do the repainting all at once. * @see KoVariableCollection::recalcVariables() diff --git a/lib/kotext/kodecorationtabbase.ui b/lib/kotext/kodecorationtabbase.ui index 7c8896b5..cd8f17f2 100644 --- a/lib/kotext/kodecorationtabbase.ui +++ b/lib/kotext/kodecorationtabbase.ui @@ -18,7 +18,7 @@ </property> <widget class="TQGroupBox"> <property name="name"> - <cstring>colorGroupBox</cstring> + <cstring>tqcolorGroupBox</cstring> </property> <property name="title"> <string>Colors</string> @@ -126,7 +126,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>16</width> <height>20</height> @@ -143,7 +143,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>21</height> diff --git a/lib/kotext/kohighlightingtabbase.ui b/lib/kotext/kohighlightingtabbase.ui index b2b4ce26..27be0702 100644 --- a/lib/kotext/kohighlightingtabbase.ui +++ b/lib/kotext/kohighlightingtabbase.ui @@ -120,7 +120,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>41</height> diff --git a/lib/kotext/kohyphen/kohyphen.cpp b/lib/kotext/kohyphen/kohyphen.cpp index 723c50c2..d8a0374e 100644 --- a/lib/kotext/kohyphen/kohyphen.cpp +++ b/lib/kotext/kohyphen/kohyphen.cpp @@ -21,7 +21,7 @@ #include <tqdom.h> #include <tqfile.h> -#include <textcodec.h> +#include <tqtextcodec.h> #include <tqstring.h> #include <klocale.h> @@ -177,10 +177,10 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const if ( underscore > -1 ) { lang.truncate( underscore ); if (encodings.find(lang) == encodings.end()) - throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); } else - throw KoHyphenatorException( TQString("No dictionary for %1").arg(lang) ); + throw KoHyphenatorException( TQString("No dictionary for %1").tqarg(lang) ); } if (dicts.find(lang) == dicts.end()) { @@ -199,11 +199,11 @@ HyphenDict *KoHyphenator::dict(const TQString &_lang) const #ifdef DEBUG_HYPHENATOR kdDebug() << "No dictionary loaded" << endl; #endif - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); } } else - throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").arg(lang) )); + throw(KoHyphenatorException( TQString("Could not load dictionary for the language: %1").tqarg(lang) )); } return dicts[lang]; } diff --git a/lib/kotext/kolanguagetabbase.ui b/lib/kotext/kolanguagetabbase.ui index 0fbd5442..a9073584 100644 --- a/lib/kotext/kolanguagetabbase.ui +++ b/lib/kotext/kolanguagetabbase.ui @@ -60,7 +60,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>171</height> diff --git a/lib/kotext/kolayouttabbase.ui b/lib/kotext/kolayouttabbase.ui index 646bc795..471607d4 100644 --- a/lib/kotext/kolayouttabbase.ui +++ b/lib/kotext/kolayouttabbase.ui @@ -40,7 +40,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout3</cstring> + <cstring>tqlayout3</cstring> </property> <vbox> <property name="name"> @@ -94,7 +94,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>61</width> <height>20</height> @@ -103,7 +103,7 @@ </spacer> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout2</cstring> + <cstring>tqlayout2</cstring> </property> <grid> <property name="name"> @@ -225,7 +225,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>16</height> diff --git a/lib/kotext/tests/kobordertest.cpp b/lib/kotext/tests/kobordertest.cpp index 356b0158..5d5fbe5e 100644 --- a/lib/kotext/tests/kobordertest.cpp +++ b/lib/kotext/tests/kobordertest.cpp @@ -11,14 +11,14 @@ class MyWidget : public TQWidget public: MyWidget( KoZoomHandler* _zh, TQWidget* parent ) : TQWidget( parent ), m_zh(_zh) { - setSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); + tqsetSizePolicy( TQSizePolicy::Fixed, TQSizePolicy::Fixed ); } - TQSize sizeHint() const { + TQSize tqsizeHint() const { return TQSize( 150, 150 ); } - TQSize minimumSizeHint() const { - return sizeHint(); + TQSize tqminimumSizeHint() const { + return tqsizeHint(); } KoBorder m_leftBorder; diff --git a/lib/kotext/tests/kotextformattertest.cpp b/lib/kotext/tests/kotextformattertest.cpp index 6721f771..b6138315 100644 --- a/lib/kotext/tests/kotextformattertest.cpp +++ b/lib/kotext/tests/kotextformattertest.cpp @@ -89,7 +89,7 @@ void KoTextFormatterTest::speedTest() // Format it 50 times for ( uint i = 0 ; i < 50 ; ++i ) { - parag->invalidate(0); + parag->tqinvalidate(0); parag->format(); } doc->clear(false); @@ -205,8 +205,8 @@ int main (int argc, char ** argv) KApplication app(argc, argv, "KoTextFormatter test"); // Don't let locale settings lead to different hyphenation output - KGlobal::locale()->setLanguage( TQString::fromLatin1( "en_US" ) ); - KGlobal::locale()->setCountry( TQString::fromLatin1( "C" ) ); + KGlobal::locale()->setLanguage( TQString::tqfromLatin1( "en_US" ) ); + KGlobal::locale()->setCountry( TQString::tqfromLatin1( "C" ) ); KoTextFormatterTest test; //test.speedTest(); diff --git a/lib/kotext/timedateformatwidget.ui b/lib/kotext/timedateformatwidget.ui index ded1c906..830b3bdb 100644 --- a/lib/kotext/timedateformatwidget.ui +++ b/lib/kotext/timedateformatwidget.ui @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -38,7 +38,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>layout7</cstring> + <cstring>tqlayout7</cstring> </property> <vbox> <property name="name"> @@ -59,7 +59,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout5</cstring> + <cstring>tqlayout5</cstring> </property> <hbox> <property name="name"> @@ -86,7 +86,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -113,7 +113,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout4</cstring> + <cstring>tqlayout4</cstring> </property> <hbox> <property name="name"> @@ -137,7 +137,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>50</width> <height>20</height> @@ -175,7 +175,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="sizeHint"> + <property name="tqsizeHint"> <size> <width>20</width> <height>10</height> diff --git a/lib/kross/api/callable.cpp b/lib/kross/api/callable.cpp index b85aa4cd..f095f596 100644 --- a/lib/kross/api/callable.cpp +++ b/lib/kross/api/callable.cpp @@ -47,26 +47,26 @@ const TQString Callable::getClassName() const bool Callable::hasChild(const TQString& name) const { - return m_children.contains(name); + return m_tqchildren.contains(name); } Object::Ptr Callable::getChild(const TQString& name) const { - return m_children[name]; + return m_tqchildren[name]; } TQMap<TQString, Object::Ptr> Callable::getChildren() const { - return m_children; + return m_tqchildren; } bool Callable::addChild(const TQString& name, Object* object) { #ifdef KROSS_API_OBJECT_ADDCHILD_DEBUG krossdebug( TQString("Kross::Api::Callable::addChild() object.name='%1' object.classname='%2'") - .arg(name).arg(object->getClassName()) ); + .tqarg(name).tqarg(object->getClassName()) ); #endif - m_children.replace(name, Object::Ptr(object)); + m_tqchildren.replace(name, Object::Ptr(object)); return true; } @@ -78,9 +78,9 @@ bool Callable::addChild(Callable* object) void Callable::removeChild(const TQString& name) { #ifdef KROSS_API_OBJECT_REMCHILD_DEBUG - krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").arg(name) ); + krossdebug( TQString("Kross::Api::Callable::removeChild() name='%1'").tqarg(name) ); #endif - m_children.remove(name); + m_tqchildren.remove(name); } void Callable::removeAllChildren() @@ -88,13 +88,13 @@ void Callable::removeAllChildren() #ifdef KROSS_API_OBJECT_REMCHILD_DEBUG krossdebug( "Kross::Api::Callable::removeAllChildren()" ); #endif - m_children.clear(); + m_tqchildren.clear(); } Object::Ptr Callable::call(const TQString& name, List::Ptr args) { #ifdef KROSS_API_CALLABLE_CALL_DEBUG - krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").arg(name).arg(getName()).arg(args ? args->toString() : TQString("")) ); + krossdebug( TQString("Kross::Api::Callable::call() name=%1 getName()=%2 arguments=%3").tqarg(name).tqarg(getName()).tqarg(args ? args->toString() : TQString("")) ); #endif if(name.isEmpty()) // return a self-reference if no functionname is defined. @@ -111,7 +111,7 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) TQString s = Variant::toString(args->item(0)); Object::Ptr obj = getChild(s); if(! obj) - throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").arg(getName()).arg(s)) ); + throw Exception::Ptr( new Exception(TQString("The object '%1' has no child object '%2'").tqarg(getName()).tqarg(s)) ); return obj; } else if(name == "has") { @@ -123,9 +123,9 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) } else if(name == "list") { TQStringList list; - TQMap<TQString, Object::Ptr> children = getChildren(); - TQMap<TQString, Object::Ptr>::Iterator it( children.begin() ); - for(; it != children.end(); ++it) + TQMap<TQString, Object::Ptr> tqchildren = getChildren(); + TQMap<TQString, Object::Ptr>::Iterator it( tqchildren.begin() ); + for(; it != tqchildren.end(); ++it) list.append( it.key() ); return new Variant(list); } @@ -134,6 +134,6 @@ Object::Ptr Callable::call(const TQString& name, List::Ptr args) } // If there exists no such object return NULL. - krossdebug( TQString("Object '%1' has no callable object named '%2'.").arg(getName()).arg(name) ); + krossdebug( TQString("Object '%1' has no callable object named '%2'.").tqarg(getName()).tqarg(name) ); return 0; } diff --git a/lib/kross/api/callable.h b/lib/kross/api/callable.h index 0e3dd3a6..63edb067 100644 --- a/lib/kross/api/callable.h +++ b/lib/kross/api/callable.h @@ -92,9 +92,9 @@ namespace Kross { namespace Api { Object::Ptr getChild(const TQString& name) const; /** - * Return all children. + * Return all tqchildren. * - * \return A \a ObjectMap of children this Object has. + * \return A \a ObjectMap of tqchildren this Object has. */ TQMap<TQString, Object::Ptr> getChildren() const; @@ -125,7 +125,7 @@ namespace Kross { namespace Api { void removeChild(const TQString& name); /** - * Remove all children. + * Remove all tqchildren. */ void removeAllChildren(); @@ -138,7 +138,7 @@ namespace Kross { namespace Api { /// Name this callable object has. TQString m_name; /// A list of childobjects. - TQMap<TQString, Object::Ptr> m_children; + TQMap<TQString, Object::Ptr> m_tqchildren; }; }} diff --git a/lib/kross/api/class.h b/lib/kross/api/class.h index 6224a61a..de1d898c 100644 --- a/lib/kross/api/class.h +++ b/lib/kross/api/class.h @@ -76,7 +76,7 @@ namespace Kross { namespace Api { /* virtual Object::Ptr call(const TQString& name, List::Ptr arguments) { - krossdebug( TQString("Class::call(%1)").arg(name) ); + krossdebug( TQString("Class::call(%1)").tqarg(name) ); return Event<T>::call(name, arguments); } */ diff --git a/lib/kross/api/event.h b/lib/kross/api/event.h index b75107f7..26a92117 100644 --- a/lib/kross/api/event.h +++ b/lib/kross/api/event.h @@ -201,13 +201,13 @@ namespace Kross { namespace Api { virtual Object::Ptr call(const TQString& name, List::Ptr arguments) { #ifdef KROSS_API_EVENT_CALL_DEBUG - krossdebug( TQString("Event::call() name='%1' getName()='%2'").arg(name).arg(getName()) ); + krossdebug( TQString("Event::call() name='%1' getName()='%2'").tqarg(name).tqarg(getName()) ); #endif Function* function = m_functions[name]; if(function) { #ifdef KROSS_API_EVENT_CALL_DEBUG - krossdebug( TQString("Event::call() name='%1' is a builtin function.").arg(name) ); + krossdebug( TQString("Event::call() name='%1' is a builtin function.").tqarg(name) ); #endif return function->call(arguments); } diff --git a/lib/kross/api/eventscript.cpp b/lib/kross/api/eventscript.cpp index f9fe9f9a..43c4c1cb 100644 --- a/lib/kross/api/eventscript.cpp +++ b/lib/kross/api/eventscript.cpp @@ -40,7 +40,7 @@ const TQString EventScript::getClassName() const Object::Ptr EventScript::call(const TQString& name, KSharedPtr<List> arguments) { - krossdebug( TQString("EventScript::call() name=%1 arguments=%2").arg(name).arg(arguments->toString()) ); + krossdebug( TQString("EventScript::call() name=%1 arguments=%2").tqarg(name).tqarg(arguments->toString()) ); //TODO return 0; } diff --git a/lib/kross/api/eventsignal.cpp b/lib/kross/api/eventsignal.cpp index 8f4d2c50..e3a8e54f 100644 --- a/lib/kross/api/eventsignal.cpp +++ b/lib/kross/api/eventsignal.cpp @@ -46,7 +46,7 @@ const TQString EventSignal::getClassName() const Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> arguments) { #ifdef KROSS_API_EVENTSIGNAL_CALL_DEBUG - krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").arg(m_signal).arg(arguments->toString()) ); + krossdebug( TQString("EventSignal::call() m_signal=%1 arguments=%2").tqarg(m_signal).tqarg(arguments->toString()) ); #endif TQString n = m_signal; @@ -54,9 +54,9 @@ Object::Ptr EventSignal::call(const TQString& /*name*/, KSharedPtr<List> argumen if(n.startsWith("2")) // Remove prefix of SIGNAL-macros n.remove(0,1); - int signalid = m_sender->metaObject()->findSignal(n.latin1(), false); + int signalid = m_sender->tqmetaObject()->findSignal(n.latin1(), false); if(signalid < 0) - throw new Exception(TQString("No such signal '%1'.").arg(n)); + throw new Exception(TQString("No such signal '%1'.").tqarg(n)); TQUObject* uo = QtObject::toTQUObject(n, arguments); m_sender->qt_emit(signalid, uo); // emit the signal diff --git a/lib/kross/api/eventslot.cpp b/lib/kross/api/eventslot.cpp index 3f6482db..fd566d31 100644 --- a/lib/kross/api/eventslot.cpp +++ b/lib/kross/api/eventslot.cpp @@ -46,7 +46,7 @@ const TQString EventSlot::getClassName() const Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) { #ifdef KROSS_API_EVENTSLOT_CALL_DEBUG - krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").arg(m_slot).arg(arguments->toString()) ); + krossdebug( TQString("EventSlot::call() m_slot=%1 arguments=%2").tqarg(m_slot).tqarg(arguments->toString()) ); #endif TQString n = m_slot; //TODO name; //Variant::toString(args->item(0)); @@ -54,9 +54,9 @@ Object::Ptr EventSlot::call(const TQString& /*name*/, List::Ptr arguments) if(n.startsWith("1")) // Remove prefix of SLOT-macros n.remove(0,1); - int slotid = m_receiver->metaObject()->findSlot(n.latin1(), false); + int slotid = m_receiver->tqmetaObject()->findSlot(n.latin1(), false); if(slotid < 0) - throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(n)) ); + throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(n)) ); TQUObject* uo = QtObject::toTQUObject(n, arguments); m_receiver->qt_invoke(slotid, uo); // invoke the slot @@ -72,7 +72,7 @@ TQCString EventSlot::getSlot(const TQCString& signal) int startpos = signature.find("("); int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) { - krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").arg(signal) ); + krosswarning( TQString("EventSlot::getSlot(%1) Invalid signal.").tqarg(signal) ); return TQCString(); } TQString signalname = signature.left(startpos); @@ -80,16 +80,16 @@ TQCString EventSlot::getSlot(const TQCString& signal) //TQStringList paramlist = TQStringList::split(",", params); TQCString slot = TQString("callback(" + params + ")").latin1(); //normalizeSignalSlot(); - TQMetaObject* mo = metaObject(); + TQMetaObject* mo = tqmetaObject(); int slotid = mo->findSlot(slot, false); if(slotid < 0) { - krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").arg(signal).arg(slot) ); + krossdebug( TQString("EventSlot::getSlot(%1) No such slot '%2' avaiable.").tqarg(signal).tqarg(slot) ); return TQCString(); } const TQMetaData* md = mo->slot(slotid, false); if(md->access != TQMetaData::Public) { - krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").arg(signal).arg(slot) ); + krossdebug( TQString("EventSlot::getSlot(%1) The slot '%2' is not public.").tqarg(signal).tqarg(slot) ); return TQCString(); } @@ -97,7 +97,7 @@ TQCString EventSlot::getSlot(const TQCString& signal) //const TQUMethod *method = md->method; krossdebug( TQString("signal=%1 slot=%2 slotid=%3 params=%4 mdname=%5") - .arg(signal).arg(slot).arg(slotid).arg(params).arg(md->name) ); + .tqarg(signal).tqarg(slot).tqarg(slotid).tqarg(params).tqarg(md->name) ); return TQCString("1" + slot); // Emulate the TQT_SLOT(...) macro by adding as first char a "1". } @@ -114,7 +114,7 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T EventSlot* eventslot = create(eventmanager); eventslot->connect(eventmanager, senderobj, signal, function, slot); m_slots.append(eventslot); - krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").arg(senderobj->name()).arg(signal).arg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) added child EventSlot !!!").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); } else { m_sender = senderobj; @@ -122,10 +122,10 @@ bool EventSlot::connect(EventManager* eventmanager, TQObject* senderobj, const T m_function = function; m_slot = myslot; if(! TQObject::connect((TQObject*)senderobj, signal, this, myslot)) { - krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").arg(senderobj->name()).arg(signal).arg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) failed.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); return false; } - krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").arg(senderobj->name()).arg(signal).arg(function) ); + krossdebug( TQString("EventSlot::connect(%1, %2, %3) successfully connected.").tqarg(senderobj->name()).tqarg(signal).tqarg(function) ); } return true; } @@ -144,7 +144,7 @@ bool EventSlot::disconnect() void EventSlot::call(const TQVariant& variant) { krossdebug( TQString("EventSlot::call() sender='%1' signal='%2' function='%3'") - .arg(m_sender->name()).arg(m_signal).arg(m_function) ); + .tqarg(m_sender->name()).tqarg(m_signal).tqarg(m_function) ); Kross::Api::List* arglist = 0; @@ -159,7 +159,7 @@ void EventSlot::call(const TQVariant& variant) } catch(Exception& e) { //TODO add hadError(), getError() and setError() - krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").arg(variant.toString()).arg(e.type()).arg(e.description()) ); + krossdebug( TQString("EXCEPTION in EventSlot::call('%1') type='%2' description='%3'").tqarg(variant.toString()).tqarg(e.type()).tqarg(e.description()) ); } } diff --git a/lib/kross/api/exception.cpp b/lib/kross/api/exception.cpp index cb0125c4..c6a0198f 100644 --- a/lib/kross/api/exception.cpp +++ b/lib/kross/api/exception.cpp @@ -30,7 +30,7 @@ Exception::Exception(const TQString& error, long lineno) , m_error(error) , m_lineno(lineno) { - krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").arg(m_error).arg(m_lineno) ); + krosswarning( TQString("Kross::Api::Exception error='%1' lineno='%3'").tqarg(m_error).tqarg(m_lineno) ); } Exception::~Exception() @@ -45,8 +45,8 @@ const TQString Exception::getClassName() const const TQString Exception::toString() { return (m_lineno != -1) - ? TQString("Exception at line %1: %2").arg(m_lineno).arg(m_error) - : TQString("Exception: %1").arg(m_error); + ? TQString("Exception at line %1: %2").tqarg(m_lineno).tqarg(m_error) + : TQString("Exception: %1").tqarg(m_error); } const TQString Exception::getError() const diff --git a/lib/kross/api/interpreter.cpp b/lib/kross/api/interpreter.cpp index 86eae479..8d266930 100644 --- a/lib/kross/api/interpreter.cpp +++ b/lib/kross/api/interpreter.cpp @@ -95,7 +95,7 @@ Interpreter* InterpreterInfo::getInterpreter() if(m_interpreter) // buffered return m_interpreter; - krossdebug( TQString("Loading the interpreter library for %1").arg(m_interpretername) ); + krossdebug( TQString("Loading the interpreter library for %1").tqarg(m_interpretername) ); // Load the krosspython library. KLibLoader *libloader = KLibLoader::self(); @@ -104,10 +104,10 @@ Interpreter* InterpreterInfo::getInterpreter() if(! library) { /* setException( - new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) ) + new Exception( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) ) ); */ - krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").arg(m_library).arg(m_interpretername) ); + krosswarning( TQString("Could not load library \"%1\" for the \"%2\" interpreter.").tqarg(m_library).tqarg(m_interpretername) ); return 0; } diff --git a/lib/kross/api/list.cpp b/lib/kross/api/list.cpp index 9e2baf52..3d894116 100644 --- a/lib/kross/api/list.cpp +++ b/lib/kross/api/list.cpp @@ -51,8 +51,8 @@ Object::Ptr List::item(uint idx, Object* defaultobject) if(idx >= list.count()) { if(defaultobject) return defaultobject; - krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").arg(idx) ); - throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").arg(idx)) ); + krossdebug( TQString("List::item index=%1 is out of bounds. Raising TypeException.").tqarg(idx) ); + throw Exception::Ptr( new Exception(TQString("List-index %1 out of bounds.").tqarg(idx)) ); } return list[idx]; } diff --git a/lib/kross/api/module.h b/lib/kross/api/module.h index f27bdf5c..3e58305a 100644 --- a/lib/kross/api/module.h +++ b/lib/kross/api/module.h @@ -51,7 +51,7 @@ namespace Kross { namespace Api { explicit Module(const TQString& name) : Class<Module>(name) { - krossdebug( TQString("Kross::Api::Module %1 created").arg(name) ); + krossdebug( TQString("Kross::Api::Module %1 created").tqarg(name) ); } /** @@ -59,7 +59,7 @@ namespace Kross { namespace Api { */ virtual ~Module() { - krossdebug( TQString("Kross::Api::Module %1 destroyed").arg(getName()) ); + krossdebug( TQString("Kross::Api::Module %1 destroyed").tqarg(getName()) ); } /** diff --git a/lib/kross/api/object.cpp b/lib/kross/api/object.cpp index 43fa8b4b..06ec55d5 100644 --- a/lib/kross/api/object.cpp +++ b/lib/kross/api/object.cpp @@ -30,21 +30,21 @@ Object::Object() : KShared() { #ifdef KROSS_API_OBJECT_CTOR_DEBUG - krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) ); + krossdebug( TQString("Kross::Api::Object::Constructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) ); #endif } Object::~Object() { #ifdef KROSS_API_OBJECT_DTOR_DEBUG - krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").arg(m_name).arg(_KShared_count()) ); + krossdebug( TQString("Kross::Api::Object::Destructor() name='%1' refcount='%2'").tqarg(m_name).tqarg(_KShared_count()) ); #endif //removeAllChildren(); // not needed cause we use KShared to handle ref-couting and freeing. } const TQString Object::toString() { - return TQString("%1").arg(getClassName()); + return TQString("%1").tqarg(getClassName()); } Object::Ptr Object::call(const TQString& name, List::Ptr arguments) @@ -52,12 +52,12 @@ Object::Ptr Object::call(const TQString& name, List::Ptr arguments) Q_UNUSED(arguments); #ifdef KROSS_API_OBJECT_CALL_DEBUG - krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").arg(name).arg(getName()).arg(getClassName()) ); + krossdebug( TQString("Kross::Api::Object::call(%1) name=%2 class=%3").tqarg(name).tqarg(getName()).tqarg(getClassName()) ); #endif if(name.isEmpty()) // return a self-reference if no functionname is defined. return this; - throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").arg(name)) ); + throw Exception::Ptr( new Exception(TQString("No callable object named '%2'").tqarg(name)) ); } diff --git a/lib/kross/api/object.h b/lib/kross/api/object.h index f23a6179..87bd2132 100644 --- a/lib/kross/api/object.h +++ b/lib/kross/api/object.h @@ -142,7 +142,7 @@ template<class T> inline T* Object::fromObject(Object::Ptr object) { T* t = (T*) object.data(); if(! t) - throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").arg(object ? object->getClassName() : "")) ); + throw KSharedPtr<Exception>( new Exception(TQString("Object \"%1\" invalid.").tqarg(object ? object->getClassName() : "")) ); return t; } diff --git a/lib/kross/api/qtobject.cpp b/lib/kross/api/qtobject.cpp index 5fc1a36a..243f0503 100644 --- a/lib/kross/api/qtobject.cpp +++ b/lib/kross/api/qtobject.cpp @@ -42,13 +42,13 @@ QtObject::QtObject(TQObject* object, const TQString& name) // Walk through the signals and slots the TQObject has // and attach them as events to this QtObject. - TQStrList slotnames = m_object->metaObject()->slotNames(false); + TQStrList slotnames = m_object->tqmetaObject()->slotNames(false); for(char* c = slotnames.first(); c; c = slotnames.next()) { TQCString s = c; addChild(s, new EventSlot(s, object, s) ); } - TQStrList signalnames = m_object->metaObject()->signalNames(false); + TQStrList signalnames = m_object->tqmetaObject()->signalNames(false); for(char* c = signalnames.first(); c; c = signalnames.next()) { TQCString s = c; addChild(s, new EventSignal(s, object, s) ); @@ -93,7 +93,7 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) int startpos = signature.find("("); int endpos = signature.findRev(")"); if(startpos < 0 || startpos > endpos) - throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").arg(signature)) ); + throw Exception::Ptr( new Exception(TQString("Invalid TQt signal or slot signature '%1'").tqarg(signature)) ); //TQString sig = signature.left(startpos); TQString params = signature.mid(startpos + 1, endpos - startpos - 1); @@ -107,19 +107,19 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) //TQString t; //for(int j=0; j<argcount; j++) t += "'" + Variant::toString(arguments->item(j)) + "' "; -//krossdebug( TQString("1 ---------------------: (%1) %2").arg(argcount).arg(t) ); +//krossdebug( TQString("1 ---------------------: (%1) %2").tqarg(argcount).tqarg(t) ); // Fill parameters. uint argcount = arguments ? arguments->count() : 0; for(uint i = 0; i < paramcount; i++) { if(paramlist[i].find(TQSTRING_OBJECT_NAME_STRING) >= 0) { const TQString s = (argcount > i) ? Variant::toString(arguments->item(i)) : TQString(); - //krossdebug(TQString("EventSlot::toTQUObject s=%1").arg(s)); + //krossdebug(TQString("EventSlot::toTQUObject s=%1").tqarg(s)); static_TQUType_TQString.set( &(uo[i + 1]), s ); } //TODO handle int, long, char*, TQStringList, etc. else { - throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").arg(paramlist[i]).arg(signature)) ); + throw Exception::Ptr( new Exception(TQString("Unknown TQt signal or slot argument '%1' in signature '%2'.").tqarg(paramlist[i]).tqarg(signature)) ); } } @@ -129,13 +129,13 @@ TQUObject* QtObject::toTQUObject(const TQString& signature, List::Ptr arguments) Kross::Api::Object::Ptr QtObject::propertyNames(Kross::Api::List::Ptr) { return new Kross::Api::Variant( - TQStringList::fromStrList(m_object->metaObject()->propertyNames(false))); + TQStringList::fromStrList(m_object->tqmetaObject()->propertyNames(false))); } Kross::Api::Object::Ptr QtObject::hasProperty(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - m_object->metaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false)); + m_object->tqmetaObject()->findProperty(Kross::Api::Variant::toString(args->item(0)).latin1(), false)); } Kross::Api::Object::Ptr QtObject::getProperty(Kross::Api::List::Ptr args) @@ -158,13 +158,13 @@ Kross::Api::Object::Ptr QtObject::setProperty(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::slotNames(Kross::Api::List::Ptr) { return new Kross::Api::Variant( - TQStringList::fromStrList(m_object->metaObject()->slotNames(false))); + TQStringList::fromStrList(m_object->tqmetaObject()->slotNames(false))); } Kross::Api::Object::Ptr QtObject::hasSlot(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - bool(m_object->metaObject()->slotNames(false).find( + bool(m_object->tqmetaObject()->slotNames(false).find( Kross::Api::Variant::toString(args->item(0)).latin1() ) != -1)); } @@ -173,9 +173,9 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args) { //TODO just call the child event ?! TQString name = Kross::Api::Variant::toString(args->item(0)); - int slotid = m_object->metaObject()->findSlot(name.latin1(), false); + int slotid = m_object->tqmetaObject()->findSlot(name.latin1(), false); if(slotid < 0) - throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").arg(name)) ); + throw Exception::Ptr( new Exception(TQString("No such slot '%1'.").tqarg(name)) ); TQUObject* uo = QtObject::toTQUObject(name, args); m_object->qt_invoke(slotid, uo); @@ -187,13 +187,13 @@ Kross::Api::Object::Ptr QtObject::callSlot(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::signalNames(Kross::Api::List::Ptr) { return new Kross::Api::Variant( - TQStringList::fromStrList(m_object->metaObject()->signalNames(false))); + TQStringList::fromStrList(m_object->tqmetaObject()->signalNames(false))); } Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args) { return new Kross::Api::Variant( - bool(m_object->metaObject()->signalNames(false).find( + bool(m_object->tqmetaObject()->signalNames(false).find( Kross::Api::Variant::toString(args->item(0)).latin1() ) != -1)); } @@ -201,9 +201,9 @@ Kross::Api::Object::Ptr QtObject::hasSignal(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args) { TQString name = Kross::Api::Variant::toString(args->item(0)); - int signalid = m_object->metaObject()->findSignal(name.latin1(), false); + int signalid = m_object->tqmetaObject()->findSignal(name.latin1(), false); if(signalid < 0) - throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").arg(name)) ); + throw Exception::Ptr( new Exception(TQString("No such signal '%1'.").tqarg(name)) ); m_object->qt_invoke(signalid, 0); //TODO convert Kross::Api::List::Ptr => TQUObject* return 0; } @@ -211,16 +211,16 @@ Kross::Api::Object::Ptr QtObject::emitSignal(Kross::Api::List::Ptr args) Kross::Api::Object::Ptr QtObject::connectSignal(Kross::Api::List::Ptr args) { TQString signalname = Kross::Api::Variant::toString(args->item(0)); - TQString signalsignatur = TQString("2%1").arg(signalname); + TQString signalsignatur = TQString("2%1").tqarg(signalname); const char* signalsig = signalsignatur.latin1(); QtObject* obj = Kross::Api::Object::fromObject<Kross::Api::QtObject>(args->item(1)); TQObject* o = obj->getObject(); if(! o) - throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").arg(obj->getName())) ); + throw Exception::Ptr( new Exception(TQString("No such TQObject receiver in '%1'.").tqarg(obj->getName())) ); TQString slotname = Kross::Api::Variant::toString(args->item(2)); - TQString slotsignatur = TQString("1%1").arg(slotname); + TQString slotsignatur = TQString("1%1").tqarg(slotname); const char* slotsig = slotsignatur.latin1(); return new Kross::Api::Variant( diff --git a/lib/kross/api/variant.cpp b/lib/kross/api/variant.cpp index 54e8ed7e..e8d8bc1b 100644 --- a/lib/kross/api/variant.cpp +++ b/lib/kross/api/variant.cpp @@ -81,7 +81,7 @@ const TQString Variant::toString(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::String)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::String expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toString(); } @@ -89,7 +89,7 @@ int Variant::toInt(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Int)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Int expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toInt(); } @@ -97,7 +97,7 @@ uint Variant::toUInt(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::UInt)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::UInt expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toUInt(); } @@ -105,7 +105,7 @@ double Variant::toDouble(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Double)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Double expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toDouble(); } @@ -113,7 +113,7 @@ TQ_LLONG Variant::toLLONG(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::LongLong)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::LLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toLongLong(); } @@ -121,7 +121,7 @@ TQ_ULLONG Variant::toULLONG(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::ULongLong)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::ULLONG expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toULongLong(); } @@ -129,7 +129,7 @@ bool Variant::toBool(Object::Ptr object) { const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::Bool)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::Bool expected, but got %1.").tqarg(variant.typeName()).latin1()) ); return variant.toBool(); } @@ -146,7 +146,7 @@ TQStringList Variant::toStringList(Object::Ptr object) } const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::StringList)) - throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(TQString("Kross::Api::Variant::StringList expected, but got '%1'.").tqarg(variant.typeName()).latin1()) ); return variant.toStringList(); } @@ -163,6 +163,6 @@ TQValueList<TQVariant> Variant::toList(Object::Ptr object) } const TQVariant& variant = toVariant(object); if(! variant.canCast(TQVariant::List)) - throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").arg(variant.typeName()).latin1()) ); + throw Exception::Ptr( new Exception(i18n("Kross::Api::Variant::List expected, but got '%1'.").tqarg(variant.typeName()).latin1()) ); return variant.toList(); } diff --git a/lib/kross/main/mainmodule.cpp b/lib/kross/main/mainmodule.cpp index 8c29180f..dde74502 100644 --- a/lib/kross/main/mainmodule.cpp +++ b/lib/kross/main/mainmodule.cpp @@ -79,7 +79,7 @@ EventSignal::Ptr MainModule::addSignal(const TQString& name, TQObject* sender, T { EventSignal* event = new EventSignal(name, sender, signal); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add signal name='%1' signature='%2'").arg(name).arg(signal.data()) ); + krosswarning( TQString("Failed to add signal name='%1' signature='%2'").tqarg(name).tqarg(signal.data()) ); return 0; } return event; @@ -89,7 +89,7 @@ EventSlot::Ptr MainModule::addSlot(const TQString& name, TQObject* receiver, TQC { EventSlot* event = new EventSlot(name, receiver, slot); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add slot name='%1' signature='%2'").arg(name).arg(slot.data()) ); + krosswarning( TQString("Failed to add slot name='%1' signature='%2'").tqarg(name).tqarg(slot.data()) ); return 0; } return event; @@ -99,7 +99,7 @@ QtObject::Ptr MainModule::addTQObject(TQObject* object, const TQString& name) { QtObject* qtobject = new QtObject(object, name); if(! addChild(name, qtobject)) { - krosswarning( TQString("Failed to add TQObject name='%1'").arg(object->name()) ); + krosswarning( TQString("Failed to add TQObject name='%1'").tqarg(object->name()) ); return 0; } return qtobject; @@ -109,7 +109,7 @@ EventAction::Ptr MainModule::addKAction(KAction* action, const TQString& name) { EventAction* event = new EventAction(name, action); if(! addChild(name, event)) { - krosswarning( TQString("Failed to add KAction name='%1'").arg(action->name()) ); + krosswarning( TQString("Failed to add KAction name='%1'").tqarg(action->name()) ); return 0; } return event; diff --git a/lib/kross/main/manager.cpp b/lib/kross/main/manager.cpp index 156eb2ac..646a8746 100644 --- a/lib/kross/main/manager.cpp +++ b/lib/kross/main/manager.cpp @@ -169,7 +169,7 @@ Interpreter* Manager::getInterpreter(const TQString& interpretername) setException(0); // clear previous exceptions if(! d->interpreterinfos.contains(interpretername)) { - setException( new Exception(i18n("No such interpreter '%1'").arg(interpretername)) ); + setException( new Exception(i18n("No such interpreter '%1'").tqarg(interpretername)) ); return 0; } @@ -206,22 +206,22 @@ Module::Ptr Manager::loadModule(const TQString& modulename) if(module) return module; else - krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").arg(modulename) ); + krossdebug( TQString("Manager::loadModule(%1) =======> Modulename registered, but module is invalid!").tqarg(modulename) ); } KLibLoader* loader = KLibLoader::self(); KLibrary* lib = loader->globalLibrary( modulename.latin1() ); if(! lib) { - krosswarning( TQString("Failed to load module '%1': %2").arg(modulename).arg(loader->lastErrorMessage()) ); + krosswarning( TQString("Failed to load module '%1': %2").tqarg(modulename).tqarg(loader->lastErrorMessage()) ); return 0; } - krossdebug( TQString("Successfully loaded module '%1'").arg(modulename) ); + krossdebug( TQString("Successfully loaded module '%1'").tqarg(modulename) ); def_module_func func; func = (def_module_func) lib->symbol("init_module"); if(! func) { - krosswarning( TQString("Failed to determinate init function in module '%1'").arg(modulename) ); + krosswarning( TQString("Failed to determinate init function in module '%1'").tqarg(modulename) ); return 0; } @@ -235,14 +235,14 @@ Module::Ptr Manager::loadModule(const TQString& modulename) lib->unload(); if(! module) { - krosswarning( TQString("Failed to load module '%1'").arg(modulename) ); + krosswarning( TQString("Failed to load module '%1'").tqarg(modulename) ); return 0; } // Don't remember module cause we like to have freeing it handled by the caller. //d->modules.replace(modulename, module); - //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").arg(modulename).arg(module->toString()) ); + //krossdebug( TQString("Kross::Api::Manager::loadModule modulename='%1' module='%2'").tqarg(modulename).tqarg(module->toString()) ); return module; } diff --git a/lib/kross/main/scriptaction.cpp b/lib/kross/main/scriptaction.cpp index c98cc97c..b658a0b1 100644 --- a/lib/kross/main/scriptaction.cpp +++ b/lib/kross/main/scriptaction.cpp @@ -20,7 +20,7 @@ #include "scriptaction.h" #include "manager.h" -#include <stylesheet.h> +#include <tqstylesheet.h> #include <tqdir.h> #include <tqfile.h> #include <tqfileinfo.h> @@ -152,9 +152,9 @@ ScriptAction::ScriptAction(const TQString& scriptconfigfile, const TQDomElement& if(icon.isNull()) icon = KMimeType::iconForURL( KURL(file) ); if(description.isEmpty()) - description = TQString("%1<br>%2").arg(text.isEmpty() ? name : text).arg(file); + description = TQString("%1<br>%2").tqarg(text.isEmpty() ? name : text).tqarg(file); else - description += TQString("<br>%1").arg(file); + description += TQString("<br>%1").tqarg(file); ScriptContainer::setName(file); } @@ -230,8 +230,8 @@ void ScriptAction::activate() TQString errormessage = Kross::Api::ScriptContainer::getException()->getError(); TQString tracedetails = Kross::Api::ScriptContainer::getException()->getTrace(); d->logs << TQString("<b>%1</b><br>%2") - .arg( TQStyleSheet::escape(errormessage) ) - .arg( TQStyleSheet::escape(tracedetails) ); + .tqarg( TQStyleSheet::escape(errormessage) ) + .tqarg( TQStyleSheet::escape(tracedetails) ); emit failed(errormessage, tracedetails); } else { diff --git a/lib/kross/main/scriptcontainer.cpp b/lib/kross/main/scriptcontainer.cpp index 7f7f980e..a345dd02 100644 --- a/lib/kross/main/scriptcontainer.cpp +++ b/lib/kross/main/scriptcontainer.cpp @@ -87,7 +87,7 @@ ScriptContainer::ScriptContainer(const TQString& name) : MainModule(name) , d( new ScriptContainerPrivate() ) // initialize d-pointer class { - //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").arg(name) ); + //krossdebug( TQString("ScriptContainer::ScriptContainer() Ctor name='%1'").tqarg(name) ); d->script = 0; d->name = name; @@ -95,7 +95,7 @@ ScriptContainer::ScriptContainer(const TQString& name) ScriptContainer::~ScriptContainer() { - //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").arg(d->name) ); + //krossdebug( TQString("ScriptContainer::~ScriptContainer() Dtor name='%1'").tqarg(d->name) ); finalize(); delete d; @@ -164,8 +164,8 @@ bool ScriptContainer::setOption(const TQString name, const TQVariant& value) if(info->hasOption(name)) { d->options.replace(name, value); return true; - } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").arg(name).arg(value.toString()) ); - } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").arg(name).arg(value.toString()) ); + } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such option").tqarg(name).tqarg(value.toString()) ); + } else krosswarning( TQString("Kross::Api::ScriptContainer::setOption(%1, %2): No such interpreterinfo").tqarg(name).tqarg(value.toString()) ); return false; } @@ -244,19 +244,19 @@ bool ScriptContainer::initialize() finalize(); if(! d->scriptfile.isNull()) { - krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").arg(d->scriptfile) ); + krossdebug( TQString("Kross::Api::ScriptContainer::initialize() file=%1").tqarg(d->scriptfile) ); if(d->interpretername.isNull()) { d->interpretername = Manager::scriptManager()->getInterpreternameForFile( d->scriptfile ); if(d->interpretername.isNull()) { - setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").arg(d->scriptfile)) ); + setException( new Exception(i18n("Failed to determinate interpreter for scriptfile '%1'").tqarg(d->scriptfile)) ); return false; } } TQFile f( d->scriptfile ); if(! f.open(IO_ReadOnly)) { - setException( new Exception(i18n("Failed to open scriptfile '%1'").arg(d->scriptfile)) ); + setException( new Exception(i18n("Failed to open scriptfile '%1'").tqarg(d->scriptfile)) ); return false; } d->code = TQString( f.readAll() ); @@ -265,13 +265,13 @@ bool ScriptContainer::initialize() Interpreter* interpreter = Manager::scriptManager()->getInterpreter(d->interpretername); if(! interpreter) { - setException( new Exception(i18n("Unknown interpreter '%1'").arg(d->interpretername)) ); + setException( new Exception(i18n("Unknown interpreter '%1'").tqarg(d->interpretername)) ); return false; } d->script = interpreter->createScript(this); if(! d->script) { - setException( new Exception(i18n("Failed to create script for interpreter '%1'").arg(d->interpretername)) ); + setException( new Exception(i18n("Failed to create script for interpreter '%1'").tqarg(d->interpretername)) ); return false; } if(d->script->hadException()) { diff --git a/lib/kross/main/scriptguiclient.cpp b/lib/kross/main/scriptguiclient.cpp index 88877f5a..b3b29bda 100644 --- a/lib/kross/main/scriptguiclient.cpp +++ b/lib/kross/main/scriptguiclient.cpp @@ -147,10 +147,10 @@ void ScriptGUIClient::reloadInstalledScripts() bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) { - krossdebug( TQString("Install script package: %1").arg(scriptpackagefile) ); + krossdebug( TQString("Install script package: %1").tqarg(scriptpackagefile) ); KTar archive( scriptpackagefile ); if(! archive.open(IO_ReadOnly)) { - KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").arg(scriptpackagefile)); + KMessageBox::sorry(0, i18n("Could not read the package \"%1\".").tqarg(scriptpackagefile)); return false; } @@ -167,17 +167,17 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) if( TQDir(destination).exists() ) { if( KMessageBox::warningContinueCancel(0, - i18n("A script package with the name \"%1\" already exists. Replace this package?" ).arg(packagename), + i18n("A script package with the name \"%1\" already exists. Replace this package?" ).tqarg(packagename), i18n("Replace")) != KMessageBox::Continue ) return false; if(! KIO::NetAccess::del(destination, 0) ) { - KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(destination)); + KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(destination)); return false; } } - krossdebug( TQString("Copy script-package to destination directory: %1").arg(destination) ); + krossdebug( TQString("Copy script-package to destination directory: %1").tqarg(destination) ); const KArchiveDirectory* archivedir = archive.directory(); archivedir->copyTo(destination, true); @@ -188,7 +188,7 @@ bool ScriptGUIClient::installScriptPackage(const TQString& scriptpackagefile) bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath) { if(! KIO::NetAccess::del(scriptpackagepath, 0) ) { - KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").arg(scriptpackagepath)); + KMessageBox::sorry(0, i18n("Could not uninstall this script package. You may not have sufficient permissions to delete the folder \"%1\".").tqarg(scriptpackagepath)); return false; } reloadInstalledScripts(); @@ -197,18 +197,18 @@ bool ScriptGUIClient::uninstallScriptPackage(const TQString& scriptpackagepath) bool ScriptGUIClient::loadScriptConfigFile(const TQString& scriptconfigfile) { - krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").arg(scriptconfigfile) ); + krossdebug( TQString("ScriptGUIClient::loadScriptConfig file=%1").tqarg(scriptconfigfile) ); TQDomDocument domdoc; TQFile file(scriptconfigfile); if(! file.open(IO_ReadOnly)) { - krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").arg(scriptconfigfile) ); + krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to read scriptconfigfile: %1").tqarg(scriptconfigfile) ); return false; } bool ok = domdoc.setContent(&file); file.close(); if(! ok) { - krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").arg(scriptconfigfile) ); + krosswarning( TQString("ScriptGUIClient::loadScriptConfig(): Failed to parse scriptconfigfile: %1").tqarg(scriptconfigfile) ); return false; } @@ -244,7 +244,7 @@ bool ScriptGUIClient::loadScriptConfigDocument(const TQString& scriptconfigfile, else { // else just print a warning and fall through (so, install the action // and don't care any longer of the duplicated name)... - krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").arg(action->name()) ); + krosswarning( TQString("Kross::Api::ScriptGUIClient::loadScriptConfigDocument: There exists already a scriptaction with name \"%1\". Added anyway...").tqarg(action->name()) ); } } installedcollection->attach( action ); @@ -353,7 +353,7 @@ bool ScriptGUIClient::executeScriptFile() bool ScriptGUIClient::executeScriptFile(const TQString& file) { - krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").arg(file) ); + krossdebug( TQString("Kross::Api::ScriptGUIClient::executeScriptFile() file='%1'").tqarg(file) ); ScriptAction::Ptr action = new ScriptAction(file); return executeScriptAction(action); @@ -377,7 +377,7 @@ void ScriptGUIClient::showScriptManager() KDialogBase* dialog = new KDialogBase(d->parent, "", true, i18n("Scripts Manager"), KDialogBase::Close); WdgScriptsManager* wsm = new WdgScriptsManager(this, dialog); dialog->setMainWidget(wsm); - dialog->resize( TQSize(360, 320).expandedTo(dialog->minimumSizeHint()) ); + dialog->resize( TQSize(360, 320).expandedTo(dialog->tqminimumSizeHint()) ); dialog->show(); } diff --git a/lib/kross/main/wdgscriptsmanager.cpp b/lib/kross/main/wdgscriptsmanager.cpp index e521023e..488b7409 100644 --- a/lib/kross/main/wdgscriptsmanager.cpp +++ b/lib/kross/main/wdgscriptsmanager.cpp @@ -93,9 +93,9 @@ class ToolTip : public TQToolTip virtual void maybeTip(const TQPoint& p) { ListItem* item = dynamic_cast<ListItem*>( m_parent->itemAt(p) ); if(item) { - TQRect r( m_parent->itemRect(item) ); + TQRect r( m_parent->tqitemRect(item) ); if(r.isValid() && item->action()) { - tip(r, TQString("<qt>%1</qt>").arg(item->action()->toolTip())); + tip(r, TQString("<qt>%1</qt>").tqarg(item->action()->toolTip())); } } } @@ -287,7 +287,7 @@ void WdgScriptsManager::slotUninstallScript() if( KMessageBox::warningContinueCancel(0, i18n("Uninstall the script package \"%1\" and delete the package's folder \"%2\"?") - .arg(item->action()->text()).arg(packagepath), + .tqarg(item->action()->text()).tqarg(packagepath), i18n("Uninstall")) != KMessageBox::Continue ) { return; @@ -321,7 +321,7 @@ void WdgScriptsManager::slotGetNewScript() { #ifdef KROSS_SUPPORT_NEWSTUFF const TQString appname = KApplication::kApplication()->name(); - const TQString type = TQString("%1/script").arg(appname); + const TQString type = TQString("%1/script").tqarg(appname); if(! d->newstuff) { d->newstuff = new ScriptNewStuff(d->m_scripguiclient, type); @@ -336,7 +336,7 @@ void WdgScriptsManager::slotGetNewScript() TQObject::connect(p, TQT_SIGNAL(providersLoaded(Provider::List*)), d, TQT_SLOT(slotProviders(Provider::List*))); - p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").arg(appname)); + p->load(type, TQString("http://download.kde.org/khotnewstuff/%1scripts-providers.xml").tqarg(appname)); d->exec(); #endif } diff --git a/lib/kross/main/wdgscriptsmanagerbase.ui b/lib/kross/main/wdgscriptsmanagerbase.ui index 1140e848..379fb2db 100644 --- a/lib/kross/main/wdgscriptsmanagerbase.ui +++ b/lib/kross/main/wdgscriptsmanagerbase.ui @@ -20,7 +20,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>0</width> <height>0</height> @@ -56,7 +56,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>layout1</cstring> + <cstring>tqlayout1</cstring> </property> <hbox> <property name="name"> @@ -66,7 +66,7 @@ <property name="name"> <cstring>btnExec</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> @@ -97,7 +97,7 @@ <property name="name"> <cstring>btnLoad</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> @@ -114,7 +114,7 @@ <property name="name"> <cstring>btnUnload</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> @@ -145,7 +145,7 @@ <property name="name"> <cstring>btnInstall</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> @@ -162,7 +162,7 @@ <property name="name"> <cstring>btnUninstall</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> @@ -193,7 +193,7 @@ <property name="name"> <cstring>btnNewStuff</cstring> </property> - <property name="minimumSize"> + <property name="tqminimumSize"> <size> <width>20</width> <height>0</height> diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.hxx index 41648320..900a347b 100644 --- a/lib/kross/python/cxx/Objects.hxx +++ b/lib/kross/python/cxx/Objects.hxx @@ -54,7 +54,7 @@ namespace Py // The purpose of this class is to serve as the most general kind of // Python object, for the purpose of writing C++ extensions in Python // Objects hold a PyObject* which they own. This pointer is always a - // valid pointer to a Python object. In children we must maintain this behavior. + // valid pointer to a Python object. In tqchildren we must maintain this behavior. // // Instructions on how to make your own class MyType descended from Object: // (0) Pick a base class, either Object or perhaps SeqBase<T> or MapBase<T>. @@ -1470,8 +1470,8 @@ namespace Py // Python strings return strings as individual elements. // I'll try having a class Char which is a String of length 1 // - typedef std::basic_string<Py_UNICODE> unicodestring; - extern Py_UNICODE unicode_null_string[1]; + typedef std::basic_string<Py_UNICODE> tqunicodestring; + extern Py_UNICODE tqunicode_null_string[1]; class Char: public Object { @@ -1535,7 +1535,7 @@ namespace Py return *this; } - Char& operator= (const unicodestring& v) + Char& operator= (const tqunicodestring& v) { set(PyUnicode_FromUnicode (const_cast<Py_UNICODE*>(v.data()),1), true); return *this; @@ -1650,7 +1650,7 @@ namespace Py static_cast<int>( v.length() ) ), true ); return *this; } - String& operator= (const unicodestring& v) + String& operator= (const tqunicodestring& v) { set( PyUnicode_FromUnicode( const_cast<Py_UNICODE*>( v.data() ), static_cast<int>( v.length() ) ), true ); @@ -1706,16 +1706,16 @@ namespace Py } } - unicodestring as_unicodestring() const + tqunicodestring as_tqunicodestring() const { if( isUnicode() ) { - return unicodestring( PyUnicode_AS_UNICODE( ptr() ), + return tqunicodestring( PyUnicode_AS_UNICODE( ptr() ), static_cast<size_type>( PyUnicode_GET_SIZE( ptr() ) ) ); } else { - throw TypeError("can only return unicodestring from Unicode object"); + throw TypeError("can only return tqunicodestring from Unicode object"); } } }; diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html index 46d065bb..7213ad70 100644 --- a/lib/kross/python/cxx/PyCXX.html +++ b/lib/kross/python/cxx/PyCXX.html @@ -62,7 +62,7 @@ integrates Python with C++ in these ways: </p> <p>Download PyCXX from <a href="http://sourceforge.net/projects/cxx/">http://sourceforge.net/projects/cxx/</a>.</p> -<p>The distribution layout is:</p> +<p>The distribution tqlayout is:</p> <table> <tr><th>Directory</th><th>Description</th></tr> <tr><td class=code>.</td><td>Makefile for Unix and Windows, Release documentation</td> @@ -303,7 +303,7 @@ returned by such a function, you need to know if the function returns you an <i> or <i>unowned</i> reference. Unowned references are unusual but there are some cases where unowned references are returned.</p> -<p>Usually, <cite>Object</cite> and its children acquire a new reference when constructed from a +<p>Usually, <cite>Object</cite> and its tqchildren acquire a new reference when constructed from a <cite>PyObject *</cite>. This is usually not the right behavior if the reference comes from one of the Python C API calls.</p> @@ -1188,8 +1188,8 @@ sequence.</p> <td class=code>as_std_string() const</td> </tr> <tr> - <td class=code>unicodestring</td> - <td class=code>as_unicodestring() const</td> + <td class=code>tqunicodestring</td> + <td class=code>as_tqunicodestring() const</td> </tr> </table> @@ -1571,7 +1571,7 @@ converted to a standard string which is passed to std::ostream& operator< <p>The Python exception facility and the C++ exception facility can be merged via the use of try/catch blocks in the bodies of extension objects and module functions.</p> -<h3>Class Exception and its children</h3> +<h3>Class Exception and its tqchildren</h3> <p>A set of classes is provided. Each is derived from class Exception, and represents a particular sort of Python exception, such as IndexError, RuntimeError, ValueError. Each of @@ -1612,7 +1612,7 @@ classes are shown here.</p> </tr> <tr> <td class=code></td> - <td>Constructors for other children of class Exception</td> + <td>Constructors for other tqchildren of class Exception</td> </tr> <tr> <td class=code> </td> diff --git a/lib/kross/python/cxx/cxxsupport.cxx b/lib/kross/python/cxx/cxxsupport.cxx index 61329b60..b7bcaa0a 100644 --- a/lib/kross/python/cxx/cxxsupport.cxx +++ b/lib/kross/python/cxx/cxxsupport.cxx @@ -6,7 +6,7 @@ #include "Objects.hxx" namespace Py { -Py_UNICODE unicode_null_string[1] = { 0 }; +Py_UNICODE tqunicode_null_string[1] = { 0 }; Type Object::type () const { diff --git a/lib/kross/python/pythonextension.cpp b/lib/kross/python/pythonextension.cpp index dbbe9bf6..f13cf93a 100644 --- a/lib/kross/python/pythonextension.cpp +++ b/lib/kross/python/pythonextension.cpp @@ -31,7 +31,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object) , m_object(object) { #ifdef KROSS_PYTHON_EXTENSION_CTOR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::Constructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) ); #endif behaviors().name("KrossPythonExtension"); @@ -55,7 +55,7 @@ PythonExtension::PythonExtension(Kross::Api::Object::Ptr object) PythonExtension::~PythonExtension() { #ifdef KROSS_PYTHON_EXTENSION_DTOR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").arg(m_object->getName()).arg(m_object->getClassName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::Destructor objectname='%1' objectclass='%2'").tqarg(m_object->getName()).tqarg(m_object->getClassName()) ); #endif delete m_proxymethod; } @@ -77,7 +77,7 @@ Py::Object PythonExtension::repr() Py::Object PythonExtension::getattr(const char* n) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").arg(n) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1'").tqarg(n) ); #endif if(n[0] == '_') { @@ -86,7 +86,7 @@ Py::Object PythonExtension::getattr(const char* n) TQStringList calls = m_object->getCalls(); for(TQStringList::Iterator it = calls.begin(); it != calls.end(); ++it) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").arg(n).arg(*it) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' callable='%2'").tqarg(n).tqarg(*it) ); #endif methods.append(Py::String( (*it).latin1() )); } @@ -97,11 +97,11 @@ Py::Object PythonExtension::getattr(const char* n) Py::List members; Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(m_object.data()); if(callable) { - TQMap<TQString, Kross::Api::Object::Ptr> children = callable->getChildren(); - TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( children.begin() ); - for(; it != children.end(); ++it) { + TQMap<TQString, Kross::Api::Object::Ptr> tqchildren = callable->getChildren(); + TQMap<TQString, Kross::Api::Object::Ptr>::Iterator it( tqchildren.begin() ); + for(; it != tqchildren.end(); ++it) { #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").arg(n).arg(it.key()) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr n='%1' child='%2'").tqarg(n).tqarg(it.key()) ); #endif members.append(Py::String( it.key().latin1() )); } @@ -109,11 +109,11 @@ Py::Object PythonExtension::getattr(const char* n) return members; } - //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").arg(n) ); return Py::None(); } - //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").arg(n) ); return Py::None(); } + //if(n == "__dict__") { krosswarning( TQString("PythonExtension::getattr(%1) __dict__").tqarg(n) ); return Py::None(); } + //if(n == "__class__") { krosswarning( TQString("PythonExtension::getattr(%1) __class__").tqarg(n) ); return Py::None(); } #ifdef KROSS_PYTHON_EXTENSION_GETATTR_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").arg(n) ); + krossdebug( TQString("Kross::Python::PythonExtension::getattr name='%1' is a internal name.").tqarg(n) ); #endif return Py::PythonExtension<PythonExtension>::getattr_methods(n); } @@ -130,7 +130,7 @@ Py::Object PythonExtension::getattr(const char* n) Py::Object PythonExtension::getattr_methods(const char* n) { #ifdef KROSS_PYTHON_EXTENSION_GETATTRMETHOD_DEBUG - krossdebug( TQString("PythonExtension::getattr_methods name=%1").arg(n) ); + krossdebug( TQString("PythonExtension::getattr_methods name=%1").tqarg(n) ); #endif return Py::PythonExtension<PythonExtension>::getattr_methods(n); } @@ -138,7 +138,7 @@ Py::Object PythonExtension::getattr_methods(const char* n) int PythonExtension::setattr(const char* name, const Py::Object& value) { #ifdef KROSS_PYTHON_EXTENSION_SETATTR_DEBUG - krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").arg(name).arg(value.as_string().c_str()) ); + krossdebug( TQString("PythonExtension::setattr name=%1 value=%2").tqarg(name).tqarg(value.as_string().c_str()) ); #endif return Py::PythonExtension<PythonExtension>::setattr(name, value); } @@ -185,13 +185,13 @@ Kross::Api::Dict::Ptr PythonExtension::toObject(const Py::Dict& dict) Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object) { #ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").arg(object.as_string().c_str()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) object='%1'").tqarg(object.as_string().c_str()) ); #endif if(object == Py::None()) return 0; PyTypeObject *type = (PyTypeObject*) object.type().ptr(); #ifdef KROSS_PYTHON_EXTENSION_TOOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").arg(type->tp_name) ); + krossdebug( TQString("Kross::Python::PythonExtension::toObject(Py::Object) type='%1'").tqarg(type->tp_name) ); #endif if(type == &PyInt_Type) return new Kross::Api::Variant(int(Py::Int(object))); @@ -206,7 +206,7 @@ Kross::Api::Object::Ptr PythonExtension::toObject(const Py::Object& object) #ifdef Py_USING_UNICODE /* TODO if(type == &PyUnicode_Type) { - Py::unicodestring u = Py::String(object).as_unicodestring(); + Py::tqunicodestring u = Py::String(object).as_tqunicodestring(); std::string s; std::copy(u.begin(), u.end(), std::back_inserter(s)); return new Kross::Api::Variant(s.c_str()); @@ -287,7 +287,7 @@ const Py::List PythonExtension::toPyObject(const TQValueList<TQVariant>& list) const Py::Object PythonExtension::toPyObject(const TQVariant& variant) { #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").arg(variant.typeName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) typename='%1'").tqarg(variant.typeName()) ); #endif switch(variant.type()) { @@ -331,7 +331,7 @@ const Py::Object PythonExtension::toPyObject(const TQVariant& variant) } break; default: { - krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").arg(variant.typeName()) ); + krosswarning( TQString("Kross::Python::PythonExtension::toPyObject(TQVariant) Not possible to convert the TQVariant type '%1' to a Py::Object.").tqarg(variant.typeName()) ); return Py::None(); } } @@ -350,7 +350,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) if(classname == "Kross::Api::Variant") { TQVariant v = static_cast<Kross::Api::Variant*>( object.data() )->getValue(); #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").arg(v.toString()) ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyObject(Kross::Api::Object) is Kross::Api::Variant %1").tqarg(v.toString()) ); #endif return toPyObject(v); } @@ -382,7 +382,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) } #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").arg(object->getClassName()) ); + krossdebug( TQString("Trying to handle PythonExtension::toPyObject(%1) as PythonExtension").tqarg(object->getClassName()) ); #endif return Py::asObject( new PythonExtension(object) ); } @@ -390,7 +390,7 @@ const Py::Object PythonExtension::toPyObject(Kross::Api::Object::Ptr object) const Py::Tuple PythonExtension::toPyTuple(Kross::Api::List::Ptr list) { #ifdef KROSS_PYTHON_EXTENSION_TOPYOBJECT_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").arg(list ? list->getName() : "NULL") ); + krossdebug( TQString("Kross::Python::PythonExtension::toPyTuple(Kross::Api::List) name='%1'").tqarg(list ? list->getName() : "NULL") ); #endif uint count = list ? list->count() : 0; Py::Tuple tuple(count); @@ -409,20 +409,20 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject Kross::Api::List::Ptr arguments = toObject( Py::Tuple(args) ); #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").arg(methodname).arg(arguments->toString()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' arguments='%2'").tqarg(methodname).tqarg(arguments->toString()) ); #endif Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(self->m_object.data()); if(callable && callable->hasChild(methodname)) { #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").arg(methodname).arg(self->m_object->getName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler methodname='%1' is a child object of '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) ); #endif Py::Object result = toPyObject( callable->getChild(methodname)->call(TQString(), arguments) ); result.increment_reference_count(); return result.ptr(); } #ifdef KROSS_PYTHON_EXTENSION_CALL_DEBUG - krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").arg(methodname).arg(self->m_object->getName()) ); + krossdebug( TQString("Kross::Python::PythonExtension::proxyhandler try to call function with methodname '%1' in object '%2'.").tqarg(methodname).tqarg(self->m_object->getName()) ); #endif Py::Object result = toPyObject( self->m_object->call(methodname, arguments) ); result.increment_reference_count(); @@ -430,12 +430,12 @@ PyObject* PythonExtension::proxyhandler(PyObject *_self_and_name_tuple, PyObject } catch(Py::Exception& e) { const TQString err = Py::value(e).as_string().c_str(); - krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) ); + krosswarning( TQString("Py::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) ); //throw e; } catch(Kross::Api::Exception::Ptr e) { const TQString err = e->toString(); - krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").arg(err) ); + krosswarning( TQString("Kross::Api::Exception in Kross::Python::PythonExtension::proxyhandler %1").tqarg(err) ); // Don't throw here cause it will end in a crash deep in python. The // error is already handled anyway. //throw Py::Exception( (char*) e->toString().latin1() ); diff --git a/lib/kross/python/pythoninterpreter.cpp b/lib/kross/python/pythoninterpreter.cpp index ded5dbc9..23f4b8fb 100644 --- a/lib/kross/python/pythoninterpreter.cpp +++ b/lib/kross/python/pythoninterpreter.cpp @@ -122,14 +122,14 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info) // Set the extended sys.path. PySys_SetPath( (char*) path.latin1() ); - krossdebug(TQString("Python ProgramName: %1").arg(Py_GetProgramName())); - krossdebug(TQString("Python ProgramFullPath: %1").arg(Py_GetProgramFullPath())); - krossdebug(TQString("Python Version: %1").arg(Py_GetVersion())); - krossdebug(TQString("Python Platform: %1").arg(Py_GetPlatform())); - krossdebug(TQString("Python Prefix: %1").arg(Py_GetPrefix())); - krossdebug(TQString("Python ExecPrefix: %1").arg(Py_GetExecPrefix())); - krossdebug(TQString("Python Path: %1").arg(Py_GetPath())); - krossdebug(TQString("Python System Path: %1").arg(path)); + krossdebug(TQString("Python ProgramName: %1").tqarg(Py_GetProgramName())); + krossdebug(TQString("Python ProgramFullPath: %1").tqarg(Py_GetProgramFullPath())); + krossdebug(TQString("Python Version: %1").tqarg(Py_GetVersion())); + krossdebug(TQString("Python Platform: %1").tqarg(Py_GetPlatform())); + krossdebug(TQString("Python Prefix: %1").tqarg(Py_GetPrefix())); + krossdebug(TQString("Python ExecPrefix: %1").tqarg(Py_GetExecPrefix())); + krossdebug(TQString("Python Path: %1").tqarg(Py_GetPath())); + krossdebug(TQString("Python System Path: %1").tqarg(path)); // Initialize the main module. d->mainmodule = new PythonModule(this); @@ -179,7 +179,7 @@ PythonInterpreter::PythonInterpreter(Kross::Api::InterpreterInfo* info) PyObject* pyrun = PyRun_String(s.latin1(), Py_file_input, moduledict.ptr(), moduledict.ptr()); if(! pyrun) { Py::Object errobj = Py::value(Py::Exception()); // get last error - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").arg(errobj.as_string().c_str())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to prepare the __main__ module: %1").tqarg(errobj.as_string().c_str())) ); } Py_XDECREF(pyrun); // free the reference. diff --git a/lib/kross/python/pythonmodule.cpp b/lib/kross/python/pythonmodule.cpp index 48131bb8..24b43159 100644 --- a/lib/kross/python/pythonmodule.cpp +++ b/lib/kross/python/pythonmodule.cpp @@ -65,7 +65,7 @@ PythonModule::PythonModule(PythonInterpreter* interpreter) PythonModule::~PythonModule() { #ifdef KROSS_PYTHON_MODULE_DEBUG - krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").arg(name().c_str()) ); + krossdebug( TQString("Kross::Python::PythonModule::Destructor name='%1'").tqarg(name().c_str()) ); #endif delete d; @@ -82,16 +82,16 @@ Py::Object PythonModule::import(const Py::Tuple& args) TQString modname = args[0].as_string().c_str(); if(modname.startsWith("kross")) { #ifdef KROSS_PYTHON_MODULE_DEBUG - krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").arg(modname) ); + krossdebug( TQString("Kross::Python::PythonModule::import() module=%1").tqarg(modname) ); #endif if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); + krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); } else { Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname); if(module) return PythonExtension::toPyObject( Kross::Api::Object::Ptr(module) ); - krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) ); + krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) ); } } diff --git a/lib/kross/python/pythonobject.cpp b/lib/kross/python/pythonobject.cpp index e72ad0bb..9689d222 100644 --- a/lib/kross/python/pythonobject.cpp +++ b/lib/kross/python/pythonobject.cpp @@ -46,7 +46,7 @@ PythonObject::PythonObject(const Py::Object& object) if(o.isSequence()) t += "isSequence "; if(o.isTrue()) t += "isTrue "; if(o.isInstance()) t += "isInstance "; - krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").arg( (*i).str().as_string().c_str() ).arg(t) ); + krossdebug( TQString("PythonObject::PythonObject() method '%1' (%2)").tqarg( (*i).str().as_string().c_str() ).tqarg(t) ); if(o.isCallable()) m_calls.append( (*i).str().as_string().c_str() ); @@ -64,7 +64,7 @@ const TQString PythonObject::getClassName() const Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::List::Ptr arguments) { - krossdebug( TQString("PythonObject::call(%1)").arg(name) ); + krossdebug( TQString("PythonObject::call(%1)").tqarg(name) ); if(m_pyobject.isInstance()) { //if(! m_calls.contains(n)) throw ... @@ -72,11 +72,11 @@ Kross::Api::Object::Ptr PythonObject::call(const TQString& name, Kross::Api::Lis PyObject* r = PyObject_CallMethod(m_pyobject.ptr(), (char*) name.latin1(), 0); if(! r) { //FIXME happens too if e.g. number of arguments doesn't match !!! Py::Object errobj = Py::value(Py::Exception()); // get last error - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").arg(name).arg(errobj.as_string().c_str())) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to call method '%1': %2").tqarg(name).tqarg(errobj.as_string().c_str())) ); } Py::Object result(r, true); - //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").arg(name).arg(result.as_string().c_str()) ); + //krossdebug( TQString("PythonObject::call(%1) call return value = '%2'").tqarg(name).tqarg(result.as_string().c_str()) ); return PythonExtension::toObject(result); } /*TODO??? ELSE create class instance for class-definitions??? diff --git a/lib/kross/python/pythonscript.cpp b/lib/kross/python/pythonscript.cpp index 8887e13d..2329a1d1 100644 --- a/lib/kross/python/pythonscript.cpp +++ b/lib/kross/python/pythonscript.cpp @@ -88,7 +88,7 @@ void PythonScript::initialize() try { if(m_scriptcontainer->getCode().isNull()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").arg( m_scriptcontainer->getName() )) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Invalid scripting code for script '%1'").tqarg( m_scriptcontainer->getName() )) ); if(m_scriptcontainer->getName().isNull()) throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Name for the script is invalid!")) ); @@ -96,10 +96,10 @@ void PythonScript::initialize() PyObject* pymod = PyModule_New( (char*) m_scriptcontainer->getName().latin1() ); d->m_module = new Py::Module(pymod, true); if(! d->m_module) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").arg( m_scriptcontainer->getName() )) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize local module context for script '%1'").tqarg( m_scriptcontainer->getName() )) ); #ifdef KROSS_PYTHON_SCRIPT_INIT_DEBUG - krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) ); + krossdebug( TQString("PythonScript::initialize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) ); #endif // Set the "self" variable to point to the ScriptContainer @@ -131,7 +131,7 @@ void PythonScript::initialize() PyObject* code = 0; bool restricted = m_scriptcontainer->getOption("restricted", TQVariant(false,0), true).toBool(); - krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").arg(m_scriptcontainer->getName()).arg(restricted) ); + krossdebug( TQString("PythonScript::initialize() name=%1 restricted=%2").tqarg(m_scriptcontainer->getName()).tqarg(restricted) ); if(restricted) { // Use the RestrictedPython module wrapped by the PythonSecurity class. @@ -160,7 +160,7 @@ void PythonScript::initialize() } catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").arg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to compile python code: %1").tqarg(err) ); e.clear(); // exception is handled. clear it now. throw exception; } @@ -170,7 +170,7 @@ void PythonScript::finalize() { #ifdef KROSS_PYTHON_SCRIPT_FINALIZE_DEBUG if(d->m_module) - krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").arg(d->m_module->as_string().c_str()).arg(d->m_module->reference_count()) ); + krossdebug( TQString("PythonScript::finalize() module='%1' refcount='%2'").tqarg(d->m_module->as_string().c_str()).tqarg(d->m_module->reference_count()) ); #endif delete d->m_module; d->m_module = 0; @@ -205,7 +205,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error) catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); // exception is handled. clear it now. - krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").arg(err) ); + krosswarning( TQString("Kross::Python::PythonScript::toException() Failed to fetch a traceback: %1").tqarg(err) ); } PyObject *next; @@ -226,7 +226,7 @@ Kross::Api::Exception::Ptr PythonScript::toException(const TQString& error) //const char* filename = PyString_AsString(frame->f_code->co_filename); //const char* name = PyString_AsString(frame->f_code->co_name); - //errorlist.append( TQString("%1#%2: \"%3\"").arg(filename).arg(lineno).arg(name) ); + //errorlist.append( TQString("%1#%2: \"%3\"").tqarg(filename).tqarg(lineno).tqarg(name) ); next = PyObject_GetAttrString(traceback, "tb_next"); Py_DECREF(traceback); @@ -318,20 +318,20 @@ Kross::Api::Object::Ptr PythonScript::execute() Py::Object result(pyresult, true); #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() result=%1").arg(result.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() result=%1").tqarg(result.as_string().c_str()) ); #endif for(Py::Dict::iterator it = moduledict.begin(); it != moduledict.end(); ++it) { Py::Dict::value_type vt(*it); if(PyClass_Check( vt.second.ptr() )) { #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() class '%1' added.").arg(vt.first.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() class '%1' added.").tqarg(vt.first.as_string().c_str()) ); #endif d->m_classes.append( vt.first.as_string().c_str() ); } else if(vt.second.isCallable()) { #ifdef KROSS_PYTHON_SCRIPT_EXEC_DEBUG - krossdebug( TQString("PythonScript::execute() function '%1' added.").arg(vt.first.as_string().c_str()) ); + krossdebug( TQString("PythonScript::execute() function '%1' added.").tqarg(vt.first.as_string().c_str()) ); #endif d->m_functions.append( vt.first.as_string().c_str() ); } @@ -347,13 +347,13 @@ Kross::Api::Object::Ptr PythonScript::execute() errobj = Py::type(e); TQString err = errobj.as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) ); e.clear(); // exception is handled. clear it now. setException( exception ); } catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); - Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").arg(err) ); + Kross::Api::Exception::Ptr exception = toException( TQString("Failed to execute python code: %1").tqarg(err) ); e.clear(); // exception is handled. clear it now. setException( exception ); } @@ -369,8 +369,8 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: { #ifdef KROSS_PYTHON_SCRIPT_CALLFUNC_DEBUG krossdebug( TQString("PythonScript::callFunction(%1, %2)") - .arg(name) - .arg(args ? TQString::number(args->count()) : TQString("NULL")) ); + .tqarg(name) + .tqarg(args ? TQString::number(args->count()) : TQString("NULL")) ); #endif if(hadException()) return 0; // abort if we had an unresolved exception. @@ -387,7 +387,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: PyObject* func = PyDict_GetItemString(moduledict.ptr(), name.latin1()); if( (! d->m_functions.contains(name)) || (! func) ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg(name)) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. @@ -402,7 +402,7 @@ Kross::Api::Object::Ptr PythonScript::callFunction(const TQString& name, Kross:: catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); // exception is handled. clear it now. - setException( new Kross::Api::Exception(TQString("Python Exception: %1").arg(err)) ); + setException( new Kross::Api::Exception(TQString("Python Exception: %1").tqarg(err)) ); } catch(Kross::Api::Exception::Ptr e) { setException(e); @@ -433,16 +433,16 @@ Kross::Api::Object::Ptr PythonScript::classInstance(const TQString& name) // Try to determinate the class. PyObject* pyclass = PyDict_GetItemString(moduledict.ptr(), name.latin1()); if( (! d->m_classes.contains(name)) || (! pyclass) ) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").arg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such class '%1'.").tqarg(name)) ); PyObject *pyobj = PyInstance_New(pyclass, 0, 0);//aclarg, 0); if(! pyobj) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").arg(name)) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to create instance of class '%1'.").tqarg(name)) ); Py::Object classobject(pyobj, true); #ifdef KROSS_PYTHON_SCRIPT_CLASSINSTANCE_DEBUG - krossdebug( TQString("PythonScript::classInstance() inst='%1'").arg(classobject.as_string().c_str()) ); + krossdebug( TQString("PythonScript::classInstance() inst='%1'").tqarg(classobject.as_string().c_str()) ); #endif return PythonExtension::toObject(classobject); } diff --git a/lib/kross/python/pythonsecurity.cpp b/lib/kross/python/pythonsecurity.cpp index 9a7712cb..941ed0c6 100644 --- a/lib/kross/python/pythonsecurity.cpp +++ b/lib/kross/python/pythonsecurity.cpp @@ -90,7 +90,7 @@ void PythonSecurity::initRestrictedPython() catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").arg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Failed to initialize PythonSecurity module: %1").tqarg(err) ) ); } } @@ -115,12 +115,12 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr PyObject* func = PyDict_GetItemString(m_pymodule->getDict().ptr(), "compile_restricted"); if(! func) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").arg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("No such function '%1'.").tqarg("compile_restricted")) ); Py::Callable funcobject(func, true); // the funcobject takes care of freeing our func pyobject. if(! funcobject.isCallable()) - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").arg("compile_restricted")) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' is not callable.").tqarg("compile_restricted")) ); Py::Tuple args(3); args[0] = Py::String(source.utf8()); @@ -140,17 +140,17 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr /* Py::List ml = mainmoduledict; for(Py::List::size_type mi = 0; mi < ml.length(); ++mi) { - krossdebug( TQString("dir() = %1").arg( ml[mi].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").tqarg( ml[mi].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(ml[mi]).dir().as_string().c_str() ) ); } */ Py::Object code(pycode); - krossdebug( TQString("%1 callable=%2").arg(code.as_string().c_str()).arg(PyCallable_Check(code.ptr())) ); + krossdebug( TQString("%1 callable=%2").tqarg(code.as_string().c_str()).tqarg(PyCallable_Check(code.ptr())) ); Py::List l = code.dir(); for(Py::List::size_type i = 0; i < l.length(); ++i) { - krossdebug( TQString("dir() = %1").arg( l[i].str().as_string().c_str() ) ); - //krossdebug( TQString("dir().dir() = %1").arg( Py::Object(l[i]).dir().as_string().c_str() ) ); + krossdebug( TQString("dir() = %1").tqarg( l[i].str().as_string().c_str() ) ); + //krossdebug( TQString("dir().dir() = %1").tqarg( Py::Object(l[i]).dir().as_string().c_str() ) ); } return pycode; @@ -158,7 +158,7 @@ PyObject* PythonSecurity::compile_restricted(const TQString& source, const TQStr catch(Py::Exception& e) { TQString err = Py::value(e).as_string().c_str(); e.clear(); - throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").arg("compile_restricted").arg(err) ) ); + throw Kross::Api::Exception::Ptr( new Kross::Api::Exception(TQString("Function '%1' failed with python exception: %2").tqarg("compile_restricted").tqarg(err) ) ); } } diff --git a/lib/kross/python/scripts/RestrictedPython/Guards.py b/lib/kross/python/scripts/RestrictedPython/Guards.py index 4fbdcad1..295ba791 100644 --- a/lib/kross/python/scripts/RestrictedPython/Guards.py +++ b/lib/kross/python/scripts/RestrictedPython/Guards.py @@ -24,7 +24,7 @@ for name in ['False', 'None', 'True', 'abs', 'basestring', 'bool', 'callable', 'chr', 'cmp', 'complex', 'divmod', 'float', 'hash', 'hex', 'id', 'int', 'isinstance', 'issubclass', 'len', 'long', 'oct', 'ord', 'pow', 'range', 'repr', 'round', - 'str', 'tuple', 'unichr', 'unicode', 'xrange', 'zip']: + 'str', 'tuple', 'unichr', 'tqunicode', 'xrange', 'zip']: safe_builtins[name] = __builtins__[name] diff --git a/lib/kross/python/scripts/gui.py b/lib/kross/python/scripts/gui.py index 9b8e0f8c..7461447a 100755 --- a/lib/kross/python/scripts/gui.py +++ b/lib/kross/python/scripts/gui.py @@ -190,9 +190,9 @@ class QtDialog: def __init__(self, parent = None, name = None, modal = 0, fl = 0): qt.QDialog.__init__(self, parent, name, modal, fl) qt.QDialog.accept = self.accept - self.layout = qt.QVBoxLayout(self) - self.layout.setSpacing(6) - self.layout.setMargin(11) + self.tqlayout = qt.QVBoxLayout(self) + self.tqlayout.setSpacing(6) + self.tqlayout.setMargin(11) class Label(qt.QLabel): def __init__(self, dialog, parent, caption): @@ -323,7 +323,7 @@ class QtDialog: self.widget = qt.QVBox(self.dialog) self.widget.setSpacing(6) - self.dialog.layout.addWidget(self.widget) + self.dialog.tqlayout.addWidget(self.widget) self.Frame = Frame self.Label = Label diff --git a/lib/kross/ruby/rubyextension.cpp b/lib/kross/ruby/rubyextension.cpp index 98474bf6..6c2cb40f 100644 --- a/lib/kross/ruby/rubyextension.cpp +++ b/lib/kross/ruby/rubyextension.cpp @@ -66,7 +66,7 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU TQString funcname = rb_id2name(SYM2ID(argv[0])); TQValueList<Api::Object::Ptr> argsList; #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").arg(funcname).arg(argc-1)); + krossdebug(TQString("Building arguments list for function: %1 there are %2 arguments.").tqarg(funcname).tqarg(argc-1)); #endif for(int i = 1; i < argc; i++) { @@ -79,13 +79,13 @@ VALUE RubyExtension::call_method( Kross::Api::Object::Ptr object, int argc, VALU Kross::Api::Callable* callable = dynamic_cast<Kross::Api::Callable*>(object.data()); if(callable && callable->hasChild(funcname)) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").arg(funcname).arg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing name='%1' is a child object of '%2'.").tqarg(funcname).tqarg(object->getName()) ); #endif result = callable->getChild(funcname)->call(TQString(), new Api::List(argsList)); } else { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").arg(funcname).arg(object->getName()) ); + krossdebug( TQString("Kross::Ruby::RubyExtension::method_missing try to call function with name '%1' in object '%2'.").tqarg(funcname).tqarg(object->getName()) ); #endif result = object->call(funcname, new Api::List(argsList)); } @@ -184,7 +184,7 @@ VALUE RubyExtension::convertFromException(Kross::Api::Exception::Ptr exc) Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) { #ifdef KROSS_RUBY_EXTENSION_DEBUG - krossdebug(TQString("RubyExtension::toObject of type %1").arg(TYPE(value))); + krossdebug(TQString("RubyExtension::toObject of type %1").tqarg(TYPE(value))); #endif switch( TYPE( value ) ) { @@ -251,7 +251,7 @@ Kross::Api::Object::Ptr RubyExtension::toObject(VALUE value) case T_MODULE: case T_ICLASS: case T_CLASS: - krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").arg(TYPE(value))); + krosswarning(TQString("This ruby type '%1' cannot be converted to a Kross::Api::Object").tqarg(TYPE(value))); default: case T_NIL: return 0; @@ -329,7 +329,7 @@ VALUE RubyExtension::toVALUE(const TQVariant& variant) case TQVariant::ULongLong: return UINT2NUM((unsigned long)variant.toULongLong()); default: { - krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").arg(variant.typeName()) ); + krosswarning( TQString("Kross::Ruby::RubyExtension::toVALUE(TQVariant) Not possible to convert the TQVariant type '%1' to a VALUE.").tqarg(variant.typeName()) ); return Qundef; } } diff --git a/lib/kross/ruby/rubyinterpreter.cpp b/lib/kross/ruby/rubyinterpreter.cpp index 6af8ecbe..4a4df32f 100644 --- a/lib/kross/ruby/rubyinterpreter.cpp +++ b/lib/kross/ruby/rubyinterpreter.cpp @@ -121,9 +121,9 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) #endif TQString modname = StringValuePtr(name); if(modname.startsWith("kross")) { - krossdebug( TQString("RubyInterpreter::require() module=%1").arg(modname) ); + krossdebug( TQString("RubyInterpreter::require() module=%1").tqarg(modname) ); if( modname.find( TQRegExp("[^a-zA-Z0-9\\_\\-]") ) >= 0 ) { - krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").arg(modname) ); + krosswarning( TQString("Denied import of Kross module '%1' cause of untrusted chars.").tqarg(modname) ); } else { Kross::Api::Module::Ptr module = Kross::Api::Manager::scriptManager()->loadModule(modname); @@ -136,7 +136,7 @@ VALUE RubyInterpreter::require (VALUE obj, VALUE name) // rb_define_variable( ("$" + modname).ascii(), & RubyInterpreter::d->m_modules.insert( mStrVALUE::value_type( modname, rm) ).first->second ); return Qtrue; } - krosswarning( TQString("Loading of Kross module '%1' failed.").arg(modname) ); + krosswarning( TQString("Loading of Kross module '%1' failed.").tqarg(modname) ); } } else { return rb_f_require(obj, name); diff --git a/lib/kross/ruby/rubymodule.cpp b/lib/kross/ruby/rubymodule.cpp index 948a10ee..73012b89 100644 --- a/lib/kross/ruby/rubymodule.cpp +++ b/lib/kross/ruby/rubymodule.cpp @@ -37,7 +37,7 @@ RubyModule::RubyModule(Kross::Api::Module::Ptr mod, TQString modname) : d(new Ru { d->m_module = mod; modname = modname.left(1).upper() + modname.right(modname.length() - 1 ); - krossdebug(TQString("Module: %1").arg(modname)); + krossdebug(TQString("Module: %1").tqarg(modname)); VALUE rmodule = rb_define_module(modname.ascii()); rb_define_module_function(rmodule,"method_missing", (VALUE (*)(...))RubyModule::method_missing, -1); VALUE rm = RubyExtension::toVALUE( mod.data() ); @@ -52,7 +52,7 @@ VALUE RubyModule::method_missing(int argc, VALUE *argv, VALUE self) { #ifdef KROSS_RUBY_MODULE_DEBUG TQString funcname = rb_id2name(SYM2ID(argv[0])); - krossdebug(TQString("Function %1 missing in a module").arg(funcname)); + krossdebug(TQString("Function %1 missing in a module").tqarg(funcname)); #endif VALUE rubyObjectModule = rb_funcall( self, rb_intern("const_get"), 1, ID2SYM(rb_intern("MODULEOBJ")) ); diff --git a/lib/kross/ruby/rubyscript.cpp b/lib/kross/ruby/rubyscript.cpp index 370d4aa7..dc0fbb16 100644 --- a/lib/kross/ruby/rubyscript.cpp +++ b/lib/kross/ruby/rubyscript.cpp @@ -87,7 +87,7 @@ void RubyScript::compile() #ifdef KROSS_RUBY_SCRIPT_DEBUG krossdebug("Compilation has failed"); #endif - setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to compile ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error d->m_compile = 0; } #ifdef KROSS_RUBY_SCRIPT_DEBUG @@ -133,7 +133,7 @@ Kross::Api::Object::Ptr RubyScript::execute() #endif setException( RubyExtension::convertToException( ruby_errinfo ) ); } else { - setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").arg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error + setException( new Kross::Api::Exception(TQString("Failed to execute ruby code: %1").tqarg(STR2CSTR( rb_obj_as_string(ruby_errinfo) )), 0) ); // TODO: get the error } } diff --git a/lib/kross/runner/main.cpp b/lib/kross/runner/main.cpp index 1093a47b..570e2610 100644 --- a/lib/kross/runner/main.cpp +++ b/lib/kross/runner/main.cpp @@ -82,13 +82,13 @@ int runScriptFile(const TQString& scriptfile) // We had an exception. TQString errormessage = scriptcontainer->getException()->getError(); TQString tracedetails = scriptcontainer->getException()->getTrace(); - std::cerr << TQString("%2\n%1").arg(tracedetails).arg(errormessage).latin1() << std::endl; + std::cerr << TQString("%2\n%1").tqarg(tracedetails).tqarg(errormessage).latin1() << std::endl; return ERROR_EXCEPTION; } } catch(Kross::Api::Exception::Ptr e) { // Normaly that shouldn't be the case... - std::cerr << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl; + std::cerr << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl; return ERROR_UNHALDEDEXCEPTION; } return ERROR_OK; diff --git a/lib/kross/test/main.cpp b/lib/kross/test/main.cpp index 7f304ba6..42198201 100644 --- a/lib/kross/test/main.cpp +++ b/lib/kross/test/main.cpp @@ -107,7 +107,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) if(testclassinstance) { TQValueList<Kross::Api::Object*> ll; Kross::Api::Object* instancecallresult = testclassinstance->call("testClassFunction1", Kross::Api::List::create(ll)); - //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").arg( instancecallresult.toString() ) ); + //krossdebug( TQString("testClass.testClassFunction1 returnvalue => '%1'").tqarg( instancecallresult.toString() ) ); } */ @@ -121,7 +121,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) */ } catch(Kross::Api::Exception::Ptr e) { - std::cout << TQString("EXCEPTION %1").arg(e->toString()).latin1() << std::endl; + std::cout << TQString("EXCEPTION %1").tqarg(e->toString()).latin1() << std::endl; } /*TESTCASE @@ -132,7 +132,7 @@ void runInterpreter(const TQString& interpretername, const TQString& scriptcode) sc2->execute(); } catch(Kross::Api::Exception& e) { - krossdebug( TQString("EXCEPTION type='%1' description='%2'").arg(e.type()).arg(e.description()) ); + krossdebug( TQString("EXCEPTION type='%1' description='%2'").tqarg(e.type()).tqarg(e.description()) ); } //delete sc2; */ @@ -181,7 +181,7 @@ int main(int argc, char **argv) } } else { - Kross::krosswarning( TQString("Failed to load scriptfile: %1").arg(scriptfilename) ); + Kross::krosswarning( TQString("Failed to load scriptfile: %1").tqarg(scriptfilename) ); result = -1; } diff --git a/lib/kross/test/testcase.py b/lib/kross/test/testcase.py index f1540201..9fa58bc2 100644 --- a/lib/kross/test/testcase.py +++ b/lib/kross/test/testcase.py @@ -79,8 +79,8 @@ class TestPlugin(unittest.TestCase): self.assert_( self.pluginobject1.stringfunc(" Another \n\r Test! $%&\"") == " Another \n\r Test! $%&\"" ) #TODO - #self.assert_( self.pluginobject1.stringfunc( unicode(" Unicode test ") ) == " Unicode test " ) - #self.assert_( self.pluginobject1.stringfunc(unicode(" Another Test! ")) == unicode(" Another Test! ") ) + #self.assert_( self.pluginobject1.stringfunc( tqunicode(" Unicode test ") ) == " Unicode test " ) + #self.assert_( self.pluginobject1.stringfunc(tqunicode(" Another Test! ")) == tqunicode(" Another Test! ") ) self.assert_( self.pluginobject1.stringstringfunc("MyString1", "MyString2") == "MyString1" ) self.assert_( self.pluginobject1.uintdoublestringfunc(8529,285.246,"String") == 8529 ) diff --git a/lib/kross/test/testgui.py b/lib/kross/test/testgui.py index 22b6f04b..6a629c66 100644 --- a/lib/kross/test/testgui.py +++ b/lib/kross/test/testgui.py @@ -89,27 +89,27 @@ class QtTest: qt.QDialog.__init__(self, parent, name, modal, fl) qt.QDialog.accept = self.accept self.setCaption("Export to HTML") - #self.layout() + #self.tqlayout() - self.layout = qt.QVBoxLayout(self) - self.layout.setSpacing(6) - self.layout.setMargin(11) + self.tqlayout = qt.QVBoxLayout(self) + self.tqlayout.setSpacing(6) + self.tqlayout.setMargin(11) infolabel = qt.QLabel("Export the data of a table or a query to a HTML-file.", self) - self.layout.addWidget(infolabel) + self.tqlayout.addWidget(infolabel) source = ComboBox(self, "Datasource:") - self.layout.addWidget(source) + self.tqlayout.addWidget(source) self.exporttype = ComboBox(self, "Style:", ["Plain","Paper","Desert","Blues"]) - self.layout.addWidget(self.exporttype) + self.tqlayout.addWidget(self.exporttype) self.filechooser = FileChooser(self) - self.layout.addWidget(self.filechooser) + self.tqlayout.addWidget(self.filechooser) buttonbox = qt.QHBox(self) buttonbox.setSpacing(6) - self.layout.addWidget(buttonbox) + self.tqlayout.addWidget(buttonbox) savebutton = Button("Save", buttonbox) qt.QObject.connect(savebutton, qt.SIGNAL("clicked()"), self, qt.SLOT("accept()")) diff --git a/lib/kross/test/testobject.cpp b/lib/kross/test/testobject.cpp index 884e7e37..eb687d02 100644 --- a/lib/kross/test/testobject.cpp +++ b/lib/kross/test/testobject.cpp @@ -48,24 +48,24 @@ TestObject::~TestObject() uint TestObject::func1(uint i) { - Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").arg(i) ); + Kross::krossdebug(TQString("CALLED => TestObject::func1 i=%1").tqarg(i) ); return i; } void TestObject::func2(TQString s, int i) { - Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").arg(s).arg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func2 s=%1 i=%2").tqarg(s).tqarg(i)); } TQString TestObject::func3(TQString s, int i) { - Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").arg(s).arg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func3 s=%1 i=%2").tqarg(s).tqarg(i)); return s; } const TQString& TestObject::func4(const TQString& s, int i) const { - Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").arg(s).arg(i)); + Kross::krossdebug(TQString("CALLED => TestObject::func4 s=%1 i=%2").tqarg(s).tqarg(i)); return s; } @@ -83,13 +83,13 @@ void TestObject::testSlot2() void TestObject::stdoutSlot(const TQString& s) { - Kross::krossdebug(TQString("stdout: %1").arg(s)); + Kross::krossdebug(TQString("stdout: %1").tqarg(s)); //std::cout << "<stdout> " << s.latin1() << std::endl; } void TestObject::stderrSlot(const TQString& s) { - Kross::krossdebug(TQString("stderr: %1").arg(s)); + Kross::krossdebug(TQString("stderr: %1").tqarg(s)); //std::cout << "<stderr> " << s.latin1() << std::endl; } diff --git a/lib/kross/test/testwindow.cpp b/lib/kross/test/testwindow.cpp index ec2960b0..5aa33958 100644 --- a/lib/kross/test/testwindow.cpp +++ b/lib/kross/test/testwindow.cpp @@ -53,7 +53,7 @@ TestWindow::TestWindow(const TQString& interpretername, const TQString& scriptco file = TQDir(TQDir::currentDirPath()).filePath("testscripting.rc"); else Kross::krossdebug("-------------------------222222"); - Kross::krossdebug(TQString("XML-file: %1").arg(file)); + Kross::krossdebug(TQString("XML-file: %1").tqarg(file)); m_scriptextension->setXMLFile(file); //menuFile->insertSeparator(); @@ -99,11 +99,11 @@ void TestWindow::execute() m_scriptcontainer->setCode(m_codeedit->text()); Kross::Api::Object::Ptr result = m_scriptcontainer->execute(); if(m_scriptcontainer->hadException()) { - Kross::krossdebug( TQString("EXCEPTION => %1").arg(m_scriptcontainer->getException()->toString()) ); + Kross::krossdebug( TQString("EXCEPTION => %1").tqarg(m_scriptcontainer->getException()->toString()) ); } else { TQString s = result ? result->toString() : TQString(); - Kross::krossdebug( TQString("DONE => %1").arg(s) ); + Kross::krossdebug( TQString("DONE => %1").tqarg(s) ); } } diff --git a/lib/kwmf/kowmfpaint.cc b/lib/kwmf/kowmfpaint.cc index 43067273..97a6e033 100644 --- a/lib/kwmf/kowmfpaint.cc +++ b/lib/kwmf/kowmfpaint.cc @@ -249,7 +249,7 @@ void KoWmfPaint::drawPolyline( const TQPointArray &pa ) { void KoWmfPaint::drawPolygon( const TQPointArray &pa, bool winding ) { - mPainter.drawPolygon( pa, winding ); + mPainter.tqdrawPolygon( pa, winding ); } @@ -276,7 +276,7 @@ void KoWmfPaint::drawPolyPolygon( TQPtrList<TQPointArray>& listPa, bool winding if ( mPainter.pen().style() != TQt::NoPen ) { mPainter.setBrush( TQt::NoBrush ); for ( pa = listPa.first() ; pa ; pa = listPa.next() ) { - mPainter.drawPolygon( *pa, winding ); + mPainter.tqdrawPolygon( *pa, winding ); } } diff --git a/lib/kwmf/kowmfread.h b/lib/kwmf/kowmfread.h index d71af5c6..ff8fa9be 100644 --- a/lib/kwmf/kowmfread.h +++ b/lib/kwmf/kowmfread.h @@ -19,7 +19,7 @@ #define _KOWMFREAD_H_ #include <tqpen.h> -#include <brush.h> +#include <tqbrush.h> #include <tqfont.h> #include <tqcolor.h> #include <tqrect.h> diff --git a/lib/kwmf/kowmfreadprivate.h b/lib/kwmf/kowmfreadprivate.h index feebe0b3..ea95e563 100644 --- a/lib/kwmf/kowmfreadprivate.h +++ b/lib/kwmf/kowmfreadprivate.h @@ -112,7 +112,7 @@ public: /****************** Text *******************/ /// set text color void setTextColor( TQ_UINT32 size, TQDataStream& stream ); - /// set text alignment + /// set text tqalignment void setTextAlign( TQ_UINT32 size, TQDataStream& stream ); /// draw text void textOut( TQ_UINT32 size, TQDataStream& stream ); diff --git a/lib/kwmf/kowmfstack.h b/lib/kwmf/kowmfstack.h index af906d55..876318ab 100644 --- a/lib/kwmf/kowmfstack.h +++ b/lib/kwmf/kowmfstack.h @@ -22,7 +22,7 @@ #include <tqpen.h> #include <tqcolor.h> #include <tqfont.h> -#include <brush.h> +#include <tqbrush.h> #include <tqpixmap.h> class KoWmfRead; diff --git a/lib/kwmf/kowmfstruct.h b/lib/kwmf/kowmfstruct.h index 84281f4e..d94a9d79 100644 --- a/lib/kwmf/kowmfstruct.h +++ b/lib/kwmf/kowmfstruct.h @@ -57,7 +57,7 @@ struct WmfEnhMetaHeader TQ_UINT16 numHandles; // Number of handles in the handle table // Handle index zero is reserved. TQ_UINT16 reserved; // always 0 - TQ_UINT32 sizeOfDescription; // Number of chars in the unicode description string + TQ_UINT32 sizeOfDescription; // Number of chars in the tqunicode description string // This is 0 if there is no description string TQ_UINT32 offsetOfDescription; // Offset to the metafile description record. // This is 0 if there is no description string diff --git a/lib/kwmf/kowmfwrite.h b/lib/kwmf/kowmfwrite.h index 728566d0..bc3e1411 100644 --- a/lib/kwmf/kowmfwrite.h +++ b/lib/kwmf/kowmfwrite.h @@ -19,7 +19,7 @@ #define _KOWMFWRITE_H_ #include <tqpen.h> -#include <brush.h> +#include <tqbrush.h> #include <tqcolor.h> #include <tqfont.h> #include <tqrect.h> diff --git a/lib/kwmf/kwmf.cc b/lib/kwmf/kwmf.cc index 38d520db..0a0d2c12 100644 --- a/lib/kwmf/kwmf.cc +++ b/lib/kwmf/kwmf.cc @@ -351,7 +351,7 @@ bool KWmf::parse( bool isPlaceable; bool isEnhanced; - startedAt = stream.device()->at(); + startedAt = stream.tqdevice()->at(); stream.setByteOrder(TQDataStream::LittleEndian); // Great, I love TQt ! for (int i = 0; i < s_maxHandles; i++) @@ -400,7 +400,7 @@ bool KWmf::parse( S16 nHandles; // Number of handles in the handle table // Handle index zero is reserved. S16 sReserved; // Reserved. Must be zero. - S32 nDescription; // Number of chars in the unicode description string + S32 nDescription; // Number of chars in the tqunicode description string // This is 0 if there is no description string S32 offDescription; // Offset to the metafile description record. // This is 0 if there is no description string @@ -477,7 +477,7 @@ bool KWmf::parse( } else { - stream.device()->at(startedAt); + stream.tqdevice()->at(startedAt); m_dpi = (unsigned)((double)576 / m_dpi); m_windowOrgX = 0; m_windowOrgY = 0; @@ -487,7 +487,7 @@ bool KWmf::parse( //----- Read as enhanced metafile header - fileAt = stream.device()->at(); + fileAt = stream.tqdevice()->at(); stream >> eheader.iType; stream >> eheader.nSize; stream >> eheader.rclBounds.left; @@ -539,7 +539,7 @@ bool KWmf::parse( { // debug("WMF Header"); //----- Read as standard metafile header - stream.device()->at(fileAt); + stream.tqdevice()->at(fileAt); stream >> header.mtType; stream >> header.mtHeaderSize; stream >> header.mtVersion; @@ -558,7 +558,7 @@ bool KWmf::parse( */ } - walk((size - (stream.device()->at() - startedAt)) / 2, stream); + walk((size - (stream.tqdevice()->at() - startedAt)) / 2, stream); return true; } diff --git a/lib/kwmf/qwmf.cc b/lib/kwmf/qwmf.cc index aabe4021..a7451b46 100644 --- a/lib/kwmf/qwmf.cc +++ b/lib/kwmf/qwmf.cc @@ -348,7 +348,7 @@ bool QWinMetaFile::paint( const TQPaintDevice* aTarget, bool absolute ) mWinding = false; mAbsoluteCoord = absolute; - mPainter.begin( const_cast<TQPaintDevice*>(aTarget) ); + mPainter.tqbegin( const_cast<TQPaintDevice*>(aTarget) ); if ( TQWMF_DEBUG ) { kdDebug() << "Bounding box : " << mBBox.left() << " " << mBBox.top() << " " << mBBox.right() << " " << mBBox.bottom() << endl; @@ -482,7 +482,7 @@ void QWinMetaFile::polygon( long, short* parm ) TQPointArray* pa; pa = pointArray( parm[ 0 ], &parm[ 1 ] ); - mPainter.drawPolygon( *pa, mWinding ); + mPainter.tqdrawPolygon( *pa, mWinding ); } @@ -762,7 +762,7 @@ void QWinMetaFile::extTextOut( long num, short* parm ) mPainter.translate( -parm[ 1 ], -parm[ 0 ] ); } - // alignment + // tqalignment if ( mTextAlign & 0x06 ) x -= ( width / 2 ); if ( mTextAlign & 0x08 ) diff --git a/lib/kwmf/qwmf.h b/lib/kwmf/qwmf.h index cf05d617..3bc668c9 100644 --- a/lib/kwmf/qwmf.h +++ b/lib/kwmf/qwmf.h @@ -139,7 +139,7 @@ public: // should be protected but cannot /****************** Text *******************/ /** set text color */ void setTextColor( long num, short* parms ); - /** set text alignment */ + /** set text tqalignment */ void setTextAlign( long num, short* parms ); /** draw text */ void textOut( long num, short* parms ); diff --git a/lib/kwmf/wmfstruct.h b/lib/kwmf/wmfstruct.h index 7400e896..33a4a67c 100644 --- a/lib/kwmf/wmfstruct.h +++ b/lib/kwmf/wmfstruct.h @@ -53,7 +53,7 @@ struct WmfEnhMetaHeader WORD nHandles; // Number of handles in the handle table // Handle index zero is reserved. WORD sReserved; // Reserved. Must be zero. - DWORD nDescription; // Number of chars in the unicode description string + DWORD nDescription; // Number of chars in the tqunicode description string // This is 0 if there is no description string DWORD offDescription; // Offset to the metafile description record. // This is 0 if there is no description string diff --git a/lib/store/KoDirectoryStore.cpp b/lib/store/KoDirectoryStore.cpp index 894a7b39..76e5aa72 100644 --- a/lib/store/KoDirectoryStore.cpp +++ b/lib/store/KoDirectoryStore.cpp @@ -72,7 +72,7 @@ bool KoDirectoryStore::openReadOrWrite( const TQString& name, int iomode ) return false; } m_stream = TQT_TQIODEVICE(new TQFile( m_basePath + name )); - if ( !m_stream->open( iomode ) ) + if ( !m_stream->tqopen( iomode ) ) { delete m_stream; m_stream = 0L; diff --git a/lib/store/KoStoreDrag.h b/lib/store/KoStoreDrag.h index e35709e7..cbd8c40d 100644 --- a/lib/store/KoStoreDrag.h +++ b/lib/store/KoStoreDrag.h @@ -27,7 +27,7 @@ * This allows to drag-n-drop and copy-paste complex koffice objects. * As per usual with dragobjects, an instance of KoStoreDrag must be * created on the "sending" side (dragging or copying). The "receiving" - * side (dropping or pasting) only uses provides()/canDecode() and encodedData(). + * side (dropping or pasting) only uses provides()/canDecode() and tqencodedData(). * * To create the data in memory, create a TQBuffer, * then KoStore::createStore( theBuffer, .... ), save the diff --git a/lib/store/KoXmlWriter.cpp b/lib/store/KoXmlWriter.cpp index 6c3459f4..f3568606 100644 --- a/lib/store/KoXmlWriter.cpp +++ b/lib/store/KoXmlWriter.cpp @@ -104,7 +104,7 @@ void KoXmlWriter::startElement( const char* tagName, bool indentInside ) { Q_ASSERT( tagName != 0 ); - // Tell parent that it has children + // Tell parent that it has tqchildren bool parentIndent = prepareForChild(); m_tags.push( Tag( tagName, parentIndent && indentInside ) ); @@ -387,7 +387,7 @@ void KoXmlWriter::addTextSpan( const TQString& text, const TQMap<int, int>& tabC nrSpaces = 0; leadingSpace = false; } - switch ( ch.unicode() ) { + switch ( ch.tqunicode() ) { case '\t': if ( !str.isEmpty() ) addTextNode( str ); diff --git a/lib/store/KoXmlWriter.h b/lib/store/KoXmlWriter.h index eaf453d2..5261dd5f 100644 --- a/lib/store/KoXmlWriter.h +++ b/lib/store/KoXmlWriter.h @@ -226,7 +226,7 @@ private: : tagName( t ), hasChildren( false ), lastChildIsText( false ), openingTagClosed( false ), indentInside( ind ) {} const char* tagName; - bool hasChildren; ///< element or text children + bool hasChildren; ///< element or text tqchildren bool lastChildIsText; ///< last child is a text node bool openingTagClosed; ///< true once the '\>' in \<tag a="b"\> is written out bool indentInside; ///< whether to indent the contents of this tag diff --git a/lib/store/tests/storedroptest.cpp b/lib/store/tests/storedroptest.cpp index f4b215ba..9da8d2d8 100644 --- a/lib/store/tests/storedroptest.cpp +++ b/lib/store/tests/storedroptest.cpp @@ -1,10 +1,10 @@ #include <kapplication.h> #include <kcmdlineargs.h> #include <KoStore.h> -#include <textbrowser.h> +#include <tqtextbrowser.h> #include <tqstringlist.h> #include <tqbuffer.h> -#include <clipboard.h> +#include <tqclipboard.h> class StoreDropTest : public TQTextBrowser { @@ -65,7 +65,7 @@ void StoreDropTest::keyPressEvent( TQKeyEvent * e ) void StoreDropTest::paste() { qDebug( "paste" ); - TQMimeSource* m = TQApplication::clipboard()->data(); + TQMimeSource* m = TQApplication::tqclipboard()->data(); if ( !m ) return; processMimeSource( m ); @@ -88,7 +88,7 @@ bool StoreDropTest::processMimeSource( TQMimeSource* ev ) formats += fmt; bool oasis = TQString( fmt ).startsWith( acceptMimeType ); if ( oasis || TQString( fmt ) == "application/x-kpresenter" ) { - TQByteArray data = ev->encodedData( fmt ); + TQByteArray data = ev->tqencodedData( fmt ); showZipContents( data, fmt, oasis ); return true; } @@ -127,11 +127,11 @@ void StoreDropTest::showZipContents( TQByteArray data, const char* mimeType, boo TQString StoreDropTest::loadTextFile( KoStore* store, const TQString& fileName ) { if ( !store->open( fileName ) ) - return TQString( "%1 not found\n" ).arg( fileName ); + return TQString( "%1 not found\n" ).tqarg( fileName ); TQByteArray data = store->device()->readAll(); store->close(); - TQString txt = TQString( "Found %1: \n" ).arg( fileName ); + TQString txt = TQString( "Found %1: \n" ).tqarg( fileName ); txt += TQString::fromUtf8( data.data(), data.size() ); txt += "\n"; return txt; diff --git a/lib/store/tests/xmlwritertest.cpp b/lib/store/tests/xmlwritertest.cpp index e4280cec..28bd3b08 100644 --- a/lib/store/tests/xmlwritertest.cpp +++ b/lib/store/tests/xmlwritertest.cpp @@ -14,7 +14,7 @@ void speedTest() TQString paragText = TQString::fromUtf8( "This is the text of the paragraph. I'm including a euro sign to test encoding issues: €" ); TQCString styleName = "Heading 1"; - TQFile out( TQString::fromLatin1( "out5.xml" ) ); + TQFile out( TQString::tqfromLatin1( "out5.xml" ) ); if ( out.open(IO_WriteOnly) ) { KoXmlWriter writer( &out ); @@ -78,7 +78,7 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); - writer.addTextSpan( TQString::fromLatin1( " \t\n foo " ) ); + writer.addTextSpan( TQString::tqfromLatin1( " \t\n foo " ) ); writer.endElement(); TEST_END( "textspan test", "<r>\n" " <p><text:s text:c=\"3\"/><text:tab/><text:line-break/> foo<text:s text:c=\"2\"/></p>\n" @@ -97,14 +97,14 @@ int main( int argc, char** argv ) { TEST_BEGIN( 0, 0 ); writer.startElement( "p", false /*no indent*/ ); writer.addProcessingInstruction( "opendocument foobar" ); - writer.addTextSpan( TQString::fromLatin1( "foo" ) ); + writer.addTextSpan( TQString::tqfromLatin1( "foo" ) ); writer.endElement(); TEST_END( "processinginstruction test", "<r>\n" " <p><?opendocument foobar?>foo</p>\n" "</r>\n" ); TEST_BEGIN( 0, 0 ); - writer.addManifestEntry( TQString::fromLatin1( "foo/bar/blah" ), TQString::fromLatin1( "mime/type" ) ); + writer.addManifestEntry( TQString::tqfromLatin1( "foo/bar/blah" ), TQString::tqfromLatin1( "mime/type" ) ); TEST_END( "addManifestEntry", "<r>\n <manifest:file-entry manifest:media-type=\"mime/type\" manifest:full-path=\"foo/bar/blah\"/>\n</r>\n" ); int sz = 15000; // must be more than KoXmlWriter::s_escapeBufferLen @@ -119,7 +119,7 @@ int main( int argc, char** argv ) { TQString longPath; for ( uint i = 0 ; i < 1000 ; ++i ) - longPath += TQString::fromLatin1( "M10 10L20 20 " ); + longPath += TQString::tqfromLatin1( "M10 10L20 20 " ); expected = "<r a=\""; expected += longPath.utf8() + "\"/>\n"; TEST_BEGIN( 0, 0 ); @@ -131,9 +131,9 @@ int main( int argc, char** argv ) { bool val = true; int num = 1; double numdouble = 5.0; - writer.addConfigItem( TQString::fromLatin1( "TestConfigBool" ), val ); - writer.addConfigItem( TQString::fromLatin1( "TestConfigInt" ), num ); - writer.addConfigItem( TQString::fromLatin1( "TestConfigDouble" ), numdouble ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigBool" ), val ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigInt" ), num ); + writer.addConfigItem( TQString::tqfromLatin1( "TestConfigDouble" ), numdouble ); TEST_END( "test config", "<r>\n" " <config:config-item config:name=\"TestConfigBool\" config:type=\"boolean\">true</config:config-item>\n" " <config:config-item config:name=\"TestConfigInt\" config:type=\"int\">1</config:config-item>\n" diff --git a/lib/store/tests/xmlwritertest.h b/lib/store/tests/xmlwritertest.h index 12011c03..cdafe8a5 100644 --- a/lib/store/tests/xmlwritertest.h +++ b/lib/store/tests/xmlwritertest.h @@ -34,8 +34,8 @@ TQCString s2 = expectedFull; \ if ( s1.length() != s2.length() ) \ qDebug( "got length %d, expected %d", s1.length(), s2.length() ); \ - s1.replace( TQRegExp( TQString::fromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ - s2.replace( TQRegExp( TQString::fromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s1.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ + s2.replace( TQRegExp( TQString::tqfromLatin1( "[x]{1000}" ) ), "[x]*1000" ); \ qDebug( "%s", s1.data() ); \ qDebug( "Expected:\n%s", s2.data() ); \ return 1; /*exit*/ \ |