diff --git a/sources/autoNum/ui/folioautonumbering.cpp b/sources/autoNum/ui/folioautonumbering.cpp index 0b5c16448..aaf42f5ab 100644 --- a/sources/autoNum/ui/folioautonumbering.cpp +++ b/sources/autoNum/ui/folioautonumbering.cpp @@ -48,7 +48,7 @@ FolioAutonumberingW::~FolioAutonumberingW() /** @brief FolioAutonumberingW::setContext - construct autonums in the comboBox selected in the @autonum_chooser QcomboBox + construct autonums in the comboBox selected in the autonum_chooser QcomboBox */ void FolioAutonumberingW::setContext(QList autonums) { foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);} @@ -160,7 +160,7 @@ void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(int){ /** @brief SelectAutonumW::on_buttonBox_clicked - Action on @buttonBox clicked + Action on buttonBox clicked */ void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) { //transform button to int diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index e635e6d99..3a40c7bdb 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -970,7 +970,7 @@ void Conductor::pointsToSegments(const QList& points_list) { /** @brief Conductor::fromXml Load the conductor and her information from xml element - @param e + @param dom_element @return true is loading success else return false */ bool Conductor::fromXml(QDomElement &dom_element) @@ -998,9 +998,12 @@ bool Conductor::fromXml(QDomElement &dom_element) } /** + @brief Conductor::toXml Exporte les caracteristiques du conducteur sous forme d'une element XML. - @param d Le document XML a utiliser pour creer l'element XML - @param table_adr_id Hash stockant les correspondances entre les ids des + @param dom_document : + Le document XML a utiliser pour creer l'element XML + @param table_adr_id : + Hash stockant les correspondances entre les ids des bornes dans le document XML et leur adresse en memoire @return Un element XML representant le conducteur */ @@ -1492,9 +1495,12 @@ QPainterPath Conductor::path() const @brief Conductor::setPropertiesToPotential @param properties @param only_text - Set @propertie to conductor and every conductors in the same potential of @conductor. - If @only_text is true only formula, text, function and tension/protocol is set - to other conductor in the same potential, the other values of property stay unmodified + Set propertie to conductor and every conductors in + the same potential of conductor. + If only_text is true only formula, text, + function and tension/protocol is set + to other conductor in the same potential, + the other values of property stay unmodified */ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool only_text) { @@ -1523,7 +1529,7 @@ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool /** @brief Conductor::setProperties - Set @property as current property of conductor + Set property as current property of conductor @param properties : properties */ void Conductor::setProperties(const ConductorProperties &property) @@ -1628,11 +1634,11 @@ void Conductor::displayedTextChanged() /** @brief Conductor::relatedPotentialConductors - Return all conductors at the same potential of this conductor, this conductor isn't - part of the returned QSet. + Return all conductors at the same potential of this conductor, + this conductor isn't part of the returned QSet. @param all_diagram : if true search in all diagram of the project, false search only in the parent diagram of this conductor - @param t_list, a list of terminal already found for this potential. + @param t_list : a list of terminal already found for this potential. @return a QSet of conductor at the same potential. */ QSet Conductor::relatedPotentialConductors(const bool all_diagram, QList *t_list) diff --git a/sources/qetgraphicsitem/crossrefitem.cpp b/sources/qetgraphicsitem/crossrefitem.cpp index 68661d521..cbdb8cb15 100644 --- a/sources/qetgraphicsitem/crossrefitem.cpp +++ b/sources/qetgraphicsitem/crossrefitem.cpp @@ -233,7 +233,7 @@ void CrossRefItem::updateLabel() Calculate and set position automaticaly. */ void CrossRefItem::autoPos() { - //We calcul the position according to the @snapTo of the xrefproperties + //We calcul the position according to the snapTo of the xrefproperties if (m_properties.snapTo() == XRefProperties::Bottom) centerToBottomDiagram(this, m_element, diff --git a/sources/qetgraphicsitem/diagramimageitem.cpp b/sources/qetgraphicsitem/diagramimageitem.cpp index f02905f97..578fe0c5f 100644 --- a/sources/qetgraphicsitem/diagramimageitem.cpp +++ b/sources/qetgraphicsitem/diagramimageitem.cpp @@ -125,7 +125,7 @@ QString DiagramImageItem::name() const { /** @brief DiagramImageItem::fromXml - Load this image fro xml elemebt @e + Load this image fro xml elemebt e @param e @return true if succesfully load. */ @@ -140,11 +140,11 @@ bool DiagramImageItem::fromXml(const QDomElement &e) return (false); } - //load xml image to QByteArray + //load xml image to QByteArray QByteArray array; array = QByteArray::fromBase64(e.text().toLatin1()); - //Set QPixmap from the @array + //Set QPixmap from the array QPixmap pixmap; pixmap.loadFromData(array); setPixmap(pixmap); diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.cpp b/sources/qetgraphicsitem/dynamicelementtextitem.cpp index 3d4cf2257..77b9c9fe8 100644 --- a/sources/qetgraphicsitem/dynamicelementtextitem.cpp +++ b/sources/qetgraphicsitem/dynamicelementtextitem.cpp @@ -382,7 +382,7 @@ QString DynamicElementTextItem::text() const { /** @brief DynamicElementTextItem::setText Set the text of this text - @param formula + @param text */ void DynamicElementTextItem::setText(const QString &text) { @@ -448,7 +448,7 @@ QString DynamicElementTextItem::infoName() const { /** @brief DynamicElementTextItem::setCompositeText - Set the composite text of this text item to @text + Set the composite text of this text item to text @param text */ void DynamicElementTextItem::setCompositeText(const QString &text) diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index a724e7646..bbca4ecc3 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -71,9 +71,10 @@ class ElementXmlRetroCompatibility /** @brief Element::Element - @param location, location of this element - @param parent, parent graphics item - @param state, state of the instanciation + @param location : location of this element + @param parent : parent graphics item + @param state : state of the instanciation + @param link_type */ Element::Element(const ElementsLocation &location, QGraphicsItem *parent, @@ -589,7 +590,7 @@ bool Element::parseInput(const QDomElement &dom_element) /** @brief Element::parseDynamicText - Create the dynamic text field describ in @dom_element + Create the dynamic text field describ in dom_element @param dom_element @return */ @@ -868,7 +869,7 @@ bool Element::fromXml(QDomElement &e, transform.translate(xml_pos.x(), xml_pos.y()); deti->setPos(transform.map(pos)); - //dom_input and deti matched we remove the dom_input from @inputs list, + //dom_input and deti matched we remove the dom_input from inputs list, //to avoid unnecessary checking made below //we also move deti from the m_converted_text_from_xml_description to m_dynamic_text_list inputs.removeAll(dom_input); @@ -905,12 +906,15 @@ bool Element::fromXml(QDomElement &e, DiagramContext dc; dc.fromXml(e.firstChildElement("elementInformations"), "elementInformation"); - /** - * Since the commit 4791, the value used as "label" and "formula" is stored in differents keys (instead of the same key, "label" in previous version), - * so, if "label" contain "%" (Use variable value), and "formula" does not exist, - * this mean the label was made before commit 4791 (0.51 dev). So we swap the value stored in "label" to "formula" as expected. - * @TODO remove this code at version 0.7 or more (probably useless). - */ + /* + * Since the commit 4791, the value used as "label" and "formula" + * is stored in differents keys (instead of the same key, + * "label" in previous version), so, if "label" contain "%" + * (Use variable value), and "formula" does not exist, + * this mean the label was made before commit 4791 (0.51 dev). + * So we swap the value stored in "label" to "formula" as expected. + * @TODO remove this code at version 0.7 or more (probably useless). + */ #pragma message("@TODO remove this code for qet 0.7 or later") if (dc["label"].toString().contains("%") && dc["formula"].toString().isNull()) @@ -922,8 +926,8 @@ bool Element::fromXml(QDomElement &e, !m_element_informations.value("label").toString().isEmpty()) dc.addValue("label", m_element_informations.value("label")); - //We must to block the update of the alignment when load the information - //otherwise the pos of the text will not be the same as it was at save time. + //We must to block the update of the alignment when load the information + //otherwise the pos of the text will not be the same as it was at save time. for(DynamicElementTextItem *deti : m_dynamic_text_list) deti->m_block_alignment = true; setElementInformations(dc); @@ -931,17 +935,21 @@ bool Element::fromXml(QDomElement &e, deti->m_block_alignment = false; - /** - During the devel of the version 0.7, the "old text" was replaced by the dynamic element text item. - When open a project made befor the 0.7, we must to reproduce the same visual when the label are not empty and visible, - and comment are not empty and visible and/or location are not empty and visible. - we create a text group with inside the needed texts, label and comment and/or location. - */ - //#1 There must be old text converted to dynamic text + /* During the devel of the version 0.7, + * the "old text" was replaced by the dynamic element text item. + * When open a project made befor the 0.7, + * we must to reproduce the same visual when + * the label are not empty and visible, + * and comment are not empty + * and visible and/or location are not empty and visible. + * we create a text group with inside the needed texts, + * label and comment and/or location. + */ + //#1 There must be old text converted to dynamic text if(!successfully_converted.isEmpty()) { - //#2 the element information must have label not empty and visible - //and a least comment or location not empty and visible + //#2 the element information must have label not empty and visible + //and a least comment or location not empty and visible QString label = m_element_informations.value( "label").toString(); QString comment = m_element_informations.value( @@ -963,7 +971,7 @@ bool Element::fromXml(QDomElement &e, ((!comment.isEmpty() && c) || (!location.isEmpty() && lo))) { - //#2 in the converted list one text must have text from = element info and info name = label + //#2 in the converted list one text must have text from = element info and info name = label for(DynamicElementTextItem *deti : successfully_converted) { @@ -994,7 +1002,7 @@ bool Element::fromXml(QDomElement &e, comment_text->setPos(deti->x(), deti->y()+10); //+10 is arbitrary, comment_text must be below deti addDynamicTextItem(comment_text); } - //create the location item + //create the location item DynamicElementTextItem *location_text = nullptr; if (m_link_type !=PreviousReport || m_link_type !=NextReport) { @@ -1022,7 +1030,7 @@ bool Element::fromXml(QDomElement &e, m_state = QET::GIOK; return(true); } - //Create the group + //Create the group ElementTextItemGroup *group = addTextGroup(tr("Label + commentaire")); addTextToGroup(deti, group); @@ -1035,8 +1043,9 @@ bool Element::fromXml(QDomElement &e, group->setAlignment(Qt::AlignVCenter); group->setVerticalAdjustment(-4); group->setRotation(rotation); - //Change the position of the group, so that the text "label" stay in the same - //position in scene coordinate + //Change the position of the group, + //so that the text "label" stay in the same + //position in scene coordinate group->setPos(pos - deti->pos()); break; @@ -1046,10 +1055,10 @@ bool Element::fromXml(QDomElement &e, } else { - //This element is supposed to be a master and Xref property snap to bottom + //This element is supposed to be a master and Xref property snap to bottom if((!comment.isEmpty() && c) || (!location.isEmpty() && lo)) { - //Create the comment item + //Create the comment item DynamicElementTextItem *comment_text = nullptr; if(!comment.isEmpty() && c) { @@ -1065,7 +1074,7 @@ bool Element::fromXml(QDomElement &e, comment_text->setTextWidth(80); addDynamicTextItem(comment_text); } - //create the location item + //create the location item DynamicElementTextItem *location_text = nullptr; if(!location.isEmpty() && lo) { @@ -1085,7 +1094,7 @@ bool Element::fromXml(QDomElement &e, addDynamicTextItem(location_text); } - //Create the group + //Create the group ElementTextItemGroup *group = addTextGroup(tr("Label + commentaire")); if(comment_text) @@ -1246,8 +1255,10 @@ QDomElement Element::toXml(QDomDocument &document, /** @brief Element::addDynamiqueTextItem - Add @deti as a dynamic text item of this element, @deti is reparented to this - If @deti is null, a new DynamicElementTextItem is created and added to this element. + Add deti as a dynamic text item of this element, + deti is reparented to this + If deti is null, a new DynamicElementTextItem is created + and added to this element. @param deti */ void Element::addDynamicTextItem(DynamicElementTextItem *deti) @@ -1268,8 +1279,9 @@ void Element::addDynamicTextItem(DynamicElementTextItem *deti) /** @brief Element::removeDynamicTextItem - Remove @deti, no matter if is a child of this element or a child of a group of this element. - Set he parent item of @deti to 0, @deti is not deleted. + Remove deti, no matter if is a child of this element + or a child of a group of this element. + Set he parent item of deti to 0, deti is not deleted. @param deti */ void Element::removeDynamicTextItem(DynamicElementTextItem *deti) @@ -1309,7 +1321,7 @@ QList Element::dynamicTextItems() const { @brief Element::addTextGroup Create and add an element text item group to this element. If this element already have a group with the same name, - then @name will renamed to name1 or name2 etc.... + then name will renamed to name1 or name2 etc.... @param name : the name of the group @return the created group. */ @@ -1342,7 +1354,7 @@ ElementTextItemGroup *Element::addTextGroup(const QString &name) /** @brief Element::addTextGroup - @param group add group @group to the group of this element. + @param group add group to the group of this element. the group must not be owned by an element. */ void Element::addTextGroup(ElementTextItemGroup *group) @@ -1357,7 +1369,8 @@ void Element::addTextGroup(ElementTextItemGroup *group) /** @brief Element::removeTextGroup - Remove the text group @group from this element, and set the parent of group to 0. + Remove the text group group from this element, + and set the parent of group to 0. group is not deleted. All texts owned by the group will be reparented to this element @param name @@ -1388,7 +1401,7 @@ void Element::removeTextGroup(ElementTextItemGroup *group) /** @brief Element::textGroup @param name - @return the text group named @name or nullptr if this element + @return the text group named name or nullptr if this element haven't got a group with this name */ ElementTextItemGroup *Element::textGroup(const QString &name) const @@ -1411,8 +1424,8 @@ QList Element::textGroups() const /** @brief Element::addTextToGroup - Add the text @text to the group @group; - If @group isn't owned by this element return false. + Add the text text to the group group; + If group isn't owned by this element return false. The text must be a text of this element. @return : true if the text was succesfully added to the group. */ @@ -1435,7 +1448,8 @@ bool Element::addTextToGroup(DynamicElementTextItem *text, /** @brief Element::removeTextFromGroup - Remove the text @text from the group @group, en reparent @text to this element + Remove the text text from the group group, + en reparent text to this element @return true if text was succesfully removed */ bool Element::removeTextFromGroup(DynamicElementTextItem *text, @@ -1526,7 +1540,7 @@ QString Element::linkTypeToString() const /** @brief Element::setElementInformations Set new information for this element. - If new information is different of current infotmation emit @elementInfoChange + If new information is different of current infotmation emit elementInfoChange @param dc */ void Element::setElementInformations(DiagramContext dc) diff --git a/sources/qetgraphicsitem/element.h b/sources/qetgraphicsitem/element.h index 7a3448a74..756a52c72 100644 --- a/sources/qetgraphicsitem/element.h +++ b/sources/qetgraphicsitem/element.h @@ -44,8 +44,9 @@ class Element : public QetGraphicsItem Q_OBJECT public: /** - * @brief The kind enum - * Used to know the kind of this element (master, slave, report ect...) + @brief The kind enum + Used to know the kind of this element + (master, slave, report ect...) */ enum kind {Simple = 1, NextReport = 2, @@ -66,8 +67,9 @@ class Element : public QetGraphicsItem // attributes public: /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into an Element. - * @return the QGraphicsItem type + Enable the use of qgraphicsitem_cast + to safely cast a QGraphicsItem into an Element. + @return the QGraphicsItem type */ enum { Type = UserType + 1000 }; int type() const override { return Type; } @@ -153,7 +155,7 @@ class Element : public QetGraphicsItem virtual void unlinkElement(Element *) {} virtual void initLink(QETProject *); QList linkedElements (); - virtual kind linkType() const {return m_link_type;} // @return the linkable type + virtual kind linkType() const {return m_link_type;} // return the linkable type QString linkTypeToString() const; void newUuid() {m_uuid = QUuid::createUuid();} //create new uuid for this element @@ -187,7 +189,7 @@ class Element : public QetGraphicsItem void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override; protected: - // @m_converted_text_from_description, when a element is created from his description, the old element text item (tagged as 'input' in the xml) + // m_converted_text_from_description, when a element is created from his description, the old element text item (tagged as 'input' in the xml) // are converted to dynamic text field, the QPointF is the original position of the text item, because the origin transformation point of text item // and dynamic text item are not the same, so we must to keep a track of this value, to be use in the function element::fromXml QHash @@ -241,16 +243,16 @@ inline int Element::orientation() const { } /** - * @brief Element::uuid - * @return the uuid of this element + @brief Element::uuid + @return the uuid of this element */ inline QUuid Element::uuid() const { return m_uuid; } /** - * @brief Element::linkedElements - * @return the list of linked elements, the list is sorted by position + @brief Element::linkedElements + @return the list of linked elements, the list is sorted by position */ inline QList Element::linkedElements() { std::sort(connected_elements.begin(), diff --git a/sources/qetgraphicsitem/elementtextitemgroup.cpp b/sources/qetgraphicsitem/elementtextitemgroup.cpp index fb4d15201..bd6d9092c 100644 --- a/sources/qetgraphicsitem/elementtextitemgroup.cpp +++ b/sources/qetgraphicsitem/elementtextitemgroup.cpp @@ -236,8 +236,9 @@ void ElementTextItemGroup::updateAlignment() /** @brief ElementTextItemGroup::setVerticalAdjustment - Set the value of the vertical adjustment to @v. - The vertical adjutment is use to adjust the space between the texts of this group. + Set the value of the vertical adjustment to v. + The vertical adjutment is use to adjust + the space between the texts of this group. @param v */ void ElementTextItemGroup::setVerticalAdjustment(int v) diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp index 38d2f24e2..7d77fc2dd 100644 --- a/sources/qetgraphicsitem/qetshapeitem.cpp +++ b/sources/qetgraphicsitem/qetshapeitem.cpp @@ -961,6 +961,7 @@ QDomElement QetShapeItem::toXml(QDomDocument &document) const @brief QetShapeItem::toDXF Draw this element to the dxf document @param filepath file path of the the dxf document + @param pen @return true if draw success */ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) diff --git a/sources/qetgraphicsitem/qetshapeitem.h b/sources/qetgraphicsitem/qetshapeitem.h index da8b12380..5b89fb4dd 100644 --- a/sources/qetgraphicsitem/qetshapeitem.h +++ b/sources/qetgraphicsitem/qetshapeitem.h @@ -65,7 +65,8 @@ class QetShapeItem : public QetGraphicsItem QetShapeItem(QPointF, QPointF = QPointF(0,0), ShapeType = Line, QGraphicsItem *parent = nullptr); ~QetShapeItem() override; - //Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a QetShapeItem @return the QGraphicsItem type + //Enable the use of qgraphicsitem_cast to safely cast a + //QGraphicsItem into a QetShapeItem return the QGraphicsItem type int type() const override { return Type; } ///METHODS diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index 0789e1ccb..7a855b601 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -34,11 +34,11 @@ const qreal Terminal::terminalSize = 4.0; const qreal Terminal::Z = 1000; /** + @brief Terminal::init Methode privee pour initialiser la borne. - @param pf position du point d'amarrage pour un conducteur - @param o orientation de la borne : Qt::Horizontal ou Qt::Vertical @param number of terminal @param name of terminal + @param hiddenName */ void Terminal::init(QString number, QString name, bool hiddenName) { @@ -97,7 +97,6 @@ void Terminal::init(QPointF pf, Qet::Orientation o, QString number, QString name @param pf position du point d'amarrage pour un conducteur @param o orientation de la borne : Qt::Horizontal ou Qt::Vertical @param e Element auquel cette borne appartient - @param s Scene sur laquelle figure cette borne */ Terminal::Terminal(QPointF pf, Qet::Orientation o, Element *e) : QGraphicsObject(e), @@ -690,7 +689,7 @@ bool Terminal::isLinkedTo(Terminal *other_terminal) { - \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, + @return true if this terminal can be linked to other_terminal, otherwise false */ bool Terminal::canBeLinkedTo(Terminal *other_terminal) @@ -823,12 +822,12 @@ QUuid Terminal::uuid() const { /** @brief Conductor::relatedPotentialTerminal Return terminal at the same potential from the same - parent element of @terminal. + parent element of terminal. For folio report, return the terminal of linked other report. For Terminal element, return the other terminal of terminal element. @param terminal : to start search @param all_diagram :if true return all related terminal, - false return only terminal in the same diagram of @t + false return only terminal in the same diagram of t @return the list of terminal at the same potential */ QList relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram) diff --git a/sources/qetinformation.cpp b/sources/qetinformation.cpp index 30ad34d77..7af614854 100644 --- a/sources/qetinformation.cpp +++ b/sources/qetinformation.cpp @@ -54,8 +54,8 @@ QStringList QETInformation::titleblockInfoKeys() /** @brief QETInformation::titleblockTranslatedInfoKey @param info : info key to be translated - @return the translated information given by @info - If @info don't match, return an empty string + @return the translated information given by info + If info don't match, return an empty string */ QString QETInformation::titleblockTranslatedInfoKey(const QString &info) { diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index 4ae88dfc8..092d0ed09 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -978,7 +978,7 @@ ElementsLocation QETProject::importElement(ElementsLocation &location) if (m_elements_collection->exist(import_path)) { ElementsLocation existing_location(import_path, this); - //@existing_location and @location have the same uuid, so it is the same element + //existing_location and location have the same uuid, so it is the same element if (existing_location.uuid() == location.uuid()) { return existing_location; } diff --git a/sources/qetxml.cpp b/sources/qetxml.cpp index 433ea7eff..93f77c7a1 100644 --- a/sources/qetxml.cpp +++ b/sources/qetxml.cpp @@ -55,8 +55,8 @@ QDomElement QETXML::penToXml(QDomDocument &parent_document,const QPen& pen) /** @brief QETXML::penFromXml Build a QPen from a xml description - @param element, The QDomElement that describe the pen - @return the created pen. If @element is null or tagName isn't "pen" + @param element : The QDomElement that describe the pen + @return the created pen. If element is null or tagName isn't "pen" return a default constructed QPen */ QPen QETXML::penFromXml(const QDomElement &element) @@ -128,8 +128,8 @@ QDomElement QETXML::brushToXml(QDomDocument &parent_document, /** @brief QETXML::brushFromXml Build a QBrush from a xml description - @param element, the QDomElement that describe the pen - @return the created brush. If @element is null or tagName isn't "brush" + @param element : the QDomElement that describe the pen + @return the created brush. If element is null or tagName isn't "brush" return a default constructed QBrush */ QBrush QETXML::brushFromXml(const QDomElement &element) @@ -167,7 +167,7 @@ QBrush QETXML::brushFromXml(const QDomElement &element) @param dir : file system direcory to convert to QDomElement directory @param rename : by default the attribute "name" of the returned QDomElement is the same name of @dir - but we can override itwith @rename + but we can override itwith rename @return A file system directory converted to a QDomElement directory ready to be inserted into a XmlElementCollection. If the QDomElement can't be created, return a null QDomElement. @@ -212,7 +212,7 @@ QDomElement QETXML::fileSystemDirToXmlCollectionDir(QDomDocument &document, @param file : file system element file to convert to QDomElement; @param rename : by default the attribute "name" of the returned QDomElement is the same name of @file - but we can override itwith @rename + but we can override itwith rename @return A file system element converted to a QDomElement ready to be inserted into a XmlElementCollection If the QDomElement can't be created, return a null QDomElement @@ -286,12 +286,12 @@ bool QETXML::writeXmlFile(const QDomDocument &xml_document, /** @brief QETXML::textToDomElement - Return a QDomElement, created from @document, - with tag name @tag_name and text @value. + Return a QDomElement, created from document, + with tag name tag_name and text value. @param document @param tag_name @param value - @return a QDomElement, created from @document + @return a QDomElement, created from document */ QDomElement QETXML::textToDomElement(QDomDocument &document, const QString& tag_name, @@ -308,7 +308,7 @@ QDomElement QETXML::textToDomElement(QDomDocument &document, @brief QETXML::directChild @param element @param tag_name - @return All direct child of @element with the tag name @tag_name + @return All direct child of element with the tag name tag_name */ QVector QETXML::directChild(const QDomElement &element, const QString &tag_name) @@ -333,10 +333,10 @@ QVector QETXML::directChild(const QDomElement &element, @param element @param parent_tag_name @param children_tag_name - @return When given an xml dom element @element, - returns a vector of all children dom_elements tagged @children_tag_name + @return When given an xml dom element element, + returns a vector of all children dom_elements tagged children_tag_name nested in the parent dom elements tagged parent_tag_name, - themselves children of the dom element @element. + themselves children of the dom element element. */ QVector QETXML::subChild(const QDomElement &element, const QString parent_tag_name, @@ -417,7 +417,7 @@ QMargins QETXML::marginsFromXml(const QDomElement &element) /** @brief QETXML::modelHeaderDataToXml Save to xml element all header data specified - by @horizontal_section_role and @vertical_section_role + by horizontal_section_role and vertical_section_role @param parent_document @param model @param horizontal_section_role : key as header section and value diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp index 5b2af260f..c4700fb3c 100644 --- a/sources/titleblocktemplate.cpp +++ b/sources/titleblocktemplate.cpp @@ -110,7 +110,7 @@ bool TitleBlockTemplate::loadFromXmlFile(const QString &filepath) { } /** - @brief TitleBlockTemplate::loadFromXmlElement + @brief TitleBlockTemplate::loadFromXmlElement @param xml_element : An XML document to read the template from. @return true if the reading succeeds, false otherwise. */ diff --git a/sources/ui/bomexportdialog.cpp b/sources/ui/bomexportdialog.cpp index c22d7640a..caa300784 100644 --- a/sources/ui/bomexportdialog.cpp +++ b/sources/ui/bomexportdialog.cpp @@ -25,10 +25,12 @@ #include #include + /** - * @brief BOMExportDialog::BOMExportDialog - * @param parent - */ + @brief BOMExportDialog::BOMExportDialog + @param project + @param parent +*/ BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) : QDialog(parent), ui(new Ui::BOMExportDialog), @@ -43,17 +45,17 @@ BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) : } /** - * @brief BOMExportDialog::~BOMExportDialog - */ + @brief BOMExportDialog::~BOMExportDialog +*/ BOMExportDialog::~BOMExportDialog() { delete ui; } /** - * @brief BOMExportDialog::exec - * @return - */ + @brief BOMExportDialog::exec + @return +*/ int BOMExportDialog::exec() { auto r = QDialog::exec(); @@ -156,6 +158,10 @@ QString BOMExportDialog::getBom() return return_string; } +/** + @brief BOMExportDialog::on_m_format_as_bom_clicked + @param checked +*/ void BOMExportDialog::on_m_format_as_bom_clicked(bool checked) { m_query_widget->setGroupBy("designation", checked); m_query_widget->setCount("COUNT(*) AS designation_qty", checked); diff --git a/sources/ui/bomexportdialog.h b/sources/ui/bomexportdialog.h index f0fde91a7..553bfe4c2 100644 --- a/sources/ui/bomexportdialog.h +++ b/sources/ui/bomexportdialog.h @@ -28,8 +28,8 @@ class BOMExportDialog; } /** - * @brief The BOMExportDialog class - */ + @brief The BOMExportDialog class +*/ class BOMExportDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/diagramcontextwidget.cpp b/sources/ui/diagramcontextwidget.cpp index 7b6117a46..88bf8621a 100644 --- a/sources/ui/diagramcontextwidget.cpp +++ b/sources/ui/diagramcontextwidget.cpp @@ -61,7 +61,7 @@ DiagramContext DiagramContextWidget::context() const /** @brief DiagramContextWidget::setContext - Load the content from @context into this widget + Load the content from context into this widget @param context */ void DiagramContextWidget::setContext (const DiagramContext &context) diff --git a/sources/ui/dynamicelementtextitemeditor.cpp b/sources/ui/dynamicelementtextitemeditor.cpp index 8145ee5a6..25fb9da85 100644 --- a/sources/ui/dynamicelementtextitemeditor.cpp +++ b/sources/ui/dynamicelementtextitemeditor.cpp @@ -136,7 +136,7 @@ void DynamicElementTextItemEditor::apply() /** @brief DynamicElementTextItemEditor::setCurrentText - Expand and select the item for text @text + Expand and select the item for text text @param text */ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text) @@ -153,7 +153,7 @@ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text) /** @brief DynamicElementTextItemEditor::setCurrentGroup - Expand and select the item for group @group + Expand and select the item for group group @param group */ void DynamicElementTextItemEditor::setCurrentGroup(ElementTextItemGroup *group) diff --git a/sources/ui/dynamicelementtextmodel.cpp b/sources/ui/dynamicelementtextmodel.cpp index 020aebac8..78a32c6e5 100644 --- a/sources/ui/dynamicelementtextmodel.cpp +++ b/sources/ui/dynamicelementtextmodel.cpp @@ -851,7 +851,7 @@ void DynamicElementTextModel::removeGroup(ElementTextItemGroup *group) /** @brief DynamicElementTextModel::textAddedToGroup - Add the text @text to the group @group + Add the text text to the group group @param deti @param group */ @@ -880,7 +880,7 @@ void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti, @brief DynamicElementTextModel::groupFromIndex @param index @return the group associated with index. Return value can be nullptr - @Index can be a child of an index associated with a group + Index can be a child of an index associated with a group and can be the column 0 or 1. */ ElementTextItemGroup *DynamicElementTextModel::groupFromIndex( @@ -941,8 +941,8 @@ QModelIndex DynamicElementTextModel::indexFromGroup( /** @brief DynamicElementTextModel::indexIsText @param index - @return True if @index represente a text, both for the column 0 and 1. - Return false if @index is a child of an index associated to a text. + @return True if index represente a text, both for the column 0 and 1. + Return false if index is a child of an index associated to a text. */ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const { @@ -1191,7 +1191,7 @@ QStringList DynamicElementTextModel::mimeTypes() const /** @brief DynamicElementTextModel::enableSourceText Enable the good field, according to the current source of text, - for the edited text @deti + for the edited text deti @param deti @param tf */ @@ -1320,7 +1320,7 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi) } } - //We emit the signal only if @qsi is in the second column, + //We emit the signal only if qsi is in the second column, //because the data are stored on this column //the first column is use only for display the title of the property, //except for the name of texts group @@ -1332,7 +1332,8 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi) /** @brief DynamicElementTextModel::setConnection - Set up the connection for @deti to keep up to date the data of this model and the text. + Set up the connection for deti to keep up to date + the data of this model and the text. Is notably use with the use of QUndoCommand. @param deti - text to setup connection @param set - true = set connection - false unset connection @@ -1372,7 +1373,8 @@ void DynamicElementTextModel::setConnection(DynamicElementTextItem *deti, bool s /** @brief DynamicElementTextModel::setConnection - Set up the connection for @group to keep up to date the data of this model and the group. + Set up the connection for group to keep up to date + the data of this model and the group. Is notably use with the use of QUndoCommand. @param group group to setup the connection @param set true = set connection - false unset connection diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 89af5edf8..e9d3c422a 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -51,7 +51,7 @@ ElementInfoWidget::~ElementInfoWidget() /** @brief ElementInfoWidget::setElement - Set @element to be the edited element + Set element to be the edited element @param element */ void ElementInfoWidget::setElement(Element *element) @@ -189,7 +189,8 @@ void ElementInfoWidget::buildInterface() /** @brief ElementInfoWidget::infoPartWidgetForKey @param key - @return the ElementInfoPartWidget with key @key, if not found return nullptr; + @return the ElementInfoPartWidget with key key, + if not found return nullptr; */ ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const { diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 8acc93de2..b7c0cb8cf 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -49,9 +49,11 @@ ElementPropertiesWidget::ElementPropertiesWidget(Element *elmt, QWidget *parent) /** @brief ElementPropertiesWidget::ElementPropertiesWidget - Same as default constructor, the edited element, is the parent element of @text. - The only difference with default constructor, is that the current tab is the tab for dynamic texts, - and the item in the tree that represent @text is expanded and selected. + Same as default constructor, the edited element, + is the parent element of text. + The only difference with default constructor, + is that the current tab is the tab for dynamic texts, + and the item in the tree that represent text is expanded and selected. @param text @param parent */ @@ -70,9 +72,11 @@ ElementPropertiesWidget::ElementPropertiesWidget(DynamicElementTextItem *text, Q /** @brief ElementPropertiesWidget::ElementPropertiesWidget - Same as default constructor, the edited element, is the parent element of @group. - The only difference with default constructor, is that the current tab is the tab for dynamic texts, - and the item in the tree that represent @group is expanded and selected. + Same as default constructor, the edited element, + is the parent element of group. + The only difference with default constructor, + is that the current tab is the tab for dynamic texts, + and the item in the tree that represent group is expanded and selected. @param group @param parent */ @@ -92,7 +96,7 @@ ElementPropertiesWidget::ElementPropertiesWidget(ElementTextItemGroup *group, QW /** @brief ElementPropertiesWidget::setElement - Set @element to be the edited element + Set element to be the edited element @param element */ void ElementPropertiesWidget::setElement(Element *element) @@ -119,8 +123,11 @@ void ElementPropertiesWidget::setElement(Element *element) /** @brief ElementPropertiesWidget::setDynamicText - convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @text. - Set the dynamics text tab as current tab, expand and select the item that represent @text + convenience function: + same as call : ElementPropertiesWidget::setElement, + with parameter the parent element of text. + Set the dynamics text tab as current tab, + expand and select the item that represent text @param text */ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text) @@ -142,8 +149,11 @@ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text) /** @brief ElementPropertiesWidget::setTextsGroup - Conveniance function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @group. - Set the dynamics text tab as current tab, expand and select the item that represent @group + Conveniance function : + same as call : ElementPropertiesWidget::setElement, + with parameter the parent element of group. + Set the dynamics text tab as current tab, + expand and select the item that represent group @param group */ void ElementPropertiesWidget::setTextsGroup(ElementTextItemGroup *group) diff --git a/sources/ui/inditextpropertieswidget.cpp b/sources/ui/inditextpropertieswidget.cpp index cc2213c56..50f193830 100644 --- a/sources/ui/inditextpropertieswidget.cpp +++ b/sources/ui/inditextpropertieswidget.cpp @@ -61,7 +61,7 @@ IndiTextPropertiesWidget::~IndiTextPropertiesWidget() { /** @brief IndiTextPropertiesWidget::setText - @param text : set @text as edited text + @param text : set text as edited text */ void IndiTextPropertiesWidget::setText(IndependentTextItem *text) { diff --git a/sources/ui/linksingleelementwidget.cpp b/sources/ui/linksingleelementwidget.cpp index b70ae1189..b7f0f47cd 100644 --- a/sources/ui/linksingleelementwidget.cpp +++ b/sources/ui/linksingleelementwidget.cpp @@ -593,7 +593,7 @@ void LinkSingleElementWidget::on_m_unlink_pb_clicked() /** @brief LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked - Highlight the element represented by @item + Highlight the element represented by item @param item @param column */ diff --git a/sources/ui/linksingleelementwidget.h b/sources/ui/linksingleelementwidget.h index d725a84a1..1b933719f 100644 --- a/sources/ui/linksingleelementwidget.h +++ b/sources/ui/linksingleelementwidget.h @@ -28,12 +28,13 @@ namespace Ui { } /** -* @brief The LinkSingleElementWidget class + @brief The LinkSingleElementWidget class this class provide a widget to select an element to be linked to the element given in the constructor. - The element given in constructor must be linked with only one other element (like report or slave element). - This widget detect automaticaly the kind of element given in the constructor and - search all element that can be linked with it. + The element given in constructor must be linked with only + one other element (like report or slave element). + This widget detect automaticaly the kind of element given in + the constructor and search all element that can be linked with it. If the element is already linked, the widget ask user to unlink. This widget embedded the diagram command for undo/redo the action */ diff --git a/sources/ui/potentialselectordialog.h b/sources/ui/potentialselectordialog.h index 2638d625d..2fc9f0830 100644 --- a/sources/ui/potentialselectordialog.h +++ b/sources/ui/potentialselectordialog.h @@ -53,8 +53,8 @@ namespace Ui { the properties of the two existing potential, to apply it for the new potential. - Each constructor have a QUndoCommand @parent_undo for parameter - If @parent_undo isn't null, when user click on OK button, + Each constructor have a QUndoCommand parent_undo for parameter + If parent_undo isn't null, when user click on OK button, the dialog will use the parent-undo as parent of the undo command that describe the changes. If parent_undo is null, the created undo-command is push diff --git a/sources/ui/shapegraphicsitempropertieswidget.cpp b/sources/ui/shapegraphicsitempropertieswidget.cpp index e35e2d731..51fec738d 100644 --- a/sources/ui/shapegraphicsitempropertieswidget.cpp +++ b/sources/ui/shapegraphicsitempropertieswidget.cpp @@ -55,7 +55,7 @@ ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget() /** @brief ShapeGraphicsItemPropertiesWidget::setItem - Set @shape as the current edited item + Set shape as the current edited item @param shape */ void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape) diff --git a/sources/ui/titleblockpropertieswidget.cpp b/sources/ui/titleblockpropertieswidget.cpp index 2e0159d91..b45b7ed64 100644 --- a/sources/ui/titleblockpropertieswidget.cpp +++ b/sources/ui/titleblockpropertieswidget.cpp @@ -322,7 +322,8 @@ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date, QETProjec /** @brief TitleBlockPropertiesWidget::getIndexFor - Find the index of the combo box for the title block @tbt_name available on the collection @collection + Find the index of the combo box for + the title block tbt_name available on the collection collection @param tbt_name : title block name @param collection : title block collection @return the index of the title block or -1 if no match diff --git a/sources/ui/xrefpropertieswidget.cpp b/sources/ui/xrefpropertieswidget.cpp index 1d6dd434a..65ad18082 100644 --- a/sources/ui/xrefpropertieswidget.cpp +++ b/sources/ui/xrefpropertieswidget.cpp @@ -112,7 +112,7 @@ void XRefPropertiesWidget::buildUi() /** @brief XRefPropertiesWidget::saveProperties - Save the properties of the type define at @index of the combo box m_type_cb + Save the properties of the type define at index of the combo box m_type_cb @param index */ void XRefPropertiesWidget::saveProperties(int index) { @@ -130,10 +130,6 @@ void XRefPropertiesWidget::saveProperties(int index) { else xrp.setSnapTo(XRefProperties::Label); - - - - if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "bottom") xrp.setXrefPos(Qt::AlignBottom); else if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "top") xrp.setXrefPos(Qt::AlignTop); else if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "left") xrp.setXrefPos(Qt::AlignLeft); diff --git a/sources/undocommand/addelementtextcommand.cpp b/sources/undocommand/addelementtextcommand.cpp index 909243ed6..427d74d2d 100644 --- a/sources/undocommand/addelementtextcommand.cpp +++ b/sources/undocommand/addelementtextcommand.cpp @@ -100,7 +100,7 @@ AddTextsGroupCommand::AddTextsGroupCommand(Element *element, @param element : The element to add a new group @param dom_element : the first time the group is created, we call the function fromXml of the group, - and give @dom_element has argument. + and give dom_element has argument. @param parent : parent undo */ AddTextsGroupCommand::AddTextsGroupCommand(Element *element, @@ -326,7 +326,7 @@ void AddTextToGroupCommand::redo() * ***************************/ /** @brief RemoveTextFromGroupCommand::RemoveTextFromGroupCommand - @param text : text to add to @group + @param text : text to add to group @param group @param parent : parent undo command */ diff --git a/sources/undocommand/deleteqgraphicsitemcommand.cpp b/sources/undocommand/deleteqgraphicsitemcommand.cpp index 17d965fa5..4f7772aea 100644 --- a/sources/undocommand/deleteqgraphicsitemcommand.cpp +++ b/sources/undocommand/deleteqgraphicsitemcommand.cpp @@ -39,8 +39,8 @@ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(Diagram *diagram, const D m_removed_contents(content), m_diagram(diagram) { - //If parent element of a dynamic element text item is also in @m_removed_content, - //we remove it, because when the element will be removed from the scene every child's will also be removed. + //If parent element of a dynamic element text item is also in m_removed_content, + //we remove it, because when the element will be removed from the scene every child's will also be removed. const QSet elmt_set = m_removed_contents.m_element_texts; for(DynamicElementTextItem *deti : elmt_set) { @@ -59,8 +59,8 @@ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(Diagram *diagram, const D m_elmt_text_hash.insert(deti, deti->parentElement()); } - //If parent element of ElementTextItemGroup is also in @m_removed_content, - //we remove it, because when the element will be removed from the scene every child's will also be removed. + //If parent element of ElementTextItemGroup is also in m_removed_content, + //we remove it, because when the element will be removed from the scene every child's will also be removed. const QSet group_set = m_removed_contents.m_texts_groups; for(ElementTextItemGroup *group : group_set) { diff --git a/sources/undocommand/linkelementcommand.cpp b/sources/undocommand/linkelementcommand.cpp index 2cda6265e..0fd2df476 100644 --- a/sources/undocommand/linkelementcommand.cpp +++ b/sources/undocommand/linkelementcommand.cpp @@ -125,7 +125,8 @@ bool LinkElementCommand::isLinkable(Element *element_a, Element *element_b, bool /** @brief LinkElementCommand::setLink - Replace all linked elements of edited element by elements stored in @element_list + Replace all linked elements of edited element + by elements stored in element_list This method do several check to know if element can be linked or not. @param element_list */ @@ -259,7 +260,7 @@ void LinkElementCommand::setUpNewLink(const QList &element_list, bool */ void LinkElementCommand::makeLink(const QList &element_list) { - //List is empty, that mean m_element must be free, so we unlink all elements + //List is empty, that mean m_element must be free, so we unlink all elements if (element_list.isEmpty()) { m_element->unlinkAllElements(); @@ -270,13 +271,16 @@ void LinkElementCommand::makeLink(const QList &element_list) foreach(Element *elmt, element_list) m_element->linkToElement(elmt); - //At this point may be there are unwanted linked elements to m_element. We must to unlink it. - //Elements from @element_list are wanted so we compare @element_list to current linked element of @m_element + /* At this point may be there are unwanted linked elements to m_element. + * We must to unlink it. + * Elements from element_list are wanted so we compare element_list + * to current linked element of m_element + */ QList to_unlink = m_element->linkedElements(); foreach(Element *elmt, element_list) to_unlink.removeAll(elmt); - //All elements stored in to_unlink is unwanted we unlink it from m_element + //All elements stored in to_unlink is unwanted we unlink it from m_element if (!to_unlink.isEmpty()) foreach(Element *elmt, to_unlink) m_element->unlinkElement(elmt); diff --git a/sources/utils/conductorcreator.cpp b/sources/utils/conductorcreator.cpp index 3c7c18933..06a8f68f2 100644 --- a/sources/utils/conductorcreator.cpp +++ b/sources/utils/conductorcreator.cpp @@ -29,7 +29,7 @@ /** @brief ConductorCreator::ConductorCreator - Create an electrical potential between all terminals of @terminals_list. + 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