|
CenGen - Генератор ценников
1.1
|
00001 #ifndef SQL_VALIDATOR_H 00002 #define SQL_VALIDATOR_H 00003 #include <QValidator> 00004 00005 class SqlValidator : public QValidator { 00006 public: 00007 SqlValidator(QObject* parent) 00008 : QValidator(parent) 00009 { 00010 00011 } 00012 00013 virtual State validate(QString& str, int& ) const 00014 { 00015 if (str.contains("SELECT", Qt::CaseInsensitive)) { 00016 return Invalid; 00017 } 00018 return Acceptable; 00019 00020 } 00021 }; 00022 #endif // SQL_VALIDATOR_H