2 * Copyright (C) 2017 Canonical, Ltd.
4 * This program is free software: you can redistribute it and/or modify it under
5 * the terms of the GNU Lesser General Public License version 3, as published by
6 * the Free Software Foundation.
8 * This program is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranties of MERCHANTABILITY,
10 * SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Lesser General Public License for more details.
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18#include "WorkspaceModel.h"
19#include "WorkspaceManager.h"
22Screen::Screen(qtmir::Screen* screen)
24 , m_workspaces(new WorkspaceModel)
26 connect(m_wrapped, &qtmir::Screen::usedChanged, this, &Screen::usedChanged);
27 connect(m_wrapped, &qtmir::Screen::nameChanged, this, &Screen::nameChanged);
28 connect(m_wrapped, &qtmir::Screen::outputTypeChanged, this, &Screen::outputTypeChanged);
29 connect(m_wrapped, &qtmir::Screen::scaleChanged, this, &Screen::scaleChanged);
30 connect(m_wrapped, &qtmir::Screen::formFactorChanged, this, &Screen::formFactorChanged);
31 connect(m_wrapped, &qtmir::Screen::physicalSizeChanged, this, &Screen::physicalSizeChanged);
32 connect(m_wrapped, &qtmir::Screen::positionChanged, this, &Screen::positionChanged);
33 connect(m_wrapped, &qtmir::Screen::activeChanged, this, &Screen::activeChanged);
34 connect(m_wrapped, &qtmir::Screen::currentModeIndexChanged, this, &Screen::currentModeIndexChanged);
35 connect(m_wrapped, &qtmir::Screen::availableModesChanged, this, &Screen::availableModesChanged);
37 WorkspaceManager::instance()->createWorkspace()->assign(m_workspaces.data());
38 WorkspaceManager::instance()->createWorkspace()->assign(m_workspaces.data());
41qtmir::OutputId Screen::outputId() const
43 return m_wrapped->outputId();
46bool Screen::used() const
48 return m_wrapped->used();
51QString Screen::name() const
53 return m_wrapped->name();
56float Screen::scale() const
58 return m_wrapped->scale();
61QSizeF Screen::physicalSize() const
63 return m_wrapped->physicalSize();
66qtmir::FormFactor Screen::formFactor() const
68 return m_wrapped->formFactor();
71qtmir::OutputTypes Screen::outputType() const
73 return m_wrapped->outputType();
76MirPowerMode Screen::powerMode() const
78 return m_wrapped->powerMode();
81Qt::ScreenOrientation Screen::orientation() const
83 return m_wrapped->orientation();
86QPoint Screen::position() const
88 return m_wrapped->position();
91QQmlListProperty<qtmir::ScreenMode> Screen::availableModes()
93 return m_wrapped->availableModes();
96uint Screen::currentModeIndex() const
98 return m_wrapped->currentModeIndex();
101bool Screen::isActive() const
103 return m_wrapped->isActive();
106qtmir::ScreenConfiguration *Screen::beginConfiguration() const
108 return m_wrapped->beginConfiguration();
111bool Screen::applyConfiguration(qtmir::ScreenConfiguration *configuration)
113 return m_wrapped->applyConfiguration(configuration);
116void Screen::setActive(bool active)
118 m_wrapped->setActive(active);
121QScreen *Screen::qscreen() const
123 return m_wrapped->qscreen();
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list