Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 943

python-qt4-doc-4.10.3-3.mga4.noarch.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>QProgressBar 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="index.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">QProgressBar Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QProgressBar widget provides a horizontal or vertical
progress bar. <a href="#details">More...</a></p>

<p>Inherits <a href="qwidget.html">QWidget</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qprogressbar.html#Direction-enum">Direction</a></b> { TopToBottom, BottomToTop }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qprogressbar.html#QProgressBar">__init__</a></b> (<i>self</i>, QWidget&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />Qt.Alignment <b><a href="qprogressbar.html#alignment">alignment</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qprogressbar.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>e</i>)</li><li><div class="fn" />QString <b><a href="qprogressbar.html#format">format</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#initStyleOption">initStyleOption</a></b> (<i>self</i>, QStyleOptionProgressBar&#160;<i>option</i>)</li><li><div class="fn" />bool <b><a href="qprogressbar.html#invertedAppearance">invertedAppearance</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qprogressbar.html#isTextVisible">isTextVisible</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressbar.html#maximum">maximum</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressbar.html#minimum">minimum</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qprogressbar.html#minimumSizeHint">minimumSizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.Orientation <b><a href="qprogressbar.html#orientation">orientation</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#paintEvent">paintEvent</a></b> (<i>self</i>, QPaintEvent)</li><li><div class="fn" /><b><a href="qprogressbar.html#reset">reset</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setAlignment">setAlignment</a></b> (<i>self</i>, Qt.Alignment&#160;<i>alignment</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setFormat">setFormat</a></b> (<i>self</i>, QString&#160;<i>format</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setInvertedAppearance">setInvertedAppearance</a></b> (<i>self</i>, bool&#160;<i>invert</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setMaximum">setMaximum</a></b> (<i>self</i>, int&#160;<i>maximum</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setMinimum">setMinimum</a></b> (<i>self</i>, int&#160;<i>minimum</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setOrientation">setOrientation</a></b> (<i>self</i>, Qt.Orientation)</li><li><div class="fn" /><b><a href="qprogressbar.html#setRange">setRange</a></b> (<i>self</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setTextDirection">setTextDirection</a></b> (<i>self</i>, Direction&#160;<i>textDirection</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setTextVisible">setTextVisible</a></b> (<i>self</i>, bool&#160;<i>visible</i>)</li><li><div class="fn" /><b><a href="qprogressbar.html#setValue">setValue</a></b> (<i>self</i>, int&#160;<i>value</i>)</li><li><div class="fn" />QSize <b><a href="qprogressbar.html#sizeHint">sizeHint</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qprogressbar.html#text">text</a></b> (<i>self</i>)</li><li><div class="fn" />Direction <b><a href="qprogressbar.html#textDirection">textDirection</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qprogressbar.html#value">value</a></b> (<i>self</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qprogressbar.html#valueChanged">valueChanged</a></b> (int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QProgressBar widget provides a horizontal or vertical
progress bar.</p>
<p>A progress bar is used to give the user an indication of the
progress of an operation and to reassure them that the application
is still running.</p>
<p>The progress bar uses the concept of <i>steps</i>. You set it up
by specifying the minimum and maximum possible step values, and it
will display the percentage of steps that have been completed when
you later give it the current step value. The percentage is
calculated by dividing the progress (<a href="qprogressbar.html#value-prop">value</a>() - <a href="qprogressbar.html#minimum-prop">minimum</a>()) divided by <a href="qprogressbar.html#maximum-prop">maximum</a>() - <a href="qprogressbar.html#minimum-prop">minimum</a>().</p>
<p>You can specify the minimum and maximum number of steps with
<a href="qprogressbar.html#minimum-prop">setMinimum</a>() and
setMaximum. The current number of steps is set with <a href="qprogressbar.html#value-prop">setValue</a>(). The progress bar can
be rewound to the beginning with <a href="qprogressbar.html#reset">reset</a>().</p>
<p>If minimum and maximum both are set to 0, the bar shows a busy
indicator instead of a percentage of steps. This is useful, for
example, when using <a href="qftp.html">QFtp</a> or <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a> to download
items when they are unable to determine the size of the item being
downloaded.</p>
<table class="generic">
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Macintosh style progress bar" src="images/macintosh-progressbar.png" /></td>
<td>A progress bar shown in the Macintosh widget style.</td>
</tr>
<tr class="even" valign="top">
<td><img alt="Screenshot of a Windows XP style progress bar" src="images/windowsxp-progressbar.png" /></td>
<td>A progress bar shown in the Windows XP widget style.</td>
</tr>
<tr class="odd" valign="top">
<td><img alt="Screenshot of a Plastique style progress bar" src="images/plastique-progressbar.png" /></td>
<td>A progress bar shown in the Plastique widget style.</td>
</tr>
</table>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Direction-enum" />QProgressBar.Direction</h3><p>Specifies the reading direction of the <a href="qprogressbar.html#text-prop">text</a> for vertical progress
bars.</p>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QProgressBar.TopToBottom</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">The text is rotated 90 degrees clockwise.</td>
</tr>
<tr>
<td class="topAlign"><tt>QProgressBar.BottomToTop</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">The text is rotated 90 degrees
counter-clockwise.</td>
</tr>
</table>
<p>Note that whether or not the text is drawn is dependent on the
style. Currently CDE, CleanLooks, Motif, and Plastique draw the
text. Mac, Windows and WindowsXP style do not.</p>
<p>This enum was introduced or modified in Qt 4.1.</p>
<p><b>See also</b> <a href="qprogressbar.html#textDirection-prop">textDirection</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QProgressBar" />QProgressBar.__init__ (<i>self</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>Constructs a progress bar with the given <i>parent</i>.</p>
<p>By default, the minimum step value is set to 0, and the maximum
to 100.</p>
<p><b>See also</b> <a href="qprogressbar.html#setRange">setRange</a>().</p>


<h3 class="fn"><a name="alignment" /><a href="qt-alignment.html">Qt.Alignment</a> QProgressBar.alignment (<i>self</i>)</h3><h3 class="fn"><a name="event" />bool QProgressBar.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>e</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="format" />QString QProgressBar.format (<i>self</i>)</h3><h3 class="fn"><a name="initStyleOption" />QProgressBar.initStyleOption (<i>self</i>, <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a>&#160;<i>option</i>)</h3><p>Initialize <i>option</i> with the values from this <a href="qprogressbar.html">QProgressBar</a>. This method is useful for
subclasses when they need a <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a> or
<a href="qstyleoptionprogressbarv2.html">QStyleOptionProgressBarV2</a>, but
don't want to fill in all the information themselves. This function
will check the version of the <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a> and fill
in the additional values for a <a href="qstyleoptionprogressbarv2.html">QStyleOptionProgressBarV2</a>.</p>
<p><b>See also</b> <a href="qstyleoption.html#initFrom">QStyleOption.initFrom</a>().</p>


<h3 class="fn"><a name="invertedAppearance" />bool QProgressBar.invertedAppearance (<i>self</i>)</h3><h3 class="fn"><a name="isTextVisible" />bool QProgressBar.isTextVisible (<i>self</i>)</h3><h3 class="fn"><a name="maximum" />int QProgressBar.maximum (<i>self</i>)</h3><h3 class="fn"><a name="minimum" />int QProgressBar.minimum (<i>self</i>)</h3><h3 class="fn"><a name="minimumSizeHint" /><a href="qsize.html">QSize</a> QProgressBar.minimumSizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#minimumSizeHint-prop">QWidget.minimumSizeHint</a>().</p>


<h3 class="fn"><a name="orientation" /><a href="qt.html#Orientation-enum">Qt.Orientation</a> QProgressBar.orientation (<i>self</i>)</h3><h3 class="fn"><a name="paintEvent" />QProgressBar.paintEvent (<i>self</i>, <a href="qpaintevent.html">QPaintEvent</a>)</h3><p>Reimplemented from <a href="qwidget.html#paintEvent">QWidget.paintEvent</a>().</p>


<h3 class="fn"><a name="reset" />QProgressBar.reset (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void reset()</tt>.</p><p>Reset the progress bar. The progress bar "rewinds" and shows no
progress.</p>


<h3 class="fn"><a name="setAlignment" />QProgressBar.setAlignment (<i>self</i>, <a href="qt-alignment.html">Qt.Alignment</a>&#160;<i>alignment</i>)</h3><h3 class="fn"><a name="setFormat" />QProgressBar.setFormat (<i>self</i>, QString&#160;<i>format</i>)</h3><h3 class="fn"><a name="setInvertedAppearance" />QProgressBar.setInvertedAppearance (<i>self</i>, bool&#160;<i>invert</i>)</h3><h3 class="fn"><a name="setMaximum" />QProgressBar.setMaximum (<i>self</i>, int&#160;<i>maximum</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMaximum(int)</tt>.</p><h3 class="fn"><a name="setMinimum" />QProgressBar.setMinimum (<i>self</i>, int&#160;<i>minimum</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setMinimum(int)</tt>.</p><h3 class="fn"><a name="setOrientation" />QProgressBar.setOrientation (<i>self</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setOrientation(Qt::Orientation)</tt>.</p><h3 class="fn"><a name="setRange" />QProgressBar.setRange (<i>self</i>, int&#160;<i>minimum</i>, int&#160;<i>maximum</i>)</h3><p>Sets the progress bar's minimum and maximum values to
<i>minimum</i> and <i>maximum</i> respectively.</p>
<p>If <i>maximum</i> is smaller than <i>minimum</i>, <i>minimum</i>
becomes the only legal value.</p>
<p>If the current value falls outside the new range, the progress
bar is reset with <a href="qprogressbar.html#reset">reset</a>().</p>
<p><b>See also</b> <a href="qprogressbar.html#minimum-prop">minimum</a> and <a href="qprogressbar.html#maximum-prop">maximum</a>.</p>


<h3 class="fn"><a name="setTextDirection" />QProgressBar.setTextDirection (<i>self</i>, <a href="qprogressbar.html#Direction-enum">Direction</a>&#160;<i>textDirection</i>)</h3><h3 class="fn"><a name="setTextVisible" />QProgressBar.setTextVisible (<i>self</i>, bool&#160;<i>visible</i>)</h3><h3 class="fn"><a name="setValue" />QProgressBar.setValue (<i>self</i>, int&#160;<i>value</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setValue(int)</tt>.</p><h3 class="fn"><a name="sizeHint" /><a href="qsize.html">QSize</a> QProgressBar.sizeHint (<i>self</i>)</h3><p>Reimplemented from <a href="qwidget.html#sizeHint-prop">QWidget.sizeHint</a>().</p>


<h3 class="fn"><a name="text" />QString QProgressBar.text (<i>self</i>)</h3><h3 class="fn"><a name="textDirection" /><a href="qprogressbar.html#Direction-enum">Direction</a> QProgressBar.textDirection (<i>self</i>)</h3><h3 class="fn"><a name="value" />int QProgressBar.value (<i>self</i>)</h3><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="valueChanged" />void valueChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the value shown in the progress bar
changes. <i>value</i> is the new value shown by the progress
bar.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.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> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>