• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

qt-api/tapsensor_i.h

Go to the documentation of this file.
00001 
00028 #ifndef TAPSENSOR_I_H
00029 #define TAPSENSOR_I_H
00030 
00031 #include <QtDBus/QtDBus>
00032 
00033 #include "abstractsensor_i.h"
00034 #include "datatypes/tap.h"
00035 #include "datatypes/tapdata.h"
00036 #include <QList>
00037 #include <QTimer>
00038 
00039 
00043 class TapSensorChannelInterface : public AbstractSensorChannelInterface
00044 {
00045     Q_OBJECT
00046     Q_DISABLE_COPY(TapSensorChannelInterface)
00047 
00048 public:
00052     static const char* staticInterfaceName;
00053 
00061     static AbstractSensorChannelInterface* factoryMethod(const QString& id, int sessionId);
00062 
00069     TapSensorChannelInterface(const QString &path, int sessionId);
00070 
00078     static const TapSensorChannelInterface* listenInterface(const QString& id);
00079 
00087     static TapSensorChannelInterface* controlInterface(const QString& id);
00088 
00095     static TapSensorChannelInterface* interface(const QString& id);
00096 
00100     enum TapSelection
00101     {
00102         Single = 1,  
00103         Double,      
00104         SingleDouble 
00105     };
00106 
00112     void setTapType(TapSelection type);
00113 
00119     TapSelection getTapType();
00120 
00121 protected:
00122     virtual bool dataReceivedImpl();
00123 
00124 private Q_SLOTS:
00125     void output();
00126 
00127 Q_SIGNALS:
00133     void dataAvailable(const Tap& data);
00134 
00135 private:
00136 
00137     QList<TapData> tapValues_; 
00138     TapSelection type_; 
00139     QTimer *timer_; 
00140     static const int doubleClickInteval = 500; 
00141 };
00142 
00143 namespace local {
00144   typedef ::TapSensorChannelInterface TapSensor;
00145 }
00146 
00147 #endif

Generated on Mon Jun 27 2011 14:38:47 for sensorfw by  doxygen 1.7.1