#include <associationline.h>
This class provides various symbols that can be embedded in AssociationLine. It also provides convenience methods to align the symbol to AssociationLine.
◆ SymbolEndPoints
◆ SymbolType
This enumeration lists all the symbols that can be used as embedded on AssociationLine.
Enumerator |
---|
None | |
OpenArrow | |
ClosedArrow | |
CrowFeet | |
Diamond | |
Subset | |
Circle | |
Count | |
◆ Symbol()
Symbol::Symbol |
( |
SymbolType |
symbolType, |
|
|
QGraphicsItem * |
parent = 0 |
|
) |
| |
|
explicit |
Constructs a Symbol with current symbol being symbol and parented to parent.
◆ ~Symbol()
◆ 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()
- Returns
- The end points for the symbol.
◆ symbolType()
- Returns
- The current symbol being represented.
◆ m_brush
◆ m_pen
◆ m_symbolType
current symbol being represented by this item
◆ symbolTable
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: