umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <associationline.h>
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 More... | |
QBrush | m_brush |
brush used to fill Symbol More... | |
SymbolType | m_symbolType |
current symbol being represented by this item More... | |
Static Private Attributes | |
static SymbolProperty | symbolTable [Symbol::Count] |
a table which stores all symbol properties More... | |
This class provides various symbols that can be embedded in AssociationLine. It also provides convenience methods to align the symbol to AssociationLine.
typedef QPair<QPointF, QPointF> Symbol::SymbolEndPoints |
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 |
|
explicit |
Constructs a Symbol with current symbol being symbol and parented to parent.
|
virtual |
Destructor.
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.
|
virtual |
QBrush Symbol::brush | ( | ) | const |
|
virtual |
Draws the current symbol using the QPainterPath stored for the current symbol.
QPen Symbol::pen | ( | ) | const |
void Symbol::setBrush | ( | const QBrush & | brush | ) |
Sets the brush used to fill symbol.
void Symbol::setPen | ( | const QPen & | pen | ) |
Sets the pen used to draw the symbol.
void Symbol::setSymbolType | ( | SymbolType | symbolType | ) |
Sets the current symbol type to symbol and updates the geometry.
|
staticprivate |
|
virtual |
Symbol::SymbolEndPoints Symbol::symbolEndPoints | ( | ) | const |
Symbol::SymbolType Symbol::symbolType | ( | ) | const |
|
private |
brush used to fill Symbol
|
private |
pen used to draw Symbol
|
private |
current symbol being represented by this item
|
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.