Mod doc set style de same

This commit is contained in:
Simon De Backer
2020-08-16 11:19:36 +02:00
parent 90417ae509
commit d4ee161c07
274 changed files with 6823 additions and 6756 deletions

View File

@@ -21,9 +21,9 @@
#include <utility>
/**
* @brief QetGraphicsHandlerItem::QetGraphicsHandlerItem
* @param size, the size of the handler
*/
@brief QetGraphicsHandlerItem::QetGraphicsHandlerItem
@param size, the size of the handler
*/
QetGraphicsHandlerItem::QetGraphicsHandlerItem(qreal size) :
m_size(size)
{
@@ -34,17 +34,17 @@ QetGraphicsHandlerItem::QetGraphicsHandlerItem(qreal size) :
}
/**
* @brief QetGraphicsHandlerItem::boundingRect
* @return
*/
@brief QetGraphicsHandlerItem::boundingRect
@return
*/
QRectF QetGraphicsHandlerItem::boundingRect() const {
return m_br;
}
/**
* @brief QetGraphicsHandlerItem::setColor
* @param color, set the color of the handler
*/
@brief QetGraphicsHandlerItem::setColor
@param color, set the color of the handler
*/
void QetGraphicsHandlerItem::setColor(QColor color)
{
m_color = std::move(color);
@@ -52,11 +52,11 @@ void QetGraphicsHandlerItem::setColor(QColor color)
}
/**
* @brief QetGraphicsHandlerItem::paint
* @param painter
* @param option
* @param widget
*/
@brief QetGraphicsHandlerItem::paint
@param painter
@param option
@param widget
*/
void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option)
@@ -73,10 +73,10 @@ void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphics
}
/**
* @brief QetGraphicsHandlerItem::handlerForPoint
* @param points
* @return A list of handler with pos at point
*/
@brief QetGraphicsHandlerItem::handlerForPoint
@param points
@return A list of handler with pos at point
*/
QVector<QetGraphicsHandlerItem *> QetGraphicsHandlerItem::handlerForPoint(const QVector<QPointF> &points, int size)
{
QVector <QetGraphicsHandlerItem *> list_;

View File

@@ -22,12 +22,12 @@
#include <QPen>
/**
* @brief The QetGraphicsHandlerItem class
* This graphics item represents a point, destined to be used as an handler,
* for modifie the geometrie of a another graphics item (like shapes).
* The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,.
* The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior.
*/
@brief The QetGraphicsHandlerItem class
This graphics item represents a point, destined to be used as an handler,
for modifie the geometrie of a another graphics item (like shapes).
The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,.
The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior.
*/
class QetGraphicsHandlerItem : public QGraphicsItem
{
public:

View File

@@ -20,19 +20,19 @@
/**
* @brief QetGraphicsHandlerUtility::pointsForRect
* Return the keys points of the rectangle, stored in a vector.
* The points in the vector are stored like this :
* **********
* 0---1---2
* | |
* 3 4
* | |
* 5---6---7
* ************
* @param rect
* @return
*/
@brief QetGraphicsHandlerUtility::pointsForRect
Return the keys points of the rectangle, stored in a vector.
The points in the vector are stored like this :
**********
0---1---2
| |
3 4
| |
5---6---7
************
@param rect
@return
*/
QVector<QPointF> QetGraphicsHandlerUtility::pointsForRect(const QRectF &rect)
{
QVector<QPointF> vector;
@@ -56,25 +56,26 @@ QVector<QPointF> QetGraphicsHandlerUtility::pointsForRect(const QRectF &rect)
}
/**
* @brief QetGraphicsHandlerUtility::pointsForLine
* The point that define a line in a QVector.
* there is two points.
* @param line
* @return
*/
@brief QetGraphicsHandlerUtility::pointsForLine
The point that define a line in a QVector.
there is two points.
@param line
@return
*/
QVector<QPointF> QetGraphicsHandlerUtility::pointsForLine(const QLineF &line) {
return (QVector<QPointF> {line.p1(), line.p2()});
}
/**
* @brief QetGraphicsHandlerUtility::pointsForArc
* Return the points for the given arc.
* The first value in the vector is the start point, the second the end point.
* @param rect
* @param start_angle : start angle in degree
* @param span_angle : span angle in degree;
* @return
*/
@brief QetGraphicsHandlerUtility::pointsForArc
Return the points for the given arc.
The first value in the vector is the start point,
the second the end point.
@param rect
@param start_angle : start angle in degree
@param span_angle : span angle in degree;
@return
*/
QVector<QPointF> QetGraphicsHandlerUtility::pointsForArc(const QRectF &rect, qreal start_angle, qreal span_angle)
{
QVector<QPointF> vector;
@@ -88,14 +89,18 @@ QVector<QPointF> QetGraphicsHandlerUtility::pointsForArc(const QRectF &rect, qre
}
/**
* @brief QetGraphicsHandlerUtility::rectForPosAtIndex
* Return a rectangle after modification of the point '@pos' at index '@index' of original rectangle '@old_rect'.
* @param old_rect - the rectangle befor modification
* @param pos - the new position of a key point
* @param index - the index of the key point to modifie see QetGraphicsHandlerUtility::pointsForRect to know
* the index of each keys points of a rectangle)
* @return : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect.
*/
@brief QetGraphicsHandlerUtility::rectForPosAtIndex
Return a rectangle after modification
of the point '@pos' at index '@index' of original rectangle '@old_rect'.
@param old_rect - the rectangle befor modification
@param pos - the new position of a key point
@param index - the index of the key point to modifie
@see QetGraphicsHandlerUtility::pointsForRect to know
the index of each keys points of a rectangle)
@return : the rectangle with modification.
If index is lower than 0 or higher than 7,
this method return old_rect.
*/
QRectF QetGraphicsHandlerUtility::rectForPosAtIndex(const QRectF &old_rect, const QPointF &pos, int index)
{
if (index < 0 || index > 7) return old_rect;
@@ -114,15 +119,19 @@ QRectF QetGraphicsHandlerUtility::rectForPosAtIndex(const QRectF &old_rect, cons
}
/**
* @brief 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)
* @param old_rect : the rectangle befor modification
* @param pos : the new position of a key point
* @param index : the index of the key point to modifie see QetGraphicsHandlerUtility::pointsForRect to know
* the index of each keys points of a rectangle)
* @return : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect.
*/
@brief 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)
@param old_rect : the rectangle befor modification
@param pos : the new position of a key point
@param index : the index of the key point to modifie
@see QetGraphicsHandlerUtility::pointsForRect to know
the index of each keys points of a rectangle)
@return : the rectangle with modification.
If index is lower than 0 or higher than 7,
this method return old_rect.
*/
QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(const QRectF &old_rect, const QPointF &pos, int index)
{
if (index < 0 || index > 7) return old_rect;
@@ -172,13 +181,13 @@ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(const QRectF &old_rect
}
/**
* @brief QetGraphicsHandlerUtility::lineForPosAtIndex
* Return a line after modification of @pos at index @index of @old_line.
* @param old_line
* @param pos
* @param index
* @return
*/
@brief QetGraphicsHandlerUtility::lineForPosAtIndex
Return a line after modification of @pos at index @index of @old_line.
@param old_line
@param pos
@param index
@return
*/
QLineF QetGraphicsHandlerUtility::lineForPosAtIndex(const QLineF &old_line, const QPointF &pos, int index) {
QLineF line = old_line;
index == 0 ? line.setP1(pos) : line.setP2(pos);
@@ -186,12 +195,12 @@ QLineF QetGraphicsHandlerUtility::lineForPosAtIndex(const QLineF &old_line, cons
}
/**
* @brief QetGraphicsHandlerUtility::polygonForInsertPoint
* @param old_polygon : the polygon which we insert a new point.
* @param closed : polygon is closed or not
* @param pos : the pos where the new point must be added
* @return the new polygon
*/
@brief QetGraphicsHandlerUtility::polygonForInsertPoint
@param old_polygon : the polygon which we insert a new point.
@param closed : polygon is closed or not
@param pos : the pos where the new point must be added
@return the new polygon
*/
QPolygonF QetGraphicsHandlerUtility::polygonForInsertPoint(const QPolygonF &old_polygon, bool closed, const QPointF &pos)
{
qreal max_angle = 0;
@@ -241,15 +250,17 @@ QPolygonF QetGraphicsHandlerUtility::polygonForInsertPoint(const QPolygonF &old_
}
/**
* @brief QetGraphicsHandlerUtility::pointForRadiusRect
* @param rect the rectangle.
* @param xRadius : x radius
* @param yRadius : y radius
* @param mode : absolute or relative size: NOTE this argument is not used, this function always compute with relative size.
* @return 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
*/
@brief QetGraphicsHandlerUtility::pointForRadiusRect
@param rect the rectangle.
@param xRadius : x radius
@param yRadius : y radius
@param mode :
absolute or relative size: NOTE this argument is not used,
this function always compute with relative size.
@return 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
*/
QVector<QPointF> QetGraphicsHandlerUtility::pointForRadiusRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
{
QVector<QPointF> v;
@@ -283,13 +294,13 @@ QVector<QPointF> QetGraphicsHandlerUtility::pointForRadiusRect(const QRectF &rec
}
/**
* @brief QetGraphicsHandlerUtility::radiusForPosAtIndex
* @param rect the rectangle
* @param pos : the pos of the new radius
* @param index : index of radius 0=X 1=Y
* @param mode
* @return
*/
@brief QetGraphicsHandlerUtility::radiusForPosAtIndex
@param rect the rectangle
@param pos : the pos of the new radius
@param index : index of radius 0=X 1=Y
@param mode
@return
*/
qreal QetGraphicsHandlerUtility::radiusForPosAtIndex(const QRectF &rect, const QPointF &pos, int index, Qt::SizeMode mode)
{
if (mode == Qt::AbsoluteSize)

View File

@@ -26,11 +26,11 @@
class QPainter;
/**
* @brief 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 conveniance static method.
*/
@brief 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 conveniance static method.
*/
class QetGraphicsHandlerUtility
{
public: