subsurface/qt-ui/printlayout.h
Lubomir I. Ivanov 2ec6303f50 printlayout.cpp: Remove convertPixmapToGrayscale()
Function is redundant as we should only render the profile
with a custom color table.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15 04:24:27 -07:00

44 lines
1.1 KiB
C++

#ifndef PRINTLAYOUT_H
#define PRINTLAYOUT_H
#include <QObject>
#include <QPrinter>
#include <QList>
class QTableView;
class PrintDialog;
class TablePrintModel;
class ProfilePrintModel;
struct dive;
class PrintLayout : public QObject {
Q_OBJECT
public:
PrintLayout(PrintDialog *, QPrinter *, struct options *);
void print();
private:
PrintDialog *dialog;
QPrinter *printer;
struct options *printOptions;
int screenDpiX, screenDpiY, printerDpi, scaledPageW, scaledPageH;
qreal scaleX, scaleY;
QRect pageRect;
QList<QString> tablePrintColumnNames;
unsigned int tablePrintHeadingBackground;
QList<unsigned int> tablePrintColumnWidths;
unsigned int profilePrintTableMaxH;
QList<unsigned int> profilePrintColumnWidths, profilePrintRowHeights;
void setup();
void printProfileDives(int divesPerRow, int divesPerColumn);
QTableView *createProfileTable(ProfilePrintModel *model, const int tableW);
void printTable();
void addTablePrintDataRow(TablePrintModel *model, int row, struct dive *dive) const;
void addTablePrintHeadingRow(TablePrintModel *model, int row) const;
};
#endif