Scribus
Open source desktop publishing at your fingertips
shortcutwidget.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 
8 #ifndef SHORTCUTWIDGET_H
9 #define SHORTCUTWIDGET_H
10 
11 #include <QWidget>
12 
13 class QEvent;
14 
15 #include "ui_shortcutwidget.h"
16 
17 // class Keys;
18 
19 
21 class ShortcutWidget : public QWidget, public Ui::ShortcutWidget
22 {
23  Q_OBJECT
24 
25 public:
26  ShortcutWidget(QWidget *parent = 0);
27  ~ShortcutWidget();
28 
29 
30  virtual void changeEvent(QEvent *e);
31 
32  bool event( QEvent* ev );
33  void keyPressEvent(QKeyEvent *k);
34  void keyReleaseEvent(QKeyEvent *k);
35  void setShortcut(const QString &shortcut);
36  void setAllowedModifiers(int allowed, int required);
37  static QString getKeyText(int KeyC);
38  void languageChange();
39 
40 public slots:
41  void setKeyText();
42  void setNoKey();
43 
44 signals:
50  void newKey(const QString&);
51 
52 protected:
53  int keyCode;
54  QString Part0;
55  QString Part1;
56  QString Part2;
57  QString Part3;
58  QString Part4;
59  int requiredModifiers;
60  int allowedModifiers;
61 };
62 
63 #endif
User defined key-shortcuts for Style Manager dialog.
Definition: shortcutwidget.h:21
void newKey(const QString &)
emitted when a shrotcut is changed.