27
27
class LauncherClient;
31
33
class ShellDeclarativeView : public Unity2DDeclarativeView, public AbstractX11EventFilter
36
Q_PROPERTY(bool dashActive READ dashActive WRITE setDashActive NOTIFY dashActiveChanged)
37
Q_PROPERTY(bool expanded READ expanded WRITE setExpanded NOTIFY expandedChanged)
38
Q_PROPERTY(DashMode dashMode READ dashMode WRITE setDashMode NOTIFY dashModeChanged)
39
Q_PROPERTY(QString activeLens READ activeLens WRITE setActiveLens NOTIFY activeLensChanged)
40
37
Q_PROPERTY(bool focus READ hasFocus NOTIFY focusChanged) // overridden to add notify
41
Q_PROPERTY(bool superKeyHeld READ superKeyHeld NOTIFY superKeyHeldChanged)
42
Q_PROPERTY(bool haveCustomHomeShortcuts READ haveCustomHomeShortcuts)
44
39
/* These two properties and mouse movement tracking on the widget are added here only because
45
40
we need to detect when the mouse is inside the area occupied by the lancher. This should
52
47
NOTIFY monitoredAreaContainsMouseChanged)
59
explicit ShellDeclarativeView();
50
ShellDeclarativeView(ShellManager *manager, const QUrl &sourceFileUrl, int screen);
62
bool dashActive() const;
63
bool haveCustomHomeShortcuts() const;
64
DashMode dashMode() const;
65
const QString& activeLens() const;
66
bool expanded() const;
67
bool superKeyHeld() const { return m_superKeyHeld; }
68
53
QRect monitoredArea() const;
69
54
bool monitoredAreaContainsMouse() const;
72
Q_SLOT void setDashActive(bool active);
73
Q_INVOKABLE void setDashMode(DashMode);
74
Q_INVOKABLE void setActiveLens(const QString& activeLens);
75
Q_INVOKABLE void setExpanded(bool);
76
57
void setMonitoredArea(QRect monitoredArea);
78
59
virtual bool x11EventFilter(XEvent* event);
61
void toggleLauncher();
63
Q_INVOKABLE void forceActivateWindow();
64
Q_INVOKABLE void forceDeactivateWindow();
81
void dashActiveChanged(bool);
82
void dashModeChanged(DashMode);
83
void expandedChanged(bool);
84
void activeLensChanged(const QString&);
85
void activateLens(const QString& lensId);
87
67
void focusChanged();
88
68
void monitoredAreaChanged();
89
69
void monitoredAreaContainsMouseChanged();
91
void addWebFavoriteRequested(const QUrl& url);
92
void superKeyHeldChanged(bool superKeyHeld);
93
void superKeyTapped();
94
71
void activateShortcutPressed(int itemIndex);
95
72
void newInstanceShortcutPressed(int itemIndex);
96
73
void launcherFocusRequested();
99
void updateSuperKeyMonitoring();
100
void updateSuperKeyHoldState();
101
void setHotkeysForModifiers(Qt::KeyboardModifiers modifiers);
102
void forwardNumericHotkey();
103
void ignoreSuperPress();
106
void showCommandsLens();
107
void onAltF1Pressed();
110
76
virtual void showEvent(QShowEvent *event);
111
77
virtual void mouseMoveEvent(QMouseEvent *event);
121
87
void setWMFlags();
122
88
void updateInputShape();
126
QString m_activeLens; /* Lens id of the active lens */
129
bool m_superKeyPressed;
131
bool m_superPressIgnored;
132
QTimer m_superKeyHoldTimer;
133
90
QRect m_monitoredArea;
134
91
bool m_monitoredAreaContainsMouse;
93
ShellManager *m_manager;
136
friend class DashDBus;
137
friend class LauncherDBus;
95
friend class ShellManager;
140
98
Q_DECLARE_METATYPE(ShellDeclarativeView*)