LibreOffice Module vcl (master) 1
qt5/QtGraphicsBase.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#pragma once
11
12#include <QtWidgets/QApplication>
13
15{
16 qreal m_fDPR;
17
18public:
20 : m_fDPR(qApp ? qApp->devicePixelRatio() : 1.0)
21 {
22 }
23
24 void setDevicePixelRatioF(qreal fDPR) { m_fDPR = fDPR; }
25
26 qreal devicePixelRatioF() const { return m_fDPR; }
27};
28
29/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void setDevicePixelRatioF(qreal fDPR)
qreal devicePixelRatioF() const