Kylin/Fluent/Hotkey.h
2024-09-01 00:33:29 +08:00

27 lines
464 B
C++

#ifndef FLUHOTKEY_H
#define FLUHOTKEY_H
#include "Utilities.h"
#include <QObject>
class QHotkey;
class Hotkey : public QObject {
Q_OBJECT
Q_PROPERTY_AUTO(QString, sequence)
Q_PROPERTY_AUTO(QString, name)
Q_PROPERTY_READONLY_AUTO(bool, isRegistered)
QML_NAMED_ELEMENT(FluHotkey)
public:
Hotkey(QObject *parent = nullptr);
~Hotkey();
signals:
void activated();
private:
QHotkey *m_hotkey = nullptr;
};
#endif // FLUHOTKEY_H