HTML: Add export list only option

Exporting small dive list only or choose to export the dive list with
all the dive details like the profile, Bookmarks, dive equipments and
statistics.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Gehad elrobey 2014-06-24 16:01:49 +03:00 committed by Dirk Hohndel
parent ccfdcca6e6
commit e9c4259db4
5 changed files with 30 additions and 23 deletions

View file

@ -79,7 +79,7 @@ void DiveLogExportDialog::exportHtmlInit(const QString &filename)
QString json_settings = exportFiles + QDir::separator() + "settings.json";
exportHTMLsettings(json_settings);
export_HTML(json_dive_data.toUtf8().data(), ui->exportSelectedDives->isChecked());
export_HTML(json_dive_data.toUtf8().data(), ui->exportSelectedDives->isChecked(), ui->exportListOnly->isChecked());
QString searchPath = getSubsurfaceDataPath("theme");
if (searchPath.isEmpty())
@ -114,7 +114,8 @@ void DiveLogExportDialog::exportHTMLsettings(const QString &filename)
QFile file(filename);
file.open(QIODevice::WriteOnly | QIODevice::Text);
QTextStream out(&file);
out << "settings = {\"fontSize\":\"" << fontSize << "\",\"fontFamily\":\"" << fontFamily << "\",}";
out << "settings = {\"fontSize\":\"" << fontSize << "\",\"fontFamily\":\"" << fontFamily << "\",\"listOnly\":\""<<
ui->exportListOnly->isChecked() << "\",}";
file.close();
}