mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Print: add a class for print layouting
PrintLayout is a class that will handle the layouting part of dive profiles, text, tables depending on the settings of a QPrinter and the PrinterDialog and PrintOptions instances. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
74f989bc46
commit
41bad7695e
6 changed files with 91 additions and 1 deletions
29
qt-ui/printlayout.h
Normal file
29
qt-ui/printlayout.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef PRINTLAYOUT_H
|
||||
#define PRINTLAYOUT_H
|
||||
|
||||
#include <QPrinter>
|
||||
#include <QPainter>
|
||||
#include "../display.h"
|
||||
|
||||
class PrintDialog;
|
||||
|
||||
class PrintLayout : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PrintLayout(PrintDialog *, QPrinter *, struct options *);
|
||||
void print();
|
||||
|
||||
private:
|
||||
PrintDialog *dialog;
|
||||
QPrinter *printer;
|
||||
struct options *printOptions;
|
||||
|
||||
QPainter painter;
|
||||
|
||||
void printSixDives();
|
||||
void printTwoDives();
|
||||
void printTable();
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue