From ea318d1431c89e647598c510c4245c6571aa5f46 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 26 Jan 2012 23:32:43 -0600 Subject: Update to latest tqt3 automated conversion --- doc/html/t10-cannon-cpp.html | 50 ++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'doc/html/t10-cannon-cpp.html') diff --git a/doc/html/t10-cannon-cpp.html b/doc/html/t10-cannon-cpp.html index 74b446bfd..dfcd661aa 100644 --- a/doc/html/t10-cannon-cpp.html +++ b/doc/html/t10-cannon-cpp.html @@ -39,16 +39,16 @@ body { background: #ffffff; color: black; } ****************************************************************/ #include "cannon.h" -#include <qpainter.h> -#include <qpixmap.h> +#include <ntqpainter.h> +#include <ntqpixmap.h> -CannonField::CannonField( TQWidget *parent, const char *name ) - : TQWidget( parent, name ) +CannonField::CannonField( TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { ang = 45; f = 0; - setPalette( TQPalette( TQColor( 250, 250, 200) ) ); + setPalette( TQPalette( TQColor( 250, 250, 200) ) ); } @@ -61,7 +61,7 @@ void CannonField::setAngle( int degrees ) if ( ang == degrees ) return; ang = degrees; - repaint( cannonRect(), FALSE ); + repaint( cannonRect(), FALSE ); emit angleChanged( ang ); } @@ -77,38 +77,38 @@ void CannonField::setForce( int newton ) } -void CannonField::paintEvent( TQPaintEvent *e ) +void CannonField::paintEvent( TQPaintEvent *e ) { if ( !e->rect().intersects( cannonRect() ) ) return; - TQRect cr = cannonRect(); - TQPixmap pix( cr.size() ); - pix.fill( this, cr.topLeft() ); - - TQPainter p( &pix ); - p.setBrush( blue ); - p.setPen( NoPen ); - p.translate( 0, pix.height() - 1 ); - p.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 ); - p.rotate( -ang ); - p.drawRect( TQRect(33, -4, 15, 8) ); - p.end(); - - p.begin( this ); - p.drawPixmap( cr.topLeft(), pix ); + TQRect cr = cannonRect(); + TQPixmap pix( cr.size() ); + pix.fill( this, cr.topLeft() ); + + TQPainter p( &pix ); + p.setBrush( blue ); + p.setPen( NoPen ); + p.translate( 0, pix.height() - 1 ); + p.drawPie( TQRect( -35,-35, 70, 70 ), 0, 90*16 ); + p.rotate( -ang ); + p.drawRect( TQRect(33, -4, 15, 8) ); + p.end(); + + p.begin( this ); + p.drawPixmap( cr.topLeft(), pix ); } TQRect CannonField::cannonRect() const { - TQRect r( 0, 0, 50, 50 ); - r.moveBottomLeft( rect().bottomLeft() ); + TQRect r( 0, 0, 50, 50 ); + r.moveBottomLeft( rect().bottomLeft() ); return r; } -TQSizePolicy CannonField::sizePolicy() const +TQSizePolicy CannonField::sizePolicy() const { return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); } -- cgit v1.2.1