summaryrefslogtreecommitdiffstats
path: root/kpovmodeler/pmformulalabel.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-19 19:03:33 +0000
commite69e8b1d09fb579316595b4e6a850e717358a8b1 (patch)
treea24fc20865f65772f530d16177520190594ffdd2 /kpovmodeler/pmformulalabel.cpp
parenteecec9afb81fdebb0f22e9da22635874c403f854 (diff)
downloadtdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz
tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip
TQt4 port kdegraphics
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpovmodeler/pmformulalabel.cpp')
-rw-r--r--kpovmodeler/pmformulalabel.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kpovmodeler/pmformulalabel.cpp b/kpovmodeler/pmformulalabel.cpp
index 71ba62b6..1f1ffbf9 100644
--- a/kpovmodeler/pmformulalabel.cpp
+++ b/kpovmodeler/pmformulalabel.cpp
@@ -46,8 +46,8 @@ TQString PMFormulaLabel::s_digit[10] =
TQString PMFormulaLabel::s_nullString = TQString( "= 0" );
-PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
m_exponents[0] = exp.exponent( 0 );
m_exponents[1] = exp.exponent( 1 );
@@ -56,8 +56,8 @@ PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent,
calculateSizeHint( );
}
-PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name )
- : TQWidget( parent, name )
+PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* tqparent, const char* name )
+ : TQWidget( tqparent, name )
{
m_exponents[0] = x;
m_exponents[1] = y;
@@ -78,13 +78,13 @@ void PMFormulaLabel::drawContents( TQPainter* p )
int sum = m_exponents[0] + m_exponents[1] + m_exponents[2];
if( sum == 0 )
- p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_nullString );
+ p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_nullString );
else
{
// draw dot
int center = ( cr.top( ) + cr.bottom( ) ) / 2;
int rad = c_dotSize / 2;
- p->setBrush( TQBrush( colorGroup( ).text( ) ) );
+ p->setBrush( TQBrush( tqcolorGroup( ).text( ) ) );
p->drawEllipse( cr.left( ), center - rad, c_dotSize, c_dotSize );
cr.setLeft( cr.left( ) + c_dotSize + c_indent );
@@ -98,13 +98,13 @@ void PMFormulaLabel::drawContents( TQPainter* p )
if( m_exponents[i] > 0 )
{
- p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft, s_xyz[i] );
+ p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft, s_xyz[i] );
cr.setLeft( cr.left( ) + m1.width( s_xyz[i] ) );
if( m_exponents[i] > 1 )
{
cr.setBottom( cr.bottom( ) - up );
p->setFont( f2 );
- p->drawText( cr, Qt::AlignVCenter | Qt::AlignLeft,
+ p->drawText( cr, TQt::AlignVCenter | TQt::AlignLeft,
s_digit[m_exponents[i]] );
cr.setLeft( cr.left( ) + m2.width( s_digit[m_exponents[i]] ) + 1 );
cr.setBottom( cr.bottom( ) + up );
@@ -131,7 +131,7 @@ void PMFormulaLabel::calculateSizeHint( )
TQFontMetrics m1( font( ) );
if( sum == 0 )
- m_sizeHint.setWidth( m1.width( s_nullString ) );
+ m_tqsizeHint.setWidth( m1.width( s_nullString ) );
else
{
TQFontMetrics m2( exponentFont( ) );
@@ -146,19 +146,19 @@ void PMFormulaLabel::calculateSizeHint( )
width += m2.width( s_digit[m_exponents[i]] ) + 1;
}
}
- m_sizeHint.setWidth( width );
+ m_tqsizeHint.setWidth( width );
}
- m_sizeHint.setHeight( m1.height( ) + 7 );
+ m_tqsizeHint.setHeight( m1.height( ) + 7 );
}
-TQSize PMFormulaLabel::sizeHint( ) const
+TQSize PMFormulaLabel::tqsizeHint( ) const
{
- return minimumSizeHint( );
+ return tqminimumSizeHint( );
}
-TQSize PMFormulaLabel::minimumSizeHint( ) const
+TQSize PMFormulaLabel::tqminimumSizeHint( ) const
{
- return m_sizeHint;
+ return m_tqsizeHint;
}
void PMFormulaLabel::fontChange( const TQFont& )