DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DA::DAGraphicsLabelItem类 参考

The DAGraphicsLabelItem class 更多...

#include <DAGraphicsLabelItem.h>

类 DA::DAGraphicsLabelItem 继承关系图:
DA::DAXMLFileInterface

class  PrivateData
 

Public 类型

enum  { Type = DA::ItemType_DAGraphicsLabelItem }
 适用qgraphicsitem_cast
 

Public 成员函数

int type () const override
 
 DAGraphicsLabelItem (QGraphicsItem *parent=nullptr)
 
 DAGraphicsLabelItem (const QString &str, QGraphicsItem *parent=nullptr)
 
virtual bool saveToXml (QDomDocument *doc, QDomElement *parentElement, const QVersionNumber &ver) const override
 
virtual bool loadFromXml (const QDomElement *itemElement, const QVersionNumber &ver) override
 
uint64_t getItemID () const
 
void setItemID (uint64_t id)
 
void setRelativePosition (qreal xp, qreal yp)
 
QPointF getRelativePosition () const
 
bool isHaveRelativePosition () const
 
void setAttachPoint (DAShapeKeyPoint parentAttachPoint)
 设置相对贴附位置
 
void setOriginPoint (DAShapeKeyPoint originPoint)
 
DAShapeKeyPoint getOriginPoint () const
 
void updatePosition ()
 更新位置
 
void setSelectable (bool on)
 

Protected 成员函数

virtual QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 DA::DAXMLFileInterface
template<typename std_container_like >
static QDomElement makeElement (const std_container_like &v, const QString &tagName, QDomDocument *doc)
 生成一个文本
 
template<typename std_container_like >
static bool loadElement (std_container_like &v, const QDomElement *ele)
 加载文本
 
static QDomElement makeSysInfoElement (const QString &tagName, QDomDocument *doc)
 
static void appendElementWithText (QDomElement &parent, const QString &tagName, const QString &text, QDomDocument *doc)
 在parent下,插入一个tag,tag下包含文字text
 

详细描述

成员函数说明

◆ loadFromXml()

bool DA::DAGraphicsLabelItem::loadFromXml ( const QDomElement *  itemElement,
const QVersionNumber &  ver 
)
overridevirtual

◆ saveToXml()

bool DA::DAGraphicsLabelItem::saveToXml ( QDomDocument *  doc,
QDomElement *  parentElement,
const QVersionNumber &  ver 
) const
overridevirtual

◆ setAttachPoint()

void DA::DAGraphicsLabelItem::setAttachPoint ( DAShapeKeyPoint  parentAttachPoint)

设置相对贴附位置

TopLeft TopCenter TopRight
(0,0)----------(0.5,0)------------(1,0)
| |
|CenterLeft Center CenterRight|
(0,0.5) (0.5,0.5) (1,0.5)
| |
|BottomLeft BottomCenter BottomRight|
(0,1)----------(0.5,1)------------(1,1)
参数
parentAttachPoint

该类的文档由以下文件生成: