- Main Page
- Classes
- Files

- File List

# qaugmentedrealitycameraitem.h

    00001 #ifndef QAUGMENTEDREALITYCAMERAITEM_H
    00002 #define QAUGMENTEDREALITYCAMERAITEM_H
    00003
    00004 #include <QDeclarativeItem>
    00005 #include <QGeoCoordinate>
    00006
    00007 #include "qdll_global.h"
    00008
    00009 QTM_USE_NAMESPACE
    00010
    00011 class QAugmentedRealityPositionInfo {
    00012 public:
    00013     float angle;
    00014     float distance;
    00015 };
    00016
    00017 class QDLLSHARED_EXPORT QAugmentedRealityCameraItem : public QDeclarativeItem
    00018 {
    00019     Q_OBJECT
    00020     Q_CLASSINFO("Author", "Sebastiano Galazzo")
    00021     Q_CLASSINFO("Email", "sebastiano.galazzo@gmail.com")
    00022     Q_PROPERTY(float latitude  READ latitude  WRITE setLatitude)
    00023     Q_PROPERTY(float longitude READ longitude WRITE setLongitude)
    00024     Q_PROPERTY(QString message READ message WRITE setMessage)
    00025     Q_PROPERTY(QString infoBox READ infoBox WRITE setInfoBox)
    00026     Q_PROPERTY(QString source READ source WRITE setSource)
    00027
    00028     Q_PROPERTY(float x READ x)
    00029     Q_PROPERTY(float y READ y)
    00030     Q_PROPERTY(float z READ z)
    00031
    00032 public:
    00033
    00034     enum Roles {
    00035         MessageRole = Qt::UserRole+1,
    00036         LatitudeRole= Qt::UserRole+2,
    00037         LongitudeRole = Qt::UserRole+3,
    00038         InfoBoxRole = Qt::UserRole+4,
    00039         SourceRole = Qt::UserRole+5
    00040     };
    00041
    00042     QAugmentedRealityCameraItem(QDeclarativeItem *parent = 0);
    00043     virtual ~QAugmentedRealityCameraItem() {}
    00044
    00045     QVariant data(int role) const;
    00046     QHash<int, QByteArray> roleNames() const;
    00047
    00048     QString id() const;
    00049     float latitude() const;
    00050     float longitude() const;
    00051     QString message() const;
    00052     QString infoBox() const;
    00053     QString source() const;
    00054
    00055     void setLatitude(float value );
    00056     void setLongitude(float value );
    00057     void setMessage(QString message );
    00058     void setInfoBox(QString infoBox );
    00059     void setSource(QString source );
    00060
    00061     float x() const;
    00062     float y() const;
    00063     float z() const;
    00064
    00065     QAugmentedRealityPositionInfo relativePosition(QGeoCoordinate, float angle);
    00066
    00067 signals:
    00068   void dataChanged();
    00069
    00070 private:
    00071     float m_latitude;
    00072     float m_longitude;
    00073     QString m_message;
    00074     QString m_infobox;
    00075     QString m_source;
    00076 };
    00077
    00078 #endif // QAUGMENTEDREALITYCAMERAITEM_H

All Classes Functions