diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-29 12:43:23 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-29 12:43:23 +0900 |
commit | fef846914f8db6dc117e206ef913d519bf6bb33e (patch) | |
tree | d6567b31f7f22d0c8c66eec947dff1960efa25ac /doc/html/tutorial1-07.html | |
parent | 8ef4ea451dd81dd66b34ed31aaa631f6df24a192 (diff) | |
download | tqt3-fef846914f8db6dc117e206ef913d519bf6bb33e.tar.gz tqt3-fef846914f8db6dc117e206ef913d519bf6bb33e.zip |
Rename basic widget nt* related files to equivalent tq*
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/tutorial1-07.html')
-rw-r--r-- | doc/html/tutorial1-07.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/html/tutorial1-07.html b/doc/html/tutorial1-07.html index 5d8fc4bec..0de193aeb 100644 --- a/doc/html/tutorial1-07.html +++ b/doc/html/tutorial1-07.html @@ -62,11 +62,11 @@ header file. <p> <a href="qvbox-h.html">ntqvbox.h</a> is included. LCDRange inherits <a href="ntqvbox.html">TQVBox</a>, and the header file of a parent class must always be included. We cheated a bit in the previous chapters, and we let <a href="tqwidget-h.html">tqwidget.h</a> be included indirectly via -other header files such as <a href="qpushbutton-h.html">ntqpushbutton.h</a>. +other header files such as <a href="tqpushbutton-h.html">tqpushbutton.h</a>. <p> <pre> class TQSlider; </pre> <p> This is another classic trick, but one that's much less used often. Because -we don't need <a href="ntqslider.html">TQSlider</a> in the <em>interface</em> of the class, only in the +we don't need <a href="tqslider.html">TQSlider</a> in the <em>interface</em> 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 TQSlider in the .cpp file. @@ -110,9 +110,9 @@ signal you'll see called <i>something</i>Changed(). <p> This file is mainly lifted from <a href="tutorial1-06.html#main">t6/main.cpp</a>, and only the changes are noted here. -<p> <pre> <a name="x2333"></a> <a href="tqobject.html#connect">connect</a>( slider, TQ_SIGNAL(<a href="ntqslider.html#valueChanged">valueChanged</a>(int)), - <a name="x2330"></a> lcd, TQ_SLOT(<a href="ntqlcdnumber.html#display">display</a>(int)) ); - <a href="tqobject.html#connect">connect</a>( slider, TQ_SIGNAL(<a href="ntqslider.html#valueChanged">valueChanged</a>(int)), +<p> <pre> <a name="x2333"></a> <a href="tqobject.html#connect">connect</a>( slider, TQ_SIGNAL(<a href="tqslider.html#valueChanged">valueChanged</a>(int)), + <a name="x2330"></a> lcd, TQ_SLOT(<a href="tqlcdnumber.html#display">display</a>(int)) ); + <a href="tqobject.html#connect">connect</a>( slider, TQ_SIGNAL(<a href="tqslider.html#valueChanged">valueChanged</a>(int)), TQ_SIGNAL(valueChanged(int)) ); </pre> <p> This code is from the LCDRange constructor. @@ -125,23 +125,23 @@ the first is emitted, the second signal is also emitted. <p> 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 -<a href="ntqlcdnumber.html">TQLCDNumber</a> and to the valueChanged() signal of the LCDRange. +<a href="tqlcdnumber.html">TQLCDNumber</a> and to the valueChanged() signal of the LCDRange. <p> Thus, when the signal is emitted, LCDRange emits its own -valueChanged() signal. In addition, <a href="ntqlcdnumber.html#display">TQLCDNumber::display</a>() is called +valueChanged() signal. In addition, <a href="tqlcdnumber.html#display">TQLCDNumber::display</a>() is called and shows the new number. <p> Note that you're not guaranteed any particular order of execution - LCDRange::valueChanged() may be emitted before or after TQLCDNumber::display()and is entirely arbitrary. <p> <pre> int LCDRange::value() const { - <a name="x2332"></a> return slider-><a href="ntqslider.html#value">value</a>(); + <a name="x2332"></a> return slider-><a href="tqslider.html#value">value</a>(); } </pre> <p> The implementation of value() is straightforward; it simply returns the slider's value. <p> <pre> void LCDRange::setValue( int value ) { - <a name="x2331"></a> slider-><a href="ntqslider.html#setValue">setValue</a>( value ); + <a name="x2331"></a> slider-><a href="tqslider.html#setValue">setValue</a>( value ); } </pre> <p> The implementation of setValue() is equally straightforward. Note |