2023-02-26 23:47:07 +08:00
|
|
|
|
#ifndef FLUENT_H
|
|
|
|
|
#define FLUENT_H
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
#include <QQmlEngine>
|
2023-04-11 23:12:31 +08:00
|
|
|
|
#include "NativeEventFilter.h"
|
2023-02-26 23:47:07 +08:00
|
|
|
|
|
|
|
|
|
class Fluent: public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
Q_INVOKABLE QString version() const;
|
2023-04-11 23:12:31 +08:00
|
|
|
|
~Fluent(){
|
|
|
|
|
if (nativeEvent != Q_NULLPTR) {
|
|
|
|
|
delete nativeEvent;
|
|
|
|
|
nativeEvent = Q_NULLPTR;
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-02-26 23:47:07 +08:00
|
|
|
|
void registerTypes(const char *uri);
|
|
|
|
|
void initializeEngine(QQmlEngine *engine, const char *uri);
|
2023-03-05 23:39:13 +08:00
|
|
|
|
static Fluent *getInstance();
|
2023-02-26 23:47:07 +08:00
|
|
|
|
private:
|
|
|
|
|
static Fluent* m_instance;
|
2023-04-11 23:12:31 +08:00
|
|
|
|
NativeEventFilter *nativeEvent = Q_NULLPTR;
|
2023-02-26 23:47:07 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // FLUENT_H
|