From 8ac0e970e4464d9f8f73c0fb34a178ff135be8c3 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 2 Jun 2024 23:07:22 +0900 Subject: Rename ntqwidget* related files to equivalent tqwidget* Signed-off-by: Michele Calgaro --- doc/html/hello-example.html | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'doc/html/hello-example.html') diff --git a/doc/html/hello-example.html b/doc/html/hello-example.html index 831e4a4fd..4410cb178 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 <ntqwidget.h> +#include <tqwidget.h> -class Hello : public TQWidget +class Hello : public TQWidget { TQ_OBJECT public: @@ -97,13 +97,13 @@ private: */ Hello::Hello( const char *text, TQWidget *parent, const char *name ) - : TQWidget(parent,name), t(text), b(0) + : TQWidget(parent,name), t(text), b(0) { TQTimer *timer = new TQTimer(this); connect( timer, TQ_SIGNAL(timeout()), TQ_SLOT(animate()) ); timer->start( 40 ); - resize( 260, 130 ); + resize( 260, 130 ); } @@ -114,7 +114,7 @@ private: void Hello::animate() { b = (b + 1) & 15; - repaint( FALSE ); + repaint( FALSE ); } @@ -125,9 +125,9 @@ void Hello::animate() the widget. */ -void Hello::mouseReleaseEvent( TQMouseEvent *e ) +void Hello::mouseReleaseEvent( TQMouseEvent *e ) { - if ( rect().contains( e->pos() ) ) + if ( rect().contains( e->pos() ) ) emit clicked(); } @@ -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,11 +148,11 @@ void Hello::paintEvent( TQFontMetrics fm = fontMetrics(); + 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; + int pmx = width()/2 - w/2; + int pmy = height()/2 - h/2; // 2: Create the pixmap and fill it with the widget's background TQPixmap pm( w, h ); @@ -164,7 +164,7 @@ void Hello::paintEvent( int y = h/2 + fm.descent(); int i = 0; p.begin( &pm ); - p.setFont( font() ); + p.setFont( font() ); while ( !t[i].isNull() ) { int i16 = (b+i) & 15; p.setPen( TQColor((15-i16)*16,255,255,TQColor::Hsv) ); @@ -213,13 +213,13 @@ int main( int argc, char **argv ) s = "Hello, World"; Hello h( s ); #ifndef TQT_NO_WIDGET_TOPEXTRA // for TQt/Embedded minimal build - h.setCaption( "TQt says hello" ); + h.setCaption( "TQt says hello" ); #endif TQObject::connect( &h, TQ_SIGNAL(clicked()), &a, TQ_SLOT(quit()) ); - h.setFont( TQFont("times",32,TQFont::Bold) ); // default font - h.setBackgroundColor( TQt::white ); // default bg color + h.setFont( TQFont("times",32,TQFont::Bold) ); // default font + h.setBackgroundColor( TQt::white ); // default bg color a.setMainWidget( &h ); - h.show(); + h.show(); return a.exec(); } -- cgit v1.2.3