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/progress-example.html | 60 +++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'doc/html/progress-example.html') diff --git a/doc/html/progress-example.html b/doc/html/progress-example.html index a2e8ee3b5..a86c0cae8 100644 --- a/doc/html/progress-example.html +++ b/doc/html/progress-example.html @@ -52,7 +52,7 @@ demonstrates simple use of menus. #include <ntqapplication.h> #include <tqmenubar.h> #include <tqpopupmenu.h> -#include <ntqpainter.h> +#include <tqpainter.h> #include <stdlib.h> class AnimatedThingy : public TQLabel { @@ -94,15 +94,15 @@ public: protected: void timerEvent(TQTimerEvent*) { - TQPainter p(this); - TQPen pn=p.pen(); + TQPainter p(this); + TQPen pn=p.pen(); pn.setWidth(2); pn.setColor(backgroundColor()); - p.setPen(pn); + p.setPen(pn); step = (step + 1) % nqix; - p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]); + p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]); inc(x0, dx0, width()); inc(y0, dy0, height()); @@ -113,31 +113,31 @@ protected: ox[1][step] = x1; oy[1][step] = y1; - TQColor c; - c.setHsv( (step*255)/nqix, 255, 255 ); // rainbow effect + TQColor c; + c.setHsv( (step*255)/nqix, 255, 255 ); // rainbow effect pn.setColor(c); - p.setPen(pn); - p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]); - p.setPen(colorGroup().text()); - p.drawText(rect(), AlignCenter, label); + p.setPen(pn); + p.drawLine(ox[0][step], oy[0][step], ox[1][step], oy[1][step]); + p.setPen(colorGroup().text()); + p.drawText(rect(), AlignCenter, label); } void paintEvent(TQPaintEvent* event) { - TQPainter p(this); - TQPen pn=p.pen(); + TQPainter p(this); + TQPen pn=p.pen(); pn.setWidth(2); - p.setPen(pn); - p.setClipRect(event->rect()); + p.setPen(pn); + p.setClipRect(event->rect()); for (int i=0; i<nqix; i++) { - TQColor c; - c.setHsv( (i*255)/nqix, 255, 255 ); // rainbow effect + TQColor c; + c.setHsv( (i*255)/nqix, 255, 255 ); // rainbow effect pn.setColor(c); - p.setPen(pn); - p.drawLine(ox[0][i], oy[0][i], ox[1][i], oy[1][i]); + p.setPen(pn); + p.drawLine(ox[0][i], oy[0][i], ox[1][i], oy[1][i]); } - p.setPen(colorGroup().text()); - p.drawText(rect(), AlignCenter, label); + p.setPen(colorGroup().text()); + p.drawText(rect(), AlignCenter, label); } private: @@ -264,26 +264,26 @@ private: rects--; { - TQPainter p(this); + TQPainter p(this); int ww = width(); int wh = height(); if ( ww > 8 && wh > 8 ) { - TQColor c(rand()%255, rand()%255, rand()%255); + TQColor c(rand()%255, rand()%255, rand()%255); int x = rand() % (ww-8); int y = rand() % (wh-8); int w = rand() % (ww-x); int h = rand() % (wh-y); - p.fillRect( x, y, w, h, c ); + p.fillRect( x, y, w, h, c ); } } if (!rects || got_stop) { if (!got_stop) pb->setProgress( pb->totalSteps() ); - TQPainter p(this); - p.fillRect(0, 0, width(), height(), backgroundColor()); + TQPainter p(this); + p.fillRect(0, 0, width(), height(), backgroundColor()); enableDrawingItems(TRUE); killTimers(); delete pb; @@ -329,21 +329,21 @@ private: "Drawing rectangles.\nUsing loop.", n, TRUE); lpb->setCaption("Please Wait"); - TQPainter p(this); + TQPainter p(this); for (int i=0; i<n; i++) { lpb->setProgress(i); if ( lpb->wasCancelled() ) break; - TQColor c(rand()%255, rand()%255, rand()%255); + TQColor c(rand()%255, rand()%255, rand()%255); int x = rand()%(width()-8); int y = rand()%(height()-8); int w = rand()%(width()-x); int h = rand()%(height()-y); - p.fillRect(x,y,w,h,c); + p.fillRect(x,y,w,h,c); } - p.fillRect(0, 0, width(), height(), backgroundColor()); + p.fillRect(0, 0, width(), height(), backgroundColor()); delete lpb; } -- cgit v1.2.3