Public Types | |
enum | Error { NoError = 0, OutOfMemoryError, ArgumentError, VibraInUseError, HardwareError, TimeOutError, VibraLockedError, AccessDeniedError, UnknownError = -1, NotCreated } |
enum | Status { StatusNotAllowed = 0, StatusOff, StatusOn } |
enum | EngineRotation { Positive, Negative } |
Public Slots | |
bool | start (int duration=InfiniteDuration, int intensity=MaxIntensity) |
Start vibration. | |
bool | stop () |
void | reserve () |
void | release () |
Signals | |
void | statusChanged (QVibra::Status status) |
Public Member Functions | |
QVibra (QObject *parent=0) | |
Q_INVOKABLE QVibra::Status | currentStatus () const |
Q_INVOKABLE QVibra::Error | error () const |
Q_INVOKABLE QString | errorString () const |
QVibra::EngineRotation | rotation () |
void | setRotation (EngineRotation) |
Static Public Attributes | |
static const int | InfiniteDuration = 0 |
static const int | MaxIntensity = 100 |
static const int | DefaultIntensity = 100 |
static const int | MinIntensity = 0 |
Properties | |
EngineRotation | rotation |
Friends | |
class | QVibraPrivate |
bool QVibra::start | ( | int | duration = InfiniteDuration , |
|
int | intensity = MaxIntensity | |||
) | [slot] |
Start vibration.
duration,Duration | of the vibration measured in milliseconds. A value of InfiniteDuration specifies that the vibration should continue indefinetely and should be stopped with a call to stop. Duration usually has device specific maximum value | |
intensity,Intensity | of the vibra in decimal is MinIntensity to MaxIntensity, which shows the percentage of the vibra motor full rotation speed. When intensity is negative, the vibra motor rotates in the negative direction. When intensity is positive, the vibra motor rotates in the positive direction. Value 0 stops the vibra. NOTE: The device might have hardware-imposed limits on supported vibra intensity values, so actual effect might vary between different hardware. |