Skip to content
Permalink
Browse files

output name validator

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5076 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
rblazek
rblazek committed Mar 22, 2006
1 parent e771016 commit 2e252d27bf650377b0752a5e8b6edc769fb47e6a
Showing with 15 additions and 0 deletions.
  1. +15 −0 src/plugins/grass/qgsgrassmodule.cpp
@@ -65,6 +65,7 @@
#include <QGridLayout>
#include <QIntValidator>
#include <QDoubleValidator>
#include <QRegExpValidator>
#include <QPushButton>
#include <QGroupBox>
#include <QFileDialog>
@@ -1151,6 +1152,19 @@ void QgsGrassModuleOption::addLineEdit()
} else {
mValidator = new QDoubleValidator( this );
}
lineEdit->setValidator ( mValidator );
} else if ( mIsOutput ) {
QRegExp rx;
if ( mOutputType == Vector )
{
rx.setPattern("[A-Za-z_][A-Za-z0-9_]+");
}
else
{
rx.setPattern("[A-Za-z0-9_.]+");
}
mValidator = new QRegExpValidator( rx, this );

lineEdit->setValidator ( mValidator );
}

@@ -2247,3 +2261,4 @@ QString QgsGrassModuleFile::ready()
QgsGrassModuleFile::~QgsGrassModuleFile()
{
}

0 comments on commit 2e252d2

Please sign in to comment.
You can’t perform that action at this time.