AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
EPrinterTemplate.h
Go to the documentation of this file.
1 #ifndef EPRINTERTEMPLATE_H
2 #define EPRINTERTEMPLATE_H
3 
4 #include <string>
5 #include "core/common/EDataCol.h"
6 #include "core/xml/EXMLConfig.h"
7 #include "appcore/printertemplate/EMPrinterTemplate.h"
8 
9 namespace EM
10 {
11  namespace Common
12  {
13  class EDataCol;
14  }
15 
16  namespace PrinterTemplate
17  {
18  class EDrawObject;
19  class EHeader;
20 
25  class EMPRINTERTEMPLATE_API EPrinterTemplate
26  {
27  public:
28  EPrinterTemplate( const std::string &filePath, const std::string &name );
29  EPrinterTemplate( EXMLConfig *xmlConfig, std::string name );
30  ~EPrinterTemplate();
31 
32  void ReadTemplate( EXMLConfig *xmlConfig );
33  void Read();
34  void Read( EXMLConfig* xmlConfig );
35  void Create( float defWidth );
36  long Save( EXMLConfig& xmlConfig );
37  void ReadTemplateHead( EXMLConfig *xmlConfig );
38  std::string GetName();
39  Common::EDataCol* GetDataCol();
40  void ClearDrawObject();
41  void RemoveDrawObject( std::string name );
42  void Print( float moveY );
43  float GetWidth();
44  float GetHeight();
45  float Prepare();
46 
47  long Add( EDrawObject *drawObject );
48  EHeader* GetHeader();
49 
50  unsigned char GetVersion();
51  void SetVersion( unsigned char version );
52 
53  float GetPageWidth();
54  void SetPageWidth( float pageWidth );
55  float GetPageHeight();
56  void SetPageHeight( float pageHeight );
57  float GetMarginBottom();
58  void SetMarginBottom( float bottomMargin );
59  float GetMarginTop();
60  void SetMarginTop( float topMargin );
61  float GetMarginLeft();
62  void SetMarginLeft( float leftMargin );
63  float GetMarginRight();
64  void SetMarginRight( float rightMargin );
65  std::string GetBackgroundImage();
66  void SetBackgroundImage(std::string fileName );
67  std::string GetFontName();
68  void SetFontName(const std::string &fontName );
69  short GetFontSize();
70  void SetFontSize( short fontSize );
71  bool IsFontBold();
72  void SetFontBold( bool fontBold );
73  bool IsFontItalic();
74  void SetFontItalic( bool fontItalic );
75  bool IsFontUnderline();
76  void SetFontUnderline( bool fontUnderline );
77  void SetSupressingEnabled( bool enabled );
78 
79  private:
80  class DataClass;
81  DataClass * d;
82  };
83  }
84 }
85 
86 #endif
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
#define EMPRINTERTEMPLATE_API
Definition: EMPrinterTemplate.h:9
__ECLASS DataClass
Definition: EEventUpdateCustomerData.h:35
SYSTEM INCLUDES.
Definition: CardFacadeManagerXML.h:6