#include <qxtstringvalidator_p.h>


Public Member Functions | |
| QxtStringValidatorPrivate () | |
| QModelIndex | lookupPartialMatch (const QString &value) const |
| QModelIndex | lookupExactMatch (const QString &value) const |
| QModelIndex | lookup (const QString &value, const Qt::MatchFlags &matchFlags) const |
Public Attributes | |
| bool | isUserModel |
| QPointer< QAbstractItemModel > | model |
| Qt::CaseSensitivity | cs |
| int | lookupColumn |
| int | lookupRole |
| Qt::MatchFlags | userFlags |
| QModelIndex | lookupStartModelIndex |
Friends | |
| class | QxtStringValidator |
Definition at line 35 of file qxtstringvalidator_p.h.
| QxtStringValidatorPrivate::QxtStringValidatorPrivate | ( | ) |
Definition at line 34 of file qxtstringvalidator.cpp.
: isUserModel(false) , model(0) , cs(Qt::CaseSensitive) , lookupRole(Qt::EditRole) , userFlags(Qt::MatchWrap) , lookupStartModelIndex(QModelIndex()) {}
| QModelIndex QxtStringValidatorPrivate::lookup | ( | const QString & | value, |
| const Qt::MatchFlags & | matchFlags | ||
| ) | const |
Definition at line 64 of file qxtstringvalidator.cpp.
References lookupRole, lookupStartModelIndex, and model.
Referenced by lookupExactMatch(), and lookupPartialMatch().
{
QModelIndex startIndex = lookupStartModelIndex.isValid() ? lookupStartModelIndex : model->index(0, 0);
QModelIndexList list = model->match(startIndex, lookupRole, value, 1, matchFlags);
if (list.size() > 0)
return list[0];
return QModelIndex();
}
| QModelIndex QxtStringValidatorPrivate::lookupExactMatch | ( | const QString & | value ) | const |
| QModelIndex QxtStringValidatorPrivate::lookupPartialMatch | ( | const QString & | value ) | const |
Definition at line 42 of file qxtstringvalidator.cpp.
friend class QxtStringValidator [friend] |
Definition at line 39 of file qxtstringvalidator_p.h.
| Qt::CaseSensitivity QxtStringValidatorPrivate::cs |
Definition at line 43 of file qxtstringvalidator_p.h.
Referenced by lookupExactMatch(), and lookupPartialMatch().
Definition at line 39 of file qxtstringvalidator_p.h.
Definition at line 44 of file qxtstringvalidator_p.h.
Definition at line 45 of file qxtstringvalidator_p.h.
Referenced by lookup().
| QModelIndex QxtStringValidatorPrivate::lookupStartModelIndex |
Definition at line 47 of file qxtstringvalidator_p.h.
Referenced by lookup().
| QPointer<QAbstractItemModel> QxtStringValidatorPrivate::model |
Definition at line 42 of file qxtstringvalidator_p.h.
Referenced by lookup().
| Qt::MatchFlags QxtStringValidatorPrivate::userFlags |
Definition at line 46 of file qxtstringvalidator_p.h.
Referenced by lookupExactMatch(), and lookupPartialMatch().
1.7.2