DiagramDesigner/diagramCavas/source/graphicsItem/itemControlHandle.cpp

53 lines
978 B
C++
Raw Permalink Normal View History

2024-12-03 20:07:25 +08:00
#include "graphicsItem/itemControlHandle.h"
#include <QPainter>
ItemControlHandle::ItemControlHandle(QGraphicsItem *parent)
: QGraphicsItem(parent)
,_parent(nullptr)
2024-12-03 20:07:25 +08:00
{
m_type = T_resize;
m_tag = H_none;
2024-12-07 17:24:36 +08:00
m_enable = true;
m_ifShow = true;
2024-12-03 20:07:25 +08:00
}
ItemControlHandle::~ItemControlHandle()
{
}
void ItemControlHandle::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
{
Q_UNUSED(option)
Q_UNUSED(widget)
}
void ItemControlHandle::hoverEnterEvent(QGraphicsSceneHoverEvent* event)
{
QGraphicsItem::hoverEnterEvent(event);
2024-12-03 20:07:25 +08:00
}
void ItemControlHandle::hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
{
QGraphicsItem::hoverLeaveEvent(event);
2024-12-03 20:07:25 +08:00
}
int ItemControlHandle::getSize()
{
int nSize = HNDLE_SIZE;
return nSize;
}
void ItemControlHandle::move(double x, double y)
{
setPos(x, y);
}
2025-02-06 16:36:50 +08:00
void ItemControlHandle::setText(QString s)
{
}
QString ItemControlHandle::getText() const
{
return QString();
}