9 #ifndef GUARD_GROUPSUBMODEL_H_INCLUDE
10 #define GUARD_GROUPSUBMODEL_H_INCLUDE
12 #include <grouplistwidget/grouplistwidget-config.h>
16 #include <QAbstractListModel>
19 class QAbstractItemModel;
25 class GROUPLISTWIDGET_EXPORT
GroupSubModel :
public QAbstractListModel {
36 const QVariant & key = QVariant(),
37 const QString & lbl = QString());
63 map_.append (original_row);
75 const QVariant & value) {
80 virtual const QVariant &
88 const QString & value) {
93 virtual const QString &
109 const QModelIndex &parent = QModelIndex())
const
116 const QModelIndex &index,
122 Qt::Orientation orientation,
123 int role = Qt::DisplayRole)
const;
149 baseModelDataChange (
151 const QVector<int> &roles);
161 #endif // GUARD_GROUPSUBMODEL_H_INCLUDE
int rowCount(const QModelIndex &parent=QModelIndex()) const
Number of rows.
Definition: groupsubmodel.h:108
virtual void setGroupKey(const QVariant &value)
Sets the key for the grouping algorithm.
Definition: groupsubmodel.h:74
virtual const QString & label() const
Retreive the user visible label for this group.
Definition: groupsubmodel.h:94
void setParentModel(GroupModel *model)
Sets the parent model.
Definition: groupsubmodel.h:48
const QList< int > & mapping() const
Maps rows in this model to rows in base model.
Definition: groupsubmodel.h:132
GroupModel * parentModel() const
Retreive the parent model.
Definition: groupsubmodel.h:55
A model representing a group that is used by the embedded lists.
Definition: groupsubmodel.h:25
virtual void setLabel(const QString &value)
Sets the user visible label for this group.
Definition: groupsubmodel.h:87
virtual const QVariant & groupKey() const
Retreive the key for the grouping algorithm.
Definition: groupsubmodel.h:81
void appendRecord(int original_row)
Insert a new record at the end of the list.
Definition: groupsubmodel.h:61
A model that is to be installed into a GroupListWidget.
Definition: groupmodel.h:36