mirror of
https://github.com/debauchee/barrier.git
synced 2025-06-18 02:31:42 +02:00
23 lines
467 B
C++
23 lines
467 B
C++
#include "HotkeyDialog.h"
|
|
|
|
#include <QtCore>
|
|
#include <QtGui>
|
|
|
|
HotkeyDialog::HotkeyDialog (QWidget* parent, Hotkey& hotkey) :
|
|
QDialog(parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint),
|
|
Ui::HotkeyDialogBase(),
|
|
m_Hotkey(hotkey)
|
|
{
|
|
setupUi(this);
|
|
|
|
m_pKeySequenceWidgetHotkey->setText(m_Hotkey.text());
|
|
}
|
|
|
|
void HotkeyDialog::accept()
|
|
{
|
|
if (!sequenceWidget()->valid())
|
|
return;
|
|
|
|
hotkey().setKeySequence(sequenceWidget()->keySequence());
|
|
QDialog::accept();
|
|
}
|