From a30f5359f03c3017fa19a6770fab32d25d22cb87 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 15 Jul 2024 19:08:22 +0900 Subject: Rename graphics class nt* related files to equivalent tq* (part 1) Signed-off-by: Michele Calgaro --- doc/html/hello-example.html | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'doc/html/hello-example.html') 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( TQMouseEvent * ); - void paintEvent( TQPaintEvent * ); + void paintEvent( TQPaintEvent * ); private slots: void animate(); private: @@ -88,7 +88,7 @@ private: #include "hello.h" #include <ntqpushbutton.h> #include <tqtimer.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <ntqpixmap.h> @@ -139,7 +139,7 @@ void Hello::animate() pixmap is then blt'ed to the screen. */ -void Hello::paintEvent( TQPaintEvent * ) +void Hello::paintEvent( TQPaintEvent * ) { 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::paintEvent( TQFontMetrics fm = fontMetrics(); - int w = fm.width(t) + 20; - int h = fm.height() * 2; + TQFontMetrics fm = fontMetrics(); + int w = fm.width(t) + 20; + int h = fm.height() * 2; int pmx = width()/2 - w/2; int pmy = height()/2 - h/2; @@ -159,20 +159,20 @@ void Hello::paintEvent( pm.fill( this, pmx, pmy ); // 3: Paint the pixmap. Cool wave effect - TQPainter p; + TQPainter p; int x = 10; - int y = h/2 + fm.descent(); + int y = h/2 + fm.descent(); int i = 0; - p.begin( &pm ); - p.setFont( font() ); + p.begin( &pm ); + p.setFont( font() ); while ( !t[i].isNull() ) { int i16 = (b+i) & 15; - p.setPen( TQColor((15-i16)*16,255,255,TQColor::Hsv) ); - p.drawText( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 ); - x += fm.width( t[i] ); + p.setPen( TQColor((15-i16)*16,255,255,TQColor::Hsv) ); + p.drawText( x, y-sin_tbl[i16]*h/800, t.mid(i,1), 1 ); + x += fm.width( t[i] ); i++; } - p.end(); + p.end(); // 4: Copy the pixmap to the Hello widget bitBlt( this, pmx, pmy, &pm ); -- cgit v1.2.3