kexi
identifier.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KEXIUTILS_IDENTIFIER_H
00022 #define KEXIUTILS_IDENTIFIER_H
00023
00024 #include "validator.h"
00025 #include <qstring.h>
00026
00027 namespace KexiUtils {
00028
00031 KEXIUTILS_EXPORT bool isIdentifier(const QString& s);
00032
00037 KEXIUTILS_EXPORT QString string2Identifier(const QString &s);
00038
00041 KEXIUTILS_EXPORT QString identifierExpectedMessage(const QString &valueName,
00042 const QVariant& v);
00043
00045 KEXIUTILS_EXPORT QString string2FileName(const QString &s);
00046
00048 class KEXIUTILS_EXPORT IdentifierValidator : public Validator
00049 {
00050 public:
00051 IdentifierValidator(QObject * parent = 0, const char * name = 0);
00052 virtual ~IdentifierValidator();
00053 virtual State validate( QString & input, int & pos) const;
00054
00055 protected:
00056 virtual Validator::Result internalCheck(const QString &valueName, const QVariant& v,
00057 QString &message, QString &details);
00058 };
00059 }
00060
00061 #endif
|