]> Shamusworld >> Repos - architektonas/blobdiff - src/base/document.cpp
Major refactor of Architektonas: Jettisoning old cruft.
[architektonas] / src / base / document.cpp
diff --git a/src/base/document.cpp b/src/base/document.cpp
deleted file mode 100644 (file)
index b1d31b7..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-// document.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. :-)
-//
-
-#include "document.h"
-
-#include "debug.h"
-
-/**
- * Constructor.
- *
- * @param parent Parent of the document. Often that's NULL but
- *        for blocks it's the blocklist.
- */
-Document::Document(EntityContainer * parent):
-       EntityContainer(parent), Undo()
-{
-       DEBUG->print("Document::Document() ");
-
-       filename = "";
-       formatType = RS2::FormatUnknown;
-       setModified(false);
-       Color col(RS2::FlagByLayer);
-       activePen = Pen(col, RS2::WidthByLayer, RS2::LineByLayer);
-}
-
-Document::~Document()
-{
-}
-
-/**
- * @return true for all document entities (e.g. Graphics or Blocks).
- */
-bool Document::isDocument() const
-{
-       return true;
-}
-
-/**
- * Removes an entity from the entiy container. Implementation
- * from Undo.
- */
-void Document::removeUndoable(Undoable * u)
-{
-       if (u != NULL && u->undoRtti() == RS2::UndoableEntity)
-       {
-               removeEntity((Entity *)u);
-       }
-}
-
-/**
- * @return Currently active drawing pen.
- */
-Pen Document::getActivePen() const
-{
-       return activePen;
-}
-
-/**
- * Sets the currently active drawing pen to p.
- */
-void Document::setActivePen(Pen p)
-{
-       activePen = p;
-}
-
-/**
- * @return File name of the document currently loaded.
- * Note, that the default file name is empty.
- */
-QString Document::getFilename() const
-{
-       return filename;
-}
-
-/**
- * Sets file name for the document currently loaded.
- */
-void Document::setFilename(const QString & fn)
-{
-       filename = fn;
-}
-
-/**
- * Sets the documents modified status to 'm'.
- */
-void Document::setModified(bool m)
-{
-       //std::cout << "Document::setModified: %d" << (int)m << std::endl;
-       modified = m;
-}
-
-/**
- * @retval true The document has been modified since it was last saved.
- * @retval false The document has not been modified since it was last saved.
- */
-bool Document::isModified() const
-{
-       return modified;
-}
-
-/**
- * Overwritten to set modified flag before starting an undo cycle.
- */
-void Document::startUndoCycle()
-{
-       setModified(true);
-       Undo::startUndoCycle();
-}