Qmmp
Loading...
Searching...
No Matches
shortcutdialog.h
1/***************************************************************************
2 * Copyright (C) 2010-2025 by Ilya Kotov *
3 * forkotov02@ya.ru *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19 ***************************************************************************/
20#ifndef SHORTCUTDIALOG_H
21#define SHORTCUTDIALOG_H
22
23#include <QDialog>
24#include "qmmpui_export.h"
25
26class QKeyEvent;
27
28namespace Ui {
29class ShortcutDialog;
30}
31
35class QMMPUI_EXPORT ShortcutDialog : public QDialog
36{
37 Q_OBJECT
38public:
44 explicit ShortcutDialog(const QString &key, QWidget *parent = nullptr);
48 virtual ~ShortcutDialog();
52 QString key() const;
53
54protected:
58 virtual void keyPressEvent(QKeyEvent *event) override;
62 virtual void showEvent(QShowEvent *event) override;
63
64private:
65 Ui::ShortcutDialog *m_ui;
66
67};
68
69#endif
QString key() const
virtual void showEvent(QShowEvent *event) override
virtual ~ShortcutDialog()
virtual void keyPressEvent(QKeyEvent *event) override
ShortcutDialog(const QString &key, QWidget *parent=nullptr)