1 #ifndef __BLOCKLIST_H__
2 #define __BLOCKLIST_H__
6 //#include "blocklistlistener.h"
14 * @author Andrew Mustun
19 RS_BlockList(bool owner = false);
20 virtual ~RS_BlockList();
24 RS_Block * at(uint i);
25 void activate(const QString & name);
26 void activate(RS_Block * block);
27 RS_Block * getActive();
28 virtual bool add(RS_Block * block, bool notify = true);
29 virtual void addNotification();
30 virtual void remove(RS_Block * block);
31 virtual bool rename(RS_Block * block, const QString & name);
32 //virtual void editBlock(RS_Block* block, const RS_Block& source);
33 RS_Block * find(const QString & name);
34 QString newName(const QString & suggestion = "");
35 void toggle(const QString & name);
36 void toggle(RS_Block * block);
37 void freezeAll(bool freeze);
38 // void addListener(RS_BlockListListener * listener);
39 // void removeListener(RS_BlockListListener * listener);
40 void setModified(bool m);
41 virtual bool isModified() const;
43 friend std::ostream & operator<<(std::ostream & os, RS_BlockList & b);
46 //! Is the list owning the blocks?
48 //! Blocks in the graphic
49 QList<RS_Block *> blocks;
50 //! List of registered BlockListListeners
51 // QList<RS_BlockListListener *> blockListListeners;
52 //! Currently active block
53 RS_Block * activeBlock;
54 /** Flag set if the layer list was modified and not yet saved. */