// // Created by Krad on 2022/7/19. // #ifndef GUI_DIALOGMANAGER_H #define GUI_DIALOGMANAGER_H #include #include class QWidget; class QDialog; class GUIMessageDialog; class DialogManager:public QObject { public: static DialogManager *Default() { static DialogManager manager; return &manager; } DialogManager() = default; ~DialogManager() override = default; void init(); QWidget* getTopWidget(); void raiseDeviceError(QObject* parent, QObject* msg); void invokeOperationStart(QObject* parent, QObject* msg); void invokeOperationProgress(QObject* parent, QObject* msg); void invokeOperationPending(QObject* parent, QObject* msg); void invokeOperationEnd(QObject* parent, QObject* msg); private: QDialog* mDialog = nullptr; GUIMessageDialog* mMessageDialog = nullptr; QStack topWidgetStore; }; #endif //GUI_DIALOGMANAGER_H