diff options
Diffstat (limited to 'doc/tutorial.doc')
-rw-r--r-- | doc/tutorial.doc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/doc/tutorial.doc b/doc/tutorial.doc index 2db273612..43a2068f3 100644 --- a/doc/tutorial.doc +++ b/doc/tutorial.doc @@ -115,7 +115,7 @@ TQWidget. A widget is a user interface object that can process user input and draw graphics. The programmer can change both the overall \link QApplication::setStyle() look and feel\endlink and many minor properties of it (such as color), as well as the widget's content. A -QPushButton can show either a text or a \l QPixmap. +QPushButton can show either a text or a \l TQPixmap. \printline main \printline { @@ -1235,7 +1235,7 @@ coordinate system has been transformed (translated, rotated, scaled, or sheared) as above. In this case the coordinate system is first translated and then rotated. -If the rectangle QRect(33, -4, 15, 8) had been drawn in the translated +If the rectangle TQRect(33, -4, 15, 8) had been drawn in the translated coordinate system, it would have looked like this: \img t9_1.png The cannon translated but not rotated @@ -1357,7 +1357,7 @@ The force is stored in the integer \c f. \skipto pixmap \printline pixmap -We include the QPixmap class definition. +We include the TQPixmap class definition. \skipto ::CannonField \printuntil } @@ -1602,7 +1602,7 @@ milliseconds when the TQTimer fires. Its tasks are to compute the new position, repaint the screen with the shot in the new position, and if necessary, stop the timer. -First we make a \l QRegion that holds the old shotRect(). A QRegion +First we make a \l TQRegion that holds the old shotRect(). A TQRegion is capable of holding any sort of region, and we'll use it here to simplify the painting. ShotRect() returns the rectangle where the shot is now - it is explained in detail later. @@ -1613,9 +1613,9 @@ shot one step along its trajectory. Next we fetch the new shot rectangle. If the shot has moved beyond the right or bottom edge of the widget, we -stop the timer or we add the new shotRect() to the QRegion. +stop the timer or we add the new shotRect() to the TQRegion. -Finally, we repaint the QRegion. This will send a single paint event +Finally, we repaint the TQRegion. This will send a single paint event for just the one or two rectangles that need updating. \skipto ::paintEvent @@ -1649,7 +1649,7 @@ disregard any Einsteinian effects. We calculate the center point in a coordinate system where y coordinates increase upward. After we have calculated the center -point, we construct a QRect with size 6x6 and move its center point to +point, we construct a TQRect with size 6x6 and move its center point to the point calculated above. In the same operation we convert the point into the widget's coordinate system (see \link coordsys.html The Coordinate System\endlink). @@ -1915,7 +1915,7 @@ By experimentation we have found this to always be in reach of the shot. Note that rand() returns a random integer >= 0. \skipto ::moveShot -\printuntil QRect +\printuntil TQRect This part of the timer event has not changed from the previous chapter. @@ -1962,7 +1962,7 @@ with a black outline. This private function returns the enclosing rectangle of the target. Remember from newTarget() that the \c target point uses y coordinate 0 at the bottom of the widget. We calculate the point in widget coordinates -before we call \l QRect::moveCenter(). +before we call \l TQRect::moveCenter(). The reason we have chosen this coordinate mapping is to fix the distance between the target and the bottom of the widget. Remember that the widget @@ -2003,7 +2003,7 @@ Make a cheat button that, when pressed, makes the CannonField display the shot trajectory for five seconds. If you did the "round shot" exercise from the previous chapter, try -changing the shotRect() to a shotRegion() that returns a \l QRegion so +changing the shotRect() to a shotRegion() that returns a \l TQRegion so you can have really accurate collision detection. Make a moving target. @@ -2540,10 +2540,10 @@ the bottom edge of the barrier to the bottom edge of the widget. This function returns TRUE if the point is in the barrel; otherwise it returns FALSE. -Here we use the class \l QWMatrix. It is defined in the header file -ntqwmatrix.h, which is included by tqpainter.h. +Here we use the class \l TQWMatrix. It is defined in the header file +tqwmatrix.h, which is included by tqpainter.h. -QWMatrix defines a coordinate system mapping. It can perform the same +TQWMatrix defines a coordinate system mapping. It can perform the same transformations as the TQPainter. Here we perform the same transformation steps as we do when drawing |