umbrello: DiagramProxyWidget Class Reference

umbrello 2.32.3 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

Public Member Functions | Protected Member Functions | Private Attributes | List of all members
DiagramProxyWidget Class Reference

`#include <diagramproxywidget.h>`

Inheritance diagram for DiagramProxyWidget:

## Public Member Functions
| DiagramProxyWidget (UMLWidget *widget, qreal borderWidth=5)
virtual | ~DiagramProxyWidget ()
Uml::ID::Type | diagramLink () const
UMLScene * | linkedDiagram () const
bool | setDiagramLink (const Uml::ID::Type &id)
const QRectF & | clientRect ()
const QRectF & | sceneRect ()
void | setClientRect (const QRectF &rect)
bool | isProxyWidget ()
UMLWidget * | getProxiedWidget (const QPointF &p)
QPointF | mapFromClient (const QPointF &p)
QRectF | mapFromClient (const QRectF &r)
QPointF | mapToClient (const QPointF &pos)
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
bool | showLinkedDiagram () const
void | setShowLinkedDiagram (bool showLinkedDiagram)
QRectF | iconRect () const
void | setIconRect (const QRectF &iconRect)

## Protected Member Functions
DiagramProxyWidget & | operator= (const DiagramProxyWidget &other)
bool | activate (IDChangeLog *changeLog=0)
bool | loadFromXMI1 (QDomElement &qElement)
void | saveToXMI1 (QXmlStreamWriter &writer)
void | setupEvent (QGraphicsSceneMouseEvent &e, QGraphicsSceneMouseEvent *event, const QPointF &pos)
void | setupEvent (QGraphicsSceneContextMenuEvent &e, QGraphicsSceneContextMenuEvent *event, const QPointF &pos)
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
virtual void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *event)
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *event)
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
void | slotMenuSelection (QAction *action)

## Private Attributes
Uml::ID::Type | m_diagramLinkId
| id of linked diagram More...
QPointer< UMLScene > | m_linkedDiagram
| pointer to linked diagram More...
QRectF | m_clientRect
| widget area for embedded diagram More...
QRectF | m_sceneRect
| scene rectangle used for internal calculations More...
QRectF | m_iconRect
| widget area for diagram icon More...
UMLWidget * | m_widget
qreal | m_borderWidth
bool | m_showLinkedDiagram

## Constructor & Destructor Documentation

## ◆ DiagramProxyWidget()

DiagramProxyWidget::DiagramProxyWidget | ( | UMLWidget * | widget,
|  | qreal | borderWidth = `5`
| ) |  |

## ◆ ~DiagramProxyWidget()

virtual DiagramProxyWidget::~DiagramProxyWidget | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ activate()

bool DiagramProxyWidget::activate | ( | IDChangeLog * | changeLog = `0` | ) |
| protected

## ◆ clientRect()

const QRectF & DiagramProxyWidget::clientRect | ( |  | ) |

Return the area in which the linked diagram is displayed.

Returns
  area in current item coordinates

## ◆ contextMenuEvent()

void DiagramProxyWidget::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
| protectedvirtual

Reimplemented in StateWidget, and UMLWidget.

## ◆ diagramLink()

Uml::ID::Type DiagramProxyWidget::diagramLink | ( |  | ) | const

## ◆ getProxiedWidget()

UMLWidget * DiagramProxyWidget::getProxiedWidget | ( | const QPointF & | p | ) |

## ◆ iconRect()

QRectF DiagramProxyWidget::iconRect | ( |  | ) | const

Getter for icon rectangle

Returns
  icon rectangle

## ◆ isProxyWidget()

bool DiagramProxyWidget::isProxyWidget | ( |  | ) |

## ◆ linkedDiagram()

UMLScene * DiagramProxyWidget::linkedDiagram | ( |  | ) | const

## ◆ loadFromXMI1()

bool DiagramProxyWidget::loadFromXMI1 | ( | QDomElement & | qElement | ) |
| protected

## ◆ mapFromClient() [1/2]

QPointF DiagramProxyWidget::mapFromClient | ( | const QPointF & | p | ) |

## ◆ mapFromClient() [2/2]

QRectF DiagramProxyWidget::mapFromClient | ( | const QRectF & | r | ) |

## ◆ mapToClient()

QPointF DiagramProxyWidget::mapToClient | ( | const QPointF & | pos | ) |

Maps point from item coordinate to client scene coordinate system.

Parameters

  pos | item coordinated

Returns
  point in client scene coordinate system

## ◆ mouseDoubleClickEvent()

void DiagramProxyWidget::mouseDoubleClickEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
| protectedvirtual

Reimplemented in ClassifierWidget, NoteWidget, StateWidget, and UMLWidget.

## ◆ mouseMoveEvent()

void DiagramProxyWidget::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
| protectedvirtual

Reimplemented in StateWidget, UMLWidget, ObjectWidget, and SignalWidget.

## ◆ mousePressEvent()

void DiagramProxyWidget::mousePressEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
| protectedvirtual

Reimplemented in StateWidget, UMLWidget, and ObjectWidget.

## ◆ mouseReleaseEvent()

void DiagramProxyWidget::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | event | ) |
| protectedvirtual

Reimplemented in StateWidget, and UMLWidget.

## ◆ operator=()

DiagramProxyWidget & DiagramProxyWidget::operator= | ( | const DiagramProxyWidget & | other | ) |
| protected

## ◆ paint()

void DiagramProxyWidget::paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget = `0`
| ) |  |

Paint linked diagram into current widget

Parameters

  painter | painter to paint on
  option | The option parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints
  widget | The widget argument is optional. If provided, it points to the widget that is being painted on; otherwise, it is 0

## ◆ saveToXMI1()

void DiagramProxyWidget::saveToXMI1 | ( | QXmlStreamWriter & | writer | ) |
| protected

## ◆ sceneRect()

const QRectF & DiagramProxyWidget::sceneRect | ( |  | ) |

Return scene area of the linked diagram.

Returns
  scene rectangle

## ◆ setClientRect()

void DiagramProxyWidget::setClientRect | ( | const QRectF & | rect | ) |

Set the area in which the linked diagram is displayed

Parameters

  rect |

## ◆ setDiagramLink()

bool DiagramProxyWidget::setDiagramLink | ( | const Uml::ID::Type & | id | ) |

## ◆ setIconRect()

void DiagramProxyWidget::setIconRect | ( | const QRectF & | iconRect | ) |

Setter for icon rectangle

Parameters

  iconRect | icon rectangle

## ◆ setShowLinkedDiagram()

void DiagramProxyWidget::setShowLinkedDiagram | ( | bool | showLinkedDiagram | ) |

Set state for 'show linked diagram' attribute

Parameters

  showLinkedDiagram | state to set

## ◆ setupEvent() [1/2]

void DiagramProxyWidget::setupEvent | ( | QGraphicsSceneContextMenuEvent & | e,
|  | QGraphicsSceneContextMenuEvent * | event,
|  | const QPointF & | pos
| ) |  |
| protected

Set up synthetic graphics scene context menu event

Parameters

  e | event to setup
  event | event source
  pos | position in item coordinates

## ◆ setupEvent() [2/2]

void DiagramProxyWidget::setupEvent | ( | QGraphicsSceneMouseEvent & | e,
|  | QGraphicsSceneMouseEvent * | event,
|  | const QPointF & | pos
| ) |  |
| protected

Set up synthetic graphics scene event

Parameters

  e | event to setup
  event | event source
  pos | position in item coordinates

## ◆ showLinkedDiagram()

bool DiagramProxyWidget::showLinkedDiagram | ( |  | ) | const

Return state of 'show linked diagram' attribute

Returns
  state

## ◆ slotMenuSelection()

void DiagramProxyWidget::slotMenuSelection | ( | QAction * | action | ) |
| protected

Captures any popup menu signals for menus it created.

If the provided action is not handled, it will be forwarded to the contained widget.

Parameters

  action | action to handle

## Member Data Documentation

## ◆ m_borderWidth

qreal DiagramProxyWidget::m_borderWidth
| private

## ◆ m_clientRect

QRectF DiagramProxyWidget::m_clientRect
| private

widget area for embedded diagram

## ◆ m_diagramLinkId

Uml::ID::Type DiagramProxyWidget::m_diagramLinkId
| private

id of linked diagram

## ◆ m_iconRect

QRectF DiagramProxyWidget::m_iconRect
| private

widget area for diagram icon

## ◆ m_linkedDiagram

QPointer<UMLScene> DiagramProxyWidget::m_linkedDiagram
| private

pointer to linked diagram

## ◆ m_sceneRect

QRectF DiagramProxyWidget::m_sceneRect
| private

scene rectangle used for internal calculations

## ◆ m_showLinkedDiagram

bool DiagramProxyWidget::m_showLinkedDiagram
| private

## ◆ m_widget

UMLWidget* DiagramProxyWidget::m_widget
| private

The documentation for this class was generated from the following files:

- umbrello/umlwidgets/diagramproxywidget.h
- umbrello/umlwidgets/diagramproxywidget.cpp