mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Exporting a World-Map
This patch adds the world map exporter. - add worldmap-save.c that writes the html to the file - use Google maps v3 API to put the place marks on the map - add worldmap-options.h to contain some settings for the JS which will make it easier for those to be changed - add save HTML action in the mainwindow user interface Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
7696fbf9cd
commit
0cd9d09410
7 changed files with 152 additions and 0 deletions
|
@ -36,6 +36,7 @@
|
|||
#include "simplewidgets.h"
|
||||
#include "diveplanner.h"
|
||||
#include "about.h"
|
||||
#include "worldmap-save.h"
|
||||
#ifndef NO_PRINTING
|
||||
#include "printdialog.h"
|
||||
#endif
|
||||
|
@ -277,6 +278,15 @@ void MainWindow::on_actionExportUDDF_triggered()
|
|||
export_dives_uddf(filename.toUtf8(), false);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionExportHTMLworldmap_triggered()
|
||||
{
|
||||
QFileInfo fi(system_default_filename());
|
||||
QString filename = QFileDialog::getSaveFileName(this, tr("Export World Map"), fi.absolutePath(),
|
||||
tr("HTML files (*.html)"));
|
||||
if (!filename.isNull() && !filename.isEmpty())
|
||||
export_worldmap_HTML(filename.toUtf8().data());
|
||||
}
|
||||
|
||||
void MainWindow::on_actionPrint_triggered()
|
||||
{
|
||||
#ifndef NO_PRINTING
|
||||
|
|
|
@ -90,6 +90,7 @@ slots:
|
|||
void on_actionSaveAs_triggered();
|
||||
void on_actionClose_triggered();
|
||||
void on_actionExportUDDF_triggered();
|
||||
void on_actionExportHTMLworldmap_triggered();
|
||||
void on_actionPrint_triggered();
|
||||
void on_actionPreferences_triggered();
|
||||
void on_actionQuit_triggered();
|
||||
|
|
|
@ -551,6 +551,7 @@
|
|||
<addaction name="separator"/>
|
||||
<addaction name="actionClose"/>
|
||||
<addaction name="actionExportUDDF"/>
|
||||
<addaction name="actionExportHTMLworldmap"/>
|
||||
<addaction name="actionPrint"/>
|
||||
<addaction name="actionPreferences"/>
|
||||
<addaction name="separator"/>
|
||||
|
@ -680,6 +681,11 @@
|
|||
<property name="shortcut">
|
||||
<string>Ctrl+U</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionExportHTMLworldmap">
|
||||
<property name="text">
|
||||
<string>Export HTML World Map</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPrint">
|
||||
<property name="text">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue