JKQtExtras
a library of useful Qt widgets and tools
|
18 #ifndef JKQTECHECKABLESTRINGLISTMODEL_H
19 #define JKQTECHECKABLESTRINGLISTMODEL_H
21 #include <QStringListModel>
23 #include "jkqtextras_imexport.h"
65 QVariant
data(
const QModelIndex &index,
int role)
const;
66 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole);
68 Qt::ItemFlags
flags(
const QModelIndex &index)
const;
77 #endif // JKQTECHECKABLESTRINGLISTMODEL_H
QVariant data(const QModelIndex &index, int role) const
void setChecked(int i, bool c)
check/uncheck the i -th entry
void setTextEditable(bool editable)
model contents (texts!) is editable
void setChecked(int i)
check the i -th entry
JKQTECheckableStringListModel(bool editable, bool checkable, QObject *parent=0)
bool m_editable
Definition: jkqtecheckablestringlistmodel.h:73
bool isTextEditable() const
is the model contents (texts!) editable?
QSet< int > m_check
Definition: jkqtecheckablestringlistmodel.h:72
JKQTECheckableStringListModel(QObject *parent=0)
Qt::ItemFlags flags(const QModelIndex &index) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
bool isChecked(int i) const
is the i -th entry checked?
void setCheckable(bool checkable)
model contents (texts!) is editable
bool isCheckable() const
is the model contents (texts!) editable?
bool m_checkable
Definition: jkqtecheckablestringlistmodel.h:74
void setUnChecked(int i)
uncheck the i -th entry
void checkAll()
check all items
a QStringListModel, which allows to check/uncheck each entry
Definition: jkqtecheckablestringlistmodel.h:36
void unCheckAll()
uncheck all items