Qt 5.10 Book Examples
chapter24
Printer
Printer.h
Go to the documentation of this file.
1
// ======================================================================
2
// Printer.h
3
// ======================================================================
4
// This file is a part of the book
5
// "Qt 5.10 Professional programming with C++"
6
// http://qt-book.com
7
// ======================================================================
8
// Copyright (c) 2017 by Max Schlee
9
// ======================================================================
10
11
#pragma once
12
13
#include <QWidget>
14
15
class
QPrinter;
16
class
QPaintDevice;
17
18
// ======================================================================
19
class
Printer
:
public
QWidget {
20
Q_OBJECT
21
22
private
:
23
QPrinter* m_pprinter;
24
25
protected
:
26
virtual
void
paintEvent
(QPaintEvent* pe );
27
void
draw
(QPaintDevice* ppd);
28
29
public
:
30
Printer
(QWidget* pwgt = 0);
31
virtual
~Printer
();
32
33
public
slots:
34
void
slotPrint
();
35
};
Printer::draw
void draw(QPaintDevice *ppd)
Definition:
Printer.cpp:45
Printer
Definition:
Printer.h:19
Printer::slotPrint
void slotPrint()
Definition:
Printer.cpp:34
Printer::Printer
Printer(QWidget *pwgt=0)
Definition:
Printer.cpp:16
Printer::paintEvent
virtual void paintEvent(QPaintEvent *pe)
Definition:
Printer.cpp:28
Printer::~Printer
virtual ~Printer()
Definition:
Printer.cpp:22
Generated by
1.8.14