MythTV  master
mythpaintergpu.h
Go to the documentation of this file.
1 #ifndef MYTHPAINTERGPU_H
2 #define MYTHPAINTERGPU_H
3 
4 // MythTV
5 #include "mythuiexp.h"
6 #include "mythpainter.h"
7 
8 class MythMainWindow;
9 class MythDisplay;
10 
12 {
13  Q_OBJECT
14 
15  public:
16  enum ViewControl : std::uint8_t
17  {
18  None = 0x00,
19  Viewport = 0x01,
20  Framebuffer = 0x02
21  };
22  Q_DECLARE_FLAGS(ViewControls, ViewControl)
23 
24  explicit MythPainterGPU(MythMainWindow* Parent);
25  ~MythPainterGPU() override = default;
26 
27  void SetViewControl (ViewControls Control);
28 
29  public slots:
30  void CurrentDPIChanged (qreal DPI);
31 
32  protected:
33  MythMainWindow* m_parent { nullptr };
34  ViewControls m_viewControl { Viewport | Framebuffer };
35  qreal m_pixelRatio { 1.0 };
36  bool m_usingHighDPI { false };
37  QSize m_lastSize;
38 };
39 
40 Q_DECLARE_OPERATORS_FOR_FLAGS(MythPainterGPU::ViewControls)
41 
42 #endif
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
AutoExtendType::None
@ None
MythPainterGPU::ViewControl
ViewControl
Definition: mythpaintergpu.h:16
mythpainter.h
MythDisplay
Definition: mythdisplay.h:22
MythPainter
Definition: mythpainter.h:34
MythPainterGPU::m_lastSize
QSize m_lastSize
Definition: mythpaintergpu.h:37
mythuiexp.h
MythMainWindow
Definition: mythmainwindow.h:28
MythPainterGPU
Definition: mythpaintergpu.h:11