summaryrefslogtreecommitdiffstats
path: root/doc/html/hello-example.html
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-01-26 23:32:43 -0600
commitea318d1431c89e647598c510c4245c6571aa5f46 (patch)
tree996d29b80c30d453dda86d1a23162d441628f169 /doc/html/hello-example.html
parentaaf89d4b48f69c9293feb187db26362e550b5561 (diff)
downloadtqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz
tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/hello-example.html')
-rw-r--r--doc/html/hello-example.html86
1 files changed, 43 insertions, 43 deletions
diff --git a/doc/html/hello-example.html b/doc/html/hello-example.html
index 31f338144..821c3ec57 100644
--- a/doc/html/hello-example.html
+++ b/doc/html/hello-example.html
@@ -50,10 +50,10 @@ and in different colors.
#ifndef HELLO_H
#define HELLO_H
-#include &lt;<a href="qwidget-h.html">qwidget.h</a>&gt;
+#include &lt;<a href="qwidget-h.html">ntqwidget.h</a>&gt;
-class Hello : public <a href="qwidget.html">TQWidget</a>
+class Hello : public <a href="ntqwidget.html">TQWidget</a>
{
<a href="metaobjects.html#Q_OBJECT">Q_OBJECT</a>
public:
@@ -66,7 +66,7 @@ protected:
private slots:
void animate();
private:
- <a href="qstring.html">TQString</a> t;
+ <a href="ntqstring.html">TQString</a> t;
int b;
};
@@ -86,10 +86,10 @@ private:
*****************************************************************************/
#include "hello.h"
-#include &lt;<a href="qpushbutton-h.html">qpushbutton.h</a>&gt;
-#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="qpixmap-h.html">qpixmap.h</a>&gt;
+#include &lt;<a href="qpushbutton-h.html">ntqpushbutton.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="qpixmap-h.html">ntqpixmap.h</a>&gt;
/*
@@ -97,13 +97,13 @@ private:
*/
<a name="f473"></a>Hello::Hello( const char *text, TQWidget *parent, const char *name )
- : <a href="qwidget.html">TQWidget</a>(parent,name), t(text), b(0)
+ : <a href="ntqwidget.html">TQWidget</a>(parent,name), t(text), b(0)
{
- <a href="qtimer.html">TQTimer</a> *timer = new <a href="qtimer.html">TQTimer</a>(this);
-<a name="x1640"></a> <a href="qobject.html#connect">connect</a>( timer, SIGNAL(<a href="qtimer.html#timeout">timeout</a>()), SLOT(animate()) );
-<a name="x1639"></a> timer-&gt;<a href="qtimer.html#start">start</a>( 40 );
+ <a href="ntqtimer.html">TQTimer</a> *timer = new <a href="ntqtimer.html">TQTimer</a>(this);
+<a name="x1640"></a> <a href="ntqobject.html#connect">connect</a>( timer, SIGNAL(<a href="ntqtimer.html#timeout">timeout</a>()), SLOT(animate()) );
+<a name="x1639"></a> timer-&gt;<a href="ntqtimer.html#start">start</a>( 40 );
- <a href="qwidget.html#resize">resize</a>( 260, 130 );
+ <a href="ntqwidget.html#resize">resize</a>( 260, 130 );
}
@@ -114,7 +114,7 @@ private:
void <a name="f474"></a>Hello::animate()
{
b = (b + 1) &amp; 15;
- <a href="qwidget.html#repaint">repaint</a>( FALSE );
+ <a href="ntqwidget.html#repaint">repaint</a>( FALSE );
}
@@ -125,9 +125,9 @@ void <a name="f474"></a>Hello::animate()
the widget.
*/
-<a name="x1641"></a>void Hello::<a href="qwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
+<a name="x1641"></a>void Hello::<a href="ntqwidget.html#mouseReleaseEvent">mouseReleaseEvent</a>( <a href="qmouseevent.html">TQMouseEvent</a> *e )
{
- if ( <a href="qwidget.html#rect">rect</a>().contains( e-&gt;<a href="qmouseevent.html#pos">pos</a>() ) )
+ if ( <a href="ntqwidget.html#rect">rect</a>().contains( e-&gt;<a href="qmouseevent.html#pos">pos</a>() ) )
emit clicked();
}
@@ -139,7 +139,7 @@ void <a name="f474"></a>Hello::animate()
pixmap is then blt'ed to the screen.
*/
-void Hello::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * )
+void Hello::<a href="ntqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * )
{
static int sin_tbl[16] = {
0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38};
@@ -148,34 +148,34 @@ void Hello::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpainteve
return;
// 1: Compute some sizes, positions etc.
- <a href="qfontmetrics.html">TQFontMetrics</a> fm = <a href="qwidget.html#fontMetrics">fontMetrics</a>();
-<a name="x1631"></a> int w = fm.<a href="qfontmetrics.html#width">width</a>(t) + 20;
-<a name="x1630"></a> int h = fm.<a href="qfontmetrics.html#height">height</a>() * 2;
- int pmx = <a href="qwidget.html#width">width</a>()/2 - w/2;
- int pmy = <a href="qwidget.html#height">height</a>()/2 - h/2;
+ <a href="ntqfontmetrics.html">TQFontMetrics</a> fm = <a href="ntqwidget.html#fontMetrics">fontMetrics</a>();
+<a name="x1631"></a> int w = fm.<a href="ntqfontmetrics.html#width">width</a>(t) + 20;
+<a name="x1630"></a> int h = fm.<a href="ntqfontmetrics.html#height">height</a>() * 2;
+ int pmx = <a href="ntqwidget.html#width">width</a>()/2 - w/2;
+ int pmy = <a href="ntqwidget.html#height">height</a>()/2 - h/2;
// 2: Create the pixmap and fill it with the widget's background
- <a href="qpixmap.html">TQPixmap</a> pm( w, h );
-<a name="x1638"></a> pm.<a href="qpixmap.html#fill">fill</a>( this, pmx, pmy );
+ <a href="ntqpixmap.html">TQPixmap</a> pm( w, h );
+<a name="x1638"></a> pm.<a href="ntqpixmap.html#fill">fill</a>( this, pmx, pmy );
// 3: Paint the pixmap. Cool wave effect
- <a href="qpainter.html">TQPainter</a> p;
+ <a href="ntqpainter.html">TQPainter</a> p;
int x = 10;
-<a name="x1629"></a> int y = h/2 + fm.<a href="qfontmetrics.html#descent">descent</a>();
+<a name="x1629"></a> int y = h/2 + fm.<a href="ntqfontmetrics.html#descent">descent</a>();
int i = 0;
-<a name="x1633"></a> p.<a href="qpainter.html#begin">begin</a>( &amp;pm );
-<a name="x1636"></a> p.<a href="qpainter.html#setFont">setFont</a>( <a href="qwidget.html#font">font</a>() );
+<a name="x1633"></a> p.<a href="ntqpainter.html#begin">begin</a>( &amp;pm );
+<a name="x1636"></a> p.<a href="ntqpainter.html#setFont">setFont</a>( <a href="ntqwidget.html#font">font</a>() );
while ( !t[i].isNull() ) {
int i16 = (b+i) &amp; 15;
- p.<a href="qpainter.html#setPen">setPen</a>( TQColor((15-i16)*16,255,255,TQColor::Hsv) );
- p.<a href="qpainter.html#drawText">drawText</a>( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 );
- x += fm.<a href="qfontmetrics.html#width">width</a>( t[i] );
+ p.<a href="ntqpainter.html#setPen">setPen</a>( TQColor((15-i16)*16,255,255,TQColor::Hsv) );
+ p.<a href="ntqpainter.html#drawText">drawText</a>( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 );
+ x += fm.<a href="ntqfontmetrics.html#width">width</a>( t[i] );
i++;
}
-<a name="x1635"></a> p.<a href="qpainter.html#end">end</a>();
+<a name="x1635"></a> p.<a href="ntqpainter.html#end">end</a>();
// 4: Copy the pixmap to the Hello widget
- <a href="qimage.html#bitBlt">bitBlt</a>( this, pmx, pmy, &amp;pm );
+ <a href="ntqimage.html#bitBlt">bitBlt</a>( this, pmx, pmy, &amp;pm );
}
</pre>
@@ -192,7 +192,7 @@ void Hello::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpainteve
*****************************************************************************/
#include "hello.h"
-#include &lt;<a href="qapplication-h.html">qapplication.h</a>&gt;
+#include &lt;<a href="qapplication-h.html">ntqapplication.h</a>&gt;
/*
@@ -202,25 +202,25 @@ void Hello::<a href="qwidget.html#paintEvent">paintEvent</a>( <a href="qpainteve
int main( int argc, char **argv )
{
- <a href="qapplication.html">TQApplication</a> a(argc,argv);
- <a href="qstring.html">TQString</a> s;
+ <a href="ntqapplication.html">TQApplication</a> a(argc,argv);
+ <a href="ntqstring.html">TQString</a> s;
for ( int i=1; i&lt;argc; i++ ) {
s += argv[i];
if ( i&lt;argc-1 )
s += " ";
}
- if ( s.<a href="qstring.html#isEmpty">isEmpty</a>() )
+ if ( s.<a href="ntqstring.html#isEmpty">isEmpty</a>() )
s = "Hello, World";
Hello h( s );
#ifndef QT_NO_WIDGET_TOPEXTRA // for TQt/Embedded minimal build
- h.<a href="qwidget.html#setCaption">setCaption</a>( "TQt says hello" );
+ h.<a href="ntqwidget.html#setCaption">setCaption</a>( "TQt says hello" );
#endif
- TQObject::<a href="qobject.html#connect">connect</a>( &amp;h, SIGNAL(clicked()), &amp;a, SLOT(<a href="qapplication.html#quit">quit</a>()) );
-<a name="x1650"></a> h.<a href="qwidget.html#setFont">setFont</a>( TQFont("times",32,TQFont::Bold) ); // default font
-<a name="x1648"></a> h.<a href="qwidget.html#setBackgroundColor">setBackgroundColor</a>( TQt::white ); // default bg color
- a.<a href="qapplication.html#setMainWidget">setMainWidget</a>( &amp;h );
- h.<a href="qwidget.html#show">show</a>();
- return a.<a href="qapplication.html#exec">exec</a>();
+ TQObject::<a href="ntqobject.html#connect">connect</a>( &amp;h, SIGNAL(clicked()), &amp;a, SLOT(<a href="ntqapplication.html#quit">quit</a>()) );
+<a name="x1650"></a> h.<a href="ntqwidget.html#setFont">setFont</a>( TQFont("times",32,TQFont::Bold) ); // default font
+<a name="x1648"></a> h.<a href="ntqwidget.html#setBackgroundColor">setBackgroundColor</a>( TQt::white ); // default bg color
+ a.<a href="ntqapplication.html#setMainWidget">setMainWidget</a>( &amp;h );
+ h.<a href="ntqwidget.html#show">show</a>();
+ return a.<a href="ntqapplication.html#exec">exec</a>();
}
</pre>