diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
commit | 7c71ab86d1f7e387fc3df63b48df07231f111862 (patch) | |
tree | 30ba2d2f840ff5fd458b6113e9c3f2e8a71d510d /lib/kformula/fontstyle.cc | |
parent | afbfdc507bfaafc8824a9808311d57a9ece87510 (diff) | |
download | koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.tar.gz koffice-7c71ab86d1f7e387fc3df63b48df07231f111862.zip |
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kformula/fontstyle.cc')
-rw-r--r-- | lib/kformula/fontstyle.cc | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/lib/kformula/fontstyle.cc b/lib/kformula/fontstyle.cc index 0d1792e0..57088fef 100644 --- a/lib/kformula/fontstyle.cc +++ b/lib/kformula/fontstyle.cc @@ -266,17 +266,17 @@ static short cmex_nextchar( short ch ) bool Artwork::calcCMDelimiterSize( const ContextStyle& context, uchar c, luPt fontSize, - luPt tqparentSize ) + luPt parentSize ) { TQFont f( "cmex10" ); - f.setPointSizeFloat( context.tqlayoutUnitPtToPt( fontSize ) ); + f.setPointSizeFloat( context.layoutUnitPtToPt( fontSize ) ); TQFontMetrics fm( f ); for ( char i=1; c != 0; ++i ) { LuPixelRect bound = fm.boundingRect( c ); luPt height = context.ptToLayoutUnitPt( bound.height() ); - if ( height >= tqparentSize ) { + if ( height >= parentSize ) { luPt width = context.ptToLayoutUnitPt( fm.width( c ) ); luPt baseline = context.ptToLayoutUnitPt( -bound.top() ); @@ -300,7 +300,7 @@ void Artwork::calcLargest( const ContextStyle& context, uchar c, luPt fontSize ) { TQFont f( "cmex10" ); - f.setPointSizeFloat( context.tqlayoutUnitPtToPt( fontSize ) ); + f.setPointSizeFloat( context.layoutUnitPtToPt( fontSize ) ); TQFontMetrics fm( f ); cmChar = c; @@ -329,11 +329,11 @@ void Artwork::drawCMDelimiter( TQPainter& painter, const ContextStyle& style, luPt height ) { TQFont f( "cmex10" ); - f.setPointSizeFloat( style.tqlayoutUnitToFontSize( height, false ) ); + f.setPointSizeFloat( style.layoutUnitToFontSize( height, false ) ); painter.setFont( f ); - painter.drawText( style.tqlayoutUnitToPixelX( x ), - style.tqlayoutUnitToPixelY( y + getBaseline() ), + painter.drawText( style.layoutUnitToPixelX( x ), + style.layoutUnitToPixelY( y + getBaseline() ), TQString( TQChar( cmChar ) ) ); // Debug @@ -342,8 +342,8 @@ void Artwork::drawCMDelimiter( TQPainter& painter, const ContextStyle& style, LuPixelRect bound = fm.boundingRect( cmChar ); painter.setBrush(TQt::NoBrush); painter.setPen(TQt::green); - painter.drawRect( style.tqlayoutUnitToPixelX( x ), - style.tqlayoutUnitToPixelY( y ), + painter.drawRect( style.layoutUnitToPixelX( x ), + style.layoutUnitToPixelY( y ), fm.width( cmChar ), bound.height() ); #endif @@ -359,7 +359,7 @@ Artwork::Artwork(SymbolType t) void Artwork::calcSizes( const ContextStyle& style, ContextStyle::TextStyle tstyle, double factor, - luPt tqparentSize ) + luPt parentSize ) { setBaseline( -1 ); cmChar = -1; @@ -367,86 +367,86 @@ void Artwork::calcSizes( const ContextStyle& style, switch (getType()) { case LeftSquareBracket: if ( calcCMDelimiterSize( style, cmex_LeftSquareBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcRoundBracket( style, leftSquareBracket, tqparentSize, mySize ); + calcRoundBracket( style, leftSquareBracket, parentSize, mySize ); break; case RightSquareBracket: if ( calcCMDelimiterSize( style, cmex_RightSquareBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcRoundBracket( style, rightSquareBracket, tqparentSize, mySize ); + calcRoundBracket( style, rightSquareBracket, parentSize, mySize ); break; case LeftLineBracket: - calcRoundBracket( style, leftLineBracket, tqparentSize, mySize ); + calcRoundBracket( style, leftLineBracket, parentSize, mySize ); setWidth( getWidth()/2 ); break; case RightLineBracket: - calcRoundBracket( style, rightLineBracket, tqparentSize, mySize ); + calcRoundBracket( style, rightLineBracket, parentSize, mySize ); setWidth( getWidth()/2 ); break; case SlashBracket: if ( calcCMDelimiterSize( style, cmex_SlashBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } calcLargest( style, cmex_SlashBracket, mySize ); break; case BackSlashBracket: if ( calcCMDelimiterSize( style, cmex_BackSlashBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } calcLargest( style, cmex_BackSlashBracket, mySize ); break; case LeftCornerBracket: if ( calcCMDelimiterSize( style, cmex_LeftCornerBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } calcLargest( style, cmex_LeftCornerBracket, mySize ); break; case RightCornerBracket: if ( calcCMDelimiterSize( style, cmex_RightCornerBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } calcLargest( style, cmex_RightCornerBracket, mySize ); break; case LeftRoundBracket: if ( calcCMDelimiterSize( style, cmex_LeftRoundBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcRoundBracket( style, leftRoundBracket, tqparentSize, mySize ); + calcRoundBracket( style, leftRoundBracket, parentSize, mySize ); break; case RightRoundBracket: if ( calcCMDelimiterSize( style, cmex_RightRoundBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcRoundBracket( style, rightRoundBracket, tqparentSize, mySize ); + calcRoundBracket( style, rightRoundBracket, parentSize, mySize ); break; case EmptyBracket: - setHeight(tqparentSize); + setHeight(parentSize); //setWidth(style.getEmptyRectWidth()); setWidth(0); break; case LeftCurlyBracket: if ( calcCMDelimiterSize( style, cmex_LeftCurlyBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcCurlyBracket( style, leftCurlyBracket, tqparentSize, mySize ); + calcCurlyBracket( style, leftCurlyBracket, parentSize, mySize ); break; case RightCurlyBracket: if ( calcCMDelimiterSize( style, cmex_RightCurlyBracket, - mySize, tqparentSize ) ) { + mySize, parentSize ) ) { return; } - calcCurlyBracket( style, rightCurlyBracket, tqparentSize, mySize ); + calcCurlyBracket( style, rightCurlyBracket, parentSize, mySize ); break; case Integral: calcCharSize( style, style.getBracketFont(), mySize, cmex_Int ); @@ -516,11 +516,11 @@ void Artwork::calcSizes( const ContextStyle& style, void Artwork::draw(TQPainter& painter, const LuPixelRect& /*r*/, const ContextStyle& context, ContextStyle::TextStyle tstyle, - StyleAttributes& style, const LuPixelPoint& tqparentOrigin) + StyleAttributes& style, const LuPixelPoint& parentOrigin) { luPt mySize = context.getAdjustedSize( tstyle, style.sizeFactor() ); - luPixel myX = tqparentOrigin.x() + getX(); - luPixel myY = tqparentOrigin.y() + getY(); + luPixel myX = parentOrigin.x() + getX(); + luPixel myY = parentOrigin.y() + getY(); /* if ( !LuPixelRect( myX, myY, getWidth(), getHeight() ).intersects( r ) ) return; @@ -685,10 +685,10 @@ void Artwork::draw(TQPainter& painter, const LuPixelRect& , // debug // painter.setBrush(TQt::NoBrush); // painter.setPen(TQt::green); -// painter.drawRect( context.tqlayoutUnitToPixelX( myX ), -// context.tqlayoutUnitToPixelY( myY ), -// context.tqlayoutUnitToPixelX( getWidth() ), -// context.tqlayoutUnitToPixelY( getHeight() ) ); +// painter.drawRect( context.layoutUnitToPixelX( myX ), +// context.layoutUnitToPixelY( myY ), +// context.layoutUnitToPixelX( getWidth() ), +// context.layoutUnitToPixelY( getHeight() ) ); } void Artwork::calcCharSize( const ContextStyle& style, luPt height, TQChar ch ) @@ -708,7 +708,7 @@ void Artwork::drawCharacter( TQPainter& painter, const ContextStyle& style, void Artwork::calcCharSize( const ContextStyle& style, TQFont f, luPt height, TQChar c ) { - f.setPointSizeFloat( style.tqlayoutUnitPtToPt( height ) ); + f.setPointSizeFloat( style.layoutUnitPtToPt( height ) ); //f.setPointSize( height ); TQFontMetrics fm(f); setWidth( style.ptToLayoutUnitPt( fm.width( c ) ) ); @@ -722,11 +722,11 @@ void Artwork::drawCharacter( TQPainter& painter, const ContextStyle& style, TQFont f, luPixel x, luPixel y, luPt height, uchar c ) { - f.setPointSizeFloat( style.tqlayoutUnitToFontSize( height, false ) ); + f.setPointSizeFloat( style.layoutUnitToFontSize( height, false ) ); painter.setFont( f ); - painter.drawText( style.tqlayoutUnitToPixelX( x ), - style.tqlayoutUnitToPixelY( y+getBaseline() ), + painter.drawText( style.layoutUnitToPixelX( x ), + style.layoutUnitToPixelY( y+getBaseline() ), TQString( TQChar( c ) ) ); } @@ -739,7 +739,7 @@ void Artwork::calcRoundBracket( const ContextStyle& style, const TQChar chars[], //uchar line = style.symbolTable().character( chars[2] ); TQFont f = style.getBracketFont(); - f.setPointSizeFloat( style.tqlayoutUnitPtToPt( charHeight ) ); + f.setPointSizeFloat( style.layoutUnitPtToPt( charHeight ) ); TQFontMetrics fm( f ); LuPtRect upperBound = fm.boundingRect( uppercorner ); LuPtRect lowerBound = fm.boundingRect( lowercorner ); @@ -761,7 +761,7 @@ void Artwork::drawBigRoundBracket( TQPainter& p, const ContextStyle& style, cons uchar line = chars[2]; TQFont f = style.getBracketFont(); - f.setPointSizeFloat( style.tqlayoutUnitToFontSize( charHeight, false ) ); + f.setPointSizeFloat( style.layoutUnitToFontSize( charHeight, false ) ); p.setFont(f); TQFontMetrics fm(f); @@ -769,14 +769,14 @@ void Artwork::drawBigRoundBracket( TQPainter& p, const ContextStyle& style, cons TQRect lowerBound = fm.boundingRect(lowercorner); TQRect lineBound = fm.boundingRect(line); - pixel ptX = style.tqlayoutUnitToPixelX( x ); - pixel ptY = style.tqlayoutUnitToPixelY( y ); - pixel height = style.tqlayoutUnitToPixelY( getHeight() ); + pixel ptX = style.layoutUnitToPixelX( x ); + pixel ptY = style.layoutUnitToPixelY( y ); + pixel height = style.layoutUnitToPixelY( getHeight() ); // p.setPen( TQt::red ); // //p.drawRect( ptX, ptY, upperBound.width(), upperBound.height() + lowerBound.height() ); -// p.drawRect( ptX, ptY, style.tqlayoutUnitToPixelX( getWidth() ), -// style.tqlayoutUnitToPixelY( getHeight() ) ); +// p.drawRect( ptX, ptY, style.layoutUnitToPixelX( getWidth() ), +// style.layoutUnitToPixelY( getHeight() ) ); // p.setPen( TQt::black ); p.drawText( ptX, ptY-upperBound.top(), TQString( TQChar( uppercorner ) ) ); @@ -810,7 +810,7 @@ void Artwork::calcCurlyBracket( const ContextStyle& style, const TQChar chars[], uchar middle = chars[3]; TQFont f = style.getBracketFont(); - f.setPointSizeFloat( style.tqlayoutUnitPtToPt( charHeight ) ); + f.setPointSizeFloat( style.layoutUnitPtToPt( charHeight ) ); TQFontMetrics fm( f ); LuPtRect upperBound = fm.boundingRect( uppercorner ); LuPtRect lowerBound = fm.boundingRect( lowercorner ); @@ -832,7 +832,7 @@ void Artwork::drawBigCurlyBracket( TQPainter& p, const ContextStyle& style, cons { //TQFont f = style.getSymbolFont(); TQFont f = style.getBracketFont(); - f.setPointSizeFloat( style.tqlayoutUnitToFontSize( charHeight, false ) ); + f.setPointSizeFloat( style.layoutUnitToFontSize( charHeight, false ) ); p.setFont(f); uchar uppercorner = chars[0]; @@ -846,9 +846,9 @@ void Artwork::drawBigCurlyBracket( TQPainter& p, const ContextStyle& style, cons TQRect middleBound = fm.boundingRect(middle); TQRect lineBound = fm.boundingRect(line); - pixel ptX = style.tqlayoutUnitToPixelX( x ); - pixel ptY = style.tqlayoutUnitToPixelY( y ); - pixel height = style.tqlayoutUnitToPixelY( getHeight() ); + pixel ptX = style.layoutUnitToPixelX( x ); + pixel ptY = style.layoutUnitToPixelY( y ); + pixel height = style.layoutUnitToPixelY( getHeight() ); //p.setPen(TQt::gray); //p.drawRect(x, y, upperBound.width() + offset, height); |