34 lines
660 B
C++
34 lines
660 B
C++
#ifndef KEYBOARDSHORTCUTS_H
|
|
#define KEYBOARDSHORTCUTS_H
|
|
|
|
#include <QObject>
|
|
#include <QShortcut>
|
|
|
|
class KeyboardShortcuts : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit KeyboardShortcuts(QWidget *parent = nullptr);
|
|
~KeyboardShortcuts() = default;
|
|
|
|
signals:
|
|
void startPauseRequested();
|
|
void pauseRequested();
|
|
void resetRequested();
|
|
void settingsRequested();
|
|
void skipRequested();
|
|
|
|
private:
|
|
void setupShortcuts(QWidget *parent);
|
|
|
|
QShortcut *m_startShortcut;
|
|
QShortcut *m_pauseShortcut;
|
|
QShortcut *m_resetShortcut;
|
|
QShortcut *m_settingsShortcut;
|
|
QShortcut *m_skipShortcut;
|
|
};
|
|
|
|
#endif // KEYBOARDSHORTCUTS_H
|
|
|