~tiagosh/unity-2d/fix-dash-cursor

« back to all changes in this revision

Viewing changes to libunity-2d-private/src/abstractdbusservicemonitor.h

  • Committer: Tarmac
  • Author(s): Albert Astals, Ugo Riboni, Michał Sawicz, Florian Boucault, LDS
  • Date: 2012-02-10 17:32:14 UTC
  • mfrom: (771.3.235 unity-2d-shell_trunk)
  • Revision ID: tarmac-20120210173214-eekg5uiqdb7gjza6
Merge launcher and dash into a common new QML scene: the shell.
 - Created a shell folder that holds both launcher and dash QML code, the C++ code for the single binary and a common folder with shared QML files
 - The shell occupies the whole screen but is shaped for input where it is transparent in order not to interfere with the rest of the windows
 - The shell binary, unity-2d-shell, has a -rootqml option that lets the user specify the QML file to load
 - Implement visibility behaviours in QML instead of C++
 - Do not use D-Bus anymore to communicate between the launcher and the dash
 - Remove the homebutton panel plugin
 - Make the strut setting reusable outside of Unity2dPanel
 - Make LauncherDropItem a FocusScope
 - Implement gesture handling in QML instead of C++

Known issues:
 - In non composited mode there is a 1px wide rectangle on the edge of the screen where the launcher is hidden. This is acceptable for the moment since XFixes barriers to show the launcher are in the plan and will get rid of this problem
 - HomeShortcuts.qml has a transparent Rectangle to fix alignment in RTL mode that causes QML warnings. This is acceptable since the Home lens is going away. Fixes: . Approved by .

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2011 Canonical, Ltd.
 
3
 *
 
4
 * Authors:
 
5
 *  Ugo Riboni <ugo.riboni@canonical.com>
 
6
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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/>.
 
18
 */
 
19
 
 
20
#ifndef ABSTRACTDBUSSERVICEMONITOR_H
 
21
#define ABSTRACTDBUSSERVICEMONITOR_H
 
22
 
 
23
#include <QObject>
 
24
 
 
25
#include <QDBusInterface>
 
26
#include <QDBusServiceWatcher>
 
27
#include <QObject>
 
28
#include <QString>
 
29
 
 
30
class AbstractDBusServiceMonitor : public QObject
 
31
{
 
32
    Q_OBJECT
 
33
    Q_PROPERTY(bool serviceAvailable READ serviceAvailable NOTIFY serviceAvailableChanged)
 
34
 
 
35
public:
 
36
    explicit AbstractDBusServiceMonitor(QString service, QString path, QString interface,
 
37
                                        QObject *parent = 0);
 
38
    ~AbstractDBusServiceMonitor();
 
39
 
 
40
    QDBusInterface* dbusInterface() const;
 
41
 
 
42
    bool serviceAvailable() const;
 
43
 
 
44
Q_SIGNALS:
 
45
    void serviceAvailableChanged(bool available);
 
46
 
 
47
private Q_SLOTS:
 
48
    void createInterface();
 
49
    void destroyInterface();
 
50
 
 
51
protected:
 
52
    QString m_service;
 
53
    QString m_path;
 
54
    QString m_interface;
 
55
    QDBusServiceWatcher* m_watcher;
 
56
    QDBusInterface* m_dbusInterface;
 
57
};
 
58
 
 
59
#endif // ABSTRACTDBUSSERVICEMONITOR_H