diff options
Diffstat (limited to 'src/positioning')
-rw-r--r-- | src/positioning/qgeosatelliteinfosource.cpp | 10 | ||||
-rw-r--r-- | src/positioning/qgeosatelliteinfosource.h | 5 | ||||
-rw-r--r-- | src/positioning/qgeosatelliteinfosource_p.h | 2 |
3 files changed, 12 insertions, 5 deletions
diff --git a/src/positioning/qgeosatelliteinfosource.cpp b/src/positioning/qgeosatelliteinfosource.cpp index 9e80a1d2..2099dd9f 100644 --- a/src/positioning/qgeosatelliteinfosource.cpp +++ b/src/positioning/qgeosatelliteinfosource.cpp @@ -97,8 +97,6 @@ QGeoSatelliteInfoSourcePrivate::~QGeoSatelliteInfoSourcePrivate() QGeoSatelliteInfoSource::QGeoSatelliteInfoSource(QObject *parent) : QObject(*new QGeoSatelliteInfoSourcePrivate, parent) { - Q_D(QGeoSatelliteInfoSource); - d->interval = 0; } QGeoSatelliteInfoSource::QGeoSatelliteInfoSource(QGeoSatelliteInfoSourcePrivate &dd, QObject *parent) @@ -158,7 +156,13 @@ void QGeoSatelliteInfoSource::setUpdateInterval(int msec) int QGeoSatelliteInfoSource::updateInterval() const { Q_D(const QGeoSatelliteInfoSource); - return d->interval; + return d->interval.value(); +} + +QBindable<int> QGeoSatelliteInfoSource::bindableUpdateInterval() +{ + Q_D(QGeoSatelliteInfoSource); + return QBindable<int>(&d->interval); } /*! diff --git a/src/positioning/qgeosatelliteinfosource.h b/src/positioning/qgeosatelliteinfosource.h index 4e5d62ad..9d6603bb 100644 --- a/src/positioning/qgeosatelliteinfosource.h +++ b/src/positioning/qgeosatelliteinfosource.h @@ -50,7 +50,8 @@ class QGeoSatelliteInfoSourcePrivate; class Q_POSITIONING_EXPORT QGeoSatelliteInfoSource : public QObject { Q_OBJECT - Q_PROPERTY(int updateInterval READ updateInterval WRITE setUpdateInterval) + Q_PROPERTY(int updateInterval READ updateInterval WRITE setUpdateInterval BINDABLE + bindableUpdateInterval) Q_PROPERTY(int minimumUpdateInterval READ minimumUpdateInterval) public: @@ -76,6 +77,8 @@ public: virtual void setUpdateInterval(int msec); int updateInterval() const; + QBindable<int> bindableUpdateInterval(); + virtual int minimumUpdateInterval() const = 0; virtual Error error() const = 0; diff --git a/src/positioning/qgeosatelliteinfosource_p.h b/src/positioning/qgeosatelliteinfosource_p.h index cfad6edc..48eb6be1 100644 --- a/src/positioning/qgeosatelliteinfosource_p.h +++ b/src/positioning/qgeosatelliteinfosource_p.h @@ -64,7 +64,7 @@ public: static QGeoSatelliteInfoSource *createSourceReal(const QJsonObject &meta, const QVariantMap ¶meters, QObject *parent); - int interval; + Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QGeoSatelliteInfoSourcePrivate, int, interval, 0) QString providerName; }; |