-class RS_Clipboard {
-protected:
- RS_Clipboard() {
- }
-
-public:
- /**
- * @return Instance to the unique clipboard object.
- */
- static RS_Clipboard* instance() {
- if (uniqueInstance==NULL) {
- uniqueInstance = new RS_Clipboard();
- }
- return uniqueInstance;
- }
-
- void clear();
-
- void addBlock(RS_Block* b);
- bool hasBlock(const QString& name);
- int countBlocks() {
- return graphic.countBlocks();
- }
- RS_Block* blockAt(int i) {
- return graphic.blockAt(i);
- }
-
- void addLayer(RS_Layer* l);
- bool hasLayer(const QString& name);
- int countLayers() {
- return graphic.countLayers();
- }
- RS_Layer* layerAt(int i) {
- return graphic.layerAt(i);
- }
-
- void addEntity(RS_Entity* e);
-
- uint count() {
- return graphic.count();
- }
- RS_Entity* entityAt(uint i) {
- return graphic.entityAt(i);
- }
- RS_Entity* firstEntity() {
- return graphic.firstEntity();
- }
-
- RS_Entity* nextEntity() {
- return graphic.nextEntity();
- }
-
- Drawing* getGraphic() {
- return &graphic;
- }
-
- friend std::ostream& operator << (std::ostream& os, RS_Clipboard& cb);
-
-protected:
- static RS_Clipboard* uniqueInstance;
-
- Drawing graphic;
+class Clipboard
+{
+ protected:
+ Clipboard();
+
+ public:
+ static Clipboard * instance();
+
+ void clear();
+ void addBlock(Block * b);
+ bool hasBlock(const QString & name);
+ int countBlocks();
+ Block * blockAt(int i);
+ void addLayer(Layer* l);
+ bool hasLayer(const QString & name);
+ int countLayers();
+ Layer * layerAt(int i);
+ void addEntity(Entity * e);
+ uint count();
+ Entity * entityAt(uint i);
+ Entity * firstEntity();
+ Entity * nextEntity();
+ Drawing * getGraphic();
+
+ friend std::ostream & operator<<(std::ostream & os, Clipboard & cb);
+
+ protected:
+ static Clipboard * uniqueInstance;
+
+ Drawing graphic;