EObject::EObject(qreal w,qreal h,qreal m, QGraphicsItem *parent) :width(w),height(h),margin(m), QGraphicsItem(parent) { setAcceptDrops(true); setAcceptsHoverEvents(true); setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable); createResizeFocus(); }
void KUnitItem::init() { setAcceptDrops(true); setAcceptHoverEvents(true); setFlags(QGraphicsItem::ItemIsMovable | QGraphicsItem::ItemIsSelectable | QGraphicsItem::ItemIsFocusable); m_frame = QRectF(0, 0, 0, 0); createResizeFocus(); createRotateItem(); }