+++ /dev/null
-#ifndef __BLOCKLIST_H__
-#define __BLOCKLIST_H__
-
-#include <QtCore>
-#include "block.h"
-//#include "blocklistlistener.h"
-#include "entity.h"
-
-/**
- * List of blocks.
- *
- * @see Block
- *
- * @author Andrew Mustun
- */
-class BlockList
-{
- public:
- BlockList(bool owner = false);
- virtual ~BlockList();
-
- void clear();
- uint count();
- Block * at(uint i);
- void activate(const QString & name);
- void activate(Block * block);
- Block * getActive();
- virtual bool add(Block * block, bool notify = true);
- virtual void addNotification();
- virtual void remove(Block * block);
- virtual bool rename(Block * block, const QString & name);
- //virtual void editBlock(Block* block, const Block& source);
- Block * find(const QString & name);
- QString newName(const QString & suggestion = "");
- void toggle(const QString & name);
- void toggle(Block * block);
- void freezeAll(bool freeze);
-// void addListener(BlockListListener * listener);
-// void removeListener(BlockListListener * listener);
- void setModified(bool m);
- virtual bool isModified() const;
-
- friend std::ostream & operator<<(std::ostream & os, BlockList & b);
-
- private:
- //! Is the list owning the blocks?
- bool owner;
- //! Blocks in the graphic
- QList<Block *> blocks;
- //! List of registered BlockListListeners
-// QList<BlockListListener *> blockListListeners;
- //! Currently active block
- Block * activeBlock;
- /** Flag set if the layer list was modified and not yet saved. */
- bool modified;
-};
-
-#endif