UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
zqdlg_print.hpp
1 /* zqdlg_print.hpp */
2 /* $Id: zqdlg_print.hpp,v 1.3 2009/05/07 13:56:27 vlad Exp $ */
3 
4 /*
5  * $Log: zqdlg_print.hpp,v $
6  * Revision 1.3 2009/05/07 13:56:27 vlad
7  * Pass margins and page size to postscript printer.
8  *
9  * Revision 1.2 2008/05/21 11:05:38 vlad
10  * Very early printer and postscript support.
11  *
12  * Revision 1.1 2006/07/12 10:14:42 guser4
13  * 1) + universal print dialog with CGM, PNG and JPEG support;
14  * 2) bHardcopy flag is set on hardcopy print.
15  *
16  */
17 
18 #ifndef __zqdlg_print_hpp
19 #define __zqdlg_print_hpp
20 
21 
22 #include <string>
23 #include <qmainwindow.h>
24 
25 
26 class PrOptions;
27 class QzqArea;
28 class ZqbNatGroup;
29 class ZqbPlaceholder;
30 
31 
40 {
41 public:
42 
44  enum ImageFormat {
45  CGM = 0,
46  PNG,
47  JPEG,
48  PostScript
49  };
50 
54  ZqDlgPrint (QWidget* parent, QzqArea* area,
55  ZqbPlaceholder* pPlace,
56  ZqbNatGroup* pNatX, ZqbNatGroup* pNatY);
57 
59  virtual ~ZqDlgPrint ();
60 
61 
67  int showSettings (float& width, float& height,
68  float margins[4], int& resolution,
69  int& pageSize);
70 
73  int showFileSelection (std::string& filepath);
74 
81  int drawToFile (ImageFormat eImgFmt,
82  const std::string filepath, int resolution,
83  float width, float height, float margins[4],
84  int pageSize);
85 
87  static void doIt (QMainWindow* parent, QzqArea* area,
88  ZqbPlaceholder* pPlace,
89  ZqbNatGroup* pNatX, ZqbNatGroup* pNatY,
90  const char* szDefaultFilename = NULL,
91  const char* szDefaultDirectory = NULL);
92 
93 protected:
94 
96  PrOptions *m_pDlgPrOpt;
97 
99  QWidget *m_qParent;
100 
101 };
102 
103 
104 #endif /* zqdlg_print.hpp */
ImageFormat
Definition: zqdlg_print.hpp:44
int drawToFile(ImageFormat eImgFmt, const std::string filepath, int resolution, float width, float height, float margins[4], int pageSize)
QWidget * m_qParent
Definition: zqdlg_print.hpp:99
ZqDlgPrint(QWidget *parent, QzqArea *area, ZqbPlaceholder *pPlace, ZqbNatGroup *pNatX, ZqbNatGroup *pNatY)
Definition: zqb_natgroup.hpp:35
Definition: zqb_placeholder.hpp:25
virtual ~ZqDlgPrint()
PrOptions * m_pDlgPrOpt
Definition: zqdlg_print.hpp:96
Definition: qzq_area.hpp:39
int showFileSelection(std::string &filepath)
static void doIt(QMainWindow *parent, QzqArea *area, ZqbPlaceholder *pPlace, ZqbNatGroup *pNatX, ZqbNatGroup *pNatY, const char *szDefaultFilename=NULL, const char *szDefaultDirectory=NULL)
int showSettings(float &width, float &height, float margins[4], int &resolution, int &pageSize)
Definition: zqdlg_print.hpp:39