AppCore
Loading...
Searching...
No Matches
EPrinterGraf.h
Go to the documentation of this file.
1#ifndef EPRINTERGRAF_H
2#define EPRINTERGRAF_H
3
4#include <string>
5#include <qnamespace.h>
6
7#include "core/common/eplatform.h"
8#include "appcore/printertemplate/EPrinter.h"
9
10#define UNINICIALIZED_EGRAF_METHODS 1
11
12class QFont;
13class QApplication;
14class QPixmap;
15class QImage;
16
17namespace EM
18{
19 namespace Printer
20 {
21
22 class EPrinterGraf: public EPrinter
23 {
24 public:
26 virtual ~EPrinterGraf();
27
28 virtual long SetFont( std::string name, long size, bool bold, bool italic );
29 virtual long SetFont( std::string fontName, long size, bool bold, bool italic, bool underline );
30 virtual long DrawText( float x, float y, long width, long height, std::string text, Alignement align, short rotation = 0 );
31 virtual long CalculateMetrics();
32
33 virtual long SetMetrics( Metrics metric );
34 virtual long SetFontEncoding( FontEncoding encode );
35 virtual long SetCurrentPos( float x, float y );
36 virtual long GetPositionX();
37 virtual long GetPositionY();
38
39 virtual long DrawEllipse( float , float , float , float );
40 virtual long DrawBox( float x1, float y1, float x2, float y2 );
41 virtual long DrawLine( float x1, float y1, float x2, float y2 );
42 virtual long DrawPicture( float x, float y, std::string fileName );
43 virtual long DrawPicture( float x, float y, std::string fileName, long width, long height );
44
45 virtual long DrawQRCode( long x, long y, long width, long height, std::string data );
46
47 virtual long GetHeight();
48 virtual long GetWidth();
49 virtual long GetTextHeight();
50 virtual float GetTextHeightMM();
51 virtual long GetTextWidth( std::string text );
52 virtual int GetHeightMM();
53 virtual int GetWidthMM();
54
55 long SetSize( float width, float height );
56 long SetFont( QFont paFont );
57 long SetPointerToApp(QApplication*);
58 long SetPen( uint width, Qt::PenStyle style=Qt::SolidLine );
59 long SetImage( int width, int height );
60
61#ifdef EMTEST_XSCALE
62 QPixmap *GetImage();
63#else
64 QImage *GetCanvas();
65#endif
66 virtual long StartPrint();
67 virtual long EndPrint();
68 virtual unsigned char* GetDataForPrinter( unsigned long& length, unsigned long& width, unsigned long& height );
69 void SetPredTlac( long predtlac );
70
71 private:
72 class DataClass;
73 DataClass *d;
74 };
75 }
76}
77
78#endif
Alignement
Definition EImageIface.h:8
Definition EImageIface.cpp:8
Metrics
Definition EImageIface.h:37
FontEncoding
Definition EImageIface.h:38
virtual long SetFont(std::string name, long size, bool bold, bool italic)
long SetPointerToApp(QApplication *)
virtual long DrawText(float x, float y, long width, long height, std::string text, Alignement align, short rotation=0)
virtual long DrawQRCode(long x, long y, long width, long height, std::string data)
DrawQRCode.
virtual long DrawPicture(float x, float y, std::string fileName)
virtual long SetFontEncoding(FontEncoding encode)
virtual long DrawLine(float x1, float y1, float x2, float y2)
virtual long SetFont(std::string fontName, long size, bool bold, bool italic, bool underline)
virtual long DrawEllipse(float, float, float, float)
long SetImage(int width, int height)
virtual long SetCurrentPos(float x, float y)
virtual float GetTextHeightMM()
virtual long GetTextHeight()
virtual long DrawBox(float x1, float y1, float x2, float y2)
long SetSize(float width, float height)
virtual long GetHeight()
virtual long StartPrint()
virtual long SetMetrics(Metrics metric)
virtual unsigned char * GetDataForPrinter(unsigned long &length, unsigned long &width, unsigned long &height)
virtual long GetPositionX()
virtual long CalculateMetrics()
virtual long GetTextWidth(std::string text)
void SetPredTlac(long predtlac)
long SetFont(QFont paFont)
long SetPen(uint width, Qt::PenStyle style=Qt::SolidLine)
virtual long DrawPicture(float x, float y, std::string fileName, long width, long height)
virtual long GetPositionY()
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7