emit timeout();
}
+
+void GPSPosition::setUpdateInterval(int interval)
+{
+ if (m_updateInterval != interval) {
+ m_updateInterval = interval;
+ m_gpsSource->setUpdateInterval(m_updateInterval);
+ }
+}
public:
/**
- * @brief Start GPS.
+ * @brief Constructor creates GPS source.
+ *
+ * @param parent QObject
*/
GPSPosition(QObject *parent = 0);
+
+ /**
+ * @brief Destructor stops GPS.
+ */
~GPSPosition();
/******************************************************************************
bool isRunning();
/**
+ * @brief Set GPS update interval
+ *
+ * @return interval interval in milliseconds
+ */
+ void setUpdateInterval(int interval);
+
+ /**
* @brief Start GPS.
*/
void start();
*/
void stop();
- /**
- * @brief Request GPS update.
- */
- void update();
-
private slots:
/**
void positionUpdated(QGeoPositionInfo positionInfo);
/**
+ * @brief Slot for GPS update request.
+ */
+ void update();
+
+ /**
* @brief Slot for update timeout.
*
* Called when request timeout occurs.
emit enableGPS(true);
m_gpsToggleAct->setText(tr("GPS enabled"));
showMaemoInformationBox(tr("GPS enabled"));
- m_autoCenteringAct->setEnabled(true);
- autoCenteringToggled(true);
+ m_autoCenteringAct->setVisible(true);
}
else {
emit enableGPS(false);
m_gpsToggleAct->setText(tr("GPS disabled"));
showMaemoInformationBox(tr("GPS disabled"));
- m_autoCenteringAct->setEnabled(false);
- autoCenteringToggled(false);
+ m_autoCenteringAct->setVisible(false);
}
}