X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fbase%2Fdocument.cpp;fp=src%2Fbase%2Fdocument.cpp;h=b1d31b754c9399f2825edffeb359b2e87e1174f3;hb=16354e0421b316a62c6b9f7b0b4f3b8cf6f06284;hp=cd8503e1f79a813a41ff7e981476e4df2fb7e306;hpb=3239ef39dcee08fa6e8cd68cdf2727fc68cc7a8c;p=architektonas diff --git a/src/base/document.cpp b/src/base/document.cpp index cd8503e..b1d31b7 100644 --- a/src/base/document.cpp +++ b/src/base/document.cpp @@ -24,46 +24,46 @@ * @param parent Parent of the document. Often that's NULL but * for blocks it's the blocklist. */ -RS_Document::RS_Document(RS_EntityContainer * parent): - RS_EntityContainer(parent), RS_Undo() +Document::Document(EntityContainer * parent): + EntityContainer(parent), Undo() { - RS_DEBUG->print("RS_Document::RS_Document() "); + DEBUG->print("Document::Document() "); filename = ""; formatType = RS2::FormatUnknown; setModified(false); - RS_Color col(RS2::FlagByLayer); - activePen = RS_Pen(col, RS2::WidthByLayer, RS2::LineByLayer); + Color col(RS2::FlagByLayer); + activePen = Pen(col, RS2::WidthByLayer, RS2::LineByLayer); } -RS_Document::~RS_Document() +Document::~Document() { } /** * @return true for all document entities (e.g. Graphics or Blocks). */ -bool RS_Document::isDocument() const +bool Document::isDocument() const { return true; } /** * Removes an entity from the entiy container. Implementation - * from RS_Undo. + * from Undo. */ -void RS_Document::removeUndoable(RS_Undoable * u) +void Document::removeUndoable(Undoable * u) { if (u != NULL && u->undoRtti() == RS2::UndoableEntity) { - removeEntity((RS_Entity *)u); + removeEntity((Entity *)u); } } /** * @return Currently active drawing pen. */ -RS_Pen RS_Document::getActivePen() const +Pen Document::getActivePen() const { return activePen; } @@ -71,7 +71,7 @@ RS_Pen RS_Document::getActivePen() const /** * Sets the currently active drawing pen to p. */ -void RS_Document::setActivePen(RS_Pen p) +void Document::setActivePen(Pen p) { activePen = p; } @@ -80,7 +80,7 @@ void RS_Document::setActivePen(RS_Pen p) * @return File name of the document currently loaded. * Note, that the default file name is empty. */ -QString RS_Document::getFilename() const +QString Document::getFilename() const { return filename; } @@ -88,7 +88,7 @@ QString RS_Document::getFilename() const /** * Sets file name for the document currently loaded. */ -void RS_Document::setFilename(const QString & fn) +void Document::setFilename(const QString & fn) { filename = fn; } @@ -96,9 +96,9 @@ void RS_Document::setFilename(const QString & fn) /** * Sets the documents modified status to 'm'. */ -void RS_Document::setModified(bool m) +void Document::setModified(bool m) { - //std::cout << "RS_Document::setModified: %d" << (int)m << std::endl; + //std::cout << "Document::setModified: %d" << (int)m << std::endl; modified = m; } @@ -106,7 +106,7 @@ void RS_Document::setModified(bool 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 RS_Document::isModified() const +bool Document::isModified() const { return modified; } @@ -114,8 +114,8 @@ bool RS_Document::isModified() const /** * Overwritten to set modified flag before starting an undo cycle. */ -void RS_Document::startUndoCycle() +void Document::startUndoCycle() { setModified(true); - RS_Undo::startUndoCycle(); + Undo::startUndoCycle(); }