~zeal-developers/zeal/master

« back to all changes in this revision

Viewing changes to src/ui/widgets/razorshortcutbutton_p.h

  • Committer: Oleg Shparber
  • Date: 2015-01-12 03:51:13 UTC
  • Revision ID: git-v1:792a35241c995b7f5913ee426f4bf5aa706b43d9
Move .pro file to the top, rename zeal dir into src

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* BEGIN_COMMON_COPYRIGHT_HEADER
 
2
 * (c)LGPL2+
 
3
 *
 
4
 * Razor - a lightweight, Qt based, desktop toolset
 
5
 * http://razor-qt.org
 
6
 *
 
7
 * Copyright: 2010-2011 Razor team
 
8
 * Authors:
 
9
 *   Alexander Sokoloff <sokoloff.a@gmail.com>
 
10
 *
 
11
 * This program or library is free software; you can redistribute it
 
12
 * and/or modify it under the terms of the GNU Lesser General Public
 
13
 * License as published by the Free Software Foundation; either
 
14
 * version 2.1 of the License, or (at your option) any later version.
 
15
 *
 
16
 * This library is distributed in the hope that it will be useful,
 
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
19
 * Lesser General Public License for more details.
 
20
 
 
21
 * You should have received a copy of the GNU Lesser General
 
22
 * Public License along with this library; if not, write to the
 
23
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
24
 * Boston, MA 02110-1301 USA
 
25
 *
 
26
 * END_COMMON_COPYRIGHT_HEADER */
 
27
 
 
28
#ifndef RAZORSHORTCUTBUTTON_P_H
 
29
#define RAZORSHORTCUTBUTTON_P_H
 
30
 
 
31
#include "razorshortcutbutton.h"
 
32
 
 
33
#include <QMenu>
 
34
 
 
35
class QKeyEvent;
 
36
 
 
37
class RazorShortcutButtonPrivate : public QObject
 
38
{
 
39
    Q_OBJECT
 
40
public:
 
41
    explicit RazorShortcutButtonPrivate(RazorShortcutButton *parent);
 
42
 
 
43
    bool keyPressEvent(QKeyEvent *event);
 
44
    bool keyReleaseEvent(QKeyEvent *event);
 
45
 
 
46
public slots:
 
47
    void clear();
 
48
    void activate(bool active);
 
49
 
 
50
private:
 
51
    RazorShortcutButton * const q_ptr;
 
52
    Q_DECLARE_PUBLIC(RazorShortcutButton)
 
53
 
 
54
    QKeySequence mSequence;
 
55
    QMenu mMenu;
 
56
    int mKeysCount;
 
57
};
 
58
 
 
59
#endif // RAZORSHORTCUTBUTTON_P_H