Home · All Classes · Main Classes · Deprecated |
Progress indicators are used to visualize graphically the current status of an operation. More...
Inherits MWidgetController.
Public Slots | |
void | reset () |
void | setMaximum (int maximum) |
void | setMinimum (int minimum) |
void | setRange (int minimum, int maximum) |
void | setValue (int value) |
void | setUnknownDuration (bool unknownDuration) |
Signals | |
void | valueChanged (int value) |
Public Member Functions | |
MProgressIndicator (QGraphicsItem *parent=0, const QString &viewType=QString()) | |
virtual | ~MProgressIndicator () |
int | maximum () const |
int | minimum () const |
int | value () const |
bool | unknownDuration () const |
Static Public Attributes | |
static const MTheme::ViewType | spinnerType = "spinner" |
static const MTheme::ViewType | barType = "bar" |
Properties | |
int | minimum |
int | maximum |
int | value |
bool | unknownDuration |
Progress indicators are used to visualize graphically the current status of an operation.
Progress indicator can have known or unknown duration.
Here's how to create progress bar with fixed range. It also shows how to listen the value changed signal:
MProgressIndicator* progressbar = new MProgressIndicator(parent, MProgressIndicator::barType); progressbar->setRange(0, 9); connect(progressbar, SIGNAL(valueChanged(int)), SLOT(valueChangedSlot(int)));
This is how to create spinner with unknown duration:
MProgressIndicator* spinner = new MProgressIndicator(parent, MProgressIndicator::spinnerType); spinner->setUnknownDuration(true);
MProgressIndicator::MProgressIndicator | ( | QGraphicsItem * | parent = 0 , |
|
const QString & | viewType = QString() | |||
) | [explicit] |
Constructs a progress indicator with a parent.
parent | Parent widget | |
viewType | Optional Associated view |
MProgressIndicator::~MProgressIndicator | ( | ) | [virtual] |
Destructor.
int MProgressIndicator::maximum | ( | ) | const |
Returns the maximum value of the progress indicator.
int MProgressIndicator::minimum | ( | ) | const |
Returns the minimum value of the progress indicator.
void MProgressIndicator::reset | ( | ) | [slot] |
Rewinds the indicator and stops unknown duration indicator.
void MProgressIndicator::setMaximum | ( | int | maximum | ) | [slot] |
Set the maximum value of the indicator.
void MProgressIndicator::setMinimum | ( | int | minimum | ) | [slot] |
Set the minimum value of the indicator.
void MProgressIndicator::setRange | ( | int | minimum, | |
int | maximum | |||
) | [slot] |
Sets the progress bar's minimum and maximum values to minimum and maximum respectively. If maximum is smaller than minimum, minimum becomes the only legal value. If the current value falls outside the new range, the progress bar is reset with reset().
void MProgressIndicator::setUnknownDuration | ( | bool | unknownDuration | ) | [slot] |
Sets whether the indicator is working in known duration / unknown duration mode.
run | True, to set the progress indicator to unknown duration mode |
void MProgressIndicator::setValue | ( | int | value | ) | [slot] |
Set the value of the indicator. Attempting to change the current value to one outside the minimum-maximum range has no effect on the current value.
value | indicator value |
bool MProgressIndicator::unknownDuration | ( | ) | const |
Status of indicating progress with unknown duration.
int MProgressIndicator::value | ( | ) | const |
Returns the value of the progress indicator.
void MProgressIndicator::valueChanged | ( | int | value | ) | [signal] |
Signal is emitted when the value of the indicator changes.
MProgressIndicator::barType = "bar" [static] |
View type for progress bar.
MProgressIndicator::spinnerType = "spinner" [static] |
View type for spinner.
MProgressIndicator::maximum [read, write] |
This property holds the progress indicator's maximum value.
When setting this property, the minimum is adjusted if necessary to ensure that the range remains valid. If the current value falls outside the new range, the progress bar is reset with reset().
MProgressIndicator::minimum [read, write] |
This property holds the progress indicator's minimum value.
When setting this property, the maximum is adjusted if necessary to ensure that the range remains valid. If the current value falls outside the new range, the progress bar is reset with reset().
MProgressIndicator::unknownDuration [read, write] |
This property holds whether the progress indicator is type of known duration / unknown duration.
MProgressIndicator::value [read, write] |
This property holds the progress indicator's current value.
Attempting to change the current value to one outside the minimum-maximum range has no effect on the current value.
Copyright © 2010 Nokia Corporation | MeeGo Touch |