diff options
Diffstat (limited to 'doc/html/tutorial1-06.html')
-rw-r--r-- | doc/html/tutorial1-06.html | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/doc/html/tutorial1-06.html b/doc/html/tutorial1-06.html index e85f34bf0..3c9f4c9ce 100644 --- a/doc/html/tutorial1-06.html +++ b/doc/html/tutorial1-06.html @@ -43,46 +43,46 @@ widget as a child widget. ** ****************************************************************/ -#include <<a href="qapplication-h.html">qapplication.h</a>> -#include <<a href="qpushbutton-h.html">qpushbutton.h</a>> -#include <<a href="qslider-h.html">qslider.h</a>> -#include <<a href="qlcdnumber-h.html">qlcdnumber.h</a>> -#include <<a href="qfont-h.html">qfont.h</a>> -#include <<a href="qvbox-h.html">qvbox.h</a>> -#include <<a href="qgrid-h.html">qgrid.h</a>> - -class LCDRange : public <a href="qvbox.html">TQVBox</a> +#include <<a href="qapplication-h.html">ntqapplication.h</a>> +#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> +#include <<a href="qslider-h.html">ntqslider.h</a>> +#include <<a href="qlcdnumber-h.html">ntqlcdnumber.h</a>> +#include <<a href="qfont-h.html">ntqfont.h</a>> +#include <<a href="qvbox-h.html">ntqvbox.h</a>> +#include <<a href="qgrid-h.html">ntqgrid.h</a>> + +class LCDRange : public <a href="ntqvbox.html">TQVBox</a> { public: - LCDRange( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0 ); + LCDRange( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); }; -<a name="f554"></a>LCDRange::LCDRange( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qvbox.html">TQVBox</a>( parent, name ) +<a name="f554"></a>LCDRange::LCDRange( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { - <a href="qlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="qlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" ); - <a href="qslider.html">TQSlider</a> * slider = new <a href="qslider.html">TQSlider</a>( Horizontal, this, "slider" ); - slider-><a href="qrangecontrol.html#setRange">setRange</a>( 0, 99 ); - slider-><a href="qslider.html#setValue">setValue</a>( 0 ); - <a href="qobject.html#connect">connect</a>( slider, SIGNAL(<a href="qslider.html#valueChanged">valueChanged</a>(int)), lcd, SLOT(<a href="qlcdnumber.html#display">display</a>(int)) ); + <a href="ntqlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="ntqlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" ); + <a href="ntqslider.html">TQSlider</a> * slider = new <a href="ntqslider.html">TQSlider</a>( Horizontal, this, "slider" ); + slider-><a href="ntqrangecontrol.html#setRange">setRange</a>( 0, 99 ); + slider-><a href="ntqslider.html#setValue">setValue</a>( 0 ); + <a href="ntqobject.html#connect">connect</a>( slider, SIGNAL(<a href="ntqslider.html#valueChanged">valueChanged</a>(int)), lcd, SLOT(<a href="ntqlcdnumber.html#display">display</a>(int)) ); } -class MyWidget : public <a href="qvbox.html">TQVBox</a> +class MyWidget : public <a href="ntqvbox.html">TQVBox</a> { public: - MyWidget( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0 ); + MyWidget( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); }; -<a name="f555"></a>MyWidget::MyWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qvbox.html">TQVBox</a>( parent, name ) +<a name="f555"></a>MyWidget::MyWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { - <a href="qpushbutton.html">TQPushButton</a> *quit = new <a href="qpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); - quit-><a href="qwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); + <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); + quit-><a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); - <a href="qobject.html#connect">connect</a>( quit, SIGNAL(<a href="qbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="qapplication.html#quit">quit</a>()) ); + <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); - <a href="qgrid.html">TQGrid</a> *grid = new <a href="qgrid.html">TQGrid</a>( 4, this ); + <a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this ); for( int r = 0 ; r < 4 ; r++ ) for( int c = 0 ; c < 4 ; c++ ) @@ -91,12 +91,12 @@ public: int main( int argc, char **argv ) { - <a href="qapplication.html">TQApplication</a> a( argc, argv ); + <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); MyWidget w; - a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &w ); - w.<a href="qwidget.html#show">show</a>(); - return a.<a href="qapplication.html#exec">exec</a>(); + a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &w ); + w.<a href="ntqwidget.html#show">show</a>(); + return a.<a href="ntqapplication.html#exec">exec</a>(); } </pre> @@ -104,49 +104,49 @@ int main( int argc, char **argv ) <p> <h2> Line-by-line Walkthrough </h2> -<a name="1"></a><p> <pre> class LCDRange : public <a href="qvbox.html">TQVBox</a> +<a name="1"></a><p> <pre> class LCDRange : public <a href="ntqvbox.html">TQVBox</a> { public: - LCDRange( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0 ); + LCDRange( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); }; </pre> <p> The LCDRange widget is a widget without any API. It just has a constructor. This sort of widget is not very useful, so we'll add some API later. -<p> <pre> LCDRange::LCDRange( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qvbox.html">TQVBox</a>( parent, name ) +<p> <pre> LCDRange::LCDRange( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { - <a href="qlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="qlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" ); - <a href="qslider.html">TQSlider</a> * slider = new <a href="qslider.html">TQSlider</a>( Horizontal, this, "slider" ); - <a name="x2325"></a> slider-><a href="qrangecontrol.html#setRange">setRange</a>( 0, 99 ); - <a name="x2326"></a> slider-><a href="qslider.html#setValue">setValue</a>( 0 ); - <a name="x2327"></a><a name="x2324"></a> <a href="qobject.html#connect">connect</a>( slider, SIGNAL(<a href="qslider.html#valueChanged">valueChanged</a>(int)), lcd, SLOT(<a href="qlcdnumber.html#display">display</a>(int)) ); + <a href="ntqlcdnumber.html">TQLCDNumber</a> *lcd = new <a href="ntqlcdnumber.html">TQLCDNumber</a>( 2, this, "lcd" ); + <a href="ntqslider.html">TQSlider</a> * slider = new <a href="ntqslider.html">TQSlider</a>( Horizontal, this, "slider" ); + <a name="x2325"></a> slider-><a href="ntqrangecontrol.html#setRange">setRange</a>( 0, 99 ); + <a name="x2326"></a> slider-><a href="ntqslider.html#setValue">setValue</a>( 0 ); + <a name="x2327"></a><a name="x2324"></a> <a href="ntqobject.html#connect">connect</a>( slider, SIGNAL(<a href="ntqslider.html#valueChanged">valueChanged</a>(int)), lcd, SLOT(<a href="ntqlcdnumber.html#display">display</a>(int)) ); } </pre> <p> This is lifted straight from the <a href="tutorial1-05.html#constructor">MyWidget constructor</a> in Chapter 5. The only differences are that the button is left out and the class is renamed. -<p> <pre> class MyWidget : public <a href="qvbox.html">TQVBox</a> +<p> <pre> class MyWidget : public <a href="ntqvbox.html">TQVBox</a> { public: - MyWidget( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0 ); + MyWidget( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0 ); }; </pre> <p> MyWidget, too, contains no API except a constructor. -<p> <pre> MyWidget::MyWidget( <a href="qwidget.html">TQWidget</a> *parent, const char *name ) - : <a href="qvbox.html">TQVBox</a>( parent, name ) +<p> <pre> MyWidget::MyWidget( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name ) + : <a href="ntqvbox.html">TQVBox</a>( parent, name ) { - <a href="qpushbutton.html">TQPushButton</a> *quit = new <a href="qpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); - <a name="x2328"></a> quit-><a href="qwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); + <a href="ntqpushbutton.html">TQPushButton</a> *quit = new <a href="ntqpushbutton.html">TQPushButton</a>( "Quit", this, "quit" ); + <a name="x2328"></a> quit-><a href="ntqwidget.html#setFont">setFont</a>( TQFont( "Times", 18, TQFont::Bold ) ); - <a name="x2321"></a> <a href="qobject.html#connect">connect</a>( quit, SIGNAL(<a href="qbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="qapplication.html#quit">quit</a>()) ); + <a name="x2321"></a> <a href="ntqobject.html#connect">connect</a>( quit, SIGNAL(<a href="ntqbutton.html#clicked">clicked</a>()), qApp, SLOT(<a href="ntqapplication.html#quit">quit</a>()) ); </pre> <p> The push button that used to be in what is now LCDRange has been separated so that we can have one "Quit" button and many LCDRange objects. -<p> <pre> <a href="qgrid.html">TQGrid</a> *grid = new <a href="qgrid.html">TQGrid</a>( 4, this ); +<p> <pre> <a href="ntqgrid.html">TQGrid</a> *grid = new <a href="ntqgrid.html">TQGrid</a>( 4, this ); </pre> -<p> We create a <a href="qgrid.html">TQGrid</a> object with four columns. The TQGRid widget +<p> We create a <a href="ntqgrid.html">TQGrid</a> object with four columns. The TQGRid widget automatically arranges its children in rows and columns; you can specify the number of rows or of columns, and TQGrid will discover its new children and fit them into the grid. @@ -171,7 +171,7 @@ makefile and build the application.) </h2> <a name="3"></a><p> Initialize each slider with a different/random value on startup. <p> The source contains three occurrences of "4". What happens if you -change the one in the <a href="qgrid.html">TQGrid</a> constructor call? What about the other +change the one in the <a href="ntqgrid.html">TQGrid</a> constructor call? What about the other two? Why is this? <p> You're now ready for <a href="tutorial1-07.html">Chapter 7.</a> <p> [<a href="tutorial1-05.html">Previous tutorial</a>] |