arenaelementtype.h
Go to the documentation of this file.
1 #ifndef ARENAELEMENTTYPE_H
2 #define ARENAELEMENTTYPE_H
3 
4 #include <QString>
5 #include <QPixmap>
6 #include <QDomElement>
7 #include <QDir>
8 #include <QFileInfo>
9 #include <QPair>
10 
11 #include "xmlloadingexception.h"
12 
13 typedef QPair<QString, QString> QStringPair;
14 typedef QPair<QString, QPointF> ItemMountPoint;
15 
16 class ArenaElement;
17 
19 {
21 
22 public:
23  enum Type
24  {
31  };
32 
34 
40  bool load(const QDir &folderDir);
41 
43 
44  QString name() const { return m_name; }
45  QPixmap pixmap() const { return m_pixmap; }
46  QString mesh() const { return m_mesh; }
47  Type type() const { return m_type; }
48  QVector<QStringPair> metaInfos() const { return m_metaInfos; }
49 
51  QString humanReadableName() const;
52 
55  QList<ItemMountPoint> itemMountPoints() const { return m_itemMountPoints; }
56 
57 private:
58  QList<ItemMountPoint> m_itemMountPoints;
59  QVector<QStringPair> m_metaInfos;
60  QString m_name;
61  QString m_mesh;
62  QPixmap m_pixmap;
64  mutable int m_instanceCount;
65 };
66 
67 #endif // ARENAELEMENTTYPE_H
Item freely movable within a grid point.
QPair< QString, QString > QStringPair
Type type() const
QList< ItemMountPoint > itemMountPoints() const
bool load(const QDir &folderDir)
QPixmap pixmap() const
QString mesh() const
QVector< QStringPair > metaInfos() const
QPair< QString, QPointF > ItemMountPoint
QVector< QStringPair > m_metaInfos
QList< ItemMountPoint > m_itemMountPoints
Item that can be mounted to a wall element.
ArenaElement * createInstance() const
QString name() const
QString humanReadableName() const
Returns the "Name" meta info field if it exists, otherwise name()


hector_nist_arena_designer
Author(s): Stefan Kohlbrecher , Johannes Simon
autogenerated on Fri Aug 21 2020 10:45:27