#ifndef ITABLEMODEL_H #define ITABLEMODEL_H #include #include #include #include "core_global.h" class CORESHARED_EXPORT ITableModel : public QAbstractTableModel { Q_OBJECT public: explicit ITableModel(QObject *parent = NULL); protected: virtual void handleFilter(const QString &filter) = 0; virtual void handleRestore() = 0; bool m_checkboxSelect; public slots: void filter(const QString &filter); void restore(); signals: void editCompleted(); // QAbstractItemModel interface public: virtual Qt::ItemFlags flags(const QModelIndex &index) const override; void setEditableCols(const QList cols); bool checkboxSelect() const; void setCheckboxSelect(bool checkboxSelect); private: QList m_editableCols; }; #endif // ITABLEMODEL_H