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
#ifdef Q_OS_MACOS
13
MythDisplay
* display =
m_parent
->
GetDisplay
();
14
CurrentDPIChanged
(
m_parent
->devicePixelRatioF());
15
connect(display, &
MythDisplay::CurrentDPIChanged
,
this
, &
MythPainterGPU::CurrentDPIChanged
);
16
#endif
17
}
18
19
void
MythPainterGPU::SetViewControl
(ViewControls Control)
20
{
21
m_viewControl
= Control;
22
}
23
24
void
MythPainterGPU::CurrentDPIChanged
(qreal DPI)
25
{
26
m_pixelRatio
= DPI;
27
m_usingHighDPI
= !qFuzzyCompare(
m_pixelRatio
, 1.0);
28
LOG
(VB_GENERAL, LOG_INFO, QString(
"High DPI scaling %1"
).arg(
m_usingHighDPI
?
"enabled"
:
"disabled"
));
29
}
MythPainterGPU::m_parent
MythMainWindow * m_parent
Definition:
mythpaintergpu.h:33
MythPainterGPU::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)
Definition:
mythpaintergpu.cpp:24
mythpaintergpu.h
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition:
mythlogging.h:39
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:19
MythPainterGPU::MythPainterGPU
MythPainterGPU(MythMainWindow *Parent)
Definition:
mythpaintergpu.cpp:9
mythmainwindow.h
MythMainWindow
Definition:
mythmainwindow.h:28
MythDisplay::CurrentDPIChanged
void CurrentDPIChanged(qreal DPI)
Generated on Mon Nov 25 2024 03:16:14 for MythTV by
1.8.17