umbrello API Documentation

SeqLineWidget Class Reference

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

#include <seqlinewidget.h>

List of all members.

Public Member Functions

 SeqLineWidget (UMLView *pView, ObjectWidget *pObject)
 Constructor.
 ~SeqLineWidget ()
 Destructor.
int onWidget (const QPoint &p)
 Return whether on seq.
void cleanup ()
 Clean up anything before deletion.
void setupDestructionBox ()
 Set up destruction box.
void setStartPoint (int startX, int startY)
 Set the start point of the line.
int getLineLength ()
 Gets the length of the line.
ObjectWidgetgetObjectWidget ()
 Returns the ObjectWidget associated with this sequence line.
void setEndOfLine (int yPosition)
 Sets the y position of the bottom of the vertical line.

Protected Member Functions

void cleanupDestructionBox ()
 Clean up destruction box.
void moveDestructionBox ()
 Move destruction box.

Protected Attributes

ObjectWidgetm_pObject
 ObjectWidget associated with this sequence line.
UMLViewm_pView
 View displayed on.
SeqLineWidget::DestructionBox m_DestructionBox
 The destruction box.
int m_nLengthY
 The length of the line.

Static Protected Attributes

static int const m_nMouseDownEpsilonX = 20
 Margin used for mouse clicks.

Classes

struct  DestructionBox
 The destruction box. More...


Detailed Description

Widget class for graphical representation of sequence lines.

Author:
Paul Hensgen Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 25 of file seqlinewidget.h.


Constructor & Destructor Documentation

SeqLineWidget::SeqLineWidget UMLView pView,
ObjectWidget pObject
 

Constructor.

Definition at line 26 of file seqlinewidget.cpp.

References WidgetBase::getLineColor(), SeqLineWidget::DestructionBox::line1, m_DestructionBox, m_nLengthY, m_pObject, m_pView, and setupDestructionBox().

SeqLineWidget::~SeqLineWidget  ) 
 

Destructor.

Definition at line 37 of file seqlinewidget.cpp.


Member Function Documentation

int SeqLineWidget::onWidget const QPoint &  p  ) 
 

Return whether on seq.

line. Takes into account destruction box if shown.

Parameters:
p The point to investigate.
Returns:
Non-zero if point is on this sequence line.

Definition at line 39 of file seqlinewidget.cpp.

References m_nMouseDownEpsilonX.

Referenced by UMLView::onWidgetLine().

void SeqLineWidget::cleanup  ) 
 

Clean up anything before deletion.

Definition at line 53 of file seqlinewidget.cpp.

References cleanupDestructionBox().

void SeqLineWidget::setupDestructionBox  ) 
 

Set up destruction box.

Definition at line 73 of file seqlinewidget.cpp.

References cleanupDestructionBox(), UMLWidget::getHeight(), WidgetBase::getLineColor(), ObjectWidget::getShowDestruction(), UMLWidget::getWidth(), UMLWidget::getX(), UMLWidget::getY(), SeqLineWidget::DestructionBox::line1, SeqLineWidget::DestructionBox::line2, m_DestructionBox, m_nLengthY, m_pObject, m_pView, SeqLineWidget::DestructionBox::setLine1Points(), and SeqLineWidget::DestructionBox::setLine2Points().

Referenced by ObjectWidget::activate(), and SeqLineWidget().

void SeqLineWidget::setStartPoint int  startX,
int  startY
 

Set the start point of the line.

Parameters:
startX X coordinate of the start point.
startY Y coordinate of the start point.

Definition at line 57 of file seqlinewidget.cpp.

References m_nLengthY, and moveDestructionBox().

Referenced by ObjectWidget::moveEvent().

int SeqLineWidget::getLineLength  )  [inline]
 

Gets the length of the line.

Returns:
Length of the line.

Definition at line 69 of file seqlinewidget.h.

References m_nLengthY.

ObjectWidget* SeqLineWidget::getObjectWidget  )  [inline]
 

Returns the ObjectWidget associated with this sequence line.

Returns:
Pointer to the associated ObjectWidget.

Definition at line 78 of file seqlinewidget.h.

References m_pObject.

void SeqLineWidget::setEndOfLine int  yPosition  ) 
 

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

Parameters:
yPosition The y coordinate for the bottom of the line.

Definition at line 110 of file seqlinewidget.cpp.

References UMLWidget::getHeight(), UMLWidget::getY(), m_nLengthY, m_pObject, m_pView, moveDestructionBox(), and UMLView::resizeCanvasToItems().

Referenced by ObjectWidget::slotMessageMoved().

void SeqLineWidget::cleanupDestructionBox  )  [protected]
 

Clean up destruction box.

Definition at line 64 of file seqlinewidget.cpp.

References SeqLineWidget::DestructionBox::line1, SeqLineWidget::DestructionBox::line2, and m_DestructionBox.

Referenced by cleanup(), and setupDestructionBox().

void SeqLineWidget::moveDestructionBox  )  [protected]
 

Move destruction box.

Definition at line 97 of file seqlinewidget.cpp.

References UMLWidget::getHeight(), UMLWidget::getWidth(), UMLWidget::getX(), UMLWidget::getY(), SeqLineWidget::DestructionBox::line1, m_DestructionBox, m_nLengthY, m_pObject, SeqLineWidget::DestructionBox::setLine1Points(), and SeqLineWidget::DestructionBox::setLine2Points().

Referenced by setEndOfLine(), and setStartPoint().


Member Data Documentation

ObjectWidget* SeqLineWidget::m_pObject [protected]
 

ObjectWidget associated with this sequence line.

Definition at line 103 of file seqlinewidget.h.

Referenced by getObjectWidget(), moveDestructionBox(), SeqLineWidget(), setEndOfLine(), and setupDestructionBox().

UMLView* SeqLineWidget::m_pView [protected]
 

View displayed on.

Definition at line 108 of file seqlinewidget.h.

Referenced by SeqLineWidget(), setEndOfLine(), and setupDestructionBox().

struct SeqLineWidget::DestructionBox SeqLineWidget::m_DestructionBox [protected]
 

The destruction box.

Referenced by cleanupDestructionBox(), moveDestructionBox(), SeqLineWidget(), and setupDestructionBox().

int SeqLineWidget::m_nLengthY [protected]
 

The length of the line.

Definition at line 127 of file seqlinewidget.h.

Referenced by getLineLength(), moveDestructionBox(), SeqLineWidget(), setEndOfLine(), setStartPoint(), and setupDestructionBox().

int const SeqLineWidget::m_nMouseDownEpsilonX = 20 [static, protected]
 

Margin used for mouse clicks.

Definition at line 24 of file seqlinewidget.cpp.

Referenced by onWidget().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:05 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003