diff options
Diffstat (limited to 'lib/kformula/contextstyle.cc')
-rw-r--r-- | lib/kformula/contextstyle.cc | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/kformula/contextstyle.cc b/lib/kformula/contextstyle.cc index 61e290f4..f358b62c 100644 --- a/lib/kformula/contextstyle.cc +++ b/lib/kformula/contextstyle.cc @@ -19,8 +19,8 @@ * Boston, MA 02110-1301, USA. */ -#include <qfontmetrics.h> -#include <qstring.h> +#include <tqfontmetrics.h> +#include <tqstring.h> #include <kdebug.h> #include <KoGlobal.h> @@ -34,9 +34,9 @@ KFORMULA_NAMESPACE_BEGIN ContextStyle::ContextStyle() : symbolFont( "Symbol" ), - defaultColor(Qt::black), numberColor(Qt::blue), - operatorColor(Qt::darkGreen), errorColor(Qt::darkRed), - emptyColor(Qt::blue), helpColor( Qt::gray ), m_sizeFactor( 0 ) + defaultColor(TQt::black), numberColor(TQt::blue), + operatorColor(TQt::darkGreen), errorColor(TQt::darkRed), + emptyColor(TQt::blue), helpColor( TQt::gray ), m_sizeFactor( 0 ) { // kdDebug() << "ContextStyle::ContextStyle" << endl // << "defaultFont: " << defaultFont.rawName() << endl @@ -74,7 +74,7 @@ void ContextStyle::init( bool init ) } -void ContextStyle::setFontStyle( const QString& fontStyle, bool init ) +void ContextStyle::setFontStyle( const TQString& fontStyle, bool init ) { delete m_fontStyle; m_fontStyleName = fontStyle; @@ -92,7 +92,7 @@ const SymbolTable& ContextStyle::symbolTable() const void ContextStyle::readConfig( KConfig* config, bool init ) { config->setGroup( "kformula Font" ); - QString fontName = config->readEntry( "defaultFont", "Times,12,-1,5,50,1,0,0,0,0" ); + TQString fontName = config->readEntry( "defaultFont", "Times,12,-1,5,50,1,0,0,0,0" ); defaultFont.fromString( fontName ); fontName = config->readEntry( "nameFont", "Times,12,-1,5,50,0,0,0,0,0" ); nameFont.fromString( fontName ); @@ -100,7 +100,7 @@ void ContextStyle::readConfig( KConfig* config, bool init ) numberFont.fromString( fontName ); fontName = config->readEntry( "operatorFont", "Times,12,-1,5,50,0,0,0,0,0" ); operatorFont.fromString( fontName ); - QString baseSize = config->readEntry( "baseSize", "20" ); + TQString baseSize = config->readEntry( "baseSize", "20" ); m_baseSize = baseSize.toInt(); if ( ! FontStyle::missingFonts( init ).isEmpty() ) { @@ -136,7 +136,7 @@ bool ContextStyle::setZoomAndResolution( int zoom, double zoomX, double zoomY, b return changes; } -QColor ContextStyle::getNumberColor() const +TQColor ContextStyle::getNumberColor() const { if ( edit() && syntaxHighlighting() ) { return numberColor; @@ -144,7 +144,7 @@ QColor ContextStyle::getNumberColor() const return getDefaultColor(); } -QColor ContextStyle::getOperatorColor() const +TQColor ContextStyle::getOperatorColor() const { if ( edit() && syntaxHighlighting() ) { return operatorColor; @@ -152,7 +152,7 @@ QColor ContextStyle::getOperatorColor() const return getDefaultColor(); } -QColor ContextStyle::getErrorColor() const +TQColor ContextStyle::getErrorColor() const { if ( edit() && syntaxHighlighting() ) { return errorColor; @@ -160,7 +160,7 @@ QColor ContextStyle::getErrorColor() const return getDefaultColor(); } -QColor ContextStyle::getEmptyColor() const +TQColor ContextStyle::getEmptyColor() const { if ( edit() && syntaxHighlighting() ) { return emptyColor; @@ -168,7 +168,7 @@ QColor ContextStyle::getEmptyColor() const return getDefaultColor(); } -QColor ContextStyle::getHelpColor() const +TQColor ContextStyle::getHelpColor() const { if ( edit() && syntaxHighlighting() ) { return helpColor; @@ -176,38 +176,38 @@ QColor ContextStyle::getHelpColor() const return getDefaultColor(); } -void ContextStyle::setDefaultColor( const QColor& color ) +void ContextStyle::setDefaultColor( const TQColor& color ) { defaultColor = color; } -void ContextStyle::setNumberColor( const QColor& color ) +void ContextStyle::setNumberColor( const TQColor& color ) { numberColor = color; } -void ContextStyle::setOperatorColor( const QColor& color ) +void ContextStyle::setOperatorColor( const TQColor& color ) { operatorColor = color; } -void ContextStyle::setErrorColor( const QColor& color ) +void ContextStyle::setErrorColor( const TQColor& color ) { errorColor = color; } -void ContextStyle::setEmptyColor( const QColor& color ) +void ContextStyle::setEmptyColor( const TQColor& color ) { emptyColor = color; } -void ContextStyle::setHelpColor( const QColor& color ) +void ContextStyle::setHelpColor( const TQColor& color ) { helpColor = color; } #if 0 -const QStringList& ContextStyle::requestedFonts() const +const TQStringList& ContextStyle::requestedFonts() const { return m_requestedFonts; } -void ContextStyle::setRequestedFonts( const QStringList& list ) +void ContextStyle::setRequestedFonts( const TQStringList& list ) { m_requestedFonts = list; //table.init( this ); @@ -221,7 +221,7 @@ double ContextStyle::getReductionFactor( TextStyle tstyle ) const luPt ContextStyle::getAdjustedSize( TextStyle tstyle, double factor ) const { - return qRound( ptToLayoutUnitPt( m_sizeFactor + return tqRound( ptToLayoutUnitPt( m_sizeFactor * m_baseSize * getReductionFactor( tstyle ) * factor @@ -235,7 +235,7 @@ luPixel ContextStyle::getSpace( TextStyle tstyle, SpaceWidth space, double facto case THIN: return getThinSpace( tstyle, factor ); case MEDIUM: return getMediumSpace( tstyle, factor ); case THICK: return getThickSpace( tstyle, factor ); - case QUAD: return getQuadSpace( tstyle, factor ); + case TQUAD: return getQuadSpace( tstyle, factor ); } return 0; } @@ -360,16 +360,16 @@ ContextStyle::TextStyle ContextStyle::convertTextStyleIndex( TextStyle tstyle ) void ContextStyle::setup() { luPt size = static_cast<luPt>( m_baseSize ); - QFont font = symbolFont; + TQFont font = symbolFont; font.setPointSize( size ); - QFontMetrics fm( font ); + TQFontMetrics fm( font ); // Or better the real space required? ( boundingRect ) quad = ptToLayoutUnitPt( fm.width( 'M' ) ); - font = QFont(defaultFont); + font = TQFont(defaultFont); font.setPointSize( size ); - QFontMetrics fm2( font ); + TQFontMetrics fm2( font ); //m_axisHeight = ptToLayoutUnitPt( fm2.strikeOutPos() ); //ptToLayoutUnitPixY //m_axisHeight = ptToLayoutUnitPt( pixelYToPt( fm2.strikeOutPos() ) ); @@ -412,29 +412,29 @@ CharFamily StyleAttributes::charFamily() const return m_charFamily.top(); } -QColor StyleAttributes::color() const +TQColor StyleAttributes::color() const { if ( m_color.empty() ) { // kdWarning( DEBUGID ) << "Color stack is empty.\n"; - return QColor( Qt::black ); + return TQColor( TQt::black ); //return getDefaultColor(); } return m_color.top(); } -QColor StyleAttributes::background() const +TQColor StyleAttributes::background() const { if ( m_background.empty() ) { // kdWarning( DEBUGID ) << "Background stack is empty.\n"; - return QColor( Qt::color0 ); + return TQColor( TQt::color0 ); } return m_background.top(); } -QFont StyleAttributes::font() const +TQFont StyleAttributes::font() const { if ( m_font.empty() ) { - return QFont(); + return TQFont(); } return m_font.top(); } |