Commit ca36bdef authored by Mihail Ivchenko's avatar Mihail Ivchenko
Browse files

Integrate "Best of OSM" tour. Create "File open" dialog to the SoundCue feature

Patch by Daniel Pastushchak.
REVIEW: 121785
parent dc3a283e
......@@ -104,6 +104,36 @@ install (FILES
maps/earth/openstreetmap/openstreetmap.dgml
maps/earth/openstreetmap/openstreetmap-preview.png
maps/earth/openstreetmap/legend.html
maps/earth/openstreetmap/tour.kml
"maps/earth/openstreetmap/Alcatraz.jpg"
"maps/earth/openstreetmap/Brasilia.jpg"
"maps/earth/openstreetmap/Church of the Holy Sepulchre.jpg"
"maps/earth/openstreetmap/Death Valley.jpg"
"maps/earth/openstreetmap/Desert breath.jpg"
"maps/earth/openstreetmap/Disneyland.jpg"
"maps/earth/openstreetmap/Dunnottar Castle.jpg"
"maps/earth/openstreetmap/Eiffel Tower.jpg"
"maps/earth/openstreetmap/Kheops Pyramid.jpg"
"maps/earth/openstreetmap/Klyuchevskaya Sopka.jpg"
"maps/earth/openstreetmap/Maree Man.jpg"
"maps/earth/openstreetmap/Moscow Kremlin.jpg"
"maps/earth/openstreetmap/Nazca Lines.jpg"
"maps/earth/openstreetmap/Palace Het Loo.jpg"
"maps/earth/openstreetmap/Palm Jebel Ali.png"
"maps/earth/openstreetmap/Palm Jumeirah.jpg"
"maps/earth/openstreetmap/Russell Square.jpg"
"maps/earth/openstreetmap/Santorini.jpg"
"maps/earth/openstreetmap/Shuttle Landing Facility.jpg"
"maps/earth/openstreetmap/Sofievka.jpg"
"maps/earth/openstreetmap/Spiral Jetty.png"
"maps/earth/openstreetmap/Stonehenge.jpg"
"maps/earth/openstreetmap/St Peter's Basilica.jpg"
"maps/earth/openstreetmap/Sydney Opera House.jpg"
"maps/earth/openstreetmap/Taj Mahal.jpg"
"maps/earth/openstreetmap/Taranaki.jpg"
"maps/earth/openstreetmap/The Great Wall of China.jpg"
"maps/earth/openstreetmap/The World.jpg"
"maps/earth/openstreetmap/Vesuvius.jpg"
DESTINATION ${MARBLE_DATA_INSTALL_PATH}/maps/earth/openstreetmap)
FILE(GLOB OSM_LEGEND_ICONS maps/earth/openstreetmap/legend/*.png)
......
......@@ -104,6 +104,14 @@
</group>
</settings>
<legend>
<section name="Tours">
<heading>Explore the Earth</heading>
<item name="earthlandingsites">
<text><![CDATA[<a href="tour://earth/openstreetmap/tour.kml">Play a tour of popular places.</a>]]></text>
</item>
</section>
<section name="coordinate-grid" checkable="true" connect="coordinate-grid" spacing="12">
<heading>Coordinate Grid</heading>
</section>
......
This diff is collapsed.
......@@ -14,6 +14,7 @@
#include <QLabel>
#include <QHBoxLayout>
#include <QLineEdit>
#include <QFileDialog>
#include "SoundCueEditWidget.h"
#include "MarbleWidget.h"
......@@ -27,7 +28,8 @@ SoundCueEditWidget::SoundCueEditWidget( const QModelIndex &index, QWidget *paren
QWidget( parent ),
m_index( index ),
m_lineEdit( new QLineEdit ),
m_button( new QToolButton )
m_button( new QToolButton ),
m_button2( new QToolButton )
{
QHBoxLayout *layout = new QHBoxLayout;
layout->setSpacing( 5 );
......@@ -40,6 +42,10 @@ SoundCueEditWidget::SoundCueEditWidget( const QModelIndex &index, QWidget *paren
m_lineEdit->setText( soundCueElement()->href() );
layout->addWidget( m_lineEdit );
m_button2->setIcon( QIcon( ":/marble/document-open.png" ) );
connect(m_button2, SIGNAL(clicked()), this, SLOT(open()));
layout->addWidget( m_button2 );
m_button->setIcon( QIcon( ":/marble/document-save.png" ) );
connect(m_button, SIGNAL(clicked()), this, SLOT(save()));
layout->addWidget( m_button );
......@@ -62,6 +68,12 @@ void SoundCueEditWidget::save()
soundCueElement()->setHref( m_lineEdit->text() );
emit editingDone(m_index);
}
void SoundCueEditWidget::open()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Select sound files..."), QDir::homePath(), tr("Supported Sound Files (*.mp3 *.ogg *.wav)"));
m_lineEdit->setText(fileName);
soundCueElement()->setHref( m_lineEdit->text() );
}
GeoDataSoundCue* SoundCueEditWidget::soundCueElement()
{
......
......@@ -40,12 +40,14 @@ public Q_SLOTS:
private Q_SLOTS:
void save();
void open();
private:
GeoDataSoundCue* soundCueElement();
QPersistentModelIndex m_index;
QLineEdit* m_lineEdit;
QToolButton *m_button;
QToolButton *m_button2;
};
} // namespace Marble
......
......@@ -25,6 +25,7 @@ class QDoubleSpinBox;
class QRadioButton;
class QLineEdit;
class QToolButton;
class QLabel;
namespace Marble
{
......
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