umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SeqLineWidget Class Reference

Widget class for graphical representation of sequence lines. More...

#include <seqlinewidget.h>

Inheritance diagram for SeqLineWidget:
Collaboration diagram for SeqLineWidget:

Classes

struct  DestructionBox
 

Public Member Functions

 SeqLineWidget (UMLScene *scene, ObjectWidget *pObject)
 
virtual ~SeqLineWidget ()
 
bool onWidget (const QPointF &p)
 
bool onDestructionBox (const QPointF &p)
 
void cleanup ()
 
void setupDestructionBox ()
 
void setStartPoint (int startX, int startY)
 
int getLineLength () const
 
ObjectWidgetgetObjectWidget ()
 
void setEndOfLine (int yPosition)
 
void setLineColorCmd (const QColor &color)
 

Protected Member Functions

void cleanupDestructionBox ()
 
void moveDestructionBox ()
 
void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 

Protected Attributes

ObjectWidgetm_pObject
 ObjectWidget associated with this sequence line. More...
 
UMLScenem_scene
 scene displayed on More...
 
struct SeqLineWidget::DestructionBox m_DestructionBox
 the destruction box More...
 
int m_nLengthY
 the length of the line More...
 

Static Protected Attributes

static int const m_nMouseDownEpsilonX = 20
 margin used for mouse clicks More...
 

Detailed Description

Widget class for graphical representation of sequence lines.

A sequence lifeline consists of the object widget at the top and a vertical line starting at the bottom edge of the object widget at half its width. The line grows downward when sequence messages are added such that the line always extends far enough to act as the background for all messages. This class represents only the line part of the lifeline.

Author
Paul Hensgen Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

Constructor & Destructor Documentation

◆ SeqLineWidget()

SeqLineWidget::SeqLineWidget ( UMLScene scene,
ObjectWidget pObject 
)

Constructor.

Here is the call graph for this function:

◆ ~SeqLineWidget()

SeqLineWidget::~SeqLineWidget ( )
virtual

Destructor.

Here is the call graph for this function:

Member Function Documentation

◆ cleanup()

void SeqLineWidget::cleanup ( )

Clean up anything before deletion.

Here is the call graph for this function:

◆ cleanupDestructionBox()

void SeqLineWidget::cleanupDestructionBox ( )
protected

Clean up destruction box.

◆ contextMenuEvent()

void SeqLineWidget::contextMenuEvent ( QGraphicsSceneContextMenuEvent *  event)
protected
Here is the call graph for this function:

◆ getLineLength()

int SeqLineWidget::getLineLength ( ) const
inline

Gets the length of the line.

Returns
Length of the line.

◆ getObjectWidget()

ObjectWidget * SeqLineWidget::getObjectWidget ( )
inline

Returns the ObjectWidget associated with this sequence line.

Returns
Pointer to the associated ObjectWidget.

◆ moveDestructionBox()

void SeqLineWidget::moveDestructionBox ( )
protected

Move destruction box.

Here is the call graph for this function:

◆ onDestructionBox()

bool SeqLineWidget::onDestructionBox ( const QPointF &  p)

Return whether point is on the destruction box.

Parameters
pThe point to investigate.
Returns
True if point is on the destruction box of this sequence line.
Here is the call graph for this function:

◆ onWidget()

bool SeqLineWidget::onWidget ( const QPointF &  p)

Return whether point is on sequence line. Takes into account destruction box if shown.

Parameters
pThe point to investigate.
Returns
True if point is on this sequence line.

◆ setEndOfLine()

void SeqLineWidget::setEndOfLine ( int  yPosition)

Sets the y position of the bottom of the vertical line.

Parameters
yPositionThe y coordinate for the bottom of the line.
Here is the call graph for this function:

◆ setLineColorCmd()

void SeqLineWidget::setLineColorCmd ( const QColor &  color)
Here is the call graph for this function:

◆ setStartPoint()

void SeqLineWidget::setStartPoint ( int  startX,
int  startY 
)

Set the start point of the line.

Parameters
startXX coordinate of the start point.
startYY coordinate of the start point.
Here is the call graph for this function:

◆ setupDestructionBox()

void SeqLineWidget::setupDestructionBox ( )

Set up destruction box.

Here is the call graph for this function:

Member Data Documentation

◆ m_DestructionBox

struct SeqLineWidget::DestructionBox SeqLineWidget::m_DestructionBox
protected

the destruction box

◆ m_nLengthY

int SeqLineWidget::m_nLengthY
protected

the length of the line

◆ m_nMouseDownEpsilonX

int const SeqLineWidget::m_nMouseDownEpsilonX = 20
staticprotected

margin used for mouse clicks

◆ m_pObject

ObjectWidget* SeqLineWidget::m_pObject
protected

ObjectWidget associated with this sequence line.

◆ m_scene

UMLScene* SeqLineWidget::m_scene
protected

scene displayed on


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