<HTML> <HEAD> <TITLE>class KProgress</TITLE> <META NAME="Generator" CONTENT="KDOC "> </HEAD> <BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff"> <TABLE WIDTH="100%" BORDER="0"> <TR> <TD> <TABLE BORDER="0"> <TR><TD valign="top" align="left" cellspacing="10"> <h1>class KProgress</h1> </TD> <TD valign="top" align="right" colspan="1">A progress indicator widget. <small><A HREF="#longdesc">More...</A></small></TD></TR> </TABLE> <HR> <TABLE BORDER="0"> <TR><TH>Definition</TH><TD><code>#include <<A HREF="kprogress_h.html">kprogress.h</A>></code></TD></TR> <TR><TH>Inherits</TH><TD><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qframe.html">QFrame</A> <small>(qt)</small> <small>[public ]</small>, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qrangecontrol.html">QRangeControl</A> <small>(qt)</small> <small>[public ]</small></TD></TR> <TR><TH><A HREF="full-list-KProgress.html">List of all Methods</A></TH></TR> </TABLE> </TD> <TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR> <TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR> <TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR> <TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR> <TR><TD><small><A HREF="index.html">Index</A></small></TD></TR> </TABLE></TD></TR></TABLE> <h4>Public Types</h4><ul><LI>enum <A HREF="#ref6">BarStyle</A> { Solid, Blocked } </LI> </ul><h4>Public Methods</h4><ul><LI> <b><A HREF="#ref7">KProgress</A></b> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) </LI> <LI> <b><A HREF="#ref8">KProgress</A></b> (Orientation orient, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) </LI> <LI> <b><A HREF="#ref9">KProgress</A></b> (int minValue, int maxValue, int value, Orientation, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) </LI> <LI> <b><A HREF="#ref10">~KProgress</A></b> () </LI> <LI>void <b><A HREF="#ref11">setBarStyle</A></b> (BarStyle style) </LI> <LI>void <b><A HREF="#ref12">setBarColor</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &) </LI> <LI>void <b><A HREF="#ref13">setBarPixmap</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A> &) </LI> <LI>void <b><A HREF="#ref14">setOrientation</A></b> (Orientation) </LI> <LI>void <b><A HREF="#ref15">setTextEnabled</A></b> (bool) </LI> <LI>BarStyle <b><A HREF="#ref16">barStyle</A></b> () const </LI> <LI>const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> & <b><A HREF="#ref17">barColor</A></b> () const </LI> <LI>const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A> * <b><A HREF="#ref18">barPixmap</A></b> () const </LI> <LI>Orientation <b><A HREF="#ref19">orientation</A></b> () const </LI> <LI>bool <b><A HREF="#ref20">textEnabled</A></b> () const </LI> <LI>void <b><A HREF="#ref23">setFormat</A></b> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> & format) </LI> <LI><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <b><A HREF="#ref24">format</A></b> () const </LI> </ul><h4>Public Slots</h4><ul><LI>void <b><A HREF="#ref25">setValue</A></b> (int value) </LI> <LI>void <b><A HREF="#ref26">advance</A></b> (int prog) </LI> </ul><h4>Signals</h4><ul><LI>void <b><A HREF="#ref27">percentageChanged</A></b> (int) </LI> </ul><HR><H2><A NAME="longdesc">Detailed Description</A></H2><p> A stylized progress bar. </p> <p> KProgress is derived from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qframe.html">QFrame</A> and <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qrangecontrol.html">QRangeControl</A>, so you can use all the methods from those classes. The only difference is that <A HREF="KProgress.html#setValue">setValue</A>() is now made a slot, so you can connect stuff to it. </p> <p></p> <H3>Details </H3> <p> </p> <p> None of the constructors take line step and page step as arguments, so by default they're set to 1 and 10 respectively. </p> <p> The Blocked style ignores the <A HREF="KProgress.html#textEnabled">textEnabled</A>() setting and displays no text, since it looks truly ugly (and for other reasons). Signal <A HREF="KProgress.html#percentageChanged">percentageChanged</A>() is emitted whenever the value changes so you can set up a different widget to display the current percentage complete and connect the signal to it. </p> <p></p> <A NAME="BarStyle"></A><A NAME="ref6"></A><table width="100%"><tr bgcolor="#eeeeee"><td>enum <strong>BarStyle</strong> { Solid, Blocked } </td><td align="right"><h3><strong>BarStyle</strong></h3></td></tr></table><p></p><p> Possible values for bar style. </p> <p> <code>Solid</code> means one continuous progress bar, <code>Blocked</code> means a progress bar made up of several blocks. </p> <A NAME="KProgress"></A><A NAME="ref7"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>KProgress</strong> (<A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) <br></td><td align="right"><h3><strong>KProgress</strong></h3></td></tr></table><p></p><p> Construct a horizontal progress bar. </p> <A NAME="KProgress"></A><A NAME="ref8"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>KProgress</strong> (Orientation orient, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) <br></td><td align="right"><h3><strong>KProgress</strong></h3></td></tr></table><p></p><p> Construct a progress bar with orientation <code>orient</code>. </p> <A NAME="KProgress"></A><A NAME="ref9"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>KProgress</strong> (int minValue, int maxValue, int value, Orientation, <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qwidget.html">QWidget</A> *parent=0, const char *name=0) <br></td><td align="right"><h3><strong>KProgress</strong></h3></td></tr></table><p></p><p> Construct a progress bar with minimum, maximum and initial values. </p> <A NAME="~KProgress"></A><A NAME="ref10"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <strong>~KProgress</strong> () <br></td><td align="right"><h3><strong>~KProgress</strong></h3></td></tr></table><p></p><p> Destruct the progress bar. </p> <A NAME="setBarStyle"></A><A NAME="ref11"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setBarStyle</strong> (BarStyle style) <br></td><td align="right"><h3><strong>setBarStyle</strong></h3></td></tr></table><p></p><p> Set the progress bar style. </p> <p> Allowed values are <code>Solid</code> and <code>Blocked</code>. </p> <A NAME="setBarColor"></A><A NAME="ref12"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setBarColor</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> &) <br></td><td align="right"><h3><strong>setBarColor</strong></h3></td></tr></table><p></p><p> Set the color of the progress bar. </p> <A NAME="setBarPixmap"></A><A NAME="ref13"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setBarPixmap</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A> &) <br></td><td align="right"><h3><strong>setBarPixmap</strong></h3></td></tr></table><p></p><p> Set a pixmap to be shown in the progress bar. </p> <A NAME="setOrientation"></A><A NAME="ref14"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setOrientation</strong> (Orientation) <br></td><td align="right"><h3><strong>setOrientation</strong></h3></td></tr></table><p></p><p> Set the orientation of the progress bar. </p> <p> Allowed values are <code>Horizontal</code> and <code>Vertical</code>. </p> <A NAME="setTextEnabled"></A><A NAME="ref15"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setTextEnabled</strong> (bool) <br></td><td align="right"><h3><strong>setTextEnabled</strong></h3></td></tr></table><p></p><p> If this is set to <code>true</code>, the progress text will be displayed. </p> <p> </p> <A NAME="barStyle"></A><A NAME="ref16"></A><table width="100%"><tr bgcolor="#eeeeee"><td>BarStyle <strong>barStyle</strong> () <br></td><td align="right"><h3><strong>barStyle</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Retrieve the bar style. </p> <p></p> <p><b>See also</b>: setBarStyle()</p> <A NAME="barColor"></A><A NAME="ref17"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qcolor.html">QColor</A> & <strong>barColor</strong> () <br></td><td align="right"><h3><strong>barColor</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Retrieve the bar color. </p> <p><b>See also</b>: setBarColor()</p> <A NAME="barPixmap"></A><A NAME="ref18"></A><table width="100%"><tr bgcolor="#eeeeee"><td>const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpixmap.html">QPixmap</A> * <strong>barPixmap</strong> () <br></td><td align="right"><h3><strong>barPixmap</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Retrieve the bar pixmap. </p> <p></p> <p><b>See also</b>: setBarPixmap()</p> <A NAME="orientation"></A><A NAME="ref19"></A><table width="100%"><tr bgcolor="#eeeeee"><td>Orientation <strong>orientation</strong> () <br></td><td align="right"><h3><strong>orientation</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Retrive the orientation of the progress bar. </p> <p></p> <p><b>See also</b>: setOrientation()</p> <A NAME="textEnabled"></A><A NAME="ref20"></A><table width="100%"><tr bgcolor="#eeeeee"><td>bool <strong>textEnabled</strong> () <br></td><td align="right"><h3><strong>textEnabled</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Returns <code>true</code> if progress text will be displayed, <code>false</code> otherwise. </p> <p></p> <p><b>See also</b>: setFormat()</p> <A NAME="sizeHint"></A><A NAME="ref21"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qsize.html">QSize</A> <strong>sizeHint</strong> () <br></td><td align="right"><h3><strong>sizeHint</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qframe.html#423116">QFrame</A> for internal purposes..</p> <A NAME="sizePolicy"></A><A NAME="ref22"></A><table width="100%"><tr bgcolor="#eeeeee"><td> <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qsizepolicy.html">QSizePolicy</A> <strong>sizePolicy</strong> () <br></td><td align="right"><h3><strong>sizePolicy</strong></h3></td></tr></table><p> <small>[const virtual]</small></p><p> </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qframe.html#43e488">QFrame</A> for internal purposes..</p> <A NAME="setFormat"></A><A NAME="ref23"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setFormat</strong> (const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> & format) <br></td><td align="right"><h3><strong>setFormat</strong></h3></td></tr></table><p></p><p> Set the format of the text to use to display status. </p> <p> The default format is "%p%" (which looks like "42%".) </p> <p></p> <p><b>Parameters</b>:<TABLE BORDER="0" CELLPADDING="5"> <TR><TD align="left" valign="top"><i>format</i></TD><TD align="left" valign="top">%p is replaced by percentage done, %v is replaced by actual value, %m is replaced by the maximum value. </TD></TR> </TABLE></P> <A NAME="format"></A><A NAME="ref24"></A><table width="100%"><tr bgcolor="#eeeeee"><td><A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstring.html">QString</A> <strong>format</strong> () <br></td><td align="right"><h3><strong>format</strong></h3></td></tr></table><p> <small>[const]</small></p><p> Retrieve the current format for printing status text. </p> <p><b>See also</b>: setFormat()</p> <A NAME="setValue"></A><A NAME="ref25"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>setValue</strong> (int value) <br></td><td align="right"><h3><strong>setValue</strong></h3></td></tr></table><p> <small>[slot]</small></p><p> Set the current value of the progress bar to <code>value</code>. </p> <p> This must be a number in the range 0..100. </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qrangecontrol.html#29bfef">QRangeControl</A>.</p> <A NAME="advance"></A><A NAME="ref26"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>advance</strong> (int prog) <br></td><td align="right"><h3><strong>advance</strong></h3></td></tr></table><p> <small>[slot]</small></p><p> Advance the progress bar by <code>prog</code>. </p> <p> This method is provided for convenience and is equivalent with <A HREF="KProgress.html#setValue">setValue</A>(value()+prog). </p> <A NAME="percentageChanged"></A><A NAME="ref27"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>percentageChanged</strong> (int) <br></td><td align="right"><h3><strong>percentageChanged</strong></h3></td></tr></table><p> <small>[signal]</small></p><p> Emitted when the state of the progress bar changes. </p> <A NAME="valueChange"></A><A NAME="ref28"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>valueChange</strong> () <br></td><td align="right"><h3><strong>valueChange</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qrangecontrol.html#11487e">QRangeControl</A> for internal purposes..</p> <A NAME="rangeChange"></A><A NAME="ref29"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>rangeChange</strong> () <br></td><td align="right"><h3><strong>rangeChange</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qrangecontrol.html#759b5a">QRangeControl</A> for internal purposes..</p> <A NAME="styleChange"></A><A NAME="ref30"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>styleChange</strong> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qstyle.html">QStyle</A>& ) <br></td><td align="right"><h3><strong>styleChange</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> </p> <A NAME="paletteChange"></A><A NAME="ref31"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>paletteChange</strong> ( const <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpalette.html">QPalette</A> & ) <br></td><td align="right"><h3><strong>paletteChange</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> </p> <A NAME="drawContents"></A><A NAME="ref32"></A><table width="100%"><tr bgcolor="#eeeeee"><td>void <strong>drawContents</strong> ( <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qpainter.html">QPainter</A> * ) <br></td><td align="right"><h3><strong>drawContents</strong></h3></td></tr></table><p> <small>[protected]</small></p><p> </p> <p>Reimplemented from <A HREF="../../../../../../../../../usr/share/doc/qt-2.3.1/html/qframe.html#99e687">QFrame</A> for internal purposes..</p> <HR><UL><LI><i>Version</i>: $Id: kprogress.h,v 1.19 2001/04/09 23:54:12 waba Exp $ </LI><LI><i>Author</i>: Martynas Kunigelis </LI><LI><i>Generated</i>: qateam on updates.mandrakesoft.com on Mon Dec 30 16:09:05 2002, using kdoc 2.0a53.</LI></UL></BODY></HTML>