1#ifndef DAGRAPHICSITEM_H
2#define DAGRAPHICSITEM_H
3#include <QGraphicsObject>
4#include "DAUtils/DAXMLFileInterface.h"
5#include "DAGraphicsViewGlobal.h"
27 virtual int type()
const override
36 virtual bool saveToXml(QDomDocument* doc, QDomElement* parentElement,
const QVersionNumber& ver)
const override;
37 virtual bool loadFromXml(
const QDomElement* parentElement,
const QVersionNumber& ver)
override;
39 void setBorderPen(
const QPen& p);
40 QPen getBorderPen()
const;
42 void setShowBorder(
bool on);
43 bool isShowBorder()
const;
45 void setSelectable(
bool on =
true);
46 bool isSelectable()
const;
48 void setMovable(
bool on =
true);
49 bool isMovable()
const;
51 void setBackgroundBrush(
const QBrush& b);
52 QBrush getBackgroundBrush()
const;
54 void enableShowBackground(
bool on);
55 bool isShowBackground()
const;
57 virtual void groupPositionChanged(
const QPointF& p);
59 void setScenePos(
const QPointF& p);
60 void setScenePos(qreal x, qreal y);
62 uint64_t getItemID()
const;
63 void setItemID(uint64_t
id);
67 bool isSceneReadOnly()
const;
72 virtual QVariant itemChange(QGraphicsItem::GraphicsItemChange change,
const QVariant& value)
override;
DAGraphicsView的基本元件
Definition DAGraphicsItem.h:19
这是带着undostack的GraphicsScene 此QGraphicsScene支持:
Definition DAGraphicsScene.h:30
所有支持xml文件保存的类继承于它,从而提供saveToXml和loadFromXml接口
Definition DAXMLFileInterface.h:29
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44
@ ItemType_DAGraphicsItem
针对DAGraphicsResizeableItem的类型
Definition DAGraphicsViewGlobal.h:75