mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Make QgsExifTools QML friendly
This commit is contained in:
parent
577e7210db
commit
3c64bbdcf9
@ -8,6 +8,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
class QgsExifTools
|
||||
{
|
||||
%Docstring
|
||||
@ -19,6 +20,9 @@ Contains utilities for working with EXIF tags in images.
|
||||
%TypeHeaderCode
|
||||
#include "qgsexiftools.h"
|
||||
%End
|
||||
public:
|
||||
static const QMetaObject staticMetaObject;
|
||||
|
||||
public:
|
||||
|
||||
|
||||
@ -32,6 +36,13 @@ If the image contains an elevation tag then the returned point will contain
|
||||
the elevation as a z value.
|
||||
|
||||
.. seealso:: :py:func:`geoTagImage`
|
||||
%End
|
||||
|
||||
static bool hasGeoTag( const QString &imagePath );
|
||||
%Docstring
|
||||
Returns ``True`` if the image at ``imagePath`` contains a valid geotag.
|
||||
|
||||
.. seealso:: :py:func:`getGeoTag`
|
||||
%End
|
||||
|
||||
class GeoTagDetails
|
||||
|
@ -100,6 +100,13 @@ QString doubleToExifCoordinate( const double val )
|
||||
return QStringLiteral( "%1/1 %2/1 %3/1000" ).arg( degrees ).arg( minutes ).arg( seconds );
|
||||
}
|
||||
|
||||
bool QgsExifTools::hasGeoTag( const QString &imagePath )
|
||||
{
|
||||
bool ok = false;
|
||||
QgsExifTools::getGeoTag( imagePath, ok );
|
||||
return ok;
|
||||
}
|
||||
|
||||
QgsPoint QgsExifTools::getGeoTag( const QString &imagePath, bool &ok )
|
||||
{
|
||||
ok = false;
|
||||
|
@ -18,6 +18,8 @@
|
||||
|
||||
#include "qgis_analysis.h"
|
||||
#include "qgspointxy.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QVariantMap>
|
||||
@ -29,6 +31,8 @@
|
||||
*/
|
||||
class ANALYSIS_EXPORT QgsExifTools
|
||||
{
|
||||
Q_GADGET
|
||||
|
||||
public:
|
||||
|
||||
#if 0
|
||||
@ -47,6 +51,13 @@ class ANALYSIS_EXPORT QgsExifTools
|
||||
*/
|
||||
static QgsPoint getGeoTag( const QString &imagePath, bool &ok SIP_OUT );
|
||||
|
||||
/**
|
||||
* Returns TRUE if the image at \a imagePath contains a valid geotag.
|
||||
*
|
||||
* \see getGeoTag()
|
||||
*/
|
||||
Q_INVOKABLE static bool hasGeoTag( const QString &imagePath );
|
||||
|
||||
/**
|
||||
* Extended image geotag details.
|
||||
* \ingroup analysis
|
||||
|
Loading…
x
Reference in New Issue
Block a user