FluentUI/src/FluHotkey.h

26 lines
513 B
C
Raw Normal View History

2024-05-16 00:35:04 +08:00
#ifndef FLUHOTKEY_H
#define FLUHOTKEY_H
#include <QObject>
#include <QQuickItem>
#include "qhotkey/qhotkey.h"
#include "stdafx.h"
2024-06-28 17:09:23 +08:00
class FluHotkey : public QObject {
2024-05-16 00:35:04 +08:00
Q_OBJECT
2024-06-28 17:09:23 +08:00
Q_PROPERTY_AUTO(QString, sequence)
Q_PROPERTY_AUTO(QString, name)
Q_PROPERTY_READONLY_AUTO(bool, isRegistered)
2024-05-16 00:35:04 +08:00
QML_NAMED_ELEMENT(FluHotkey)
public:
explicit FluHotkey(QObject *parent = nullptr);
~FluHotkey();
Q_SIGNAL void activated();
2024-06-28 17:09:23 +08:00
2024-05-16 00:35:04 +08:00
private:
2024-06-28 17:09:23 +08:00
QHotkey *_hotkey = nullptr;
2024-05-16 00:35:04 +08:00
};
#endif // FLUHOTKEY_H