![]() |
QElectroTech 0.100.0-dev
|
#include <diagramimageitem.h>


Public Types | |
| enum | { Type = UserType + 1007 } |
Public Member Functions | |
| DiagramImageItem (QetGraphicsItem *=nullptr) | |
| DiagramImageItem::DiagramImageItem Constructor without pixmap. | |
| DiagramImageItem (const QPixmap &pixmap, QetGraphicsItem *=nullptr) | |
| DiagramImageItem::DiagramImageItem Constructor with pixmap. | |
| ~DiagramImageItem () override | |
| DiagramImageItem::~DiagramImageItem Destructor. | |
| int | type () const override |
| virtual bool | fromXml (const QDomElement &) |
| DiagramImageItem::fromXml Load this image from xml element e. | |
| virtual QDomElement | toXml (QDomDocument &) const |
| void | editProperty () override |
| DiagramImageItem::editProperty Open the appropriate dialog to edit this image. | |
| void | setPixmap (const QPixmap &pixmap) |
| DiagramImageItem::setPixmap Set the new pixmap to be draw. | |
| QRectF | boundingRect () const override |
| DiagramImageItem::boundingRect the outer bounds of the item as a rectangle, if no pixmap are set, return a default QRectF. | |
| QString | name () const override |
| DiagramImageItem::name. | |
Public Member Functions inherited from QetGraphicsItem | |
| QetGraphicsItem (QGraphicsItem *parent=nullptr) | |
| QetGraphicsItem::QetGraphicsItem Default constructor. | |
| ~QetGraphicsItem () override=0 | |
| Diagram * | diagram () const |
| virtual void | setPos (const QPointF &p) |
| virtual void | setPos (qreal x, qreal y) |
| virtual bool | isMovable () const |
| virtual void | setMovable (bool movable) |
| bool | isHovered () const |
| QET::GraphicsItemState | state () const |
| QetGraphicsItem::state. | |
Protected Member Functions | |
| void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override |
| DiagramImageItem::paint Draw the pixmap. | |
Protected Member Functions inherited from QetGraphicsItem | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| QetGraphicsItem::mouseReleaseEvent handle mouse release click. | |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
Protected Attributes | |
| QPixmap | pixmap_ |
Protected Attributes inherited from QetGraphicsItem | |
| bool | is_movable_ |
| bool | m_first_move |
| bool | snap_to_grid_ |
| QPointF | m_mouse_to_origin_movement |
| QET::GraphicsItemState | m_state = QET:: GIOK |
This class represents a selectable, movable and editable image on a diagram.
| DiagramImageItem::DiagramImageItem | ( | QetGraphicsItem * | parent_item = nullptr | ) |
DiagramImageItem::DiagramImageItem Constructor without pixmap.
| parent_item | the parent graphics item |
| DiagramImageItem::DiagramImageItem | ( | const QPixmap & | pixmap, |
| QetGraphicsItem * | parent_item = nullptr |
||
| ) |
DiagramImageItem::DiagramImageItem Constructor with pixmap.
| pixmap | the pixmap to be draw |
| parent_item | the parent graphic item |

|
override |
DiagramImageItem::~DiagramImageItem Destructor.
|
override |
DiagramImageItem::boundingRect the outer bounds of the item as a rectangle, if no pixmap are set, return a default QRectF.

|
overridevirtual |
DiagramImageItem::editProperty Open the appropriate dialog to edit this image.
Reimplemented from QetGraphicsItem.

|
virtual |
DiagramImageItem::fromXml Load this image from xml element e.
| e |

|
overridevirtual |
Reimplemented from QetGraphicsItem.
|
overrideprotected |
DiagramImageItem::paint Draw the pixmap.
| painter | the Qpainter to use for draw the pixmap |
| option | the style option |
| widget | the QWidget where we draw the pixmap |

| void DiagramImageItem::setPixmap | ( | const QPixmap & | pixmap | ) |
DiagramImageItem::setPixmap Set the new pixmap to be draw.
| pixmap | the new pixmap |


|
virtual |
| document | Le document XML a utiliser |

|
inlineoverride |
Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a DiagramImageItem
|
protected |