comments: fixed typos and added English comments

This commit is contained in:
plc-user
2025-02-09 17:51:15 +01:00
parent a20d02f5f0
commit 13f432571d
3 changed files with 8 additions and 5 deletions

View File

@@ -517,11 +517,11 @@ QRectF ElementScene::boundingRectFromXml(const QDomDocument &xml_document)
ElementContent loaded_content = loadContent(xml_document); ElementContent loaded_content = loadContent(xml_document);
if (loaded_content.isEmpty()) return(QRectF()); if (loaded_content.isEmpty()) return(QRectF());
// calcule the boundingRect // calculate the boundingRect
// calcule le boundingRect // calcule le boundingRect
QRectF bounding_rect = elementContentBoundingRect(loaded_content); QRectF bounding_rect = elementContentBoundingRect(loaded_content);
// destroy charged parties // destroy loaded parts
// detruit les parties chargees // detruit les parties chargees
qDeleteAll(loaded_content); qDeleteAll(loaded_content);

View File

@@ -321,10 +321,12 @@ ElementContent ElementView::paste(const QDomDocument &xml_document, const QPoint
} }
/** /**
Paste the XML document "xml_document" at position pos
Colle le document XML xml_document a la position pos Colle le document XML xml_document a la position pos
@param xml_document Document XML a coller @param xml_document Document XML a coller
*/ */
ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) { ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) {
// object to retrieve content added to the scheme by pasting
// objet pour recuperer le contenu ajoute au schema par le coller // objet pour recuperer le contenu ajoute au schema par le coller
ElementContent content_pasted; ElementContent content_pasted;
@@ -358,6 +360,7 @@ ElementContent ElementView::pasteWithOffset(const QDomDocument &xml_document) {
start_top_left_corner_ = final_pasted_content_bounding_rect.topLeft(); start_top_left_corner_ = final_pasted_content_bounding_rect.topLeft();
m_scene -> fromXml(xml_document, start_top_left_corner_, false, &content_pasted); m_scene -> fromXml(xml_document, start_top_left_corner_, false, &content_pasted);
// if something has actually been added to the scheme, a cancel object is created
// si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation // si quelque chose a effectivement ete ajoute au schema, on cree un objet d'annulation
if (content_pasted.count()) { if (content_pasted.count()) {
m_scene -> clearSelection(); m_scene -> clearSelection();

View File

@@ -274,7 +274,7 @@ void QetGraphicsTableItem::paint(
offset += m_header_item->sectionSize(i); offset += m_header_item->sectionSize(i);
} }
//Calcule the number of rows to display. //calculate the number of rows to display.
auto row_count = m_model->rowCount(); auto row_count = m_model->rowCount();
if (m_previous_table) //Remove the number of row already displayed by previous tables if (m_previous_table) //Remove the number of row already displayed by previous tables
@@ -516,7 +516,7 @@ int QetGraphicsTableItem::displayedRowCount() const
return 0; return 0;
} }
//Calcule the number of rows to display. //calculate the number of rows to display.
auto row_count = m_model->rowCount(); auto row_count = m_model->rowCount();
if (m_previous_table) //Remove the number of row already displayed by previous tables if (m_previous_table) //Remove the number of row already displayed by previous tables
@@ -858,7 +858,7 @@ void QetGraphicsTableItem::modelReseted()
/** /**
@brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize @brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize
Calcule the minimum row height and the minimum column width for each columns Calculate the minimum row height and the minimum column width for each columns
this function doesn't change the geometry of the table. this function doesn't change the geometry of the table.
*/ */
void QetGraphicsTableItem::setUpColumnAndRowMinimumSize() void QetGraphicsTableItem::setUpColumnAndRowMinimumSize()