Deskflow
1.26.0.418
Keyboard and mouse sharing utility
Toggle main menu visibility
Loading...
Searching...
No Matches
Hotkey.h
Go to the documentation of this file.
1
/*
2
* Deskflow -- mouse and keyboard sharing utility
3
* SPDX-FileCopyrightText: (C) 2025 - 2026 Chris Rizzitello <sithlord48@gmail.com>
4
* SPDX-FileCopyrightText: (C) 2012 - 2016 Synergy App Ltd
5
* SPDX-FileCopyrightText: (C) 2008 Volker Lanz <vl@fidra.de>
6
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
7
*/
8
9
#pragma once
10
11
#include <QList>
12
#include <QString>
13
#include <QTextStream>
14
15
#include "
common/Action.h
"
16
#include "
common/KeySequence.h
"
17
18
class
HotkeyDialog
;
19
class
ServerConfigDialog
;
20
class
QSettings;
21
22
class
Hotkey
23
{
24
public
:
25
Hotkey
() =
default
;
26
27
QString
text
()
const
;
28
const
KeySequence
&
keySequence
()
const
29
{
30
return
m_keySequence;
31
}
32
void
setKeySequence
(
const
KeySequence
&seq)
33
{
34
m_keySequence = seq;
35
}
36
const
ActionList
&
actions
()
const
37
{
38
return
m_actions;
39
}
40
41
Action
&
actionAt
(
int
index);
42
void
addAction
(
const
Action
&action);
43
void
removeActionAt
(
int
index);
44
45
void
loadSettings
(QSettings &settings);
46
void
saveSettings
(QSettings &settings)
const
;
47
48
bool
operator==
(
const
Hotkey
&hk)
const
;
49
50
private
:
51
KeySequence
m_keySequence = {};
52
ActionList
m_actions = {};
53
inline
static
const
QString kSectionActions = QStringLiteral(
"actions"
);
54
inline
static
const
QString kMousebutton = QStringLiteral(
"mousebutton(%1)"
);
55
inline
static
const
QString kKeystroke = QStringLiteral(
"keystroke(%1)"
);
56
};
57
58
using
HotkeyList
= QList<Hotkey>;
59
60
QTextStream &
operator<<
(QTextStream &outStream,
const
Hotkey
&hotkey);
operator<<
QTextStream & operator<<(QTextStream &outStream, const Action &action)
Definition
Action.cpp:205
Action.h
ActionList
QList< Action > ActionList
Definition
Action.h:139
HotkeyList
QList< Hotkey > HotkeyList
Definition
Hotkey.h:58
KeySequence.h
Action
Definition
Action.h:34
HotkeyDialog
Definition
HotkeyDialog.h:21
Hotkey
Definition
Hotkey.h:23
Hotkey::keySequence
const KeySequence & keySequence() const
Definition
Hotkey.h:28
Hotkey::addAction
void addAction(const Action &action)
Definition
Hotkey.cpp:24
Hotkey::removeActionAt
void removeActionAt(int index)
Definition
Hotkey.cpp:31
Hotkey::actions
const ActionList & actions() const
Definition
Hotkey.h:36
Hotkey::actionAt
Action & actionAt(int index)
Definition
Hotkey.cpp:19
Hotkey::text
QString text() const
Definition
Hotkey.cpp:13
Hotkey::saveSettings
void saveSettings(QSettings &settings) const
Definition
Hotkey.cpp:54
Hotkey::operator==
bool operator==(const Hotkey &hk) const
Definition
Hotkey.cpp:66
Hotkey::Hotkey
Hotkey()=default
Hotkey::loadSettings
void loadSettings(QSettings &settings)
Definition
Hotkey.cpp:38
Hotkey::setKeySequence
void setKeySequence(const KeySequence &seq)
Definition
Hotkey.h:32
KeySequence
Definition
KeySequence.h:16
ServerConfigDialog
Definition
ServerConfigDialog.h:25
src
lib
common
Hotkey.h
Generated by
1.18.0