arena.h
Go to the documentation of this file.
00001 #ifndef ARENA_H
00002 #define ARENA_H
00003 
00004 #include <QObject>
00005 #include <QPoint>
00006 
00007 class ArenaElement;
00008 class ArenaElementTypeRegistry;
00009 
00010 class Arena : public QObject
00011 {
00012     Q_OBJECT
00013 
00014 public:
00015     Arena(ArenaElementTypeRegistry* typeRegistry);
00016     ~Arena();
00017 
00019     void load(const QString& filename);
00021     void save(const QString& filename);
00023     void saveWorld(const QString& filename);
00024     void saveWorldSdf(const QString& filename);
00025 
00027     ArenaElement* addElement(const QString& elementType);
00029     void addElement(ArenaElement *element);
00032     void removeElement(ArenaElement* element);
00033 
00035     void clear();
00036 
00037     QList<ArenaElement*> elements() { return m_elements; }
00038     QList<ArenaElement*> elementsAt(const QPoint &pos) const;
00039 
00042     ArenaElement *contextElement(ArenaElement *element) const;
00043 
00044 signals:
00045     void elementAdded(ArenaElement *element);
00046     void elementRemoved(ArenaElement *element);
00047 
00048     void modified();
00049 
00050 private slots:
00051     void slotModified();
00052 
00053 private:
00054     ArenaElementTypeRegistry * const m_typeRegistry;
00055     QList<ArenaElement*> m_elements;
00056 };
00057 
00058 #endif // ARENA_H


hector_nist_arena_designer
Author(s): Stefan Kohlbrecher , Johannes Simon
autogenerated on Wed Oct 4 2017 03:29:29