exifitem.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef EXIFITEM_H
  2. #define EXIFITEM_H
  3. #include <QDeclarativeItem>
  4. class ExifHandler;
  5. class ExifItem : public QDeclarativeItem
  6. {
  7. Q_OBJECT
  8. Q_PROPERTY(qreal longitude READ longitude NOTIFY longitudeChanged)
  9. Q_PROPERTY(qreal latitude READ latitude NOTIFY latitudeChanged)
  10. Q_PROPERTY(int gpsError READ gpsError NOTIFY gpsErrorChanged)
  11. public:
  12. explicit ExifItem(QDeclarativeItem *parent = 0);
  13. Q_INVOKABLE void getGpsPointer(QUrl filename);
  14. private:
  15. int gpsError(){return m_gpsError;}
  16. qreal latitude(){return m_latitude;}
  17. qreal longitude(){return m_longitude;}
  18. void launchMaps(qreal latitude, qreal longitude);
  19. signals:
  20. void gpsErrorChanged();
  21. void longitudeChanged();
  22. void latitudeChanged();
  23. void positionChanged();
  24. public slots:
  25. void gpsPositionReady(int error , qreal longitude, qreal latitude);
  26. private:
  27. long m_gpsPointer;
  28. int m_gpsError;
  29. qreal m_latitude;
  30. qreal m_longitude;
  31. ExifHandler* m_exifHandler;
  32. };
  33. QML_DECLARE_TYPE(ExifItem)
  34. #endif // EXIFITEM_H