30 #ifndef NOTIFYTABLEMODEL_H
31 #define NOTIFYTABLEMODEL_H
33 #include <QAbstractTableModel>
43 enum { eColumnCount = 4 };
47 int rowCount(
const QModelIndex &parent = QModelIndex())
const
53 int columnCount(
const QModelIndex & )
const {
return eColumnCount; }
55 Qt::ItemFlags
flags(
const QModelIndex &index)
const
58 return Qt::ItemIsEnabled | Qt::ItemIsDropEnabled;
60 return QAbstractItemModel::flags(index) | Qt::ItemIsEditable | Qt::ItemIsDragEnabled
61 | Qt::ItemIsDropEnabled;
65 bool dropMimeData(
const QMimeData *
data, Qt::DropAction action,
int row,
int column,
66 const QModelIndex &parent);
67 QMimeData *
mimeData(
const QModelIndexList &indexes)
const;
69 bool setData(
const QModelIndex &index,
const QVariant &value,
int role);
70 QVariant
data(
const QModelIndex &index,
int role)
const;
71 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const;
72 bool insertRows(
int position,
int rows,
const QModelIndex &index);
73 bool removeRows(
int position,
int rows,
const QModelIndex &index);
77 void dragRows(
int position,
int count);
83 void dropRows(
int position,
int count)
const;
87 QStringList _headerStrings;
90 #endif // NOTIFYTABLEMODEL_H
NotifyTableModel(QList< NotificationItem * > &parentList, QObject *parent=nullptr)
int columnCount(const QModelIndex &) const
bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
QStringList mimeTypes() const
int rowCount(const QModelIndex &parent=QModelIndex()) const
void entryAdded(NotificationItem *item)
QMimeData * mimeData(const QModelIndexList &indexes) const
Qt::ItemFlags flags(const QModelIndex &index) const
bool removeRows(int position, int rows, const QModelIndex &index)
bool setData(const QModelIndex &index, const QVariant &value, int role)
bool insertRows(int position, int rows, const QModelIndex &index)
QVariant data(const QModelIndex &index, int role) const
Qt::DropActions supportedDropActions() const
void dragRows(int position, int count)
void entryUpdated(int offset)
QVariant headerData(int section, Qt::Orientation orientation, int role) const