4 Star 36 Fork 13

ITVENTI科技/WorkXP

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
groupelement.h 1.40 KB
一键复制 编辑 原始数据 按行查看 历史
huanglingzhi 提交于 2020-06-29 18:07 . Let's roll
#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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/itventi/workxp.git
git@gitee.com:itventi/workxp.git
itventi
workxp
WorkXP
master

搜索帮助