feat:初始化wuhan_QT界面代码

This commit is contained in:
xu
2026-09-09 17:00:37 +08:00
commit 40473ad10b
537 changed files with 23934 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
#ifndef NUMPADDIALOG_H
#define NUMPADDIALOG_H
#include <QDialog>
class QLineEdit;
// ===================== 数字键盘弹窗(模态) =====================
// 半透明遮罩 + 键盘面板:顶部输入回显,数字键 1-9、0,退格、清除,确认/取消
class NumPadDialog : public QDialog
{
Q_OBJECT
public:
explicit NumPadDialog(QWidget* parent = nullptr);
void setMaxLen(int n) { m_maxLen = n; }
void setValue(const QString& v);
QString value() const { return m_value; }
void clear();
private slots:
void onDigit(const QString& d);
void onBackspace();
void onClear();
private:
void refreshEcho();
QLineEdit* m_echo = nullptr;
QString m_value;
int m_maxLen = 4;
};
#endif // NUMPADDIALOG_H