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/drawlines-example.html | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'doc/html/drawlines-example.html') diff --git a/doc/html/drawlines-example.html b/doc/html/drawlines-example.html index 2b66bbb56..34c40d1d8 100644 --- a/doc/html/drawlines-example.html +++ b/doc/html/drawlines-example.html @@ -50,7 +50,7 @@ release the button, and watch the lines get drawn. *****************************************************************************/ #include <tqwidget.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <ntqapplication.h> #include <stdlib.h> @@ -69,13 +69,13 @@ public: ConnectWidget( TQWidget *parent=0, const char *name=0 ); ~ConnectWidget(); protected: - void paintEvent( TQPaintEvent * ); + void paintEvent( TQPaintEvent * ); void mousePressEvent( TQMouseEvent *); void mouseReleaseEvent( TQMouseEvent *); void mouseMoveEvent( TQMouseEvent *); private: TQPoint *points; // point array - TQColor *colors; // color array + TQColor *colors; // color array int count; // count = number of points bool down; // TRUE if mouse down }; @@ -92,7 +92,7 @@ private: count = 0; down = FALSE; points = new TQPoint[MAXPOINTS]; - colors = new TQColor[MAXCOLORS]; + colors = new TQColor[MAXCOLORS]; for ( int i=0; i<MAXCOLORS; i++ ) // init color array colors[i] = TQColor( rand()&255, rand()&255, rand()&255 ); } @@ -108,13 +108,13 @@ ConnectWidget::~ConnectWidget() // Handles paint events for the connect widget. // -void ConnectWidget::paintEvent( TQPaintEvent * ) +void ConnectWidget::paintEvent( TQPaintEvent * ) { - TQPainter paint( this ); + TQPainter paint( this ); for ( int i=0; i<count-1; i++ ) { // connect all points for ( int j=i+1; j<count; j++ ) { - paint.setPen( colors[rand()%MAXCOLORS] ); // set random pen color - paint.drawLine( points[i], points[j] ); // draw line + paint.setPen( colors[rand()%MAXCOLORS] ); // set random pen color + paint.drawLine( points[i], points[j] ); // draw line } } } @@ -150,9 +150,9 @@ ConnectWidget::~ConnectWidget() void ConnectWidget::mouseMoveEvent( TQMouseEvent *e ) { if ( down && count < MAXPOINTS ) { - TQPainter paint( this ); + TQPainter paint( this ); points[count++] = e->pos(); // add point - paint.drawPoint( e->pos() ); // plot point + paint.drawPoint( e->pos() ); // plot point } } -- cgit v1.2.3