KDDockWidgets API Documentation 2.0
Loading...
Searching...
No Matches
qtcommon/Screen.cpp
Go to the documentation of this file.
1/*
2 This file is part of KDDockWidgets.
3
4 SPDX-FileCopyrightText: 2019 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
5 Author: Waqar Ahmed <waqar.ahmed@kdab.com>
6
7 SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
8
9 Contact KDAB at <info@kdab.com> for commercial licensing options.
10*/
11#include "Screen_p.h"
12
13#include <QScreen>
14
15using namespace KDDockWidgets;
16
17Screen_qt::Screen_qt(QScreen *screen)
18 : m_screen(screen)
19{
20}
21
22QString Screen_qt::name() const
23{
24 return m_screen->name();
25}
26
27QSize Screen_qt::size() const
28{
29 return m_screen->size();
30}
31
32QRect Screen_qt::geometry() const
33{
34 return m_screen->geometry();
35}
36
37qreal Screen_qt::devicePixelRatio() const
38{
39 return m_screen->devicePixelRatio();
40}
41
42QSize Screen_qt::availableSize() const
43{
44 return m_screen->availableSize();
45}
46
47QRect Screen_qt::availableGeometry() const
48{
49 return m_screen->availableGeometry();
50}
51
52QSize Screen_qt::virtualSize() const
53{
54 return m_screen->virtualSize();
55}
56
57QRect Screen_qt::virtualGeometry() const
58{
59 return m_screen->virtualGeometry();
60}
61
62QScreen *Screen_qt::qtScreen() const
63{
64 return m_screen;
65}
66
67bool Screen_qt::equals(std::shared_ptr<Screen> other) const
68{
69 auto otherQt = static_cast<Screen_qt *>(other.get());
70 return otherQt && otherQt->m_screen == m_screen;
71}
Class to abstract QAction, so code still works with QtQuick and Flutter.

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDDockWidgets
Advanced Dock Widget Framework for Qt
https://www.kdab.com/development-resources/qt-tools/kddockwidgets/
Generated by doxygen 1.9.8