MythTV  master
mythpaintergpu.cpp
Go to the documentation of this file.
1 // MythTV
2 #include "config.h"
3 #include "mythlogging.h"
4 #include "mythdisplay.h"
5 #include "mythmainwindow.h"
6 #include "mythpaintergpu.h"
7 
9  : m_parent(Parent)
10 {
11 #ifdef Q_OS_MACOS
12  MythDisplay* display = m_parent->GetDisplay();
13  CurrentDPIChanged(m_parent->devicePixelRatioF());
15 #endif
16 }
17 
18 void MythPainterGPU::SetViewControl(ViewControls Control)
19 {
20  m_viewControl = Control;
21 }
22 
24 {
25  m_pixelRatio = DPI;
26  m_usingHighDPI = !qFuzzyCompare(m_pixelRatio, 1.0);
27  LOG(VB_GENERAL, LOG_INFO, QString("High DPI scaling %1").arg(m_usingHighDPI ? "enabled" : "disabled"));
28 }
MythPainterGPU::m_parent
MythMainWindow * m_parent
Definition: mythpaintergpu.h:33
MythPainterGPU::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)
Definition: mythpaintergpu.cpp:23
mythpaintergpu.h
arg
arg(title).arg(filename).arg(doDelete))
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:23
MythPainterGPU::m_viewControl
ViewControls m_viewControl
Definition: mythpaintergpu.h:34
MythPainterGPU::m_usingHighDPI
bool m_usingHighDPI
Definition: mythpaintergpu.h:36
MythMainWindow::GetDisplay
MythDisplay * GetDisplay()
Definition: mythmainwindow.cpp:252
MythPainterGPU::m_pixelRatio
qreal m_pixelRatio
Definition: mythpaintergpu.h:35
mythdisplay.h
mythlogging.h
MythDisplay
Definition: mythdisplay.h:22
MythPainterGPU::SetViewControl
void SetViewControl(ViewControls Control)
Definition: mythpaintergpu.cpp:18
MythPainterGPU::MythPainterGPU
MythPainterGPU(MythMainWindow *Parent)
Definition: mythpaintergpu.cpp:8
mythmainwindow.h
MythMainWindow
Definition: mythmainwindow.h:35
MythDisplay::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)