mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add print button to planner
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2785d7bc3e
commit
6699e3ab3e
5 changed files with 34 additions and 7 deletions
|
@ -20,6 +20,7 @@
|
|||
#include <QStringList>
|
||||
#include <QSettings>
|
||||
#include <QShortcut>
|
||||
#include <QPrintDialog>
|
||||
#include <fcntl.h>
|
||||
#include "divelistview.h"
|
||||
#include "starwidget.h"
|
||||
|
@ -419,6 +420,17 @@ void MainWindow::setPlanNotes(const char *notes)
|
|||
ui.divePlanOutput->setHtml(notes);
|
||||
}
|
||||
|
||||
void MainWindow::printPlan()
|
||||
{
|
||||
QPrinter printer;
|
||||
QPrintDialog *dialog = new QPrintDialog(&printer, this);
|
||||
dialog->setWindowTitle(tr("Print runtime table"));
|
||||
if (dialog->exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
ui.divePlanOutput->print(&printer);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionDivePlanner_triggered()
|
||||
{
|
||||
if(!plannerStateClean())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue