diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-15 19:08:22 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-07-18 09:31:41 +0900 |
commit | a30f5359f03c3017fa19a6770fab32d25d22cb87 (patch) | |
tree | cb365dd7a1c3666e3f972c6cad04be7b8e846cba /doc/html/grapher-nsplugin-example.html | |
parent | 25ad1267da6916e738a126ff5a9b41cd686adfc6 (diff) | |
download | tqt3-a30f5359f03c3017fa19a6770fab32d25d22cb87.tar.gz tqt3-a30f5359f03c3017fa19a6770fab32d25d22cb87.zip |
Rename graphics class nt* related files to equivalent tq* (part 1)
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'doc/html/grapher-nsplugin-example.html')
-rw-r--r-- | doc/html/grapher-nsplugin-example.html | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/doc/html/grapher-nsplugin-example.html b/doc/html/grapher-nsplugin-example.html index 185c6e39d..108e9844b 100644 --- a/doc/html/grapher-nsplugin-example.html +++ b/doc/html/grapher-nsplugin-example.html @@ -75,7 +75,7 @@ Implementation: #include "ntqnp.h" // Include other TQt classes. -#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="tqpainter-h.html">tqpainter.h</a>> #include <<a href="tqtextstream-h.html">tqtextstream.h</a>> #include <<a href="tqbuffer-h.html">tqbuffer.h</a>> #include <<a href="qpixmap-h.html">ntqpixmap.h</a>> @@ -251,9 +251,9 @@ void Graph::<a href="tqwidget.html#setStyle">setStyle</a>(const char* stext) void <a name="f565"></a>Graph::paintError(const char* e) { - <a href="ntqpainter.html">TQPainter</a> p(this); + <a href="tqpainter.html">TQPainter</a> p(this); int w = <a href="tqwidget.html#width">width</a>(); -<a name="x2760"></a> p.<a href="ntqpainter.html#drawText">drawText</a>(w/8, 0, w-w/4, height(), AlignCenter|WordBreak, e); +<a name="x2760"></a> p.<a href="tqpainter.html#drawText">drawText</a>(w/8, 0, w-w/4, height(), AlignCenter|WordBreak, e); } void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) @@ -276,26 +276,26 @@ void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) const uint w = <a href="tqwidget.html#width">width</a>(); const uint h = <a href="tqwidget.html#height">height</a>(); - <a href="ntqpainter.html">TQPainter</a> p(this); + <a href="tqpainter.html">TQPainter</a> p(this); -<a name="x2762"></a> p.<a href="ntqpainter.html#setClipRect">setClipRect</a>(event->rect()); +<a name="x2762"></a> p.<a href="tqpainter.html#setClipRect">setClipRect</a>(event->rect()); <a name="x2771"></a> if ( w > data.<a href="tqptrlist.html#count">count</a>() ) { // More pixels than data int x = 0; int i = 0; - <a href="ntqfontmetrics.html">TQFontMetrics</a> fm=<a href="tqwidget.html#fontMetrics">fontMetrics</a>(); -<a name="x2741"></a> int fh = fm.<a href="ntqfontmetrics.html#height">height</a>(); + <a href="tqfontmetrics.html">TQFontMetrics</a> fm=<a href="tqwidget.html#fontMetrics">fontMetrics</a>(); +<a name="x2741"></a> int fh = fm.<a href="tqfontmetrics.html#height">height</a>(); for (GraphModel::Datum* rowdata = data.<a href="tqptrlist.html#first">first</a>(); rowdata; rowdata = data.<a href="tqptrlist.html#next">next</a>()) { - <a href="ntqcolor.html">TQColor</a> c; -<a name="x2740"></a> c.<a href="ntqcolor.html#setHsv">setHsv</a>( (i * 255)/data.<a href="tqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect - p.<a href="ntqpainter.html#setBrush">setBrush</a>(c); + <a href="tqcolor.html">TQColor</a> c; +<a name="x2740"></a> c.<a href="tqcolor.html#setHsv">setHsv</a>( (i * 255)/data.<a href="tqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect + p.<a href="tqpainter.html#setBrush">setBrush</a>(c); int bw = (w-w/4-x)/(data.<a href="tqptrlist.html#count">count</a>()-i); int bh = int((h-h/4-1)*rowdata[0].dbl/max); - p.<a href="ntqpainter.html#drawRect">drawRect</a>( w/8+x, h-h/8-1-bh, bw, bh ); + p.<a href="tqpainter.html#drawRect">drawRect</a>( w/8+x, h-h/8-1-bh, bw, bh ); i++; x+=bw; @@ -312,12 +312,12 @@ void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) int bx = i*w/data.<a href="tqptrlist.html#count">count</a>(); if (bx > x) { - <a href="ntqcolor.html">TQColor</a> c; - c.<a href="ntqcolor.html#setHsv">setHsv</a>( (x * 255)/w, 255, 255 );// rainbow effect - p.<a href="ntqpainter.html#setPen">setPen</a>(c); + <a href="tqcolor.html">TQColor</a> c; + c.<a href="tqcolor.html#setHsv">setHsv</a>( (x * 255)/w, 255, 255 );// rainbow effect + p.<a href="tqpainter.html#setPen">setPen</a>(c); int bh = int(h*av/n/max); - p.<a href="ntqpainter.html#drawLine">drawLine</a>(x,h-1,x,h-bh); + p.<a href="tqpainter.html#drawLine">drawLine</a>(x,h-1,x,h-bh); av = 0.0; n = 0; @@ -364,23 +364,23 @@ void <a name="f567"></a>Graph::paintPie(TQPaintEvent* event) <a name="x2766"></a> pm.<a href="ntqpixmap.html#resize">resize</a>(<a href="tqwidget.html#width">width</a>(),height()); <a name="x2765"></a> pm.<a href="ntqpixmap.html#fill">fill</a>(<a href="tqwidget.html#backgroundColor">backgroundColor</a>()); - <a href="ntqpainter.html">TQPainter</a> p(&pm); -<a name="x2763"></a> p.<a href="ntqpainter.html#setFont">setFont</a>(<a href="tqwidget.html#font">font</a>()); + <a href="tqpainter.html">TQPainter</a> p(&pm); +<a name="x2763"></a> p.<a href="tqpainter.html#setFont">setFont</a>(<a href="tqwidget.html#font">font</a>()); - p.<a href="ntqpainter.html#setClipRect">setClipRect</a>(event->rect()); + p.<a href="tqpainter.html#setClipRect">setClipRect</a>(event->rect()); int i = 0; for (rowdata = data.<a href="tqptrlist.html#first">first</a>(); rowdata; rowdata = data.<a href="tqptrlist.html#next">next</a>()) { - <a href="ntqcolor.html">TQColor</a> c; + <a href="tqcolor.html">TQColor</a> c; - c.<a href="ntqcolor.html#setHsv">setHsv</a>( ( i * 255)/data.<a href="tqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect - p.<a href="ntqpainter.html#setBrush">setBrush</a>( c ); // solid fill with color c + c.<a href="tqcolor.html#setHsv">setHsv</a>( ( i * 255)/data.<a href="tqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect + p.<a href="tqpainter.html#setBrush">setBrush</a>( c ); // solid fill with color c int a = int(( rowdata[0].dbl * 360.0 ) / total * 16.0 + 0.5); -<a name="x2757"></a> p.<a href="ntqpainter.html#drawPie">drawPie</a>( w/10, h/10, xd, yd, -apos, -a ); +<a name="x2757"></a> p.<a href="tqpainter.html#drawPie">drawPie</a>( w/10, h/10, xd, yd, -apos, -a ); apos += a; i++; } @@ -396,22 +396,22 @@ void <a name="f567"></a>Graph::paintPie(TQPaintEvent* event) int y = int(sin(apos+a/2)*h*5/16 + h/2 + 0.5); // ### This causes a crash, so comment out for now - /*p.<a href="ntqpainter.html#drawText">drawText</a>(x-w/8, y-h/8, w/4, h/4, + /*p.<a href="tqpainter.html#drawText">drawText</a>(x-w/8, y-h/8, w/4, h/4, WordBreak|AlignCenter, *rowdata[1].str);*/ apos += a; } } - <a href="ntqpainter.html">TQPainter</a> p2(this); - p2.<a href="ntqpainter.html#setClipRect">setClipRect</a>(event->rect()); -<a name="x2758"></a> p2.<a href="ntqpainter.html#drawPixmap">drawPixmap</a>(0,0,pm); + <a href="tqpainter.html">TQPainter</a> p2(this); + p2.<a href="tqpainter.html#setClipRect">setClipRect</a>(event->rect()); +<a name="x2758"></a> p2.<a href="tqpainter.html#drawPixmap">drawPixmap</a>(0,0,pm); } void <a name="f568"></a>Graph::paintWait(TQPaintEvent*) { - <a href="ntqpainter.html">TQPainter</a> p(this); - p.<a href="ntqpainter.html#drawText">drawText</a>(rect(), AlignCenter, "Loading..."); + <a href="tqpainter.html">TQPainter</a> p(this); + p.<a href="tqpainter.html#drawText">drawText</a>(rect(), AlignCenter, "Loading..."); } void Graph::<a href="tqwidget.html#paintEvent">paintEvent</a>(TQPaintEvent* event) |