summaryrefslogtreecommitdiffstats
path: root/qt-ui/printlayout.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-10 15:34:57 +0300
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2013-07-10 15:34:57 +0300
commit41bad7695ee40571062a370610e6ca518295e3c7 (patch)
tree6c3d960f36440edb3e5532a84400811004853d0a /qt-ui/printlayout.h
parent74f989bc46a06c124283fa851a06dd093f817c96 (diff)
downloadsubsurface-41bad7695ee40571062a370610e6ca518295e3c7.tar.gz
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>
Diffstat (limited to 'qt-ui/printlayout.h')
-rw-r--r--qt-ui/printlayout.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/qt-ui/printlayout.h b/qt-ui/printlayout.h
new file mode 100644
index 000000000..e9129bff6
--- /dev/null
+++ b/qt-ui/printlayout.h
@@ -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