8 changed files with 191 additions and 86 deletions
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
/****************************************************************************
|
||||
* |
||||
* (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. |
||||
* |
||||
****************************************************************************/ |
||||
|
||||
#include "CameraMetaData.h" |
||||
|
||||
CameraMetaData::CameraMetaData(const QString& name, |
||||
double sensorWidth, |
||||
double sensorHeight, |
||||
double imageWidth, |
||||
double imageHeight, |
||||
double focalLength, |
||||
QObject* parent) |
||||
: QObject(parent) |
||||
, _name(name) |
||||
, _sensorWidth(sensorWidth) |
||||
, _sensorHeight(sensorHeight) |
||||
, _imageWidth(imageWidth) |
||||
, _imageHeight(imageHeight) |
||||
, _focalLength(focalLength) |
||||
{ |
||||
|
||||
} |
@ -0,0 +1,45 @@
@@ -0,0 +1,45 @@
|
||||
/****************************************************************************
|
||||
* |
||||
* (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, |
||||
QObject* parent = NULL); |
||||
|
||||
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
|
||||
|
||||
private: |
||||
QString _name; |
||||
double _sensorWidth; |
||||
double _sensorHeight; |
||||
double _imageWidth; |
||||
double _imageHeight; |
||||
double _focalLength; |
||||
}; |
||||
|
||||
#endif |
Loading…
Reference in new issue