|
| ChoiceSearchModel (QObject *const parent=nullptr) |
|
QStringList | checkedDisplayTexts () const |
| Returns the display text of all entries that are selected.
|
|
QVariantList | checkedKeys () const |
| Returns the keys of all entries that are selected (checked).
|
|
template<typename T > |
QList< T > | checkedKeys () const |
| Returns the keys of all entries that are selected (checked), converted to a list of the template type.
|
|
QVariant | data (const QModelIndex &index, int role) const override |
|
Qt::ItemFlags | flags (const QModelIndex &index) const override |
|
QModelIndex | index (int row, int column=0, const QModelIndex &parent=QModelIndex()) const override |
|
void | resetChecked () |
| Sets all entries to unchecked.
|
|
int | rowCount (const QModelIndex &parent) const override |
|
template<typename T > |
void | setChecked (const QList< T > &keys, bool checked=true) |
| Sets the check state of all the entries whose key is found in the list to checked.
|
|
template<typename T > |
void | setChecked (const T &key, bool checked=true) |
| Sets the check state of the entry with given key.
|
|
template<typename T > |
void | setChecked (const T &value, SearchXml::Relation relation) |
| Sets the check state of all entries.
|
|
void | setChoice (const QMap< int, QString > &data) |
| Sets the data from the given map, with integer keys and QString user displayable value.
|
|
void | setChoice (const QStringList &data) |
| Sets the data from the given list, taking every first entry as the key, every second as the user displayable value.
|
|
void | setChoice (const QVariantList &data) |
| Sets the data from the given list, taking every first entry as the key, every second as the user displayable value.
|
|
bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
|