Fix various typos in source documentation and comments (cont.)

Found via `codespell`
This commit is contained in:
luz paz
2022-12-04 08:21:12 -05:00
committed by Laurent Trinques
parent a76e5446aa
commit 1994235bc5
102 changed files with 277 additions and 277 deletions

View File

@@ -63,7 +63,7 @@ void OpenElmtCommand::redo()
m_scene->addItems(m_graphics_item.toVector());
}
#pragma message("@TODO uncommante slot_select when fixed, see itemChange function for each primitve")
#pragma message("@TODO uncommante slot_select when fixed, see itemChange function for each primitive")
//Commented because take a lot of time
//when a lot of primitive are loaded
//need work

View File

@@ -143,7 +143,7 @@ bool ArcEditor::setParts(QList <CustomElementPart *> parts)
/**
@brief ArcEditor::currentPart
@return the curent edited part, or 0 if there is no edited part
@return the current edited part, or 0 if there is no edited part
*/
CustomElementPart *ArcEditor::currentPart() const
{

View File

@@ -483,8 +483,8 @@ void ScalePartsCommand::adjustText()
/**
* @brief changeElementDataCommand::changeElementDataCommand
* Change the properties of the drawed element
* @param scene : scene to belong the property
* Change the properties of the drawn element
* @param scene : scene belonging to the property
* @param old_data : old data
* @param new_data : new data
* @param parent : parent undo command

View File

@@ -47,14 +47,14 @@ ElementPrimitiveDecorator::~ElementPrimitiveDecorator()
}
/**
@return the internal bouding rect, i.e. the smallest rectangle containing
@return the internal bounding rect, i.e. the smallest rectangle containing
the bounding rectangle of every selected item.
*/
QRectF ElementPrimitiveDecorator::internalBoundingRect() const
{
if (!decorated_items_.count() || !scene()) return(QRectF());
//if @decorated_items_ contain one item and if this item is a vertical or horizontal partline, apply a specific methode
//if @decorated_items_ contains one item and if this item is a vertical or horizontal partline, apply a specific method
if ((decorated_items_.count() == 1) && (decorated_items_.first() -> xmlName() == "line")) {
QRectF horto = decorated_items_.first() -> sceneGeometricRect();
if (!horto.width() || !horto.height()) {
@@ -102,7 +102,7 @@ void ElementPrimitiveDecorator::paint(QPainter *painter,
painter -> setPen(pen);
painter -> drawRect(modified_bounding_rect_);
// uncomment to draw the real bouding rect (=adjusted internal bounding rect)
// uncomment to draw the real bounding rect (=adjusted internal bounding rect)
// painter -> setBrush(QBrush(QColor(240, 0, 0, 127)));
// painter -> drawRect(boundingRect());
painter -> restore();
@@ -349,7 +349,7 @@ void ElementPrimitiveDecorator::saveOriginalBoundingRect()
/**
Adjust the effective bounding rect. This method should be called after the
modified_bouding_rect_ attribute was modified.
modified_bounding_rect_ attribute was modified.
*/
void ElementPrimitiveDecorator::adjustEffectiveBoundingRect()
{

View File

@@ -332,8 +332,8 @@ void ElementScene::setEventInterface(ESEventInterface *event_interface)
if (m_event_interface)
{
delete m_event_interface;
//We must to re-init because previous interface
//Reset his own init when deleted
//We must re-init because previous interface
//Reset its own init when deleted
event_interface->init();
}
m_event_interface = event_interface;
@@ -772,11 +772,11 @@ void ElementScene::slot_select(const ElementContent &content)
{
blockSignals(true);
/* Befor clear selection,
* we must to remove the handlers items in @content,
/* Before clearing selection,
* we must remove the handlers items in @content,
* because if in @content there are a selected item,
* but also its handlers items, When item is deselected,
* the item delete its handlers items,
* the item deletes its handlers items,
* then handlers in content doesn't exist anymore and cause segfault
*/
QList<QGraphicsItem*> items_list;

View File

@@ -35,7 +35,7 @@ class QKeyEvent;
class CustomElementGraphicPart;
/**
@brief The ElementScene class
This class is the canvas allowing the visual edition of an electrial element.
This class is the canvas allowing the visual edition of an electrical element.
It displays the various primitives composing the drawing of the element,
the border due to its fixed size and its hotspot.
@@ -70,7 +70,7 @@ class ElementScene : public QGraphicsScene
// attributes
private:
ElementData m_element_data; ///ElementData. Actualy in transition with old data storage
ElementData m_element_data; ///ElementData. Actually in transition with old data storage
QGIManager m_qgi_manager;
QUndoStack m_undo_stack;

View File

@@ -126,7 +126,7 @@ bool ESEventAddArc::keyPressEvent(QKeyEvent *event) {
/**
@brief ESEventAddArc::updateArc
Redraw the arc with curent value
Redraw the arc with current value
*/
void ESEventAddArc::updateArc()
{

View File

@@ -84,7 +84,7 @@ bool ESEventInterface::wheelEvent(QGraphicsSceneWheelEvent *event) {
/**
@brief ESEventInterface::keyPressEvent
By default, press escape key abort the curent action
By default, press escape key abort the current action
@param event
@return
*/

View File

@@ -156,7 +156,7 @@ void CustomElementGraphicPart::setAntialiased(const bool b)
/**
@brief CustomElementGraphicPart::stylesToXml
Write the curent style to xml element.
Write the current style to xml element.
The style are stored like this:
name-of-style:value;name-of-style:value
Each style separate by ; and name-style/value are separate by :
@@ -893,7 +893,7 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde)
/**
@brief CustomElementGraphicPart::resetStyles
Reset the curent style to default,
Reset the current style to default,
same style of default constructor
*/
void CustomElementGraphicPart::resetStyles()

View File

@@ -606,7 +606,7 @@ QPainterPath PartLine::path() const
//debugPaint(painter);
//Determine if we must to draw extremity
//Determine if we must draw extremity
qreal reduced_line_length = line_length - (length1 * requiredLengthForEndType(first_end));
bool draw_1st_end = first_end && reduced_line_length >= 0;
@@ -685,7 +685,7 @@ QPainterPath PartLine::path() const
stop_point = four_points2[0];
}
//Adjust the end point accordint to the pen width
//Adjust the end point according to the pen width
if (pen_width && (second_end == Qet::Simple || second_end == Qet::Circle))
stop_point = QLineF(point1, stop_point).pointAt((line_length - (pen_width / 2.0)) / line_length);
}

View File

@@ -499,7 +499,7 @@ void PartPolygon::removeHandler()
/**
@brief PartPolygon::insertPoint
Insert a point in this polygone
Insert a point in this polygon
*/
void PartPolygon::insertPoint()
{

View File

@@ -226,7 +226,7 @@ void DynamicTextFieldEditor::fillInfoComboBox()
else {
strl = QETInformation::elementInfoKeys();
}
//We use a QMap because the keys of the map are sorted, then no matter the curent local,
//We use a QMap because the keys of the map are sorted, then no matter the current local,
//the value of the combo box are always alphabetically sorted
QMap <QString, QString> info_map;
for(const QString& str : strl)

View File

@@ -76,7 +76,7 @@ ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget()
/**
@brief ElementPropertiesEditorWidget::upDateInterface
Update the interface with the curent value
Update the interface with the current value
*/
void ElementPropertiesEditorWidget::upDateInterface()
{

View File

@@ -117,7 +117,7 @@ bool PolygonEditor::setPart(CustomElementPart *new_part)
/**
@brief PolygonEditor::currentPart
@return the curent edited part
@return the current edited part
*/
CustomElementPart *PolygonEditor::currentPart() const
{

View File

@@ -329,7 +329,7 @@ void QETElementEditor::fromLocation(const ElementsLocation &location)
* @brief QETElementEditor::toLocation
* Save the edited element into @location
* @param location
* @return true if succesfully saved
* @return true if successfully saved
*/
bool QETElementEditor::toLocation(const ElementsLocation &location)
{
@@ -1259,7 +1259,7 @@ bool QETElementEditor::on_m_save_action_triggered()
*/
bool QETElementEditor::on_m_save_as_action_triggered()
{
// Check element befor writing
// Check element before writing
if (checkElement()) {
//Ask a location to user
ElementsLocation location = ElementDialog::getSaveElementLocation(this);
@@ -1328,7 +1328,7 @@ void QETElementEditor::on_m_open_dxf_action_triggered()
bool QETElementEditor::on_m_save_as_file_action_triggered()
{
// Check element befor writing
// Check element before writing
if (checkElement()) {
//Ask a filename to user, for save the element
QString fn = QFileDialog::getSaveFileName(