mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 08:14:47 -07:00
Renamed file + reduced window size + resfresh on change
This commit is contained in:
parent
d3d6f70496
commit
c6aba5a6d0
22 changed files with 463 additions and 470 deletions
40
cockatrice/src/sequenceEdit/sequenceedit.h
Normal file
40
cockatrice/src/sequenceEdit/sequenceedit.h
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#ifndef SECUENCEEDIT_H
|
||||
#define SECUENCEEDIT_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QKeySequence>
|
||||
|
||||
class QLineEdit;
|
||||
class QPushButton;
|
||||
class QEvent;
|
||||
|
||||
class SequenceEdit : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SequenceEdit(QString _shorcutName, QWidget *parent = 0);
|
||||
QString getSecuence();
|
||||
signals:
|
||||
|
||||
private slots:
|
||||
void removeLastShortcut();
|
||||
void restoreDefault();
|
||||
protected:
|
||||
bool eventFilter(QObject *, QEvent *event);
|
||||
private:
|
||||
QString shorcutName;
|
||||
QLineEdit *lineEdit;
|
||||
QPushButton *clearButton;
|
||||
QPushButton *defaultButton;
|
||||
int keys;
|
||||
int currentKey;
|
||||
int maxKeys;
|
||||
bool valid;
|
||||
|
||||
void processKey(QKeyEvent *e);
|
||||
int translateModifiers(Qt::KeyboardModifiers state, const QString &text);
|
||||
void finishShortcut();
|
||||
void updateSettings();
|
||||
};
|
||||
|
||||
#endif // SECUENCEEDIT_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue