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)
ArchetypesModel(ResourcesManager *resourcesManager)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
std::vector< ObjectWrapper * > myMonsters
#define QUERY_FLAG(xyz, p)
arch
DIALOGCHECK MINARGS 1 MAXARGS 1
virtual ~ArchetypesModel()
static const flag_definition flags[]
the faster the spell may be cast there are several other common only the caster may be affected by the spell The most common spell range is that of touch This denotes that the caster much touch the recipient of the spell in order to release the spell monster
AssetsManager * getManager()
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Archetypes * archetypes()
int columnCount(const QModelIndex &parent=QModelIndex()) const
int rowCount(const QModelIndex &parent=QModelIndex()) const
void each(std::function< void(T *)> op)
const char * properties[PROPERTY_COUNT]
static QIcon getIcon(uint16_t faceNumber)
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const
Qt::ItemFlags flags(const QModelIndex &index) const