⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qnpwidget.html

📁 QT 下载资料仅供参考
💻 HTML
字号:
<!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:1141 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QNPWidget 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>QNPWidget Class Reference</h1><p>The QNPWidget class provides a QWidget that is a Web-browser plugin window.<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>Inherits <a href="qwidget.html">QWidget</a>.<p><a href="qnpwidget-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#QNPWidget"><b>QNPWidget</b></a> ()</div></li><li><div class=fn><a href="#~QNPWidget"><b>~QNPWidget</b></a> ()</div></li><li><div class=fn>virtual void <a href="#enterInstance"><b>enterInstance</b></a> ()</div></li><li><div class=fn>virtual void <a href="#leaveInstance"><b>leaveInstance</b></a> ()</div></li><li><div class=fn>QNPInstance * <a href="#instance"><b>instance</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 QNPWidget class provides a <a href="qwidget.html">QWidget</a> that is a Web-browser plugin window.<p> <p> Derive from QNPWidget to create a widget that can be used as aBrowser plugin window, or create one and add child widgets.Instances of QNPWidget may only be created when<a href="qnpinstance.html#newWindow">QNPInstance::newWindow</a>() is called by the browser.<p> A common way to develop a plugin widget is to develop it as astand-alone application window, then make it a <em>child</em> of aplugin widget to use it as a browser plugin. The technique is:<p> <pre>class MyPluginWindow : public QNPWidget{    <a href="qwidget.html">QWidget</a>* child;public:    MyPluginWindow()    {        // Some widget that is normally used as a top-level widget        child = new MyIndependentlyDevelopedWidget();        // Use the background color of the web page        child-&gt;<a href="qwidget.html#setBackgroundColor">setBackgroundColor</a>( <a href="qwidget.html#backgroundColor">backgroundColor</a>() );        // Fill the plugin widget        child-&gt;<a href="qwidget.html#setGeometry">setGeometry</a>( 0, 0, width(), height() );    }    void resizeEvent(QResizeEvent*)    {        // Fill the plugin widget        child-&gt;<a href="qwidget.html#resize">resize</a>(<a href="qwidget.html#size">size</a>());    }};</pre> <p> The default implementation is an empty window.<hr><h2>Member Function Documentation</h2><h3 class=fn><a name="QNPWidget"></a>QNPWidget::QNPWidget ()</h3>Creates a QNPWidget.<h3 class=fn><a name="~QNPWidget"></a>QNPWidget::~QNPWidget ()</h3>Destroys the window. This will be called by the plugin bindingcode when the window is no longer required. The Web-browser willdelete windows when they leave the page. The bindings will changethe <a href="qwidget.html#winId">QWidget::winId</a>() of the window when the window is resized, butthis should not affect normal widget behavior.<h3 class=fn>void <a name="enterInstance"></a>QNPWidget::enterInstance ()<tt> [virtual]</tt></h3>Called when the mouse enters the plugin window. Does nothing bydefault.<p>Example: <a href="grapher-nsplugin-example.html#x2761">grapher/grapher.cpp</a>.<h3 class=fn><a href="qnpinstance.html">QNPInstance</a>&nbsp;* <a name="instance"></a>QNPWidget::instance ()</h3>Returns the instance for which this widget is the window.<h3 class=fn>void <a name="leaveInstance"></a>QNPWidget::leaveInstance ()<tt> [virtual]</tt></h3>Called when the mouse leaves the plugin window. Does nothing bydefault.<p>Example: <a href="grapher-nsplugin-example.html#x2762">grapher/grapher.cpp</a>.<!-- eof --><hr><p>This file is part of the <a href="index.html">Qt toolkit</a>.Copyright &copy; 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 &copy; 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -