77 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
78 Qt::ItemFlags flags(
const QModelIndex &index)
const override;
79 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
80 QMap<int, QVariant> itemData(
const QModelIndex &index)
const override;
81 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::DisplayRole)
override;
82 bool setItemData(
const QModelIndex &index,
const QMap<int, QVariant> &roles)
override;
83 bool setChecked(
int row,
bool checked);
84 bool setChecked(
int row, Qt::CheckState checked);
85 virtual QString labelForId(
const QVariant &
id)
const;
86 Qt::DropActions supportedDropActions()
const override;
87 bool insertRows(
int row,
int count,
const QModelIndex &parent)
override;
88 bool removeRows(
int row,
int count,
const QModelIndex &parent)
override;
89 const QList<ChecklistItem> &items()
const;
90 void setItems(
const QList<ChecklistItem> &items);
91 void restore(QSettings &settings,
const QString &name);
92 void save(QSettings &settings,
const QString &name)
const;
93 QVariantList toVariantList()
const;
94 void applyVariantList(
const QVariantList &checkedIds);
95 static constexpr int idRole();
98 QList<ChecklistItem> m_items;