|
1 #ifndef _PRINTERDIALOG_H |
|
2 #define _PRINTERDIALOG_H |
|
3 |
|
4 #include <QDialog> |
|
5 #include <QPrinter> |
|
6 #include <QPainter> |
|
7 |
|
8 |
|
9 enum JobType { PR_SUPPLIES, PR_YEASTBANK }; |
|
10 |
|
11 namespace Ui { |
|
12 class PrinterDialog; |
|
13 } |
|
14 |
|
15 |
|
16 class PrinterDialog : public QDialog |
|
17 { |
|
18 Q_OBJECT |
|
19 |
|
20 public: |
|
21 /** |
|
22 * @brief Construct a new Printer Dialog |
|
23 * @param parent |
|
24 */ |
|
25 explicit PrinterDialog(int job, int rec, QWidget *parent = 0); |
|
26 |
|
27 /** |
|
28 * @brief Destroy the Printer Dialog |
|
29 */ |
|
30 ~PrinterDialog(); |
|
31 |
|
32 public slots: |
|
33 void printDocument(QPrinter *printer); |
|
34 |
|
35 private: |
|
36 int p_job; |
|
37 int p_rec; |
|
38 |
|
39 void printHeader(QPainter *painter, QString title); |
|
40 }; |
|
41 |
|
42 #endif |