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/tutorial1-10.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'doc/html/tutorial1-10.html') diff --git a/doc/html/tutorial1-10.html b/doc/html/tutorial1-10.html index 6f317fdb4..c1949dd59 100644 --- a/doc/html/tutorial1-10.html +++ b/doc/html/tutorial1-10.html @@ -82,12 +82,12 @@ separate function.

    #include <ntqpixmap.h>
 

We include the TQPixmap class definition. -

    CannonField::CannonField( TQWidget *parent, const char *name )
-            : TQWidget( parent, name )
+

    CannonField::CannonField( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
     {
         ang = 45;
         f = 0;
-        setPalette( TQPalette( TQColor( 250, 250, 200) ) );
+        setPalette( TQPalette( TQColor( 250, 250, 200) ) );
     }
 

The force (f) is initialized to zero. @@ -100,7 +100,7 @@ separate function. if ( ang == degrees ) return; ang = degrees; - repaint( cannonRect(), FALSE ); + repaint( cannonRect(), FALSE ); emit angleChanged( ang ); }

@@ -122,7 +122,7 @@ the drawing a little bit.

The implementation of setForce() is quite similar to that of setAngle(). The only difference is that because we don't show the force value, we don't need to repaint the widget. -

    void CannonField::paintEvent( TQPaintEvent *e )
+

    void CannonField::paintEvent( TQPaintEvent *e )
     {
         if ( !e->rect().intersects( cannonRect() ) )
             return;
@@ -165,7 +165,7 @@ bottom, and the code is 100% flicker-free.
 

    TQRect CannonField::cannonRect() const
     {
         TQRect r( 0, 0, 50, 50 );
-        r.moveBottomLeft( rect().bottomLeft() );
+        r.moveBottomLeft( rect().bottomLeft() );
         return r;
     }
 
@@ -173,15 +173,15 @@ bottom, and the code is 100% flicker-free. coordinates. First we create a rectangle with the size 50x50 and then move it so its bottom left corner is equal to the widget's own bottom- left corner. -

The TQWidget::rect() function returns the widget's enclosing +

The TQWidget::rect() function returns the widget's enclosing rectangle in the widget's own coordinates (where the top left corner is 0, 0).

t10/main.cpp

-

    MyWidget::MyWidget( TQWidget *parent, const char *name )
-            : TQWidget( parent, name )
+

    MyWidget::MyWidget( TQWidget *parent, const char *name )
+            : TQWidget( parent, name )
     {
 

The constructor is mostly the same, but some new bits have been added. -- cgit v1.2.1