Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef QXTSTRINGVALIDATOR_H_INCLUDED
00027 #define QXTSTRINGVALIDATOR_H_INCLUDED
00028
00029 #include <QValidator>
00030 #include <QStringList>
00031 #include <QModelIndex>
00032 #include "qxtpimpl.h"
00033 #include "qxtglobal.h"
00034
00035 class QxtStringValidatorPrivate;
00036 QT_FORWARD_DECLARE_CLASS(QAbstractItemModel)
00037
00038 class QXT_GUI_EXPORT QxtStringValidator : public QValidator
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 QxtStringValidator(QObject * parent);
00044 ~QxtStringValidator();
00045
00046 virtual void fixup(QString & input) const;
00047 virtual QValidator::State validate(QString & input, int & pos) const;
00048
00049 Qt::CaseSensitivity caseSensitivity() const;
00050 void setCaseSensitivity(Qt::CaseSensitivity caseSensitivity);
00051 void setStartModelIndex(const QModelIndex &index);
00052 void setStringList(const QStringList &stringList);
00053 void setRecursiveLookup(bool enable);
00054 void setWrappingLookup(bool enable);
00055 void setLookupModel(QAbstractItemModel *model);
00056 void setLookupRole(const int role);
00057
00058 QModelIndex startModelIndex() const;
00059 bool recursiveLookup() const;
00060 bool wrappingLookup() const;
00061 QAbstractItemModel * lookupModel() const;
00062 int lookupRole() const;
00063
00064 private:
00065 QXT_DECLARE_PRIVATE(QxtStringValidator);
00066 };
00067
00068 #endif //QXTSTRINGVALIDATOR_H_INCLUDED