mirror of
https://github.com/zealdocs/zeal.git
synced 2024-11-27 11:44:56 +03:00
25 lines
664 B
C++
25 lines
664 B
C++
#ifndef ZEALNATIVEEVENTFILTER_H
|
|
#define ZEALNATIVEEVENTFILTER_H
|
|
|
|
#include <QObject>
|
|
#include <QAbstractNativeEventFilter>
|
|
#include <QKeySequence>
|
|
|
|
class ZealNativeEventFilter : public QObject, public QAbstractNativeEventFilter
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ZealNativeEventFilter(QObject *parent = 0);
|
|
bool nativeEventFilter(const QByteArray &eventType, void *message, long *result);
|
|
void setEnabled(bool enabled_) { enabled = enabled_; }
|
|
void setHotKey(const QKeySequence& hotKey_) { hotKey = hotKey_; }
|
|
signals:
|
|
void gotHotKey();
|
|
public slots:
|
|
private:
|
|
bool enabled = true;
|
|
QKeySequence hotKey;
|
|
};
|
|
|
|
#endif // ZEALNATIVEEVENTFILTER_H
|