Commit 0f22afcf authored by pixhawk's avatar pixhawk

Added icons for map providers, fixed a minor bug during map provider change

parent 74746fec
......@@ -79,6 +79,9 @@
<file>images/splash.png</file>
<file>audio/alert.wav</file>
<file>demo-log.txt</file>
<file>images/mapproviders/openstreetmap.png</file>
<file>images/mapproviders/google.png</file>
<file>images/mapproviders/yahoo.png</file>
</qresource>
<qresource prefix="/general">
<file alias="vera.ttf">images/Vera.ttf</file>
......
......@@ -92,11 +92,11 @@ MapWidget::MapWidget(QWidget *parent) :
// Add controls to select map provider
/////////////////////////////////////////////////
QActionGroup* mapproviderGroup = new QActionGroup(this);
osmAction = new QAction(tr("OpenStreetMap"), mapproviderGroup);
yahooActionMap = new QAction(tr("Yahoo: Map"), mapproviderGroup);
yahooActionSatellite = new QAction(tr("Yahoo: Satellite"), mapproviderGroup);
googleActionMap = new QAction(tr("Google: Map"), mapproviderGroup);
googleSatAction = new QAction(tr("Google: Sat"), mapproviderGroup);
osmAction = new QAction(QIcon(":/images/mapproviders/openstreetmap.png"), tr("OpenStreetMap"), mapproviderGroup);
yahooActionMap = new QAction(QIcon(":/images/mapproviders/yahoo.png"), tr("Yahoo: Map"), mapproviderGroup);
yahooActionSatellite = new QAction(QIcon(":/images/mapproviders/yahoo.png"), tr("Yahoo: Satellite"), mapproviderGroup);
googleActionMap = new QAction(QIcon(":/images/mapproviders/google.png"), tr("Google: Map"), mapproviderGroup);
googleSatAction = new QAction(QIcon(":/images/mapproviders/google.png"), tr("Google: Sat"), mapproviderGroup);
osmAction->setCheckable(true);
yahooActionMap->setCheckable(true);
yahooActionSatellite->setCheckable(true);
......@@ -222,9 +222,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc->updateRequestNew();
mc->setZoom(zoom);
yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay->setVisible(false);
yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else if (action == yahooActionMap)
......@@ -238,9 +238,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc->updateRequestNew();
mc->setZoom(zoom);
yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay->setVisible(false);
yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else if (action == yahooActionSatellite)
{
......@@ -253,7 +253,7 @@ void MapWidget::mapproviderSelected(QAction* action)
mc->updateRequestNew();
mc->setZoom(zoom);
yahooActionOverlay->setEnabled(true);
// yahooActionOverlay->setEnabled(true);
}
else if (action == googleActionMap)
{
......@@ -265,9 +265,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc->updateRequestNew();
mc->setZoom(zoom);
yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay->setVisible(false);
yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else if (action == googleSatAction)
{
......@@ -279,9 +279,9 @@ void MapWidget::mapproviderSelected(QAction* action)
mc->updateRequestNew();
mc->setZoom(zoom);
yahooActionOverlay->setEnabled(false);
// yahooActionOverlay->setEnabled(false);
overlay->setVisible(false);
yahooActionOverlay->setChecked(false);
// yahooActionOverlay->setChecked(false);
}
else
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment