Warning, file /system/qtcurve/qt4/style/shortcuthandler.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*****************************************************************************
0002  *   Copyright 2007 - 2010 Craig Drummond <craig.p.drummond@gmail.com>       *
0003  *   Copyright 2013 - 2015 Yichao Yu <yyc1992@gmail.com>                     *
0004  *                                                                           *
0005  *   This program is free software; you can redistribute it and/or modify    *
0006  *   it under the terms of the GNU Lesser General Public License as          *
0007  *   published by the Free Software Foundation; either version 2.1 of the    *
0008  *   License, or (at your option) version 3, or any later version accepted   *
0009  *   by the membership of KDE e.V. (or its successor approved by the         *
0010  *   membership of KDE e.V.), which shall act as a proxy defined in          *
0011  *   Section 6 of version 3 of the license.                                  *
0012  *                                                                           *
0013  *   This program is distributed in the hope that it will be useful,         *
0014  *   but WITHOUT ANY WARRANTY; without even the implied warranty of          *
0015  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU       *
0016  *   Lesser General Public License for more details.                         *
0017  *                                                                           *
0018  *   You should have received a copy of the GNU Lesser General Public        *
0019  *   License along with this library. If not,                                *
0020  *   see <http://www.gnu.org/licenses/>.                                     *
0021  *****************************************************************************/
0022 
0023 #ifndef __SHORTCUT_HANDLER_H__
0024 #define __SHORTCUT_HANDLER_H__
0025 
0026 #include <QObject>
0027 #include <QSet>
0028 #include <QList>
0029 
0030 class QWidget;
0031 
0032 namespace QtCurve {
0033 class ShortcutHandler: public QObject {
0034     Q_OBJECT
0035 
0036 public:
0037     explicit ShortcutHandler(QObject *parent=0);
0038     ~ShortcutHandler() override;
0039 
0040     bool hasSeenAlt(const QWidget *widget) const;
0041     bool
0042     isAltDown() const
0043     {
0044         return m_altDown;
0045     }
0046     bool showShortcut(const QWidget *widget) const;
0047 
0048 private Q_SLOTS:
0049     void widgetDestroyed(QObject *o);
0050 
0051 protected:
0052     void updateWidget(QWidget *w);
0053     bool eventFilter(QObject *watched, QEvent *event);
0054 
0055 private:
0056     bool m_altDown;
0057     QSet<QWidget*> m_seenAlt;
0058     QSet<QWidget*> m_updated;
0059     QList<QWidget*> m_openMenus;
0060 };
0061 }
0062 
0063 #endif