Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 112b0974ad288f6cd55bf971ee6026a9 > files > 1585

libqt3-devel-3.0.2-2mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /tmp/qt-3.0-reggie-28534/qt-x11-free-3.0.2/extensions/nsplugin/src/qnp.cpp:1872 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>QNPlugin Class</title>
<style type="text/css"><!--
h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
body { background: #ffffff; color: black; }
--></style>
</head>
<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr bgcolor="#E5E5E5">
<td valign=center>
 <a href="index.html">
<font color="#004faf">Home</font></a>
 | <a href="classes.html">
<font color="#004faf">All&nbsp;Classes</font></a>
 | <a href="mainclasses.html">
<font color="#004faf">Main&nbsp;Classes</font></a>
 | <a href="annotated.html">
<font color="#004faf">Annotated</font></a>
 | <a href="groups.html">
<font color="#004faf">Grouped&nbsp;Classes</font></a>
 | <a href="functions.html">
<font color="#004faf">Functions</font></a>
</td>
<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QNPlugin Class Reference</h1>

<p>The QNPlugin class provides the plugin central factory.
<p>This class is part of the <b>Qt NSPlugin Extension</b>.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qnp-h.html">qnp.h</a>&gt;</tt>
<p><a href="qnplugin-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li><div class=fn>virtual <a href="#~QNPlugin"><b>~QNPlugin</b></a> ()</div></li>
<li><div class=fn>void <a href="#getVersionInfo"><b>getVersionInfo</b></a> ( int&nbsp;&amp;&nbsp;plugin_major, int&nbsp;&amp;&nbsp;plugin_minor, int&nbsp;&amp;&nbsp;browser_major, int&nbsp;&amp;&nbsp;browser_minor )</div></li>
<li><div class=fn>virtual QNPInstance * <a href="#newInstance"><b>newInstance</b></a> () = 0</div></li>
<li><div class=fn>virtual const char * <a href="#getMIMEDescription"><b>getMIMEDescription</b></a> () const = 0</div></li>
<li><div class=fn>virtual const char * <a href="#getPluginNameString"><b>getPluginNameString</b></a> () const = 0</div></li>
<li><div class=fn>virtual const char * <a href="#getPluginDescriptionString"><b>getPluginDescriptionString</b></a> () const = 0</div></li>
<li><div class=fn>virtual void * <a href="#getJavaClass"><b>getJavaClass</b></a> ()</div></li>
<li><div class=fn>virtual void <a href="#unuseJavaClass"><b>unuseJavaClass</b></a> ()</div></li>
<li><div class=fn>void * <a href="#getJavaEnv"><b>getJavaEnv</b></a> () const</div></li>
</ul>
<h2>Static Public Members</h2>
<ul>
<li><div class=fn>QNPlugin * <a href="#create"><b>create</b></a> ()</div></li>
<li><div class=fn>QNPlugin * <a href="#actual"><b>actual</b></a> ()</div></li>
</ul>
<h2>Protected Members</h2>
<ul>
<li><div class=fn><a href="#QNPlugin"><b>QNPlugin</b></a> ()</div></li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>
<p> This class is defined in the <b>Qt NSPlugin Extension</b>, which can be found in the <tt>qt/extensions</tt> directory. It is not included in the main Qt API.
<p>

The QNPlugin class provides the plugin central factory.
<p> 
<p> This class is the heart of the plugin.  One instance of this object is
created when the plugin is <em>first</em> needed, by calling
<a href="#create">QNPlugin::create</a>(), which must be implemented in your plugin code to
return some derived class of QNPlugin.  The one QNPlugin object creates
all instances for a single running Web-browser process.
<p> Additionally, if Qt is linked to the plugin as
a dynamic library, only one instance of <a href="qapplication.html">QApplication</a> will exist
<em>across all plugins that have been made with Qt</em>.  So,
your plugin should tread lightly on global settings - do not for
example, use <a href="qapplication.html#setFont">QApplication::setFont</a>() - that will change the font in
every widget of every Qt-based plugin currently loaded!

<hr><h2>Member Function Documentation</h2>
<h3 class=fn><a name="QNPlugin"></a>QNPlugin::QNPlugin ()<tt> [protected]</tt>
</h3>
Creates a QNPlugin.  This may only be used by the constructor
derived class returned by plugin's implementation of the
<a href="#create">QNPlugin::create</a>() function.

<h3 class=fn><a name="~QNPlugin"></a>QNPlugin::~QNPlugin ()<tt> [virtual]</tt>
</h3>
Destroys the QNPlugin.  This is called by the plugin binding code
just before the plugin is about to be unloaded from memory.  If newWindow()
has been called, a <a href="qapplication.html">QApplication</a> will still exist at this time, but will
be deleted shortly after before the plugin is deleted.

<h3 class=fn><a href="qnplugin.html">QNPlugin</a>&nbsp;* <a name="actual"></a>QNPlugin::actual ()<tt> [static]</tt>
</h3>
Returns the plugin most recently returns by <a href="#create">QNPlugin::create</a>().

<h3 class=fn><a href="qnplugin.html">QNPlugin</a>&nbsp;* <a name="create"></a>QNPlugin::create ()<tt> [static]</tt>
</h3>

<p> This must be implemented by your plugin code.  It should return a derived
class of QNPlugin.

<h3 class=fn>void * <a name="getJavaClass"></a>QNPlugin::getJavaClass ()<tt> [virtual]</tt>
</h3>
Override to return a reference to the Java class that represents
the plugin.  The default returns 0, indicating no class.
<p> If you override this class, you must also override
<a href="#unuseJavaClass">QNPlugin::unuseJavaClass</a>().
<p> The return value is actually a <tt>jref</tt> we use <tt>void*</tt> so
as to avoid burdening plugins which do not require Java.
<p> <p>See also <a href="#getJavaEnv">getJavaEnv</a>() and <a href="qnpinstance.html#getJavaPeer">QNPInstance::getJavaPeer</a>().

<h3 class=fn>void * <a name="getJavaEnv"></a>QNPlugin::getJavaEnv () const
</h3>
Returns a pointer to the Java execution environment, or 0 if
Java is disabled or an error occurred.
<p> The return value is actually a <tt>JRIEnv*</tt> we use <tt>void*</tt> so
as to avoid burdening plugins which do not require Java.
<p> <p>See also <a href="#getJavaClass">getJavaClass</a>() and <a href="qnpinstance.html#getJavaPeer">QNPInstance::getJavaPeer</a>().

<h3 class=fn>const char * <a name="getMIMEDescription"></a>QNPlugin::getMIMEDescription () const<tt> [pure virtual]</tt>
</h3>

<p> Override this to return the MIME description of the data formats
supported by your plugin.  The format of this string is shown
by the following example:
<p> <pre>
    const char* getMIMEDescription() const
    {
        return "image/x-png:png:PNG Image;"
               "image/png:png:PNG Image;"
               "image/x-portable-bitmap:pbm:PBM Image;"
               "image/x-portable-graymap:pgm:PGM Image;"
               "image/x-portable-pixmap:ppm:PPM Image;"
               "image/bmp:bmp:BMP Image;"
               "image/x-ms-bmp:bmp:BMP Image;"
               "image/x-xpixmap:xpm:XPM Image;"
               "image/xpm:xpm:XPM Image";
    }
</pre>
 

<h3 class=fn>const char * <a name="getPluginDescriptionString"></a>QNPlugin::getPluginDescriptionString () const<tt> [pure virtual]</tt>
</h3>

<p> Returns the plain-text description of the plugin.

<h3 class=fn>const char * <a name="getPluginNameString"></a>QNPlugin::getPluginNameString () const<tt> [pure virtual]</tt>
</h3>

<p> Returns the plain-text name of the plugin.

<h3 class=fn>void <a name="getVersionInfo"></a>QNPlugin::getVersionInfo ( int&nbsp;&amp;&nbsp;plugin_major, int&nbsp;&amp;&nbsp;plugin_minor, int&nbsp;&amp;&nbsp;browser_major, int&nbsp;&amp;&nbsp;browser_minor )
</h3>
Populates <em>*</em><em>plugin_major</em> and <em>*</em><em>plugin_minor</em> with the
version of the plugin API and populates <em>*</em><em>browser_major</em> and <em>*</em><em>browser_minor</em> with the version of the browser.

<h3 class=fn><a href="qnpinstance.html">QNPInstance</a>&nbsp;* <a name="newInstance"></a>QNPlugin::newInstance ()<tt> [pure virtual]</tt>
</h3>

<p> Override this to return an appropriate derived class of <a href="qnpinstance.html">QNPInstance</a>.

<h3 class=fn>void <a name="unuseJavaClass"></a>QNPlugin::unuseJavaClass ()<tt> [virtual]</tt>
</h3>
This function is called when the plugin is shutting down,
with jc set to the value returned earlier by <a href="#getJavaClass">getJavaClass</a>().
The function should <em>unuse</em> the Java class and return 0.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">Qt toolkit</a>.
Copyright &copy; 1995-2001
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2001 
<a href="http://www.trolltech.com">Trolltech</a><td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a>
<td align=right><div align=right>Qt version 3.0.2</div>
</table></div></address></body>
</html>