subsurface/printer.h
Gehad elrobey cd30e11672 Printing: render the dive profile on top of QWebView
We render the dive profile over the QWebView to the QPainter. This helps
us not to save the SVG images to disk and then render them again to the
webview.

Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2015-06-19 21:41:56 +03:00

33 lines
570 B
C++

#ifndef PRINTER_H
#define PRINTER_H
#include <QPrinter>
#include <QWebView>
#include <QRect>
#include <QPainter>
#include "profile/profilewidget2.h"
class Printer : public QObject {
Q_OBJECT
private:
QPrinter *printer;
QWebView *webView;
void render();
void putProfileImage(QRect box, QRect viewPort, QPainter *painter, struct dive *dive, QPointer<ProfileWidget2> profile);
int done;
private slots:
void templateProgessUpdated(int value);
public:
Printer(QPrinter *printer);
void print();
signals:
void progessUpdated(int value);
};
#endif //PRINTER_H