Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e63754dc5af9f9ec95223fcea9485104 > files > 1350

python3-PyQt4-devel-4.8.3-2.fc14.x86_64.rpm

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QAbstractFormBuilder Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QAbstractFormBuilder Class Reference<br /><sup><sup>[<a href="qtdesigner.html">QtDesigner</a> module]</sup></sup></h1><p>The QAbstractFormBuilder class provides a default implementation
for classes that create user interfaces at run-time. <a href="#details">More...</a></p>

<p>Inherited by <a href="qformbuilder.html">QFormBuilder</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractformbuilder.html#QAbstractFormBuilder">__init__</a></b> (<i>self</i>)</li><li><div class="fn" />QWidget <b><a href="qabstractformbuilder.html#load">load</a></b> (<i>self</i>, QIODevice&#160;<i>device</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qabstractformbuilder.html#save">save</a></b> (<i>self</i>, QIODevice&#160;<i>dev</i>, QWidget&#160;<i>widget</i>)</li><li><div class="fn" /><b><a href="qabstractformbuilder.html#setWorkingDirectory">setWorkingDirectory</a></b> (<i>self</i>, QDir&#160;<i>directory</i>)</li><li><div class="fn" />QDir <b><a href="qabstractformbuilder.html#workingDirectory">workingDirectory</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractFormBuilder class provides a default implementation
for classes that create user interfaces at run-time.</p>
<p>QAbstractFormBuilder provides a standard interface and a default
implementation for constructing forms from user interface files. It
is not intended to be instantiated directly. Use the <a href="qformbuilder.html">QFormBuilder</a> class to create user
interfaces from UI files at run-time. For example:</p>
<pre class="highlightedCode brush: cpp">
         MyForm.MyForm(QWidget *parent)
             : QWidget(parent)
         {
             QFormBuilder builder;
             QFile file(":/forms/myWidget.ui");
             file.open(QFile.ReadOnly);
             QWidget *myWidget = builder.load(&amp;file, this);
             file.close();

             QVBoxLayout *layout = new QVBoxLayout;
             layout-&gt;addWidget(myWidget);
             setLayout(layout);
         }
</pre>
<p>To override certain aspects of the form builder's behavior,
subclass QAbstractFormBuilder and reimplement the relevant virtual
functions:</p>
<ul>
<li><a href="qabstractformbuilder.html#load">load</a>() handles
reading of UI format files from arbitrary QIODevices, and
construction of widgets from the XML data that they contain.</li>
<li><a href="qabstractformbuilder.html#save">save</a>() handles
saving of widget details in UI format to arbitrary QIODevices.</li>
<li><a href="qabstractformbuilder.html#workingDirectory">workingDirectory</a>()
and <a href="qabstractformbuilder.html#setWorkingDirectory">setWorkingDirectory</a>()
control the directory in which forms are held. The form builder
looks for other resources on paths relative to this directory.</li>
</ul>
<p>The <a href="qformbuilder.html">QFormBuilder</a> class is
typically used by custom components and applications that embed
<i>Qt Designer</i>. Standalone applications that need to
dynamically generate user interfaces at run-time use the <a href="quiloader.html">QUiLoader</a>, found in the <a href="qtuitools.html">QtUiTools</a> module.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractFormBuilder" />QAbstractFormBuilder.__init__ (<i>self</i>)</h3><p>Constructs a new form builder.</p>


<h3 class="fn"><a name="load" /><a href="qwidget.html">QWidget</a> QAbstractFormBuilder.load (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<i>device</i>, <a href="qwidget.html">QWidget</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Loads an XML representation of a widget from the given
<i>device</i>, and constructs a new widget with the specified
<i>parent</i>.</p>
<p>See also <a href="qabstractformbuilder.html#save">save</a>().</p>


<h3 class="fn"><a name="save" />QAbstractFormBuilder.save (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<i>dev</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>)</h3><p>Saves an XML representation of the given <i>widget</i> to the
specified <i>device</i> in the standard UI file format.</p>
<p>See also <a href="qabstractformbuilder.html#load">load</a>().</p>


<h3 class="fn"><a name="setWorkingDirectory" />QAbstractFormBuilder.setWorkingDirectory (<i>self</i>, <a href="qdir.html">QDir</a>&#160;<i>directory</i>)</h3><p>Sets the current working directory of the form builder to the
specified <i>directory</i>.</p>
<p>See also <a href="qabstractformbuilder.html#workingDirectory">workingDirectory</a>().</p>


<h3 class="fn"><a name="workingDirectory" /><a href="qdir.html">QDir</a> QAbstractFormBuilder.workingDirectory (<i>self</i>)</h3><p>Returns the current working directory of the form builder.</p>
<p>See also <a href="qabstractformbuilder.html#setWorkingDirectory">setWorkingDirectory</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.7.1</td></tr></table></div></address></body></html>