Home · All Classes · Main Classes · Deprecated
Public Slots | Signals | Public Member Functions | Static Public Attributes | Properties

MProgressIndicator Class Reference

Progress indicators are used to visualize graphically the current status of an operation. More...

Inherits MWidgetController.

List of all members.

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

Detailed Description

Progress indicators are used to visualize graphically the current status of an operation.

Overview

Progress indicator can have known or unknown duration.

Usage guidelines

Variants

Examples

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);

Open issues

See also:
MProgressIndicatorModel MProgressIndicatorStyle

Constructor & Destructor Documentation

MProgressIndicator::MProgressIndicator ( QGraphicsItem parent = 0,
const QString viewType = QString() 
) [explicit]

Constructs a progress indicator with a parent.

Parameters:
parent Parent widget
viewType Optional Associated view
MProgressIndicator::~MProgressIndicator (  )  [virtual]

Destructor.


Member Function Documentation

int MProgressIndicator::maximum (  )  const

Returns the maximum value of the progress indicator.

Returns:
Maximum value of the progress indicator
int MProgressIndicator::minimum (  )  const

Returns the minimum value of the progress indicator.

Returns:
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.

Parameters:
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.

Parameters:
value indicator value
bool MProgressIndicator::unknownDuration (  )  const

Status of indicating progress with unknown duration.

Returns:
True, if indicator is running in unknown duration mode
int MProgressIndicator::value (  )  const

Returns the value of the progress indicator.

Returns:
Value of the progress indicator
void MProgressIndicator::valueChanged ( int  value  )  [signal]

Signal is emitted when the value of the indicator changes.


Member Data Documentation

MProgressIndicator::barType = "bar" [static]

View type for progress bar.

MProgressIndicator::spinnerType = "spinner" [static]

View type for spinner.


Property Documentation

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