2
* Copyright (C) 2011 Canonical, Ltd.
5
* Michał Sawicz <michal.sawicz@canonical.com>
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
9
* the Free Software Foundation; version 3.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
21
#include "hudadaptor.h"
24
#include <shellmanager.h>
27
#include <QtDBus/QDBusConnection>
28
#include <QGraphicsObject>
30
HUDDBus::HUDDBus(ShellManager* manager, QObject* parent)
34
connect(m_manager, SIGNAL(hudActiveChanged()), SLOT(onHudActiveChanged()));
35
connect(m_manager, SIGNAL(hudScreenChanged(int)), SIGNAL(screenChanged(int)));
41
HUDDBus::active() const
43
return m_manager->hudActive();
47
HUDDBus::onHudActiveChanged()
49
Q_EMIT activeChanged(active());
53
HUDDBus::setActive(bool hudActive)
55
if (hudActive != active()) {
56
m_manager->setHudActive(hudActive);
57
Q_EMIT activeChanged(hudActive);
62
HUDDBus::screen() const
64
return m_manager->hudScreen();