subsurface/qt-ui/printlayout.h
Lubomir I. Ivanov af1c55c29d Print: move some header includes to cpp files
We don't really need includes of display.h and dive.h in
printoptions.h and printlayout.h or forward declartions
of 'struct dive' and 'struct options' in there.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-11 00:45:29 +03:00

34 lines
599 B
C++

#ifndef PRINTLAYOUT_H
#define PRINTLAYOUT_H
#include <QPrinter>
#include <QStringList>
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;
int screenDpiX, screenDpiY, printerDpi;
qreal scaleX, scaleY;
QRect pageRect;
void setup();
void printSixDives();
void printTwoDives();
void printTable();
QString insertTableHeadingRow();
QString insertTableDataRow(struct dive *dive);
};
#endif