]> Shamusworld >> Repos - architektonas/blobdiff - src/base/clipboard.cpp
Major refactor of Architektonas: Jettisoning old cruft.
[architektonas] / src / base / clipboard.cpp
diff --git a/src/base/clipboard.cpp b/src/base/clipboard.cpp
deleted file mode 100644 (file)
index 943781a..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-// clipboard.cpp
-//
-// Part of the Architektonas Project
-// Originally part of QCad Community Edition by Andrew Mustun
-// Extensively rewritten and refactored by James L. Hammons
-// Portions copyright (C) 2001-2003 RibbonSoft
-// Copyright (C) 2010 Underground Software
-// See the README and GPLv2 files for licensing and warranty information
-//
-// JLH = James L. Hammons <jlhamm@acm.org>
-//
-// Who  When        What
-// ---  ----------  -----------------------------------------------------------
-// JLH  05/28/2010  Added this text. :-)
-// JLH  09/09/2010  Removed implementation from header (where it DOESN'T
-//                  belong) and moved it here (where it DOES)
-//
-
-#include "clipboard.h"
-
-#include "block.h"
-#include "layer.h"
-#include "entity.h"
-
-Clipboard * Clipboard::uniqueInstance = NULL;
-
-void Clipboard::clear()
-{
-       graphic.clear();
-       graphic.clearBlocks();
-       graphic.clearLayers();
-       graphic.clearVariables();
-}
-
-void Clipboard::addBlock(Block * b)
-{
-       if (b)
-               graphic.addBlock(b, false);
-}
-
-bool Clipboard::hasBlock(const QString & name)
-{
-       return (graphic.findBlock(name) != NULL);
-}
-
-void Clipboard::addLayer(Layer * l)
-{
-       if (l)
-               graphic.addLayer(l);
-}
-
-bool Clipboard::hasLayer(const QString & name)
-{
-       return (graphic.findLayer(name) != NULL);
-}
-
-void Clipboard::addEntity(Entity * e)
-{
-       if (e)
-       {
-               graphic.addEntity(e);
-               e->reparent(&graphic);
-       }
-}
-
-/**
- * Dumps the clipboard contents to stdout.
- */
-std::ostream & operator<<(std::ostream & os, Clipboard & cb)
-{
-       os << "Clipboard: " << cb.graphic << "\n";
-       return os;
-}
-
-Clipboard::Clipboard()
-{
-}
-
-/**
- * @return Instance to the unique clipboard object.
- */
-/*static*/ Clipboard * Clipboard::instance()
-{
-       if (uniqueInstance == NULL)
-               uniqueInstance = new Clipboard();
-
-       return uniqueInstance;
-}
-
-int Clipboard::countBlocks()
-{
-       return graphic.countBlocks();
-}
-
-Block * Clipboard::blockAt(int i)
-{
-       return graphic.blockAt(i);
-}
-
-int Clipboard::countLayers()
-{
-       return graphic.countLayers();
-}
-
-Layer * Clipboard::layerAt(int i)
-{
-       return graphic.layerAt(i);
-}
-
-uint Clipboard::count()
-{
-       return graphic.count();
-}
-
-Entity * Clipboard::entityAt(uint i)
-{
-       return graphic.entityAt(i);
-}
-
-Entity * Clipboard::firstEntity()
-{
-       return graphic.firstEntity();
-}
-
-Entity * Clipboard::nextEntity()
-{
-       return graphic.nextEntity();
-}
-
-Drawing * Clipboard::getGraphic()
-{
-       return &graphic;
-}