umbrello/umbrello
Enumerations | |
enum | Axis_Type { X, Y } |
enum | Comparison_Type { Smallest, Largest } |
Detailed Description
General purpose widget utilities.
Bugs and comments to umbre or llo- devel @kde .orghttp://bugs.kde.org
Enumeration Type Documentation
Auxiliary type for function findLine()
Enumerator | |
---|---|
X | |
Y |
Definition at line 633 of file widget_utils.cpp.
Auxiliary type for function findLine()
Enumerator | |
---|---|
Smallest | |
Largest |
Definition at line 638 of file widget_utils.cpp.
Function Documentation
Determine the approximate closest points of two polygons.
- Returns
- QLineF::p1() returns point of self; QLineF::p2() returns point of other.
Definition at line 688 of file widget_utils.cpp.
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.
Calculates and draws a cross inside an ellipse.
- Parameters
-
p Pointer to a QPainter object. r 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 rectangular 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 triangle in the top-right corner.
Definition at line 128 of file widget_utils.cpp.
QLineF Widget_Utils::findLine | ( | const QPolygonF & | poly, |
Axis_Type | axis, | ||
Comparison_Type | seek, | ||
const QRectF & | boundingRect | ||
) |
Find the line of poly with the smallest or largest value (controlled by seek) along the axis controlled by axis.
In case axis is X, do not consider lines whose Y values lie outside the Y values defined by boundingRect. In case axis is Y, do not consider lines whose X values lie outside the X values defined by boundingRect.
Definition at line 648 of file widget_utils.cpp.
Uml::Region::Enum Widget_Utils::findRegion | ( | const QRectF & | self, |
const QRectF & | other | ||
) |
Find the region in which the rectangle other lies with respect to the rectangle self.
Beware that the Qt coordinate system has its origin point (0,0) in the upper left corner with Y values growing downwards, thus the Y related comparisons might look inverted if your are used to the natural coordinate system with (0,0) in the lower left corner.
Definition at line 560 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
-
gradientElement 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
-
pixEle 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.
qreal Widget_Utils::middle | ( | qreal | a, |
qreal | b | ||
) |
Return the middle value between a and b.
Definition at line 625 of file widget_utils.cpp.
Return the point in poly which follows the point at index index.
If index is the last index then return the first (or, if poly.isClosed() is true, the second) point.
Definition at line 614 of file widget_utils.cpp.
Draws an arrow head with the given painter, with the arrow sharp point at headPos.
param painter The painter with which this arrow should be drawn. param headPos The position where the head of the arrow should lie. param arrowSize This indicates the size of the arrow head. param arrowType This indicates direction of arrow as in LeftArrow, RightArrow.. param solid If true, a solid head is drawn. Otherwise 2 lines are drawn. Draws a rounded rect rounded at specified corners.
param painter The painter with which this round rect should be drawn. param rect The rectangle to be drawn. param xRadius The x radius of rounded corner. param yRadius The y radius of rounded corner. param corners The corners to be rounded. Converts a point to a comma separated string i.e "x,y"
- Parameters
-
point The QPointF to convert.
Definition at line 243 of file widget_utils.cpp.
Return the point in poly which precedes the point at index index.
If index is 0 then return the last (or, if poly.isClosed() is true, the second to last) point.
Definition at line 601 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 information 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.
Converts a comma separated string to point.
Definition at line 251 of file widget_utils.cpp.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:40:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.