umbrello: Symbol Class Reference

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

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes | List of all members
Symbol Class Reference

`#include <associationline.h>`

Inheritance diagram for Symbol:

## Classes
struct | SymbolProperty
| A structure to hold a table of values for all symbols. More...

## Public Types
enum | SymbolType { None = -1 , OpenArrow , ClosedArrow , CrowFeet , Diamond , Subset , Circle , Count }
typedef QPair< QPointF, QPointF > | SymbolEndPoints

## Public Member Functions
| Symbol (SymbolType symbolType, QGraphicsItem *parent=0)
virtual | ~Symbol ()
SymbolType | symbolType () const
void | setSymbolType (SymbolType symbolType)
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
virtual QRectF | boundingRect () const
virtual QPainterPath | shape () const
void | alignTo (const QLineF &line)
SymbolEndPoints | symbolEndPoints () const
QPen | pen () const
void | setPen (const QPen &pen)
QBrush | brush () const
void | setBrush (const QBrush &brush)

## Static Private Member Functions
static void | setupSymbolTable ()

## Private Attributes
QPen | m_pen
| pen used to draw Symbol
QBrush | m_brush
| brush used to fill Symbol
SymbolType | m_symbolType
| current symbol being represented by this item

## Static Private Attributes
static SymbolProperty * | symbolTable
| a table which stores all symbol properties

## Detailed Description

This class provides various symbols that can be embedded in AssociationLine. It also provides convenience methods to align the symbol to AssociationLine.

## Member Typedef Documentation

## ◆ SymbolEndPoints

typedef QPair<QPointF, QPointF> Symbol::SymbolEndPoints

## Member Enumeration Documentation

## ◆ SymbolType

enum Symbol::SymbolType

This enumeration lists all the symbols that can be used as embedded on AssociationLine.

Enumerator
None |
OpenArrow |
ClosedArrow |
CrowFeet |
Diamond |
Subset |
Circle |
Count |

## Constructor & Destructor Documentation

## ◆ Symbol()

Symbol::Symbol | ( | SymbolType | symbolType,
|  | QGraphicsItem * | parent = `0`
| ) |  |
| explicit

Constructs a Symbol with current symbol being symbol and parented to parent.

## ◆ ~Symbol()

Symbol::~Symbol | ( |  | ) |
| virtual

Destructor.

## Member Function Documentation

## ◆ alignTo()

void Symbol::alignTo | ( | const QLineF & | to | ) |

This method aligns *this* Symbol to the line being passed. That is, it ensures that the axis of this symbol aligns exactly with the "to" line passed.

Also this item is moved such that the second end point of the SymbolEndPoints for the current symbol *collides* with the second end point of "to" line.

## ◆ boundingRect()

QRectF Symbol::boundingRect | ( |  | ) | const
| virtual

Returns
  The bound rectangle for this based on current symbol.

## ◆ brush()

QBrush Symbol::brush | ( |  | ) | const

Returns
  The brush used to fill symbol.

## ◆ paint()

void Symbol::paint | ( | QPainter * | painter,
|  | const QStyleOptionGraphicsItem * | option,
|  | QWidget * | widget
| ) |  |
| virtual

Draws the current symbol using the QPainterPath stored for the current symbol.

## ◆ pen()

QPen Symbol::pen | ( |  | ) | const

Returns
  The pen used to draw symbol.

## ◆ setBrush()

void Symbol::setBrush | ( | const QBrush & | brush | ) |

Sets the brush used to fill symbol.

## ◆ setPen()

void Symbol::setPen | ( | const QPen & | pen | ) |

Sets the pen used to draw the symbol.

## ◆ setSymbolType()

void Symbol::setSymbolType | ( | SymbolType | symbolType | ) |

Sets the current symbol type to symbol and updates the geometry.

## ◆ setupSymbolTable()

void Symbol::setupSymbolTable | ( |  | ) |
| staticprivate

## ◆ shape()

QPainterPath Symbol::shape | ( |  | ) | const
| virtual

Returns
  The path for this based on current symbol.

## ◆ symbolEndPoints()

Symbol::SymbolEndPoints Symbol::symbolEndPoints | ( |  | ) | const

Returns
  The end points for the symbol.

## ◆ symbolType()

Symbol::SymbolType Symbol::symbolType | ( |  | ) | const

Returns
  The current symbol being represented.

## Member Data Documentation

## ◆ m_brush

QBrush Symbol::m_brush
| private

brush used to fill Symbol

## ◆ m_pen

QPen Symbol::m_pen
| private

pen used to draw Symbol

## ◆ m_symbolType

SymbolType Symbol::m_symbolType
| private

current symbol being represented by this item

## ◆ symbolTable

Symbol::SymbolProperty * Symbol::symbolTable
| staticprivate

a table which stores all symbol properties

SymbolEndPoints: The first point is where the AssociationLine's visible line is supposed to end. The second points is where the actual symbol part is to appear.

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

- umbrello/umlwidgets/associationline.h
- umbrello/umlwidgets/associationline.cpp