NDEVR
API Documentation
QTVibrationManager

When supported, such as on Android/IOS, will vibrate the device. More...

Collaboration diagram for QTVibrationManager:
[legend]

Public Member Functions

 QTVibrationManager (QObject *parent=0)
 Constructs a vibration manager.
bool enabled () const
 Returns whether vibration feedback is enabled by the user.
void requestVibrate (const TimeSpan &span=default_buzz_length.get())
 Requests a haptic vibration for the specified duration.

Static Public Member Functions

static QTVibrationManagerDefaultInstance ()
 Returns the singleton instance of the vibration manager.
static bool SystemSupportsVibrate ()
 Checks whether the current platform supports haptic vibration.

Static Public Attributes

static ApplicationOption< TimeSpandefault_buzz_length
 Application-wide default duration for vibration feedback.
static ApplicationOption< bool > global_vibrate
 Application-wide setting controlling whether vibration is enabled.

Detailed Description

When supported, such as on Android/IOS, will vibrate the device.


Definition at line 11 of file QTVibrationManager.h.

Constructor & Destructor Documentation

◆ QTVibrationManager()

QTVibrationManager::QTVibrationManager ( QObject * parent = 0)
explicit

Constructs a vibration manager.

Parameters
[in]parentOptional parent QObject.

References QTVibrationManager().

Referenced by QTVibrationManager(), and DefaultInstance().

Member Function Documentation

◆ DefaultInstance()

QTVibrationManager & QTVibrationManager::DefaultInstance ( )
static

Returns the singleton instance of the vibration manager.

Returns
Reference to the default QTVibrationManager.

References QTVibrationManager().

◆ enabled()

bool QTVibrationManager::enabled ( ) const

Returns whether vibration feedback is enabled by the user.

Returns
True if vibration is enabled.

◆ requestVibrate()

void QTVibrationManager::requestVibrate ( const TimeSpan & span = default_buzz_length.get())

Requests a haptic vibration for the specified duration.

Parameters
[in]spanThe duration to vibrate.

References default_buzz_length.

◆ SystemSupportsVibrate()

bool QTVibrationManager::SystemSupportsVibrate ( )
static

Checks whether the current platform supports haptic vibration.

Returns
True if vibration is supported.

The documentation for this class was generated from the following file: