QSensorReading Proxy Page

Macros

DECLARE_READING(classname)
IMPLEMENT_READING(classname)

Macro Documentation

QSensorReading::DECLARE_READING(classname)

The DECLARE_READING macro adds some required methods to a reading class.

This macro should be used for all reading classes. Pass the classname of your reading class.


  class MyReading : public QSensorReading
  {
      Q_OBJECT
      Q_PROPERTY(qreal myprop READ myprop)
      DECLARE_READING(MyReading)
  public:
      qreal myprop() const;
      vod setMyprop(qreal myprop);
  };

See also IMPLEMENT_READING().

QSensorReading::IMPLEMENT_READING(classname)

The IMPLEMENT_READING macro implements the required methods for a reading class.

This macro should be used for all reading classes. It should be placed into a single compilation unit (source file), not into a header file. Pass the classname of your reading class.


  IMPLEMENT_READING(MyReading)

See also DECLARE_READING().