Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 5597

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- qx11embed_x11.cpp -->
<head>
  <title>Qt 4.6: QX11EmbedContainer Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QX11EmbedContainer"></a>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QX11EmbedContainer Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QX11EmbedContainer class provides an XEmbed container widget. <a href="#details">More...</a></p>
<pre> #include &lt;QX11EmbedContainer&gt;</pre><p>Inherits <a href="qwidget.html">QWidget</a>.</p>
<ul>
<li><a href="qx11embedcontainer-members.html">List of all members, including inherited members</a></li>
</ul>
<hr />
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#Error-enum">Error</a></b> { Unknown, InvalidWindowID }</td></tr>
</table>
<hr />
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#QX11EmbedContainer">QX11EmbedContainer</a></b> ( QWidget * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#dtor.QX11EmbedContainer">~QX11EmbedContainer</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">WId </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#clientWinId">clientWinId</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#discardClient">discardClient</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#embedClient">embedClient</a></b> ( WId <i>id</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Error </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#error">error</a></b> () const</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>217 public functions inherited from <a href="qwidget.html#public-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>13 public functions inherited from <a href="qpaintdevice.html#public-functions">QPaintDevice</a></li>
</ul>
<hr />
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#clientClosed">clientClosed</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#clientIsEmbedded">clientIsEmbedded</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#error-2">error</a></b> ( QX11EmbedContainer::Error <i>error</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qwidget.html#signals">QWidget</a></li>
<li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<hr />
<a name="reimplemented-protected-functions"></a>
<h2>Reimplemented Protected Functions</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#event">event</a></b> ( QEvent * <i>event</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><b><a href="qx11embedcontainer.html#paintEvent">paintEvent</a></b> ( QPaintEvent * <i>e</i> )</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div bar="2" class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div bar="2" class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"></div>58 properties inherited from <a href="qwidget.html#properties">QWidget</a></li>
<li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
<li><div class="fn"></div>19 public slots inherited from <a href="qwidget.html#public-slots">QWidget</a></li>
<li><div class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
<li><div class="fn"></div>4 static public members inherited from <a href="qwidget.html#static-public-members">QWidget</a></li>
<li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
<li><div class="fn"></div>37 protected functions inherited from <a href="qwidget.html#protected-functions">QWidget</a></li>
<li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
<li><div class="fn"></div>1 protected function inherited from <a href="qpaintdevice.html#protected-functions">QPaintDevice</a></li>
<li><div class="fn"></div>1 protected slot inherited from <a href="qwidget.html#protected-slots">QWidget</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QX11EmbedContainer class provides an XEmbed container widget.</p>
<p>XEmbed is an X11 protocol that supports the embedding of a widget from one application into another application.</p>
<p>An XEmbed <i>container</i> is the graphical location that embeds an external <i>client widget</i>. A client widget is a window that is embedded into a container.</p>
<p>When a widget has been embedded and the container receives tab focus, focus is passed on to the widget. When the widget reaches the end of its focus chain, focus is passed back to the container. Window activation, accelerator support, modality and drag and drop (XDND) are also handled.</p>
<p>QX11EmbedContainer is commonly used for writing panels or toolbars that hold applets, or for <i>swallowing</i> X11 applications. When writing a panel application, one container widget is created on the toolbar, and it can then either swallow another widget using embed(), or allow an XEmbed widget to be embedded into itself. The container's X11 window ID, which is retrieved with <a href="qwidget.html#winId">winId</a>(), must then be known to the client widget. After embedding, the client's window ID can be retrieved with <a href="qx11embedcontainer.html#clientWinId">clientWinId</a>().</p>
<p>In the following example, a container widget is created as the main widget. It then invokes an application called &quot;playmovie&quot;, passing its window ID as a command line argument. The &quot;playmovie&quot; program is an XEmbed client widget. The widget embeds itself into the container using the container's window ID.</p>
<pre> int main(int argc, char *argv[])
 {
     QApplication app(argc, argv);

     if (app.arguments().count() != 2) {
         qFatal(&quot;Error - expected executable path as argument&quot;);
         return 1;
     }

     QX11EmbedContainer container;
     container.show();

     QProcess process(&amp;container);
     QString executable(app.arguments()[1]);
     QStringList arguments;
     arguments &lt;&lt; QString::number(container.winId());
     process.start(executable, arguments);

     int status = app.exec();
     process.close();
     return status;
 }</pre>
<p>When the client widget is embedded, the container emits the signal <a href="qx11embedcontainer.html#clientIsEmbedded">clientIsEmbedded</a>(). The signal <a href="qx11embedcontainer.html#clientClosed">clientClosed</a>() is emitted when a widget is closed.</p>
<p>It is possible for QX11EmbedContainer to embed XEmbed widgets from toolkits other than Qt, such as GTK+. Arbitrary (non-XEmbed) X11 widgets can also be embedded, but the XEmbed-specific features such as window activation and focus handling are then lost.</p>
<p>The GTK+ equivalent of QX11EmbedContainer is GtkSocket. The corresponding KDE 3 widget is called QXEmbed.</p>
<p>See also <a href="qx11embedwidget.html">QX11EmbedWidget</a> and <a href="http://www.freedesktop.org/Standards/xembed-spec">XEmbed Specification</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QX11EmbedContainer/Error"></a>
<a name="//apple_ref/cpp/econst/QX11EmbedContainer/Unknown"></a>
<a name="//apple_ref/cpp/econst/QX11EmbedContainer/InvalidWindowID"></a>
<a name="//apple_ref/cpp/econst/QX11EmbedContainer/Internal"></a>
<h3 class="fn"><a name="Error-enum"></a>enum QX11EmbedContainer::Error</h3>
<p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QX11EmbedContainer::Unknown</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">An unrecognized error occurred.</td></tr>
<tr><td valign="top"><tt>QX11EmbedContainer::InvalidWindowID</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The X11 window ID of the container was invalid. This error is usually triggered by passing an invalid window ID to embed().</td></tr>
</table></p>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/QX11EmbedContainer"></a>
<h3 class="fn"><a name="QX11EmbedContainer"></a>QX11EmbedContainer::QX11EmbedContainer ( <a href="qwidget.html">QWidget</a> * <i>parent</i> = 0 )</h3>
<p>Creates a <a href="qx11embedcontainer.html">QX11EmbedContainer</a> object with the given <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/~QX11EmbedContainer"></a>
<h3 class="fn"><a name="dtor.QX11EmbedContainer"></a>QX11EmbedContainer::~QX11EmbedContainer ()</h3>
<p>Destructs a <a href="qx11embedcontainer.html">QX11EmbedContainer</a>.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/clientClosed"></a>
<h3 class="fn"><a name="clientClosed"></a>void QX11EmbedContainer::clientClosed ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted by the container when the client widget closes.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/clientIsEmbedded"></a>
<h3 class="fn"><a name="clientIsEmbedded"></a>void QX11EmbedContainer::clientIsEmbedded ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted by the container when a client widget has been embedded.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/clientWinId"></a>
<h3 class="fn"><a name="clientWinId"></a><a href="qwidget.html#WId-typedef">WId</a> QX11EmbedContainer::clientWinId () const</h3>
<p>If the container has an embedded widget, this function returns the X11 window ID of the client; otherwise it returns 0.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/discardClient"></a>
<h3 class="fn"><a name="discardClient"></a>void QX11EmbedContainer::discardClient ()</h3>
<p>Detaches the client from the embedder. The client will appear as a standalone window on the desktop.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/embedClient"></a>
<h3 class="fn"><a name="embedClient"></a>void QX11EmbedContainer::embedClient ( <a href="qwidget.html#WId-typedef">WId</a> <i>id</i> )</h3>
<p>Instructs the container to embed the X11 window with window ID <i>id</i>. The client widget will then move on top of the container window and be resized to fit into the container.</p>
<p>The <i>id</i> should be the ID of a window controlled by an XEmbed enabled application, but this is not mandatory. If <i>id</i> does not belong to an XEmbed client widget, then focus handling, activation, accelerators and other features will not work properly.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/error"></a>
<h3 class="fn"><a name="error"></a><a href="qx11embedcontainer.html#Error-enum">Error</a> QX11EmbedContainer::error () const</h3>
<p>Returns the last error that occurred.</p>
<h3 class="fn"><a name="error-2"></a>void QX11EmbedContainer::error ( <a href="qx11embedcontainer.html#Error-enum">QX11EmbedContainer::Error</a> <i>error</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted if an error occurred when embedding or communicating with a client. The specified <i>error</i> describes the problem that occurred.</p>
<p>See also <a href="qx11embedcontainer.html#Error-enum">QX11EmbedContainer::Error</a>.</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/event"></a>
<h3 class="fn"><a name="event"></a>bool QX11EmbedContainer::event ( <a href="qevent.html">QEvent</a> * <i>event</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qobject.html#event">QObject::event</a>().</p>
<a name="//apple_ref/cpp/instm/QX11EmbedContainer/paintEvent"></a>
<h3 class="fn"><a name="paintEvent"></a>void QX11EmbedContainer::paintEvent ( <a href="qpaintevent.html">QPaintEvent</a> * <i>e</i> )&nbsp;&nbsp;<tt> [virtual protected]</tt></h3>
<p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>().</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 2010 Nokia Corporation and/or its subsidiary(-ies)</td>
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="40%" align="right"><div align="right">Qt 4.6.3</div></td>
</tr></table></div></address></body>
</html>