summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2019-01-03 10:23:24 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-01-26 07:10:29 -0800
commitd85877eb6701038e98027361c094b0d12a64720f (patch)
tree48012a1512a4734ddcea6b244d9d98f9d4a2b2cd /desktop-widgets
parentba0c6d24d48ab945116d41e026d9e52c04ad8783 (diff)
downloadsubsurface-d85877eb6701038e98027361c094b0d12a64720f.tar.gz
Hook up LaTeX export to UI
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/divelogexportdialog.cpp6
-rw-r--r--desktop-widgets/divelogexportdialog.ui12
2 files changed, 15 insertions, 3 deletions
diff --git a/desktop-widgets/divelogexportdialog.cpp b/desktop-widgets/divelogexportdialog.cpp
index e1dda38e3..769f086b2 100644
--- a/desktop-widgets/divelogexportdialog.cpp
+++ b/desktop-widgets/divelogexportdialog.cpp
@@ -94,6 +94,8 @@ void DiveLogExportDialog::showExplanation()
ui->description->setText(tr("Write depths of images to file."));
} else if (ui->exportTeX->isChecked()) {
ui->description->setText(tr("Write dive as TeX macros to file."));
+ } else if (ui->exportLaTeX->isChecked()) {
+ ui->description->setText(tr("Write dive as LaTeX macros to file."));
}
}
@@ -163,10 +165,10 @@ void DiveLogExportDialog::on_buttonBox_accepted()
filename = QFileDialog::getSaveFileName(this, tr("Save image depths"), lastDir);
if (!filename.isNull() && !filename.isEmpty())
export_depths(qPrintable(filename), ui->exportSelected->isChecked());
- } else if (ui->exportTeX->isChecked()) {
+ } else if (ui->exportTeX->isChecked() || ui->exportLaTeX->isChecked()) {
filename = QFileDialog::getSaveFileName(this, tr("Export to TeX file"), lastDir, tr("TeX files") + " (*.tex)");
if (!filename.isNull() && !filename.isEmpty())
- export_TeX(qPrintable(filename), ui->exportSelected->isChecked(), true);
+ export_TeX(qPrintable(filename), ui->exportSelected->isChecked(), ui->exportTeX->isChecked());
}
break;
case 1:
diff --git a/desktop-widgets/divelogexportdialog.ui b/desktop-widgets/divelogexportdialog.ui
index c35bde793..edde0a6a1 100644
--- a/desktop-widgets/divelogexportdialog.ui
+++ b/desktop-widgets/divelogexportdialog.ui
@@ -202,6 +202,16 @@
</widget>
</item>
<item>
+ <widget class="QRadioButton" name="exportLaTeX">
+ <property name="text">
+ <string>LaTeX</string>
+ </property>
+ <attribute name="buttonGroup">
+ <string notr="true">exportGroup</string>
+ </attribute>
+ </widget>
+ </item>
+ <item>
<widget class="QRadioButton" name="exportImageDepths">
<property name="text">
<string>I&amp;mage depths</string>
@@ -626,7 +636,7 @@
</connection>
</connections>
<buttongroups>
- <buttongroup name="exportGroup"/>
<buttongroup name="buttonGroup"/>
+ <buttongroup name="exportGroup"/>
</buttongroups>
</ui>