From fef846914f8db6dc117e206ef913d519bf6bb33e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 29 Jul 2024 12:43:23 +0900 Subject: Rename basic widget nt* related files to equivalent tq* Signed-off-by: Michele Calgaro --- doc/tutorial.doc | 66 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 33 insertions(+), 33 deletions(-) (limited to 'doc/tutorial.doc') diff --git a/doc/tutorial.doc b/doc/tutorial.doc index 6528e00e8..80b0138e0 100644 --- a/doc/tutorial.doc +++ b/doc/tutorial.doc @@ -103,19 +103,19 @@ exactly one QApplication object in every application that uses Qt. QApplication manages various application-wide resources, such as the default font and cursor. -\printline qpushbutton +\printline tqpushbutton -This line includes the QPushButton class definition. The +This line includes the TQPushButton class definition. The \link hierarchy.html reference documentation \endlink for each class mentions at the top which file needs to be included to use that class. -QPushButton is a classical GUI push button that the user can press +TQPushButton is a classical GUI push button that the user can press and release. It manages its own look and feel, like every other \l 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 TQPixmap. +TQPushButton can show either a text or a \l TQPixmap. \printline main \printline { @@ -141,7 +141,7 @@ QApplication::argv() documentation for details. Note: It is essential that the QApplication object be created before any window-system parts of TQt are used. -\printline QPushButton +\printline TQPushButton Here, \e after the QApplication, comes the first window-system code: A push button is created. @@ -239,8 +239,8 @@ 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. -\skipto QPushButton -\printline QPushButton +\skipto TQPushButton +\printline TQPushButton This time, the button says "Quit" and that's exactly what the program will do when the user clicks the button. This is not a coincidence. @@ -292,8 +292,8 @@ makefile and build the application.) Try to resize the window. Press the button. Oops! That connect() would seem to make some difference. -Are there any other signals in QPushButton you can connect to quit? -Hint: The QPushButton inherits most of its behavior from QButton. +Are there any other signals in TQPushButton you can connect to quit? +Hint: The TQPushButton inherits most of its behavior from QButton. You're now ready for \link tutorial1-03.html Chapter 3.\endlink @@ -338,7 +338,7 @@ We set its width to 200 pixels and the height to 120 pixels. A child is born. -This QPushButton is created with both a text ("Quit") and a parent +This TQPushButton is created with both a text ("Quit") and a parent (box). A child widget is always on top of its parent. When displayed, it is clipped by its parent's bounds. @@ -477,7 +477,7 @@ makefile and build the application.) Try to create another MyWidget object in main(). What happens? -Try to add more buttons or put in widgets other than QPushButton. +Try to add more buttons or put in widgets other than TQPushButton. You're now ready for \link tutorial1-05.html Chapter 5.\endlink @@ -504,8 +504,8 @@ by using signals and slots, and how to handle resize events. \skipto qapp \printuntil qvbox -Three new include files are shown here. ntqslider.h and ntqlcdnumber.h are there -because we use two new widgets, QSlider and QLCDNumber. ntqvbox.h is +Three new include files are shown here. tqslider.h and tqlcdnumber.h are there +because we use two new widgets, TQSlider and TQLCDNumber. ntqvbox.h is here because we use Qt's automatic layout support. \skipto MyWidget @@ -522,18 +522,18 @@ therefore by MyWidget, too. \skipto lcd \printline lcd -\c lcd is a QLCDNumber, a widget that displays numbers in an LCD-like +\c lcd is a TQLCDNumber, a widget that displays numbers in an LCD-like fashion. This instance is set up to display two digits and to be a child of \e this. It is named "lcd". -\printline QSlider +\printline TQSlider \printline slider \printline slider -QSlider is a classical slider; the user can use the widget to drag +TQSlider is a classical slider; the user can use the widget to drag something to adjust an integer value in a range. Here we create a horizontal one, set its range to 0-99 (inclusive, see the \l -QSlider::setRange() documentation) and its initial value to 0. +TQSlider::setRange() documentation) and its initial value to 0. \printline connect @@ -563,12 +563,12 @@ makefile and build the application.) \section1 Exercises Try changing the LCD number to add more digits or \link -QLCDNumber::setMode() to change mode.\endlink You can even add four push +TQLCDNumber::setMode() to change mode.\endlink You can even add four push buttons to set the number base. You can also change the slider's range. -Perhaps it would have been better to use \l QSpinBox than a slider? +Perhaps it would have been better to use \l TQSpinBox than a slider? Try to make the application quit when the LCD number overflows. @@ -709,14 +709,14 @@ header file. \c ntqvbox.h is included. LCDRange inherits QVBox, and the header file of a parent class must always be included. We cheated a bit in the previous chapters, and we let \c tqwidget.h be included indirectly via -other header files such as \c ntqpushbutton.h. +other header files such as \c tqpushbutton.h. -\printline QSlider +\printline TQSlider This is another classic trick, but one that's much less used often. Because -we don't need QSlider in the \e interface of the class, only in the +we don't need TQSlider in the \e interface of the class, only in the implementation, we use a forward declaration of the class in the -header file and include the header file for QSlider in the .cpp +header file and include the header file for TQSlider in the .cpp file. This makes the compilation of big projects much faster, because when a @@ -778,15 +778,15 @@ the first is emitted, the second signal is also emitted. Let's look at what happens when the user operates the slider. The slider sees that its value has changed and emits the valueChanged() signal. That signal is connected both to the display() slot of the -QLCDNumber and to the valueChanged() signal of the LCDRange. +TQLCDNumber and to the valueChanged() signal of the LCDRange. Thus, when the signal is emitted, LCDRange emits its own -valueChanged() signal. In addition, QLCDNumber::display() is called +valueChanged() signal. In addition, TQLCDNumber::display() is called and shows the new number. Note that you're not guaranteed any particular order of execution - LCDRange::valueChanged() may be emitted before or after -QLCDNumber::display()and is entirely arbitrary. +TQLCDNumber::display()and is entirely arbitrary. \skipto LCDRange::value \printuntil } @@ -912,9 +912,9 @@ There is a change to the constructor (we'll discuss that later). \printline } SetRange() sets the range of the slider in the LCDRange. Because we -have set up the QLCDNumber to always display two digits, we want to +have set up the TQLCDNumber to always display two digits, we want to limit the possible range of \c minVal and \c maxVal to 0..99 to avoid -overflow of the QLCDNumber. (We could have allowed values down to -9 +overflow of the TQLCDNumber. (We could have allowed values down to -9 but chose not to.) If the arguments are illegal, we use Qt's tqWarning() function to issue a warning to the user and return immediately. tqWarning() is a printf-like function that by default @@ -1102,7 +1102,7 @@ to be terribly useful. However, its constructor just got a new line: The LCDRange sets the slider to be its focus proxy. That means that when someone (the program or the user) wants to give the LCDRange -keyboard focus, the slider should take care of it. QSlider has a decent +keyboard focus, the slider should take care of it. TQSlider has a decent keyboard interface, so with just one line of code we've given LCDRange one. @@ -1489,7 +1489,7 @@ Put the cannon in the bottom-right corner. Try adding a better keyboard interface. For example, make + and - increase and decrease the force and enter shoot. Hint: \l QAccel and new addStep() and subtractStep() slots in LCDRange, like \l -QSlider::addStep(). If you're bothered by the way the left and right +TQSlider::addStep(). If you're bothered by the way the left and right keys work (I am!), change that too. You're now ready for \link tutorial1-11.html Chapter 11.\endlink @@ -2104,7 +2104,7 @@ widget's children. \printline addWidget -At the top we add the QLCDNumber with a non-zero stretch. +At the top we add the TQLCDNumber with a non-zero stretch. \printline addWidget \printline addWidget @@ -2113,7 +2113,7 @@ Then we add the other two, both with the default zero stretch. This stretch control is something QVBoxLayout (and QHBoxLayout, and QGridLayout) offers but classes like QVBox do not. In this case -we're saying that the QLCDNumber should stretch and the others should +we're saying that the TQLCDNumber should stretch and the others should not. \section2 \l t13/cannon.h @@ -2223,7 +2223,7 @@ which was last seen as MyWidget. \printuntil }; We have now added four slots. These are protected and are used internally. -We have also added two QLCDNumbers (\c hits and \c shotsLeft) which display +We have also added two TQLCDNumbers (\c hits and \c shotsLeft) which display the game status. -- cgit v1.2.1