mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
3aae3ff547
It might be a good practice to declare certain class 'helper' functions as constant members. But I don't think there are performance benefits to that other than the readability ones. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
39 lines
776 B
C++
39 lines
776 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;
|
|
|
|
QStringList tableColumnNames;
|
|
QStringList tableColumnWidths;
|
|
|
|
void setup();
|
|
void printSixDives() const;
|
|
void printTwoDives() const;
|
|
void printTable() const;
|
|
QString insertTableHeadingRow() const;
|
|
QString insertTableHeadingCol(int) const;
|
|
QString insertTableDataRow(struct dive *) const;
|
|
QString insertTableDataCol(QString) const;
|
|
};
|
|
|
|
#endif
|