增加通讯协议

This commit is contained in:
xu
2026-10-14 09:59:42 +08:00
parent 32878a9a80
commit 950e9e6c9e
102 changed files with 5538 additions and 2679 deletions
+6
View File
@@ -4,6 +4,7 @@
#include <QDialog>
class QLabel;
class QPushButton;
// ===================== 确认弹窗 =====================
// 标题 + 正文 + 确认/取消;另提供 2s 自动消失的轻提示(toast)
@@ -19,12 +20,17 @@ public:
// 模态确认,返回是否“确认”
static bool confirm(QWidget* parent, const QString& title, const QString& text);
// 独立信息弹窗(仅“确认”按钮,替代系统 QMessageBox;正文 50px)
static void message(QWidget* parent, const QString& title, const QString& text);
// 轻提示:显示 text,ms 毫秒后自动消失(用于“修改成功”等)
static void toast(QWidget* parent, const QString& text, int ms = 2000);
private:
QLabel* m_title = nullptr;
QLabel* m_body = nullptr;
QWidget* m_panel = nullptr;
QPushButton* m_cancel = nullptr;
};
#endif // CONFIRMDIALOG_H