The QetGraphicsHandlerUtility class This class provide some methods to create and use handler for modify graphics shape like line rectangle etc... They also provide some convenience static method.  
 More...
#include <qetgraphicshandlerutility.h>
|  | 
| static QVector< QPointF > | pointsForRect (const QRectF &rect) | 
|  | QetGraphicsHandlerUtility::pointsForRect Return the keys points of the rectangle, stored in a vector. The points in the vector are stored like this : 
 | 
|  | 
| static QVector< QPointF > | pointsForLine (const QLineF &line) | 
|  | QetGraphicsHandlerUtility::pointsForLine The point that define a line in a QVector. there is two points. 
 | 
|  | 
| static QVector< QPointF > | pointsForArc (const QRectF &rect, qreal start_angle, qreal span_angle) | 
|  | QetGraphicsHandlerUtility::pointsForArc Return the points for the given arc. The first value in the vector is the start point, the second the end point. 
 | 
|  | 
| static QRectF | rectForPosAtIndex (const QRectF &old_rect, const QPointF &pos, int index) | 
|  | QetGraphicsHandlerUtility::rectForPosAtIndex Return a rectangle after modification of the point 'pos' at index 'index' of original rectangle 'old_rect'. 
 | 
|  | 
| static QRectF | mirrorRectForPosAtIndex (const QRectF &old_rect, const QPointF &pos, int index) | 
|  | QetGraphicsHandlerUtility::mirrorRectForPosAtIndex Return a rectangle after modification of the point 'pos' at index 'index' of original rectangle 'old_rect'. the opposite edge is modified inversely (like a mirror) 
 | 
|  | 
| static QRectF | rectForArc (const QRectF &rect, qreal start_angle, qreal span_angle) | 
|  | QetGraphicsHandlerUtility::rectForArc. 
 | 
|  | 
| static QLineF | lineForPosAtIndex (const QLineF &old_line, const QPointF &pos, int index) | 
|  | QetGraphicsHandlerUtility::lineForPosAtIndex Return a line after modification of pos at index index of old_line. 
 | 
|  | 
| static QPolygonF | polygonForInsertPoint (const QPolygonF &old_polygon, bool closed, const QPointF &pos) | 
|  | QetGraphicsHandlerUtility::polygonForInsertPoint. 
 | 
|  | 
| static QVector< QPointF > | pointForRadiusRect (const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode=Qt::AbsoluteSize) | 
|  | QetGraphicsHandlerUtility::pointForRadiusRect. 
 | 
|  | 
| static qreal | radiusForPosAtIndex (const QRectF &rect, const QPointF &pos, int index, Qt::SizeMode mode=Qt::AbsoluteSize) | 
|  | QetGraphicsHandlerUtility::radiusForPosAtIndex. 
 | 
|  | 
| static qreal | percentageInRange (qreal min, qreal max, qreal value) | 
|  | 
The QetGraphicsHandlerUtility class This class provide some methods to create and use handler for modify graphics shape like line rectangle etc... They also provide some convenience static method. 
◆ lineForPosAtIndex()
  
  | 
        
          | QLineF QetGraphicsHandlerUtility::lineForPosAtIndex | ( | const QLineF & | old_line, |  
          |  |  | const QPointF & | pos, |  
          |  |  | int | index |  
          |  | ) |  |  |  | static | 
 
 
◆ mirrorRectForPosAtIndex()
  
  | 
        
          | QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex | ( | const QRectF & | old_rect, |  
          |  |  | const QPointF & | pos, |  
          |  |  | int | index |  
          |  | ) |  |  |  | static | 
 
QetGraphicsHandlerUtility::mirrorRectForPosAtIndex Return a rectangle after modification of the point 'pos' at index 'index' of original rectangle 'old_rect'. the opposite edge is modified inversely (like a mirror) 
- Parameters
- 
  
    | old_rect | : the rectangle before modification |  | pos | : the new position of a key point |  | index | : the index of the key point to modifie |  
 
- See also
- QetGraphicsHandlerUtility::pointsForRect to know the index of each keys points of a rectangle) 
- Returns
- : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect. 
 
 
◆ percentageInRange()
  
  | 
        
          | qreal QetGraphicsHandlerUtility::percentageInRange | ( | qreal | min, |  
          |  |  | qreal | max, |  
          |  |  | qreal | value |  
          |  | ) |  |  |  | static | 
 
 
◆ pointForRadiusRect()
  
  | 
        
          | QVector< QPointF > QetGraphicsHandlerUtility::pointForRadiusRect | ( | const QRectF & | rect, |  
          |  |  | qreal | xRadius, |  
          |  |  | qreal | yRadius, |  
          |  |  | Qt::SizeMode | mode = Qt::AbsoluteSize |  
          |  | ) |  |  |  | static | 
 
QetGraphicsHandlerUtility::pointForRadiusRect. 
- Parameters
- 
  
    | rect | the rectangle. |  | xRadius | : x radius |  | yRadius | : y radius |  | mode | : absolute or relative size: NOTE this argument is not used, this function always compute with relative size. |  
 
- Returns
- the points of x and y radius of a rounded rect. The points are always based on the top right corner of the rect. the first point of vector is X the second Y 
 
 
◆ pointsForArc()
  
  | 
        
          | QVector< QPointF > QetGraphicsHandlerUtility::pointsForArc | ( | const QRectF & | rect, |  
          |  |  | qreal | start_angle, |  
          |  |  | qreal | span_angle |  
          |  | ) |  |  |  | static | 
 
QetGraphicsHandlerUtility::pointsForArc Return the points for the given arc. The first value in the vector is the start point, the second the end point. 
- Parameters
- 
  
    | rect |  |  | start_angle | : start angle in degree |  | span_angle | : span angle in degree; |  
 
- Returns
 
 
◆ pointsForLine()
  
  | 
        
          | QVector< QPointF > QetGraphicsHandlerUtility::pointsForLine | ( | const QLineF & | line | ) |  |  | static | 
 
 
◆ pointsForRect()
  
  | 
        
          | QVector< QPointF > QetGraphicsHandlerUtility::pointsForRect | ( | const QRectF & | rect | ) |  |  | static | 
 
 
◆ polygonForInsertPoint()
  
  | 
        
          | QPolygonF QetGraphicsHandlerUtility::polygonForInsertPoint | ( | const QPolygonF & | old_polygon, |  
          |  |  | bool | closed, |  
          |  |  | const QPointF & | pos |  
          |  | ) |  |  |  | static | 
 
 
◆ radiusForPosAtIndex()
  
  | 
        
          | qreal QetGraphicsHandlerUtility::radiusForPosAtIndex | ( | const QRectF & | rect, |  
          |  |  | const QPointF & | pos, |  
          |  |  | int | index, |  
          |  |  | Qt::SizeMode | mode = Qt::AbsoluteSize |  
          |  | ) |  |  |  | static | 
 
 
◆ rectForArc()
  
  | 
        
          | QRectF QetGraphicsHandlerUtility::rectForArc | ( | const QRectF & | rect, |  
          |  |  | qreal | start_angle, |  
          |  |  | qreal | span_angle |  
          |  | ) |  |  |  | static | 
 
QetGraphicsHandlerUtility::rectForArc. 
- Parameters
- 
  
    | rect | : the rect where the arc is defined |  | start_angle | : start angle in degree |  | span_angle | : span angle in degree |  
 
- Returns
- Return the rect that bound the arc. 
 
 
◆ rectForPosAtIndex()
  
  | 
        
          | QRectF QetGraphicsHandlerUtility::rectForPosAtIndex | ( | const QRectF & | old_rect, |  
          |  |  | const QPointF & | pos, |  
          |  |  | int | index |  
          |  | ) |  |  |  | static | 
 
QetGraphicsHandlerUtility::rectForPosAtIndex Return a rectangle after modification of the point 'pos' at index 'index' of original rectangle 'old_rect'. 
- Parameters
- 
  
    | old_rect | - the rectangle before modification |  | pos | - the new position of a key point |  | index | - the index of the key point to modifie |  
 
- See also
- QetGraphicsHandlerUtility::pointsForRect to know the index of each keys points of a rectangle) 
- Returns
- : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect. 
 
 
The documentation for this class was generated from the following files: