diff options
Diffstat (limited to 'doc/tutorial.doc')
-rw-r--r-- | doc/tutorial.doc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/doc/tutorial.doc b/doc/tutorial.doc index 53b6029ec..2db273612 100644 --- a/doc/tutorial.doc +++ b/doc/tutorial.doc @@ -232,10 +232,10 @@ We will also use a font that is more exciting than the default one. \section1 Line-by-line Walkthrough -\skipto qfont -\printline qfont +\skipto tqfont +\printline tqfont -Since this program uses QFont, it needs to include ntqfont.h. Qt's font +Since this program uses TQFont, it needs to include tqfont.h. Qt's font abstraction is rather different from the horror provided by X, and loading and using fonts has been highly optimized. @@ -249,7 +249,7 @@ We still pass 0 as the parent, since the button is a top-level window. \printline resize We've chosen another size for the button since the text is a bit -shorter than "Hello world!". We could also have used \l QFontMetrics +shorter than "Hello world!". We could also have used \l TQFontMetrics to set right size. \printline setFont @@ -990,14 +990,14 @@ not regular C++ syntax. In fact, it is a macro. \printline } This is our first attempt to write a paint event handler. The event -argument contains a description of the paint event. \l QPaintEvent +argument contains a description of the paint event. \l TQPaintEvent contains the region in the widget that must be updated. For the time being, we will be lazy and just paint everything. Our code displays the angle value in the widget at a fixed position. First we create a TQString with some text and the angle; then we create -a QPainter operating on this widget and use it to paint the string. -We'll come back to QPainter later; it can do a great many things. +a TQPainter operating on this widget and use it to paint the string. +We'll come back to TQPainter later; it can do a great many things. \section2 \l t8/main.cpp @@ -1181,20 +1181,20 @@ implementation. \quotefile t9/cannon.cpp \skipto ::paintEvent -\printuntil QPainter +\printuntil TQPainter -We'll now start to use QPainter in earnest. We create a painter that +We'll now start to use TQPainter in earnest. We create a painter that operates on this widget. \printline setBrush -When QPainter fills a rectangle, a circle, or whatever, it fills the +When TQPainter fills a rectangle, a circle, or whatever, it fills the shape using its brush. Here we set it to use a blue brush. (We could also use a pattern.) \printline setPen -And the edges of what QPainter draws are drawn using the pen. Here we +And the edges of what TQPainter draws are drawn using the pen. Here we set it to NoPen, meaning that there will be no special edge when we draw something; the blue brush will go all the way to the edges of the things we draw. @@ -1202,8 +1202,8 @@ the things we draw. \skipto translate \printline translate -The \l QPainter::translate() function translates the coordinate -system of the QPainter; i.e., it moves it by an offset. Here we set +The \l TQPainter::translate() function translates the coordinate +system of the TQPainter; i.e., it moves it by an offset. Here we set the (0, 0) point to the bottom-left corner of the widget. The x and y directions remain unchanged, i.e., all the y coordinates inside the widget are now negative (see \link coordsys.html The Coordinate @@ -1220,14 +1220,14 @@ is filled with blue and has no outline. \printline rotate -The QPainter::rotate() function rotates the coordinate system of the -QPainter around the origin. The rotation argument is a \c float given +The TQPainter::rotate() function rotates the coordinate system of the +TQPainter around the origin. The rotation argument is a \c float given in degrees (not given in 1/16th of a degree as above) and clockwise. Here we rotate the coordinate system \c ang degrees counter-clockwise. \printline drawRect -The QPainter::drawRect() function draws the specified rectangle. Here +The TQPainter::drawRect() function draws the specified rectangle. Here we draw the barrel of the cannon. It can often be difficult to envision the resulting drawing when the @@ -1404,7 +1404,7 @@ not any more. We've kept the code for educational purposes. We fill the pixmap with the background from this widget. -\printline QPainter +\printline TQPainter \printuntil end We paint, as in Chapter 9, but now we paint in the pixmap. @@ -1692,7 +1692,7 @@ makefile and build the application.) \section1 Exercises -Make the shot a filled circle. Hint: \l QPainter::drawEllipse() may +Make the shot a filled circle. Hint: \l TQPainter::drawEllipse() may help. Change the color of the cannon when a shot is in the air. @@ -2541,10 +2541,10 @@ 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 ntqpainter.h. +ntqwmatrix.h, which is included by tqpainter.h. QWMatrix defines a coordinate system mapping. It can perform the same -transformations as the QPainter. +transformations as the TQPainter. Here we perform the same transformation steps as we do when drawing the barrel in the paintCannon() function. First we translate the |