mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Export profile data
This introduces a csv file that contains the data from the structs defined in profile.c, in particular all deco information computed for the dive profle (including NDL, TTS, ceilings, surface GFs etc). Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
a89b36c661
commit
8c9e5becb2
6 changed files with 233 additions and 1 deletions
|
@ -15,6 +15,7 @@
|
|||
#include "core/settings/qPrefDisplay.h"
|
||||
#include "desktop-widgets/mainwindow.h"
|
||||
#include "profile-widget/profilewidget2.h"
|
||||
#include "core/save-profiledata.h"
|
||||
#include "core/dive.h" // Allows access to helper functions in TeX export.
|
||||
|
||||
// Retrieves the current unit settings defined in the Subsurface preferences.
|
||||
|
@ -98,6 +99,8 @@ void DiveLogExportDialog::showExplanation()
|
|||
ui->description->setText(tr("Write dive as LaTeX macros to file."));
|
||||
} else if (ui->exportProfile->isChecked()) {
|
||||
ui->description->setText(tr("Write the profile image as PNG file."));
|
||||
} else if (ui->exportProfileData->isChecked()) {
|
||||
ui->description->setText(tr("Write profile data to a CSV file."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -175,6 +178,10 @@ void DiveLogExportDialog::on_buttonBox_accepted()
|
|||
filename = QFileDialog::getSaveFileName(this, tr("Save profile image"), lastDir);
|
||||
if (!filename.isNull() && !filename.isEmpty())
|
||||
exportProfile(qPrintable(filename), ui->exportSelected->isChecked());
|
||||
} else if (ui->exportProfileData->isChecked()) {
|
||||
filename = QFileDialog::getSaveFileName(this, tr("Save profile data"), lastDir);
|
||||
if (!filename.isNull() && !filename.isEmpty())
|
||||
save_profiledata(qPrintable(filename), ui->exportSelected->isChecked());
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>507</width>
|
||||
<height>398</height>
|
||||
<height>423</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
|
@ -231,6 +231,16 @@
|
|||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="exportProfileData">
|
||||
<property name="text">
|
||||
<string>Profile Data CSV</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">exportGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue