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