Update to dms control phase1.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user