Created
March 4, 2019 16:12
-
-
Save amoe/30b465379475348d70e29ed0b5994ae4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef FIELD_ENCODER_MODEL_HH | |
#define FIELD_ENCODER_MODEL_HH | |
#include <Qt> | |
#include <QModelIndex> | |
#include <QStringListModel> | |
class FieldEncoderModel: public QAbstractItemModel { | |
public: | |
FieldEncoderModel(); | |
Qt::ItemFlags flags(const QModelIndex& index) const override; | |
int rowCount(const QModelIndex &parent = QModelIndex()) const override; | |
int columnCount(const QModelIndex &parent = QModelIndex()) const override; | |
QVariant data(const QModelIndex &index, int role) const override; | |
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; | |
QModelIndex index(int row, int column, const QModelIndex &parent = QModelIndex()) const override; | |
QModelIndex parent(const QModelIndex &index) const override; | |
private: | |
QStringListModel* innerModel; | |
}; | |
#endif /* FIELD_ENCODER_MODEL_HH */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment