/* * © Copyright 2014 – Urheberrechtshinweis * Alle Rechte vorbehalten / All Rights Reserved * * Programmcode ist urheberrechtlich geschuetzt. * Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner. * Keine Verwendung ohne explizite Genehmigung. * (vgl. § 106 ff UrhG / § 97 UrhG) */ #ifndef METAEDITMODEL_H #define METAEDITMODEL_H #include "fixC11.h" #include #include class MetaEditModel : public QAbstractTableModel { Q_OBJECT private: Floorplan::Meta* meta = nullptr; public: MetaEditModel(QObject* parent = nullptr); /** delete the idx-th entry */ void deleteEntry(const int idx); /** add a new entry at the end */ void addEntry(); void setSource(Floorplan::Meta* meta); int rowCount(const QModelIndex& parent) const override; int columnCount(const QModelIndex& parent) const override; Qt::ItemFlags flags(const QModelIndex &index) const override; QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override; QVariant headerData(int section, Qt::Orientation orientation, int role) const override; bool setData(const QModelIndex & index, const QVariant &value, int role = Qt::EditRole) override; }; #endif // METAEDITMODEL_H