add more spacing
[personal-kdebase.git] / workspace / libs / kephal / screens / simplescreen.cpp
blob4f3988ac69a9b5237222603a8be474b964d756c0
1 /*
2 * Copyright 2008 Aike J Sommer <dev@aikesommer.name>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as
6 * published by the Free Software Foundation; either version 2,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details
14 * You should have received a copy of the GNU Library General Public
15 * License along with this program; if not, write to the
16 * Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "simplescreen.h"
24 namespace Kephal {
26 SimpleScreen::SimpleScreen(QObject * parent, int id, const QSize & size, const QPoint & position, bool privacy)
27 : Screen(parent)
29 m_id = id;
30 m_size = size;
31 m_position = position;
32 m_privacy = privacy;
35 SimpleScreen::SimpleScreen(QObject * parent)
36 : Screen(parent),
37 m_id(-1),
38 m_size(0, 0),
39 m_position(0, 0),
40 m_privacy(false)
45 int SimpleScreen::id()
47 return m_id;
50 QSize SimpleScreen::size() {
51 return m_size;
54 QPoint SimpleScreen::position() {
55 return m_position;
58 bool SimpleScreen::isPrivacyMode()
60 return m_privacy;
63 void SimpleScreen::setPrivacyMode(bool privacy)
65 emit privacyModeChangeRequested(this, privacy);
68 void SimpleScreen::_setId(int id) {
69 m_id = id;
72 void SimpleScreen::_setSize(const QSize & size) {
73 m_size = size;
76 void SimpleScreen::_setPosition(const QPoint & position)
78 m_position = position;
81 void SimpleScreen::_setGeom(const QRect & geom)
83 _setPosition(geom.topLeft());
84 _setSize(geom.size());
87 QList<Output *> SimpleScreen::outputs() {
88 return m_outputs;
91 QList<Output *> & SimpleScreen::_outputs() {
92 return m_outputs;
97 #ifndef NO_KDE
98 #include "simplescreen.moc"
99 #endif