summaryrefslogtreecommitdiffstats
path: root/doc/html/forever-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/forever-example.html')
-rw-r--r--doc/html/forever-example.html66
1 files changed, 33 insertions, 33 deletions
diff --git a/doc/html/forever-example.html b/doc/html/forever-example.html
index e69d1fa5..25817f78 100644
--- a/doc/html/forever-example.html
+++ b/doc/html/forever-example.html
@@ -55,17 +55,17 @@ are drawn per second.
#ifndef FOREVER_H
#define FOREVER_H
-#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;
+#include &lt;<a href="qwidget-h.html">ntqwidget.h</a>&gt;
const int numColors = 120;
-class Forever : public <a href="qwidget.html">TQWidget</a>
+class Forever : public <a href="ntqwidget.html">TQWidget</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
- Forever( <a href="qwidget.html">TQWidget</a> *parent=0, const char *name=0 );
+ Forever( <a href="ntqwidget.html">TQWidget</a> *parent=0, const char *name=0 );
protected:
void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> * );
void timerEvent( <a href="qtimerevent.html">TQTimerEvent</a> * );
@@ -92,9 +92,9 @@ private:
**
*****************************************************************************/
-#include &lt;<a href="qtimer-h.html">qtimer.h</a>&gt;
-#include &lt;<a href="qpainter-h.html">qpainter.h</a>&gt;
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qtimer-h.html">ntqtimer.h</a>&gt;
+#include &lt;<a href="qpainter-h.html">ntqpainter.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
#include &lt;stdlib.h&gt; // defines rand() function
#include "forever.h"
@@ -108,8 +108,8 @@ private:
// Constructs a Forever widget.
//
-<a name="f365"></a>Forever::Forever( <a href="qwidget.html">TQWidget</a> *parent, const char *name )
- : <a href="qwidget.html">TQWidget</a>( parent, name )
+<a name="f365"></a>Forever::Forever( <a href="ntqwidget.html">TQWidget</a> *parent, const char *name )
+ : <a href="ntqwidget.html">TQWidget</a>( parent, name )
{
for (int a=0; a&lt;numColors; a++) {
colors[a] = TQColor( rand()&amp;255,
@@ -117,20 +117,20 @@ private:
rand()&amp;255 );
}
rectangles = 0;
- <a href="qobject.html#startTimer">startTimer</a>( 0 ); // run continuous timer
- <a href="qtimer.html">TQTimer</a> * counter = new <a href="qtimer.html">TQTimer</a>( this );
-<a name="x1054"></a> <a href="qobject.html#connect">connect</a>( counter, SIGNAL(<a href="qtimer.html#timeout">timeout</a>()),
+ <a href="ntqobject.html#startTimer">startTimer</a>( 0 ); // run continuous timer
+ <a href="ntqtimer.html">TQTimer</a> * counter = new <a href="ntqtimer.html">TQTimer</a>( this );
+<a name="x1054"></a> <a href="ntqobject.html#connect">connect</a>( counter, SIGNAL(<a href="ntqtimer.html#timeout">timeout</a>()),
this, SLOT(updateCaption()) );
-<a name="x1053"></a> counter-&gt;<a href="qtimer.html#start">start</a>( 1000 );
+<a name="x1053"></a> counter-&gt;<a href="ntqtimer.html#start">start</a>( 1000 );
}
void <a name="f366"></a>Forever::updateCaption()
{
- <a href="qstring.html">TQString</a> s;
-<a name="x1052"></a> s.<a href="qstring.html#sprintf">sprintf</a>( "TQt Example - Forever - %d rectangles/second", rectangles );
+ <a href="ntqstring.html">TQString</a> s;
+<a name="x1052"></a> s.<a href="ntqstring.html#sprintf">sprintf</a>( "TQt Example - Forever - %d rectangles/second", rectangles );
rectangles = 0;
- <a href="qwidget.html#setCaption">setCaption</a>( s );
+ <a href="ntqwidget.html#setCaption">setCaption</a>( s );
}
@@ -138,31 +138,31 @@ void <a name="f366"></a>Forever::updateCaption()
// Handles paint events for the Forever widget.
//
-<a name="x1055"></a>void Forever::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * )
+<a name="x1055"></a>void Forever::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * )
{
- <a href="qpainter.html">TQPainter</a> paint( this ); // painter object
- int w = <a href="qwidget.html#width">width</a>();
- int h = <a href="qwidget.html#height">height</a>();
+ <a href="ntqpainter.html">TQPainter</a> paint( this ); // painter object
+ int w = <a href="ntqwidget.html#width">width</a>();
+ int h = <a href="ntqwidget.html#height">height</a>();
if(w &lt;= 0 || h &lt;= 0)
return;
- paint.<a href="qpainter.html#setPen">setPen</a>( NoPen ); // do not draw outline
- paint.<a href="qpainter.html#setBrush">setBrush</a>( colors[rand() % numColors]);// set random brush color
+ paint.<a href="ntqpainter.html#setPen">setPen</a>( NoPen ); // do not draw outline
+ paint.<a href="ntqpainter.html#setBrush">setBrush</a>( colors[rand() % numColors]);// set random brush color
- <a href="qpoint.html">TQPoint</a> p1( rand()%w, rand()%h ); // p1 = top left
- <a href="qpoint.html">TQPoint</a> p2( rand()%w, rand()%h ); // p2 = bottom right
+ <a href="ntqpoint.html">TQPoint</a> p1( rand()%w, rand()%h ); // p1 = top left
+ <a href="ntqpoint.html">TQPoint</a> p2( rand()%w, rand()%h ); // p2 = bottom right
- <a href="qrect.html">TQRect</a> r( p1, p2 );
- paint.<a href="qpainter.html#drawRect">drawRect</a>( r ); // draw filled rectangle
+ <a href="ntqrect.html">TQRect</a> r( p1, p2 );
+ paint.<a href="ntqpainter.html#drawRect">drawRect</a>( r ); // draw filled rectangle
}
//
// Handles timer events for the Forever widget.
//
-<a name="x1048"></a>void Forever::<a href="qobject.html#timerEvent">timerEvent</a>( <a href="qtimerevent.html">TQTimerEvent</a> * )
+<a name="x1048"></a>void Forever::<a href="ntqobject.html#timerEvent">timerEvent</a>( <a href="qtimerevent.html">TQTimerEvent</a> * )
{
for ( int i=0; i&lt;100; i++ ) {
- <a href="qwidget.html#repaint">repaint</a>( FALSE ); // repaint, don't erase
+ <a href="ntqwidget.html#repaint">repaint</a>( FALSE ); // repaint, don't erase
rectangles++;
}
}
@@ -174,13 +174,13 @@ void <a name="f366"></a>Forever::updateCaption()
int main( int argc, char **argv )
{
- <a href="qapplication.html">TQApplication</a> a( argc, argv ); // create application object
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv ); // create application object
Forever always; // create widget
- always.<a href="qwidget.html#resize">resize</a>( 400, 250 ); // start up with size 400x250
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &amp;always ); // set as main widget
- always.<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Forever");
- always.<a href="qwidget.html#show">show</a>(); // show widget
- return a.<a href="qapplication.html#exec">exec</a>(); // run event loop
+ always.<a href="ntqwidget.html#resize">resize</a>( 400, 250 ); // start up with size 400x250
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &amp;always ); // set as main widget
+ always.<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Forever");
+ always.<a href="ntqwidget.html#show">show</a>(); // show widget
+ return a.<a href="ntqapplication.html#exec">exec</a>(); // run event loop
}
</pre>