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