|
QElectroTech
0.70
|
#include <diagramimageitem.h>
Public Types | |
| enum | { Type = UserType + 1007 } |
Public Member Functions | |
| DiagramImageItem (QetGraphicsItem *=nullptr) | |
| DiagramImageItem::DiagramImageItem Constructor without pixmap. More... | |
| DiagramImageItem (const QPixmap &pixmap, QetGraphicsItem *=nullptr) | |
| DiagramImageItem::DiagramImageItem Constructor with pixmap. More... | |
| ~DiagramImageItem () override | |
| DiagramImageItem::~DiagramImageItem Destructor. More... | |
| int | type () const override |
| virtual bool | fromXml (const QDomElement &) |
| DiagramImageItem::fromXml Load this image fro xml elemebt . More... | |
| virtual QDomElement | toXml (QDomDocument &) const |
| void | editProperty () override |
| DiagramImageItem::editProperty Open the approriate dialog to edit this image. More... | |
| void | setPixmap (const QPixmap &pixmap) |
| DiagramImageItem::setPixmap Set the new pixmap to be draw. More... | |
| QRectF | boundingRect () const override |
| DiagramImageItem::boundingRect the outer bounds of the item as a rectangle, if no pixmap are set, return a default QRectF. More... | |
| QString | name () const override |
| DiagramImageItem::name. More... | |
Public Member Functions inherited from QetGraphicsItem | |
| QetGraphicsItem (QGraphicsItem *parent=nullptr) | |
| QetGraphicsItem::QetGraphicsItem Default constructor. More... | |
| ~QetGraphicsItem () override=0 | |
| Diagram * | diagram () const |
| QetGraphicsItem::diagram return the diagram of this item. More... | |
| virtual void | setPos (const QPointF &p) |
| QetGraphicsItem::setPos set the position of the item to p. More... | |
| virtual void | setPos (qreal x, qreal y) |
| QetGraphicsItem::setPos set the position of the item. More... | |
| virtual bool | isMovable () const |
| virtual void | setMovable (bool movable) |
| QET::GraphicsItemState | state () const |
| QetGraphicsItem::state. More... | |
Protected Member Functions | |
| void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override |
| DiagramImageItem::paint Draw the pixmap. More... | |
Protected Member Functions inherited from QetGraphicsItem | |
| void | mousePressEvent (QGraphicsSceneMouseEvent *event) override |
| QetGraphicsItem::mousePressEvent handle the mouse click. More... | |
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| QetGraphicsItem::mouseDoubleClickEvent handle the mouse double click. More... | |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| QetGraphicsItem::mouseMoveEvent handle mouse movement. More... | |
| void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override |
| QetGraphicsItem::mouseReleaseEvent handle mouse release click. More... | |
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.
Definition at line 31 of file diagramimageitem.h.
| anonymous enum |
| Enumerator | |
|---|---|
| Type | |
Definition at line 42 of file diagramimageitem.h.
| DiagramImageItem::DiagramImageItem | ( | QetGraphicsItem * | parent_item = nullptr | ) |
DiagramImageItem::DiagramImageItem Constructor without pixmap.
| parent_item | the parent graphics item |
Definition at line 28 of file diagramimageitem.cpp.
| 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 |
Definition at line 40 of file diagramimageitem.cpp.
References boundingRect().
|
override |
DiagramImageItem::~DiagramImageItem Destructor.
Definition at line 52 of file diagramimageitem.cpp.
|
override |
DiagramImageItem::boundingRect the outer bounds of the item as a rectangle, if no pixmap are set, return a default QRectF.
Definition at line 109 of file diagramimageitem.cpp.
References pixmap_.
Referenced by DiagramImageItem(), DiagramEventAddImage::mouseMoveEvent(), DiagramEventAddImage::mousePressEvent(), paint(), and setPixmap().
|
overridevirtual |
DiagramImageItem::editProperty Open the approriate dialog to edit this image.
Reimplemented from QetGraphicsItem.
Definition at line 86 of file diagramimageitem.cpp.
References QetGraphicsItem::diagram().
|
virtual |
DiagramImageItem::fromXml Load this image fro xml elemebt .
| e |
Definition at line 132 of file diagramimageitem.cpp.
References QetGraphicsItem::is_movable_, and setPixmap().
|
overridevirtual |
Reimplemented from QetGraphicsItem.
Definition at line 122 of file diagramimageitem.cpp.
References QET::Icons::tr.
|
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 |
Definition at line 62 of file diagramimageitem.cpp.
References boundingRect(), and pixmap_.
| void DiagramImageItem::setPixmap | ( | const QPixmap & | pixmap | ) |
DiagramImageItem::setPixmap Set the new pixmap to be draw.
| pixmap | the new pixmap |
Definition at line 98 of file diagramimageitem.cpp.
References boundingRect(), and pixmap_.
Referenced by fromXml().
|
virtual |
| document | Le document XML a utiliser |
Definition at line 166 of file diagramimageitem.cpp.
References QET::correctAngle(), QetGraphicsItem::is_movable_, and pixmap_.
|
inlineoverride |
Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a DiagramImageItem
Definition at line 51 of file diagramimageitem.h.
References Type.
|
protected |
Definition at line 64 of file diagramimageitem.h.
Referenced by boundingRect(), paint(), setPixmap(), and toXml().
1.8.15