qnplugin.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 180 行
HTML
180 行
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/extensions/nsplugin/src/qnp.cpp:1891 --><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 Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped 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 <<a href="qnp-h.html">qnp.h</a>></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 & plugin_major, int & plugin_minor, int & browser_major, int & 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 objectis created when the plugin is <em>first</em> needed, by calling<a href="#create">QNPlugin::create</a>(), which must be implemented in your plugin codeto return some derived class of QNPlugin. The one QNPlugin objectcreates 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 lightlyon global settings - do not, for example, use<a href="qapplication.html#setFont">QApplication::setFont</a>() - that will change the font in everywidget 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 constructorderived class returned by the 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 codejust before the plugin is about to be unloaded from memory. IfnewWindow() has been called, a <a href="qapplication.html">QApplication</a> will still exist atthis time, but will be deleted shortly after before the plugin isdeleted.<h3 class=fn><a href="qnplugin.html">QNPlugin</a> * <a name="actual"></a>QNPlugin::actual ()<tt> [static]</tt></h3>Returns the plugin most recently returned by <a href="#create">QNPlugin::create</a>().<h3 class=fn><a href="qnplugin.html">QNPlugin</a> * <a name="create"></a>QNPlugin::create ()<tt> [static]</tt></h3><p> This must be implemented by your plugin code. It should return aderived 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 representsthe 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 toavoid 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 Javais disabled or an error occurred.<p> The return value is actually a <tt>JRIEnv*</tt>; we use <tt>void*</tt> so asto 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 formatssupported by your plugin. The format of this string is shown bythe 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 & plugin_major, int & plugin_minor, int & browser_major, int & browser_minor )</h3>Populates <em>*</em><em>plugin_major</em> and <em>*</em><em>plugin_minor</em> with theversion 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> * <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 <em>jc</em> set to the value returned earlier by <a href="#getJavaClass">getJavaClass</a>(). Thefunction should <em>unuse</em> the Java class.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright © 1995-2002<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 © 2002 <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.5</div></table></div></address></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?