2
* Copyright (C) 2012 Canonical, Ltd.
5
* Michał Sawicz <michal.sawicz@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/>.
27
class HotModifier : public QObject
30
Q_PROPERTY(Qt::KeyboardModifiers modifiers READ modifiers)
31
Q_PROPERTY(bool held READ held NOTIFY heldChanged)
34
HotModifier(Qt::KeyboardModifiers modifiers, QObject *parent = 0);
36
void onModifiersChanged(Qt::KeyboardModifiers modifiers);
41
Qt::KeyboardModifiers modifiers() const;
45
void heldChanged(bool modifierHeld);
48
void ignoreCurrentPress();
49
void updateHoldState();
53
Qt::KeyboardModifiers m_modifiers;
57
bool m_otherModifierPressed;
60
#endif // HOTMODIFIER_H