Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions |
The QCommDeviceController class provides facilities to control the power state of a hardware communications device More...
#include <QCommDeviceController>
Inherits QObject.
The QCommDeviceController class provides facilities to control the power state of a hardware communications device
Using the QCommDeviceController class it is possible to control the power state of a Bluetooth or Infrared hardware device. This class is generally useful only to settings applications which need to control the device state directly. For typical useage, please see the QCommDeviceSession class.
The device can be in four power states: on, off, on for one item, and on for a period of time.
See also QCommDeviceSession.
The current state of the device.
Constant | Value | Description |
---|---|---|
QCommDeviceController::On | 0 | The device is on permanently. |
QCommDeviceController::Off | 1 | The device is off. |
QCommDeviceController::OnOneItem | 2 | The device is on until the last device session is closed. |
QCommDeviceController::OnTimed | 3 | The device is on for a specified period of time, at which time it is either turned off if there are no sessions open, or enters the OnOneItem state. |
Constructs a new QCommDeviceController object. The devId specifies the device id. This is usually equivalent to the hardware device id of the device. E.g. irdaX for Infrared devices and hciX for Bluetooth devices.
The parent parameter is passed to the QObject constructor.
See also deviceId().
Destructor.
Brings down the device. The device will attempt to enter the Off mode.
See also bringUp().
Brings up the device. The device will attempt to enter the On mode.
See also bringDown(), bringUpTimed(), and bringUpOneItem().
Brings up the device for one item. The device will attempt to enter the OnOneItem mode.
See also bringUp() and bringUpTimed().
Brings up the device in timed mode. The device will attempt to enter the OnTimed mode. The device will remain in this mode for secs seconds.
See also bringUp() and bringUpOneItem().
Returns the id of the device.
This signal is emitted when the device is turned off.
See also bringDown().
Returns true if the device is currently turned on. E.g. it is in On, OnTimed or OnOneItem mode.
See also bringUp(), bringDown(), and powerState().
Returns the current power state of the device.
See also isUp().
This signal is emitted when a device's power state has been changed. The state parameter holds the new power state.
See also powerState().
Returns true if there are applications using this device.
This signal is emitted when the device is turned on.
See also bringUp().
Copyright © 2009 Trolltech | Trademarks | Qt Extended 4.4.3 |