BPSMonitor.hpp Example File
bpstoqml/src/BPSMonitor.hpp
#ifndef BLACKBERRYPLATFORMSERVICESMONITOR_H_
#define BLACKBERRYPLATFORMSERVICESMONITOR_H_
#include <QtCore/QObject>
#include <QtDeclarative/qdeclarative.h>
struct bps_event_t;
namespace bb {
namespace cascades {
namespace bps {
class VirtualKeyboardService;
class GeolocationService;
class AccelerometerService;
class MagnetometerService;
class ProximityService;
class AzimuthPitchRollService;
class LightService;
class BPSEventHandler;
class BPSMonitor: public QObject {
Q_OBJECT
Q_PROPERTY(bb::cascades::bps::VirtualKeyboardService* virtualKeyboardService READ virtualKeyboardService WRITE setVirtualKeyboardService)
Q_PROPERTY(bb::cascades::bps::GeolocationService* geolocationService READ geolocationService WRITE setGeolocationService)
Q_PROPERTY(bb::cascades::bps::AccelerometerService* accelerometerService READ accelerometerService WRITE setAccelerometerService)
Q_PROPERTY(bb::cascades::bps::MagnetometerService* magnetometerService READ magnetometerService WRITE setMagnetometerService)
Q_PROPERTY(bb::cascades::bps::ProximityService* proximityService READ proximityService WRITE setProximityService)
Q_PROPERTY(bb::cascades::bps::AzimuthPitchRollService* azimuthPitchRollService READ azimuthPitchRollService WRITE setAzimuthPitchRollService)
Q_PROPERTY(bb::cascades::bps::LightService* lightService READ lightService WRITE setLightService)
public:
explicit BPSMonitor(QObject *parent = 0);
~BPSMonitor();
VirtualKeyboardService *virtualKeyboardService();
void setVirtualKeyboardService(VirtualKeyboardService *service);
GeolocationService *geolocationService();
void setGeolocationService(GeolocationService *service);
AccelerometerService *accelerometerService();
void setAccelerometerService(AccelerometerService *service);
MagnetometerService *magnetometerService();
void setMagnetometerService(MagnetometerService *service);
ProximityService *proximityService();
void setProximityService(ProximityService *service);
AzimuthPitchRollService *azimuthPitchRollService();
void setAzimuthPitchRollService(AzimuthPitchRollService *service);
LightService *lightService();
void setLightService(LightService *service);
private:
BPSEventHandler *m_bpsEventHandler;
VirtualKeyboardService *m_virtualKeyboardService;
GeolocationService *m_geolocationService;
AccelerometerService *m_accelerometerService;
MagnetometerService *m_magnetometerService;
ProximityService *m_proximityService;
AzimuthPitchRollService *m_azimuthPitchRollService;
LightService *m_lightService;
};
}
}
}
QML_DECLARE_TYPE(bb::cascades::bps::BPSMonitor)
#endif /* BLACKBERRYPLATFORMSERVICESMONITOR_H_ */