X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fdocument.h;fp=src%2Fbase%2Fdocument.h;h=0000000000000000000000000000000000000000;hb=9f6ad3fe0b9cb30115a5d38e8af3aebed0d70c08;hp=a8cf645d93f5ab493f895f572f4e49f1b8ce1e6a;hpb=43c13b052d069ba435277d93867380d00c04931f;p=architektonas diff --git a/src/base/document.h b/src/base/document.h deleted file mode 100644 index a8cf645..0000000 --- a/src/base/document.h +++ /dev/null @@ -1,55 +0,0 @@ -#ifndef __DOCUMENT_H__ -#define __DOCUMENT_H__ - -#include -#include "entitycontainer.h" -#include "undo.h" - -class BlockList; -class LayerList; - -/** - * Base class for documents. Documents can be either Drawings or Blocks and are - * typically shown in graphic views. Documents hold an active pen for drawing - * in the Document, a file name and they know whether they have been modified - * or not. - * - * @author James Hammons - * @author Andrew Mustun - */ -class Document: public EntityContainer, public Undo -{ - public: - Document(EntityContainer * parent = NULL); - virtual ~Document(); - - virtual LayerList * getLayerList() = 0; - virtual BlockList * getBlockList() = 0; - - virtual void newDoc() = 0; - virtual bool save() = 0; - virtual bool saveAs(const QString &filename, RS2::FormatType type) = 0; - virtual bool open(const QString &filename, RS2::FormatType type) = 0; - - virtual bool isDocument() const; - virtual void removeUndoable(Undoable * u); - Pen getActivePen() const; - void setActivePen(Pen p); - QString getFilename() const; - void setFilename(const QString & fn); - virtual void setModified(bool m); - virtual bool isModified() const; - virtual void startUndoCycle(); - - protected: - /** Flag set if the document was modified and not yet saved. */ - bool modified; - /** Active pen. */ - Pen activePen; - /** File name of the document or empty for a new document. */ - QString filename; - /** Format type */ - RS2::FormatType formatType; -}; - -#endif