-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrtshortcutdialog.h
More file actions
45 lines (39 loc) · 1.33 KB
/
rtshortcutdialog.h
File metadata and controls
45 lines (39 loc) · 1.33 KB
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
// ********************************************************************
// Copyright © 2025 by EoF Software Labs
// Copyright © 2024 Apple Inc. (some copied parts)
// Copyright by libgaminggear Project (some copied parts)
// Copyright by roccat-tools Project (some copied parts)
// SPDX-License-Identifier: GPL-3.0
// ********************************************************************
#pragma once
#include <QDialog>
#include <QKeyCombination>
#include <QKeySequence>
namespace Ui {
class RTShortcutDialog;
}
class RTShortcutDialog : public QDialog
{
Q_OBJECT
public:
typedef struct
{
QKeyCombination keyCombo;
} TDialogData;
explicit RTShortcutDialog(QWidget *parent = nullptr);
~RTShortcutDialog();
inline const TDialogData &data() const { return m_data; }
private slots:
void on_edKeyShortcut_editingFinished();
void on_cbxKeyShift_toggled(bool checked);
void on_cbxKeyControl_toggled(bool checked);
void on_cbxKeyAlt_toggled(bool checked);
void on_cbxKeyMeta_toggled(bool checked);
void on_cbxKeyPad_toggled(bool checked);
void on_edKeyShortcut_keySequenceChanged(const QKeySequence &keySequence);
private:
Ui::RTShortcutDialog *ui;
TDialogData m_data;
inline void update(Qt::KeyboardModifier km, bool state);
inline void update(Qt::KeyboardModifiers km, Qt::Key key);
};