diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-01-26 23:32:43 -0600 |
commit | ea318d1431c89e647598c510c4245c6571aa5f46 (patch) | |
tree | 996d29b80c30d453dda86d1a23162d441628f169 /doc/html/grapher-nsplugin-example.html | |
parent | aaf89d4b48f69c9293feb187db26362e550b5561 (diff) | |
download | tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.tar.gz tqt3-ea318d1431c89e647598c510c4245c6571aa5f46.zip |
Update to latest tqt3 automated conversion
Diffstat (limited to 'doc/html/grapher-nsplugin-example.html')
-rw-r--r-- | doc/html/grapher-nsplugin-example.html | 234 |
1 files changed, 117 insertions, 117 deletions
diff --git a/doc/html/grapher-nsplugin-example.html b/doc/html/grapher-nsplugin-example.html index eef68856c..03759058c 100644 --- a/doc/html/grapher-nsplugin-example.html +++ b/doc/html/grapher-nsplugin-example.html @@ -72,17 +72,17 @@ to an image at the server. <hr> Implementation: <p> <pre>// Include TQt Netscape Plugin classes. -#include "qnp.h" +#include "ntqnp.h" // Include other TQt classes. -#include <<a href="qpainter-h.html">qpainter.h</a>> -#include <<a href="qtextstream-h.html">qtextstream.h</a>> -#include <<a href="qbuffer-h.html">qbuffer.h</a>> -#include <<a href="qpixmap-h.html">qpixmap.h</a>> -#include <<a href="qmenubar-h.html">qmenubar.h</a>> -#include <<a href="qpushbutton-h.html">qpushbutton.h</a>> -#include <<a href="qptrlist-h.html">qptrlist.h</a>> -#include <<a href="qmessagebox-h.html">qmessagebox.h</a>> +#include <<a href="qpainter-h.html">ntqpainter.h</a>> +#include <<a href="qtextstream-h.html">ntqtextstream.h</a>> +#include <<a href="qbuffer-h.html">ntqbuffer.h</a>> +#include <<a href="qpixmap-h.html">ntqpixmap.h</a>> +#include <<a href="qmenubar-h.html">ntqmenubar.h</a>> +#include <<a href="qpushbutton-h.html">ntqpushbutton.h</a>> +#include <<a href="qptrlist-h.html">ntqptrlist.h</a>> +#include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> // Include some C library functions. #include <math.h> @@ -105,7 +105,7 @@ public: union Datum { double dbl; - <a href="qstring.html">TQString</a>* str; + <a href="ntqstring.html">TQString</a>* str; }; virtual TQPtrList<Datum>& graphData()=0; @@ -164,12 +164,12 @@ signals: private: GraphModel& model; - <a href="qmenubar.html">TQMenuBar</a> *menubar; + <a href="ntqmenubar.html">TQMenuBar</a> *menubar; Style style; - <a href="qpopupmenu.html">TQPopupMenu</a>* stylemenu; + <a href="ntqpopupmenu.html">TQPopupMenu</a>* stylemenu; int pieRotationTimer; int pieRotation; - <a href="qpixmap.html">TQPixmap</a> pm; + <a href="ntqpixmap.html">TQPixmap</a> pm; private slots: void setStyleFromMenu(int id); @@ -178,62 +178,62 @@ private slots: <a name="f564"></a>Graph::Graph( GraphModel& mdl ) : model(mdl), - <a href="qwidget.html#style">style</a>(Bar), + <a href="ntqwidget.html#style">style</a>(Bar), pieRotationTimer(0), pieRotation(0) { // Create a menubar for the widget // - menubar = new <a href="qmenubar.html">TQMenuBar</a>( this ); - stylemenu = new <a href="qpopupmenu.html">TQPopupMenu</a>; -<a name="x2768"></a> stylemenu-><a href="qpopupmenu.html#setCheckable">setCheckable</a>(TRUE); + menubar = new <a href="ntqmenubar.html">TQMenuBar</a>( this ); + stylemenu = new <a href="ntqpopupmenu.html">TQPopupMenu</a>; +<a name="x2768"></a> stylemenu-><a href="ntqpopupmenu.html#setCheckable">setCheckable</a>(TRUE); for ( Style s = Pie; styleName[s]; s = Style(s+1)) { - stylemenu-><a href="qmenudata.html#insertItem">insertItem</a>(styleName[s], s+100); + stylemenu-><a href="ntqmenudata.html#insertItem">insertItem</a>(styleName[s], s+100); } -<a name="x2767"></a> <a href="qobject.html#connect">connect</a>(stylemenu, SIGNAL(<a href="qpopupmenu.html#activated">activated</a>(int)), +<a name="x2767"></a> <a href="ntqobject.html#connect">connect</a>(stylemenu, SIGNAL(<a href="ntqpopupmenu.html#activated">activated</a>(int)), this, SLOT(setStyleFromMenu(int))); - <a href="qwidget.html#setStyle">setStyle</a>(Pie); + <a href="ntqwidget.html#setStyle">setStyle</a>(Pie); - menubar-><a href="qmenudata.html#insertItem">insertItem</a>("Style", stylemenu); - menubar-><a href="qmenudata.html#insertSeparator">insertSeparator</a>(); + menubar-><a href="ntqmenudata.html#insertItem">insertItem</a>("Style", stylemenu); + menubar-><a href="ntqmenudata.html#insertSeparator">insertSeparator</a>(); - <a href="qpopupmenu.html">TQPopupMenu</a>* help = new <a href="qpopupmenu.html">TQPopupMenu</a>; - help-><a href="qmenudata.html#insertItem">insertItem</a>( "About plugin...", this, SIGNAL(aboutPlugin()) ); - help-><a href="qmenudata.html#insertItem">insertItem</a>( "About data...", this, SIGNAL(aboutData()) ); - menubar-><a href="qmenudata.html#insertItem">insertItem</a>("Help", help); -<a name="x2745"></a> menubar-><a href="qmenubar.html#hide">hide</a>(); + <a href="ntqpopupmenu.html">TQPopupMenu</a>* help = new <a href="ntqpopupmenu.html">TQPopupMenu</a>; + help-><a href="ntqmenudata.html#insertItem">insertItem</a>( "About plugin...", this, SIGNAL(aboutPlugin()) ); + help-><a href="ntqmenudata.html#insertItem">insertItem</a>( "About data...", this, SIGNAL(aboutData()) ); + menubar-><a href="ntqmenudata.html#insertItem">insertItem</a>("Help", help); +<a name="x2745"></a> menubar-><a href="ntqmenubar.html#hide">hide</a>(); } Graph::~Graph() { } -<a name="x2778"></a>void Graph::<a href="qwidget.html#setStyle">setStyle</a>(Style s) +<a name="x2778"></a>void Graph::<a href="ntqwidget.html#setStyle">setStyle</a>(Style s) { if (style != s) { if (pieRotationTimer) - <a href="qobject.html#killTimer">killTimer</a>(pieRotationTimer); -<a name="x2749"></a> stylemenu-><a href="qmenudata.html#setItemChecked">setItemChecked</a>(100+style, FALSE); + <a href="ntqobject.html#killTimer">killTimer</a>(pieRotationTimer); +<a name="x2749"></a> stylemenu-><a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(100+style, FALSE); style = s; if ( style == Pie ) - pieRotationTimer = <a href="qobject.html#startTimer">startTimer</a>( 80 ); + pieRotationTimer = <a href="ntqobject.html#startTimer">startTimer</a>( 80 ); else pieRotationTimer = 0; - stylemenu-><a href="qmenudata.html#setItemChecked">setItemChecked</a>(100+style, TRUE); - <a href="qwidget.html#update">update</a>(); + stylemenu-><a href="ntqmenudata.html#setItemChecked">setItemChecked</a>(100+style, TRUE); + <a href="ntqwidget.html#update">update</a>(); } } -<a name="x2755"></a>void Graph::<a href="qobject.html#timerEvent">timerEvent</a>(TQTimerEvent*) +<a name="x2755"></a>void Graph::<a href="ntqobject.html#timerEvent">timerEvent</a>(TQTimerEvent*) { pieRotation = ( pieRotation + 6 ) % 360; repaint(FALSE); } -void Graph::<a href="qwidget.html#setStyle">setStyle</a>(const char* stext) +void Graph::<a href="ntqwidget.html#setStyle">setStyle</a>(const char* stext) { for ( Style s = Pie; styleName[s]; s = Style(s+1) ) { - if ( <a href="qcstring.html#qstricmp">qstricmp</a>(stext,styleName[s])==0 ) { - <a href="qwidget.html#setStyle">setStyle</a>(s); + if ( <a href="ntqcstring.html#qstricmp">qstricmp</a>(stext,styleName[s])==0 ) { + <a href="ntqwidget.html#setStyle">setStyle</a>(s); return; } } @@ -241,19 +241,19 @@ void Graph::<a href="qwidget.html#setStyle">setStyle</a>(const char* stext) <a name="x2753"></a>void Graph::<a href="qnpwidget.html#enterInstance">enterInstance</a>() { -<a name="x2746"></a> menubar-><a href="qmenubar.html#show">show</a>(); +<a name="x2746"></a> menubar-><a href="ntqmenubar.html#show">show</a>(); } <a name="x2754"></a>void Graph::<a href="qnpwidget.html#leaveInstance">leaveInstance</a>() { - menubar-><a href="qmenubar.html#hide">hide</a>(); + menubar-><a href="ntqmenubar.html#hide">hide</a>(); } void <a name="f565"></a>Graph::paintError(const char* e) { - <a href="qpainter.html">TQPainter</a> p(this); - int w = <a href="qwidget.html#width">width</a>(); -<a name="x2760"></a> p.<a href="qpainter.html#drawText">drawText</a>(w/8, 0, w-w/4, height(), AlignCenter|WordBreak, e); + <a href="ntqpainter.html">TQPainter</a> p(this); + int w = <a href="ntqwidget.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); } void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) @@ -263,39 +263,39 @@ void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) return; } - <a href="qptrlist.html">TQPtrList</a><GraphModel::Datum>& data = model.graphData(); + <a href="ntqptrlist.html">TQPtrList</a><GraphModel::Datum>& data = model.graphData(); double max = 0.0; -<a name="x2772"></a> for (GraphModel::Datum* rowdata = data.<a href="qptrlist.html#first">first</a>(); -<a name="x2773"></a> rowdata; rowdata = data.<a href="qptrlist.html#next">next</a>()) +<a name="x2772"></a> for (GraphModel::Datum* rowdata = data.<a href="ntqptrlist.html#first">first</a>(); +<a name="x2773"></a> rowdata; rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { if (rowdata[0].dbl > max) max = rowdata[0].dbl; } - const uint w = <a href="qwidget.html#width">width</a>(); - const uint h = <a href="qwidget.html#height">height</a>(); + const uint w = <a href="ntqwidget.html#width">width</a>(); + const uint h = <a href="ntqwidget.html#height">height</a>(); - <a href="qpainter.html">TQPainter</a> p(this); + <a href="ntqpainter.html">TQPainter</a> p(this); -<a name="x2762"></a> p.<a href="qpainter.html#setClipRect">setClipRect</a>(event->rect()); +<a name="x2762"></a> p.<a href="ntqpainter.html#setClipRect">setClipRect</a>(event->rect()); -<a name="x2771"></a> if ( w > data.<a href="qptrlist.html#count">count</a>() ) { +<a name="x2771"></a> if ( w > data.<a href="ntqptrlist.html#count">count</a>() ) { // More pixels than data int x = 0; int i = 0; - <a href="qfontmetrics.html">TQFontMetrics</a> fm=<a href="qwidget.html#fontMetrics">fontMetrics</a>(); -<a name="x2741"></a> int fh = fm.<a href="qfontmetrics.html#height">height</a>(); + <a href="ntqfontmetrics.html">TQFontMetrics</a> fm=<a href="ntqwidget.html#fontMetrics">fontMetrics</a>(); +<a name="x2741"></a> int fh = fm.<a href="ntqfontmetrics.html#height">height</a>(); - for (GraphModel::Datum* rowdata = data.<a href="qptrlist.html#first">first</a>(); - rowdata; rowdata = data.<a href="qptrlist.html#next">next</a>()) + for (GraphModel::Datum* rowdata = data.<a href="ntqptrlist.html#first">first</a>(); + rowdata; rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { - <a href="qcolor.html">TQColor</a> c; -<a name="x2740"></a> c.<a href="qcolor.html#setHsv">setHsv</a>( (i * 255)/data.<a href="qptrlist.html#count">count</a>(), 255, 255 );// rainbow effect - p.<a href="qpainter.html#setBrush">setBrush</a>(c); - int bw = (w-w/4-x)/(data.<a href="qptrlist.html#count">count</a>()-i); + <a href="ntqcolor.html">TQColor</a> c; +<a name="x2740"></a> c.<a href="ntqcolor.html#setHsv">setHsv</a>( (i * 255)/data.<a href="ntqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect + p.<a href="ntqpainter.html#setBrush">setBrush</a>(c); + int bw = (w-w/4-x)/(data.<a href="ntqptrlist.html#count">count</a>()-i); int bh = int((h-h/4-1)*rowdata[0].dbl/max); - p.<a href="qpainter.html#drawRect">drawRect</a>( w/8+x, h-h/8-1-bh, bw, bh ); + p.<a href="ntqpainter.html#drawRect">drawRect</a>( w/8+x, h-h/8-1-bh, bw, bh ); i++; x+=bw; @@ -306,18 +306,18 @@ void <a name="f566"></a>Graph::paintBar(TQPaintEvent* event) int i = 0; double av = 0.0; int n = 0; - for (GraphModel::Datum* rowdata = data.<a href="qptrlist.html#first">first</a>(); rowdata; - rowdata = data.<a href="qptrlist.html#next">next</a>()) + for (GraphModel::Datum* rowdata = data.<a href="ntqptrlist.html#first">first</a>(); rowdata; + rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { - int bx = i*w/data.<a href="qptrlist.html#count">count</a>(); + int bx = i*w/data.<a href="ntqptrlist.html#count">count</a>(); if (bx > x) { - <a href="qcolor.html">TQColor</a> c; - c.<a href="qcolor.html#setHsv">setHsv</a>( (x * 255)/w, 255, 255 );// rainbow effect - p.<a href="qpainter.html#setPen">setPen</a>(c); + <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); int bh = int(h*av/n/max); - p.<a href="qpainter.html#drawLine">drawLine</a>(x,h-1,x,h-bh); + p.<a href="ntqpainter.html#drawLine">drawLine</a>(x,h-1,x,h-bh); av = 0.0; n = 0; @@ -339,14 +339,14 @@ void <a name="f567"></a>Graph::paintPie(TQPaintEvent* event) return; } - <a href="qptrlist.html">TQPtrList</a><GraphModel::Datum>& data = model.graphData(); + <a href="ntqptrlist.html">TQPtrList</a><GraphModel::Datum>& data = model.graphData(); double total = 0.0; GraphModel::Datum* rowdata; - for (rowdata = data.<a href="qptrlist.html#first">first</a>(); - rowdata; rowdata = data.<a href="qptrlist.html#next">next</a>()) + for (rowdata = data.<a href="ntqptrlist.html#first">first</a>(); + rowdata; rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { total += rowdata[0].dbl; } @@ -356,31 +356,31 @@ void <a name="f567"></a>Graph::paintPie(TQPaintEvent* event) int apos = (pieRotation-90)*16; - const int w = <a href="qwidget.html#width">width</a>(); - const int h = <a href="qwidget.html#height">height</a>(); + const int w = <a href="ntqwidget.html#width">width</a>(); + const int h = <a href="ntqwidget.html#height">height</a>(); const int xd = w - w/5; const int yd = h - h/5; -<a name="x2766"></a> pm.<a href="qpixmap.html#resize">resize</a>(<a href="qwidget.html#width">width</a>(),height()); -<a name="x2765"></a> pm.<a href="qpixmap.html#fill">fill</a>(<a href="qwidget.html#backgroundColor">backgroundColor</a>()); - <a href="qpainter.html">TQPainter</a> p(&pm); -<a name="x2763"></a> p.<a href="qpainter.html#setFont">setFont</a>(<a href="qwidget.html#font">font</a>()); +<a name="x2766"></a> pm.<a href="ntqpixmap.html#resize">resize</a>(<a href="ntqwidget.html#width">width</a>(),height()); +<a name="x2765"></a> pm.<a href="ntqpixmap.html#fill">fill</a>(<a href="ntqwidget.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="ntqwidget.html#font">font</a>()); - p.<a href="qpainter.html#setClipRect">setClipRect</a>(event->rect()); + p.<a href="ntqpainter.html#setClipRect">setClipRect</a>(event->rect()); int i = 0; - for (rowdata = data.<a href="qptrlist.html#first">first</a>(); - rowdata; rowdata = data.<a href="qptrlist.html#next">next</a>()) + for (rowdata = data.<a href="ntqptrlist.html#first">first</a>(); + rowdata; rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { - <a href="qcolor.html">TQColor</a> c; + <a href="ntqcolor.html">TQColor</a> c; - c.<a href="qcolor.html#setHsv">setHsv</a>( ( i * 255)/data.<a href="qptrlist.html#count">count</a>(), 255, 255 );// rainbow effect - p.<a href="qpainter.html#setBrush">setBrush</a>( c ); // solid fill with color c + c.<a href="ntqcolor.html#setHsv">setHsv</a>( ( i * 255)/data.<a href="ntqptrlist.html#count">count</a>(), 255, 255 );// rainbow effect + p.<a href="ntqpainter.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="qpainter.html#drawPie">drawPie</a>( w/10, h/10, xd, yd, -apos, -a ); +<a name="x2757"></a> p.<a href="ntqpainter.html#drawPie">drawPie</a>( w/10, h/10, xd, yd, -apos, -a ); apos += a; i++; } @@ -388,33 +388,33 @@ void <a name="f567"></a>Graph::paintPie(TQPaintEvent* event) if (model.colType(1) == GraphModel::Label) { double apos = (pieRotation-90)*M_PI/180; - for (rowdata = data.<a href="qptrlist.html#first">first</a>(); - rowdata; rowdata = data.<a href="qptrlist.html#next">next</a>()) + for (rowdata = data.<a href="ntqptrlist.html#first">first</a>(); + rowdata; rowdata = data.<a href="ntqptrlist.html#next">next</a>()) { double a = rowdata[0].dbl * 360 / total * M_PI / 180; int x = int(cos(apos+a/2)*w*5/16 + w/2 + 0.5); 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="qpainter.html#drawText">drawText</a>(x-w/8, y-h/8, w/4, h/4, + /*p.<a href="ntqpainter.html#drawText">drawText</a>(x-w/8, y-h/8, w/4, h/4, WordBreak|AlignCenter, *rowdata[1].str);*/ apos += a; } } - <a href="qpainter.html">TQPainter</a> p2(this); - p2.<a href="qpainter.html#setClipRect">setClipRect</a>(event->rect()); -<a name="x2758"></a> p2.<a href="qpainter.html#drawPixmap">drawPixmap</a>(0,0,pm); + <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); } void <a name="f568"></a>Graph::paintWait(TQPaintEvent*) { - <a href="qpainter.html">TQPainter</a> p(this); - p.<a href="qpainter.html#drawText">drawText</a>(rect(), AlignCenter, "Loading..."); + <a href="ntqpainter.html">TQPainter</a> p(this); + p.<a href="ntqpainter.html#drawText">drawText</a>(rect(), AlignCenter, "Loading..."); } -void Graph::<a href="qwidget.html#paintEvent">paintEvent</a>(TQPaintEvent* event) +void Graph::<a href="ntqwidget.html#paintEvent">paintEvent</a>(TQPaintEvent* event) { if (!model.nCols()) { paintWait(event); @@ -471,13 +471,13 @@ private: // Grapher is a GraphModel, so it implements the pure virtual // functions of that class. // - <a href="qptrlist.html">TQPtrList</a><Datum>& graphData(); + <a href="ntqptrlist.html">TQPtrList</a><Datum>& graphData(); ColType colType(int col) const; int nCols() const; void consumeLine(); - <a href="qptrlist.html">TQPtrList</a><Datum> data; - <a href="qbuffer.html">TQBuffer</a> line; + <a href="ntqptrlist.html">TQPtrList</a><Datum> data; + <a href="ntqbuffer.html">TQBuffer</a> line; int ncols; ColType *coltype; @@ -490,9 +490,9 @@ private slots: <a name="f570"></a>Grapher::Grapher() { -<a name="x2769"></a> data.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE); +<a name="x2769"></a> data.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE); ncols = 0; -<a name="x2743"></a> line.<a href="qiodevice.html#open">open</a>(IO_WriteOnly|IO_Truncate); +<a name="x2743"></a> line.<a href="ntqiodevice.html#open">open</a>(IO_WriteOnly|IO_Truncate); } Grapher::~Grapher() @@ -525,32 +525,32 @@ int <a name="f573"></a>Grapher::nCols() const // FONTFAMILY and FONTSIZE choose the font // const char* style = <a href="qnpinstance.html#arg">arg</a>("GRAPHSTYLE"); - if ( style ) graph-><a href="qwidget.html#setStyle">setStyle</a>(style); + if ( style ) graph-><a href="ntqwidget.html#setStyle">setStyle</a>(style); const char* fontfamily = <a href="qnpinstance.html#arg">arg</a>("FONTFAMILY"); const char* fontsize = <a href="qnpinstance.html#arg">arg</a>("FONTSIZE"); -<a name="x2775"></a> int ptsize = fontsize ? atoi(fontsize) : graph-><a href="qwidget.html#font">font</a>().pointSize(); - if (fontfamily) graph-><a href="qwidget.html#setFont">setFont</a>(TQFont(fontfamily, ptsize)); +<a name="x2775"></a> int ptsize = fontsize ? atoi(fontsize) : graph-><a href="ntqwidget.html#font">font</a>().pointSize(); + if (fontfamily) graph-><a href="ntqwidget.html#setFont">setFont</a>(TQFont(fontfamily, ptsize)); - <a href="qobject.html#connect">connect</a>(graph, SIGNAL(aboutPlugin()), this, SLOT(aboutPlugin())); - <a href="qobject.html#connect">connect</a>(graph, SIGNAL(aboutData()), this, SLOT(aboutData())); + <a href="ntqobject.html#connect">connect</a>(graph, SIGNAL(aboutPlugin()), this, SLOT(aboutPlugin())); + <a href="ntqobject.html#connect">connect</a>(graph, SIGNAL(aboutData()), this, SLOT(aboutData())); return graph; } void <a name="f574"></a>Grapher::consumeLine() { -<a name="x2742"></a> line.<a href="qiodevice.html#close">close</a>(); - line.<a href="qiodevice.html#open">open</a>(IO_ReadOnly); +<a name="x2742"></a> line.<a href="ntqiodevice.html#close">close</a>(); + line.<a href="ntqiodevice.html#open">open</a>(IO_ReadOnly); - <a href="qtextstream.html">TQTextStream</a> ts( &line ); + <a href="ntqtextstream.html">TQTextStream</a> ts( &line ); if (ncols == 0 ) { ncols=0; - <a href="qptrlist.html">TQPtrList</a><ColType> typelist; - typelist.<a href="qptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE); + <a href="ntqptrlist.html">TQPtrList</a><ColType> typelist; + typelist.<a href="ntqptrcollection.html#setAutoDelete">setAutoDelete</a>(TRUE); do { - <a href="qstring.html">TQString</a> typestr; + <a href="ntqstring.html">TQString</a> typestr; ts >> typestr >> ws; ColType* t = 0; if ( typestr == "num" ) { @@ -558,16 +558,16 @@ void <a name="f574"></a>Grapher::consumeLine() } else if ( typestr == "label" ) { t = new ColType(Label); } -<a name="x2770"></a> if (t) typelist.<a href="qptrlist.html#append">append</a>(t); -<a name="x2774"></a> } while (!ts.<a href="qtextstream.html#atEnd">atEnd</a>()); +<a name="x2770"></a> if (t) typelist.<a href="ntqptrlist.html#append">append</a>(t); +<a name="x2774"></a> } while (!ts.<a href="ntqtextstream.html#atEnd">atEnd</a>()); coltype = new ColType[ncols]; - for (ColType* t = typelist.<a href="qptrlist.html#first">first</a>(); t; t = typelist.<a href="qptrlist.html#next">next</a>()) { + for (ColType* t = typelist.<a href="ntqptrlist.html#first">first</a>(); t; t = typelist.<a href="ntqptrlist.html#next">next</a>()) { coltype[ncols++] = *t; } } else { int col=0; Datum *rowdata = new Datum[ncols]; - while ( col < ncols && !ts.<a href="qtextstream.html#atEnd">atEnd</a>() ) { + while ( col < ncols && !ts.<a href="ntqtextstream.html#atEnd">atEnd</a>() ) { switch (coltype[col]) { case Numeric: { double value; @@ -576,7 +576,7 @@ void <a name="f574"></a>Grapher::consumeLine() break; } case Label: { - <a href="qstring.html">TQString</a>* value = new <a href="qstring.html">TQString</a>; + <a href="ntqstring.html">TQString</a>* value = new <a href="ntqstring.html">TQString</a>; ts >> *value >> ws; rowdata[col].str = value; break; @@ -585,11 +585,11 @@ void <a name="f574"></a>Grapher::consumeLine() col++; } - data.<a href="qptrlist.html#append">append</a>(rowdata); + data.<a href="ntqptrlist.html#append">append</a>(rowdata); } - line.<a href="qiodevice.html#close">close</a>(); - line.<a href="qiodevice.html#open">open</a>(IO_WriteOnly|IO_Truncate); + line.<a href="ntqiodevice.html#close">close</a>(); + line.<a href="ntqiodevice.html#open">open</a>(IO_WriteOnly|IO_Truncate); } <a name="x2752"></a>int Grapher::<a href="qnpinstance.html#write">write</a>(TQNPStream* /*str*/, int /*offset*/, int len, void* buffer) @@ -611,7 +611,7 @@ void <a name="f574"></a>Grapher::consumeLine() case '\r': // ignore; break; default: -<a name="x2744"></a> line.<a href="qiodevice.html#putch">putch</a>(ch); +<a name="x2744"></a> line.<a href="ntqiodevice.html#putch">putch</a>(ch); } } if ( <a href="qnpinstance.html#widget">widget</a>() ) @@ -631,7 +631,7 @@ void <a name="f576"></a>Grapher::aboutData() if (page) <a href="qnpinstance.html#getURL">getURL</a>( page, "_blank" ); else -<a name="x2750"></a> TQMessageBox::<a href="qmessagebox.html#message">message</a>("Help", "No help for this data"); +<a name="x2750"></a> TQMessageBox::<a href="ntqmessagebox.html#message">message</a>("Help", "No help for this data"); } |