Sayonara Player
GUI_ShortcutEntry.h
1
2/* Copyright (C) 2011-2020 Michael Lugmair (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/Shortcuts/ShortcutHandler.h"
25#include "Gui/Utils/Widgets/Widget.h"
26#include "Utils/Pimpl.h"
27
28#include <QKeySequence>
29
31
32
38 public Gui::Widget
39{
40 Q_OBJECT
41 UI_CLASS(GUI_ShortcutEntry)
43
44signals:
49 void sigTestPressed(const QList<QKeySequence>& sequences);
50 void sigSequenceEntered();
51
52public:
53 explicit GUI_ShortcutEntry(ShortcutIdentifier identifier, QWidget* parent=nullptr);
55
56 QList<QKeySequence> sequences() const;
57 void showSequenceError();
58
59public slots:
60 void commit();
61 void clear();
62 void revert();
63
64
65private slots:
66 void editClicked();
67 void defaultClicked();
68 void testClicked();
69
70 void languageChanged() override;
71 void skinChanged() override;
72};
73
74#endif // GUI_SHORTCUTENTRY_H
The delegate class for displaying a shortcut.
Definition: GUI_ShortcutEntry.h:39
void sigTestPressed(const QList< QKeySequence > &sequences)
signal is emitted when the test button is pressed
Definition: EngineUtils.h:33