Mod doc to set style de same + Fix indentation code

This commit is contained in:
Simon De Backer
2020-07-15 18:17:39 +02:00
committed by Laurent Trinques
parent 251dfdf37a
commit 2cdfce18ec
11 changed files with 252 additions and 245 deletions

View File

@@ -43,12 +43,12 @@ QString itemText(const Conductor *item) {
}
/**
* @brief PasteDiagramCommand::PasteDiagramCommand
* Constructor
* @param dia : diagram where we must to paste
* @param c : content to past
* @param parent : parent undo command
*/
@brief PasteDiagramCommand::PasteDiagramCommand
Constructor
@param dia : diagram where we must to paste
@param c : content to past
@param parent : parent undo command
*/
PasteDiagramCommand::PasteDiagramCommand( Diagram *dia, const DiagramContent &c, QUndoCommand *parent) :
QUndoCommand(parent),
content(c),
@@ -61,17 +61,17 @@ PasteDiagramCommand::PasteDiagramCommand( Diagram *dia, const DiagramContent &c,
}
/**
* @brief PasteDiagramCommand::~PasteDiagramCommand
* Destructor
*/
@brief PasteDiagramCommand::~PasteDiagramCommand
Destructor
*/
PasteDiagramCommand::~PasteDiagramCommand() {
diagram -> qgiManager().release(content.items(filter));
}
/**
* @brief PasteDiagramCommand::undo
* Undo this command
*/
@brief PasteDiagramCommand::undo
Undo this command
*/
void PasteDiagramCommand::undo()
{
diagram -> showMe();
@@ -81,9 +81,9 @@ void PasteDiagramCommand::undo()
}
/**
* @brief PasteDiagramCommand::redo
* Redo this commnand
*/
@brief PasteDiagramCommand::redo
Redo this commnand
*/
void PasteDiagramCommand::redo()
{
diagram -> showMe();
@@ -166,13 +166,13 @@ CutDiagramCommand::~CutDiagramCommand() {
}
/**
* @brief MoveElementsCommand::MoveElementsCommand
* Constructor
* @param dia diagram
* @param diagram_content diagram content (contain all items to be moved)
* @param m movement to applied
* @param parent parent undo command
*/
@brief MoveElementsCommand::MoveElementsCommand
Constructor
@param dia diagram
@param diagram_content diagram content (contain all items to be moved)
@param m movement to applied
@param parent parent undo command
*/
MoveElementsCommand::MoveElementsCommand(
Diagram *dia,
const DiagramContent &diagram_content,
@@ -207,16 +207,16 @@ MoveElementsCommand::MoveElementsCommand(
}
/**
* @brief MoveElementsCommand::~MoveElementsCommand
* Destructor
*/
@brief MoveElementsCommand::~MoveElementsCommand
Destructor
*/
MoveElementsCommand::~MoveElementsCommand() {
delete m_anim_group;
}
/**
* @brief MoveElementsCommand::undo
*/
@brief MoveElementsCommand::undo
*/
void MoveElementsCommand::undo() {
diagram -> showMe();
m_anim_group->setDirection(QAnimationGroup::Forward);
@@ -225,8 +225,8 @@ void MoveElementsCommand::undo() {
}
/**
* @brief MoveElementsCommand::redo
*/
@brief MoveElementsCommand::redo
*/
void MoveElementsCommand::redo() {
diagram -> showMe();
if (first_redo) {
@@ -241,10 +241,10 @@ void MoveElementsCommand::redo() {
}
/**
* @brief MoveElementsCommand::move
* Move item and conductor to @actual_movement
* @param actual_movement movement to be applied
*/
@brief MoveElementsCommand::move
Move item and conductor to @actual_movement
@param actual_movement movement to be applied
*/
void MoveElementsCommand::move(const QPointF &actual_movement)
{
typedef DiagramContent dc;
@@ -262,6 +262,7 @@ void MoveElementsCommand::move(const QPointF &actual_movement)
setupAnimation(qgi->toGraphicsObject(), "pos", qgi->pos(), qgi->pos() + actual_movement);
else if(qgi->type() == QGraphicsItemGroup::Type) //ElementTextItemGroup is a QObject but not a QGraphicsObject
{
//ElementTextItemGroup is a QObject but not a QGraphicsObject
if(ElementTextItemGroup *etig = dynamic_cast<ElementTextItemGroup *>(qgi))
setupAnimation(etig, "pos", etig->pos(), etig->pos() + actual_movement);
}
@@ -511,10 +512,10 @@ void ChangeConductorCommand::setConductorTextItemMove(const QPointF &pos_before,
}
/**
* @brief ResetConductorCommand::ResetConductorCommand
* @param cp
* @param parent
*/
@brief ResetConductorCommand::ResetConductorCommand
@param cp
@param parent
*/
ResetConductorCommand::ResetConductorCommand(
const QHash<Conductor *, ConductorProfilesGroup> &cp,
QUndoCommand *parent
@@ -532,14 +533,14 @@ ResetConductorCommand::ResetConductorCommand(
}
/**
* @brief ResetConductorCommand::~ResetConductorCommand
*/
@brief ResetConductorCommand::~ResetConductorCommand
*/
ResetConductorCommand::~ResetConductorCommand() {
}
/**
* @brief ResetConductorCommand::undo
*/
@brief ResetConductorCommand::undo
*/
void ResetConductorCommand::undo() {
diagram -> showMe();
foreach(Conductor *c, conductors_profiles.keys()) {
@@ -548,8 +549,8 @@ void ResetConductorCommand::undo() {
}
/**
* @brief ResetConductorCommand::redo
*/
@brief ResetConductorCommand::redo
*/
void ResetConductorCommand::redo() {
diagram -> showMe();
foreach(Conductor *c, conductors_profiles.keys()) {

View File

@@ -34,10 +34,10 @@ class DiagramImageItem;
class QetGraphicsItem;
/**
* @brief The AddItemCommand class
* This command add an item in a diagram
* The item to add is template, but must be QGraphicsItem or derived.
*/
@brief The AddItemCommand class
This command add an item in a diagram
The item to add is template, but must be QGraphicsItem or derived.
*/
template <typename QGI>
class AddItemCommand : public QUndoCommand {
public:

View File

@@ -9,11 +9,13 @@
class QGraphicsObject;
/*!
* \brief The TerminalData class
* Data of the terminal. Stored in extra class so it can be used by PartTerminal and Terminal without
* defining everything again.
*/
/**
@brief The TerminalData class
Data of the terminal.
Stored in extra class so it can be used by PartTerminal
and Terminal without defining everything again.
@note tis class needs to be work on
*/
class TerminalData : public PropertiesInterface
{
public:

View File

@@ -185,28 +185,28 @@ Qet::Orientation Terminal::orientation() const {
/**
* @brief Terminal::setNumber
* @param number
*/
@brief Terminal::setNumber
@param number
*/
void Terminal::setNumber(QString number) {
number_terminal_ = std::move(number);
}
/**
* @brief Terminal::setName
* @param name
*/
@brief Terminal::setName
@param name
*/
void Terminal::setName(QString name, bool hiddenName) {
name_terminal_ = std::move(name);
name_terminal_hidden = hiddenName;
}
/**
* @brief Terminal::addConductor
* Add a conductor to this terminal
* @param conductor : the conductor to add.
* @return true if the conductor was successfully added
*/
@brief Terminal::addConductor
Add a conductor to this terminal
@param conductor : the conductor to add.
@return true if the conductor was successfully added
*/
bool Terminal::addConductor(Conductor *conductor)
{
if (!conductor) return(false);
@@ -227,10 +227,10 @@ bool Terminal::addConductor(Conductor *conductor)
}
/**
* @brief Terminal::removeConductor
* Remove a conductor from this terminal
* @param conductor : conductor to remove
*/
@brief Terminal::removeConductor
Remove a conductor from this terminal
@param conductor : conductor to remove
*/
void Terminal::removeConductor(Conductor *conductor)
{
int index = conductors_.indexOf(conductor);
@@ -346,10 +346,10 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
}
/**
* @brief Terminal::drawHelpLine
* @param draw : true, display the help line
* false, hide it.
*/
@brief Terminal::drawHelpLine
@param draw : true, display the help line
false, hide it.
*/
void Terminal::drawHelpLine(bool draw)
{
if (m_draw_help_line == draw) return;
@@ -372,11 +372,11 @@ void Terminal::drawHelpLine(bool draw)
}
/**
* @brief Terminal::HelpLine
* @return a line with coordinate P1 the dock point of conductor
* and P2 the border of diagram, according to the orientation of terminal
* The line is in scene coordinate;
*/
@brief Terminal::HelpLine
@return a line with coordinate P1 the dock point of conductor
and P2 the border of diagram, according to the orientation of terminal
The line is in scene coordinate;
*/
QLineF Terminal::HelpLine() const
{
QPointF scene_dock = dockConductor();
@@ -425,12 +425,12 @@ QRectF Terminal::boundingRect() const {
}
/**
* @brief Terminal::alignedWithTerminal
* If this terminal is aligned with an other terminal
* and is orientation is opposed return the other terminal
* else return nullptr
* @return
*/
@brief Terminal::alignedWithTerminal
If this terminal is aligned with an other terminal
and is orientation is opposed return the other terminal
else return nullptr
@return
*/
Terminal* Terminal::alignedWithTerminal() const
{
QLineF line(HelpLine());
@@ -542,7 +542,6 @@ void Terminal::mouseMoveEvent(QGraphicsSceneMouseEvent *e) {
previous_terminal_ -> update();
}
Diagram *diag = diagram();
if (!diag) return;
// si la scene est un Diagram, on actualise le poseur de conducteur
@@ -584,9 +583,9 @@ void Terminal::mouseMoveEvent(QGraphicsSceneMouseEvent *e) {
/**
* @brief Terminal::mouseReleaseEvent
* @param e
*/
@brief Terminal::mouseReleaseEvent
@param e
*/
void Terminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
{
previous_terminal_ = nullptr;
@@ -658,9 +657,9 @@ void Terminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *e)
}
/**
* @brief Terminal::updateConductor
* Update the path of conductor docked to this terminal
*/
@brief Terminal::updateConductor
Update the path of conductor docked to this terminal
*/
void Terminal::updateConductor() {
foreach (Conductor *conductor, conductors_)
conductor->updatePath();
@@ -685,15 +684,15 @@ bool Terminal::isLinkedTo(Terminal *other_terminal) {
}
/**
* @brief Terminal::canBeLinkedTo
* Checking if the terminal can be linked to \p other_terminal or not
* Reasons for not linable:
* - \p other_terminal is this terminal
* - this terminal is already connected to \p other_terminal
* @param other_terminal
* @return true if this terminal can be linked to @other_terminal,
* otherwise false
*/
@brief Terminal::canBeLinkedTo
Checking if the terminal can be linked to \p other_terminal or not
Reasons for not linable:
- \p other_terminal is this terminal
- this terminal is already connected to \p other_terminal
@param other_terminal
@return true if this terminal can be linked to @other_terminal,
otherwise false
*/
bool Terminal::canBeLinkedTo(Terminal *other_terminal)
{
if (other_terminal == this || isLinkedTo(other_terminal))
@@ -815,16 +814,16 @@ QUuid Terminal::uuid() const {
}
/**
* @brief Conductor::relatedPotentialTerminal
* Return terminal at the same potential from the same
* parent element of @t.
* For folio report, return the terminal of linked other report.
* For Terminal element, return the other terminal of terminal element.
* @param t terminal to start search
* @param all_diagram :if true return all related terminal,
* false return only terminal in the same diagram of @t
* @return the list of terminal at the same potential
*/
@brief Conductor::relatedPotentialTerminal
Return terminal at the same potential from the same
parent element of @t.
For folio report, return the terminal of linked other report.
For Terminal element, return the other terminal of terminal element.
@param t terminal to start search
@param all_diagram :if true return all related terminal,
false return only terminal in the same diagram of @t
@return the list of terminal at the same potential
*/
QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram)
{
// If terminal parent element is a folio report.

View File

@@ -129,9 +129,11 @@ class Terminal : public QGraphicsObject
QPointF dock_elmt_;
/// List of conductors attached to the terminal
QList<Conductor *> conductors_;
/// Pointer to a rectangle representing the terminal bounding rect;
/// used to calculate the bounding rect once only;
/// used a pointer because boundingRect() is supposed to be const.
/**
Pointer to a rectangle representing the terminal bounding rect;
used to calculate the bounding rect once only;
used a pointer because boundingRect() is supposed to be const.
*/
QRectF *br_{nullptr};
/// Last terminal seen through an attached conductor
Terminal *previous_terminal_;

View File

@@ -32,9 +32,9 @@ TerminalElement::TerminalElement(const ElementsLocation &location, QGraphicsItem
TerminalElement::~TerminalElement() {}
/**
* @brief TerminalElement::initLink
* @param project
*/
@brief TerminalElement::initLink
@param project
*/
void TerminalElement::initLink(QETProject *project) {
Element::initLink(project);
}

View File

@@ -28,11 +28,12 @@
#include <QPolygonF>
/**
* @brief ConductorCreator::ConductorCreator
* Create an electrical potential between all terminals of @terminals_list.
* the terminals of the list must be in the same diagram.
* @param terminals_list
*/
@brief ConductorCreator::ConductorCreator
Create an electrical potential between all terminals of @terminals_list.
the terminals of the list must be in the same diagram.
@param d Diagram
@param terminals_list QList<Terminal *>
*/
ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list) :
m_terminals_list(terminals_list)
{
@@ -68,11 +69,11 @@ ConductorCreator::ConductorCreator(Diagram *d, QList<Terminal *> terminals_list)
}
/**
* @brief ConductorCreator::create
* Create an electrical potential between the terminals of the diagram d, contained in the polygon
* @param d
* @param polygon : polygon in diagram coordinate
*/
@brief ConductorCreator::create
Create an electrical potential between the terminals of the diagram d, contained in the polygon
@param d Diagram
@param polygon : polygon in diagram coordinate
*/
void ConductorCreator::create(Diagram *d, const QPolygonF &polygon)
{
QList<Terminal *> t_list;
@@ -92,9 +93,9 @@ void ConductorCreator::create(Diagram *d, const QPolygonF &polygon)
}
/**
* @brief ConductorCreator::propertieToUse
* @return the conductor properties to use for the new conductors.
*/
@brief ConductorCreator::propertieToUse
@return the conductor properties to use for the new conductors.
*/
void ConductorCreator::setUpPropertieToUse()
{
QList<Conductor *> potentials = existingPotential();
@@ -130,11 +131,11 @@ void ConductorCreator::setUpPropertieToUse()
}
/**
* @brief ConductorCreator::existingPotential
* Return the list of existing potential of
* the terminal list
* @return
*/
@brief ConductorCreator::existingPotential
Return the list of existing potential of
the terminal list
@return c_list QList<Conductor *>
*/
QList<Conductor *> ConductorCreator::existingPotential()
{
QList<Conductor *> c_list;
@@ -174,9 +175,9 @@ QList<Conductor *> ConductorCreator::existingPotential()
}
/**
* @brief ConductorCreator::hubTerminal
* @return
*/
@brief ConductorCreator::hubTerminal
@return hub_terminal
*/
Terminal *ConductorCreator::hubTerminal()
{
Terminal *hub_terminal = m_terminals_list.first();

View File

@@ -19,7 +19,9 @@
#define MACOSXOPENEVENT_H
#include <QObject>
/**
@brief The MacOSXOpenEvent class
*/
class MacOSXOpenEvent : public QObject
{
Q_OBJECT

View File

@@ -21,8 +21,8 @@
#include <QMargins>
/**
* Provide some small utils function
*/
Provide some small utils function
*/
namespace QETUtils
{
QString marginsToString(const QMargins &margins);