MythTV master
mythpaintergpu.cpp
Go to the documentation of this file.
1#include <QtGlobal>
2
3// MythTV
5#include "mythdisplay.h"
6#include "mythmainwindow.h"
7#include "mythpaintergpu.h"
8
10 : m_parent(Parent)
11{
12 MythDisplay* display = m_parent->GetDisplay();
13 CurrentDPIChanged(m_parent->devicePixelRatioF());
14 connect(display, &MythDisplay::CurrentDPIChanged, this,
16}
17
18void 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,
28 QString("High DPI scaling %1")
29 .arg(m_usingHighDPI ? "enabled" : "disabled"));
30}
void CurrentDPIChanged(qreal DPI)
MythDisplay * GetDisplay()
void SetViewControl(ViewControls Control)
MythPainterGPU(MythMainWindow *Parent)
MythMainWindow * m_parent
ViewControls m_viewControl
void CurrentDPIChanged(qreal DPI)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39