diff options
Diffstat (limited to 'kformula')
-rw-r--r-- | kformula/DESIGN | 48 | ||||
-rw-r--r-- | kformula/formulastring.cc | 6 | ||||
-rw-r--r-- | kformula/fsparser.cc | 32 | ||||
-rw-r--r-- | kformula/kformula_view.cc | 2 | ||||
-rw-r--r-- | kformula/kformulawidget.cc | 6 |
5 files changed, 47 insertions, 47 deletions
diff --git a/kformula/DESIGN b/kformula/DESIGN index 0e828043..eec70869 100644 --- a/kformula/DESIGN +++ b/kformula/DESIGN @@ -19,22 +19,22 @@ objects from it. Responsebilities (This goes for every derived element and therefore for each one.) -- knows its tqchildren. Actually BasicElement doesn't have any. But it - already defines that tqchildren must be known by their parent. -- knows its bounding rectangle (its size.) The tqchildren are included +- knows its children. Actually BasicElement doesn't have any. But it + already defines that children must be known by their parent. +- knows its bounding rectangle (its size.) The children are included in this rect. (Only width and height are needed. Positions are handled by the parent) -//- knows its middle line. (for tqalignment) -- knows it's zero point for midline (vertical tqalignment) and +//- knows its middle line. (for alignment) +- knows it's zero point for midline (vertical alignment) and keep open the possibility of negative positions (out of bounding rect) -- draws itself (given a painter); tqchildren are drawn, too +- draws itself (given a painter); children are drawn, too - knows all positions where the cursor is allowed to be. (see below) - knows its parent; The topmost element has no parent; there is a implicit garantie that the topmost element is always a SequenceElement. - can save and load itself. different formates. (see below) -- all tqchildren must be a SequenceElement. Except for SequenceElement's - tqchildren that might be of any type. +- all children must be a SequenceElement. Except for SequenceElement's + children that might be of any type. - might have its own color. - might have its own font size (see below). @@ -42,14 +42,14 @@ Responsebilities SequenceElement from BasicElement --------------- -Manages a list of tqchildren. The tqchildren are aligned horizontally at +Manages a list of children. The children are aligned horizontally at one middle line. No gaps, no overlaps. -Has no own look. It just draws all its tqchildren and is done. Except if +Has no own look. It just draws all its children and is done. Except if its empty. It looks like an empty space then (i.e. a little square) Has n+1 valid cursor positions where n is the number of -tqchildren. These are before, between and after the tqchildren. +children. These are before, between and after the children. May contain any (type of) element as child @@ -74,20 +74,20 @@ FormulaElement we get a chance to pass messages to the outside world. RootElement from BasicElement ----------- -contains two tqchildren. content and index. index is optional. +contains two children. content and index. index is optional. IndexElement from BasicElement ------------ -contains five tqchildren. content and four indexes. all indexes are +contains five children. content and four indexes. all indexes are optional. If there is no index the element might be replaced by its content. TextElement from BasicElement ----------- -contains one char and no tqchildren at all. +contains one char and no children at all. Might have its own font and size. But preferes to use a reasonalbe @@ -105,7 +105,7 @@ choose with. FractionElement from BasicElement --------------- -2 tqchildren: numerator, denominator +2 children: numerator, denominator DecorationElement from BasicElement @@ -122,7 +122,7 @@ the other side of the decoration. SumIntegralElement from BasicElement //PrefixedElement ------------------ -draws all sorts of mathematical symbols with three tqchildren. Above, +draws all sorts of mathematical symbols with three children. Above, below (or whereever the indices and limits go)and to the right. @@ -143,7 +143,7 @@ typical of a math formula. MatrixElement from BasicElement ------------- -A matrix of tqchildren. +A matrix of children. With all align stuff, internal borders etc, matrix dots handling (i.e. those dots or lines that complete the matrix, not well handled in TeX), etc.. @@ -151,7 +151,7 @@ etc.. SpaceElement from BasicElement ------------ -No tqchildren at all. Provides the facility to insert horizontal spaces +No children at all. Provides the facility to insert horizontal spaces in the formula. (therefore it is similar to TextElement.) @@ -183,14 +183,14 @@ If the cursor points into an element this element is said to own the cursor. There are a few rules that describe how new cursor positions are calculated given the current key: -- An elements cursor positions are its tqchildren. The element might not -own the cursor except when it is owned by one of its tqchildren. The +- An elements cursor positions are its children. The element might not +own the cursor except when it is owned by one of its children. The only exception is SequenceElement which has valid cursor positions -before, between and after its tqchildren, too. +before, between and after its children, too. (Therefore the cursor is always owned by a SequenceElement.) -- Each element's tqchildren are ordered. If the cursor leaves one child +- Each element's children are ordered. If the cursor leaves one child the next child it. The direction depends on the key that moved the cursor. If there is child left the cursor is passed to the parent. @@ -261,7 +261,7 @@ We want a formula to look different according to its surroundings. (Most obviosly according to the available height and/or width.) It would be great to get something like automatic operator -tqalignment. So if you type some formulas each on its own line the +alignment. So if you type some formulas each on its own line the assigment operators should be automatically in a column. (If the user turns this on.) @@ -272,7 +272,7 @@ Fonts and font size (2 ideas) 1) Each element know its font family (also if it is not a text element) so that it -can give this font to its tqchildren. +can give this font to its children. The font size is calculated starting from a global scale factor and appling to it a local size modifier (like HTML -2, -1,+3,etc..), this also calculate the diff --git a/kformula/formulastring.cc b/kformula/formulastring.cc index b22c8576..d58faa5d 100644 --- a/kformula/formulastring.cc +++ b/kformula/formulastring.cc @@ -18,9 +18,9 @@ */ #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqstringlist.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqtooltip.h> #include <tqvariant.h> #include <tqwhatsthis.h> @@ -112,7 +112,7 @@ void FormulaString::helpButtonClicked() void FormulaString::cursorPositionChanged( int para, int pos ) { - position->setText( TQString( "%1:%2" ).tqarg( para+1 ).tqarg( pos+1 ) ); + position->setText( TQString( "%1:%2" ).arg( para+1 ).arg( pos+1 ) ); } #include "formulastring.moc" diff --git a/kformula/fsparser.cc b/kformula/fsparser.cc index 3d425a16..863cc9eb 100644 --- a/kformula/fsparser.cc +++ b/kformula/fsparser.cc @@ -50,20 +50,20 @@ public: //virtual void output( ostream& stream ) { stream << "PrimaryNode {" << m_primary << "}" << endl; } virtual void buildXML( TQDomDocument& doc, TQDomElement element ); virtual bool isSimple() { return true; } - void setUnicode( TQChar tqunicode ) { m_tqunicode = tqunicode; } + void setUnicode( TQChar unicode ) { m_unicode = unicode; } void setFunctionName( bool functionName ) { m_functionName = functionName; } TQString primary() const { return m_primary; } private: TQString m_primary; - TQChar m_tqunicode; + TQChar m_unicode; bool m_functionName; }; void PrimaryNode::buildXML( TQDomDocument& doc, TQDomElement element ) { - if ( m_tqunicode != TQChar::null ) { + if ( m_unicode != TQChar::null ) { TQDomElement de = doc.createElement( "TEXT" ); - de.setAttribute( "CHAR", TQString( m_tqunicode ) ); + de.setAttribute( "CHAR", TQString( m_unicode ) ); de.setAttribute( "SYMBOL", "3" ); element.appendChild( de ); } @@ -447,7 +447,7 @@ TQDomDocument FormulaStringParser::parse() head = parseAssign(); //head->output( cout ); if ( !eol() ) { - error( TQString( i18n( "Aborted parsing at %1:%2" ) ).tqarg( line ).tqarg( column ) ); + error( TQString( i18n( "Aborted parsing at %1:%2" ) ).arg( line ).arg( column ) ); } TQDomDocument doc = KFormula::Document::createDomDocument(); @@ -543,7 +543,7 @@ ParserNode* FormulaStringParser::parsePrimary() } case NAME: { PrimaryNode* node = new PrimaryNode( current ); - node->setUnicode( m_symbolTable.tqunicode( current ) ); + node->setUnicode( m_symbolTable.unicode( current ) ); nextToken(); if ( currentType == LP ) { nextToken(); @@ -556,7 +556,7 @@ ParserNode* FormulaStringParser::parsePrimary() nextToken(); } } - expect( RP, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( ")" ) ); + expect( RP, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( ")" ) ); node->setFunctionName( true ); return new FunctionNode( node, args ); } @@ -571,7 +571,7 @@ ParserNode* FormulaStringParser::parsePrimary() case LP: { nextToken(); ParserNode* node = parseExpr(); - expect( RP, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( ")" ) ); + expect( RP, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( ")" ) ); return node; } case LB: { @@ -582,7 +582,7 @@ ParserNode* FormulaStringParser::parsePrimary() m_newlineIsSpace = innerBrackets; while ( ( currentType != EOL ) && ( currentType != RB ) ) { if ( innerBrackets ) { - expect( LB, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( "[" ) ); + expect( LB, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( "[" ) ); } TQPtrList<ParserNode> row; row.setAutoDelete( false ); @@ -594,7 +594,7 @@ ParserNode* FormulaStringParser::parsePrimary() } } if ( innerBrackets ) { - expect( RB, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( "]" ) ); + expect( RB, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( "]" ) ); if ( currentType == COMMA ) { nextToken(); } @@ -605,20 +605,20 @@ ParserNode* FormulaStringParser::parsePrimary() nextToken(); } else { - expect( SEMIC, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( ";" ) ); + expect( SEMIC, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( ";" ) ); } } } rows.append( new RowNode( row ) ); } m_newlineIsSpace = true; - expect( RB, TQString( i18n( "'%3' expected at %1:%2" ) ).tqarg( line ).tqarg( column ).tqarg( "]" ) ); + expect( RB, TQString( i18n( "'%3' expected at %1:%2" ) ).arg( line ).arg( column ).arg( "]" ) ); MatrixNode* node = new MatrixNode( rows ); if ( node->columns() == 0 ) { - error( TQString( i18n( "Null columns in Matrix at %1:%2" ) ).tqarg( line ).tqarg( column ) ); + error( TQString( i18n( "Null columns in Matrix at %1:%2" ) ).arg( line ).arg( column ) ); } if ( node->rows() == 0 ) { - error( TQString( i18n( "Null rows in Matrix at %1:%2" ) ).tqarg( line ).tqarg( column ) ); + error( TQString( i18n( "Null rows in Matrix at %1:%2" ) ).arg( line ).arg( column ) ); } return node; } @@ -628,7 +628,7 @@ ParserNode* FormulaStringParser::parsePrimary() return node; } default: - error( TQString( i18n( "Unexpected token at %1:%2" ) ).tqarg( line ).tqarg( column ) ); + error( TQString( i18n( "Unexpected token at %1:%2" ) ).arg( line ).arg( column ) ); return new PrimaryNode( "?" ); } } @@ -773,7 +773,7 @@ void FormulaStringParser::readNumber() readDigits(); } else if ( !digitsBeforeDot ) { - error( TQString( i18n( "A single '.' is not a number at %1:%2" ) ).tqarg( line ).tqarg( column ) ); + error( TQString( i18n( "A single '.' is not a number at %1:%2" ) ).arg( line ).arg( column ) ); return; } } diff --git a/kformula/kformula_view.cc b/kformula/kformula_view.cc index 7dbabc00..ae0b59ba 100644 --- a/kformula/kformula_view.cc +++ b/kformula/kformula_view.cc @@ -22,7 +22,7 @@ class KPrinter; #include <tqpainter.h> #include <tqpopupmenu.h> -#include <tqtextedit.h> +#include <textedit.h> #include <tqtimer.h> #include <kaction.h> diff --git a/kformula/kformulawidget.cc b/kformula/kformulawidget.cc index dc259320..c8d4a284 100644 --- a/kformula/kformulawidget.cc +++ b/kformula/kformulawidget.cc @@ -68,11 +68,11 @@ void KFormulaWidget::setReadOnly(bool ro) void KFormulaWidget::paintEvent(TQPaintEvent* event) { - // Always tqrepaint the buffer. This is not so much more work - // than it seems to be as each cursor movement requires a tqrepaint. + // Always repaint the buffer. This is not so much more work + // than it seems to be as each cursor movement requires a repaint. TQPainter p( &buffer ); //p.translate( -fr.x(), -fr.y() ); - formulaView.draw( p, event->rect(), tqcolorGroup() ); + formulaView.draw( p, event->rect(), colorGroup() ); TQPainter painter; painter.begin(this); |