2
* Copyright 2013 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Christian Dywan <christian.dywan@canonical.com>
19
#ifndef QFEEDBACK_MIR_H
20
#define QFEEDBACK_MIR_H
22
#include <QtCore/QList>
23
#include <QtCore/QVector>
24
#include <QtCore/QHash>
25
#include <QtCore/QObject>
26
#include <QtCore/QMutex>
27
#include <QtCore/QTimer>
29
#include <qfeedbackplugininterfaces.h>
34
class QFeedbackMir : public QObject, public QFeedbackHapticsInterface, public QFeedbackFileInterface, public QFeedbackThemeInterface
37
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtFeedbackPlugin" FILE "feedback.json")
39
Q_INTERFACES(QFeedbackHapticsInterface)
40
Q_INTERFACES(QFeedbackFileInterface)
41
Q_INTERFACES(QFeedbackThemeInterface)
45
virtual ~QFeedbackMir();
47
virtual PluginPriority pluginPriority();
48
virtual QList<QFeedbackActuator*> actuators();
50
//for actuator handling
51
virtual void setActuatorProperty(const QFeedbackActuator &, ActuatorProperty, const QVariant &);
52
virtual QVariant actuatorProperty(const QFeedbackActuator &, ActuatorProperty);
53
virtual bool isActuatorCapabilitySupported(const QFeedbackActuator &, QFeedbackActuator::Capability);
55
virtual void updateEffectProperty(const QFeedbackHapticsEffect *, EffectProperty);
56
virtual void setEffectState(const QFeedbackHapticsEffect *, QFeedbackEffect::State);
57
virtual QFeedbackEffect::State effectState(const QFeedbackHapticsEffect *);
60
virtual void setLoaded(QFeedbackFileEffect*, bool);
61
virtual void setEffectState(QFeedbackFileEffect *, QFeedbackEffect::State);
62
virtual QFeedbackEffect::State effectState(const QFeedbackFileEffect *);
63
virtual int effectDuration(const QFeedbackFileEffect *);
64
virtual QStringList supportedMimeTypes();
67
virtual bool play(QFeedbackEffect::Effect);
69
QList<QFeedbackActuator*> actuatorList;
71
void vibrateOnce(const QFeedbackEffect* effect);
76
#endif // QFEEDBACK_MIR_H