* @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;
}
/**
* Sets the currently active drawing pen to p.
*/
-void RS_Document::setActivePen(RS_Pen 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 RS_Document::getFilename() const
+QString Document::getFilename() const
{
return filename;
}
/**
* Sets file name for the document currently loaded.
*/
-void RS_Document::setFilename(const QString & fn)
+void Document::setFilename(const QString & fn)
{
filename = 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;
}
* @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;
}
/**
* Overwritten to set modified flag before starting an undo cycle.
*/
-void RS_Document::startUndoCycle()
+void Document::startUndoCycle()
{
setModified(true);
- RS_Undo::startUndoCycle();
+ Undo::startUndoCycle();
}