#endif
SituareEngine::SituareEngine(QMainWindow *parent)
- : QObject(parent)
+ : QObject(parent),
+ m_autoCenteringEnabled(false),
+ m_gpsEnabled(false)
{
qDebug() << __PRETTY_FUNCTION__;
m_ui = new MainWindow;
qDebug() << __PRETTY_FUNCTION__;
delete m_ui;
+
+ QSettings settings(DIRECTORY_NAME, FILE_NAME);
+ qDebug() << __PRETTY_FUNCTION__ << m_gpsEnabled;
+ qDebug() << __PRETTY_FUNCTION__ << m_autoCenteringEnabled;
+ settings.setValue(GPS_ENABLED, m_gpsEnabled);
+ settings.setValue(AUTO_CENTERING_ENABLED, m_autoCenteringEnabled);
}
void SituareEngine::loginProcessCancelled()
{
qDebug() << __PRETTY_FUNCTION__;
+ m_gpsEnabled = enabled;
+
if (enabled) {
m_gps->lastPosition();
m_gps->start();
{
qDebug() << __PRETTY_FUNCTION__;
+ m_autoCenteringEnabled = enabled;
+
if (enabled) {
m_ui->setAutoCenteringButton(true);
m_ui->autoCenteringEnabled(true);
* DATA MEMBERS
******************************************************************************/
private:
+ bool m_autoCenteringEnabled; ///< Auto centering enabled
+ bool m_gpsEnabled; ///< GPS enabled
FacebookAuthentication *m_facebookAuthenticator; ///< Instance for facebook authenticator
GPSPositionInterface *m_gps; ///< Instance of the gps position
MainWindow *m_ui; ///< Instance of the MainWindow UI