~ubuntu-branches/ubuntu/wily/kscreen/wily

« back to all changes in this revision

Viewing changes to kded/device.h

  • Committer: Package Import Robot
  • Author(s): Harald Sitter
  • Date: 2015-01-27 14:53:31 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150127145331-m7xmdang3oci7jkj
Tags: 4:5.2.0-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
#include <QtCore/QObject>
23
23
 
24
24
class QDBusPendingCallWatcher;
 
25
class QDBusInterface;
25
26
class OrgFreedesktopDBusPropertiesInterface;
 
27
 
26
28
class Device : public QObject
27
29
{
28
 
    Q_OBJECT
29
 
    public:
30
 
        static Device* self();
31
 
        static void destroy();
32
 
 
33
 
        bool isReady();
34
 
        bool isLaptop();
35
 
        bool isLidClosed();
36
 
        bool isDocked();
37
 
 
38
 
    private Q_SLOTS:
39
 
        void init();
40
 
        void changed();
41
 
        void isLaptopFetched(QDBusPendingCallWatcher* watcher);
42
 
        void isLidClosedFetched(QDBusPendingCallWatcher* watcher);
43
 
 
44
 
    Q_SIGNALS:
45
 
        void ready();
46
 
        void lidIsClosedChanged(bool after, bool before);
47
 
 
48
 
    private:
49
 
        explicit Device(QObject* parent = 0);
50
 
        virtual ~Device();
51
 
 
52
 
        void setReady();
53
 
        void fetchIsLaptop();
54
 
        void fetchLidIsClosed();
55
 
        void fetchIsDocked();
56
 
 
57
 
        bool m_isReady;
58
 
        bool m_isLaptop;
59
 
        bool m_isLidClosed;
60
 
        bool m_isDocked;
61
 
 
62
 
        static Device* m_instance;
63
 
 
64
 
        OrgFreedesktopDBusPropertiesInterface* m_freedesktop;
 
30
Q_OBJECT
 
31
public:
 
32
    static Device* self();
 
33
    static void destroy();
 
34
 
 
35
    bool isReady();
 
36
    bool isLaptop();
 
37
    bool isLidClosed();
 
38
    bool isDocked();
 
39
 
 
40
private Q_SLOTS:
 
41
    void changed();
 
42
    void isLaptopFetched(QDBusPendingCallWatcher* watcher);
 
43
    void isLidClosedFetched(QDBusPendingCallWatcher* watcher);
 
44
 
 
45
Q_SIGNALS:
 
46
    void ready();
 
47
    void lidClosedChanged(bool closed);
 
48
    void resumingFromSuspend();
 
49
 
 
50
private:
 
51
    explicit Device(QObject* parent = 0);
 
52
    virtual ~Device();
 
53
 
 
54
    void setReady();
 
55
    void fetchIsLaptop();
 
56
    void fetchLidIsClosed();
 
57
    void fetchIsDocked();
 
58
 
 
59
    bool m_isReady;
 
60
    bool m_isLaptop;
 
61
    bool m_isLidClosed;
 
62
    bool m_isDocked;
 
63
 
 
64
    static Device* m_instance;
 
65
 
 
66
    OrgFreedesktopDBusPropertiesInterface *m_freedesktop;
 
67
    QDBusInterface *m_suspendSession;
65
68
};
66
69
 
67
 
#endif //KDED_DEVICE_H
 
 
b'\\ No newline at end of file'
 
70
#endif //KDED_DEVICE_H