Validation names.

--HG--
branch : feature
This commit is contained in:
Roman Telezhynskyi 2015-07-22 12:47:51 +03:00
parent 180af51f99
commit c2c64921ab

View File

@ -33,6 +33,7 @@
#include "dialogs/dialognewmeasurements.h" #include "dialogs/dialognewmeasurements.h"
#include "../vpatterndb/calculator.h" #include "../vpatterndb/calculator.h"
#include "../ifc/ifcdef.h" #include "../ifc/ifcdef.h"
#include "../qmuparser/qmudef.h"
#include <QFileDialog> #include <QFileDialog>
#include <QFileInfo> #include <QFileInfo>
@ -870,6 +871,8 @@ void TMainWindow::InitWindow()
ui->actionReadOnly->setEnabled(true); ui->actionReadOnly->setEnabled(true);
ui->actionSaveAs->setEnabled(true); ui->actionSaveAs->setEnabled(true);
ui->lineEditName->setValidator( new QRegularExpressionValidator(QRegularExpression(NameRegExp())) );
connect(ui->toolButtonRemove, &QToolButton::clicked, this, &TMainWindow::Remove); connect(ui->toolButtonRemove, &QToolButton::clicked, this, &TMainWindow::Remove);
connect(ui->toolButtonUp, &QToolButton::clicked, this, &TMainWindow::MoveUp); connect(ui->toolButtonUp, &QToolButton::clicked, this, &TMainWindow::MoveUp);
connect(ui->toolButtonDown, &QToolButton::clicked, this, &TMainWindow::MoveDown); connect(ui->toolButtonDown, &QToolButton::clicked, this, &TMainWindow::MoveDown);