diff options
Diffstat (limited to 'doc/html/grapher-nsplugin-example.html')
-rw-r--r-- | doc/html/grapher-nsplugin-example.html | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/doc/html/grapher-nsplugin-example.html b/doc/html/grapher-nsplugin-example.html index 6815116d1..bd138c659 100644 --- a/doc/html/grapher-nsplugin-example.html +++ b/doc/html/grapher-nsplugin-example.html @@ -34,8 +34,8 @@ body { background: #ffffff; color: black; } <p> This example graphs data from a simple text file. It -demonstrates the use of the <a href="qnpinstance.html#writeReady">TQNPInstance::writeReady</a>() -and <a href="qnpinstance.html#write">TQNPInstance::write</a>() functions. +demonstrates the use of the <a href="tqnpinstance.html#writeReady">TQNPInstance::writeReady</a>() +and <a href="tqnpinstance.html#write">TQNPInstance::write</a>() functions. <p> To build the example, you must first build the <a href=nsplugin.html>TQt Netscape Plugin Extension</a> library. Then type <tt>make</tt> in <tt>extensions/nsplugin/examples/grapher/</tt> @@ -72,7 +72,7 @@ to an image at the server. <hr> Implementation: <p> <pre>// Include TQt Netscape Plugin classes. -#include "ntqnp.h" +#include "tqnp.h" // Include other TQt classes. #include <<a href="tqpainter-h.html">tqpainter.h</a>> @@ -82,7 +82,7 @@ Implementation: #include <<a href="tqmenubar-h.html">tqmenubar.h</a>> #include <<a href="tqpushbutton-h.html">tqpushbutton.h</a>> #include <<a href="tqptrlist-h.html">tqptrlist.h</a>> -#include <<a href="qmessagebox-h.html">ntqmessagebox.h</a>> +#include <<a href="tqmessagebox-h.html">tqmessagebox.h</a>> // Include some C library functions. #include <math.h> @@ -120,7 +120,7 @@ public: // returned by Grapher::newWindow() below. // -class Graph : public <a href="qnpwidget.html">TQNPWidget</a> { +class Graph : public <a href="tqnpwidget.html">TQNPWidget</a> { <a href="metaobjects.html#TQ_OBJECT">TQ_OBJECT</a> public: // Constructs a Graph to display a GraphModel @@ -239,12 +239,12 @@ void Graph::<a href="tqwidget.html#setStyle">setStyle</a>(const char* stext) } } -<a name="x2753"></a>void Graph::<a href="qnpwidget.html#enterInstance">enterInstance</a>() +<a name="x2753"></a>void Graph::<a href="tqnpwidget.html#enterInstance">enterInstance</a>() { <a name="x2746"></a> menubar-><a href="tqmenubar.html#show">show</a>(); } -<a name="x2754"></a>void Graph::<a href="qnpwidget.html#leaveInstance">leaveInstance</a>() +<a name="x2754"></a>void Graph::<a href="tqnpwidget.html#leaveInstance">leaveInstance</a>() { menubar-><a href="tqmenubar.html#hide">hide</a>(); } @@ -448,7 +448,7 @@ const char* Graph::styleName[] = { "Pie", "Bar", 0 }; // a Graph widget to display the GraphModel that is the Grapher itself. // -class Grapher : public <a href="qnpinstance.html">TQNPInstance</a>, GraphModel { +class Grapher : public <a href="tqnpinstance.html">TQNPInstance</a>, GraphModel { TQ_OBJECT public: // Create a Grapher - all Grapher plugins are created @@ -460,7 +460,7 @@ public: // We override this TQNPInstance function to create our // own subclass of TQNPWidget, a Graph widget. // - <a href="qnpwidget.html">TQNPWidget</a>* newWindow(); + <a href="tqnpwidget.html">TQNPWidget</a>* newWindow(); // We override this TQNPInstance function to process the // incoming graph data. @@ -515,7 +515,7 @@ int <a name="f573"></a>Grapher::nCols() const } -<a name="x2751"></a>TQNPWidget* Grapher::<a href="qnpinstance.html#newWindow">newWindow</a>() +<a name="x2751"></a>TQNPWidget* Grapher::<a href="tqnpinstance.html#newWindow">newWindow</a>() { // Create a Graph - our subclass of TQNPWidget. Graph *graph = new Graph(*this); @@ -524,11 +524,11 @@ int <a name="f573"></a>Grapher::nCols() const // GRAPHSTYLE chooses pie or bar // FONTFAMILY and FONTSIZE choose the font // - const char* style = <a href="qnpinstance.html#arg">arg</a>("GRAPHSTYLE"); + const char* style = <a href="tqnpinstance.html#arg">arg</a>("GRAPHSTYLE"); if ( style ) graph-><a href="tqwidget.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"); + const char* fontfamily = <a href="tqnpinstance.html#arg">arg</a>("FONTFAMILY"); + const char* fontsize = <a href="tqnpinstance.html#arg">arg</a>("FONTSIZE"); <a name="x2775"></a> int ptsize = fontsize ? atoi(fontsize) : graph-><a href="tqwidget.html#font">font</a>().pointSize(); if (fontfamily) graph-><a href="tqwidget.html#setFont">setFont</a>(TQFont(fontfamily, ptsize)); @@ -592,7 +592,7 @@ void <a name="f574"></a>Grapher::consumeLine() line.<a href="tqiodevice.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) +<a name="x2752"></a>int Grapher::<a href="tqnpinstance.html#write">write</a>(TQNPStream* /*str*/, int /*offset*/, int len, void* buffer) { // The browser calls this function when data is available on one // of the streams the plugin has requested. Since we are only @@ -614,24 +614,24 @@ void <a name="f574"></a>Grapher::consumeLine() <a name="x2744"></a> line.<a href="tqiodevice.html#putch">putch</a>(ch); } } - if ( <a href="qnpinstance.html#widget">widget</a>() ) - <a href="qnpinstance.html#widget">widget</a>()->update(); + if ( <a href="tqnpinstance.html#widget">widget</a>() ) + <a href="tqnpinstance.html#widget">widget</a>()->update(); return len; } void <a name="f575"></a>Grapher::aboutPlugin() { - <a href="qnpinstance.html#getURL">getURL</a>( "http://doc.trolltech.com/netscape-plugin.html", "_blank" ); + <a href="tqnpinstance.html#getURL">getURL</a>( "http://doc.trolltech.com/netscape-plugin.html", "_blank" ); } void <a name="f576"></a>Grapher::aboutData() { - const char* page = <a href="qnpinstance.html#arg">arg</a>("DATAPAGE"); + const char* page = <a href="tqnpinstance.html#arg">arg</a>("DATAPAGE"); if (page) - <a href="qnpinstance.html#getURL">getURL</a>( page, "_blank" ); + <a href="tqnpinstance.html#getURL">getURL</a>( page, "_blank" ); else -<a name="x2750"></a> TQMessageBox::<a href="ntqmessagebox.html#message">message</a>("Help", "No help for this data"); +<a name="x2750"></a> TQMessageBox::<a href="tqmessagebox.html#message">message</a>("Help", "No help for this data"); } @@ -641,13 +641,13 @@ void <a name="f576"></a>Grapher::aboutData() // creating instances of the plugin when it appears in web page. // -class GrapherPlugin : public <a href="qnplugin.html">TQNPlugin</a> { +class GrapherPlugin : public <a href="tqnplugin.html">TQNPlugin</a> { public: GrapherPlugin() { } - <a href="qnpinstance.html">TQNPInstance</a>* newInstance() + <a href="tqnpinstance.html">TQNPInstance</a>* newInstance() { // Make a new Grapher, our subclass of TQNPInstance. return new Grapher; |