| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | #ifndef PRINTDIALOG_H
 | 
					
						
							|  |  |  | #define PRINTDIALOG_H
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <QDialog>
 | 
					
						
							| 
									
										
										
										
											2013-07-10 15:34:57 +03:00
										 |  |  | #include <QPrinter>
 | 
					
						
							| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | #include "../display.h"
 | 
					
						
							| 
									
										
										
										
											2013-12-04 15:44:31 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2013-12-04 15:51:01 +02:00
										 |  |  | class QProgressBar; | 
					
						
							| 
									
										
										
										
											2013-12-04 15:44:31 +02:00
										 |  |  | class PrintOptions; | 
					
						
							|  |  |  | class PrintLayout; | 
					
						
							| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | // should be based on a custom QPrintDialog class
 | 
					
						
							|  |  |  | class PrintDialog : public QDialog { | 
					
						
							|  |  |  | Q_OBJECT | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | public: | 
					
						
							|  |  |  | 	static PrintDialog *instance(); | 
					
						
							|  |  |  | 	void runDialog(); | 
					
						
							|  |  |  | 	struct options printOptions; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | private: | 
					
						
							|  |  |  | 	explicit PrintDialog(QWidget *parent = 0, Qt::WindowFlags f = 0); | 
					
						
							|  |  |  | 	PrintOptions *optionsWidget; | 
					
						
							| 
									
										
										
										
											2013-07-10 15:34:57 +03:00
										 |  |  | 	PrintLayout *printLayout; | 
					
						
							| 
									
										
										
										
											2013-12-04 15:51:01 +02:00
										 |  |  | 	QProgressBar *progressBar; | 
					
						
							| 
									
										
										
										
											2013-07-10 15:34:57 +03:00
										 |  |  | 	QPrinter printer; | 
					
						
							| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | private slots: | 
					
						
							| 
									
										
										
										
											2013-12-04 13:51:34 +02:00
										 |  |  | 	void previewClicked(); | 
					
						
							| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | 	void printClicked(); | 
					
						
							| 
									
										
										
										
											2013-12-04 14:14:04 +02:00
										 |  |  | 	void closeClicked(); | 
					
						
							| 
									
										
										
										
											2013-07-10 19:27:10 +03:00
										 |  |  | 	void onPaintRequested(QPrinter *); | 
					
						
							| 
									
										
										
										
											2013-07-09 15:37:53 +03:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #endif
 |