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

@@ -24,12 +24,12 @@
/**
* @brief DiagramEventAddElement::DiagramEventAddElement
* Defaut constructor
* @param location :location of diagram
* @param diagram : diagram owner of this event
* @param pos : first pos of item ( optional, by defaut QPointF(0,0) )
*/
@brief DiagramEventAddElement::DiagramEventAddElement
Defaut constructor
@param location :location of diagram
@param diagram : diagram owner of this event
@param pos : first pos of item ( optional, by defaut QPointF(0,0) )
*/
DiagramEventAddElement::DiagramEventAddElement(ElementsLocation &location, Diagram *diagram, QPointF pos) :
DiagramEventInterface(diagram),
m_location(location),
@@ -53,10 +53,10 @@ DiagramEventAddElement::DiagramEventAddElement(ElementsLocation &location, Diagr
}
/**
* @brief DiagramEventAddElement::~DiagramEventAddElement
* Destructor
* Enable context menu for each view of diagram
*/
@brief DiagramEventAddElement::~DiagramEventAddElement
Destructor
Enable context menu for each view of diagram
*/
DiagramEventAddElement::~DiagramEventAddElement()
{
if (m_element)
@@ -69,11 +69,11 @@ DiagramEventAddElement::~DiagramEventAddElement()
}
/**
* @brief DiagramEventAddElement::mouseMoveEvent
* Move the element to new pos of mouse
* the event is always accepted
* @param event
*/
@brief DiagramEventAddElement::mouseMoveEvent
Move the element to new pos of mouse
the event is always accepted
@param event
*/
void DiagramEventAddElement::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (m_element) {
@@ -83,22 +83,22 @@ void DiagramEventAddElement::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddElement::mousePressEvent
* Do nothing, but return true for not transit the event to other thing in diagram.
* the event is always accepted
* @param event
*/
@brief DiagramEventAddElement::mousePressEvent
Do nothing, but return true for not transit the event to other thing in diagram.
the event is always accepted
@param event
*/
void DiagramEventAddElement::mousePressEvent(QGraphicsSceneMouseEvent *event) {
event->setAccepted(true);
}
/**
* @brief DiagramEventAddElement::mouseReleaseEvent
* Right button finish this event (isRunning = false) and emit finish.
* Left button add an element to diagram
* the event is always accepted
* @param event
*/
@brief DiagramEventAddElement::mouseReleaseEvent
Right button finish this event (isRunning = false) and emit finish.
Left button add an element to diagram
the event is always accepted
@param event
*/
void DiagramEventAddElement::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (m_element)
@@ -121,11 +121,11 @@ void DiagramEventAddElement::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddElement::mouseDoubleClickEvent
* If mouse left double clic, finish this event (isRunning = false) and emit finish
* the event is always accepted
* @param event
*/
@brief DiagramEventAddElement::mouseDoubleClickEvent
If mouse left double clic, finish this event (isRunning = false) and emit finish
the event is always accepted
@param event
*/
void DiagramEventAddElement::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
if (m_element && (event -> button() == Qt::LeftButton))
@@ -141,11 +141,11 @@ void DiagramEventAddElement::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *eve
}
/**
* @brief DiagramEventAddElement::keyPressEvent
* Press space key rotate the element to 90° (return true)
* else call DiagramEventInterface::keyPressEvent(event), and return the value.
* @param event
*/
@brief DiagramEventAddElement::keyPressEvent
Press space key rotate the element to 90° (return true)
else call DiagramEventInterface::keyPressEvent(event), and return the value.
@param event
*/
void DiagramEventAddElement::keyPressEvent(QKeyEvent *event)
{
if (m_element && event->key() == Qt::Key_Space)
@@ -159,9 +159,9 @@ void DiagramEventAddElement::keyPressEvent(QKeyEvent *event)
}
/**
* @brief DiagramEventAddElement::init
* Init this event.
*/
@brief DiagramEventAddElement::init
Init this event.
*/
void DiagramEventAddElement::init()
{
foreach(QGraphicsView *view, m_diagram->views())
@@ -169,9 +169,9 @@ void DiagramEventAddElement::init()
}
/**
* @brief DiagramEventAddElement::buildElement
* Build the element, if the element is build successfully, we return true, otherwise false
*/
@brief DiagramEventAddElement::buildElement
Build the element, if the element is build successfully, we return true, otherwise false
*/
bool DiagramEventAddElement::buildElement()
{
ElementsLocation import_loc = m_diagram->project()->importElement(m_location);
@@ -196,10 +196,10 @@ bool DiagramEventAddElement::buildElement()
}
/**
* @brief DiagramEventAddElement::addElement
* Add an element at the current pos en current rotation,
* if project autoconductor option is enable, and the element can be wired, we do it.
*/
@brief DiagramEventAddElement::addElement
Add an element at the current pos en current rotation,
if project autoconductor option is enable, and the element can be wired, we do it.
*/
void DiagramEventAddElement::addElement()
{
int state;

View File

@@ -24,10 +24,10 @@
class Element;
/**
* @brief The DiagramEventAddElement class
* This diagram event add a new element, for each left click button at the position of click.
* Space key rotate current element by 90°, right click button finish this event.
*/
@brief The DiagramEventAddElement class
This diagram event add a new element, for each left click button at the position of click.
Space key rotate current element by 90°, right click button finish this event.
*/
class DiagramEventAddElement : public DiagramEventInterface
{
Q_OBJECT

View File

@@ -22,10 +22,10 @@
#include "diagramcommands.h"
/**
* @brief DiagramEventAddImage::DiagramEventAddImage
* Default constructor
* @param diagram : diagram where operate this event
*/
@brief DiagramEventAddImage::DiagramEventAddImage
Default constructor
@param diagram : diagram where operate this event
*/
DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) :
DiagramEventInterface(diagram),
m_image (nullptr),
@@ -35,8 +35,8 @@ DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) :
}
/**
* @brief DiagramEventAddImage::~DiagramEventAddImage
*/
@brief DiagramEventAddImage::~DiagramEventAddImage
*/
DiagramEventAddImage::~DiagramEventAddImage()
{
if (m_running || m_abort)
@@ -50,10 +50,10 @@ DiagramEventAddImage::~DiagramEventAddImage()
}
/**
* @brief DiagramEventAddImage::mousePressEvent
* Action when mouse is pressed
* @param event : event of mouse pressed
*/
@brief DiagramEventAddImage::mousePressEvent
Action when mouse is pressed
@param event : event of mouse pressed
*/
void DiagramEventAddImage::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (m_image && event -> button() == Qt::LeftButton)
@@ -79,10 +79,10 @@ void DiagramEventAddImage::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddImage::mouseMoveEvent
* Action when mouse move
* @param event : event of mouse move
*/
@brief DiagramEventAddImage::mouseMoveEvent
Action when mouse move
@param event : event of mouse move
*/
void DiagramEventAddImage::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if (!m_image || event->buttons() != Qt::NoButton) {
@@ -106,20 +106,20 @@ void DiagramEventAddImage::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddImage::mouseDoubleClickEvent
* This method is only use to overwrite double click.
* When double click, image propertie dialog isn't open.
* @param event : event of mouse double click.
*/
@brief DiagramEventAddImage::mouseDoubleClickEvent
This method is only use to overwrite double click.
When double click, image propertie dialog isn't open.
@param event : event of mouse double click.
*/
void DiagramEventAddImage::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) {
event->setAccepted(true);
}
/**
* @brief DiagramEventAddImage::wheelEvent
* Action when mouse wheel is rotate
* @param event: evet of mouse wheel
*/
@brief DiagramEventAddImage::wheelEvent
Action when mouse wheel is rotate
@param event: evet of mouse wheel
*/
void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event)
{
if (!m_is_added || !m_image || event -> modifiers() != Qt::CTRL) {
@@ -136,9 +136,9 @@ void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event)
}
/**
* @brief DiagramEventAddImage::isNull
* @return : true if image can't be loaded, otherwise return false.
*/
@brief DiagramEventAddImage::isNull
@return : true if image can't be loaded, otherwise return false.
*/
bool DiagramEventAddImage::isNull() const
{
if (!m_image) return true;
@@ -146,9 +146,9 @@ bool DiagramEventAddImage::isNull() const
}
/**
* @brief DiagramEventAddImage::openDialog
* Open dialog for select the image to add.
*/
@brief DiagramEventAddImage::openDialog
Open dialog for select the image to add.
*/
void DiagramEventAddImage::openDialog()
{
if (m_diagram -> isReadOnly()) return;

View File

@@ -24,9 +24,9 @@ class Diagram;
class DiagramImageItem;
/**
* @brief The DiagramEventAddImage class
* This diagram event, handle the adding of an image in a diagram.
*/
@brief The DiagramEventAddImage class
This diagram event, handle the adding of an image in a diagram.
*/
class DiagramEventAddImage : public DiagramEventInterface
{
Q_OBJECT

View File

@@ -20,11 +20,11 @@
#include "diagramcommands.h"
/**
* @brief DiagramEventAddShape::DiagramEventAddShape
* Default constructor
* @param diagram : the diagram where this event must operate
* @param shape_type : the type of shape to draw
*/
@brief DiagramEventAddShape::DiagramEventAddShape
Default constructor
@param diagram : the diagram where this event must operate
@param shape_type : the type of shape to draw
*/
DiagramEventAddShape::DiagramEventAddShape(Diagram *diagram, QetShapeItem::ShapeType shape_type) :
DiagramEventInterface(diagram),
m_shape_type (shape_type),
@@ -37,8 +37,8 @@ DiagramEventAddShape::DiagramEventAddShape(Diagram *diagram, QetShapeItem::Shape
}
/**
* @brief DiagramEventAddShape::~DiagramEventAddShape
*/
@brief DiagramEventAddShape::~DiagramEventAddShape
*/
DiagramEventAddShape::~DiagramEventAddShape()
{
if ((m_running || m_abort) && m_shape_item)
@@ -54,10 +54,10 @@ DiagramEventAddShape::~DiagramEventAddShape()
}
/**
* @brief DiagramEventAddShape::mousePressEvent
* Action when mouse is pressed
* @param event : event of mouse press
*/
@brief DiagramEventAddShape::mousePressEvent
Action when mouse is pressed
@param event : event of mouse press
*/
void DiagramEventAddShape::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (Q_UNLIKELY(m_diagram->isReadOnly())) {
@@ -107,10 +107,10 @@ void DiagramEventAddShape::mousePressEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddShape::mouseMoveEvent
* Action when mouse move
* @param event : event of mouse move
*/
@brief DiagramEventAddShape::mouseMoveEvent
Action when mouse move
@param event : event of mouse move
*/
void DiagramEventAddShape::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
updateHelpCross(event->scenePos());
@@ -128,10 +128,10 @@ void DiagramEventAddShape::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddShape::mouseReleaseEvent
* Action when mouse button is released
* @param event : event of mouse release
*/
@brief DiagramEventAddShape::mouseReleaseEvent
Action when mouse button is released
@param event : event of mouse release
*/
void DiagramEventAddShape::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::RightButton)
@@ -170,10 +170,10 @@ void DiagramEventAddShape::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
/**
* @brief DiagramEventAddShape::mouseDoubleClickEvent
* Action when mouse button is double clicked
* @param event : event of mouse double click
*/
@brief DiagramEventAddShape::mouseDoubleClickEvent
Action when mouse button is double clicked
@param event : event of mouse double click
*/
void DiagramEventAddShape::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event)
{
//If current item is a polyline, add it with an undo command
@@ -204,10 +204,10 @@ void DiagramEventAddShape::init()
}
/**
* @brief DiagramEventAddShape::updateHelpCross
* Create and update the position of the cross to help user for draw new shape
* @param p : the center of the cross
*/
@brief DiagramEventAddShape::updateHelpCross
Create and update the position of the cross to help user for draw new shape
@param p : the center of the cross
*/
void DiagramEventAddShape::updateHelpCross(const QPointF &p)
{
//If line isn't created yet, we create it.

View File

@@ -22,9 +22,9 @@
#include "qetshapeitem.h"
/**
* @brief The DiagramEventAddShape class
* This event manage the creation of a shape.
*/
@brief The DiagramEventAddShape class
This event manage the creation of a shape.
*/
class DiagramEventAddShape : public DiagramEventInterface
{
Q_OBJECT

View File

@@ -22,24 +22,24 @@
#include "diagram.h"
/**
* @brief DiagramEventAddText::DiagramEventAddText
* Default constructor
* @param diagram : the diagram where this event must operate
*/
@brief DiagramEventAddText::DiagramEventAddText
Default constructor
@param diagram : the diagram where this event must operate
*/
DiagramEventAddText::DiagramEventAddText(Diagram *diagram) :
DiagramEventInterface(diagram)
{}
/**
* @brief DiagramEventAddText::~DiagramEventAddText
*/
@brief DiagramEventAddText::~DiagramEventAddText
*/
DiagramEventAddText::~DiagramEventAddText()
{}
/**
* @brief DiagramEventAddText::mousePressEvent
* @param event : event of mouse press event.
*/
@brief DiagramEventAddText::mousePressEvent
@param event : event of mouse press event.
*/
void DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
if (event->button() == Qt::LeftButton)

View File

@@ -23,9 +23,9 @@
class Diagram;
/**
* @brief The DiagramEventAddText class
* This diagram event handle the creation of a new text in a diagram
*/
@brief The DiagramEventAddText class
This diagram event handle the creation of a new text in a diagram
*/
class DiagramEventAddText : public DiagramEventInterface
{
Q_OBJECT

View File

@@ -52,10 +52,10 @@ void DiagramEventInterface::wheelEvent(QGraphicsSceneWheelEvent *event) {
}
/**
* @brief DiagramEventInterface::keyPressEvent
* By default, press escape key abort the curent action
* @param event
*/
@brief DiagramEventInterface::keyPressEvent
By default, press escape key abort the curent action
@param event
*/
void DiagramEventInterface::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Escape)

View File

@@ -26,22 +26,22 @@ class QKeyEvent;
class Diagram;
/**
* @brief The DiagramEventInterface class
* isRunning() return true if action is running (do something). By default return false.
@brief The DiagramEventInterface class
isRunning() return true if action is running (do something). By default return false.
*
* ##USE DiagramEventInterface##
* This class is the basic interface for manage event on a diagram.
* To create a behavior for event diagram, we need to herite this class.
* This interface work like this :
* You need to create an interface and call diagram::setEventInterface(pointer_of_your_interface).
* When a diagram get an event (mouse or key) if they have an event interface,
* they send the event (with the status accepted to false) to the interface (for exemple mousePressEvent).
* If the interface do something with this event, you need to set to true the accepted status of the event, then diagram do nothing.
* When the interface job is done, we need to emit the signal finish(), the diagram use this signal to delete the interface.
* Be carreful with the destructor, diagram can at any time (even if interface is still running) delete the interface,
* the bool m_abort is here for that at destruction time.
##USE DiagramEventInterface##
This class is the basic interface for manage event on a diagram.
To create a behavior for event diagram, we need to herite this class.
This interface work like this :
You need to create an interface and call diagram::setEventInterface(pointer_of_your_interface).
When a diagram get an event (mouse or key) if they have an event interface,
they send the event (with the status accepted to false) to the interface (for exemple mousePressEvent).
If the interface do something with this event, you need to set to true the accepted status of the event, then diagram do nothing.
When the interface job is done, we need to emit the signal finish(), the diagram use this signal to delete the interface.
Be carreful with the destructor, diagram can at any time (even if interface is still running) delete the interface,
the bool m_abort is here for that at destruction time.
*
*/
*/
class DiagramEventInterface : public QObject
{
Q_OBJECT