summaryrefslogtreecommitdiffstats
path: root/doc/html/tutorial1-14.html
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:07:22 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-06-02 23:22:42 +0900
commit8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 (patch)
treeb95884617b9a37accc843676d5d42be4116a3f54 /doc/html/tutorial1-14.html
parent68b81013e8668f50fc18b7e26a520ec93a7a1251 (diff)
downloadtqt3-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/tutorial1-14.html')
-rw-r--r--doc/html/tutorial1-14.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/doc/html/tutorial1-14.html b/doc/html/tutorial1-14.html
index 094c8081..c0fcc00f 100644
--- a/doc/html/tutorial1-14.html
+++ b/doc/html/tutorial1-14.html
@@ -95,7 +95,7 @@ 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="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<p> <pre> void CannonField::<a href="tqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
if ( e-&gt;<a href="qmouseevent.html#button">button</a>() != LeftButton )
return;
@@ -111,23 +111,23 @@ 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="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<p> <pre> 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-&gt;<a href="qmouseevent.html#pos">pos</a>();
<a name="x2424"></a> if ( pnt.<a href="ntqpoint.html#x">x</a>() &lt;= 0 )
<a name="x2422"></a> pnt.<a href="ntqpoint.html#setX">setX</a>( 1 );
- <a name="x2425"></a> if ( pnt.<a href="ntqpoint.html#y">y</a>() &gt;= <a href="ntqwidget.html#height">height</a>() )
- <a name="x2423"></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>());
+ <a name="x2425"></a> if ( pnt.<a href="ntqpoint.html#y">y</a>() &gt;= <a href="tqwidget.html#height">height</a>() )
+ <a name="x2423"></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 ) );
}
</pre>
<p> This is another TQt event handler. It is called when the user already
has pressed the mouse button inside this widget and then moves/drags
the mouse. (You can make TQt send mouse move events even when no
-buttons are pressed. See <a href="ntqwidget.html#setMouseTracking">TQWidget::setMouseTracking</a>().)
+buttons are pressed. See <a href="tqwidget.html#setMouseTracking">TQWidget::setMouseTracking</a>().)
<p> This handler repositions the cannon's barrel according to the position of
the mouse cursor.
<p> First, if the barrel is not pressed, we return. Next, we fetch the
@@ -138,7 +138,7 @@ 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="ntqwidget.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="qmouseevent.html">TQMouseEvent</a> *e )
{
<a name="x2417"></a> if ( e-&gt;<a href="qmouseevent.html#button">button</a>() == LeftButton )
barrelPressed = FALSE;