NCL Composer  0.1.5
 All Classes Functions Variables Pages
qnstentity.h
1 #ifndef QNSTENTITY_H
2 #define QNSTENTITY_H
3 
4 #include <QUuid>
5 #include <QString>
6 #include <QSet>
7 #include <QMap>
8 
9 #include "qnst.h"
10 
11 typedef Qnst::EntityType QnstType;
12 
14 {
15 public:
16  QnstEntity(QnstEntity* parent = 0);
17 
18  ~QnstEntity();
19 
20  QString getnstId() const;
21 
22  virtual void setnstId(const QString &id);
23 
24  QString getnstUid() const;
25 
26  void setnstUid(const QString &uid);
27 
28  QnstType getnstType() const;
29 
30  virtual void setnstType(QnstType type);
31 
32  QMap <QString, QString> getUsrData();
33 
34  void setUsrData(QMap <QString, QString> userData);
35 
36  QnstEntity* getnstParent() const;
37 
38  void setnstParent(QnstEntity* parent);
39 
40  QSet<QnstEntity*> getnstEntities();
41 
42  void addnstEntity(QnstEntity* entity);
43 
44  void removenstEntity(QnstEntity* entity);
45 
46  bool isMedia();
47 
48  virtual void getProperties(QMap <QString, QString> &props) { (void) props;}
49 
50 
51 private:
52  QString id;
53 
54  QString uid;
55 
56  QnstType type;
57 
58  QnstEntity* parent;
59 
60  QSet<QnstEntity*> entities;
61 
62  // FIXME: Maybe, this is not needed!! We could use the
63  QMap <QString, QString> userData;
64 };
65 
66 #endif // QNSTENTITY_H