umbrello/umbrello
Functions | |
QGraphicsRectItem * | decoratePoint (const QPointF &p, QGraphicsItem *parent) |
void | drawCrossInEllipse (QPainter *p, const QRectF &r) |
void | drawTriangledRect (QPainter *painter, const QRectF &rect, const QSizeF &triSize) |
UMLWidget * | findWidget (Uml::ID::Type id, const UMLWidgetList &widgets, const MessageWidgetList *messages) |
bool | hasSmallerX (const UMLWidget *widget1, const UMLWidget *widget2) |
bool | hasSmallerY (const UMLWidget *widget1, const UMLWidget *widget2) |
bool | loadBrushFromXMI (QDomElement &qElement, QBrush &brush) |
bool | loadGradientFromXMI (QDomElement &gradientElement, QGradient *&gradient) |
bool | loadPixmapFromXMI (QDomElement &pixEle, QPixmap &pixmap) |
QString | pointToString (const QPointF &point) |
void | saveBrushToXMI (QDomDocument &qDoc, QDomElement &qElement, const QBrush &brush) |
void | saveGradientToXMI (QDomDocument &qDoc, QDomElement &qElement, const QGradient *gradient) |
void | savePixmapToXMI (QDomDocument &qDoc, QDomElement &qElement, const QPixmap &pixmap) |
QPointF | stringToPoint (const QString &str) |
Detailed Description
General purpose widget utilities.
Bugs and comments to umbre or llo- devel @kde .orghttp://bugs.kde.org
Function Documentation
QGraphicsRectItem * Widget_Utils::decoratePoint | ( | const QPointF & | p, |
QGraphicsItem * | parent | ||
) |
Creates the decoration point.
- Parameters
-
p base point to decorate parent parent item
- Returns
- decoration point
Definition at line 69 of file widget_utils.cpp.
void Widget_Utils::drawCrossInEllipse | ( | QPainter * | p, |
const QRectF & | r | ||
) |
Calculates and draws a cross inside an ellipse.
- Parameters
-
p Pointer to a QPainter object. ellipse The rectangle describing the ellipse.
Definition at line 87 of file widget_utils.cpp.
void Widget_Utils::drawTriangledRect | ( | QPainter * | painter, |
const QRectF & | rect, | ||
const QSizeF & | triSize | ||
) |
Draws a polygon which is almost rectanguar except for the top right corner.
A triangle is drawn in top right corner of the rectangle.
- Parameters
-
painter The painter with which this shape is to be drawn. rect The rectangle dimensions. triSize The size of the triange in the top-right corner.
Definition at line 128 of file widget_utils.cpp.
UMLWidget * Widget_Utils::findWidget | ( | Uml::ID::Type | id, |
const UMLWidgetList & | widgets, | ||
const MessageWidgetList * | messages | ||
) |
Find the widget identified by the given ID in the given widget or message list.
- Parameters
-
id The unique ID to find. widgets The UMLWidgetList to search in. messages Optional pointer to a MessageWidgetList to search in.
Definition at line 41 of file widget_utils.cpp.
Returns true if the first widget's X is smaller than second's.
Used for sorting the UMLWidgetList.
- Parameters
-
widget1 The widget to compare. widget2 The widget to compare with.
Definition at line 536 of file widget_utils.cpp.
Returns true if the first widget's Y is smaller than second's.
Used for sorting the UMLWidgetList.
- Parameters
-
widget1 The widget to compare. widget2 The widget to compare with.
Definition at line 547 of file widget_utils.cpp.
bool Widget_Utils::loadBrushFromXMI | ( | QDomElement & | qElement, |
QBrush & | brush | ||
) |
Extracts the QBrush properties into brush from the XMI xml element qElement.
- Parameters
-
qElement The dom element from which the xmi info should be extracted. brush The QBrush object into which brush details should be read into.
Definition at line 455 of file widget_utils.cpp.
bool Widget_Utils::loadGradientFromXMI | ( | QDomElement & | gradientElement, |
QGradient *& | gradient | ||
) |
Loads gradient from xmi.
The gradient pointer should be null and the new gradient object will be created inside this method. The gradient should later be deleted externally.
- Parameters
-
qElement The dom element from which gradient should be loaded. gradient The pointer to gradient into which the gradient should be loaded. (Allocated inside this method)
- Returns
- True or false based on success or failure of this method.
Definition at line 334 of file widget_utils.cpp.
bool Widget_Utils::loadPixmapFromXMI | ( | QDomElement & | pixEle, |
QPixmap & | pixmap | ||
) |
Loads pixmap from xmi.
- Parameters
-
qElement The dom element from which pixmap should be loaded. pixmap The pixmap into which the image should be loaded.
- Returns
- True or false based on success or failure of this method.
Definition at line 272 of file widget_utils.cpp.
QString Widget_Utils::pointToString | ( | const QPointF & | point | ) |
Draws an arrow head with the given painter, with the arrow sharp point at headPos.
- Parameters
-
painter The painter with which this arrow should be drawn. headPos The position where the head of the arrow should lie. arrowSize This indicates the size of the arrow head. arrowType This indicates direction of arrow as in LeftArrow, RightArrow.. solid If true, a solid head is drawn. Otherwise 2 lines are drawn. Draws a rounded rect rounded at specified corners. painter The painter with which this round rect should be drawn. rect The rectangle to be drawn. xRadius The x radius of rounded corner. yRadius The y radius of rounded corner. corners The corners to be rounded. Converts a point to a comma separated string i.e "x,y"
Definition at line 242 of file widget_utils.cpp.
void Widget_Utils::saveBrushToXMI | ( | QDomDocument & | qDoc, |
QDomElement & | qElement, | ||
const QBrush & | brush | ||
) |
Saves the brush info as xmi into the dom element qElement.
- Parameters
-
qDoc The QDomDocument object pointing to the xmi document. qElement The element into which the pen, brush and font info should be saved. brush The QBrush whose details should be saved.
Definition at line 509 of file widget_utils.cpp.
void Widget_Utils::saveGradientToXMI | ( | QDomDocument & | qDoc, |
QDomElement & | qElement, | ||
const QGradient * | gradient | ||
) |
Saves gradient information into dom element qElement.
- Parameters
-
qDoc The dom document object. qElement The dom element into which the gradient should be saved. gradient The gradient to be saved.
Definition at line 405 of file widget_utils.cpp.
void Widget_Utils::savePixmapToXMI | ( | QDomDocument & | qDoc, |
QDomElement & | qElement, | ||
const QPixmap & | pixmap | ||
) |
Saves pixmap informatin into dom element qElement.
- Parameters
-
qDoc The dom document object. qElement The dom element into which the pixmap should be saved. pixmap The pixmap to be saved.
Definition at line 303 of file widget_utils.cpp.
QPointF Widget_Utils::stringToPoint | ( | const QString & | str | ) |
Converts a comma separated string to point.
Definition at line 250 of file widget_utils.cpp.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:06:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.