mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-11-01 03:50:06 +00:00
Rename keybind to hotkey
This commit is contained in:
parent
7e99b5fb00
commit
60c8af46bf
4 changed files with 19 additions and 19 deletions
41
scwx-qt/source/scwx/qt/ui/hotkey_edit.hpp
Normal file
41
scwx-qt/source/scwx/qt/ui/hotkey_edit.hpp
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#pragma once
|
||||
|
||||
#include <QLineEdit>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace ui
|
||||
{
|
||||
|
||||
class HotkeyEdit : public QLineEdit
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY_MOVE(HotkeyEdit)
|
||||
|
||||
public:
|
||||
explicit HotkeyEdit(QWidget* parent = nullptr);
|
||||
~HotkeyEdit();
|
||||
|
||||
QKeySequence key_sequence() const;
|
||||
|
||||
void set_key_sequence(const QKeySequence& sequence);
|
||||
|
||||
protected:
|
||||
void focusInEvent(QFocusEvent* e) override;
|
||||
void focusOutEvent(QFocusEvent* e) override;
|
||||
void keyPressEvent(QKeyEvent* e) override;
|
||||
void keyReleaseEvent(QKeyEvent* e) override;
|
||||
|
||||
signals:
|
||||
void KeySequenceChanged(const QKeySequence& sequence);
|
||||
|
||||
private:
|
||||
class Impl;
|
||||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue