NDEVR
API Documentation
QTVibrationManager.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/TimeSpan.h>
4#include <NDEVR/ApplicationOptions.h>
5#include <QObject>
6namespace NDEVR
7{
11 class NDEVR_WIDGETS_API QTVibrationManager : public QObject
12 {
13 Q_OBJECT
14 public:
19 explicit QTVibrationManager(QObject *parent = 0);
30 bool enabled() const;
35 static bool SystemSupportsVibrate();
36 public:
39 signals:
40 public slots:
45 void requestVibrate(const TimeSpan& span = default_buzz_length.get());
46 };
47}
The default object to store data of any type that should persist through sessions of the application.
static ApplicationOption< bool > global_vibrate
Application-wide setting controlling whether vibration is enabled.
static bool SystemSupportsVibrate()
Checks whether the current platform supports haptic vibration.
QTVibrationManager(QObject *parent=0)
Constructs a vibration manager.
void requestVibrate(const TimeSpan &span=default_buzz_length.get())
Requests a haptic vibration for the specified duration.
static QTVibrationManager & DefaultInstance()
Returns the singleton instance of the vibration manager.
bool enabled() const
Returns whether vibration feedback is enabled by the user.
static ApplicationOption< TimeSpan > default_buzz_length
Application-wide default duration for vibration feedback.
Stores a time span, or difference between two times, with an optional start time.
Definition TimeSpan.h:46
The primary namespace for the NDEVR SDK.