mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Disclaimer included in the printed diveplan
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
714fdc7ced
commit
40dd6f4c39
3 changed files with 16 additions and 8 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "about.h"
|
||||
#include "worldmap-save.h"
|
||||
#include "updatemanager.h"
|
||||
#include "planner.h"
|
||||
#ifndef NO_PRINTING
|
||||
#include "printdialog.h"
|
||||
#endif
|
||||
|
@ -424,13 +425,18 @@ void MainWindow::setPlanNotes(const char *notes)
|
|||
|
||||
void MainWindow::printPlan()
|
||||
{
|
||||
QString diveplan = ui.divePlanOutput->toHtml();
|
||||
QString withDisclaimer = diveplan + QString(disclaimer);
|
||||
|
||||
QPrinter printer;
|
||||
QPrintDialog *dialog = new QPrintDialog(&printer, this);
|
||||
dialog->setWindowTitle(tr("Print runtime table"));
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
ui.divePlanOutput->setHtml(withDisclaimer);
|
||||
ui.divePlanOutput->print(&printer);
|
||||
ui.divePlanOutput->setHtml(diveplan);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDivePlanner_triggered()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue