#ifndef APPLICATION_H #define APPLICATION_H #include "Singleton.h" #include #include #include class QGuiApplication; class DeviceConnection; class VideoFrameProvider; class H264Palyer; class Application : public QObject { Q_OBJECT QML_NAMED_ELEMENT(App) QML_SINGLETON Q_PROPERTY(QList currentOpenDoorAreaPoints READ currentOpenDoorAreaPoints WRITE setCurrentOpenDoorAreaPoints NOTIFY currentOpenDoorAreaPointsChanged) friend class Amass::Singleton; public: QList currentOpenDoorAreaPoints() const; void setCurrentOpenDoorAreaPoints(const QList &points); int exec(); Q_INVOKABLE void open(); Q_INVOKABLE void start(); static Application *create(QQmlEngine *qmlEngine, QJSEngine *jsEngine); signals: void newVideoFrame(); void currentOpenDoorAreaPointsChanged(); protected: Application(int &argc, char **argv); void onDeviceOpenDoorAreaPoints(const QList &points); private: std::shared_ptr m_app; VideoFrameProvider *m_videoFrameProvider = nullptr; std::shared_ptr m_player; DeviceConnection *m_device = nullptr; QList m_currentOpenDoorAreaPoints; }; #endif // APPLICATION_H