sensors.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef SENSORS_H_
  2. #define SENSORS_H_
  3. #include <QWidget>
  4. #include <QString>
  5. #include <QMap>
  6. class QMainWindow;
  7. class QWebFrame;
  8. class SymbianSDKSensors;
  9. class Sensors : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. Sensors();
  14. virtual ~Sensors();
  15. public slots:
  16. void setEnvironment(QMainWindow *parentWindow, QWebFrame *webFrame);
  17. void findSensorChannel(const QString &criteria);
  18. int registerForNotification(const QString &listeningType, int ChannelId, int ContectType, int Quantity, int ChannelType, const QString &Location, const QString &VendorId, int DataItemSize, int ChannelDataTypeId);
  19. void cancel(int criteria);
  20. void getChannelProperty(const QString &listeningType, int ChannelId, int ContextType, int Quantity, int ChannelType, const QString &Location, const QString &VendorId, int DataItemSize, int ChannelDataTypeId, const QString &PropertyId);
  21. private slots:
  22. public:
  23. void addChannelInfo(int ChannelId, int ContextType, int Quantity, int ChannelType, const QString &location, const QString &VendorId, int DataItemSize, int ChannelDataTypeId);
  24. void accelerometerEvent(int transactionId, int axisX, int axisY, int axisZ, long timeStamp);
  25. void orientationEvent(int transactionId, int deviceOrientation, long timeStamp);
  26. void tappingEvent(int transactionId, int direction, long timeStamp);
  27. private:
  28. QMainWindow *m_parentWindow;
  29. QWebFrame *m_webFrame;
  30. SymbianSDKSensors *m_symbianSDKSensors;
  31. };
  32. #endif /* SENSORS_H_ */