~agateau/unity-2d/wait-for-end-session

« back to all changes in this revision

Viewing changes to panel/applets/homebutton/homebuttonapplet.cpp

  • Committer: Aurelien Gateau
  • Date: 2011-03-23 14:33:29 UTC
  • mfrom: (466.1.11 unity-2d)
  • Revision ID: aurelien.gateau@canonical.com-20110323143329-xs2p2v5q6y1cyqid
Merged wait-for-session-again from Bill

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
// Local
26
26
#include <debug_p.h>
27
27
 
 
28
// libunity-2d
 
29
#include <launcherclient.h>
 
30
 
28
31
// Qt
29
32
#include <QHBoxLayout>
30
33
#include <QDBusInterface>
35
38
static const char* DBUS_PATH = "/Dash";
36
39
static const char* DBUS_IFACE = "com.canonical.Unity2d.Dash";
37
40
 
38
 
HomeButtonApplet::HomeButtonApplet() : m_button(new QToolButton), m_dashInterface(NULL)
 
41
HomeButtonApplet::HomeButtonApplet()
 
42
: m_button(new QToolButton)
 
43
, m_dashInterface(NULL)
 
44
, m_launcherClient(new LauncherClient(this))
39
45
{
40
46
    m_button->setAutoRaise(true);
41
47
    QIcon::setThemeName("unity-icon-theme");
107
113
    }
108
114
}
109
115
 
 
116
void HomeButtonApplet::enterEvent(QEvent* event)
 
117
{
 
118
    Unity2d::Applet::enterEvent(event);
 
119
    m_launcherClient->beginForceVisible();
 
120
}
 
121
 
 
122
void HomeButtonApplet::leaveEvent(QEvent* event)
 
123
{
 
124
    Unity2d::Applet::leaveEvent(event);
 
125
    m_launcherClient->endForceVisible();
 
126
}
 
127
 
110
128
#include "homebuttonapplet.moc"