//////////////////////////////////////////////////////////////////////////////// /** * \file tableformat.h * \version v1.0 * \author Ing. Dominik Malcik */ //////////////////////////////////////////////////////////////////////////////// #ifndef TABLEFORMAT_H #define TABLEFORMAT_H #include #include #include "layerrecord.h" class TableFormat : public QAbstractTableModel { Q_OBJECT public: TableFormat(QObject *parent=0); TableFormat(QList listofPairs, QObject *parent=0); Qt::ItemFlags flags(const QModelIndex &index) const; int rowCount(const QModelIndex &parent) const; int columnCount(const QModelIndex &parent) const; QVariant data(const QModelIndex &index, int role) const; QVariant headerData(int section, Qt::Orientation orientation, int role) const; bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole); bool insertRows(int position, int rows, const QModelIndex &index=QModelIndex()); bool removeRows(int position, int rows, const QModelIndex &index=QModelIndex()); QList getList(); private: QList listOfPairs; }; #endif // TABLEFORMAT_H