MythTV  master
mythpainter_qt.h
Go to the documentation of this file.
1 #ifndef MYTHPAINTER_QT_H_
2 #define MYTHPAINTER_QT_H_
3 
4 #include <list>
5 
6 #include "mythpainter.h"
7 #include "mythimage.h"
8 
9 #include "compat.h"
10 
11 class QPainter;
12 
13 class MythQtPainter : public MythPainter
14 {
15  public:
18 
19  QString GetName(void) override // MythPainter
20  { return QString("Qt"); }
21  bool SupportsAnimation(void) override // MythPainter
22  { return false; }
23  bool SupportsAlpha(void) override // MythPainter
24  { return true; }
25  bool SupportsClipping(void) override // MythPainter
26  { return true; }
27 
28  void Begin(QPaintDevice *parent) override; // MythPainter
29  void End() override; // MythPainter
30 
31  void SetClipRect(const QRect &clipRect) override; // MythPainter
32 
33  void DrawImage(const QRect &r, MythImage *im, const QRect &src,
34  int alpha) override; // MythPainter
35 
36  protected:
37  MythImage* GetFormatImagePriv(void) override; // MythPainter
38  void DeleteFormatImagePriv(MythImage *im) override; // MythPainter
39 
40  void DeletePixmaps(void);
41 
42  QPainter *m_painter {nullptr};
43  QRegion m_clipRegion;
44 
45  std::list<QPixmap *> m_imageDeleteList;
47 };
48 
49 #endif
bool SupportsAlpha(void) override
QRegion m_clipRegion
QMutex m_imageDeleteLock
QPainter * m_painter
void End() override
std::list< QPixmap * > m_imageDeleteList
QString GetName(void) override
unsigned char r
Definition: ParseText.cpp:329
void Begin(QPaintDevice *parent) override
MythImage * GetFormatImagePriv(void) override
Creates a reference counted image, call DecrRef() to delete.
void SetClipRect(const QRect &clipRect) override
void DeletePixmaps(void)
void DrawImage(const QRect &r, MythImage *im, const QRect &src, int alpha) override
bool SupportsClipping(void) override
bool SupportsAnimation(void) override
void DeleteFormatImagePriv(MythImage *im) override