Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions |
The QProgressBar widget provides a horizontal progress bar. More...
#include <qprogressbar.h>
Inherits QFrame.
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.
The progress bar uses the concept of steps; you give it the total number of steps and the number of steps completed so far and it will display the percentage of steps that have been completed. You can specify the total number of steps in the constructor or later with setTotalSteps(). The current number of steps is set with setProgress(). The progress bar can be rewound to the beginning with reset().
See also QProgressDialog, GUI Design Handbook: Progress Indicator and Advanced Widgets.
See also QProgressDialog, GUI Design Handbook: Progress Indicator and Advanced Widgets.
The total number of steps is set to 100 by default.
The parent, name and widget flags, f, are passed on to the QFrame::QFrame() constructor.
See also totalSteps.
The totalSteps is the total number of steps that need to be completed for the operation which this progress bar represents. For example, if the operation is to examine 50 files, this value would be 50. Before examining the first file, call setProgress(0); call setProgress(50) after examining the last file .
The parent, name and widget flags, f, are passed to the QFrame::QFrame() constructor.
See also totalSteps and progress.
Returns TRUE if the indicator string should be centered; otherwise returns FALSE. See the "centerIndicator" property for details.
Returns TRUE if the display of the indicator string should follow the GUI style; otherwise returns FALSE. See the "indicatorFollowsStyle" property for details.
Returns TRUE if the current progress value is displayed; otherwise returns FALSE. See the "percentageVisible" property for details.
Returns the current amount of progress. See the "progress" property for details.
Returns the current amount of progress as a string. See the "progressString" property for details.
Examples: fileiconview/mainwindow.cpp, network/ftpclient/ftpmainwindow.cpp and progressbar/progressbar.cpp.
Sets whether the indicator string should be centered to on. See the "centerIndicator" property for details.
The progress may be negative, indicating that the progress bar is in the "reset" state before any progress is set.
The default implementation is the percentage of completion or blank in the reset state. The percentage is calculated based on the progress and totalSteps. You can set the indicator text if you wish.
To allow efficient repainting of the progress bar, this method should return FALSE if the string is unchanged from the last call to this function.
Sets whether the display of the indicator string should follow the GUI style. See the "indicatorFollowsStyle" property for details.
Sets whether the current progress value is displayed. See the "percentageVisible" property for details.
Sets the current amount of progress to progress. See the "progress" property for details.
Sets the total number of steps to totalSteps. See the "totalSteps" property for details.
Returns the total number of steps. See the "totalSteps" property for details.
This property holds whether the indicator string should be centered.
Changing this property sets QProgressBar::indicatorFollowsStyle to FALSE. The default is TRUE.
Set this property's value with setCenterIndicator() and get this property's value with centerIndicator().
This property holds whether the display of the indicator string should follow the GUI style.
The default is TRUE.
See also centerIndicator.
Set this property's value with setIndicatorFollowsStyle() and get this property's value with indicatorFollowsStyle().
This property holds whether the current progress value is displayed.
The default is TRUE.
See also centerIndicator and indicatorFollowsStyle.
Set this property's value with setPercentageVisible() and get this property's value with percentageVisible().
This property holds the current amount of progress.
This property is -1 if the progress counting has not started.
Set this property's value with setProgress() and get this property's value with progress().
This property holds the current amount of progress as a string.
This property is QString::null if the progress counting has not started.
Get this property's value with progressString().
This property holds the total number of steps.
If totalSteps is null, the progress bar will display a busy indicator.
See also
Set this property's value with setTotalSteps() and get this property's value with totalSteps().
This file is part of the Qt toolkit. Copyright © 1995-2002 Trolltech. All Rights Reserved.
Copyright © 2002 Trolltech | Trademarks | Qt version 3.0.4
|