diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-15 19:08:22 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-18 09:31:41 +0900 |
commit | a30f5359f03c3017fa19a6770fab32d25d22cb87 (patch) | |
tree | cb365dd7a1c3666e3f972c6cad04be7b8e846cba /doc/html/hello-example.html | |
parent | 25ad1267da6916e738a126ff5a9b41cd686adfc6 (diff) | |
download | tqt-a30f5359.tar.gz tqt-a30f5359.zip |
Rename graphics class nt* related files to equivalent tq* (part 1)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/hello-example.html')
-rw-r--r-- | doc/html/hello-example.html | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/html/hello-example.html b/doc/html/hello-example.html index a57cd3035..3d1dd7234 100644 --- a/doc/html/hello-example.html +++ b/doc/html/hello-example.html @@ -62,7 +62,7 @@ signals: void clicked(); protected: void mouseReleaseEvent( <a href="qmouseevent.html">TQMouseEvent</a> * ); - void paintEvent( <a href="qpaintevent.html">TQPaintEvent</a> * ); + void paintEvent( <a href="tqpaintevent.html">TQPaintEvent</a> * ); private slots: void animate(); private: @@ -88,7 +88,7 @@ private: #include "hello.h" #include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> #include <<a href="tqtimer-h.html">tqtimer.h</a>> -#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="tqpainter-h.html">tqpainter.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> @@ -139,7 +139,7 @@ void <a name="f474"></a>Hello::animate() pixmap is then blt'ed to the screen. */ -void Hello::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintevent.html">TQPaintEvent</a> * ) +void Hello::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="tqpaintevent.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,9 +148,9 @@ void Hello::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintev return; // 1: Compute some sizes, positions etc. - <a href="ntqfontmetrics.html">TQFontMetrics</a> fm = <a href="tqwidget.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; + <a href="tqfontmetrics.html">TQFontMetrics</a> fm = <a href="tqwidget.html#fontMetrics">fontMetrics</a>(); +<a name="x1631"></a> int w = fm.<a href="tqfontmetrics.html#width">width</a>(t) + 20; +<a name="x1630"></a> int h = fm.<a href="tqfontmetrics.html#height">height</a>() * 2; int pmx = <a href="tqwidget.html#width">width</a>()/2 - w/2; int pmy = <a href="tqwidget.html#height">height</a>()/2 - h/2; @@ -159,20 +159,20 @@ void Hello::<a href="tqwidget.html#paintEvent">paintEvent</a>( <a href="qpaintev <a name="x1638"></a> pm.<a href="ntqpixmap.html#fill">fill</a>( this, pmx, pmy ); // 3: Paint the pixmap. Cool wave effect - <a href="ntqpainter.html">TQPainter</a> p; + <a href="tqpainter.html">TQPainter</a> p; int x = 10; -<a name="x1629"></a> int y = h/2 + fm.<a href="ntqfontmetrics.html#descent">descent</a>(); +<a name="x1629"></a> int y = h/2 + fm.<a href="tqfontmetrics.html#descent">descent</a>(); int i = 0; -<a name="x1633"></a> p.<a href="ntqpainter.html#begin">begin</a>( &pm ); -<a name="x1636"></a> p.<a href="ntqpainter.html#setFont">setFont</a>( <a href="tqwidget.html#font">font</a>() ); +<a name="x1633"></a> p.<a href="tqpainter.html#begin">begin</a>( &pm ); +<a name="x1636"></a> p.<a href="tqpainter.html#setFont">setFont</a>( <a href="tqwidget.html#font">font</a>() ); while ( !t[i].isNull() ) { int i16 = (b+i) & 15; - 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] ); + p.<a href="tqpainter.html#setPen">setPen</a>( TQColor((15-i16)*16,255,255,TQColor::Hsv) ); + p.<a href="tqpainter.html#drawText">drawText</a>( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 ); + x += fm.<a href="tqfontmetrics.html#width">width</a>( t[i] ); i++; } -<a name="x1635"></a> p.<a href="ntqpainter.html#end">end</a>(); +<a name="x1635"></a> p.<a href="tqpainter.html#end">end</a>(); // 4: Copy the pixmap to the Hello widget <a href="tqimage.html#bitBlt">bitBlt</a>( this, pmx, pmy, &pm ); |