Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QDeviceIndicators class allows applications to control indicator lights. More...
#include <QDeviceIndicators>
Inherits QObject.
The QDeviceIndicators class allows applications to control indicator lights.
The QDeviceIndicators class can be used by applications to control visual lights on a device. For example, many devices have an "Email" light that is illuminated whenever there are new messages. Each light has a name, and is manipulated through it's state such as On or Flash and attributes such as Color. The names of each indicator, and their supported states and attributes are device specific. Typically the implementer of QDeviceIndicatorsProvider would document these and provide them to the user of QDeviceIndicators.
QDeviceIndicators acts as a thin convenience wrapper around entries in the Qt Extended Value Space. The current status on indicators is located under the /Hardware/IndicatorLights path. For example, the "Email" indicator state could be read and set directly through the /Hardware/IndicatorLights/Email item.
Note: Because QDeviceIndicators uses Value Space, it is not thread safe and may only be used from an application's main thread.
See also QDeviceIndicatorsProvider.
Represents the state of a device indicator.
Constant | Value | Description |
---|---|---|
QDeviceIndicators::Off | 0 | The indicator light is not illuminated. |
QDeviceIndicators::On | 1 | The indicator light is illuminated. |
QDeviceIndicators::Flash | 2 | The indicator is flashing on and off. |
QDeviceIndicators::Throb | 3 | The indicator is smoothly cycling from zero intensity to full intensity and back again |
Create a new QDeviceIndicators instance with the provided parent.
Destroys the instance.
Returns the value of the attribute of the given indcator's name. An invalid QVariant is returned if the indicator name does not exist or attribute is not supported.
See also setIndicatorAttribute().
Returns the current indicator state for name.
See also setIndicatorState() and isIndicatorStateSupported().
Emitted whenever the indicator name changes state. newState will be set to the new indicator state.
See also indicatorState() and setIndicatorState().
Returns true if the indicator name supports a given state. Returns false if the state is not supported or the indicator name is not recognised.
See also indicatorState() and setIndicatorState().
Returns true if the indicator name is supported by the device.
See also supportedIndicators().
Attempts to set the attribute of indicator name to value. Setting an attribute is an asynchronous event. Honoring or ignoring the request is up to the implementation of QDeviceIndicatorsProvider, typically valid requests would always be honored.
See also indicatorAttribute().
Attempts to change the indicator name to the provided state. Setting an indicator is an asynchronous event. If necessary, callers should monitor the indicatorStateChanged() signal to determine when the state change occurs.
See also indicatorState() and isIndicatorStateSupported().
Returns the list of all indicators supported by the device.
See also isIndicatorSupported().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |