CameraMetaData.h 2.11 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
/****************************************************************************
 *
 *   (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
 *
 * QGroundControl is licensed according to the terms in the file
 * COPYING.md in the root of the source code directory.
 *
 ****************************************************************************/

#ifndef CameraMetaData_H
#define CameraMetaData_H

#include <QObject>

/// Set of meta data which describes a camera available on the vehicle
class CameraMetaData : public QObject
{
    Q_OBJECT

public:
    CameraMetaData(const QString&   name,
                   double           sensorWidth,
                   double           sensorHeight,
                   double           imageWidth,
                   double           imageHeight,
                   double           focalLength,
27 28
                   bool             landscape,
                   bool             fixedOrientation,
29 30
                   QObject*         parent = NULL);

31 32 33 34 35 36 37 38
    Q_PROPERTY(QString  name                MEMBER _name                CONSTANT)   ///< Camera name
    Q_PROPERTY(double   sensorWidth         MEMBER _sensorWidth         CONSTANT)   ///< Sensor size in millimeters
    Q_PROPERTY(double   sensorHeight        MEMBER _sensorHeight        CONSTANT)   ///< Sensor size in millimeters
    Q_PROPERTY(double   imageWidth          MEMBER _imageWidth          CONSTANT)   ///< Image size in pixels
    Q_PROPERTY(double   imageHeight         MEMBER _imageHeight         CONSTANT)   ///< Image size in pixels
    Q_PROPERTY(double   focalLength         MEMBER _focalLength         CONSTANT)   ///< Focal length in millimeters
    Q_PROPERTY(bool     landscape           MEMBER _landscape           CONSTANT)   ///< true: camera is in landscape orientation
    Q_PROPERTY(bool     fixedOrientation    MEMBER _fixedOrientation    CONSTANT)   ///< true: camera is in fixed orientation
39 40 41 42 43 44 45 46

private:
    QString _name;
    double  _sensorWidth;
    double  _sensorHeight;
    double  _imageWidth;
    double  _imageHeight;
    double  _focalLength;
47 48
    bool    _landscape;
    bool    _fixedOrientation;
49 50 51
};

#endif