2015-04-21 16:05:20 +00:00
|
|
|
#ifndef PRINTER_H
|
|
|
|
#define PRINTER_H
|
|
|
|
|
|
|
|
#include <QPrinter>
|
|
|
|
#include <QWebView>
|
2015-06-10 17:31:19 +00:00
|
|
|
#include <QRect>
|
|
|
|
#include <QPainter>
|
|
|
|
|
|
|
|
#include "profile/profilewidget2.h"
|
2015-04-21 16:05:20 +00:00
|
|
|
|
|
|
|
class Printer : public QObject {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
private:
|
|
|
|
QPrinter *printer;
|
|
|
|
QWebView *webView;
|
|
|
|
void render();
|
2015-06-10 17:31:19 +00:00
|
|
|
void putProfileImage(QRect box, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile);
|
2015-05-30 13:32:15 +00:00
|
|
|
int done;
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void templateProgessUpdated(int value);
|
2015-04-21 16:05:20 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
Printer(QPrinter *printer);
|
|
|
|
void print();
|
2015-05-30 13:32:15 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void progessUpdated(int value);
|
2015-04-21 16:05:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif //PRINTER_H
|