]> Shamusworld >> Repos - architektonas/blobdiff - src/base/entitycontainer.h
Major refactor of Architektonas: Jettisoning old cruft.
[architektonas] / src / base / entitycontainer.h
diff --git a/src/base/entitycontainer.h b/src/base/entitycontainer.h
deleted file mode 100644 (file)
index f055724..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-#ifndef __ENTITYCONTAINER_H__
-#define __ENTITYCONTAINER_H__
-
-#include <QtCore>
-#include "arc.h"
-#include "circle.h"
-#include "ellipse.h"
-#include "entity.h"
-#include "line.h"
-#include "point.h"
-
-/**
- * Class representing a tree of entities.
- * Typical entity containers are graphics, polylines, groups, texts, ...)
- *
- * @author Andrew Mustun
- */
-class EntityContainer: public Entity
-{
-       public:
-               EntityContainer(EntityContainer * parent = NULL, bool owner = true);
-               //EntityContainer(const EntityContainer& ec);
-               virtual ~EntityContainer();
-
-               virtual Entity * clone();
-               virtual void detach();
-               virtual RS2::EntityType rtti() const;
-               void reparent(EntityContainer * parent);
-               virtual bool isContainer() const;
-               virtual bool isAtomic() const;
-               virtual double getLength();
-
-               virtual void undoStateChanged(bool undone);
-               virtual void setVisible(bool v);
-
-               virtual bool setSelected(bool select = true);
-               virtual bool toggleSelected();
-
-               virtual void selectWindow(Vector v1, Vector v2, bool select = true, bool cross = false);
-
-               virtual void addEntity(Entity * entity);
-               virtual void insertEntity(int index, Entity * entity);
-               virtual void replaceEntity(int index, Entity * entity);
-               virtual bool removeEntity(Entity * entity);
-               virtual Entity * firstEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual Entity * lastEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual Entity * nextEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual Entity * prevEntity(RS2::ResolveLevel level = RS2::ResolveNone);
-               virtual Entity * entityAt(uint index);
-               virtual Entity * currentEntity();
-               virtual int entityAt();
-               virtual int findEntity(Entity * entity);
-               virtual void clear();
-
-       //      Q3PtrListIterator<Entity> createIterator();
-//             QListIterator<Entity *> createIterator();
-
-               virtual bool isEmpty();
-               virtual unsigned long int count();
-               virtual unsigned long int countDeep();
-               virtual unsigned long int countSelected();
-               virtual void setAutoUpdateBorders(bool enable);
-               virtual void adjustBorders(Entity * entity);
-               virtual void calculateBorders();
-               virtual void forcedCalculateBorders();
-               virtual void updateDimensions();
-               virtual void updateInserts();
-               virtual void updateSplines();
-               virtual void update();
-               virtual void renameInserts(const QString & oldName, const QString & newName);
-
-               virtual Vector getNearestEndpoint(const Vector & coord, double * dist = NULL);
-
-               Entity * getNearestEntity(const Vector & point, double * dist = NULL,
-                       RS2::ResolveLevel level = RS2::ResolveAll);
-
-               virtual Vector getNearestPointOnEntity(const Vector & coord, bool onEntity = true,
-                       double * dist = NULL, Entity ** entity = NULL);
-
-               virtual Vector getNearestCenter(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestMiddle(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestDist(double distance, const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestIntersection(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestRef(const Vector & coord, double * dist = NULL);
-               virtual Vector getNearestSelectedRef(const Vector & coord, double * dist = NULL);
-
-               virtual double getDistanceToPoint(const Vector & coord, Entity ** entity,
-                       RS2::ResolveLevel level = RS2::ResolveNone, double solidDist = RS_MAXDOUBLE);
-
-               virtual bool optimizeContours();
-
-               virtual bool hasEndpointsWithinWindow(Vector v1, Vector v2);
-
-               virtual void move(Vector offset);
-               virtual void rotate(Vector center, double angle);
-               virtual void scale(Vector center, Vector factor);
-               virtual void mirror(Vector axisPoint1, Vector axisPoint2);
-
-               virtual void stretch(Vector firstCorner, Vector secondCorner, Vector offset);
-               virtual void moveRef(const Vector & ref, const Vector & offset);
-               virtual void moveSelectedRef(const Vector & ref, const Vector & offset);
-               virtual void draw(PaintInterface * painter, GraphicView * view, double patternOffset = 0.0);
-
-               friend std::ostream & operator<<(std::ostream & os, EntityContainer & ec);
-
-       protected:
-               /** entities in the container */
-               QList<Entity *> entities;
-
-               /** sub container used only temporarly for iteration. */
-               EntityContainer * subContainer;
-
-               /**
-                * Class variable:
-                * Automatically update the borders of the container when entities
-                * are added or removed.
-                */
-               static bool autoUpdateBorders;
-
-       private:
-               QListIterator<Entity *> entityIterator;
-};
-
-#endif // __ENTITYCONTAINER_H__