Update to dms control phase1.

This commit is contained in:
sunwen
2023-08-21 14:22:41 +08:00
parent d1dc5df680
commit 20fb814608
59 changed files with 2538 additions and 904 deletions

View File

@@ -4,6 +4,7 @@
#include "GetIPDialog.h"
#include <QRegularExpressionValidator>
#include <QFormLayout>
#include <QLabel>
#include "components/ULineEdit.h"
@@ -26,6 +27,12 @@ GetIPDialog::GetIPDialog(QWidget* parent, Qt::WindowFlags f)
mLabelError->setObjectName(QString::fromUtf8("warn"));
formLayout->addRow("", mLabelError);
//set ip input restrictions
QRegularExpression regex("^(?:(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)$");
QRegularExpressionValidator* validator = new QRegularExpressionValidator(regex, this);
mIp->setValidator(validator);
mMask->setValidator(validator);
}
GetIPDialog::~GetIPDialog()