+++ /dev/null
-#ifndef __DOCUMENT_H__
-#define __DOCUMENT_H__
-
-#include <QtCore>
-#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