Go to the documentation of this file.
8 #define PROPERTY_COUNT 11
26 myMonsters.push_back(resourcesManager->wrap(&arch->clone, nullptr));
45 if (role != Qt::DisplayRole && role != Qt::EditRole) {
53 if (orientation == Qt::Vertical) {
54 if (role == Qt::DisplayRole) {
56 }
else if (role == Qt::DecorationRole) {
62 if (role != Qt::DisplayRole) {
63 return QAbstractTableModel::headerData(section, orientation, role);
69 if (!
index.isValid()) {
70 return Qt::NoItemFlags;
79 int pi = ObjectWrapper::staticMetaObject.indexOfProperty(
properties[
index.column()]);
80 if (pi != -1 && ObjectWrapper::staticMetaObject.property(pi).isWritable()) {
81 flags |= Qt::ItemIsEditable;
87 if (role != Qt::EditRole)
#define QUERY_FLAG(xyz, p)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
int columnCount(const QModelIndex &parent=QModelIndex()) const
static QIcon getIcon(uint16_t faceNumber)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
static const flag_definition flags[]
AssetsManager * getManager()
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
void each(std::function< void(T *)> op)
Archetypes * archetypes()
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
int rowCount(const QModelIndex &parent=QModelIndex()) const
ArchetypesModel(ResourcesManager *resourcesManager)
virtual ~ArchetypesModel()
Qt::ItemFlags flags(const QModelIndex &index) const
std::vector< ObjectWrapper * > myMonsters
const char * properties[PROPERTY_COUNT]