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/desktop-example.html | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'doc/html/desktop-example.html') diff --git a/doc/html/desktop-example.html b/doc/html/desktop-example.html index f2595d5be..4f1d37b0d 100644 --- a/doc/html/desktop-example.html +++ b/doc/html/desktop-example.html @@ -85,8 +85,8 @@ static int velocity( int i ) // change velocity void poly() { - TQWidget *d = TQApplication::desktop(); - d->setBackgroundColor( TQt::white ); // white desktop + TQWidget *d = TQApplication::desktop(); + d->setBackgroundColor( TQt::white ); // white desktop const int maxpoints = 5; const int maxcurves = 8; @@ -96,7 +96,7 @@ void poly() int tail = -maxcurves + 2; TQPointArray *a = new TQPointArray[ maxcurves ]; TQPointArray *p; - TQRect r = d->rect(); // desktop rectangle + TQRect r = d->rect(); // desktop rectangle int i; for ( i=0; i<maxcurves; i++ ) @@ -174,14 +174,14 @@ void rotate() pm = image; // convert image to pixmap pm.setOptimization( TQPixmap::BestOptim ); // rotation will be faster - TQWidget *d = TQApplication::desktop(); // w = desktop widget + TQWidget *d = TQApplication::desktop(); // w = desktop widget for ( i=0; i<=360; i += 2 ) { TQWMatrix m; m.rotate( i ); // rotate coordinate system TQPixmap rpm = pm.xForm( m ); // rpm = rotated pixmap - d->setBackgroundPixmap( rpm ); // set desktop pixmap - d->update(); // repaint desktop + d->setBackgroundPixmap( rpm ); // set desktop pixmap + d->update(); // repaint desktop } } @@ -227,7 +227,7 @@ void drawShadeText( TQPainter *p, int x, int y, co // NOTE: desktop drag/drop is experimental -class DesktopWidget : public TQWidget, private TQDropSite +class DesktopWidget : public TQWidget, private TQDropSite { public: DesktopWidget( const char *s, TQWidget *parent=0, const char *name=0 ); @@ -253,8 +253,8 @@ public: { TQPixmap pmp; if ( TQImageDrag::decode( e, pmp ) ) { - setBackgroundPixmap( pmp ); - update(); + setBackgroundPixmap( pmp ); + update(); } } @@ -264,7 +264,7 @@ private: }; DesktopWidget::DesktopWidget( const char *s, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WType_Desktop | WPaintDesktop), + : TQWidget( parent, name, WType_Desktop | WPaintDesktop), TQDropSite(this) { text = s; @@ -276,21 +276,21 @@ DesktopWidget::~DesktopWidget() delete pm; } -void DesktopWidget::paintEvent( TQPaintEvent * ) +void DesktopWidget::paintEvent( TQPaintEvent * ) { - TQColor c1 = backgroundColor(); + TQColor c1 = backgroundColor(); TQColor c2 = c1.light(104); TQColor c3 = c1.dark(106); if ( !pm ) { pm = new TQPixmap( 64, 64 ); generateStone( pm, c1, c2, c3 ); - setBackgroundPixmap( *pm ); - update(); + setBackgroundPixmap( *pm ); + update(); } - TQRect br = fontMetrics().boundingRect( text ); + TQRect br = fontMetrics().boundingRect( text ); TQPixmap offscreen( br.width(), br.height() ); - int x = width()/2 - br.width()/2; - int y = height()/2 - br.height()/2; + int x = width()/2 - br.width()/2; + int y = height()/2 - br.height()/2; offscreen.fill( this, x, y ); TQPainter p; p.begin( &offscreen ); @@ -302,7 +302,7 @@ void DesktopWidget::paintEvent( update(); + t->update(); tqApp->exec(); delete t; } -- cgit v1.2.1