Created
March 4, 2019 16:05
-
-
Save amoe/bb73bdeb73f6b240214057d70fcb96d4 to your computer and use it in GitHub Desktop.
wrapper for stringlistmodel
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
#include "field_encoder_model.hh" | |
FieldEncoderModel::FieldEncoderModel() { | |
QStringList available = {"foo", "bar", "baz"}; | |
this->innerModel = new QStringListModel(available); | |
} | |
Qt::ItemFlags FieldEncoderModel::flags(const QModelIndex& index) const { | |
return this->innerModel->flags(index); | |
} | |
int FieldEncoderModel::rowCount(const QModelIndex& parent) const { | |
return this->innerModel->rowCount(parent); | |
} | |
int FieldEncoderModel::columnCount(const QModelIndex& parent) const { | |
return this->innerModel->columnCount(parent); | |
} | |
QVariant FieldEncoderModel::data(const QModelIndex& index, int role) const { | |
return this->innerModel->data(index, role); | |
} | |
QVariant FieldEncoderModel::headerData(int section, Qt::Orientation orientation, int role) const { | |
return this->innerModel->headerData(section, orientation, role); | |
} | |
QModelIndex FieldEncoderModel::index(int row, int column, const QModelIndex& parent) const { | |
return this->innerModel->index(row, column, parent); | |
} | |
QModelIndex FieldEncoderModel::parent(const QModelIndex& index) const { | |
return this->innerModel->parent(index); | |
} | |
Author
amoe
commented
Mar 4, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment