7 #define RS_CLIPBOARD RS_Clipboard::instance()
14 * QCad internal clipboard. We don't use the system clipboard for
16 * Implemented as singleton.
18 * @author Andrew Mustun
27 * @return Instance to the unique clipboard object.
29 static RS_Clipboard* instance() {
30 if (uniqueInstance==NULL) {
31 uniqueInstance = new RS_Clipboard();
33 return uniqueInstance;
38 void addBlock(RS_Block* b);
39 bool hasBlock(const QString& name);
41 return graphic.countBlocks();
43 RS_Block* blockAt(int i) {
44 return graphic.blockAt(i);
47 void addLayer(RS_Layer* l);
48 bool hasLayer(const QString& name);
50 return graphic.countLayers();
52 RS_Layer* layerAt(int i) {
53 return graphic.layerAt(i);
56 void addEntity(RS_Entity* e);
59 return graphic.count();
61 RS_Entity* entityAt(uint i) {
62 return graphic.entityAt(i);
64 RS_Entity* firstEntity() {
65 return graphic.firstEntity();
68 RS_Entity* nextEntity() {
69 return graphic.nextEntity();
72 Drawing* getGraphic() {
76 friend std::ostream& operator << (std::ostream& os, RS_Clipboard& cb);
79 static RS_Clipboard* uniqueInstance;