Go to the documentation of this file.
20 #define PROPERTY_COUNT 12
39 myMonsters.push_back(resourcesManager->wrap(&arch->clone, nullptr));
58 if (role != Qt::DisplayRole && role != Qt::EditRole) {
66 if (orientation == Qt::Vertical) {
67 if (role == Qt::DisplayRole) {
69 }
else if (role == Qt::DecorationRole) {
75 if (role != Qt::DisplayRole) {
76 return QAbstractTableModel::headerData(section, orientation, role);
82 if (!
index.isValid()) {
83 return Qt::NoItemFlags;
92 int pi = ObjectWrapper::staticMetaObject.indexOfProperty(
properties[
index.column()]);
93 if (pi != -1 && ObjectWrapper::staticMetaObject.property(pi).isWritable()) {
94 flags |= Qt::ItemIsEditable;
100 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)
static const flag_definition flags[]
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
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]