diff --git a/element.cpp b/element.cpp index 4146dc9ae..5a0667e5d 100644 --- a/element.cpp +++ b/element.cpp @@ -258,10 +258,19 @@ void Element::setPos(qreal x, qreal y) { setPos(QPointF(x, y)); } +/** + Gere l'enfoncement des boutons de la souris lies a l'element +*/ +void Element::mousePressEvent(QGraphicsSceneMouseEvent *e) { + qDebug() << e; + QGraphicsItem::mousePressEvent(e); +} + /** Gere les mouvements de souris lies a l'element */ void Element::mouseMoveEvent(QGraphicsSceneMouseEvent *e) { + qDebug() << e; if (e -> buttons() & Qt::LeftButton) { QPointF oldPos = pos(); setPos(mapToParent(e -> pos()) - matrix().map(e -> buttonDownPos(Qt::LeftButton))); diff --git a/element.h b/element.h index 561d0f7aa..a49223832 100644 --- a/element.h +++ b/element.h @@ -114,6 +114,7 @@ class Element : public QGraphicsItem { protected: void drawAxes(QPainter *, const QStyleOptionGraphicsItem *); + void mousePressEvent(QGraphicsSceneMouseEvent *); void mouseMoveEvent(QGraphicsSceneMouseEvent *); void mouseReleaseEvent(QGraphicsSceneMouseEvent *); diff --git a/elements/protections/porte_fusibles/qet_directory b/elements/protections/porte_fusibles/qet_directory index 3cade7556..cc76a13f8 100644 --- a/elements/protections/porte_fusibles/qet_directory +++ b/elements/protections/porte_fusibles/qet_directory @@ -1,5 +1,6 @@ - Porte fusibles + Fuses Holder + Porte-fusibles