Refactor DialogManager.1
This commit is contained in:
@@ -6,11 +6,14 @@
|
||||
#define GUI_DIALOGMANAGER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <mutex>
|
||||
#include <QStack>
|
||||
#include <atomic>
|
||||
|
||||
class QWidget;
|
||||
class QDialog;
|
||||
class GUIMessageDialog;
|
||||
class QSqlTableModel;
|
||||
|
||||
class DialogManager:public QObject {
|
||||
public:
|
||||
@@ -19,20 +22,27 @@ public:
|
||||
return &manager;
|
||||
}
|
||||
|
||||
DialogManager() = default;
|
||||
DialogManager();
|
||||
|
||||
~DialogManager() override = default;
|
||||
~DialogManager() override;
|
||||
|
||||
void init();
|
||||
QWidget* getTopWidget();
|
||||
void requestLogin();
|
||||
int requestAddAccount(QSqlTableModel* model);
|
||||
int requestEditSelfAccount();
|
||||
int requestEditAdminAccount(const QMap<QString, QVariant>& values);
|
||||
void requestChangePassword();
|
||||
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;
|
||||
void clearMessageDialog();
|
||||
|
||||
QDialog* mFunctionDialog;
|
||||
GUIMessageDialog* mMessageDialog;
|
||||
QStack<QDialog*> topWidgetStore;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user