MythTV
master
mythtv
libs
libmythui
mythpaintergpu.cpp
Go to the documentation of this file.
1
#include <QtGlobal>
2
3
// MythTV
4
#include "
libmythbase/mythlogging.h
"
5
#include "
mythdisplay.h
"
6
#include "
mythmainwindow.h
"
7
#include "
mythpaintergpu.h
"
8
9
MythPainterGPU::MythPainterGPU
(
MythMainWindow
* Parent)
10
: m_parent(Parent)
11
{
12
MythDisplay
* display =
m_parent
->
GetDisplay
();
13
CurrentDPIChanged
(
m_parent
->devicePixelRatioF());
14
connect(display, &
MythDisplay::CurrentDPIChanged
,
this
,
15
&
MythPainterGPU::CurrentDPIChanged
);
16
}
17
18
void
MythPainterGPU::SetViewControl
(ViewControls Control)
19
{
20
m_viewControl
= Control;
21
}
22
23
void
MythPainterGPU::CurrentDPIChanged
(qreal DPI)
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
}
MythDisplay
Definition:
mythdisplay.h:23
MythDisplay::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)
MythMainWindow
Definition:
mythmainwindow.h:29
MythMainWindow::GetDisplay
MythDisplay * GetDisplay()
Definition:
mythmainwindow.cpp:252
MythPainterGPU::SetViewControl
void SetViewControl(ViewControls Control)
Definition:
mythpaintergpu.cpp:18
MythPainterGPU::MythPainterGPU
MythPainterGPU(MythMainWindow *Parent)
Definition:
mythpaintergpu.cpp:9
MythPainterGPU::m_usingHighDPI
bool m_usingHighDPI
Definition:
mythpaintergpu.h:36
MythPainterGPU::m_parent
MythMainWindow * m_parent
Definition:
mythpaintergpu.h:33
MythPainterGPU::m_viewControl
ViewControls m_viewControl
Definition:
mythpaintergpu.h:34
MythPainterGPU::m_pixelRatio
qreal m_pixelRatio
Definition:
mythpaintergpu.h:35
MythPainterGPU::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)
Definition:
mythpaintergpu.cpp:23
mythdisplay.h
mythlogging.h
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition:
mythlogging.h:39
mythmainwindow.h
mythpaintergpu.h
Generated on Mon Dec 15 2025 03:16:24 for MythTV by
1.9.4