GlobalViewParams.h 1.59 KB
Newer Older
1 2 3 4 5
#ifndef GLOBALVIEWPARAMS_H
#define GLOBALVIEWPARAMS_H

#include <QObject>
#include <QString>
6
#include <QVector3D>
7 8 9 10 11 12 13 14 15 16 17

#include "QGCMAVLink.h"
#include "Imagery.h"

class GlobalViewParams : public QObject
{
    Q_OBJECT

public:
    GlobalViewParams();

18 19 20
    bool& displayTerrain(void);
    bool displayTerrain(void) const;

21 22 23
    bool& displayWorldGrid(void);
    bool displayWorldGrid(void) const;

24 25 26 27 28 29
    QVector3D& imageryOffset(void);
    QVector3D imageryOffset(void) const;

    QString& imageryPath(void);
    QString imageryPath(void) const;

30 31 32 33 34 35 36 37 38
    Imagery::Type& imageryType(void);
    Imagery::Type imageryType(void) const;

    int& followCameraId(void);
    int followCameraId(void) const;

    MAV_FRAME& frame(void);
    MAV_FRAME frame(void) const;

39 40
    void signalImageryParamsChanged(void);

41 42 43 44 45
    QVector3D& terrainPositionOffset(void);
    QVector3D terrainPositionOffset(void) const;

    QVector3D& terrainAttitudeOffset(void);
    QVector3D terrainAttitudeOffset(void) const;
46

47 48 49
public slots:
    void followCameraChanged(const QString& text);
    void frameChanged(const QString &text);
50
    void toggleTerrain(int state);
51 52 53 54
    void toggleWorldGrid(int state);

signals:
    void followCameraChanged(int systemId);
55
    void imageryParamsChanged(void);
56 57

private:
58
    bool mDisplayTerrain;
59
    bool mDisplayWorldGrid;
60 61
    QVector3D mImageryOffset;
    QString mImageryPath;
62 63 64
    Imagery::Type mImageryType;
    int mFollowCameraId;
    MAV_FRAME mFrame;
65 66
    QVector3D mTerrainPositionOffset;
    QVector3D mTerrainAttitudeOffset;
67 68 69 70 71
};

typedef QSharedPointer<GlobalViewParams> GlobalViewParamsPtr;

#endif // GLOBALVIEWPARAMS_H