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 "GetRouteDialog.h"
#include <QRegularExpressionValidator>
#include <QFormLayout>
#include <QLabel>
#include "components/ULineEdit.h"
@@ -24,6 +25,13 @@ GetRouteDialog::GetRouteDialog(QWidget* parent, Qt::WindowFlags f)
formLayout->addRow(QString(tr("Gateway")), mGateway);
mLabelError->setObjectName("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);
mDestination->setValidator(validator);
mNetmask->setValidator(validator);
mGateway->setValidator(validator);
}
GetRouteDialog::~GetRouteDialog()
@@ -63,4 +71,4 @@ bool GetRouteDialog::updateReferenceData()
return false;
}
return true;
}
}