Fix some doxygen issues

This commit is contained in:
Simon De Backer
2020-08-18 21:28:52 +02:00
parent ef15013715
commit 8e956df8d8
33 changed files with 204 additions and 159 deletions

View File

@@ -48,7 +48,7 @@ FolioAutonumberingW::~FolioAutonumberingW()
/** /**
@brief FolioAutonumberingW::setContext @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 <QString> autonums) { void FolioAutonumberingW::setContext(QList <QString> autonums) {
foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);} 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 @brief SelectAutonumW::on_buttonBox_clicked
Action on @buttonBox clicked Action on buttonBox clicked
*/ */
void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) { void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) {
//transform button to int //transform button to int

View File

@@ -970,7 +970,7 @@ void Conductor::pointsToSegments(const QList<QPointF>& points_list) {
/** /**
@brief Conductor::fromXml @brief Conductor::fromXml
Load the conductor and her information from xml element Load the conductor and her information from xml element
@param e @param dom_element
@return true is loading success else return false @return true is loading success else return false
*/ */
bool Conductor::fromXml(QDomElement &dom_element) 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. Exporte les caracteristiques du conducteur sous forme d'une element XML.
@param d Le document XML a utiliser pour creer l'element XML @param dom_document :
@param table_adr_id Hash stockant les correspondances entre les ids des 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 bornes dans le document XML et leur adresse en memoire
@return Un element XML representant le conducteur @return Un element XML representant le conducteur
*/ */
@@ -1492,9 +1495,12 @@ QPainterPath Conductor::path() const
@brief Conductor::setPropertiesToPotential @brief Conductor::setPropertiesToPotential
@param properties @param properties
@param only_text @param only_text
Set @propertie to conductor and every conductors in the same potential of @conductor. Set propertie to conductor and every conductors in
If @only_text is true only formula, text, function and tension/protocol is set the same potential of conductor.
to other conductor in the same potential, the other values of property stay unmodified 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) void Conductor::setPropertyToPotential(const ConductorProperties &property, bool only_text)
{ {
@@ -1523,7 +1529,7 @@ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool
/** /**
@brief Conductor::setProperties @brief Conductor::setProperties
Set @property as current property of conductor Set property as current property of conductor
@param properties : properties @param properties : properties
*/ */
void Conductor::setProperties(const ConductorProperties &property) void Conductor::setProperties(const ConductorProperties &property)
@@ -1628,11 +1634,11 @@ void Conductor::displayedTextChanged()
/** /**
@brief Conductor::relatedPotentialConductors @brief Conductor::relatedPotentialConductors
Return all conductors at the same potential of this conductor, this conductor isn't Return all conductors at the same potential of this conductor,
part of the returned QSet. this conductor isn't part of the returned QSet.
@param all_diagram : if true search in all diagram of the project, @param all_diagram : if true search in all diagram of the project,
false search only in the parent diagram of this conductor 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. @return a QSet of conductor at the same potential.
*/ */
QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list) QSet<Conductor *> Conductor::relatedPotentialConductors(const bool all_diagram, QList <Terminal *> *t_list)

View File

@@ -233,7 +233,7 @@ void CrossRefItem::updateLabel()
Calculate and set position automaticaly. Calculate and set position automaticaly.
*/ */
void CrossRefItem::autoPos() { 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) if (m_properties.snapTo() == XRefProperties::Bottom)
centerToBottomDiagram(this, centerToBottomDiagram(this,
m_element, m_element,

View File

@@ -125,7 +125,7 @@ QString DiagramImageItem::name() const {
/** /**
@brief DiagramImageItem::fromXml @brief DiagramImageItem::fromXml
Load this image fro xml elemebt @e Load this image fro xml elemebt e
@param e @param e
@return true if succesfully load. @return true if succesfully load.
*/ */
@@ -144,7 +144,7 @@ bool DiagramImageItem::fromXml(const QDomElement &e)
QByteArray array; QByteArray array;
array = QByteArray::fromBase64(e.text().toLatin1()); array = QByteArray::fromBase64(e.text().toLatin1());
//Set QPixmap from the @array //Set QPixmap from the array
QPixmap pixmap; QPixmap pixmap;
pixmap.loadFromData(array); pixmap.loadFromData(array);
setPixmap(pixmap); setPixmap(pixmap);

View File

@@ -382,7 +382,7 @@ QString DynamicElementTextItem::text() const {
/** /**
@brief DynamicElementTextItem::setText @brief DynamicElementTextItem::setText
Set the text of this text Set the text of this text
@param formula @param text
*/ */
void DynamicElementTextItem::setText(const QString &text) void DynamicElementTextItem::setText(const QString &text)
{ {
@@ -448,7 +448,7 @@ QString DynamicElementTextItem::infoName() const {
/** /**
@brief DynamicElementTextItem::setCompositeText @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 @param text
*/ */
void DynamicElementTextItem::setCompositeText(const QString &text) void DynamicElementTextItem::setCompositeText(const QString &text)

View File

@@ -71,9 +71,10 @@ class ElementXmlRetroCompatibility
/** /**
@brief Element::Element @brief Element::Element
@param location, location of this element @param location : location of this element
@param parent, parent graphics item @param parent : parent graphics item
@param state, state of the instanciation @param state : state of the instanciation
@param link_type
*/ */
Element::Element(const ElementsLocation &location, Element::Element(const ElementsLocation &location,
QGraphicsItem *parent, QGraphicsItem *parent,
@@ -589,7 +590,7 @@ bool Element::parseInput(const QDomElement &dom_element)
/** /**
@brief Element::parseDynamicText @brief Element::parseDynamicText
Create the dynamic text field describ in @dom_element Create the dynamic text field describ in dom_element
@param dom_element @param dom_element
@return @return
*/ */
@@ -868,7 +869,7 @@ bool Element::fromXml(QDomElement &e,
transform.translate(xml_pos.x(), xml_pos.y()); transform.translate(xml_pos.x(), xml_pos.y());
deti->setPos(transform.map(pos)); 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 //to avoid unnecessary checking made below
//we also move deti from the m_converted_text_from_xml_description to m_dynamic_text_list //we also move deti from the m_converted_text_from_xml_description to m_dynamic_text_list
inputs.removeAll(dom_input); inputs.removeAll(dom_input);
@@ -905,10 +906,13 @@ bool Element::fromXml(QDomElement &e,
DiagramContext dc; DiagramContext dc;
dc.fromXml(e.firstChildElement("elementInformations"), dc.fromXml(e.firstChildElement("elementInformations"),
"elementInformation"); "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), * Since the commit 4791, the value used as "label" and "formula"
* so, if "label" contain "%" (Use variable value), and "formula" does not exist, * is stored in differents keys (instead of the same key,
* this mean the label was made before commit 4791 (0.51 dev). So we swap the value stored in "label" to "formula" as expected. * "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). * @TODO remove this code at version 0.7 or more (probably useless).
*/ */
#pragma message("@TODO remove this code for qet 0.7 or later") #pragma message("@TODO remove this code for qet 0.7 or later")
@@ -931,11 +935,15 @@ bool Element::fromXml(QDomElement &e,
deti->m_block_alignment = false; deti->m_block_alignment = false;
/** /* During the devel of the version 0.7,
During the devel of the version 0.7, the "old text" was replaced by the dynamic element text item. * 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, * When open a project made befor the 0.7,
and comment are not empty and visible and/or location are not empty and visible. * we must to reproduce the same visual when
we create a text group with inside the needed texts, label and comment and/or location. * 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 //#1 There must be old text converted to dynamic text
if(!successfully_converted.isEmpty()) if(!successfully_converted.isEmpty())
@@ -1035,7 +1043,8 @@ bool Element::fromXml(QDomElement &e,
group->setAlignment(Qt::AlignVCenter); group->setAlignment(Qt::AlignVCenter);
group->setVerticalAdjustment(-4); group->setVerticalAdjustment(-4);
group->setRotation(rotation); group->setRotation(rotation);
//Change the position of the group, so that the text "label" stay in the same //Change the position of the group,
//so that the text "label" stay in the same
//position in scene coordinate //position in scene coordinate
group->setPos(pos - deti->pos()); group->setPos(pos - deti->pos());
@@ -1246,8 +1255,10 @@ QDomElement Element::toXml(QDomDocument &document,
/** /**
@brief Element::addDynamiqueTextItem @brief Element::addDynamiqueTextItem
Add @deti as a dynamic text item of this element, @deti is reparented to this Add deti as a dynamic text item of this element,
If @deti is null, a new DynamicElementTextItem is created and added to this element. deti is reparented to this
If deti is null, a new DynamicElementTextItem is created
and added to this element.
@param deti @param deti
*/ */
void Element::addDynamicTextItem(DynamicElementTextItem *deti) void Element::addDynamicTextItem(DynamicElementTextItem *deti)
@@ -1268,8 +1279,9 @@ void Element::addDynamicTextItem(DynamicElementTextItem *deti)
/** /**
@brief Element::removeDynamicTextItem @brief Element::removeDynamicTextItem
Remove @deti, no matter if is a child of this element or a child of a group of this element. Remove deti, no matter if is a child of this element
Set he parent item of @deti to 0, @deti is not deleted. or a child of a group of this element.
Set he parent item of deti to 0, deti is not deleted.
@param deti @param deti
*/ */
void Element::removeDynamicTextItem(DynamicElementTextItem *deti) void Element::removeDynamicTextItem(DynamicElementTextItem *deti)
@@ -1309,7 +1321,7 @@ QList<DynamicElementTextItem *> Element::dynamicTextItems() const {
@brief Element::addTextGroup @brief Element::addTextGroup
Create and add an element text item group to this element. Create and add an element text item group to this element.
If this element already have a group with the same name, 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 @param name : the name of the group
@return the created group. @return the created group.
*/ */
@@ -1342,7 +1354,7 @@ ElementTextItemGroup *Element::addTextGroup(const QString &name)
/** /**
@brief Element::addTextGroup @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. the group must not be owned by an element.
*/ */
void Element::addTextGroup(ElementTextItemGroup *group) void Element::addTextGroup(ElementTextItemGroup *group)
@@ -1357,7 +1369,8 @@ void Element::addTextGroup(ElementTextItemGroup *group)
/** /**
@brief Element::removeTextGroup @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. group is not deleted.
All texts owned by the group will be reparented to this element All texts owned by the group will be reparented to this element
@param name @param name
@@ -1388,7 +1401,7 @@ void Element::removeTextGroup(ElementTextItemGroup *group)
/** /**
@brief Element::textGroup @brief Element::textGroup
@param name @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 haven't got a group with this name
*/ */
ElementTextItemGroup *Element::textGroup(const QString &name) const ElementTextItemGroup *Element::textGroup(const QString &name) const
@@ -1411,8 +1424,8 @@ QList<ElementTextItemGroup *> Element::textGroups() const
/** /**
@brief Element::addTextToGroup @brief Element::addTextToGroup
Add the text @text to the group @group; Add the text text to the group group;
If @group isn't owned by this element return false. If group isn't owned by this element return false.
The text must be a text of this element. The text must be a text of this element.
@return : true if the text was succesfully added to the group. @return : true if the text was succesfully added to the group.
*/ */
@@ -1435,7 +1448,8 @@ bool Element::addTextToGroup(DynamicElementTextItem *text,
/** /**
@brief Element::removeTextFromGroup @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 @return true if text was succesfully removed
*/ */
bool Element::removeTextFromGroup(DynamicElementTextItem *text, bool Element::removeTextFromGroup(DynamicElementTextItem *text,
@@ -1526,7 +1540,7 @@ QString Element::linkTypeToString() const
/** /**
@brief Element::setElementInformations @brief Element::setElementInformations
Set new information for this element. 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 @param dc
*/ */
void Element::setElementInformations(DiagramContext dc) void Element::setElementInformations(DiagramContext dc)

View File

@@ -44,8 +44,9 @@ class Element : public QetGraphicsItem
Q_OBJECT Q_OBJECT
public: public:
/** /**
* @brief The kind enum @brief The kind enum
* Used to know the kind of this element (master, slave, report ect...) Used to know the kind of this element
(master, slave, report ect...)
*/ */
enum kind {Simple = 1, enum kind {Simple = 1,
NextReport = 2, NextReport = 2,
@@ -66,8 +67,9 @@ class Element : public QetGraphicsItem
// attributes // attributes
public: public:
/** /**
* Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into an Element. Enable the use of qgraphicsitem_cast
* @return the QGraphicsItem type to safely cast a QGraphicsItem into an Element.
@return the QGraphicsItem type
*/ */
enum { Type = UserType + 1000 }; enum { Type = UserType + 1000 };
int type() const override { return Type; } int type() const override { return Type; }
@@ -153,7 +155,7 @@ class Element : public QetGraphicsItem
virtual void unlinkElement(Element *) {} virtual void unlinkElement(Element *) {}
virtual void initLink(QETProject *); virtual void initLink(QETProject *);
QList<Element *> linkedElements (); QList<Element *> 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; QString linkTypeToString() const;
void newUuid() {m_uuid = QUuid::createUuid();} //create new uuid for this element void newUuid() {m_uuid = QUuid::createUuid();} //create new uuid for this element
@@ -187,7 +189,7 @@ class Element : public QetGraphicsItem
void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override; void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override;
protected: 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 // 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 // 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 <DynamicElementTextItem *, QPointF> QHash <DynamicElementTextItem *, QPointF>
@@ -241,16 +243,16 @@ inline int Element::orientation() const {
} }
/** /**
* @brief Element::uuid @brief Element::uuid
* @return the uuid of this element @return the uuid of this element
*/ */
inline QUuid Element::uuid() const { inline QUuid Element::uuid() const {
return m_uuid; return m_uuid;
} }
/** /**
* @brief Element::linkedElements @brief Element::linkedElements
* @return the list of linked elements, the list is sorted by position @return the list of linked elements, the list is sorted by position
*/ */
inline QList <Element *> Element::linkedElements() { inline QList <Element *> Element::linkedElements() {
std::sort(connected_elements.begin(), std::sort(connected_elements.begin(),

View File

@@ -236,8 +236,9 @@ void ElementTextItemGroup::updateAlignment()
/** /**
@brief ElementTextItemGroup::setVerticalAdjustment @brief ElementTextItemGroup::setVerticalAdjustment
Set the value of the vertical adjustment to @v. Set the value of the vertical adjustment to v.
The vertical adjutment is use to adjust the space between the texts of this group. The vertical adjutment is use to adjust
the space between the texts of this group.
@param v @param v
*/ */
void ElementTextItemGroup::setVerticalAdjustment(int v) void ElementTextItemGroup::setVerticalAdjustment(int v)

View File

@@ -961,6 +961,7 @@ QDomElement QetShapeItem::toXml(QDomDocument &document) const
@brief QetShapeItem::toDXF @brief QetShapeItem::toDXF
Draw this element to the dxf document Draw this element to the dxf document
@param filepath file path of the the dxf document @param filepath file path of the the dxf document
@param pen
@return true if draw success @return true if draw success
*/ */
bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen)

View File

@@ -65,7 +65,8 @@ class QetShapeItem : public QetGraphicsItem
QetShapeItem(QPointF, QPointF = QPointF(0,0), ShapeType = Line, QGraphicsItem *parent = nullptr); QetShapeItem(QPointF, QPointF = QPointF(0,0), ShapeType = Line, QGraphicsItem *parent = nullptr);
~QetShapeItem() override; ~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; } int type() const override { return Type; }
///METHODS ///METHODS

View File

@@ -34,11 +34,11 @@ const qreal Terminal::terminalSize = 4.0;
const qreal Terminal::Z = 1000; const qreal Terminal::Z = 1000;
/** /**
@brief Terminal::init
Methode privee pour initialiser la borne. 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 number of terminal
@param name of terminal @param name of terminal
@param hiddenName
*/ */
void Terminal::init(QString number, QString name, bool 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 pf position du point d'amarrage pour un conducteur
@param o orientation de la borne : Qt::Horizontal ou Qt::Vertical @param o orientation de la borne : Qt::Horizontal ou Qt::Vertical
@param e Element auquel cette borne appartient @param e Element auquel cette borne appartient
@param s Scene sur laquelle figure cette borne
*/ */
Terminal::Terminal(QPointF pf, Qet::Orientation o, Element *e) : Terminal::Terminal(QPointF pf, Qet::Orientation o, Element *e) :
QGraphicsObject(e), QGraphicsObject(e),
@@ -690,7 +689,7 @@ bool Terminal::isLinkedTo(Terminal *other_terminal) {
- \p other_terminal is this terminal - \p other_terminal is this terminal
- this terminal is already connected to \p other_terminal - this terminal is already connected to \p other_terminal
@param 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 otherwise false
*/ */
bool Terminal::canBeLinkedTo(Terminal *other_terminal) bool Terminal::canBeLinkedTo(Terminal *other_terminal)
@@ -823,12 +822,12 @@ QUuid Terminal::uuid() const {
/** /**
@brief Conductor::relatedPotentialTerminal @brief Conductor::relatedPotentialTerminal
Return terminal at the same potential from the same 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 folio report, return the terminal of linked other report.
For Terminal element, return the other terminal of terminal element. For Terminal element, return the other terminal of terminal element.
@param terminal : to start search @param terminal : to start search
@param all_diagram :if true return all related terminal, @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 @return the list of terminal at the same potential
*/ */
QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram) QList<Terminal *> relatedPotentialTerminal (const Terminal *terminal, const bool all_diagram)

View File

@@ -54,8 +54,8 @@ QStringList QETInformation::titleblockInfoKeys()
/** /**
@brief QETInformation::titleblockTranslatedInfoKey @brief QETInformation::titleblockTranslatedInfoKey
@param info : info key to be translated @param info : info key to be translated
@return the translated information given by @info @return the translated information given by info
If @info don't match, return an empty string If info don't match, return an empty string
*/ */
QString QETInformation::titleblockTranslatedInfoKey(const QString &info) QString QETInformation::titleblockTranslatedInfoKey(const QString &info)
{ {

View File

@@ -978,7 +978,7 @@ ElementsLocation QETProject::importElement(ElementsLocation &location)
if (m_elements_collection->exist(import_path)) { if (m_elements_collection->exist(import_path)) {
ElementsLocation existing_location(import_path, this); 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()) { if (existing_location.uuid() == location.uuid()) {
return existing_location; return existing_location;
} }

View File

@@ -55,8 +55,8 @@ QDomElement QETXML::penToXml(QDomDocument &parent_document,const QPen& pen)
/** /**
@brief QETXML::penFromXml @brief QETXML::penFromXml
Build a QPen from a xml description Build a QPen from a xml description
@param element, The QDomElement that describe the pen @param element : The QDomElement that describe the pen
@return the created pen. If @element is null or tagName isn't "pen" @return the created pen. If element is null or tagName isn't "pen"
return a default constructed QPen return a default constructed QPen
*/ */
QPen QETXML::penFromXml(const QDomElement &element) QPen QETXML::penFromXml(const QDomElement &element)
@@ -128,8 +128,8 @@ QDomElement QETXML::brushToXml(QDomDocument &parent_document,
/** /**
@brief QETXML::brushFromXml @brief QETXML::brushFromXml
Build a QBrush from a xml description Build a QBrush from a xml description
@param element, the QDomElement that describe the pen @param element : the QDomElement that describe the pen
@return the created brush. If @element is null or tagName isn't "brush" @return the created brush. If element is null or tagName isn't "brush"
return a default constructed QBrush return a default constructed QBrush
*/ */
QBrush QETXML::brushFromXml(const QDomElement &element) 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 dir : file system direcory to convert to QDomElement directory
@param rename : by default the attribute "name" of the returned @param rename : by default the attribute "name" of the returned
QDomElement is the same name of @dir 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 @return A file system directory converted to a QDomElement directory
ready to be inserted into a XmlElementCollection. ready to be inserted into a XmlElementCollection.
If the QDomElement can't be created, return a null QDomElement. 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 file : file system element file to convert to QDomElement;
@param rename : by default the attribute "name" of @param rename : by default the attribute "name" of
the returned QDomElement is the same name of @file 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 @return A file system element converted to a QDomElement
ready to be inserted into a XmlElementCollection ready to be inserted into a XmlElementCollection
If the QDomElement can't be created, return a null QDomElement 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 @brief QETXML::textToDomElement
Return a QDomElement, created from @document, Return a QDomElement, created from document,
with tag name @tag_name and text @value. with tag name tag_name and text value.
@param document @param document
@param tag_name @param tag_name
@param value @param value
@return a QDomElement, created from @document @return a QDomElement, created from document
*/ */
QDomElement QETXML::textToDomElement(QDomDocument &document, QDomElement QETXML::textToDomElement(QDomDocument &document,
const QString& tag_name, const QString& tag_name,
@@ -308,7 +308,7 @@ QDomElement QETXML::textToDomElement(QDomDocument &document,
@brief QETXML::directChild @brief QETXML::directChild
@param element @param element
@param tag_name @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<QDomElement> QETXML::directChild(const QDomElement &element, QVector<QDomElement> QETXML::directChild(const QDomElement &element,
const QString &tag_name) const QString &tag_name)
@@ -333,10 +333,10 @@ QVector<QDomElement> QETXML::directChild(const QDomElement &element,
@param element @param element
@param parent_tag_name @param parent_tag_name
@param children_tag_name @param children_tag_name
@return When given an xml dom element @element, @return When given an xml dom element element,
returns a vector of all children dom_elements tagged @children_tag_name returns a vector of all children dom_elements tagged children_tag_name
nested in the parent dom elements tagged parent_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<QDomElement> QETXML::subChild(const QDomElement &element, QVector<QDomElement> QETXML::subChild(const QDomElement &element,
const QString parent_tag_name, const QString parent_tag_name,
@@ -417,7 +417,7 @@ QMargins QETXML::marginsFromXml(const QDomElement &element)
/** /**
@brief QETXML::modelHeaderDataToXml @brief QETXML::modelHeaderDataToXml
Save to xml element all header data specified 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 parent_document
@param model @param model
@param horizontal_section_role : key as header section and value @param horizontal_section_role : key as header section and value

View File

@@ -25,9 +25,11 @@
#include <QSqlError> #include <QSqlError>
#include <QSqlRecord> #include <QSqlRecord>
/** /**
* @brief BOMExportDialog::BOMExportDialog @brief BOMExportDialog::BOMExportDialog
* @param parent @param project
@param parent
*/ */
BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) : BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) :
QDialog(parent), QDialog(parent),
@@ -43,7 +45,7 @@ BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) :
} }
/** /**
* @brief BOMExportDialog::~BOMExportDialog @brief BOMExportDialog::~BOMExportDialog
*/ */
BOMExportDialog::~BOMExportDialog() BOMExportDialog::~BOMExportDialog()
{ {
@@ -51,8 +53,8 @@ BOMExportDialog::~BOMExportDialog()
} }
/** /**
* @brief BOMExportDialog::exec @brief BOMExportDialog::exec
* @return @return
*/ */
int BOMExportDialog::exec() int BOMExportDialog::exec()
{ {
@@ -156,6 +158,10 @@ QString BOMExportDialog::getBom()
return return_string; return return_string;
} }
/**
@brief BOMExportDialog::on_m_format_as_bom_clicked
@param checked
*/
void BOMExportDialog::on_m_format_as_bom_clicked(bool checked) { void BOMExportDialog::on_m_format_as_bom_clicked(bool checked) {
m_query_widget->setGroupBy("designation", checked); m_query_widget->setGroupBy("designation", checked);
m_query_widget->setCount("COUNT(*) AS designation_qty", checked); m_query_widget->setCount("COUNT(*) AS designation_qty", checked);

View File

@@ -28,7 +28,7 @@ class BOMExportDialog;
} }
/** /**
* @brief The BOMExportDialog class @brief The BOMExportDialog class
*/ */
class BOMExportDialog : public QDialog class BOMExportDialog : public QDialog
{ {

View File

@@ -61,7 +61,7 @@ DiagramContext DiagramContextWidget::context() const
/** /**
@brief DiagramContextWidget::setContext @brief DiagramContextWidget::setContext
Load the content from @context into this widget Load the content from context into this widget
@param context @param context
*/ */
void DiagramContextWidget::setContext (const DiagramContext &context) void DiagramContextWidget::setContext (const DiagramContext &context)

View File

@@ -136,7 +136,7 @@ void DynamicElementTextItemEditor::apply()
/** /**
@brief DynamicElementTextItemEditor::setCurrentText @brief DynamicElementTextItemEditor::setCurrentText
Expand and select the item for text @text Expand and select the item for text text
@param text @param text
*/ */
void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text) void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text)
@@ -153,7 +153,7 @@ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text)
/** /**
@brief DynamicElementTextItemEditor::setCurrentGroup @brief DynamicElementTextItemEditor::setCurrentGroup
Expand and select the item for group @group Expand and select the item for group group
@param group @param group
*/ */
void DynamicElementTextItemEditor::setCurrentGroup(ElementTextItemGroup *group) void DynamicElementTextItemEditor::setCurrentGroup(ElementTextItemGroup *group)

View File

@@ -851,7 +851,7 @@ void DynamicElementTextModel::removeGroup(ElementTextItemGroup *group)
/** /**
@brief DynamicElementTextModel::textAddedToGroup @brief DynamicElementTextModel::textAddedToGroup
Add the text @text to the group @group Add the text text to the group group
@param deti @param deti
@param group @param group
*/ */
@@ -880,7 +880,7 @@ void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti,
@brief DynamicElementTextModel::groupFromIndex @brief DynamicElementTextModel::groupFromIndex
@param index @param index
@return the group associated with index. Return value can be nullptr @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. and can be the column 0 or 1.
*/ */
ElementTextItemGroup *DynamicElementTextModel::groupFromIndex( ElementTextItemGroup *DynamicElementTextModel::groupFromIndex(
@@ -941,8 +941,8 @@ QModelIndex DynamicElementTextModel::indexFromGroup(
/** /**
@brief DynamicElementTextModel::indexIsText @brief DynamicElementTextModel::indexIsText
@param index @param index
@return True if @index represente a text, both for the column 0 and 1. @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 false if index is a child of an index associated to a text.
*/ */
bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const
{ {
@@ -1191,7 +1191,7 @@ QStringList DynamicElementTextModel::mimeTypes() const
/** /**
@brief DynamicElementTextModel::enableSourceText @brief DynamicElementTextModel::enableSourceText
Enable the good field, according to the current source of text, Enable the good field, according to the current source of text,
for the edited text @deti for the edited text deti
@param deti @param deti
@param tf @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 //because the data are stored on this column
//the first column is use only for display the title of the property, //the first column is use only for display the title of the property,
//except for the name of texts group //except for the name of texts group
@@ -1332,7 +1332,8 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi)
/** /**
@brief DynamicElementTextModel::setConnection @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. Is notably use with the use of QUndoCommand.
@param deti - text to setup connection @param deti - text to setup connection
@param set - true = set connection - false unset connection @param set - true = set connection - false unset connection
@@ -1372,7 +1373,8 @@ void DynamicElementTextModel::setConnection(DynamicElementTextItem *deti, bool s
/** /**
@brief DynamicElementTextModel::setConnection @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. Is notably use with the use of QUndoCommand.
@param group group to setup the connection @param group group to setup the connection
@param set true = set connection - false unset connection @param set true = set connection - false unset connection

View File

@@ -51,7 +51,7 @@ ElementInfoWidget::~ElementInfoWidget()
/** /**
@brief ElementInfoWidget::setElement @brief ElementInfoWidget::setElement
Set @element to be the edited element Set element to be the edited element
@param element @param element
*/ */
void ElementInfoWidget::setElement(Element *element) void ElementInfoWidget::setElement(Element *element)
@@ -189,7 +189,8 @@ void ElementInfoWidget::buildInterface()
/** /**
@brief ElementInfoWidget::infoPartWidgetForKey @brief ElementInfoWidget::infoPartWidgetForKey
@param key @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 ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const
{ {

View File

@@ -49,9 +49,11 @@ ElementPropertiesWidget::ElementPropertiesWidget(Element *elmt, QWidget *parent)
/** /**
@brief ElementPropertiesWidget::ElementPropertiesWidget @brief ElementPropertiesWidget::ElementPropertiesWidget
Same as default constructor, the edited element, is the parent element of @text. Same as default constructor, the edited element,
The only difference with default constructor, is that the current tab is the tab for dynamic texts, is the parent element of text.
and the item in the tree that represent @text is expanded and selected. 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 text
@param parent @param parent
*/ */
@@ -70,9 +72,11 @@ ElementPropertiesWidget::ElementPropertiesWidget(DynamicElementTextItem *text, Q
/** /**
@brief ElementPropertiesWidget::ElementPropertiesWidget @brief ElementPropertiesWidget::ElementPropertiesWidget
Same as default constructor, the edited element, is the parent element of @group. Same as default constructor, the edited element,
The only difference with default constructor, is that the current tab is the tab for dynamic texts, is the parent element of group.
and the item in the tree that represent @group is expanded and selected. 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 group
@param parent @param parent
*/ */
@@ -92,7 +96,7 @@ ElementPropertiesWidget::ElementPropertiesWidget(ElementTextItemGroup *group, QW
/** /**
@brief ElementPropertiesWidget::setElement @brief ElementPropertiesWidget::setElement
Set @element to be the edited element Set element to be the edited element
@param element @param element
*/ */
void ElementPropertiesWidget::setElement(Element *element) void ElementPropertiesWidget::setElement(Element *element)
@@ -119,8 +123,11 @@ void ElementPropertiesWidget::setElement(Element *element)
/** /**
@brief ElementPropertiesWidget::setDynamicText @brief ElementPropertiesWidget::setDynamicText
convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @text. convenience function:
Set the dynamics text tab as current tab, expand and select the item that represent @text 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 @param text
*/ */
void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text) void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text)
@@ -142,8 +149,11 @@ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text)
/** /**
@brief ElementPropertiesWidget::setTextsGroup @brief ElementPropertiesWidget::setTextsGroup
Conveniance function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @group. Conveniance function :
Set the dynamics text tab as current tab, expand and select the item that represent @group 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 @param group
*/ */
void ElementPropertiesWidget::setTextsGroup(ElementTextItemGroup *group) void ElementPropertiesWidget::setTextsGroup(ElementTextItemGroup *group)

View File

@@ -61,7 +61,7 @@ IndiTextPropertiesWidget::~IndiTextPropertiesWidget() {
/** /**
@brief IndiTextPropertiesWidget::setText @brief IndiTextPropertiesWidget::setText
@param text : set @text as edited text @param text : set text as edited text
*/ */
void IndiTextPropertiesWidget::setText(IndependentTextItem *text) void IndiTextPropertiesWidget::setText(IndependentTextItem *text)
{ {

View File

@@ -593,7 +593,7 @@ void LinkSingleElementWidget::on_m_unlink_pb_clicked()
/** /**
@brief LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked @brief LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked
Highlight the element represented by @item Highlight the element represented by item
@param item @param item
@param column @param column
*/ */

View File

@@ -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 this class provide a widget to select an element to be linked
to the element given in the constructor. 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). The element given in constructor must be linked with only
This widget detect automaticaly the kind of element given in the constructor and one other element (like report or slave element).
search all element that can be linked with it. 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. If the element is already linked, the widget ask user to unlink.
This widget embedded the diagram command for undo/redo the action This widget embedded the diagram command for undo/redo the action
*/ */

View File

@@ -53,8 +53,8 @@ namespace Ui {
the properties of the two existing potential, the properties of the two existing potential,
to apply it for the new potential. to apply it for the new potential.
Each constructor have a QUndoCommand @parent_undo for parameter Each constructor have a QUndoCommand parent_undo for parameter
If @parent_undo isn't null, when user click on OK button, If parent_undo isn't null, when user click on OK button,
the dialog will use the parent-undo the dialog will use the parent-undo
as parent of the undo command that describe the changes. as parent of the undo command that describe the changes.
If parent_undo is null, the created undo-command is push If parent_undo is null, the created undo-command is push

View File

@@ -55,7 +55,7 @@ ShapeGraphicsItemPropertiesWidget::~ShapeGraphicsItemPropertiesWidget()
/** /**
@brief ShapeGraphicsItemPropertiesWidget::setItem @brief ShapeGraphicsItemPropertiesWidget::setItem
Set @shape as the current edited item Set shape as the current edited item
@param shape @param shape
*/ */
void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape) void ShapeGraphicsItemPropertiesWidget::setItem(QetShapeItem *shape)

View File

@@ -322,7 +322,8 @@ void TitleBlockPropertiesWidget::initDialog(const bool &current_date, QETProjec
/** /**
@brief TitleBlockPropertiesWidget::getIndexFor @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 tbt_name : title block name
@param collection : title block collection @param collection : title block collection
@return the index of the title block or -1 if no match @return the index of the title block or -1 if no match

View File

@@ -112,7 +112,7 @@ void XRefPropertiesWidget::buildUi()
/** /**
@brief XRefPropertiesWidget::saveProperties @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 @param index
*/ */
void XRefPropertiesWidget::saveProperties(int index) { void XRefPropertiesWidget::saveProperties(int index) {
@@ -130,10 +130,6 @@ void XRefPropertiesWidget::saveProperties(int index) {
else else
xrp.setSnapTo(XRefProperties::Label); xrp.setSnapTo(XRefProperties::Label);
if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "bottom") xrp.setXrefPos(Qt::AlignBottom); 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() == "top") xrp.setXrefPos(Qt::AlignTop);
else if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "left") xrp.setXrefPos(Qt::AlignLeft); else if(ui->m_xrefpos_cb->itemData(ui->m_xrefpos_cb->currentIndex()).toString() == "left") xrp.setXrefPos(Qt::AlignLeft);

View File

@@ -100,7 +100,7 @@ AddTextsGroupCommand::AddTextsGroupCommand(Element *element,
@param element : The element to add a new group @param element : The element to add a new group
@param dom_element : the first time the group is created, @param dom_element : the first time the group is created,
we call the function fromXml of the group, we call the function fromXml of the group,
and give @dom_element has argument. and give dom_element has argument.
@param parent : parent undo @param parent : parent undo
*/ */
AddTextsGroupCommand::AddTextsGroupCommand(Element *element, AddTextsGroupCommand::AddTextsGroupCommand(Element *element,
@@ -326,7 +326,7 @@ void AddTextToGroupCommand::redo()
* ***************************/ * ***************************/
/** /**
@brief RemoveTextFromGroupCommand::RemoveTextFromGroupCommand @brief RemoveTextFromGroupCommand::RemoveTextFromGroupCommand
@param text : text to add to @group @param text : text to add to group
@param group @param group
@param parent : parent undo command @param parent : parent undo command
*/ */

View File

@@ -39,7 +39,7 @@ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(Diagram *diagram, const D
m_removed_contents(content), m_removed_contents(content),
m_diagram(diagram) m_diagram(diagram)
{ {
//If parent element of a dynamic element text item is also in @m_removed_content, //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. //we remove it, because when the element will be removed from the scene every child's will also be removed.
const QSet<DynamicElementTextItem *> elmt_set = m_removed_contents.m_element_texts; const QSet<DynamicElementTextItem *> elmt_set = m_removed_contents.m_element_texts;
for(DynamicElementTextItem *deti : elmt_set) for(DynamicElementTextItem *deti : elmt_set)
@@ -59,7 +59,7 @@ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(Diagram *diagram, const D
m_elmt_text_hash.insert(deti, deti->parentElement()); m_elmt_text_hash.insert(deti, deti->parentElement());
} }
//If parent element of ElementTextItemGroup is also in @m_removed_content, //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. //we remove it, because when the element will be removed from the scene every child's will also be removed.
const QSet<ElementTextItemGroup *> group_set = m_removed_contents.m_texts_groups; const QSet<ElementTextItemGroup *> group_set = m_removed_contents.m_texts_groups;
for(ElementTextItemGroup *group : group_set) for(ElementTextItemGroup *group : group_set)

View File

@@ -125,7 +125,8 @@ bool LinkElementCommand::isLinkable(Element *element_a, Element *element_b, bool
/** /**
@brief LinkElementCommand::setLink @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. This method do several check to know if element can be linked or not.
@param element_list @param element_list
*/ */
@@ -270,8 +271,11 @@ void LinkElementCommand::makeLink(const QList<Element *> &element_list)
foreach(Element *elmt, element_list) foreach(Element *elmt, element_list)
m_element->linkToElement(elmt); m_element->linkToElement(elmt);
//At this point may be there are unwanted linked elements to m_element. We must to unlink it. /* At this point may be there are unwanted linked elements to m_element.
//Elements from @element_list are wanted so we compare @element_list to current linked element of @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<Element *> to_unlink = m_element->linkedElements(); QList<Element *> to_unlink = m_element->linkedElements();
foreach(Element *elmt, element_list) foreach(Element *elmt, element_list)
to_unlink.removeAll(elmt); to_unlink.removeAll(elmt);

View File

@@ -29,7 +29,7 @@
/** /**
@brief ConductorCreator::ConductorCreator @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. the terminals of the list must be in the same diagram.
@param d Diagram @param d Diagram
@param terminals_list QList<Terminal *> @param terminals_list QList<Terminal *>