[Marble-commits] KDE/kdeedu/marble/src/lib
Dennis Nienhüser
earthwings at gentoo.org
Sun Sep 26 21:21:45 CEST 2010
SVN commit 1180018 by nienhueser:
Add accessors for the position provider plugin and the current location as counterparts to the existing signals.
M +10 -0 PositionTracking.cpp
M +10 -1 PositionTracking.h
--- trunk/KDE/kdeedu/marble/src/lib/PositionTracking.cpp #1180017:1180018
@@ -140,6 +140,11 @@
emit positionProviderPluginChanged( plugin );
}
+PositionProviderPlugin* PositionTracking::positionProviderPlugin()
+{
+ return d->m_positionProvider;
+}
+
QString PositionTracking::error() const
{
return d->m_positionProvider ? d->m_positionProvider->error() : QString();
@@ -183,5 +188,10 @@
return d->m_accuracy;
}
+GeoDataCoordinates PositionTracking::currentLocation() const
+{
+ return d->m_gpsCurrentPosition;
+}
+
#include "PositionTracking.moc"
#include "PositionTracking_p.moc"
--- trunk/KDE/kdeedu/marble/src/lib/PositionTracking.h #1180017:1180018
@@ -32,8 +32,9 @@
{
Q_OBJECT
+ Q_PROPERTY( PositionProviderPlugin* positionProviderPlugin READ positionProviderPlugin WRITE setPositionProviderPlugin NOTIFY positionProviderPluginChanged )
+
public:
-
explicit PositionTracking( FileManager *fileManager,
QObject *parent = 0 );
~PositionTracking();
@@ -44,6 +45,9 @@
*/
void setPositionProviderPlugin( PositionProviderPlugin* plugin );
+ /** @brief Returns the current position provider plugin, or 0 if none is in use */
+ PositionProviderPlugin* positionProviderPlugin();
+
/**
* @brief gives the error message from the current position provider
*/
@@ -59,12 +63,17 @@
*/
qreal direction() const;
+ /** @brief Returns the estimated accuracy of the current position */
GeoDataAccuracy accuracy() const;
+
/**
* @brief provides the visibility of the Position Tracking document
*/
bool trackVisible() const;
+ /** @brief Returns the current position, if any */
+ GeoDataCoordinates currentLocation() const;
+
public Q_SLOTS:
/**
* Toggles the visibility of the Position Tracking document
More information about the Marble-commits
mailing list