diff options
Diffstat (limited to 'doc/html/tutorial1-14.html')
-rw-r--r-- | doc/html/tutorial1-14.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/doc/html/tutorial1-14.html b/doc/html/tutorial1-14.html index 6e1712f1c..5dfcb5d94 100644 --- a/doc/html/tutorial1-14.html +++ b/doc/html/tutorial1-14.html @@ -63,9 +63,9 @@ wall. <p> <pre> protected: void paintEvent( <a href="tqpaintevent.html">TQPaintEvent</a> * ); - void mousePressEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); - void mouseMoveEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); - void mouseReleaseEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); + void mousePressEvent( <a href="tqmouseevent.html">TQMouseEvent</a> * ); + void mouseMoveEvent( <a href="tqmouseevent.html">TQMouseEvent</a> * ); + void mouseReleaseEvent( <a href="tqmouseevent.html">TQMouseEvent</a> * ); </pre> <p> In addition to the familiar event handlers, CannonField implements three mouse event handlers. The names say it all. @@ -95,11 +95,11 @@ not pressed on the barrel. </pre> <p> Now that we have a barrier, there are three ways to miss. We test for the third, too. -<p> <pre> void CannonField::<a href="tqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +<p> <pre> void CannonField::<a href="tqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="tqmouseevent.html">TQMouseEvent</a> *e ) { - if ( e-><a href="qmouseevent.html#button">button</a>() != LeftButton ) + if ( e-><a href="tqmouseevent.html#button">button</a>() != LeftButton ) return; - <a name="x2418"></a> if ( barrelHit( e-><a href="qmouseevent.html#pos">pos</a>() ) ) + <a name="x2418"></a> if ( barrelHit( e-><a href="tqmouseevent.html#pos">pos</a>() ) ) barrelPressed = TRUE; } </pre> @@ -111,11 +111,11 @@ is within the cannon's barrel. If it is, we set <tt>barrelPressed</tt> to TRUE. <p> Notice that the pos() function returns a point in the widget's coordinate system. -<p> <pre> void CannonField::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +<p> <pre> void CannonField::<a href="tqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="tqmouseevent.html">TQMouseEvent</a> *e ) { if ( !barrelPressed ) return; - <a href="tqpoint.html">TQPoint</a> pnt = e-><a href="qmouseevent.html#pos">pos</a>(); + <a href="tqpoint.html">TQPoint</a> pnt = e-><a href="tqmouseevent.html#pos">pos</a>(); <a name="x2424"></a> if ( pnt.<a href="tqpoint.html#x">x</a>() <= 0 ) <a name="x2422"></a> pnt.<a href="tqpoint.html#setX">setX</a>( 1 ); <a name="x2425"></a> if ( pnt.<a href="tqpoint.html#y">y</a>() >= <a href="tqwidget.html#height">height</a>() ) @@ -138,9 +138,9 @@ the imaginary line between the bottom-left corner of the widget and the cursor position. Finally we set the cannon's angle to the new value converted to degrees. <p> Remember that setAngle() redraws the cannon. -<p> <pre> <a name="x2432"></a>void CannonField::<a href="tqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e ) +<p> <pre> <a name="x2432"></a>void CannonField::<a href="tqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="tqmouseevent.html">TQMouseEvent</a> *e ) { - <a name="x2417"></a> if ( e-><a href="qmouseevent.html#button">button</a>() == LeftButton ) + <a name="x2417"></a> if ( e-><a href="tqmouseevent.html#button">button</a>() == LeftButton ) barrelPressed = FALSE; } </pre> |