Sayonara Player
src
GUI
Preferences
Shortcuts
GUI_ShortcutEntry.h
1
2
/* Copyright (C) 2011-2017 Lucio Carreras
3
*
4
* This file is part of sayonara player
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef GUI_SHORTCUTENTRY_H
21
#define GUI_SHORTCUTENTRY_H
22
23
#include "GUI/Utils/Shortcuts/Shortcut.h"
24
#include "GUI/Utils/Widgets/Widget.h"
25
26
27
UI_FWD(
GUI_ShortcutEntry
)
28
29
33
class
ShortcutHandler
;
34
class
Shortcut
;
35
class
GUI_ShortcutEntry
:
36
public
Gui
::Widget
37
{
38
Q_OBJECT
39
UI_CLASS(
GUI_ShortcutEntry
)
40
41
signals:
46
void
sig_test_pressed(
const
QList<QKeySequence>
& sequences);
47
48
void
sig_sequence_entered();
49
50
public
:
51
explicit
GUI_ShortcutEntry
(
const
Shortcut& shortcut, QWidget* parent=
nullptr
);
52
~
GUI_ShortcutEntry
();
53
54
QList<QKeySequence>
get_sequences()
const
;
55
void
show_sequence_error();
56
57
public
slots:
58
void
commit();
59
void
clear();
60
void
revert();
61
62
63
private
slots:
64
void
edit_clicked();
65
void
default_clicked();
66
void
test_clicked();
67
68
void
language_changed()
override
;
69
void
skin_changed()
override
;
70
71
72
private
:
73
ShortcutHandler* _sch=
nullptr
;
74
QString _key;
75
Shortcut _shortcut;
76
};
77
78
#endif // GUI_SHORTCUTENTRY_H
GUI_ShortcutEntry
Definition:
GUI_ShortcutEntry.h:35
Gui
Definition:
ComboBoxDelegate.h:26
ShortcutHandler
A singleton class for retrieving shortcuts.
Definition:
ShortcutHandler.h:36
Shortcut
A single shortcut managed by ShortcutHandler. This class holds information about the default shortcut...
Definition:
Shortcut.h:40
QList
Definition:
org_mpris_media_player2_adaptor.h:20
Generated on Fri May 25 2018 00:45:52 for Sayonara Player by
1.8.12