mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Hook up LaTeX export to UI
Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
ba0c6d24d4
commit
d85877eb67
2 changed files with 15 additions and 3 deletions
|
@ -94,6 +94,8 @@ void DiveLogExportDialog::showExplanation()
|
||||||
ui->description->setText(tr("Write depths of images to file."));
|
ui->description->setText(tr("Write depths of images to file."));
|
||||||
} else if (ui->exportTeX->isChecked()) {
|
} else if (ui->exportTeX->isChecked()) {
|
||||||
ui->description->setText(tr("Write dive as TeX macros to file."));
|
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);
|
filename = QFileDialog::getSaveFileName(this, tr("Save image depths"), lastDir);
|
||||||
if (!filename.isNull() && !filename.isEmpty())
|
if (!filename.isNull() && !filename.isEmpty())
|
||||||
export_depths(qPrintable(filename), ui->exportSelected->isChecked());
|
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)");
|
filename = QFileDialog::getSaveFileName(this, tr("Export to TeX file"), lastDir, tr("TeX files") + " (*.tex)");
|
||||||
if (!filename.isNull() && !filename.isEmpty())
|
if (!filename.isNull() && !filename.isEmpty())
|
||||||
export_TeX(qPrintable(filename), ui->exportSelected->isChecked(), true);
|
export_TeX(qPrintable(filename), ui->exportSelected->isChecked(), ui->exportTeX->isChecked());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
|
|
|
@ -201,6 +201,16 @@
|
||||||
</attribute>
|
</attribute>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
<item>
|
||||||
<widget class="QRadioButton" name="exportImageDepths">
|
<widget class="QRadioButton" name="exportImageDepths">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -626,7 +636,7 @@
|
||||||
</connection>
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<buttongroups>
|
<buttongroups>
|
||||||
<buttongroup name="exportGroup"/>
|
|
||||||
<buttongroup name="buttonGroup"/>
|
<buttongroup name="buttonGroup"/>
|
||||||
|
<buttongroup name="exportGroup"/>
|
||||||
</buttongroups>
|
</buttongroups>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue