#include "src/logic/locations.h"
#include <QDebug>
+#include <QApplication>
+#include <QDesktopWidget>
static const QString CUSTOMIZE = "Customize";
ui->setupUi(this);
this->setAttribute(Qt::WA_Maemo5AutoOrientation);
+ this->setAttribute(Qt::WA_DeleteOnClose);
Locations* locations = Locations::GetInstance();
this->connect(locations->getGpsLocation(), SIGNAL(gpsLocationChanged(GpsLocation*)), SLOT(gps_location_retrieved()));
}
+ connect(QApplication::desktop(), SIGNAL(resized(int)), this, SLOT(orientationChanged()));
+ this->setFixedHeight(QApplication::desktop()->screenGeometry().height());
+
//this->connect(locations->getGpsLocation(), SIGNAL(gpsLocationUpdatingChanged(bool)), SLOT(gps_updating_changed(bool)));
}
Locations *locations = Locations::GetInstance();
Location* selected = locations->getLocation(item->text());
emit(this->selectedLocation(selected));
- this->deleteLater();
+ this->close();
}
void FavoriteSelectionDialog::on_modify_button_clicked()
{
emit(this->customizeRequested());
- this->deleteLater();
+ this->close();
}
void FavoriteSelectionDialog::on_gps_button_clicked()
{
Locations *locations = Locations::GetInstance();
emit(this->selectedLocation(locations->getGpsLocation()));
- this->deleteLater();
+ this->close();
+}
+
+void FavoriteSelectionDialog::orientationChanged()
+{
+ this->setFixedHeight(QApplication::desktop()->screenGeometry().height());
}