diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-02 23:07:22 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-06-02 23:22:42 +0900 |
commit | 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch) | |
tree | b95884617b9a37accc843676d5d42be4116a3f54 /doc/html/t14-cannon-cpp.html | |
parent | 68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff) | |
download | tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.tar.gz tqt3-8ac0e970e4464d9f8f73c0fb34a178ff135be8c3.zip |
Rename ntqwidget* related files to equivalent tqwidget*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/t14-cannon-cpp.html')
-rw-r--r-- | doc/html/t14-cannon-cpp.html | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/doc/html/t14-cannon-cpp.html b/doc/html/t14-cannon-cpp.html index 88d65e9c5..625040533 100644 --- a/doc/html/t14-cannon-cpp.html +++ b/doc/html/t14-cannon-cpp.html @@ -48,8 +48,8 @@ body { background: #ffffff; color: black; } #include <stdlib.h> -<a name="f121"></a>CannonField::CannonField( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="ntqwidget.html">TQWidget</a>( parent, name ) +<a name="f121"></a>CannonField::CannonField( <a href="tqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="tqwidget.html">TQWidget</a>( parent, name ) { ang = 45; f = 0; @@ -62,7 +62,7 @@ body { background: #ffffff; color: black; } target = TQPoint( 0, 0 ); gameEnded = FALSE; barrelPressed = FALSE; - <a href="ntqwidget.html#setPalette">setPalette</a>( TQPalette( TQColor( 250, 250, 200) ) ); + <a href="tqwidget.html#setPalette">setPalette</a>( TQPalette( TQColor( 250, 250, 200) ) ); newTarget(); } @@ -76,7 +76,7 @@ void <a name="f122"></a>CannonField::setAngle( int degrees ) if ( ang == degrees ) return; ang = degrees; - <a href="ntqwidget.html#repaint">repaint</a>( cannonRect(), FALSE ); + <a href="tqwidget.html#repaint">repaint</a>( cannonRect(), FALSE ); emit angleChanged( ang ); } @@ -115,7 +115,7 @@ void <a name="f125"></a>CannonField::newTarget() <a href="ntqregion.html">TQRegion</a> r( targetRect() ); target = TQPoint( 200 + rand() % 190, 10 + rand() % 255 ); - <a href="ntqwidget.html#repaint">repaint</a>( r.<a href="ntqrect.html#unite">unite</a>( targetRect() ) ); + <a href="tqwidget.html#repaint">repaint</a>( r.<a href="ntqrect.html#unite">unite</a>( targetRect() ) ); } void <a name="f126"></a>CannonField::setGameOver() @@ -125,7 +125,7 @@ void <a name="f126"></a>CannonField::setGameOver() if ( isShooting() ) autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); gameEnded = TRUE; - <a href="ntqwidget.html#repaint">repaint</a>(); + <a href="tqwidget.html#repaint">repaint</a>(); } void <a name="f127"></a>CannonField::restartGame() @@ -133,7 +133,7 @@ void <a name="f127"></a>CannonField::restartGame() if ( isShooting() ) autoShootTimer-><a href="ntqtimer.html#stop">stop</a>(); gameEnded = FALSE; - <a href="ntqwidget.html#repaint">repaint</a>(); + <a href="tqwidget.html#repaint">repaint</a>(); emit canShoot( TRUE ); } @@ -157,11 +157,11 @@ void <a name="f128"></a>CannonField::moveShot() r = r.<a href="ntqrect.html#unite">unite</a>( TQRegion( shotR ) ); } - <a href="ntqwidget.html#repaint">repaint</a>( r ); + <a href="tqwidget.html#repaint">repaint</a>( r ); } -void CannonField::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +void CannonField::<a href="tqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { if ( e-><a href="qmouseevent.html#button">button</a>() != LeftButton ) return; @@ -170,28 +170,28 @@ void CannonField::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( } -void CannonField::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +void CannonField::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { if ( !barrelPressed ) return; <a href="ntqpoint.html">TQPoint</a> pnt = e-><a href="qmouseevent.html#pos">pos</a>(); if ( pnt.<a href="ntqpoint.html#x">x</a>() <= 0 ) pnt.<a href="ntqpoint.html#setX">setX</a>( 1 ); - if ( pnt.<a href="ntqpoint.html#y">y</a>() >= <a href="ntqwidget.html#height">height</a>() ) - pnt.<a href="ntqpoint.html#setY">setY</a>( <a href="ntqwidget.html#height">height</a>() - 1 ); - double rad = atan(((double)<a href="ntqwidget.html#rect">rect</a>().bottom()-pnt.<a href="ntqpoint.html#y">y</a>())/pnt.<a href="ntqpoint.html#x">x</a>()); + if ( pnt.<a href="ntqpoint.html#y">y</a>() >= <a href="tqwidget.html#height">height</a>() ) + pnt.<a href="ntqpoint.html#setY">setY</a>( <a href="tqwidget.html#height">height</a>() - 1 ); + double rad = atan(((double)<a href="tqwidget.html#rect">rect</a>().bottom()-pnt.<a href="ntqpoint.html#y">y</a>())/pnt.<a href="ntqpoint.html#x">x</a>()); setAngle( tqRound ( rad*180/3.14159265 ) ); } -void CannonField::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +void CannonField::<a href="tqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) { if ( e-><a href="qmouseevent.html#button">button</a>() == LeftButton ) barrelPressed = FALSE; } -void CannonField::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e ) +void CannonField::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> *e ) { <a href="ntqrect.html">TQRect</a> updateR = e-><a href="qpaintevent.html#rect">rect</a>(); <a href="ntqpainter.html">TQPainter</a> p( this ); @@ -199,7 +199,7 @@ void CannonField::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="q if ( gameEnded ) { p.<a href="ntqpainter.html#setPen">setPen</a>( black ); p.<a href="ntqpainter.html#setFont">setFont</a>( TQFont( "Courier", 48, TQFont::Bold ) ); - p.<a href="ntqpainter.html#drawText">drawText</a>( <a href="ntqwidget.html#rect">rect</a>(), AlignCenter, "Game Over" ); + p.<a href="ntqpainter.html#drawText">drawText</a>( <a href="tqwidget.html#rect">rect</a>(), AlignCenter, "Game Over" ); } if ( updateR.<a href="ntqrect.html#intersects">intersects</a>( cannonRect() ) ) paintCannon( &p ); @@ -258,7 +258,7 @@ void <a name="f132"></a>CannonField::paintCannon( <a href="ntqpainter.html">TQPa TQRect <a name="f133"></a>CannonField::cannonRect() const { <a href="ntqrect.html">TQRect</a> r( 0, 0, 50, 50 ); - r.<a href="ntqrect.html#moveBottomLeft">moveBottomLeft</a>( <a href="ntqwidget.html#rect">rect</a>().bottomLeft() ); + r.<a href="ntqrect.html#moveBottomLeft">moveBottomLeft</a>( <a href="tqwidget.html#rect">rect</a>().bottomLeft() ); return r; } @@ -314,13 +314,13 @@ bool <a name="f138"></a>CannonField::isShooting() const } -TQSize CannonField::<a href="ntqwidget.html#sizeHint">sizeHint</a>() const +TQSize CannonField::<a href="tqwidget.html#sizeHint">sizeHint</a>() const { return TQSize( 400, 300 ); } -TQSizePolicy CannonField::<a href="ntqwidget.html#sizePolicy">sizePolicy</a>() const +TQSizePolicy CannonField::<a href="tqwidget.html#sizePolicy">sizePolicy</a>() const { return TQSizePolicy( TQSizePolicy::Expanding, TQSizePolicy::Expanding ); } |