2
* Copyright (C) 2010 Canonical, Ltd.
5
* Olivier Tilloy <olivier.tilloy@canonical.com>
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.
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.
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/>.
23
#include <QDeclarativeView>
29
#include <unity2ddeclarativeview.h>
31
class DeclarativeDragDropEvent;
34
class LauncherView : public Unity2DDeclarativeView
37
Q_PROPERTY(bool superKeyHeld READ superKeyHeld NOTIFY superKeyHeldChanged)
38
Q_PROPERTY(bool focus READ hasFocus NOTIFY focusChanged) // overridden
41
explicit LauncherView(QWidget* parent = NULL);
44
bool superKeyHeld() const { return m_superKeyHeld; }
47
void activateShortcutPressed(int itemIndex);
48
void newInstanceShortcutPressed(int itemIndex);
49
void superKeyHeldChanged(bool superKeyHeld);
50
void superKeyTapped();
51
void addWebFavoriteRequested(const QUrl& url);
52
void focusChanged(bool focus);
55
void setHotkeysForModifiers(Qt::KeyboardModifiers modifiers);
56
void forwardNumericHotkey();
57
void ignoreSuperPress();
58
void updateSuperKeyMonitoring();
59
void updateSuperKeyHoldState();
61
void showCommandsLens();
62
void onSuperSPressed();
63
void onAltF1Pressed();
66
void focusInEvent(QFocusEvent* event);
67
void focusOutEvent(QFocusEvent* event);
70
bool m_superKeyPressed;
72
bool m_superPressIgnored;
73
QTimer m_superKeyHoldTimer;
75
friend class LauncherDBus;
78
#endif // LAUNCHERVIEW