File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 65
65
#include < QGridLayout>
66
66
#include < QIntValidator>
67
67
#include < QDoubleValidator>
68
+ #include < QRegExpValidator>
68
69
#include < QPushButton>
69
70
#include < QGroupBox>
70
71
#include < QFileDialog>
@@ -1151,6 +1152,19 @@ void QgsGrassModuleOption::addLineEdit()
1151
1152
} else {
1152
1153
mValidator = new QDoubleValidator ( this );
1153
1154
}
1155
+ lineEdit->setValidator ( mValidator );
1156
+ } else if ( mIsOutput ) {
1157
+ QRegExp rx;
1158
+ if ( mOutputType == Vector )
1159
+ {
1160
+ rx.setPattern (" [A-Za-z_][A-Za-z0-9_]+" );
1161
+ }
1162
+ else
1163
+ {
1164
+ rx.setPattern (" [A-Za-z0-9_.]+" );
1165
+ }
1166
+ mValidator = new QRegExpValidator ( rx, this );
1167
+
1154
1168
lineEdit->setValidator ( mValidator );
1155
1169
}
1156
1170
@@ -2247,3 +2261,4 @@ QString QgsGrassModuleFile::ready()
2247
2261
QgsGrassModuleFile::~QgsGrassModuleFile ()
2248
2262
{
2249
2263
}
2264
+
You can’t perform that action at this time.
0 commit comments