~ubuntu-branches/ubuntu/maverick/knemo/maverick

« back to all changes in this revision

Viewing changes to src/knemod/interfacetray.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-01-06 17:16:51 UTC
  • mfrom: (1.1.9 upstream) (2.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100106171651-ff58ryfnav4l1zbm
Tags: 0.6.0-1
* New upstream release 
  - Fixes "FTBFS: sysbackend.cpp:362: error: 'KILO' was not declared in
  this scope" (Closes: #560496)
  - Fixes "context menu does not appear" (Closes: #504791)
* Add Build-Depends: libnl-dev - Linux netlink sockets library

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
#ifndef INTERFACETRAY_H
21
21
#define INTERFACETRAY_H
22
22
 
23
 
#include <KSystemTrayIcon>
 
23
#include "config-knemo.h"
 
24
 
 
25
#include <kdeversion.h>
 
26
 
 
27
#ifdef USE_KNOTIFICATIONITEM
 
28
  #if KDE_VERSION >= KDE_MAKE_VERSION(4, 3, 73)
 
29
    #define PARENT_ICON_CLASS KStatusNotifierItem
 
30
    #include <kstatusnotifieritem.h>
 
31
  #else
 
32
    #define PARENT_ICON_CLASS KNotificationItem
 
33
    #if KDE_VERSION >= KDE_MAKE_VERSION(4, 3, 66)
 
34
        #include <knotificationitem.h>
 
35
    #else
 
36
        #include <knotificationitem-1/knotificationitem.h>
 
37
        using namespace Experimental;
 
38
    #endif
 
39
  #endif
 
40
#else
 
41
  #define PARENT_ICON_CLASS KSystemTrayIcon
 
42
  #include <KSystemTrayIcon>
 
43
#endif
24
44
 
25
45
#include "interface.h"
26
46
 
27
 
class InterfaceTray : public KSystemTrayIcon
 
47
class InterfaceTray : public PARENT_ICON_CLASS
28
48
{
29
49
    Q_OBJECT
30
50
public:
31
51
    /**
32
52
     * Default Constructor
33
53
     */
34
 
    InterfaceTray( Interface* interface, const QString& icon, QWidget* parent = 0 );
 
54
    InterfaceTray( Interface* interface, const QString &id, QWidget* parent = 0 );
35
55
 
36
56
    /**
37
57
     * Default Destructor
40
60
 
41
61
    void updateToolTip();
42
62
 
 
63
#ifdef USE_KNOTIFICATIONITEM
 
64
public Q_SLOTS:
 
65
    void activate(const QPoint &pos);
 
66
#else
43
67
protected:
44
68
    bool event( QEvent * );
 
69
#endif
45
70
 
46
71
private:
47
72
    Interface* mInterface;
48
 
    QMap<quint32, QString> mToolTips;
 
73
    QMap<int, QString> mScope;
49
74
 
50
75
    QString toolTipData();
51
 
    void setupToolTipArray();
 
76
    void setupMappings();
 
77
 
 
78
private Q_SLOTS:
 
79
#ifdef USE_KNOTIFICATIONITEM
 
80
    void togglePlotter();
 
81
#else
 
82
    void iconActivated( QSystemTrayIcon::ActivationReason );
 
83
#endif
 
84
    void slotQuit();
52
85
};
53
86
 
54
87
#endif // INTERFACETRAY_H