#ifndef QUICKEVENTSERVICE_H #define QUICKEVENTSERVICE_H #include #include #include #include #include #include #include class QuickEventService : public QObject, public IEventService { Q_OBJECT Q_INTERFACES(IEventService) QTMVVM_INJECT_PROP(EchoService*, echoService, _echoService) public: Q_INVOKABLE explicit QuickEventService(QObject *parent = nullptr); explicit QuickEventService(EchoService* svc, QObject *parent = nullptr); int addEvent(const QString &name) override; void removeEvent(int eventId) override; Q_SIGNALS: void eventTriggered(const QString &event) final; private: int _cnt; QHash> _events; EchoService* _echoService; Q_INVOKABLE void qtmvvm_init(); }; #endif // QUICKEVENTSERVICE_H