umbrello  2.35.1
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:
Collaboration diagram for DiagramProxyWidget:

Public Member Functions

 DiagramProxyWidget (UMLWidget *widget, qreal borderWidth=5)
 
virtual ~DiagramProxyWidget ()
 
Uml::ID::Type diagramLink () const
 
UMLScenelinkedDiagram () const
 
bool setDiagramLink (const Uml::ID::Type &id)
 
const QRectF & clientRect () const
 
const QRectF & sceneRect () const
 
void setClientRect (const QRectF &rect)
 
bool isProxyWidget () const
 
UMLWidgetgetProxiedWidget (const QPointF &p) const
 
QPointF mapFromClient (const QPointF &p) const
 
QRectF mapFromClient (const QRectF &r) const
 
QPointF mapToClient (const QPointF &pos) const
 
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

DiagramProxyWidgetoperator= (const DiagramProxyWidget &other)
 
bool activate (IDChangeLog *changeLog=0)
 
bool loadFromXMI (QDomElement &qElement)
 
void saveToXMI (QXmlStreamWriter &writer)
 
void setupEvent (QGraphicsSceneMouseEvent &e, const QGraphicsSceneMouseEvent *event, const QPointF &pos) const
 
void setupEvent (QGraphicsSceneContextMenuEvent &e, const QGraphicsSceneContextMenuEvent *event, const QPointF &pos) const
 
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< UMLScenem_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...
 
UMLWidgetm_widget
 
qreal m_borderWidth
 
bool m_showLinkedDiagram
 

Constructor & Destructor Documentation

DiagramProxyWidget::DiagramProxyWidget ( UMLWidget widget,
qreal  borderWidth = 5 
)
virtual DiagramProxyWidget::~DiagramProxyWidget ( )
inlinevirtual

Member Function Documentation

bool DiagramProxyWidget::activate ( IDChangeLog changeLog = 0)
protected

Here is the call graph for this function:

const QRectF & DiagramProxyWidget::clientRect ( ) const

Return the area in which the linked diagram is displayed.

Returns
area in current item coordinates
void DiagramProxyWidget::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protectedvirtual

Reimplemented in UMLWidget, and StateWidget.

Here is the call graph for this function:

Uml::ID::Type DiagramProxyWidget::diagramLink ( ) const
UMLWidget * DiagramProxyWidget::getProxiedWidget ( const QPointF &  p) const

Here is the call graph for this function:

QRectF DiagramProxyWidget::iconRect ( ) const

Getter for icon rectangle

Returns
icon rectangle
bool DiagramProxyWidget::isProxyWidget ( ) const
UMLScene * DiagramProxyWidget::linkedDiagram ( ) const
bool DiagramProxyWidget::loadFromXMI ( QDomElement &  qElement)
protected

Here is the call graph for this function:

QPointF DiagramProxyWidget::mapFromClient ( const QPointF &  p) const
QRectF DiagramProxyWidget::mapFromClient ( const QRectF &  r) const

Here is the call graph for this function:

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

Maps point from item coordinate to client scene coordinate system.

Parameters
positem coordinated
Returns
point in client scene coordinate system
void DiagramProxyWidget::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Reimplemented in UMLWidget, ClassifierWidget, StateWidget, and NoteWidget.

Here is the call graph for this function:

void DiagramProxyWidget::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Reimplemented in UMLWidget, StateWidget, ObjectWidget, and SignalWidget.

Here is the call graph for this function:

void DiagramProxyWidget::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Reimplemented in UMLWidget, StateWidget, and ObjectWidget.

Here is the call graph for this function:

void DiagramProxyWidget::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual

Reimplemented in UMLWidget, and StateWidget.

Here is the call graph for this function:

DiagramProxyWidget & DiagramProxyWidget::operator= ( const DiagramProxyWidget other)
protected
void DiagramProxyWidget::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)

Paint linked diagram into current widget

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

Here is the call graph for this function:

void DiagramProxyWidget::saveToXMI ( QXmlStreamWriter &  writer)
protected

Here is the call graph for this function:

const QRectF & DiagramProxyWidget::sceneRect ( ) const

Return scene area of the linked diagram.

Returns
scene rectangle
void DiagramProxyWidget::setClientRect ( const QRectF &  rect)

Set the area in which the linked diagram is displayed

Parameters
rect
bool DiagramProxyWidget::setDiagramLink ( const Uml::ID::Type id)

Here is the call graph for this function:

void DiagramProxyWidget::setIconRect ( const QRectF &  iconRect)

Setter for icon rectangle

Parameters
iconRecticon rectangle

Here is the call graph for this function:

void DiagramProxyWidget::setShowLinkedDiagram ( bool  showLinkedDiagram)

Set state for 'show linked diagram' attribute

Parameters
showLinkedDiagramstate to set

Here is the call graph for this function:

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

Set up synthetic graphics scene event

Parameters
eevent to setup
eventevent source
posposition in item coordinates

Here is the call graph for this function:

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

Set up synthetic graphics scene context menu event

Parameters
eevent to setup
eventevent source
posposition in item coordinates

Here is the call graph for this function:

bool DiagramProxyWidget::showLinkedDiagram ( ) const

Return state of 'show linked diagram' attribute

Returns
state
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
actionaction to handle

Here is the call graph for this function:

Member Data Documentation

qreal DiagramProxyWidget::m_borderWidth
private
QRectF DiagramProxyWidget::m_clientRect
private

widget area for embedded diagram

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

id of linked diagram

QRectF DiagramProxyWidget::m_iconRect
private

widget area for diagram icon

QPointer<UMLScene> DiagramProxyWidget::m_linkedDiagram
private

pointer to linked diagram

QRectF DiagramProxyWidget::m_sceneRect
private

scene rectangle used for internal calculations

bool DiagramProxyWidget::m_showLinkedDiagram
private
UMLWidget* DiagramProxyWidget::m_widget
private

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