summaryrefslogtreecommitdiffstats
path: root/doc/html/life-example.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/html/life-example.html')
-rw-r--r--doc/html/life-example.html70
1 files changed, 35 insertions, 35 deletions
diff --git a/doc/html/life-example.html b/doc/html/life-example.html
index f07f6127f..ed6771cd8 100644
--- a/doc/html/life-example.html
+++ b/doc/html/life-example.html
@@ -48,10 +48,10 @@ body { background: #ffffff; color: black; }
#ifndef LIFE_H
#define LIFE_H
-#include &lt;<a href="qframe-h.html">qframe.h</a>&gt;
+#include &lt;<a href="qframe-h.html">ntqframe.h</a>&gt;
-class LifeWidget : public <a href="qframe.html">TQFrame</a>
+class LifeWidget : public <a href="ntqframe.html">TQFrame</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
@@ -71,7 +71,7 @@ protected:
virtual void mouseMoveEvent( <a href="qmouseevent.html">TQMouseEvent</a> * );
virtual void mousePressEvent( <a href="qmouseevent.html">TQMouseEvent</a> * );
virtual void resizeEvent( <a href="qresizeevent.html">TQResizeEvent</a> * );
- void mouseHandle( const <a href="qpoint.html">TQPoint</a> &amp;pos );
+ void mouseHandle( const <a href="ntqpoint.html">TQPoint</a> &amp;pos );
private:
enum { MAXSIZE = 50, MINSIZE = 10, BORDER = 5 };
@@ -110,28 +110,28 @@ private:
#include "life.h"
-#include &lt;<a href="qpainter-h.html">qpainter.h</a>&gt;
-#include &lt;<a href="qdrawutil-h.html">qdrawutil.h</a>&gt;
-#include &lt;<a href="qcheckbox-h.html">qcheckbox.h</a>&gt;
-#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qpainter-h.html">ntqpainter.h</a>&gt;
+#include &lt;<a href="qdrawutil-h.html">ntqdrawutil.h</a>&gt;
+#include &lt;<a href="qcheckbox-h.html">ntqcheckbox.h</a>&gt;
+#include &lt;<a href="qevent-h.html">ntqevent.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
// The main game of life widget
<a name="f517"></a>LifeWidget::LifeWidget( int s, TQWidget *parent, const char *name )
- : <a href="qframe.html">TQFrame</a>( parent, name )
+ : <a href="ntqframe.html">TQFrame</a>( parent, name )
{
SCALE = s;
maxi = maxj = 50;
- <a href="qwidget.html#setMinimumSize">setMinimumSize</a>( MINSIZE * SCALE + 2 * BORDER,
+ <a href="ntqwidget.html#setMinimumSize">setMinimumSize</a>( MINSIZE * SCALE + 2 * BORDER,
MINSIZE * SCALE + 2 * BORDER );
- <a href="qwidget.html#setMaximumSize">setMaximumSize</a>( MAXSIZE * SCALE + 2 * BORDER,
+ <a href="ntqwidget.html#setMaximumSize">setMaximumSize</a>( MAXSIZE * SCALE + 2 * BORDER,
MAXSIZE * SCALE + 2 * BORDER );
- <a href="qwidget.html#setSizeIncrement">setSizeIncrement</a>( SCALE, SCALE);
+ <a href="ntqwidget.html#setSizeIncrement">setSizeIncrement</a>( SCALE, SCALE);
clear();
- <a href="qwidget.html#resize">resize</a>( maxi * SCALE + 2 * BORDER , maxj * SCALE + 2 * BORDER );
+ <a href="ntqwidget.html#resize">resize</a>( maxi * SCALE + 2 * BORDER , maxj * SCALE + 2 * BORDER );
}
@@ -144,7 +144,7 @@ void <a name="f518"></a>LifeWidget::clear()
for ( int j = 0; j &lt; MAXSIZE + 2; j++ )
cells[t][i][j] = FALSE;
- <a href="qwidget.html#repaint">repaint</a>();
+ <a href="ntqwidget.html#repaint">repaint</a>();
}
@@ -152,7 +152,7 @@ void <a name="f518"></a>LifeWidget::clear()
// this is not in general TRUE, but in practice it's good enough for
// this program
-<a name="x1889"></a>void LifeWidget::<a href="qframe.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> * e )
+<a name="x1889"></a>void LifeWidget::<a href="ntqframe.html#resizeEvent">resizeEvent</a>( <a href="qresizeevent.html">TQResizeEvent</a> * e )
{
<a name="x1895"></a> maxi = (e-&gt;<a href="qresizeevent.html#size">size</a>().width() - 2 * BORDER) / SCALE;
maxj = (e-&gt;<a href="qresizeevent.html#size">size</a>().height() - 2 * BORDER) / SCALE;
@@ -164,25 +164,25 @@ void <a name="f519"></a>LifeWidget::setPoint( int i, int j )
if ( i &lt; 1 || i &gt; maxi || j &lt; 1 || j &gt; maxi )
return;
cells[current][i][j] = TRUE;
- <a href="qwidget.html#repaint">repaint</a>( index2pos(i), index2pos(j), SCALE, SCALE, FALSE );
+ <a href="ntqwidget.html#repaint">repaint</a>( index2pos(i), index2pos(j), SCALE, SCALE, FALSE );
}
-void <a name="f520"></a>LifeWidget::mouseHandle( const <a href="qpoint.html">TQPoint</a> &amp;pos )
+void <a name="f520"></a>LifeWidget::mouseHandle( const <a href="ntqpoint.html">TQPoint</a> &amp;pos )
{
-<a name="x1893"></a> int i = pos2index( pos.<a href="qpoint.html#x">x</a>() );
-<a name="x1894"></a> int j = pos2index( pos.<a href="qpoint.html#y">y</a>() );
+<a name="x1893"></a> int i = pos2index( pos.<a href="ntqpoint.html#x">x</a>() );
+<a name="x1894"></a> int j = pos2index( pos.<a href="ntqpoint.html#y">y</a>() );
setPoint( i, j );
}
-<a name="x1896"></a>void LifeWidget::<a href="qwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<a name="x1896"></a>void LifeWidget::<a href="ntqwidget.html#mouseMoveEvent">mouseMoveEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
<a name="x1891"></a> mouseHandle( e-&gt;<a href="qmouseevent.html#pos">pos</a>() );
}
-<a name="x1897"></a>void LifeWidget::<a href="qwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<a name="x1897"></a>void LifeWidget::<a href="ntqwidget.html#mousePressEvent">mousePressEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
<a name="x1890"></a> if ( e-&gt;<a href="qmouseevent.html#button">button</a>() == TQMouseEvent::LeftButton )
mouseHandle( e-&gt;<a href="qmouseevent.html#pos">pos</a>() );
@@ -207,11 +207,11 @@ void <a name="f521"></a>LifeWidget::nextGeneration()
}
}
current = !current;
- <a href="qwidget.html#repaint">repaint</a>( FALSE ); // repaint without erase
+ <a href="ntqwidget.html#repaint">repaint</a>( FALSE ); // repaint without erase
}
-<a name="x1888"></a>void LifeWidget::<a href="qframe.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * e )
+<a name="x1888"></a>void LifeWidget::<a href="ntqframe.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * e )
{
<a name="x1892"></a> int starti = pos2index( e-&gt;<a href="qpaintevent.html#rect">rect</a>().left() );
int stopi = pos2index( e-&gt;<a href="qpaintevent.html#rect">rect</a>().right() );
@@ -223,17 +223,17 @@ void <a name="f521"></a>LifeWidget::nextGeneration()
if (stopj &gt; maxj)
stopj = maxj;
- <a href="qpainter.html">TQPainter</a> paint( this );
+ <a href="ntqpainter.html">TQPainter</a> paint( this );
for ( int i = starti; i &lt;= stopi; i++ ) {
for ( int j = startj; j &lt;= stopj; j++ ) {
if ( cells[current][i][j] )
- <a href="qpainter.html#qDrawShadePanel">qDrawShadePanel</a>( &amp;paint, index2pos( i ), index2pos( j ),
+ <a href="ntqpainter.html#qDrawShadePanel">qDrawShadePanel</a>( &amp;paint, index2pos( i ), index2pos( j ),
SCALE - 1, SCALE - 1, colorGroup() );
else if ( cells[!current][i][j] )
- <a href="qwidget.html#erase">erase</a>(index2pos( i ), index2pos( j ), SCALE - 1, SCALE - 1);
+ <a href="ntqwidget.html#erase">erase</a>(index2pos( i ), index2pos( j ), SCALE - 1, SCALE - 1);
}
}
- <a href="qframe.html#drawFrame">drawFrame</a>( &amp;paint );
+ <a href="ntqframe.html#drawFrame">drawFrame</a>( &amp;paint );
}
</pre>
@@ -250,22 +250,22 @@ void <a name="f521"></a>LifeWidget::nextGeneration()
*****************************************************************************/
#include "lifedlg.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
#include &lt;stdlib.h&gt;
void usage()
{
- <a href="qapplication.html#qWarning">qWarning</a>( "Usage: life [-scale scale]" );
+ <a href="ntqapplication.html#qWarning">qWarning</a>( "Usage: life [-scale scale]" );
}
int main( int argc, char **argv )
{
- <a href="qapplication.html">TQApplication</a> a( argc, argv );
+ <a href="ntqapplication.html">TQApplication</a> a( argc, argv );
int scale = 10;
for ( int i = 1; i &lt; argc; i++ ){
- <a href="qstring.html">TQString</a> arg = argv[i];
+ <a href="ntqstring.html">TQString</a> arg = argv[i];
if ( arg == "-scale" )
scale = atoi( argv[++i] );
else {
@@ -278,11 +278,11 @@ int main( int argc, char **argv )
scale = 2;
LifeDialog *life = new LifeDialog( scale );
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( life );
- life-&gt;<a href="qwidget.html#setCaption">setCaption</a>("TQt Example - Life");
- life-&gt;<a href="qwidget.html#show">show</a>();
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( life );
+ life-&gt;<a href="ntqwidget.html#setCaption">setCaption</a>("TQt Example - Life");
+ life-&gt;<a href="ntqwidget.html#show">show</a>();
- return a.<a href="qapplication.html#exec">exec</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>