This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
IndoorMap/params/MetaEditModel.h
2018-10-25 12:19:36 +02:00

54 lines
1.3 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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 <Indoor/floorplan/v2/Floorplan.h>
#include <QAbstractTableModel>
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