* @param name The name of the block used as an identifier.
* @param basePoint Base point (offset) of the block.
*/
-RS_Block::RS_Block(RS_EntityContainer * parent, const RS_BlockData & d):
- RS_Document(parent), data(d)
+Block::Block(EntityContainer * parent, const BlockData & d):
+ Document(parent), data(d)
{
- pen = RS_Pen(RS_Color(128, 128, 128), RS2::Width01, RS2::SolidLine);
+ pen = Pen(Color(128, 128, 128), RS2::Width01, RS2::SolidLine);
}
-RS_Block::~RS_Block()
+Block::~Block()
{
}
-RS_Entity * RS_Block::clone()
+Entity * Block::clone()
{
- RS_Block * blk = new RS_Block(*this);
+ Block * blk = new Block(*this);
#warning "!!! Need to port setAutoDelete() behaviour from Qt3 to Qt4 !!!"
// blk->entities.setAutoDelete(entities.autoDelete());
blk->detach();
return blk;
}
-RS_LayerList * RS_Block::getLayerList()
+LayerList * Block::getLayerList()
{
Drawing * g = getGraphic();
- if (g != NULL)
+ if (g)
return g->getLayerList();
return NULL;
}
-RS_BlockList * RS_Block::getBlockList()
+BlockList * Block::getBlockList()
{
Drawing * g = getGraphic();
- if (g != NULL)
+ if (g)
return g->getBlockList();
return NULL;
}
-bool RS_Block::save()
+bool Block::save()
{
Drawing * g = getGraphic();
- if (g != NULL)
+ if (g)
return g->save();
return false;
}
-bool RS_Block::saveAs(const QString & filename, RS2::FormatType type)
+bool Block::saveAs(const QString & filename, RS2::FormatType type)
{
Drawing * g = getGraphic();
- if (g != NULL)
+ if (g)
return g->saveAs(filename, type);
return false;
/**
* Sets the parent documents modified status to 'm'.
*/
-void RS_Block::setModified(bool m)
+void Block::setModified(bool m)
{
Drawing * p = getGraphic();
}
/** @return RS2::EntityBlock */
-/*virtual*/ RS2::EntityType RS_Block::rtti() const
+/*virtual*/ RS2::EntityType Block::rtti() const
{
return RS2::EntityBlock;
}
/**
* @return Name of this block (the name is an Id for this block).
*/
-QString RS_Block::getName() const
+QString Block::getName() const
{
return data.name;
}
/**
* @return base point of this block.
*/
-Vector RS_Block::getBasePoint() const
+Vector Block::getBasePoint() const
{
return data.basePoint;
}
/**
- * Reimplementation from RS_Document. Does nothing.
+ * Reimplementation from Document. Does nothing.
*/
-/*virtual*/ void RS_Block::newDoc()
+/*virtual*/ void Block::newDoc()
{
// do nothing
}
/**
- * Reimplementation from RS_Document. Does nothing.
+ * Reimplementation from Document. Does nothing.
*/
-/*virtual*/ bool RS_Block::open(const QString &, RS2::FormatType)
+/*virtual*/ bool Block::open(const QString &, RS2::FormatType)
{
// do nothing
return false;
}
-/*friend*/ std::ostream & operator<<(std::ostream & os, const RS_Block & b)
+/*friend*/ std::ostream & operator<<(std::ostream & os, const Block & b)
{
os << " name: " << b.getName().toLatin1().data() << std::endl;
- os << " entities: " << (RS_EntityContainer &)b << std::endl;
+ os << " entities: " << (EntityContainer &)b << std::endl;
return os;
}
* sets a new name for the block. Only called by blocklist to
* assure that block names stay unique.
*/
-void RS_Block::setName(const QString & n)
+void Block::setName(const QString & n)
{
data.name = n;
}
* @retval true if this block is frozen (invisible)
* @retval false if this block isn't frozen (visible)
*/
-bool RS_Block::isFrozen() const
+bool Block::isFrozen() const
{
return data.frozen;
}
* Toggles the visibility of this block.
* Freezes the block if it's not frozen, thaws the block otherwise
*/
-void RS_Block::toggle()
+void Block::toggle()
{
data.frozen = !data.frozen;
}
*
* @param freeze true: freeze, false: defreeze
*/
-void RS_Block::freeze(bool freeze)
+void Block::freeze(bool freeze)
{
data.frozen = freeze;
}