summaryrefslogtreecommitdiffstats
path: root/lib/kformula/operatorelement.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kformula/operatorelement.cc')
-rw-r--r--lib/kformula/operatorelement.cc88
1 files changed, 44 insertions, 44 deletions
diff --git a/lib/kformula/operatorelement.cc b/lib/kformula/operatorelement.cc
index 534c093e..a9deab3c 100644
--- a/lib/kformula/operatorelement.cc
+++ b/lib/kformula/operatorelement.cc
@@ -19,7 +19,7 @@
#include <algorithm>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <klocale.h>
@@ -39,7 +39,7 @@
KFORMULA_NAMESPACE_BEGIN
-OperatorElement::OperatorElement( BasicElement* parent ) : TokenElement( parent ),
+OperatorElement::OperatorElement( BasicElement* tqparent ) : TokenElement( tqparent ),
m_form( NoForm ),
m_lspaceType( ThickMathSpace ),
m_rspaceType( ThickMathSpace ),
@@ -77,11 +77,11 @@ void OperatorElement::setForm( FormType type )
if ( ! isTextOnly() ) { // Only text content can be dictionary keys
return;
}
- QString text;
+ TQString text;
for ( uint i = 0; i < countChildren(); i++ ) {
text.append( getChild( i )->getCharacter() );
}
- QString form;
+ TQString form;
switch ( m_form ) {
case PrefixForm:
form = "prefix";
@@ -159,7 +159,7 @@ void OperatorElement::setForm( FormType type )
* Token elements' content has to be of homogeneous type. Every token element
* must (TODO: check this) appear inside a non-token sequence, and thus, if
* the command asks for a different content, a new element has to be created in
- * parent sequence.
+ * tqparent sequence.
*/
KCommand* OperatorElement::buildCommand( Container* container, Request* request )
{
@@ -178,21 +178,21 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
}
if ( countChildren() == 0 || cursor->getPos() == countChildren() ) {
- // We are in the last position, so it's easy, call the parent to
+ // We are in the last position, so it's easy, call the tqparent to
// create a new child
- SequenceElement* parent = static_cast<SequenceElement*>( getParent() );
- if ( parent ) {
- uint pos = parent->childPos( this );
- cursor->setTo( parent, pos + 1);
- return parent->buildCommand( container, request );
+ SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() );
+ if ( tqparent ) {
+ uint pos = tqparent->childPos( this );
+ cursor->setTo( tqparent, pos + 1);
+ return tqparent->buildCommand( container, request );
}
}
if ( cursor->getPos() == 0 ) {
- SequenceElement* parent = static_cast<SequenceElement*>( getParent() );
- if ( parent ) {
- uint pos = parent->childPos( this );
- cursor->setTo( parent, pos );
- return parent->buildCommand( container, request );
+ SequenceElement* tqparent = static_cast<SequenceElement*>( getParent() );
+ if ( tqparent ) {
+ uint pos = tqparent->childPos( this );
+ cursor->setTo( tqparent, pos );
+ return tqparent->buildCommand( container, request );
}
}
@@ -200,7 +200,7 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
// a) Cut from mark to the end
// b) Create a new token and add an element from key pressed
// c) Create a new token and add elements cut previously
- // d) Move cursor to parent so that it command execution works fine
+ // d) Move cursor to tqparent so that it command execution works fine
switch( *request ) {
case req_addTextChar: {
@@ -211,9 +211,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
command->addCursor( cursor );
command->addToken( id );
command->addContent( id, text );
- SequenceElement* parent = static_cast< SequenceElement* >( getParent() );
- if ( parent ) {
- cursor->setTo( parent, parent->childPos( this ) + 1 );
+ SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() );
+ if ( tqparent ) {
+ cursor->setTo( tqparent, tqparent->childPos( this ) + 1 );
}
return command;
}
@@ -228,9 +228,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
TextElement* text = creationStrategy->createTextElement( tr->text()[i] );
command->addContent( id, text );
}
- SequenceElement* parent = static_cast< SequenceElement* >( getParent() );
- if ( parent ) {
- cursor->setTo( parent, parent->childPos( this ) + 1 );
+ SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() );
+ if ( tqparent ) {
+ cursor->setTo( tqparent, tqparent->childPos( this ) + 1 );
}
return command;
}
@@ -243,9 +243,9 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
command->addCursor( cursor );
command->addToken( num );
command->addContent( num, text );
- SequenceElement* parent = static_cast< SequenceElement* >( getParent() );
- if ( parent ) {
- cursor->setTo( parent, parent->childPos( this ) + 1 );
+ SequenceElement* tqparent = static_cast< SequenceElement* >( getParent() );
+ if ( tqparent ) {
+ cursor->setTo( tqparent, tqparent->childPos( this ) + 1 );
}
return command;
}
@@ -269,13 +269,13 @@ KCommand* OperatorElement::buildCommand( Container* container, Request* request
}
-bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
+bool OperatorElement::readAttributesFromMathMLDom( const TQDomElement &element )
{
if ( ! BasicElement::readAttributesFromMathMLDom( element ) ) {
return false;
}
- QString formStr = element.attribute( "form" ).stripWhiteSpace().lower();
+ TQString formStr = element.attribute( "form" ).stripWhiteSpace().lower();
if ( ! formStr.isNull() ) {
m_customForm = true;
if ( formStr == "prefix" ) {
@@ -292,7 +292,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customForm = false;
}
}
- QString fenceStr = element.attribute( "fence" ).stripWhiteSpace().lower();
+ TQString fenceStr = element.attribute( "fence" ).stripWhiteSpace().lower();
if ( ! fenceStr.isNull() ) {
m_customFence = true;
if ( fenceStr == "true" ) {
@@ -306,7 +306,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customFence = false;
}
}
- QString separatorStr = element.attribute( "separator" ).stripWhiteSpace().lower();
+ TQString separatorStr = element.attribute( "separator" ).stripWhiteSpace().lower();
if ( ! separatorStr.isNull() ) {
m_customSeparator = true;
if ( separatorStr == "true" ) {
@@ -320,7 +320,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customSeparator = false;
}
}
- QString lspaceStr = element.attribute( "lspace" ).stripWhiteSpace().lower();
+ TQString lspaceStr = element.attribute( "lspace" ).stripWhiteSpace().lower();
if ( ! lspaceStr.isNull() ) {
m_customLSpace = true;
m_lspace = getSize( lspaceStr, &m_lspaceType );
@@ -328,7 +328,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_lspaceType = getSpace( lspaceStr );
}
}
- QString rspaceStr = element.attribute( "rspace" ).stripWhiteSpace().lower();
+ TQString rspaceStr = element.attribute( "rspace" ).stripWhiteSpace().lower();
if ( ! rspaceStr.isNull() ) {
m_customRSpace = true;
m_rspace = getSize( rspaceStr, &m_rspaceType );
@@ -336,7 +336,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_rspaceType = getSpace( rspaceStr );
}
}
- QString stretchyStr = element.attribute( "stretchy" ).stripWhiteSpace().lower();
+ TQString stretchyStr = element.attribute( "stretchy" ).stripWhiteSpace().lower();
if ( ! stretchyStr.isNull() ) {
m_customStretchy = true;
if ( stretchyStr == "true" ) {
@@ -350,7 +350,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customStretchy = false;
}
}
- QString symmetricStr = element.attribute( "symmetric" ).stripWhiteSpace().lower();
+ TQString symmetricStr = element.attribute( "symmetric" ).stripWhiteSpace().lower();
if ( ! symmetricStr.isNull() ) {
m_customSymmetric = true;
if ( symmetricStr == "true" ) {
@@ -364,7 +364,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customSymmetric = false;
}
}
- QString maxsizeStr = element.attribute( "maxsize" ).stripWhiteSpace().lower();
+ TQString maxsizeStr = element.attribute( "maxsize" ).stripWhiteSpace().lower();
if ( ! maxsizeStr.isNull() ) {
m_customMaxSize = true;
if ( maxsizeStr == "infinity" ) {
@@ -377,7 +377,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
}
}
}
- QString minsizeStr = element.attribute( "minsize" ).stripWhiteSpace().lower();
+ TQString minsizeStr = element.attribute( "minsize" ).stripWhiteSpace().lower();
if ( ! minsizeStr.isNull() ) {
m_customMinSize = true;
m_minSize = getSize( minsizeStr, &m_minSizeType );
@@ -385,7 +385,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_minSizeType = getSpace( minsizeStr );
}
}
- QString largeopStr = element.attribute( "largeop" ).stripWhiteSpace().lower();
+ TQString largeopStr = element.attribute( "largeop" ).stripWhiteSpace().lower();
if ( ! largeopStr.isNull() ) {
m_customLargeOp = true;
if ( largeopStr == "true" ) {
@@ -399,7 +399,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customLargeOp = false;
}
}
- QString movablelimitsStr = element.attribute( "movablelimits" ).stripWhiteSpace().lower();
+ TQString movablelimitsStr = element.attribute( "movablelimits" ).stripWhiteSpace().lower();
if ( ! movablelimitsStr.isNull() ) {
m_customMovableLimits = true;
if ( movablelimitsStr == "true" ) {
@@ -413,7 +413,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
m_customMovableLimits = false;
}
}
- QString accentStr = element.attribute( "accent" ).stripWhiteSpace().lower();
+ TQString accentStr = element.attribute( "accent" ).stripWhiteSpace().lower();
if ( ! accentStr.isNull() ) {
m_customAccent = true;
if ( accentStr == "true" ) {
@@ -430,7 +430,7 @@ bool OperatorElement::readAttributesFromMathMLDom( const QDomElement &element )
return true;
}
-void OperatorElement::writeMathMLAttributes( QDomElement& element ) const
+void OperatorElement::writeMathMLAttributes( TQDomElement& element ) const
{
if ( m_customForm ) {
switch ( m_form ) {
@@ -481,20 +481,20 @@ void OperatorElement::writeMathMLAttributes( QDomElement& element ) const
}
}
-void OperatorElement::writeSizeAttribute( QDomElement& element, const QString &attr, SizeType type, double length ) const
+void OperatorElement::writeSizeAttribute( TQDomElement& element, const TQString &attr, SizeType type, double length ) const
{
switch ( type ) {
case InfinitySize:
element.setAttribute( attr, "infinity" );
break;
case AbsoluteSize:
- element.setAttribute( attr, QString( "%1pt" ).arg( length ) );
+ element.setAttribute( attr, TQString( "%1pt" ).tqarg( length ) );
break;
case RelativeSize:
- element.setAttribute( attr, QString( "%1% " ).arg( length * 100.0 ) );
+ element.setAttribute( attr, TQString( "%1% " ).tqarg( length * 100.0 ) );
break;
case PixelSize:
- element.setAttribute( attr, QString( "%1px " ).arg( length ) );
+ element.setAttribute( attr, TQString( "%1px " ).tqarg( length ) );
break;
case NegativeVeryVeryThinMathSpace:
element.setAttribute( attr, "negativeveryverythinmathspace" );