代码拉取完成,页面将自动刷新
#ifndef GROUPELEMENT_H
#define GROUPELEMENT_H
#include "baseelement.h"
class BaseGroupElement : public BaseElement
{
Q_OBJECT
public:
BaseGroupElement(BaseElement *parent, BaseSpace *space, QRectF initRect);
void addToGroup(BaseElement *element);
void removeFromGroup(BaseElement *element);
bool isObscuredBy(const QGraphicsItem *item) const override;
QPainterPath opaqueArea() const override;
inline QList<BaseElement *> childElements() const { return m_childElements;}
//remove all elements from list and reset their parent to scene
void clear();
protected:
BasePicker *createPicker() override;
private:
QList<BaseElement *> m_childElements;
};
class GroupPickerElement : public BaseGroupElement
{
Q_OBJECT
enum { Type = QGraphicsItem::UserType + GRAPHICSITEM_TYPE_GROUP_PICKER};
public:
int type() const override
{
// Enable the use of qgraphicsitem_cast with this item.
return Type;
}
GroupPickerElement(
BaseSpace * space
);
};
class GroupElement : public BaseGroupElement
{
Q_OBJECT
enum { Type = QGraphicsItem::UserType + GRAPHICSITEM_TYPE_GROUP};
public:
int type() const override
{
// Enable the use of qgraphicsitem_cast with this item.
return Type;
}
GroupElement(
BaseElement *parent,
BaseSpace * space);
};
#endif // GROUPELEMENT_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。