MagicSmoke  $VERSION$
ticketrender.h
Go to the documentation of this file.
1 //
2 // C++ Interface: odtrender
3 //
4 // Description:
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2008-2011
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_TICKETRENDER_H
14 #define MAGICSMOKE_TICKETRENDER_H
15 
16 #include <QString>
17 #include <QPointF>
18 #include <QSizeF>
19 
20 #include "templates.h"
21 
23 class MOTicket;
24 class MOVoucher;
25 class QPaintDevice;
26 class QPainter;
27 
28 #include "commonexport.h"
29 
32 {
33  public:
35  MLabel();
37  virtual ~MLabel();
38 
40  virtual QString getVariable(QString)const=0;
41 };
42 
45 {
46  public:
50  virtual ~MLabelRenderer();
51 
53  virtual bool render(const MLabel&label,QPaintDevice&pdev,QPainter*painter=0,QPointF offset=QPointF(),bool usePixmap=false);
54 
56  virtual QSizeF labelSize(const QPaintDevice&);
57 
59  virtual QSizeF labelSizeMM();
60 
61  protected:
62  friend class MLabelRendererPrivate;
63 
64  private:
66 };
67 
70 {
71  public:
73  bool render(const MOVoucher&label,QPaintDevice&pdev,QPainter*painter=0,QPointF offset=QPointF(),bool usePixmap=false);
74 };
75 
78 {
79  public:
81  bool render(const MOTicket&label,QPaintDevice&pdev,QPainter*painter=0,QPointF offset=QPointF(),bool usePixmap=false);
82 };
83 
84 
85 #endif
#define MAGICSMOKE_COMMON_EXPORT
Definition: commonexport.h:7
Definition: ticketrender.cpp:38
this class wraps a single template
Definition: templates.h:25
base class for all label rendering classes
Definition: ticketrender.h:44
Definition: voucher.h:24
Definition: ticket.h:25
base class that describes labels
Definition: ticketrender.h:31
convenience class: renders vouchers directly
Definition: ticketrender.h:77
convenience class: renders vouchers directly
Definition: ticketrender.h:69
virtual bool render(const MLabel &label, QPaintDevice &pdev, QPainter *painter=0, QPointF offset=QPointF(), bool usePixmap=false)
renders the ticket; returns whether the rendering was successful
Definition: ticketrender.cpp:224