![]() |
Home · All Namespaces · All Classes |
#include <statusindicator.h>


Public Member Functions | |
| StatusIndicator (QGraphicsItem *parent=NULL) | |
| virtual | ~StatusIndicator () |
| Destructor. | |
| virtual void | updateGeometry () |
| REIMPLEMENTATION | |
Protected Member Functions | |
| void | setValue (QVariant v) |
| | |
| QVariant | value () const |
| void | updateAnimationStatus () |
| Updates the animation status of the views. | |
| ContextItem * | createContextItem (ApplicationContext &context, const QString &key) |
Protected Attributes | |
| bool | animateIfPossible |
| Whether or not the view should animate if possible. | |
Properties | |
| QVariant | value |
StatusIndicator is a widget for displaying either image or text based status indicators in the status indicator area of the home screen.
Definition at line 39 of file statusindicator.h.
| StatusIndicator::StatusIndicator | ( | QGraphicsItem * | parent = NULL |
) | [explicit] |
Constructs a StatusIndicator.
| parent | parent MWidget |
Definition at line 50 of file statusindicator.cpp.
:
MWidgetController(new StatusIndicatorModel, parent),
animateIfPossible(false),
modelUpdatesEnabled(true),
currentValue(QVariant())
{
}
| StatusIndicator::~StatusIndicator | ( | ) | [virtual] |
Destructor.
Definition at line 58 of file statusindicator.cpp.
{
foreach(ContextItem* item, contextItems) {
delete item;
}
}
| ContextItem * StatusIndicator::createContextItem | ( | ApplicationContext & | context, | |
| const QString & | key | |||
| ) | [protected] |
Returns a context item with the specified key newly allocated from the specified application context.
| context | Context framework application context for the context item to be allocated from. | |
| key | Unique intifier of the context item in the application context that is to be monitored. |
Definition at line 117 of file statusindicator.cpp.
{
ContextItem *item = context.createContextItem(key);
contextItems.append(item);
return item;
}

| void StatusIndicator::setValue | ( | QVariant | v | ) | [protected] |
Sets the value of the indicator. This will be used by the dynamic indicators to change their appearance based on some value. The type of the value is determined by the indicator type. For indicators that display an image from a list of images, the value is a float 0 to 1 which is used to determine the used image. For indicators that display text, the value is the string to display.
Definition at line 70 of file statusindicator.cpp.
{
currentValue = v;
if (modelUpdatesEnabled) {
model()->setValue(v);
}
}
| void StatusIndicator::updateAnimationStatus | ( | ) | [protected] |
Updates the animation status of the views.
Definition at line 108 of file statusindicator.cpp.
{
if (modelUpdatesEnabled) {
model()->setAnimate(animateIfPossible);
} else {
model()->setAnimate(false);
}
}
| void StatusIndicator::updateGeometry | ( | ) | [virtual] |
REIMPLEMENTATION
Definition at line 65 of file statusindicator.cpp.
| QVariant StatusIndicator::value | ( | ) | const [protected] |
Gets the value of the indicator.
bool StatusIndicator::animateIfPossible [protected] |
Whether or not the view should animate if possible.
Definition at line 84 of file statusindicator.h.
QVariant StatusIndicator::value [read, write] |
Definition at line 44 of file statusindicator.h.
| Copyright © 2010 Nokia Corporation | Generated on Thu Nov 4 2010 18:19:35 Doxygen 1.7.1 |
MeeGo Touch |