diff options
Diffstat (limited to 'kalzium/src/detailedgraphicaloverview.cpp')
-rw-r--r-- | kalzium/src/detailedgraphicaloverview.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kalzium/src/detailedgraphicaloverview.cpp b/kalzium/src/detailedgraphicaloverview.cpp index d31e2579..67a4d231 100644 --- a/kalzium/src/detailedgraphicaloverview.cpp +++ b/kalzium/src/detailedgraphicaloverview.cpp @@ -28,14 +28,14 @@ email : cniehaus@kde.org #include <tqpixmap.h> #include <tqrect.h> -DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( Element *el, TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( el ); } -DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *parent, const char *name ) -: TQWidget( parent, name ) +DetailedGraphicalOverview::DetailedGraphicalOverview( TQWidget *tqparent, const char *name ) +: TQWidget( tqparent, name ) { init( 0L ); } @@ -59,12 +59,12 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) TQPainter p; p.begin( &pm ); - p.setBrush(Qt::SolidPattern); + p.setBrush(TQt::SolidPattern); if ( !m_element ) { pm.fill( paletteBackgroundColor() ); - p.drawText( 0, 0, w, h, Qt::AlignCenter | Qt::WordBreak, i18n( "No element selected" ) ); + p.drawText( 0, 0, w, h, TQt::AlignCenter | TQt::WordBreak, i18n( "No element selected" ) ); } else { @@ -80,8 +80,8 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setBrush( m_element->elementColor() ); p.drawRect( x1 , y1 , x2 , y2 ); - p.setBrush( Qt::black ); - p.setBrush(Qt::NoBrush); + p.setBrush( TQt::black ); + p.setBrush(TQt::NoBrush); TQFont fA = KGlobalSettings::generalFont(); TQFont fB = KGlobalSettings::generalFont(); @@ -126,20 +126,20 @@ void DetailedGraphicalOverview::paintEvent( TQPaintEvent* ) p.setFont( fC ); //Name - p.drawText( 1, 0, w/2, h, Qt::AlignLeft, m_element->elname() ); + p.drawText( 1, 0, w/2, h, TQt::AlignLeft, m_element->elname() ); //Oxidationstates fC.setPointSize( size2 ); p.setFont( fC ); int offsetOx = KalziumUtils::StringHeight( strLocalizedMass , fC, &p ); - p.drawText( 1, h-offsetOx, w/2, offsetOx, Qt::AlignLeft, m_element->oxstage() ); + p.drawText( 1, h-offsetOx, w/2, offsetOx, TQt::AlignLeft, m_element->oxstage() ); //Mass fC.setPointSize( size3 ); p.setFont( fC ); int offset = KalziumUtils::StringHeight( strLocalizedMass, fC, &p ); - p.drawText( w/2, h-offset, w/2, offset, Qt::AlignRight, strLocalizedMass ); + p.drawText( w/2, h-offset, w/2, offset, TQt::AlignRight, strLocalizedMass ); drawBiologicalSymbol( &p ); } @@ -164,9 +164,9 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) if ( m_element->biological() > 0 ) { const int radius = db + 8; - p->setBrush( Qt::SolidPattern ); - p->setBrush( Qt::white ); - p->setPen( Qt::black ); + p->setBrush( TQt::SolidPattern ); + p->setBrush( TQt::white ); + p->setPen( TQt::black ); p->drawRoundRect( TQRect( width() - radius, -radius, 2 * radius, @@ -178,52 +178,52 @@ void DetailedGraphicalOverview::drawBiologicalSymbol( TQPainter *p ) case 0: //nothing break; case 1: //red, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::red ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::red ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 2: //green, red - p->setBrush( Qt::red ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::red ); + p->setBrush( TQt::red ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::red ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 3: //green - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 4: //green, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::green ); - p->setPen( Qt::green ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::green ); + p->setPen( TQt::green ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 5: //blue - p->setBrush(Qt::SolidPattern); - p->setBrush( Qt::blue ); - p->setPen( Qt::blue ); + p->setBrush(TQt::SolidPattern); + p->setBrush( TQt::blue ); + p->setPen( TQt::blue ); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; case 6: //blue, blue - p->setBrush( Qt::blue ); - p->setBrush(Qt::NoBrush); - p->setPen( Qt::blue ); + p->setBrush( TQt::blue ); + p->setBrush(TQt::NoBrush); + p->setPen( TQt::blue ); p->drawEllipse( pos_x,pos_y,db,db ); - p->setBrush(Qt::SolidPattern); + p->setBrush(TQt::SolidPattern); p->drawEllipse( pos_x+d_ds, pos_y+d_ds, ds, ds ); break; } |