• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdesdk API Reference
  • KDE Home
  • Contact Us
 

umbrello/umbrello

Functions
Widget_Utils Namespace Reference

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.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or http://bugs.kde.org

Function Documentation

QGraphicsRectItem * Widget_Utils::decoratePoint ( const QPointF &  p,
QGraphicsItem *  parent 
)

Creates the decoration point.

Parameters
pbase point to decorate
parentparent 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
pPointer to a QPainter object.
ellipseThe 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
painterThe painter with which this shape is to be drawn.
rectThe rectangle dimensions.
triSizeThe 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
idThe unique ID to find.
widgetsThe UMLWidgetList to search in.
messagesOptional pointer to a MessageWidgetList to search in.

Definition at line 41 of file widget_utils.cpp.

bool Widget_Utils::hasSmallerX ( const UMLWidget *  widget1,
const UMLWidget *  widget2 
)

Returns true if the first widget's X is smaller than second's.

Used for sorting the UMLWidgetList.

Parameters
widget1The widget to compare.
widget2The widget to compare with.

Definition at line 536 of file widget_utils.cpp.

bool Widget_Utils::hasSmallerY ( const UMLWidget *  widget1,
const UMLWidget *  widget2 
)

Returns true if the first widget's Y is smaller than second's.

Used for sorting the UMLWidgetList.

Parameters
widget1The widget to compare.
widget2The 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
qElementThe dom element from which the xmi info should be extracted.
brushThe 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
qElementThe dom element from which gradient should be loaded.
gradientThe 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
qElementThe dom element from which pixmap should be loaded.
pixmapThe 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
painterThe painter with which this arrow should be drawn.
headPosThe position where the head of the arrow should lie.
arrowSizeThis indicates the size of the arrow head.
arrowTypeThis indicates direction of arrow as in LeftArrow, RightArrow..
solidIf true, a solid head is drawn. Otherwise 2 lines are drawn. Draws a rounded rect rounded at specified corners.
painterThe painter with which this round rect should be drawn.
rectThe rectangle to be drawn.
xRadiusThe x radius of rounded corner.
yRadiusThe y radius of rounded corner.
cornersThe 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
qDocThe QDomDocument object pointing to the xmi document.
qElementThe element into which the pen, brush and font info should be saved.
brushThe 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
qDocThe dom document object.
qElementThe dom element into which the gradient should be saved.
gradientThe 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
qDocThe dom document object.
qElementThe dom element into which the pixmap should be saved.
pixmapThe 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.

This file is part of the KDE documentation.
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.

umbrello/umbrello

Skip menu "umbrello/umbrello"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdesdk API Reference

Skip menu "kdesdk API Reference"
  • kapptemplate
  • kcachegrind
  • kompare
  • lokalize
  • okteta
  • umbrello
  •   umbrello

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal