subsurface/qt-ui/printlayout.h
Lubomir I. Ivanov 20804b16d3 Print: add a setup() method to PrintLayout
The setup() method will be called each time to obtain the
current printer settings. Also it calculates required scalling
based on screen agains printer DPI.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2013-07-10 16:18:16 +03:00

33 lines
537 B
C++

#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;
int screenDpiX, screenDpiY, printerDpi;
qreal scaleX, scaleY;
QRect pageRect;
void setup();
void printSixDives();
void printTwoDives();
void printTable();
};
#endif