VibrationController
#include <bb/device/VibrationController>
To link against this class, add the following line to your .pro file: LIBS += -lbbdevice
Allows control of vibration.
The VibrationController class allows control of device vibration.
Only one vibration request is supported at one time, device-wide. Further vibration requests supercede the previous vibration request. For example, if process A requests a vibration, then 1 second later process B requests a 5 second vibration, process A's vibration request is terminated after only 1 second, and process B's request plays for 5 seconds.
Vibration is not supported in all cases on all devices. Use isSupported() to determine whether you can use this class to control vibration.
BlackBerry 10.0.0
Properties Index
| bool | supported [read-only] |
Public Functions Index
| VibrationController (QObject *parent=0) | |
| virtual | ~VibrationController () |
| Q_INVOKABLE bool | isSupported () const |
Public Slots Index
Properties
bool
Whether you can make the device vibrate.
BlackBerry 10.0.0
Public Functions
Construct a VibrationController instance.
| Parameters | |
|---|---|
| parent |
If not 0, the supplied parent will be responsible for deleting this instance. |
BlackBerry 10.0.0
virtual
Destructor.
This has no affect on in-progress vibrations.
BlackBerry 10.0.0
Q_INVOKABLE bool
Check whether you can make the device vibrate.
Returns true if you can make the device vibrate, false otherwise.
BlackBerry 10.0.0
Public Slots
void
Make the device vibrate.
| Parameters | |
|---|---|
| intensity |
Intensity of the vibration, from 1 to 100. |
Intensity value is currently ignored. All values treated as 100.
BlackBerry 10.0.0
void
Make the device vibrate.
| Parameters | |
|---|---|
| intensity |
Intensity of the vibration, from 1 to 100. |
| milliseconds |
Duration of the vibration, in milliseconds. |
Intensity value is currently ignored. All values treated as 100.
BlackBerry 10.0.0
void
Stop any in-progress vibration.
This function lets you cancel any in-progress vibration.
BlackBerry 10.0.0