File: qstyleoptionprogressbarv2.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (36 lines) | stat: -rw-r--r-- 7,823 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?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>QStyleOptionProgressBarV2 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">QStyleOptionProgressBarV2 Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QStyleOptionProgressBarV2 class is used to describe the parameters necessary for drawing a progress bar in Qt 4.1 or above. <a href="#details">More...</a></p>
<p>Inherits <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qstyleoptionprogressbarv2.html#QStyleOptionProgressBarV2">__init__</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qstyleoptionprogressbarv2.html#QStyleOptionProgressBarV2-2">__init__</a></b> (<i>self</i>, QStyleOptionProgressBar&#160;<i>other</i>)</li><li><div class="fn" /><b><a href="qstyleoptionprogressbarv2.html#QStyleOptionProgressBarV2-3">__init__</a></b> (<i>self</i>, QStyleOptionProgressBarV2&#160;<i>other</i>)</li></ul><h3>Members</h3><ul><li><div class="fn" />bool <b><a href="qstyleoptionprogressbarv2.html#bottomToTop-var">bottomToTop</a></b></li><li><div class="fn" />bool <b><a href="qstyleoptionprogressbarv2.html#invertedAppearance-var">invertedAppearance</a></b></li><li><div class="fn" />Qt.Orientation <b><a href="qstyleoptionprogressbarv2.html#orientation-var">orientation</a></b></li></ul><h3>Static Members</h3><ul><li><div class="fn" />int <b><a href="qstyleoptionprogressbarv2.html#Type-var">Type</a></b></li><li><div class="fn" />int <b><a href="qstyleoptionprogressbarv2.html#Version-var">Version</a></b></li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QStyleOptionProgressBarV2 class is used to describe the parameters necessary for drawing a progress bar in Qt 4.1 or above.</p>
<p>An instance of this class has <a href="qstyleoption.html#type-varx">type</a> <a href="qstyleoption.html#OptionType-enum">SO_ProgressBar</a> and <a href="qstyleoption.html#version-varx">version</a> 2.</p>
<p>The type is used internally by <a href="qstyleoption.html">QStyleOption</a>, its subclasses, and <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>() to determine the type of style option. In general you do not need to worry about this unless you want to create your own <a href="qstyleoption.html">QStyleOption</a> subclass and your own styles. The version is used by <a href="qstyleoption.html">QStyleOption</a> subclasses to implement extensions without breaking compatibility. If you use <a href="qstyleoption.html#qstyleoption_cast">qstyleoption_cast</a>(), you normally don't need to check it.</p>
<p>If you create your own <a href="qstyle.html">QStyle</a> subclass, you should handle both <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a> and QStyleOptionProgressBarV2. One way to achieve this is to use the QStyleOptionProgressBarV2 copy constructor. For example:</p>
<pre>
    if (const QStyleOptionProgressBar *progressBarOption =
           qstyleoption_cast&lt;const QStyleOptionProgressBar *&gt;(option)) {
           QStyleOptionProgressBarV2 progressBarV2(*progressBarOption);

        // draw the progress bar using progressBarV2
    }
</pre>
<p>In the example above: If the <tt>progressBarOption</tt>'s version is 1, the extra members (<a href="qstyleoptionprogressbarv2.html#orientation-var">orientation</a>, <a href="qstyleoptionprogressbarv2.html#invertedAppearance-var">invertedAppearance</a>, and <a href="qstyleoptionprogressbarv2.html#bottomToTop-var">bottomToTop</a>) are set to default values for <tt>progressBarV2</tt>. If the <tt>progressBarOption</tt>'s version is 2, the constructor will simply copy the extra members to progressBarV2.</p>
<p>For an example demonstrating how style options can be used, see the <a href="widgets-styles.html">Styles</a> example.</p>
<p>See also <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a> and <a href="qstyleoption.html">QStyleOption</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QStyleOptionProgressBarV2" />QStyleOptionProgressBarV2.__init__ (<i>self</i>)</h3><p>Constructs a <a href="qstyleoptionprogressbarv2.html">QStyleOptionProgressBarV2</a>. The members variables are initialized to default values.</p>
<h3 class="fn"><a name="QStyleOptionProgressBarV2-2" />QStyleOptionProgressBarV2.__init__ (<i>self</i>, <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a>&#160;<i>other</i>)</h3><p>Constructs a copy of the <i>other</i> style option which can be either of the <a href="qstyleoptionprogressbar.html">QStyleOptionProgressBar</a> and <a href="qstyleoptionprogressbarv2.html">QStyleOptionProgressBarV2</a> types.</p>
<p>If the <i>other</i> style option's version is 1, the extra members (<a href="qstyleoptionprogressbarv2.html#orientation-var">orientation</a>, <a href="qstyleoptionprogressbarv2.html#invertedAppearance-var">invertedAppearance</a>, and <a href="qstyleoptionprogressbarv2.html#bottomToTop-var">bottomToTop</a>) are set to default values for the new style option. If <i>other</i>'s version is 2, the extra members are simply copied.</p>
<p>See also <a href="qstyleoption.html#version-varx">version</a>.</p>
<h3 class="fn"><a name="QStyleOptionProgressBarV2-3" />QStyleOptionProgressBarV2.__init__ (<i>self</i>, <a href="qstyleoptionprogressbarv2.html">QStyleOptionProgressBarV2</a>&#160;<i>other</i>)</h3><p>Constructs a copy of the <i>other</i> style option.</p>
<hr /><h2>Member Documentation</h2><h3 class="fn"><a name="bottomToTop-var" />bool bottomToTop</h3><p>This variable holds whether the text reads from bottom to top when the progress bar is vertical.</p>
<p>See also <a href="qprogressbar.html#textDirection-prop">QProgressBar.textDirection</a>.</p>
<h3 class="fn"><a name="invertedAppearance-var" />bool invertedAppearance</h3><p>This variable holds whether the progress bar's appearance is inverted.</p>
<p>See also <a href="qprogressbar.html#invertedAppearance-prop">QProgressBar.invertedAppearance</a>.</p>
<h3 class="fn"><a name="orientation-var" /><a href="qt.html#Orientation-enum">Qt.Orientation</a> orientation</h3><p>This variable holds the progress bar's orientation (horizontal or vertical).</p>
<p>See also <a href="qprogressbar.html#orientation-prop">QProgressBar.orientation</a>.</p>
<h3 class="fn"><a name="Type-var" />int Type</h3><p>This member should be treated as a constant.</p><h3 class="fn"><a name="Version-var" />int Version</h3><p>This member should be treated as a constant.</p><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 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.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>