#include "itablemodel.h" ITableModel::ITableModel(QObject *parent) :QAbstractTableModel(parent) { } void ITableModel::filter(const QString &filter) { handleFilter(filter); } void ITableModel::restore() { handleRestore(); } Qt::ItemFlags ITableModel::flags(const QModelIndex &index) const { if (m_editableCols.contains(index.column())) { return Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled; } return QAbstractTableModel::flags(index) | Qt::ItemIsDragEnabled; } void ITableModel::setEditableCols(const QList cols) { m_editableCols = cols; }