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