sensorfw
qt-api/rotationsensor_i.h
Go to the documentation of this file.
00001 
00027 #ifndef ROTATIONSENSOR_I_H
00028 #define ROTATIONSENSOR_I_H
00029 
00030 #include <QtDBus/QtDBus>
00031 #include <QVector>
00032 
00033 #include "abstractsensor_i.h"
00034 #include <datatypes/xyz.h>
00035 
00039 class RotationSensorChannelInterface: public AbstractSensorChannelInterface
00040 {
00041     Q_OBJECT
00042     Q_DISABLE_COPY(RotationSensorChannelInterface)
00043     Q_PROPERTY(XYZ rotation READ rotation)
00044     Q_PROPERTY(bool hasZ READ hasZ)
00045 
00046 public:
00052     static const char* staticInterfaceName;
00053 
00061     static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
00062 
00068     XYZ rotation();
00069 
00075     bool hasZ();
00076 
00083     RotationSensorChannelInterface(const QString& path, int sessionId);
00084 
00092     static const RotationSensorChannelInterface* listenInterface(const QString& id);
00093 
00101     static RotationSensorChannelInterface* controlInterface(const QString& id);
00102 
00109     static RotationSensorChannelInterface* interface(const QString& id);
00110 
00111 protected:
00112     virtual void connectNotify(const char* signal);
00113     virtual bool dataReceivedImpl();
00114 
00115 private:
00116     bool frameAvailableConnected; 
00118 Q_SIGNALS:
00124     void dataAvailable(const XYZ& data);
00125 
00133     void frameAvailable(const QVector<XYZ>& frame);
00134 };
00135 
00136 namespace local {
00137   typedef ::RotationSensorChannelInterface RotationSensor;
00138 }
00139 
00140 #endif /* ROTATIONSENSOR_I_H */