mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Printing: change QPrinter to parent class QPaintDevice
Use general class QPaintDevice to be used for printing and previewing instances, printing uses a QPrinter object while previewing uses a QPixmap instance. We use static_cast to use the needed object. Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
This commit is contained in:
parent
4e1a5d954b
commit
142fd950c8
2 changed files with 15 additions and 13 deletions
|
|
@ -14,7 +14,7 @@ class Printer : public QObject {
|
|||
Q_OBJECT
|
||||
|
||||
private:
|
||||
QPrinter *printer;
|
||||
QPaintDevice *paintDevice;
|
||||
QWebView *webView;
|
||||
print_options *printOptions;
|
||||
template_options *templateOptions;
|
||||
|
|
@ -28,7 +28,7 @@ private slots:
|
|||
void templateProgessUpdated(int value);
|
||||
|
||||
public:
|
||||
Printer(QPrinter *printer, print_options *printOptions, template_options *templateOptions);
|
||||
Printer(QPaintDevice *paintDevice, print_options *printOptions, template_options *templateOptions);
|
||||
~Printer();
|
||||
void print();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue