Terminal strip item can be added to diagram

Initial commit about graphics item of a terminal strip, Work in
progress.
This commit is contained in:
joshua
2022-08-27 21:24:25 +02:00
parent d9a0b03e23
commit ff80453f2c
13 changed files with 751 additions and 3 deletions

View File

@@ -64,6 +64,10 @@ void QetGraphicsItem::setPos(qreal x, qreal y) {
setPos(QPointF(x, y));
}
bool QetGraphicsItem::isHovered() const {
return m_hovered;
}
/**
@brief QetGraphicsItem::state
@return the current state of this item
@@ -155,3 +159,15 @@ void QetGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
event->accept();
}
}
void QetGraphicsItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event)
{
m_hovered = true;
QGraphicsObject::hoverEnterEvent(event);
}
void QetGraphicsItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
{
m_hovered = false;
QGraphicsObject::hoverLeaveEvent(event);
}