qnpinstance.html
来自「QT 下载资料仅供参考」· HTML 代码 · 共 320 行 · 第 1/2 页
HTML
320 行
<!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:1349 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QNPInstance 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>QNPInstance Class Reference</h1><p>The QNPInstance class provides a QObject that is a Web-browser plugin.<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>Inherits <a href="qobject.html">QObject</a>.<p><a href="qnpinstance-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#~QNPInstance"><b>~QNPInstance</b></a> ()</div></li><li><div class=fn>int <a href="#argc"><b>argc</b></a> () const</div></li><li><div class=fn>const char * <a href="#argn"><b>argn</b></a> ( int i ) const</div></li><li><div class=fn>const char * <a href="#argv"><b>argv</b></a> ( int i ) const</div></li><li><div class=fn>enum <a href="#Reason-enum"><b>Reason</b></a> { ReasonDone = 0, ReasonBreak = 1, ReasonError = 2, ReasonUnknown = -1 }</div></li><li><div class=fn>const char * <a href="#arg"><b>arg</b></a> ( const char * name ) const</div></li><li><div class=fn>enum <a href="#InstanceMode-enum"><b>InstanceMode</b></a> { Embed = 1, Full = 2, Background = 3 }</div></li><li><div class=fn>InstanceMode <a href="#mode"><b>mode</b></a> () const</div></li><li><div class=fn>const char * <a href="#userAgent"><b>userAgent</b></a> () const</div></li><li><div class=fn>virtual QNPWidget * <a href="#newWindow"><b>newWindow</b></a> ()</div></li><li><div class=fn>QNPWidget * <a href="#widget"><b>widget</b></a> ()</div></li><li><div class=fn>enum <a href="#StreamMode-enum"><b>StreamMode</b></a> { Normal = 1, Seek = 2, AsFile = 3, AsFileOnly = 4 }</div></li><li><div class=fn>virtual bool <a href="#newStreamCreated"><b>newStreamCreated</b></a> ( QNPStream *, StreamMode & smode )</div></li><li><div class=fn>virtual int <a href="#writeReady"><b>writeReady</b></a> ( QNPStream * )</div></li><li><div class=fn>virtual int <a href="#write"><b>write</b></a> ( QNPStream *, int offset, int len, void * buffer )</div></li><li><div class=fn>virtual void <a href="#streamDestroyed"><b>streamDestroyed</b></a> ( QNPStream * )</div></li><li><div class=fn>void <a href="#status"><b>status</b></a> ( const char * msg )</div></li><li><div class=fn>void <a href="#getURLNotify"><b>getURLNotify</b></a> ( const char * url, const char * window = 0, void * data = 0 )</div></li><li><div class=fn>void <a href="#getURL"><b>getURL</b></a> ( const char * url, const char * window = 0 )</div></li><li><div class=fn>void <a href="#postURL"><b>postURL</b></a> ( const char * url, const char * window, uint len, const char * buf, bool file )</div></li><li><div class=fn>QNPStream * <a href="#newStream"><b>newStream</b></a> ( const char * mimetype, const char * window, bool as_file = FALSE )</div></li><li><div class=fn>virtual void <a href="#streamAsFile"><b>streamAsFile</b></a> ( QNPStream *, const char * fname )</div></li><li><div class=fn>void * <a href="#getJavaPeer"><b>getJavaPeer</b></a> () const</div></li><li><div class=fn>virtual void <a href="#notifyURL"><b>notifyURL</b></a> ( const char * url, Reason r, void * notifyData )</div></li><li><div class=fn>virtual bool <a href="#printFullPage"><b>printFullPage</b></a> ()</div></li><li><div class=fn>virtual void <a href="#print"><b>print</b></a> ( QPainter * )</div></li></ul><h2>Protected Members</h2><ul><li><div class=fn><a href="#QNPInstance"><b>QNPInstance</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 QNPInstance class provides a <a href="qobject.html">QObject</a> that is a Web-browser plugin.<p> <p> Deriving from QNPInstance creates an object that represents asingle <tt><EMBED></tt> tag in an HTML document.<p> The QNPInstance is responsible for creating an appropriate windowif required (not all plugins have windows), and for interactingwith the input/output facilities intrinsic to plugins.<p> Note that there is <em>absolutely no guarantee</em> regarding the orderin which functions are called. Sometimes the browser will call<a href="#newWindow">newWindow</a>() first, at other times, <a href="#newStreamCreated">newStreamCreated</a>() will becalled first (assuming the <tt><EMBED></tt> tag has a SRC parameter).<p> <em>None of Qt's GUI functionality</em> may be used until after thefirst call to newWindow(). This includes any use of <a href="qpaintdevice.html">QPaintDevice</a>(ie. <a href="qpixmap.html">QPixmap</a>, <a href="qwidget.html">QWidget</a>, and all subclasses), <a href="qapplication.html">QApplication</a>, anythingrelated to <a href="qpainter.html">QPainter</a> (<a href="qbrush.html">QBrush</a>, etc.), fonts, <a href="qmovie.html">QMovie</a>, <a href="qtooltip.html">QToolTip</a>, etc.Useful classes which specifically <em>can</em> be used are <a href="qimage.html">QImage</a>,<a href="qfile.html">QFile</a>, and <a href="qbuffer.html">QBuffer</a>.<p> This restriction can easily be accommodated by structuring yourplugin so that the task of the QNPInstance is to gather data,while the task of the <a href="qnpwidget.html">QNPWidget</a> is to provide a graphicalinterface to that data,<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="InstanceMode-enum"></a>QNPInstance::InstanceMode</h3><p> This enum type provides Qt-style names for three #defines in<tt>npapi.h</tt>:<ul><li><tt>QNPInstance::Embed</tt> - corresponds to NP_EMBED<li><tt>QNPInstance::Full</tt> - corresponds to NP_FULL<li><tt>QNPInstance::Background</tt> - corresponds to NP_BACKGROUND</ul><p> <h3 class=fn><a name="Reason-enum"></a>QNPInstance::Reason</h3><ul><li><tt>QNPInstance::ReasonDone</tt><li><tt>QNPInstance::ReasonBreak</tt><li><tt>QNPInstance::ReasonError</tt><li><tt>QNPInstance::ReasonUnknown</tt></ul><h3 class=fn><a name="StreamMode-enum"></a>QNPInstance::StreamMode</h3><ul><li><tt>QNPInstance::Normal</tt><li><tt>QNPInstance::Seek</tt><li><tt>QNPInstance::AsFile</tt><li><tt>QNPInstance::AsFileOnly</tt></ul><hr><h2>Member Function Documentation</h2><h3 class=fn><a name="QNPInstance"></a>QNPInstance::QNPInstance ()<tt> [protected]</tt></h3>Creates a QNPInstance.<p> Can only be called from within a derived class created within<a href="qnplugin.html#newInstance">QNPlugin::newInstance</a>().<h3 class=fn><a name="~QNPInstance"></a>QNPInstance::~QNPInstance ()</h3>Called when the plugin instance is about to disappear.<h3 class=fn>const char * <a name="arg"></a>QNPInstance::arg ( const char * name ) const</h3>Returns the value of the named arguments, or 0 if no argumentcalled <em>name</em> appears in the <tt><EMBED></tt> tag of this instance.If the argument appears, but has no value assigned, the emptystring is returned. In summary:<p> <center><table cellpadding="4" cellspacing="2" border="0"><tr bgcolor="#a2c511"> <th valign="top">Tag <th valign="top">Result<tr bgcolor="#f0f0f0"> <td valign="top"><tt><EMBED ...></tt> <td valign="top">arg("FOO") == 0<tr bgcolor="#d0d0d0"> <td valign="top"><tt><EMBED FOO ...></tt> <td valign="top">arg("FOO") == ""<tr bgcolor="#f0f0f0"> <td valign="top"><tt><EMBED FOO=BAR ...></tt> <td valign="top">arg("FOO") == "BAR"</table></center><h3 class=fn>int <a name="argc"></a>QNPInstance::argc () const</h3>Returns the number of arguments to the instance. Note that youshould not normally rely on the ordering of arguments, and alsonote that the SGML specification does not permit multiplearguments with the same name.<p> <p>See also <a href="#arg">arg</a>().<h3 class=fn>const char * <a name="argn"></a>QNPInstance::argn ( int i ) const</h3>Returns the name of the <em>i</em>-th argument. See <a href="#argc">argc</a>().
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?