mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Merge branch 'terminal_strip'
* terminal_strip: Terminal strip item can saved / loaded to .qet file See previous commit... Move terminal strip drawer class in is own file Fix wrong use of QStringLiteral and QLatin1String Double click a TerminalStripItem open the editor Minor change about checkable QAction of QetDiagramEditor Minor : corrects a minor aesthetic defect when unbridge terminals Revamp code Add and move terminal strip item are now managed by undo command TerminalStripItem : Draw terminal bridge Terminal strip item can be added to diagram Minor : add QGIUtility namespace
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user