Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/virtual/virtual_output.cpp
- This file was copied from plugins/platforms/virtual/screens_virtual.h.
1 | /******************************************************************** | 1 | /******************************************************************** | ||
---|---|---|---|---|---|
2 | KWin - the KDE window manager | 2 | KWin - the KDE window manager | ||
3 | This file is part of the KDE project. | 3 | This file is part of the KDE project. | ||
4 | 4 | | |||
5 | Copyright (C) 2015 Martin Gräßlin <mgraesslin@kde.org> | 5 | Copyright (C) 2018 Roman Gilg <subdiff@gmail.com> | ||
6 | 6 | | |||
7 | This program is free software; you can redistribute it and/or modify | 7 | This program is free software; you can redistribute it and/or modify | ||
8 | it under the terms of the GNU General Public License as published by | 8 | it under the terms of the GNU General Public License as published by | ||
9 | the Free Software Foundation; either version 2 of the License, or | 9 | the Free Software Foundation; either version 2 of the License, or | ||
10 | (at your option) any later version. | 10 | (at your option) any later version. | ||
11 | 11 | | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, | ||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. | ||
16 | 16 | | |||
17 | You should have received a copy of the GNU General Public License | 17 | You should have received a copy of the GNU General Public License | ||
18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
19 | *********************************************************************/ | 19 | *********************************************************************/ | ||
20 | #ifndef KWIN_SCREENS_VIRTUAL_H | 20 | #include "virtual_output.h" | ||
21 | #define KWIN_SCREENS_VIRTUAL_H | | |||
22 | #include "screens.h" | | |||
23 | #include <QVector> | | |||
24 | 21 | | |||
25 | namespace KWin | 22 | namespace KWin | ||
26 | { | 23 | { | ||
27 | class VirtualBackend; | | |||
28 | 24 | | |||
29 | class VirtualScreens : public Screens | 25 | VirtualOutput::VirtualOutput(QObject *parent) | ||
26 | : QObject(parent) | ||||
30 | { | 27 | { | ||
31 | Q_OBJECT | 28 | } | ||
32 | public: | | |||
33 | VirtualScreens(VirtualBackend *backend, QObject *parent = nullptr); | | |||
34 | virtual ~VirtualScreens(); | | |||
35 | void init() override; | | |||
36 | QRect geometry(int screen) const override; | | |||
37 | int number(const QPoint &pos) const override; | | |||
38 | QSize size(int screen) const override; | | |||
39 | void updateCount() override; | | |||
40 | | ||||
41 | private: | | |||
42 | void createOutputs(); | | |||
43 | VirtualBackend *m_backend; | | |||
44 | QVector<QRect> m_geometries; | | |||
45 | }; | | |||
46 | 29 | | |||
30 | VirtualOutput::VirtualOutput(const VirtualOutput &o) | ||||
31 | : m_geo(o.m_geo), | ||||
32 | m_outputScale(o.m_outputScale), | ||||
33 | m_gammaSize(o.m_gammaSize), | ||||
34 | m_gammaResult(o.m_gammaResult) | ||||
35 | { | ||||
47 | } | 36 | } | ||
48 | 37 | | |||
49 | #endif | 38 | VirtualOutput::~VirtualOutput() | ||
39 | { | ||||
40 | } | ||||
50 | 41 | | |||
42 | } |