]> Shamusworld >> Repos - architektonas/blobdiff - src/base/block.h
Major refactor of Architektonas: Jettisoning old cruft.
[architektonas] / src / base / block.h
diff --git a/src/base/block.h b/src/base/block.h
deleted file mode 100644 (file)
index c016d0e..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#ifndef __BLOCK_H__
-#define __BLOCK_H__
-
-#include <QtCore>
-#include "document.h"
-
-/**
- * Holds the data that defines a block.
- */
-class BlockData
-{
-       public:
-               BlockData() {}
-
-               BlockData(const QString & name1, const Vector & basePoint1, bool frozen1):
-                       name(name1), basePoint(basePoint1), frozen(frozen1) {}
-
-               bool isValid()
-               {
-                       return (!name.isEmpty() && basePoint.valid);
-               }
-
-       public:
-               /**
-                * Block name. Acts as an id.
-                */
-               QString name;
-               /**
-                * Base point of the Block. Usually 0/0 since blocks can be moved around
-                * using the insertion point of Insert entities.
-                */
-               Vector basePoint;
-               //! Frozen flag
-               bool frozen;
-};
-
-/**
- * A block is a group of entities. A block unlike an other entity
- * container has a base point which defines the offset of the
- * block. Note that although technically possible, a block should
- * never be part of the entity tree of a graphic. Blocks are
- * stored in a seperate list inside the graphic document (a block list).
- * The graphic can contain Insert entities that refer to such
- * blocks.
- *
- * blocks are documents and can therefore be handled by graphic views.
- *
- * @author Andrew Mustun
- */
-class Block: public Document
-{
-               friend class BlockList;
-
-       public:
-               Block(EntityContainer * parent, const BlockData & d);
-               virtual ~Block();
-
-               virtual Entity * clone();
-               virtual RS2::EntityType rtti() const;
-               QString getName() const;
-               Vector getBasePoint() const;
-               virtual LayerList * getLayerList();
-               virtual BlockList * getBlockList();
-               virtual void newDoc();
-               virtual bool save();
-               virtual bool saveAs(const QString & filename, RS2::FormatType type);
-               virtual bool open(const QString &, RS2::FormatType);
-               friend std::ostream & operator<<(std::ostream & os, const Block & b);
-               void setName(const QString & n);
-               bool isFrozen() const;
-               void toggle();
-               void freeze(bool freeze);
-               virtual void setModified(bool m);
-
-       protected:
-               /**
-               * Base point of the Block. Usually 0/0 since blocks can be moved around
-               * using the insertion point of Insert entities.
-               */
-               //Vector basePoint;
-               /**
-               * Block name. Acts as an id.
-               */
-               //QString name;
-               //! Block data
-               BlockData data;
-};
-
-#endif