MuseScore  3.4
Music composition and notation
shortcutcapturedialog.h
Go to the documentation of this file.
1 //=============================================================================
2 // MusE Score
3 // Linux Music Score Editor
4 //
5 // Copyright (C) 2002-2009 Werner Schweer and others
6 // Copyright (C) 2003 Mathias Lundgren <lunar_shuttle@users.sourceforge.net>
7 //
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License version 2.
10 //
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.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 //=============================================================================
20 
21 //
22 // C++ Interface: shortcutcapturedialog
23 //
24 // Description:
25 // Dialog window for capturing keyboard shortcuts
26 //
27 
28 #include "ui_shortcutcapturedialog.h"
29 
30 namespace Ms {
31 
32 class Shortcut;
33 
34 //---------------------------------------------------------
35 // ShortcutCaptureDialog
36 //---------------------------------------------------------
37 
38 class ShortcutCaptureDialog : public QDialog, public Ui::ShortcutCaptureDialogBase
39  {
40  Q_OBJECT
41 
43  void keyPress(QKeyEvent* e);
44  virtual bool eventFilter(QObject* o, QEvent* e);
45  QKeySequence key;
46  QMap<QString, Shortcut*> localShortcuts;
47 
48  virtual void hideEvent(QHideEvent*);
49  private slots:
50  void clearClicked();
51  void addClicked();
52  void replaceClicked();
53 
54  public:
55  ShortcutCaptureDialog(Shortcut* s, QMap<QString, Shortcut*> localShortcuts, QWidget* parent = 0);
57  QKeySequence getKey() const { return key; }
58  };
59 
60 } // namespace Ms
61 
ShortcutCaptureDialog(Shortcut *s, QMap< QString, Shortcut *> localShortcuts, QWidget *parent=0)
Definition: shortcutcapturedialog.cpp:31
void replaceClicked()
Definition: shortcutcapturedialog.cpp:67
QKeySequence getKey() const
Definition: shortcutcapturedialog.h:57
~ShortcutCaptureDialog()
Definition: shortcutcapturedialog.cpp:76
void keyPress(QKeyEvent *e)
Definition: shortcutcapturedialog.cpp:105
QMap< QString, Shortcut * > localShortcuts
Definition: shortcutcapturedialog.h:46
Definition: aeolus.cpp:26
void clearClicked()
Definition: shortcutcapturedialog.cpp:198
QKeySequence key
Definition: shortcutcapturedialog.h:45
Definition: shortcutcapturedialog.h:38
void addClicked()
Definition: shortcutcapturedialog.cpp:58
Shortcut * s
Definition: shortcutcapturedialog.h:42
virtual bool eventFilter(QObject *o, QEvent *e)
Definition: shortcutcapturedialog.cpp:86
virtual void hideEvent(QHideEvent *)
Definition: shortcutcapturedialog.cpp:216
Definition: shortcut.h:98