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

@@ -257,7 +257,7 @@ ElementsLocation ECHSXmlToFile::copyElement(ElementsLocation &source, ElementsLo
QString new_element_name = rename.isEmpty() ? source.fileName() : rename; QString new_element_name = rename.isEmpty() ? source.fileName() : rename;
//Get the xml descrption of the element //Get the xml description of the element
QDomDocument document; QDomDocument document;
document.appendChild(document.importNode(source.xml(), true)); document.appendChild(document.importNode(source.xml(), true));
@@ -336,22 +336,22 @@ ElementsLocation ElementCollectionHandler::copy(ElementsLocation &source, Elemen
/** /**
@brief ElementCollectionHandler::createDir @brief ElementCollectionHandler::createDir
Create a directorie with name as child of parent. Create a directory with name as child of parent.
Parent must be a directory Parent must be a directory
@param parent : parent of the dir to create @param parent : parent of the dir to create
@param name : name of directorie to create @param name : name of directory to create
@param name_list : translations of the directorie name @param name_list : translations of the directory name
@return : ElementsLocation that represent the new directorie, location can be null if an error was occurred @return : ElementsLocation that represent the new directory, location can be null if an error was occurred
*/ */
ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list) ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list)
{ {
//Parent must be a directorie and writable //Parent must be a directory and writable
if (!(parent.isDirectory() && parent.isWritable() && parent.exist())) { if (!(parent.isDirectory() && parent.isWritable() && parent.exist())) {
qDebug() << "ElementCollectionHandler::createDir : the prerequisites are not valid. " << parent; qDebug() << "ElementCollectionHandler::createDir : the prerequisites are not valid. " << parent;
return ElementsLocation(); return ElementsLocation();
} }
//Directorie to create must not already exist //Directory to create must not already exist
ElementsLocation created_dir = parent; ElementsLocation created_dir = parent;
created_dir.addToPath(name); created_dir.addToPath(name);
if (created_dir.exist()) { if (created_dir.exist()) {

View File

@@ -128,7 +128,7 @@ bool ElementsCollectionModel::canDropMimeData(const QMimeData *data,
if (!qsi) if (!qsi)
qsi = itemFromIndex(parent); qsi = itemFromIndex(parent);
//Drop in the common collection is forbiden //Drop in the common collection is forbidden
if (qsi->type() == FileElementCollectionItem::Type) if (qsi->type() == FileElementCollectionItem::Type)
if (static_cast<FileElementCollectionItem *>(qsi)->isCommonCollection()) if (static_cast<FileElementCollectionItem *>(qsi)->isCommonCollection())
return false; return false;
@@ -193,7 +193,7 @@ bool ElementsCollectionModel::dropMimeData(const QMimeData *data,
if (location.exist()) if (location.exist())
{ {
//If feci have a child with the same path of location, //If feci have a child with the same path of location,
//we remove the existing child befor insert new child //we remove the existing child before insert new child
for (int i=0 ; i<feci->rowCount() ; i++) { for (int i=0 ; i<feci->rowCount() ; i++) {
if (static_cast<FileElementCollectionItem *>( if (static_cast<FileElementCollectionItem *>(
feci->child(i))->collectionPath() feci->child(i))->collectionPath()

View File

@@ -585,7 +585,7 @@ void ElementsCollectionWidget::resetShowThisDir()
/** /**
@brief ElementsCollectionWidget::dirProperties @brief ElementsCollectionWidget::dirProperties
Open an informative dialog about the curent index Open an informative dialog about the current index
*/ */
void ElementsCollectionWidget::dirProperties() void ElementsCollectionWidget::dirProperties()
{ {

View File

@@ -140,7 +140,7 @@ bool ElementsLocation::operator!=(const ElementsLocation &other) const
@return The base name of the element or directory. @return The base name of the element or directory.
Unlike ElementsLocation::fileName, Unlike ElementsLocation::fileName,
this method don't return the extension name. this method don't return the extension name.
For exemple if this location represent an element they return myElement. For example if this location represent an element they return myElement.
@see fileName() @see fileName()
*/ */
QString ElementsLocation::baseName() const QString ElementsLocation::baseName() const

View File

@@ -160,7 +160,7 @@ QDomElement XmlElementCollection::root() const
/** /**
@brief XmlElementCollection::importCategory @brief XmlElementCollection::importCategory
@return The QDomElement import (the begining of a xml collection) or @return The QDomElement import (the beginning of an xml collection) or
a null QDomElement if doesn't exist. a null QDomElement if doesn't exist.
*/ */
QDomElement XmlElementCollection::importCategory() const QDomElement XmlElementCollection::importCategory() const
@@ -511,7 +511,7 @@ QString XmlElementCollection::addElement(ElementsLocation &location)
/** /**
@brief XmlElementCollection::addElementDefinition @brief XmlElementCollection::addElementDefinition
Add the élément defintion xml_definition Add the element definition xml_definition
in the directory at path dir_path with the name elmt_name. in the directory at path dir_path with the name elmt_name.
@param dir_path : @param dir_path :
the path of the directory where we must add the element. the path of the directory where we must add the element.
@@ -624,13 +624,13 @@ bool XmlElementCollection::exist(const QString &path) const
/** /**
@brief XmlElementCollection::createDir @brief XmlElementCollection::createDir
Create a child directorie at path path with the name name. Create a child directory at path path with the name name.
Emit directorieAdded if success. Emit directorieAdded if success.
@param path : path of parent diectorie @param path : path of parent diectorie
@param name : name of the directori to create. @param name : name of the directori to create.
@param name_list : translation of the directorie name. @param name_list : translation of the directory name.
@return true if creation success, @return true if creation success,
if directorie already exist return true. if directory already exists, return true.
*/ */
bool XmlElementCollection::createDir(const QString& path, bool XmlElementCollection::createDir(const QString& path,
const QString& name, const QString& name,
@@ -644,7 +644,7 @@ bool XmlElementCollection::createDir(const QString& path,
QDomElement parent_dir = directory(path); QDomElement parent_dir = directory(path);
if (parent_dir.isNull()) { if (parent_dir.isNull()) {
qDebug() << "XmlElementCollection::createDir : directorie at path doesn't exist"; qDebug() << "XmlElementCollection::createDir : directory at path doesn't exist";
return false; return false;
} }
@@ -663,7 +663,7 @@ bool XmlElementCollection::createDir(const QString& path,
@brief XmlElementCollection::removeDir @brief XmlElementCollection::removeDir
Remove the directory at path path. Remove the directory at path path.
@param path @param path
@return true if successfuly removed and emit directoryRemoved(QString), @return true if successfully removed and emit directoryRemoved(QString),
else false. else false.
*/ */
bool XmlElementCollection::removeDir(const QString& path) bool XmlElementCollection::removeDir(const QString& path)
@@ -682,7 +682,7 @@ bool XmlElementCollection::removeDir(const QString& path)
Return all locations stored in dom_element (element and directory). Return all locations stored in dom_element (element and directory).
If dom_element is null, return all location owned by this collection If dom_element is null, return all location owned by this collection
dom_element must be a child of this collection. dom_element must be a child of this collection.
@param dom_element : dom_element where we must to search location. @param dom_element : dom_element where we must search location.
@param childs = if true return all childs location of dom_element, @param childs = if true return all childs location of dom_element,
if false, only return the direct childs location of dom_element. if false, only return the direct childs location of dom_element.
@return @return
@@ -867,7 +867,7 @@ ElementsLocation XmlElementCollection::copyDirectory(
QDomNode other_collection_node = source.projectCollection()->child(source.collectionPath(false)).cloneNode(deep_copy); QDomNode other_collection_node = source.projectCollection()->child(source.collectionPath(false)).cloneNode(deep_copy);
//We don't make a deep copy, //We don't make a deep copy,
// but we must to get the local names of the copied directory // but we must get the local names of the copied directory
if (!deep_copy) { if (!deep_copy) {
QDomNode names = source.projectCollection()->child(source.collectionPath(false)).namedItem("names"); QDomNode names = source.projectCollection()->child(source.collectionPath(false)).namedItem("names");
if (!names.isNull() && names.isElement()) if (!names.isNull() && names.isElement())

View File

@@ -90,31 +90,31 @@ class XmlElementCollection : public QObject
signals: signals:
/** /**
@brief elementAdded @brief elementAdded
This signal is emited when a element is added to this collection This signal is emitted when a element is added to this collection
@param collection_path : the path of element in this collection @param collection_path : the path of element in this collection
*/ */
void elementAdded(QString collection_path); void elementAdded(QString collection_path);
/** /**
@brief elementChanged @brief elementChanged
This signal is emited when the defintion of the element at path was changed This signal is emitted when the definition of the element at path was changed
@param collection_path : the path of this element in this collection @param collection_path : the path of this element in this collection
*/ */
void elementChanged (QString collection_path); void elementChanged (QString collection_path);
/** /**
@brief elementRemoved @brief elementRemoved
This signal is emited when an element is removed to this collection This signal is emitted when an element is removed from this collection
@param collection_path : the path of the removed element in this collection @param collection_path : the path of the removed element in this collection
*/ */
void elementRemoved(QString collection_path); void elementRemoved(QString collection_path);
/** /**
@brief directorieAdded @brief directorieAdded
This signal is emited when a directorie is added to this collection This signal is emitted when a directory is added to this collection
@param collection_path : the path of the new directorie @param collection_path : the path of the new directory
*/ */
void directorieAdded(QString collection_path); void directorieAdded(QString collection_path);
/** /**
@brief directoryRemoved @brief directoryRemoved
This signal is emited when a directory is removed to this collection This signal is emitted when a directory is removed from this collection
@param collection_path : the path of the removed directory @param collection_path : the path of the removed directory
*/ */
void directoryRemoved(QString collection_path); void directoryRemoved(QString collection_path);

View File

@@ -137,8 +137,8 @@ void NamesList::fromXml(const QDomElement &xml_element, const QHash<QString, QSt
@brief NamesList::fromXml @brief NamesList::fromXml
Load the list of lang <-> name from an xml description. Load the list of lang <-> name from an xml description.
xml_element must be the parent of a child element tagged "names" xml_element must be the parent of a child element tagged "names"
If a couple lang <-> name already exist, they will overwrited, else If a couple lang <-> name already exist, they will overwritten, else
they will be appened. they will be appended.
@param xml_element : xml element to analyze @param xml_element : xml element to analyze
@param xml_options : A set of options related to XML parsing. @param xml_options : A set of options related to XML parsing.
@see getXmlOptions() @see getXmlOptions()

View File

@@ -146,7 +146,7 @@ void NameListWidget::setClipboardValue(QHash<QString, QString> value)
/** /**
@brief NameListWidget::clean @brief NameListWidget::clean
Clean the lists of names by removing the emtpy lines Clean the lists of names by removing the empty lines
*/ */
void NameListWidget::clean() void NameListWidget::clean()
{ {

View File

@@ -29,7 +29,7 @@
Only create a instance of this class and call exec, Only create a instance of this class and call exec,
all is done for you in this class. all is done for you in this class.
The first argument (a template) must be a subclass The first argument (a template) must be a subclass
of QWidget and provide the 3 methods bellow : of QWidget and provide the 3 methods below :
QString::title() QString::title()
void::apply() void::apply()
void::reset() void::reset()

View File

@@ -51,13 +51,13 @@ QString PropertiesEditorWidget::title() const
Set the editor in live edit mode. Set the editor in live edit mode.
When an editor is in live edit mode, When an editor is in live edit mode,
every change is applied immediately (no need to call apply). every change is applied immediately (no need to call apply).
If live edit can be enable, return true, else false. If live edit can be enabled, return true, or else false.
By default this method do nothing and return false By default this method does nothing and returns false
(live edit is disable). (live edit is disabled).
Herited class of PropertiesEditorWidget must reimplemente Inherited class of PropertiesEditorWidget must reimplement
this methode to manage the live edit mode. this method to manage the live edit mode.
@param live_edit true to enable live edit @param live_edit true to enable live edit
@return true if live edit is enable, else false. @return true if live edit is enabled, else false.
*/ */
bool PropertiesEditorWidget::setLiveEdit(bool live_edit) { bool PropertiesEditorWidget::setLiveEdit(bool live_edit) {
Q_UNUSED(live_edit); Q_UNUSED(live_edit);
@@ -67,7 +67,7 @@ bool PropertiesEditorWidget::setLiveEdit(bool live_edit) {
/** /**
@brief PropertiesEditorWidget::isLiveEdit @brief PropertiesEditorWidget::isLiveEdit
@return true if this editor is in live edit mode @return true if this editor is in live edit mode
else return fasle. else return false.
*/ */
bool PropertiesEditorWidget::isLiveEdit() const bool PropertiesEditorWidget::isLiveEdit() const
{ {

View File

@@ -24,8 +24,8 @@ class QUndoCommand;
/** /**
@brief The PropertiesEditorWidget class @brief The PropertiesEditorWidget class
This class extend QWidget method for have common way This class extend QWidget method to have a common way
to edit propertie. to edit properties.
*/ */
class PropertiesEditorWidget : public QWidget class PropertiesEditorWidget : public QWidget
{ {

View File

@@ -1,4 +1,4 @@
/* /*
Copyright 2006-2021 The QElectroTech Team Copyright 2006-2021 The QElectroTech Team
This file is part of QElectroTech. This file is part of QElectroTech.
@@ -28,19 +28,19 @@
The role of behavior is to calcul as best the animation process The role of behavior is to calcul as best the animation process
when widget is show. when widget is show.
Because this class don't change the current and final size Because this class doesn't change the current and final size
of the widget but her maximum size during the animation process, of the widget but its maximum size during the animation process,
we must to know in advance the final size of the widget. we need to know in advance the final size of the widget.
Behavior minimumSizeHint : the final size of the widget Behavior minimumSizeHint : the final size of the widget
will be his minimum size hint. will be its minimum size hint.
Behavior availableSpace : the final size of widget will be Behavior availableSpace : the final size of widget will be
the available size of her parent. the available size of its parent.
Since parent can have other widgets you can add a QVector of widget Since parent can have other widgets you can add a QVector of widget
to subtract of the final size. to subtract from the final size.
Because we suppose the animated widget will take the maximum Because we suppose the animated widget will take the maximum
available space, we subtract the minimum size hint of widgets in QVector. available space, we subtract the minimum size hint of widgets in QVector.
Behavior lastSize : Behavior lastSize :
The widget will have the same size as the last time he was showed. The widget will have the same size as the last time it was displayed.
*/ */
class QWidgetAnimation : public QPropertyAnimation class QWidgetAnimation : public QPropertyAnimation
{ {

View File

@@ -93,7 +93,7 @@ QVector<QPointF> QetGraphicsHandlerUtility::pointsForArc(const QRectF &rect,
@brief QetGraphicsHandlerUtility::rectForPosAtIndex @brief QetGraphicsHandlerUtility::rectForPosAtIndex
Return a rectangle after modification Return a rectangle after modification
of the point 'pos' at index 'index' of original rectangle 'old_rect'. of the point 'pos' at index 'index' of original rectangle 'old_rect'.
@param old_rect - the rectangle befor modification @param old_rect - the rectangle before modification
@param pos - the new position of a key point @param pos - the new position of a key point
@param index - the index of the key point to modifie @param index - the index of the key point to modifie
@see QetGraphicsHandlerUtility::pointsForRect to know @see QetGraphicsHandlerUtility::pointsForRect to know
@@ -126,7 +126,7 @@ QRectF QetGraphicsHandlerUtility::rectForPosAtIndex(const QRectF &old_rect,
Return a rectangle after modification of the point 'pos' Return a rectangle after modification of the point 'pos'
at index 'index' of original rectangle 'old_rect'. at index 'index' of original rectangle 'old_rect'.
the opposite edge is modified inversely (like a mirror) the opposite edge is modified inversely (like a mirror)
@param old_rect : the rectangle befor modification @param old_rect : the rectangle before modification
@param pos : the new position of a key point @param pos : the new position of a key point
@param index : the index of the key point to modifie @param index : the index of the key point to modifie
@see QetGraphicsHandlerUtility::pointsForRect to know @see QetGraphicsHandlerUtility::pointsForRect to know

View File

@@ -28,7 +28,7 @@ class QPainter;
@brief The QetGraphicsHandlerUtility class @brief The QetGraphicsHandlerUtility class
This class provide some methods to create and use handler for This class provide some methods to create and use handler for
modify graphics shape like line rectangle etc... modify graphics shape like line rectangle etc...
They also provide some conveniance static method. They also provide some convenience static method.
*/ */
class QetGraphicsHandlerUtility class QetGraphicsHandlerUtility
{ {

View File

@@ -35,7 +35,7 @@ SearchAndReplaceWorker::SearchAndReplaceWorker()
/** /**
@brief SearchAndReplaceWorker::replaceDiagram @brief SearchAndReplaceWorker::replaceDiagram
Replace all properties of each diagram in diagram_list, Replace all properties of each diagram in diagram_list,
by the current titleblock propertie of this worker by the current titleblock properties of this worker
@param diagram_list : list of diagram to be changed, @param diagram_list : list of diagram to be changed,
all diagrams must belong to the same project; all diagrams must belong to the same project;
*/ */

View File

@@ -447,7 +447,7 @@ void SearchAndReplaceWidget::search()
: QColor("#FFE0EF")); : QColor("#FFE0EF"));
ui->m_search_le->setPalette(background); ui->m_search_le->setPalette(background);
//Go to the first occurence //Go to the first occurrence
ui->m_tree_widget->setCurrentItem(m_root_qtwi); ui->m_tree_widget->setCurrentItem(m_root_qtwi);
on_m_next_pb_clicked(); on_m_next_pb_clicked();
} }

View File

@@ -27,7 +27,7 @@
/** /**
* @brief The BridgeTerminalsCommand class * @brief The BridgeTerminalsCommand class
* UndoCommand use to create bridge betwen terminals * UndoCommand use to create bridge between terminals
* of a terminals strip * of a terminals strip
*/ */
class BridgeTerminalsCommand : public QUndoCommand class BridgeTerminalsCommand : public QUndoCommand
@@ -48,7 +48,7 @@ class BridgeTerminalsCommand : public QUndoCommand
/** /**
* @brief The UnBridgeTerminalsCommand class * @brief The UnBridgeTerminalsCommand class
* UndoCommand use to remove bridge betwen terminals * UndoCommand use to remove bridge between terminals
* of a terminals strip * of a terminals strip
*/ */
class UnBridgeTerminalsCommand : public QUndoCommand class UnBridgeTerminalsCommand : public QUndoCommand

View File

@@ -108,7 +108,7 @@ void PhysicalTerminal::addTerminal(const QSharedPointer<RealTerminal> &terminal)
* @brief removeTerminal * @brief removeTerminal
* Remove @a terminal from the list of real terminal * Remove @a terminal from the list of real terminal
* @param terminal * @param terminal
* @return true if sucessfully removed * @return true if successfully removed
*/ */
bool PhysicalTerminal::removeTerminal(const QSharedPointer<RealTerminal> &terminal) bool PhysicalTerminal::removeTerminal(const QSharedPointer<RealTerminal> &terminal)
{ {

View File

@@ -143,8 +143,8 @@ QString RealTerminal::label() const {
/** /**
* @brief RealTerminal::Xref * @brief RealTerminal::Xref
* @return Conveniant method to get the XRef * @return Convenient method to get the XRef
* formated to string * formatted to string
*/ */
QString RealTerminal::Xref() const QString RealTerminal::Xref() const
{ {

View File

@@ -31,7 +31,7 @@ class TerminalStripBridge;
/** /**
* @brief The RealTerminal class * @brief The RealTerminal class
* Represent a real terminal. * Represent a real terminal.
* A real terminal can be a drawed terminal in a folio * A real terminal can be a drawn terminal in a folio
* or a terminal set by user but not present * or a terminal set by user but not present
* on any folio (for example a reserved terminal). * on any folio (for example a reserved terminal).
* *

View File

@@ -477,7 +477,7 @@ QVector<QSharedPointer<RealTerminal>> TerminalStrip::realTerminals() const
* @brief TerminalStrip::setSortedTo * @brief TerminalStrip::setSortedTo
* Sort the physical terminal owned by this strip in the same order * Sort the physical terminal owned by this strip in the same order
* as \p sorted_vector. * as \p sorted_vector.
* \p sorted_vector must contain exaclty the same physical terminal as this strip * \p sorted_vector must contain exactly the same physical terminal as this strip
* else this function do nothing. * else this function do nothing.
* *
* To avoid any mistake, you should call TerminalStrip::physicalTerminal() * To avoid any mistake, you should call TerminalStrip::physicalTerminal()
@@ -715,7 +715,7 @@ bool TerminalStrip::isBridgeable(QSharedPointer<TerminalStripBridge> bridge, con
/** /**
* @brief TerminalStrip::setBridge * @brief TerminalStrip::setBridge
* Set a bridge betwen all real terminal of @a real_terminals * Set a bridge between all real terminal of @a real_terminals
* @sa TerminalStrip::isBridgeable * @sa TerminalStrip::isBridgeable
* @return true if bridge was successfully created * @return true if bridge was successfully created
*/ */
@@ -975,7 +975,7 @@ QDomElement TerminalStrip::toXml(QDomDocument &parent_document)
root_elmt.appendChild(m_data.toXml(parent_document)); root_elmt.appendChild(m_data.toXml(parent_document));
//Undrawed terminals //Undrawn terminals
auto xml_layout = parent_document.createElement("layout"); auto xml_layout = parent_document.createElement("layout");
for (auto &phy_t : m_physical_terminals) { for (auto &phy_t : m_physical_terminals) {
xml_layout.appendChild(phy_t->toXml(parent_document)); xml_layout.appendChild(phy_t->toXml(parent_document));

View File

@@ -91,7 +91,7 @@ TerminalStrip *TerminalStripCreatorDialog::generatedTerminalStrip() const
/** /**
* @brief TerminalStripCreatorDialog::setCursorToEmptyLine * @brief TerminalStripCreatorDialog::setCursorToEmptyLine
* Set the cursor to the first empty field. * Set the cursor to the first empty field.
* It's usefull when user create a new terminal strip * It's useful when user creates a new terminal strip
* with some value prefilled, to increase productivity. * with some value prefilled, to increase productivity.
*/ */
void TerminalStripCreatorDialog::setCursorToEmptyLine() void TerminalStripCreatorDialog::setCursorToEmptyLine()

View File

@@ -102,7 +102,7 @@ int NumerotationContext::size() const
/** /**
@brief NumerotationContext::isEmpty @brief NumerotationContext::isEmpty
@return true if numerotation contet is empty @return true if numerotation content is empty
*/ */
bool NumerotationContext::isEmpty() const bool NumerotationContext::isEmpty() const
{ {
@@ -148,7 +148,7 @@ bool NumerotationContext::keyIsAcceptable(const QString &type) const
/** /**
@brief NumerotationContext::keyIsNumber @brief NumerotationContext::keyIsNumber
@return true if type represent a number @return true if type represents a number
*/ */
bool NumerotationContext::keyIsNumber(const QString &type) const bool NumerotationContext::keyIsNumber(const QString &type) const
{ {

View File

@@ -198,7 +198,7 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button)
//transform button to int //transform button to int
int answer = ui -> buttonBox -> buttonRole(button); int answer = ui -> buttonBox -> buttonRole(button);
switch (answer) { switch (answer) {
//Reset the curent context //Reset the current context
case QDialogButtonBox::ResetRole: case QDialogButtonBox::ResetRole:
setContext(m_context); setContext(m_context);
break; break;

View File

@@ -34,7 +34,7 @@ class sqlite3;
This class wrap a sqlite data base where you can find several thing This class wrap a sqlite data base where you can find several thing
about the content of a project. about the content of a project.
* *
@note this class is still in developement. @note this class is still in development.
*/ */
class projectDataBase : public QObject class projectDataBase : public QObject
{ {

View File

@@ -288,7 +288,7 @@ QString ElementQueryWidget::queryStr() const
if (ui->m_edit_sql_query_cb->isChecked()) { if (ui->m_edit_sql_query_cb->isChecked()) {
return ui->m_sql_query->text(); return ui->m_sql_query->text();
} }
//Made a string list with the colomns (keys) choosen by the user //Made a string list with the columns (keys) chosen by the user
QStringList keys = selectedKeys(); QStringList keys = selectedKeys();
QString select ="SELECT "; QString select ="SELECT ";
@@ -405,7 +405,7 @@ void ElementQueryWidget::setGroupBy(QString text, bool set)
/** /**
@brief ElementQueryWidget::setCount @brief ElementQueryWidget::setCount
Add the query instruction COUNT. Add the query instruction COUNT.
Unlike setGroupBy, you have to write the entire sentance. Unlike setGroupBy, you have to write the entire sentence.
ex : text = "COUNT(*) AS designation_qty". ex : text = "COUNT(*) AS designation_qty".
the query will contain what you write. the query will contain what you write.
@param text : the count instruction @param text : the count instruction
@@ -437,7 +437,7 @@ void ElementQueryWidget::updateQueryLine()
*/ */
QStringList ElementQueryWidget::selectedKeys() const QStringList ElementQueryWidget::selectedKeys() const
{ {
//Made a string list with the colomns (keys) choosen by the user //Made a string list with the columns (keys) chosen by the user
QStringList keys; QStringList keys;
int row = 0; int row = 0;
while (auto *item = ui->m_choosen_list->item(row)) while (auto *item = ui->m_choosen_list->item(row))

View File

@@ -59,7 +59,7 @@ QString SummaryQueryWidget::queryStr() const
return ui->m_user_query_le->text(); return ui->m_user_query_le->text();
} }
//Made a string list with the colomns (keys) choosen by the user //Made a string list with the columns (keys) choosen by the user
QStringList keys = selectedKeys(); QStringList keys = selectedKeys();
QString select ="SELECT "; QString select ="SELECT ";
@@ -169,7 +169,7 @@ void SummaryQueryWidget::updateQueryLine()
*/ */
QStringList SummaryQueryWidget::selectedKeys() const QStringList SummaryQueryWidget::selectedKeys() const
{ {
//Made a string list with the colomns (keys) choosen by the user //Made a string list with the columns (keys) choosen by the user
QStringList keys; QStringList keys;
int row = 0; int row = 0;
while (auto *item = ui->m_choosen_list->item(row)) while (auto *item = ui->m_choosen_list->item(row))

View File

@@ -108,8 +108,8 @@ void DiagramEventAddImage::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
/** /**
@brief DiagramEventAddImage::mouseDoubleClickEvent @brief DiagramEventAddImage::mouseDoubleClickEvent
This method is only use to overwrite double click. This method is used only to overwrite double click.
When double click, image propertie dialog isn't open. When double click, image properties dialog isn't open.
@param event : event of mouse double click. @param event : event of mouse double click.
*/ */
void DiagramEventAddImage::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { void DiagramEventAddImage::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) {
@@ -118,7 +118,7 @@ void DiagramEventAddImage::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event
/** /**
@brief DiagramEventAddImage::wheelEvent @brief DiagramEventAddImage::wheelEvent
Action when mouse wheel is rotate Action when mouse wheel is rotated
@param event: evet of mouse wheel @param event: evet of mouse wheel
*/ */
void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event) void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event)
@@ -148,13 +148,13 @@ bool DiagramEventAddImage::isNull() const
/** /**
@brief DiagramEventAddImage::openDialog @brief DiagramEventAddImage::openDialog
Open dialog for select the image to add. Open dialog to select the image to add.
*/ */
void DiagramEventAddImage::openDialog() void DiagramEventAddImage::openDialog()
{ {
if (m_diagram -> isReadOnly()) return; if (m_diagram -> isReadOnly()) return;
//Open dialog for select image //Open dialog to select image
QString pathPictures = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation); QString pathPictures = QStandardPaths::writableLocation(QStandardPaths::PicturesLocation);
QString fileName = QFileDialog::getOpenFileName(m_diagram->views().isEmpty()? nullptr : m_diagram->views().first(), QObject::tr("Selectionner une image..."), pathPictures, QObject::tr("Image Files (*.png *.jpg *.jpeg *.bmp *.svg)")); QString fileName = QFileDialog::getOpenFileName(m_diagram->views().isEmpty()? nullptr : m_diagram->views().first(), QObject::tr("Selectionner une image..."), pathPictures, QObject::tr("Image Files (*.png *.jpg *.jpeg *.bmp *.svg)"));

View File

@@ -54,7 +54,7 @@ void DiagramEventInterface::wheelEvent(QGraphicsSceneWheelEvent *event) {
/** /**
@brief DiagramEventInterface::keyPressEvent @brief DiagramEventInterface::keyPressEvent
By default, press escape key abort the curent action By default, press escape key abort the current action
@param event @param event
*/ */
void DiagramEventInterface::keyPressEvent(QKeyEvent *event) void DiagramEventInterface::keyPressEvent(QKeyEvent *event)

View File

@@ -36,7 +36,7 @@ class Diagram;
This interface work like this : This interface work like this :
You need to create an interface and call diagram::setEventInterface(pointer_of_your_interface). You need to create an interface and call diagram::setEventInterface(pointer_of_your_interface).
When a diagram get an event (mouse or key) if they have an event interface, When a diagram get an event (mouse or key) if they have an event interface,
they send the event (with the status accepted to false) to the interface (for exemple mousePressEvent). they send the event (with the status accepted to false) to the interface (for example mousePressEvent).
If the interface do something with this event, you need to set to true the accepted status of the event, then diagram do nothing. If the interface do something with this event, you need to set to true the accepted status of the event, then diagram do nothing.
When the interface job is done, we need to emit the signal finish(), the diagram use this signal to delete the interface. When the interface job is done, we need to emit the signal finish(), the diagram use this signal to delete the interface.
Be carreful with the destructor, diagram can at any time (even if interface is still running) delete the interface, Be carreful with the destructor, diagram can at any time (even if interface is still running) delete the interface,
@@ -61,7 +61,7 @@ class DiagramEventInterface : public QObject
virtual void init(); virtual void init();
signals: signals:
void finish(); //Emited when the interface finish is job. void finish(); //Emitted when the interface finishes its job.
protected: protected:
QPointer<Diagram> m_diagram; QPointer<Diagram> m_diagram;

View File

@@ -61,7 +61,7 @@ bool DVEventInterface::wheelEvent(QWheelEvent *event) {
/** /**
@brief DVEventInterface::keyPressEvent @brief DVEventInterface::keyPressEvent
By default, press escape key abort the curent action. By default, press escape key abort the current action.
isFinish return true, and emit finish isFinish return true, and emit finish
@param event @param event
@return @return

View File

@@ -29,15 +29,15 @@ class Diagram;
/** /**
@brief The DVEventInterface class @brief The DVEventInterface class
This class is the main interface for manage event of a Diagram View. This class is the main interface for manage event of a Diagram View.
This do nothing, for create new event behavior, This does nothing, to create new event behavior,
we must to create new class from this. we must create new class from this.
Each method return a bool: Each method returns a bool:
True if the methode do something else return false. True if the method does something, else return false.
Each method of DVEventInterface return false; Each method of DVEventInterface returns false;
isRunning() return true if action is started but not finish. isRunning() returns true if action is started but not finished.
By default return false. By default: return false.
isFinish() return true when the action is finish, or not started. isFinish() returns true when the action is finished, or not started.
By default return true. By default: return true.
*/ */
class DVEventInterface : public QObject class DVEventInterface : public QObject
{ {
@@ -59,7 +59,7 @@ class DVEventInterface : public QObject
signals: signals:
/** /**
@brief finish @brief finish
emited when the interface finish is work emitted when the interface finishes its job
*/ */
void finish(); void finish();

View File

@@ -63,7 +63,7 @@ void OpenElmtCommand::redo()
m_scene->addItems(m_graphics_item.toVector()); 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 //Commented because take a lot of time
//when a lot of primitive are loaded //when a lot of primitive are loaded
//need work //need work

View File

@@ -143,7 +143,7 @@ bool ArcEditor::setParts(QList <CustomElementPart *> parts)
/** /**
@brief ArcEditor::currentPart @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 CustomElementPart *ArcEditor::currentPart() const
{ {

View File

@@ -483,8 +483,8 @@ void ScalePartsCommand::adjustText()
/** /**
* @brief changeElementDataCommand::changeElementDataCommand * @brief changeElementDataCommand::changeElementDataCommand
* Change the properties of the drawed element * Change the properties of the drawn element
* @param scene : scene to belong the property * @param scene : scene belonging to the property
* @param old_data : old data * @param old_data : old data
* @param new_data : new data * @param new_data : new data
* @param parent : parent undo command * @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. the bounding rectangle of every selected item.
*/ */
QRectF ElementPrimitiveDecorator::internalBoundingRect() const QRectF ElementPrimitiveDecorator::internalBoundingRect() const
{ {
if (!decorated_items_.count() || !scene()) return(QRectF()); 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")) { if ((decorated_items_.count() == 1) && (decorated_items_.first() -> xmlName() == "line")) {
QRectF horto = decorated_items_.first() -> sceneGeometricRect(); QRectF horto = decorated_items_.first() -> sceneGeometricRect();
if (!horto.width() || !horto.height()) { if (!horto.width() || !horto.height()) {
@@ -102,7 +102,7 @@ void ElementPrimitiveDecorator::paint(QPainter *painter,
painter -> setPen(pen); painter -> setPen(pen);
painter -> drawRect(modified_bounding_rect_); 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 -> setBrush(QBrush(QColor(240, 0, 0, 127)));
// painter -> drawRect(boundingRect()); // painter -> drawRect(boundingRect());
painter -> restore(); painter -> restore();
@@ -349,7 +349,7 @@ void ElementPrimitiveDecorator::saveOriginalBoundingRect()
/** /**
Adjust the effective bounding rect. This method should be called after the 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() void ElementPrimitiveDecorator::adjustEffectiveBoundingRect()
{ {

View File

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

View File

@@ -35,7 +35,7 @@ class QKeyEvent;
class CustomElementGraphicPart; class CustomElementGraphicPart;
/** /**
@brief The ElementScene class @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, It displays the various primitives composing the drawing of the element,
the border due to its fixed size and its hotspot. the border due to its fixed size and its hotspot.
@@ -70,7 +70,7 @@ class ElementScene : public QGraphicsScene
// attributes // attributes
private: 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; QGIManager m_qgi_manager;
QUndoStack m_undo_stack; QUndoStack m_undo_stack;

View File

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

View File

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

View File

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

View File

@@ -606,7 +606,7 @@ QPainterPath PartLine::path() const
//debugPaint(painter); //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)); qreal reduced_line_length = line_length - (length1 * requiredLengthForEndType(first_end));
bool draw_1st_end = first_end && reduced_line_length >= 0; bool draw_1st_end = first_end && reduced_line_length >= 0;
@@ -685,7 +685,7 @@ QPainterPath PartLine::path() const
stop_point = four_points2[0]; 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)) 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); 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 @brief PartPolygon::insertPoint
Insert a point in this polygone Insert a point in this polygon
*/ */
void PartPolygon::insertPoint() void PartPolygon::insertPoint()
{ {

View File

@@ -226,7 +226,7 @@ void DynamicTextFieldEditor::fillInfoComboBox()
else { else {
strl = QETInformation::elementInfoKeys(); 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 //the value of the combo box are always alphabetically sorted
QMap <QString, QString> info_map; QMap <QString, QString> info_map;
for(const QString& str : strl) for(const QString& str : strl)

View File

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

View File

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

View File

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

View File

@@ -29,7 +29,7 @@ ElementFactory* ElementFactory::factory_ = nullptr;
/** /**
@brief ElementFactory::createElement @brief ElementFactory::createElement
@param location create element at this location @param location create element at this location
@param qgi parent item for this elemnt @param qgi parent item for this element
@param state state of the creation @param state state of the creation
@return the element or 0 @return the element or 0
*/ */

View File

@@ -153,7 +153,7 @@ bool ElementPictureFactory::build(const ElementsLocation &location,
{ {
QDomElement dom = location.xml(); QDomElement dom = location.xml();
//Check if the curent version can read the xml description //Check if the current version can read the xml description
if (dom.hasAttribute("version")) if (dom.hasAttribute("version"))
{ {
bool conv_ok; bool conv_ok;
@@ -292,7 +292,7 @@ void ElementPictureFactory::parseLine(const QDomElement &dom, QPainter &painter,
qreal line_length(line.length()); qreal line_length(line.length());
qreal pen_width = painter.pen().widthF(); qreal pen_width = painter.pen().widthF();
//Check if we must to draw extremity //Check if we must draw extremity
bool draw_1st_end, draw_2nd_end; bool draw_1st_end, draw_2nd_end;
qreal reduced_line_length = line_length - (length1 * PartLine::requiredLengthForEndType(first_end)); qreal reduced_line_length = line_length - (length1 * PartLine::requiredLengthForEndType(first_end));
draw_1st_end = first_end && reduced_line_length >= 0; draw_1st_end = first_end && reduced_line_length >= 0;
@@ -322,7 +322,7 @@ void ElementPictureFactory::parseLine(const QDomElement &dom, QPainter &painter,
start_point = four_points1[0]; start_point = four_points1[0];
} }
//Adjust the begining according to the width of the pen //Adjust the beginning according to the width of the pen
if (pen_width && (first_end == Qet::Simple || first_end == Qet::Circle)) { if (pen_width && (first_end == Qet::Simple || first_end == Qet::Circle)) {
start_point = QLineF(start_point, point2).pointAt(pen_width / 2.0 / line_length); start_point = QLineF(start_point, point2).pointAt(pen_width / 2.0 / line_length);
} }
@@ -511,7 +511,7 @@ void ElementPictureFactory::parseText(const QDomElement &dom, QPainter &painter,
QColor text_color(dom.attribute("color", "#000000")); QColor text_color(dom.attribute("color", "#000000"));
//Instanciate a QTextDocument (like the QGraphicsTextItem class) //Instantiate a QTextDocument (like the QGraphicsTextItem class)
//for generate the graphics rendering of the text //for generate the graphics rendering of the text
QTextDocument text_document; QTextDocument text_document;
text_document.setDefaultFont(font_); text_document.setDefaultFont(font_);

View File

@@ -28,8 +28,8 @@ class AddTableDialog;
/** /**
@brief The AddTableDialog class @brief The AddTableDialog class
Provide a dialog used to edit the properties of table befor adding to a diagram. Provide a dialog used to edit the properties of table before adding to a diagram.
The main difference betwen this dialog and the widget used to edit the properties of table The main difference between this dialog and the widget used to edit the properties of table
is that the dialog have two extra check box. is that the dialog have two extra check box.
One for adjust the size of the table to diagram One for adjust the size of the table to diagram
Second for add new tables on new folios if the table can't fit into diagram Second for add new tables on new folios if the table can't fit into diagram

View File

@@ -38,7 +38,7 @@
/** /**
* @brief ProjectPrintWindow::ProjectPrintWindow * @brief ProjectPrintWindow::ProjectPrintWindow
* Use this static function to properly lauch the print dialog. * Use this static function to properly launch the print dialog.
* @param project : project to print * @param project : project to print
* @param format : native format to print in physical printer, or pdf format to export in pdf * @param format : native format to print in physical printer, or pdf format to export in pdf
* @param parent : parent widget * @param parent : parent widget
@@ -242,7 +242,7 @@ void ProjectPrintWindow::printDiagram(Diagram *diagram, bool fit_page, QPainter
qgi->setFlag(QGraphicsItem::ItemIsFocusable, false); qgi->setFlag(QGraphicsItem::ItemIsFocusable, false);
} }
} }
//Disable intercation //Disable interaction
for (auto view : diagram->views()) { for (auto view : diagram->views()) {
view->setInteractive(false); view->setInteractive(false);
} }
@@ -636,7 +636,7 @@ void ProjectPrintWindow::savePageSetupForCurrentPrinter()
/** /**
* @brief ProjectPrintWindow::saveReloadDiagramParameters * @brief ProjectPrintWindow::saveReloadDiagramParameters
* Save or restor the parameter of @diagram * Save or restore the parameter of @diagram
* @param diagram * @param diagram
* @param options * @param options
* @param save * @param save

View File

@@ -36,7 +36,7 @@ class QCheckBox;
/** /**
* @brief The ProjectPrintWindow class * @brief The ProjectPrintWindow class
* Windows used to configur and view diagram befor print * Windows used to configure and view diagram before print
*/ */
class ProjectPrintWindow : public QMainWindow class ProjectPrintWindow : public QMainWindow
{ {

View File

@@ -40,7 +40,7 @@ QDomElement ElementData::toXml(QDomDocument &xml_element) const {
* The tag name of xml_element must be definition * The tag name of xml_element must be definition
* and have an attribute "type" * and have an attribute "type"
* @param xml_element : tagName must be 'definition' * @param xml_element : tagName must be 'definition'
* @return true is successfuly loaded * @return true is successfully loaded
*/ */
bool ElementData::fromXml(const QDomElement &xml_element) bool ElementData::fromXml(const QDomElement &xml_element)
{ {

View File

@@ -36,7 +36,7 @@ class PropertiesInterface
@brief toSettings @brief toSettings
Save properties to setting file. Save properties to setting file.
@param settings : is use for prefix a word @param settings : is use for prefix a word
befor the name of each paramètre before the name of each parameter
@param QString @param QString
*/ */
virtual void toSettings (QSettings &settings, virtual void toSettings (QSettings &settings,
@@ -45,7 +45,7 @@ class PropertiesInterface
@brief fromSettings @brief fromSettings
load properties to setting file. load properties to setting file.
@param settings : is use for prefix a word @param settings : is use for prefix a word
befor the name of each paramètre before the name of each parameter
@param QString @param QString
*/ */
virtual void fromSettings (const QSettings &settings, virtual void fromSettings (const QSettings &settings,

View File

@@ -53,9 +53,9 @@ void TerminalData::setParent(QGraphicsObject* parent)
/** /**
@brief TerminalData::toSettings @brief TerminalData::toSettings
Save properties to setting file. Save properties to settings file.
QString is use for prefix a word befor the name of each paramètre QString is used to prefix a word before the name of each parameter
@param settings UNUSED @param settings UNUSED
@param prefix UNUSED @param prefix UNUSED
*/ */
@@ -68,9 +68,9 @@ void TerminalData::toSettings(QSettings &settings, const QString prefix) const
/** /**
@brief TerminalData::fromSettings @brief TerminalData::fromSettings
load properties to setting file. load properties to settings file.
QString is use for prefix a word befor the name of each paramètre QString is used to prefix a word before the name of each parameter
@param settings UNUSED @param settings UNUSED
@param prefix UNUSED @param prefix UNUSED
*/ */
@@ -87,7 +87,7 @@ void TerminalData::fromSettings(const QSettings &settings, const QString prefix)
to xml_element to xml_element
@note This method is only called from the PartTerminal @note This method is only called from the PartTerminal
and should never called from the Terminal class and should never be called from the Terminal class
@param xml_document @param xml_document
@return xml_element : DomElement with @return xml_element : DomElement with
the name, number, position and orientation of the terminal the name, number, position and orientation of the terminal
@@ -115,7 +115,7 @@ QDomElement TerminalData::toXml(QDomDocument &xml_document) const
load properties to xml element load properties to xml element
@note This method is only called from the PartTerminal @note This method is only called from the PartTerminal
and should never called from the Terminal class and should never be called from the Terminal class
@param xml_element @param xml_element
@return true if succeeded / false if the attribute is not real @return true if succeeded / false if the attribute is not real
*/ */

View File

@@ -68,7 +68,7 @@ QDomElement UserProperties::toXml(QDomDocument &xml_document) const
* @brief UserProperties::fromXml * @brief UserProperties::fromXml
* @param xml_element * @param xml_element
* @return load user properties from xml * @return load user properties from xml
* Take car befor use this function that the tagName of this class * Take care before using this function that the tagName of this class
* is the same as the tag of xml_element given in parameter. * is the same as the tag of xml_element given in parameter.
*/ */
bool UserProperties::fromXml(const QDomElement &xml_element) bool UserProperties::fromXml(const QDomElement &xml_element)

View File

@@ -163,7 +163,7 @@ bool XRefProperties::fromXml(const QDomElement &xml_element) {
/** /**
@brief XRefProperties::defaultProperties @brief XRefProperties::defaultProperties
@return the default properties stored in the setting file @return the default properties stored in the setting file
For the xref, there is 2 propreties. For the xref, there are 2 properties.
For coil, stored with the string "coil" in the returned QHash. For coil, stored with the string "coil" in the returned QHash.
For protection, stored with the string "protection" in the returned QHash. For protection, stored with the string "protection" in the returned QHash.
*/ */

View File

@@ -177,7 +177,7 @@ QVariant ProjectDBModel::data(const QModelIndex &index, int role) const
/** /**
@brief ProjectDBModel::setQuery @brief ProjectDBModel::setQuery
Query the internall bd with query. Query the internal bd with query.
@param query @param query
*/ */
void ProjectDBModel::setQuery(const QString &query) void ProjectDBModel::setQuery(const QString &query)

View File

@@ -34,7 +34,7 @@ class QETProject;
void ProjectDBModel::setQuery(const QString &query). void ProjectDBModel::setQuery(const QString &query).
The indentifier method is used by widget editor to retrieve The indentifier method is used by widget editor to retrieve
the good widget for edit the query. the good widget for edit the query.
By defaut identifer return the string 'unknow'. By default identifer returns the string 'unknow'.
You should use setIdentfier method to set your custom identifier. You should use setIdentfier method to set your custom identifier.
At the time this sentence is written, there is two identifier : At the time this sentence is written, there is two identifier :
nomenclature nomenclature

View File

@@ -39,7 +39,7 @@ QetGraphicsHeaderItem::QetGraphicsHeaderItem(QGraphicsItem *parent) :
@brief QetGraphicsHeaderItem::setModel @brief QetGraphicsHeaderItem::setModel
Set the model presented by this item Set the model presented by this item
Since QetGraphicsHeaderItem don't take ownership of model, Since QetGraphicsHeaderItem don't take ownership of model,
if item already have a model, it's your responsability to delete it. if item already have a model, it's your responsibility to delete it.
@param model @param model
*/ */
void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model) void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model)

View File

@@ -32,7 +32,7 @@ class QAbstractItemModel;
Margins, to edit the margin between the cell and the text. Margins, to edit the margin between the cell and the text.
Text font. Text font.
Text alignment in the cell Text alignment in the cell
These three parameters are not settable directly with the header but trough the model to be displayed by the header. These three parameters are not settable directly with the header but through the model to be displayed by the header.
Header search these parameters only in the section 0 for cell of header. Header search these parameters only in the section 0 for cell of header.
By consequence, set data in other section is useless also these parameter can't be set individually for each cell. By consequence, set data in other section is useless also these parameter can't be set individually for each cell.
The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString

View File

@@ -34,7 +34,7 @@ class QetGraphicsHeaderItem;
Margins, to edit the margin between the cell and the text. Margins, to edit the margin between the cell and the text.
Text font. Text font.
Text alignment in the cell Text alignment in the cell
These three parameters are not settable directly with the table but trough the model to be displayed by the table. These three parameters are not settable directly with the table but through the model to be displayed by the table.
The table search these parameters only in the index(0,0) for all the table. The table search these parameters only in the index(0,0) for all the table.
By consequence, set data in other index than 0,0 is useless also these parameter can't be set individually for each cell. By consequence, set data in other index than 0,0 is useless also these parameter can't be set individually for each cell.
The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString

View File

@@ -92,13 +92,13 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) :
setZValue(11); setZValue(11);
m_previous_z_value = zValue(); m_previous_z_value = zValue();
//Add this conductor to the list of conductor of each of the two terminal //Add this conductor to the list of conductors of each of the two terminals
bool ajout_p1 = terminal1 -> addConductor(this); bool ajout_p1 = terminal1 -> addConductor(this);
bool ajout_p2 = terminal2 -> addConductor(this); bool ajout_p2 = terminal2 -> addConductor(this);
//m_valid become false if the conductor can't be added to terminal (conductor already exist) //m_valid become false if the conductor can't be added to terminal (conductor already exist)
m_valid = (!ajout_p1 || !ajout_p2) ? false : true; m_valid = (!ajout_p1 || !ajout_p2) ? false : true;
//Default attribut for paint a conductor //Default attribute to paint a conductor
if (!pen_and_brush_initialized) if (!pen_and_brush_initialized)
{ {
conductor_pen.setJoinStyle(Qt::MiterJoin); conductor_pen.setJoinStyle(Qt::MiterJoin);
@@ -111,7 +111,7 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) :
pen_and_brush_initialized = true; pen_and_brush_initialized = true;
} }
//By default, the 4 profils are nuls -> we must to use priv_calculeConductor //By default, the 4 profiles are nuls -> we must use priv_calculeConductor
conductor_profiles.insert(Qt::TopLeftCorner, ConductorProfile()); conductor_profiles.insert(Qt::TopLeftCorner, ConductorProfile());
conductor_profiles.insert(Qt::TopRightCorner, ConductorProfile()); conductor_profiles.insert(Qt::TopRightCorner, ConductorProfile());
conductor_profiles.insert(Qt::BottomLeftCorner, ConductorProfile()); conductor_profiles.insert(Qt::BottomLeftCorner, ConductorProfile());
@@ -135,7 +135,7 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) :
/** /**
@brief Conductor::~Conductor @brief Conductor::~Conductor
Destructor. The conductor is removed from is terminal Destructor. The conductor is removed from its terminal
*/ */
Conductor::~Conductor() Conductor::~Conductor()
{ {
@@ -847,7 +847,7 @@ void Conductor::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphics
saveProfile(); saveProfile();
has_to_save_profile = false; has_to_save_profile = false;
} }
//When handler is released, the conductor can have more segment than befor the handler was moved //When handler is released, the conductor can have more segment than before the handler was moved
//then we remove all handles and new ones are added //then we remove all handles and new ones are added
removeHandler(); removeHandler();
addHandler(); addHandler();
@@ -1036,7 +1036,7 @@ QDomElement Conductor::toXml(QDomDocument &dom_document,
// Terminal is uniquely identified by the uuid of the terminal and the element // Terminal is uniquely identified by the uuid of the terminal and the element
if (terminal1->uuid().isNull()) { if (terminal1->uuid().isNull()) {
// legacy method to identify the terminal // legacy method to identify the terminal
dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compability dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compatibility
} else { } else {
dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString()); dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString());
dom_element.setAttribute("terminal1", terminal1->uuid().toString()); dom_element.setAttribute("terminal1", terminal1->uuid().toString());
@@ -1044,7 +1044,7 @@ QDomElement Conductor::toXml(QDomDocument &dom_document,
if (terminal2->uuid().isNull()) { if (terminal2->uuid().isNull()) {
// legacy method to identify the terminal // legacy method to identify the terminal
dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compability dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compatibility
} else { } else {
dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString()); dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString());
dom_element.setAttribute("terminal2", terminal2->uuid().toString()); dom_element.setAttribute("terminal2", terminal2->uuid().toString());
@@ -1242,7 +1242,7 @@ QPointF Conductor::posForText(Qt::Orientations &flag)
bool all_segment_is_vertical = true; bool all_segment_is_vertical = true;
bool all_segment_is_horizontal = true; bool all_segment_is_horizontal = true;
//Go to first segement //Go to first segment
while (!segment->isFirstSegment()) { while (!segment->isFirstSegment()) {
segment = segment->previousSegment(); segment = segment->previousSegment();
} }
@@ -1265,7 +1265,7 @@ QPointF Conductor::posForText(Qt::Orientations &flag)
if (segment -> firstPoint().y() != segment -> secondPoint().y()) if (segment -> firstPoint().y() != segment -> secondPoint().y())
all_segment_is_horizontal = false; all_segment_is_horizontal = false;
//We must to compare length segment, but they can be negative //We must compare length segment, but they can be negative
//so we multiply by -1 to make it positive. //so we multiply by -1 to make it positive.
int saved = biggest_segment -> length(); int saved = biggest_segment -> length();
if (saved < 0) saved *= -1; if (saved < 0) saved *= -1;
@@ -1517,7 +1517,7 @@ QPainterPath Conductor::path() const
@brief Conductor::setPropertiesToPotential @brief Conductor::setPropertiesToPotential
@param property @param property
@param only_text @param only_text
Set propertie to conductor and every conductors in Set property to conductor and every conductors in
the same potential of conductor. the same potential of conductor.
If only_text is true only formula, text, If only_text is true only formula, text,
function and tension/protocol is set function and tension/protocol is set
@@ -1760,7 +1760,7 @@ void Conductor::setUpConnectionForFormula(QString old_formula, QString new_formu
if (diagram()) if (diagram())
{ {
//Because the variable %F is a reference to another text which can contain variables, //Because the variable %F is a reference to another text which can contain variables,
//we must to replace %F by the real text, to check if the real text contain the variable %id //we must replace %F by the real text, to check if the real text contains the variable %id
if (old_formula.contains("%F")) if (old_formula.contains("%F"))
old_formula.replace("%F", diagram()->border_and_titleblock.folio()); old_formula.replace("%F", diagram()->border_and_titleblock.folio());
@@ -2063,8 +2063,8 @@ Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram)
@brief relatedConductors @brief relatedConductors
@param conductor @param conductor
@return return all conductors who share the same terminals @return return all conductors who share the same terminals
of conductor given as parametre, of conductor given as parameter,
except conductor himself. except conductor itself.
*/ */
QList <Conductor *> relatedConductors(const Conductor *conductor) { QList <Conductor *> relatedConductors(const Conductor *conductor) {
QList<Conductor *> other_conductors_list = conductor -> terminal1 -> conductors(); QList<Conductor *> other_conductors_list = conductor -> terminal1 -> conductors();

View File

@@ -188,7 +188,7 @@ class Conductor : public QGraphicsObject
ConductorTextItem *m_text_item; ConductorTextItem *m_text_item;
/// Segments composing the conductor /// Segments composing the conductor
ConductorSegment *segments; ConductorSegment *segments;
/// Attributs related to mouse interaction /// Attributes related to mouse interaction
bool m_moving_segment; bool m_moving_segment;
int moved_point; int moved_point;
qreal m_previous_z_value; qreal m_previous_z_value;

View File

@@ -165,7 +165,7 @@ QPainterPath CrossRefItem::shape() const{
@param add_prefix @param add_prefix
@return the string corresponding to the position of elmt in the diagram. @return the string corresponding to the position of elmt in the diagram.
if add_prefix is true, if add_prefix is true,
prefix (for power and delay contact) is added to the poistion text. prefix (for power and delay contact) is added to the position text.
*/ */
QString CrossRefItem::elementPositionText( QString CrossRefItem::elementPositionText(
const Element *elmt, const bool &add_prefix) const const Element *elmt, const bool &add_prefix) const
@@ -190,7 +190,7 @@ QString CrossRefItem::elementPositionText(
/** /**
@brief CrossRefItem::updateProperties @brief CrossRefItem::updateProperties
update the curent properties update the current properties
*/ */
void CrossRefItem::updateProperties() void CrossRefItem::updateProperties()
{ {
@@ -247,7 +247,7 @@ void CrossRefItem::updateLabel()
/** /**
@brief CrossRefItem::autoPos @brief CrossRefItem::autoPos
Calculate and set position automaticaly. Calculate and set position automatically.
*/ */
void CrossRefItem::autoPos() void CrossRefItem::autoPos()
{ {
@@ -546,7 +546,7 @@ void CrossRefItem::setUpCrossBoundingRect(QPainter &painter)
} }
//Adjust according to the NC //Adjust according to the NC
if (nc_bounding.height() > default_bounding.height() - header) if (nc_bounding.height() > default_bounding.height() - header)
default_bounding.setHeight(nc_bounding.height() + header); //adjust the heigth default_bounding.setHeight(nc_bounding.height() + header); //adjust the height
if (nc_bounding.width() > default_bounding.width()/2) if (nc_bounding.width() > default_bounding.width()/2)
default_bounding.setWidth(nc_bounding.width()*2);//adjust the width default_bounding.setWidth(nc_bounding.width()*2);//adjust the width
@@ -660,7 +660,7 @@ QRectF CrossRefItem::drawContact(QPainter &painter, int flags, Element *elmt)
painter.drawLine(0, offset+6, 8, offset+6); painter.drawLine(0, offset+6, 8, offset+6);
painter.drawLine(16, offset+6, 24, offset+6); painter.drawLine(16, offset+6, 24, offset+6);
///take exemple of this code for display the terminal text ///take example of this code for display the terminal text
/*QFont font = QETApp::diagramTextsFont(4); /*QFont font = QETApp::diagramTextsFont(4);
font.setBold(true); font.setBold(true);
painter.setFont(font); painter.setFont(font);
@@ -986,11 +986,11 @@ void CrossRefItem::AddExtraInfo(QPainter &painter, const QString& type)
/** /**
@brief CrossRefItem::NOElements @brief CrossRefItem::NOElements
@return The linked elements of m_element wich are open or switch contact. @return The linked elements of m_element which are open or switch contact.
If linked element is a power contact, If linked element is a power contact,
xref propertie is set to don't show power contact xref property is set to not show power contact
and this cross item must be drawed as cross, and this cross item must be drawn as a cross,
the element is not append in the list. the element is not appended in the list.
*/ */
QList<Element *> CrossRefItem::NOElements() const QList<Element *> CrossRefItem::NOElements() const
{ {
@@ -998,8 +998,8 @@ QList<Element *> CrossRefItem::NOElements() const
foreach (Element *elmt, m_element->linkedElements()) foreach (Element *elmt, m_element->linkedElements())
{ {
//We continue if element is a power contact and xref propertie //We continue if element is a power contact and xref property
//is set to don't show power contact //is set to not show power contact
if (m_properties.displayHas() == XRefProperties::Cross && if (m_properties.displayHas() == XRefProperties::Cross &&
!m_properties.showPowerContact() && !m_properties.showPowerContact() &&
elmt -> kindInformations()["type"].toString() == "power") elmt -> kindInformations()["type"].toString() == "power")
@@ -1018,12 +1018,12 @@ QList<Element *> CrossRefItem::NOElements() const
/** /**
@brief CrossRefItem::NCElements @brief CrossRefItem::NCElements
@return The linked elements of m_element wich are close @return The linked elements of m_element which are close
or switch contact or switch contact
If linked element is a power contact, If linked element is a power contact,
xref propertie is set to don't show power contact xref property is set to not show power contact
and this cross item must be drawed as cross, and this cross item must be drawn as a cross,
the element is not append in the list. the element is not appended in the list.
*/ */
QList<Element *> CrossRefItem::NCElements() const QList<Element *> CrossRefItem::NCElements() const
{ {
@@ -1031,8 +1031,8 @@ QList<Element *> CrossRefItem::NCElements() const
foreach (Element *elmt, m_element->linkedElements()) foreach (Element *elmt, m_element->linkedElements())
{ {
//We continue if element is a power contact and xref propertie //We continue if element is a power contact and xref property
//is set to don't show power contact //is set to not show power contact
if (m_properties.displayHas() == XRefProperties::Cross && if (m_properties.displayHas() == XRefProperties::Cross &&
!m_properties.showPowerContact() && !m_properties.showPowerContact() &&
elmt -> kindInformations()["type"].toString() == "power") elmt -> kindInformations()["type"].toString() == "power")

View File

@@ -32,11 +32,11 @@ class ElementTextItemGroup;
@brief The CrossRefItem class @brief The CrossRefItem class
This clas provide an item, for show the cross reference, This clas provide an item, for show the cross reference,
like the contacts linked to a coil. like the contacts linked to a coil.
The item setpos automaticaly when parent move. The item setpos automatically when parent move.
All slave displayed in cross ref will be updated All slave displayed in cross ref will be updated
when folio position change in the project. when folio position change in the project.
It's the responsability of the master element It's the responsibility of the master element
to informe displayed slave are moved, to inform displayed slave are moved,
by calling the slot updateLabel by calling the slot updateLabel
By default master element is the parent graphics item of this Xref, By default master element is the parent graphics item of this Xref,
but if the Xref must be snap to the label of master, but if the Xref must be snap to the label of master,

View File

@@ -83,7 +83,7 @@ void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *
/** /**
@brief DiagramImageItem::editProperty @brief DiagramImageItem::editProperty
Open the approriate dialog to edit this image Open the appropriate dialog to edit this image
*/ */
void DiagramImageItem::editProperty() void DiagramImageItem::editProperty()
{ {
@@ -129,9 +129,9 @@ QString DiagramImageItem::name() const
/** /**
@brief DiagramImageItem::fromXml @brief DiagramImageItem::fromXml
Load this image fro xml elemebt e Load this image from xml element e
@param e @param e
@return true if succesfully load. @return true if successfully loaded.
*/ */
bool DiagramImageItem::fromXml(const QDomElement &e) bool DiagramImageItem::fromXml(const QDomElement &e)
{ {

View File

@@ -236,11 +236,11 @@ bool DiagramTextItem::isHtml() const
/** /**
@brief DiagramTextItem::paint @brief DiagramTextItem::paint
Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. Draw this text field. This method draws the text by calling QGraphicsTextItem::paint.
If text is hovered, this method draw the bounding rect in grey If text is hovered, this method draws the bounding rect in grey
@param painter : painter to use @param painter : painter to use
@param option : style option @param option : style option
@param widget : widget where must to draw @param widget : widget that is drawn to
*/ */
void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{ {
@@ -413,7 +413,7 @@ void DiagramTextItem::prepareAlignment()
/** /**
@brief DiagramTextItem::finishAlignment @brief DiagramTextItem::finishAlignment
Call this function after changing the bouding rect of this text Call this function after changing the bounding rect of this text
to set the position of this text according to the alignment property. to set the position of this text according to the alignment property.
*/ */
void DiagramTextItem::finishAlignment() void DiagramTextItem::finishAlignment()

View File

@@ -475,9 +475,9 @@ void DynamicElementTextItem::setCompositeText(const QString &text)
if (m_parent_element && (m_parent_element.data()->linkType() & Element::AllReport)) //special treatment for report if (m_parent_element && (m_parent_element.data()->linkType() & Element::AllReport)) //special treatment for report
{ {
/* /*
* May be in some case the old and new composite text have both the var %{label}, * May be in some case the old and new composite text both have the var %{label},
* and so we don't have to remove connection and after set conection, * and so we don't have to remove connection and after set connection,
* but for that we must to do several check and because I'm lazy, * but for that we must do several checks and because I'm lazy,
* in every case I remove connection and set it after ;) * in every case I remove connection and set it after ;)
*/ */
if(old_composite_text.contains("%{label}")) if(old_composite_text.contains("%{label}"))
@@ -691,7 +691,7 @@ void DynamicElementTextItem::paint(QPainter *painter, const QStyleOptionGraphics
QVariant DynamicElementTextItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) QVariant DynamicElementTextItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value)
{ {
//The first time this text is added to a scene, we make several cheking and connection //The first time this text is added to a scene, we make several checking and connection
//according to the link type of the parent element //according to the link type of the parent element
if(change == QGraphicsItem::ItemSceneHasChanged && m_first_scene_change) if(change == QGraphicsItem::ItemSceneHasChanged && m_first_scene_change)
{ {
@@ -785,7 +785,7 @@ void DynamicElementTextItem::elementInfoChanged()
if (m_text_from == ElementInfo) if (m_text_from == ElementInfo)
{ {
//If the info is the label, then we must to make some connection //If the info is the label, then we must make some connection
//if the label is created from a formula //if the label is created from a formula
if(m_info_name == "label") if(m_info_name == "label")
{ {
@@ -801,7 +801,7 @@ void DynamicElementTextItem::elementInfoChanged()
} }
else if (m_text_from == CompositeText) else if (m_text_from == CompositeText)
{ {
//If the composite have the label variable, we must to make some //If the composite have the label variable, we must make some
//connection if the label is created from a formula //connection if the label is created from a formula
if (m_composite_text.contains("%{label}")) if (m_composite_text.contains("%{label}"))
setupFormulaConnection(); setupFormulaConnection();
@@ -911,7 +911,7 @@ void DynamicElementTextItem::setConnectionForReportFormula(const QString &formul
Diagram *other_diagram = m_other_report.data()->diagram(); Diagram *other_diagram = m_other_report.data()->diagram();
//Because the variable %F is a reference to another text which can contain variables, //Because the variable %F is a reference to another text which can contain variables,
//we must to replace %F by the real text, to check if the real text contain the variable %id //we must replace %F by the real text, to check if the real text contains the variable %id
if (other_diagram && string.contains("%F")) if (other_diagram && string.contains("%F"))
{ {
m_F_str = other_diagram->border_and_titleblock.folio(); m_F_str = other_diagram->border_and_titleblock.folio();
@@ -940,7 +940,7 @@ void DynamicElementTextItem::removeConnectionForReportFormula(const QString &for
Diagram *other_diagram = m_other_report.data()->diagram(); Diagram *other_diagram = m_other_report.data()->diagram();
//Because the variable %F is a reference to another text which can contain variables, //Because the variable %F is a reference to another text which can contain variables,
//we must to replace %F by the real text, to check if the real text contain the variable %id //we must replace %F with the real text, to check if the real text contains the variable %id
if (other_diagram && string.contains("%F")) if (other_diagram && string.contains("%F"))
{ {
string.replace("%F", m_F_str); string.replace("%F", m_F_str);

View File

@@ -78,7 +78,7 @@ 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 instantiation
@param link_type @param link_type
*/ */
Element::Element( Element::Element(
@@ -238,7 +238,7 @@ void Element::paint(
painter->drawPicture(0, 0, m_picture); painter->drawPicture(0, 0, m_picture);
} }
painter->restore(); //Restor the QPainter after use drawPicture painter->restore(); //Restorr the QPainter after use drawPicture
//Draw the selection rectangle //Draw the selection rectangle
if ( isSelected() || m_mouse_over ) { if ( isSelected() || m_mouse_over ) {
@@ -426,7 +426,7 @@ bool Element::buildFromXml(const QDomElement &xml_def_elmt, int *state)
return(false); return(false);
} }
//Check if the curent version can read the xml description //Check if the current version can read the xml description
if (xml_def_elmt.hasAttribute(QStringLiteral("version"))) if (xml_def_elmt.hasAttribute(QStringLiteral("version")))
{ {
bool conv_ok; bool conv_ok;
@@ -627,7 +627,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 described in dom_element
@param dom_element @param dom_element
@return @return
*/ */
@@ -637,7 +637,7 @@ DynamicElementTextItem *Element::parseDynamicText(
DynamicElementTextItem *deti = new DynamicElementTextItem(this); DynamicElementTextItem *deti = new DynamicElementTextItem(this);
//Because the xml description of a .elmt file is the same as how a dynamic text field is save to xml in a .qet file //Because the xml description of a .elmt file is the same as how a dynamic text field is save to xml in a .qet file
//wa call fromXml, we just change the tagg name (.elmt = dynamic_text, .qet = dynamic_elmt_text) //wa call fromXml, we just change the tagg name (.elmt = dynamic_text, .qet = dynamic_elmt_text)
//and the uuid (because the uuid, is the uuid of the descritpion and not the uuid of instantiated dynamic text field) //and the uuid (because the uuid, is the uuid of the description and not the uuid of instantiated dynamic text field)
QDomElement dom(dom_element.cloneNode(true).toElement()); QDomElement dom(dom_element.cloneNode(true).toElement());
dom.setTagName(DynamicElementTextItem::xmlTagName()); dom.setTagName(DynamicElementTextItem::xmlTagName());
@@ -664,7 +664,7 @@ Terminal *Element::parseTerminal(const QDomElement &dom_element)
Terminal *new_terminal = new Terminal(data, this); Terminal *new_terminal = new Terminal(data, this);
m_terminals << new_terminal; m_terminals << new_terminal;
//Sort from top to bottom and left to rigth //Sort from top to bottom and left to right
std::sort(m_terminals.begin(), std::sort(m_terminals.begin(),
m_terminals.end(), m_terminals.end(),
[](Terminal *a, [](Terminal *a,
@@ -747,7 +747,7 @@ bool Element::fromXml(QDomElement &e,
} }
//Check that associated id/adress doesn't conflict with table_id_adr //Check that associated id/address doesn't conflict with table_id_adr
for(auto found_id : priv_id_adr.keys()) for(auto found_id : priv_id_adr.keys())
{ {
if (table_id_adr.contains(found_id)) if (table_id_adr.contains(found_id))
@@ -758,7 +758,7 @@ bool Element::fromXml(QDomElement &e,
} }
} }
//Copie the association id/adress //Copie the association id/address
for(auto found_id : priv_id_adr.keys()) { for(auto found_id : priv_id_adr.keys()) {
table_id_adr.insert(found_id, table_id_adr.insert(found_id,
priv_id_adr.value(found_id)); priv_id_adr.value(found_id));
@@ -813,7 +813,7 @@ bool Element::fromXml(QDomElement &e,
} }
setRotation(90*read_ori); setRotation(90*read_ori);
//Befor load the dynamic text field, //Before loading the dynamic text field,
//we remove the dynamic text field created from the description of this element, to avoid doublons. //we remove the dynamic text field created from the description of this element, to avoid doublons.
for(DynamicElementTextItem *deti : m_dynamic_text_list) for(DynamicElementTextItem *deti : m_dynamic_text_list)
delete deti; delete deti;
@@ -869,7 +869,7 @@ bool Element::fromXml(QDomElement &e,
} }
} }
//We must to block the update of the alignment when load the information //We must block the update of the alignment when loading the information
//otherwise the pos of the text will not be the same as it was at save time. //otherwise the pos of the text will not be the same as it was at save time.
for(DynamicElementTextItem *deti : m_dynamic_text_list) for(DynamicElementTextItem *deti : m_dynamic_text_list)
deti->m_block_alignment = true; deti->m_block_alignment = true;
@@ -1025,7 +1025,7 @@ QDomElement Element::toXml(
for(DynamicElementTextItem *deti : deti_list) for(DynamicElementTextItem *deti : deti_list)
group->addToGroup(deti); group->addToGroup(deti);
//Restor the alignement //Restorr the alignment
group->setAlignment(al); group->setAlignment(al);
//Save the group to xml //Save the group to xml
@@ -1216,7 +1216,7 @@ QList<ElementTextItemGroup *> Element::textGroups() const
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 successfully added to the group.
*/ */
bool Element::addTextToGroup(DynamicElementTextItem *text, bool Element::addTextToGroup(DynamicElementTextItem *text,
ElementTextItemGroup *group) ElementTextItemGroup *group)
@@ -1239,7 +1239,7 @@ bool Element::addTextToGroup(DynamicElementTextItem *text,
@brief Element::removeTextFromGroup @brief Element::removeTextFromGroup
Remove the text text from the group group, Remove the text text from the group group,
en reparent text to this element en reparent text to this element
@return true if text was succesfully removed @return true if text was successfully removed
*/ */
bool Element::removeTextFromGroup(DynamicElementTextItem *text, bool Element::removeTextFromGroup(DynamicElementTextItem *text,
ElementTextItemGroup *group) ElementTextItemGroup *group)
@@ -1568,7 +1568,7 @@ void Element::freezeNewAddedElement()
/** /**
@brief Element::actualLabel @brief Element::actualLabel
Always return the current label to be displayed. Always return the current label to be displayed.
This function is usefull when label is based on formula, because label can change at any time. This function is useful when label is based on formula, because label can change at any time.
@return @return
*/ */
QString Element::actualLabel() QString Element::actualLabel()

View File

@@ -79,7 +79,7 @@ class Element : public QetGraphicsItem
int type() const override { return Type; } int type() const override { return Type; }
signals: signals:
void linkedElementChanged(); //This signal is emited when the linked elements with this element change void linkedElementChanged(); //This signal is emitted when the linked elements with this element change
void elementInfoChange( void elementInfoChange(
DiagramContext old_info, DiagramContext old_info,
DiagramContext new_info); DiagramContext new_info);

View File

@@ -72,7 +72,7 @@ void ElementTextItemGroup::addToGroup(QGraphicsItem *item)
{ {
if(item->type() == DynamicElementTextItem::Type) if(item->type() == DynamicElementTextItem::Type)
{ {
//Befor add text to this group we must to set the text at the same rotation of this group //Before adding text to this group we must set the text at the same rotation of this group
if((item->rotation() != rotation()) && !m_block_alignment_update) if((item->rotation() != rotation()) && !m_block_alignment_update)
item->setRotation(rotation()); item->setRotation(rotation());
@@ -111,8 +111,8 @@ void ElementTextItemGroup::addToGroup(QGraphicsItem *item)
void ElementTextItemGroup::removeFromGroup(QGraphicsItem *item) void ElementTextItemGroup::removeFromGroup(QGraphicsItem *item)
{ {
QGraphicsItemGroup::removeFromGroup(item); QGraphicsItemGroup::removeFromGroup(item);
//the item transformation is not reseted, we must to do it, //the item transformation is not reset, we must do it ourselves,
// because for exemple if the group rotation is 45° // because for example if the group rotation is 45°
//When item is removed from group, //When item is removed from group,
// visually the item is unchanged (so 45°) // visually the item is unchanged (so 45°)
// but if we call item->rotation() the returned value is 0. // but if we call item->rotation() the returned value is 0.
@@ -257,7 +257,7 @@ void ElementTextItemGroup::updateAlignment()
} }
} }
//Restor the rotation //Restore the rotation
setRotation(rotation_); setRotation(rotation_);
if(m_Xref_item) if(m_Xref_item)
@@ -309,7 +309,7 @@ void ElementTextItemGroup::setHoldToBottomPage(bool hold)
{ {
//We use timer to let the time of the parent element //We use timer to let the time of the parent element
// xref to be updated, // xref to be updated,
// befor update the position of this group // before updating the position of this group
//because the position of this group is related //because the position of this group is related
// to the size of the parent element Xref // to the size of the parent element Xref
m_linked_changed_timer = connect( m_linked_changed_timer = connect(

View File

@@ -86,7 +86,7 @@ void MasterElement::unlinkAllElements()
/** /**
@brief MasterElement::unlinkElement @brief MasterElement::unlinkElement
Unlink the given elmt in parametre Unlink the given element in parameter
@param elmt element to unlink from this @param elmt element to unlink from this
*/ */
void MasterElement::unlinkElement(Element *elmt) void MasterElement::unlinkElement(Element *elmt)
@@ -159,7 +159,7 @@ void MasterElement::xrefPropertiesChanged()
If Xref item is deleted or already not used (nullptr) return true; If Xref item is deleted or already not used (nullptr) return true;
Else return false if Xref item is used Else return false if Xref item is used
NOTICE : Xref can display nothing but not be deleted so far. NOTICE : Xref can display nothing but not be deleted so far.
For exemple, if Xref is display has cross, only power contact are linked and For example, if Xref is display has cross, only power contact are linked and
option show power contact is disable, the cross isn't draw. option show power contact is disable, the cross isn't draw.
@return @return
*/ */

View File

@@ -33,7 +33,7 @@ class QetGraphicsItem : public QGraphicsObject
QetGraphicsItem(QGraphicsItem *parent = nullptr); QetGraphicsItem(QGraphicsItem *parent = nullptr);
~QetGraphicsItem() override = 0; ~QetGraphicsItem() override = 0;
//public methode //public method
Diagram *diagram () const; Diagram *diagram () const;
virtual void setPos (const QPointF &p); virtual void setPos (const QPointF &p);
virtual void setPos (qreal x, qreal y); virtual void setPos (qreal x, qreal y);

View File

@@ -212,7 +212,7 @@ int QetShapeItem::pointsCount() const
/** /**
@brief QetShapeItem::setNextPoint @brief QetShapeItem::setNextPoint
Add a new point to the curent polygon Add a new point to the current polygon
@param P the new point. @param P the new point.
*/ */
void QetShapeItem::setNextPoint(QPointF P) void QetShapeItem::setNextPoint(QPointF P)
@@ -994,7 +994,7 @@ void QetShapeItem::editProperty()
/** /**
@brief QetShapeItem::name @brief QetShapeItem::name
@return the name of the curent shape. @return the name of the current shape.
*/ */
QString QetShapeItem::name() const QString QetShapeItem::name() const
{ {

View File

@@ -65,13 +65,13 @@ bool centerToBottomDiagram (QGraphicsItem *item_to_center, Element *element_to_f
point.setY(border.bottom() - item_to_center -> boundingRect().height() - offset ); point.setY(border.bottom() - item_to_center -> boundingRect().height() - offset );
point.rx() -= (item_to_center -> boundingRect().width()/2); point.rx() -= (item_to_center -> boundingRect().width()/2);
//Apply the difference between the pos() of item and his bounding rect //Apply the difference between the pos() of item and its bounding rect
QPointF tl = item_to_center->boundingRect().topLeft(); QPointF tl = item_to_center->boundingRect().topLeft();
point.rx() -= tl.x(); point.rx() -= tl.x();
point.ry() -= tl.y(); point.ry() -= tl.y();
item_to_center -> setPos(0,0); //Due to a weird behavior or bug, before set the new position and rotation, item_to_center -> setPos(0,0); //Due to a weird behavior or bug, before setting the new position and rotation,
item_to_center -> setRotation(0); //we must to set the position and rotation at 0. item_to_center -> setRotation(0); //we must set the position and rotation to 0.
item_to_center->setPos(item_to_center->mapFromScene(point)); item_to_center->setPos(item_to_center->mapFromScene(point));

View File

@@ -84,7 +84,7 @@ void SlaveElement::unlinkAllElements()
/** /**
@brief SlaveElement::unlinkElement @brief SlaveElement::unlinkElement
Unlink the given elmt in parametre Unlink the given element in parameter
@param elmt @param elmt
*/ */
void SlaveElement::unlinkElement(Element *elmt) void SlaveElement::unlinkElement(Element *elmt)

View File

@@ -475,7 +475,7 @@ void QETTitleBlockTemplateEditor::initMenus()
} }
/** /**
Initalize toolbars. Initialize toolbars.
*/ */
void QETTitleBlockTemplateEditor::initToolbars() void QETTitleBlockTemplateEditor::initToolbars()
{ {

View File

@@ -101,7 +101,7 @@ void TitleBlockTemplateLocationSaver::updateTemplates()
} }
/** /**
Enable or diable the "new name" text field depending of the selected Enable or disable the "new name" text field depending of the selected
template. template.
*/ */
void TitleBlockTemplateLocationSaver::updateNewName() void TitleBlockTemplateLocationSaver::updateNewName()

View File

@@ -561,7 +561,7 @@ QString TitleBlockTemplatesFilesCollection::toFileName(const QString &template_n
} }
/** /**
Handle the changes occuring on the file system. Handle the changes occurring on the file system.
@param str Path of the directory that changed. @param str Path of the directory that changed.
*/ */
void TitleBlockTemplatesFilesCollection::fileSystemChanged(const QString &str) { void TitleBlockTemplatesFilesCollection::fileSystemChanged(const QString &str) {

View File

@@ -259,7 +259,7 @@ void TitleBlockTemplateView::paste()
TitleBlockCell *erased_cell = selected_cell -> cell(); TitleBlockCell *erased_cell = selected_cell -> cell();
if (!erased_cell) return; if (!erased_cell) return;
// change num_row and num_col attributes of pasted cells so they get positionned relatively to selected_cell // change num_row and num_col attributes of pasted cells so they get positioned relatively to selected_cell
normalizeCells(pasted_cells, erased_cell -> num_row, erased_cell -> num_col); normalizeCells(pasted_cells, erased_cell -> num_row, erased_cell -> num_col);
PasteTemplateCellsCommand *paste_command = new PasteTemplateCellsCommand(tbtemplate_); PasteTemplateCellsCommand *paste_command = new PasteTemplateCellsCommand(tbtemplate_);
@@ -657,7 +657,7 @@ void TitleBlockTemplateView::applyColumnsWidths(bool animate) {
total_width_helper_cell_ -> split_background_color = QColor(Qt::red); total_width_helper_cell_ -> split_background_color = QColor(Qt::red);
total_width_helper_cell_ -> split_foreground_color = QColor(Qt::black); total_width_helper_cell_ -> split_foreground_color = QColor(Qt::black);
total_width_helper_cell_ -> split_label = QString( total_width_helper_cell_ -> split_label = QString(
tr("[%1px]", "content of the extra helper cell added when the total width of cells is greather than the preview width") tr("[%1px]", "content of the extra helper cell added when the total width of cells is greater than the preview width")
).arg(total_applied_width - preview_width_); ).arg(total_applied_width - preview_width_);
total_width_helper_cell_ -> split_size = total_applied_width - preview_width_; total_width_helper_cell_ -> split_size = total_applied_width - preview_width_;
} }

View File

@@ -68,7 +68,7 @@ void CompositeTextEditDialog::setUpComboBox()
qstrl.removeAll("formula"); qstrl.removeAll("formula");
} }
//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 //the value of the combo box are always alphabetically sorted
QMap <QString, QString> info_map; QMap <QString, QString> info_map;
for(const QString& str : qstrl) { for(const QString& str : qstrl) {

View File

@@ -27,7 +27,7 @@
/** /**
@brief ConductorPropertiesDialog::ConductorPropertiesDialog @brief ConductorPropertiesDialog::ConductorPropertiesDialog
Constructor Constructor
@param conductor : conductor to edit propertie @param conductor : conductor to edit properties
@param parent : parent widget @param parent : parent widget
*/ */
ConductorPropertiesDialog::ConductorPropertiesDialog( ConductorPropertiesDialog::ConductorPropertiesDialog(
@@ -57,7 +57,7 @@ ConductorPropertiesDialog::~ConductorPropertiesDialog()
/** /**
@brief ConductorPropertiesDialog::PropertiesDialog @brief ConductorPropertiesDialog::PropertiesDialog
Static method for open and apply properties. Static method for open and apply properties.
@param conductor : conductor to edit propertie @param conductor : conductor to edit properties
@param parent : parent widget @param parent : parent widget
*/ */
void ConductorPropertiesDialog::PropertiesDialog(Conductor *conductor, void ConductorPropertiesDialog::PropertiesDialog(Conductor *conductor,
@@ -101,7 +101,7 @@ ConductorProperties ConductorPropertiesDialog::properties() const
/** /**
@brief ConductorPropertiesDialog::applyAll @brief ConductorPropertiesDialog::applyAll
@return @return
true -> must apply the propertie to all conductor at the same potential true -> must apply properties to all conductors at the same potential
false -> must apply properties only for the edited conductor false -> must apply properties only for the edited conductor
*/ */
bool ConductorPropertiesDialog::applyAll() const bool ConductorPropertiesDialog::applyAll() const

View File

@@ -68,7 +68,7 @@ NewDiagramPage::NewDiagramPage(QETProject *project,
// default conductor properties // default conductor properties
m_cpw = new ConductorPropertiesWidget(ConductorProperties::defaultProperties()); m_cpw = new ConductorPropertiesWidget(ConductorProperties::defaultProperties());
m_cpw->setHiddenAvailableAutonum(true); m_cpw->setHiddenAvailableAutonum(true);
// default propertie of report label // default properties of report label
rpw = new ReportPropertieWidget(ReportProperties::defaultProperties()); rpw = new ReportPropertieWidget(ReportProperties::defaultProperties());
// default properties of xref // default properties of xref
xrefpw = new XRefPropertiesWidget(XRefProperties::defaultProperties(), this); xrefpw = new XRefPropertiesWidget(XRefProperties::defaultProperties(), this);
@@ -170,7 +170,7 @@ void NewDiagramPage::applyConf()
// proprietes par defaut des conducteurs // proprietes par defaut des conducteurs
m_cpw -> properties().toSettings(settings, "diagrameditor/defaultconductor"); m_cpw -> properties().toSettings(settings, "diagrameditor/defaultconductor");
// default report propertie // default report properties
rpw->toSettings(settings, "diagrameditor/defaultreport"); rpw->toSettings(settings, "diagrameditor/defaultreport");
// default xref properties // default xref properties

View File

@@ -63,7 +63,7 @@ public slots:
// attributes // attributes
private: private:
ProjectPropertiesDialog *ppd_; ProjectPropertiesDialog *ppd_;
QETProject *m_project; ///< Project to edit propertie QETProject *m_project; ///< Project to edit properties
BorderPropertiesWidget *bpw; ///< Widget to edit default diagram dimensions BorderPropertiesWidget *bpw; ///< Widget to edit default diagram dimensions
TitleBlockPropertiesWidget *ipw; ///< Widget to edit default title block properties TitleBlockPropertiesWidget *ipw; ///< Widget to edit default title block properties
ConductorPropertiesWidget *m_cpw; ///< Widget to edit default conductor properties ConductorPropertiesWidget *m_cpw; ///< Widget to edit default conductor properties

View File

@@ -27,7 +27,7 @@
/** /**
@brief DiagramPropertiesDialog::DiagramPropertiesDialog @brief DiagramPropertiesDialog::DiagramPropertiesDialog
Deafult constructor Default constructor
@param diagram : diagram to edit properties @param diagram : diagram to edit properties
@param parent : parent widget @param parent : parent widget
*/ */

View File

@@ -87,7 +87,7 @@ DynamicElementTextModel::DynamicElementTextModel(Element *element, QObject *pare
DynamicElementTextModel::~DynamicElementTextModel() DynamicElementTextModel::~DynamicElementTextModel()
{ {
//Connection is not destroy automaticaly, //Connection is not destroy automatically,
//because was not connected to a slot, but a lambda //because was not connected to a slot, but a lambda
for(DynamicElementTextItem *deti : m_hash_text_connect.keys()) for(DynamicElementTextItem *deti : m_hash_text_connect.keys())
setConnection(deti, false); setConnection(deti, false);
@@ -1623,7 +1623,7 @@ QWidget *DynamicTextItemDelegate::createEditor(
if(!deti) if(!deti)
break; break;
//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 //the value of the combo box are always alphabetically sorted
QMap <QString, QString> info_map; QMap <QString, QString> info_map;
for(const QString& str : availableInfo(deti)) { for(const QString& str : availableInfo(deti)) {
@@ -1880,8 +1880,8 @@ bool DynamicTextItemDelegate::eventFilter(QObject *object, QEvent *event)
//This is a bad hack, for change the normal behavior : //This is a bad hack, for change the normal behavior :
//in normal behavior, //in normal behavior,
//the value is commited when the spinbox lose focus or enter key is pressed //the value is committed when the spinbox lose focus or enter key is pressed
//With this hack the value is commited each time the value change without the need to validate. //With this hack the value is committed each time the value change without the need to validate.
//then the change is apply in live //then the change is apply in live
if(object->objectName() == "pos_dialog" || object->objectName() == "font_size" || object->objectName() == "rot_spinbox" || \ if(object->objectName() == "pos_dialog" || object->objectName() == "font_size" || object->objectName() == "rot_spinbox" || \
object->objectName() == "group_rotation" || object->objectName() == "group_v_adjustment" || object->objectName() == "width_spinbox" ||\ object->objectName() == "group_rotation" || object->objectName() == "group_v_adjustment" || object->objectName() == "width_spinbox" ||\

View File

@@ -154,7 +154,7 @@ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text)
/** /**
@brief ElementPropertiesWidget::setTextsGroup @brief ElementPropertiesWidget::setTextsGroup
Conveniance function : Convenience function :
same as call : ElementPropertiesWidget::setElement, same as call : ElementPropertiesWidget::setElement,
with parameter the parent element of group. with parameter the parent element of group.
Set the dynamics text tab as current tab, Set the dynamics text tab as current tab,

View File

@@ -28,7 +28,7 @@ namespace Ui {
/** /**
@brief The ImagePropertiesWidget class @brief The ImagePropertiesWidget class
This class provide a widget to edit the propertie of a DiagramImageItem This class provides a widget to edit the properties of a DiagramImageItem
*/ */
class ImagePropertiesWidget : public PropertiesEditorWidget class ImagePropertiesWidget : public PropertiesEditorWidget
{ {

View File

@@ -365,9 +365,9 @@ bool LinkSingleElementWidget::setLiveEdit(bool live_edit)
/** /**
@brief LinkSingleElementWidget::availableElements @brief LinkSingleElementWidget::availableElements
@return A QList with all available element @return A QList with all available elements
to be linked with the edited element. to be linked with the edited element.
This methode take care of the combo box "find in diagram" This method takes care of the "find in diagram" combo box
*/ */
QVector <QPointer<Element>> LinkSingleElementWidget::availableElements() QVector <QPointer<Element>> LinkSingleElementWidget::availableElements()
{ {
@@ -495,9 +495,9 @@ void LinkSingleElementWidget::setUpHeaderLabels()
void LinkSingleElementWidget::diagramWasRemovedFromProject() void LinkSingleElementWidget::diagramWasRemovedFromProject()
{ {
// We use a timer because if the removed diagram // We use a timer because if the removed diagram
// contain the master element linked to the edited element // contains the master element linked to the edited element
// we must to wait for this elements be unlinked, // we must wait for this elements to be unlinked,
// else the list of available master isn't up to date // or else the list of available master isn't up to date
QTimer::singleShot(10, this, SLOT(updateUi())); QTimer::singleShot(10, this, SLOT(updateUi()));
} }

View File

@@ -37,7 +37,7 @@ namespace Ui {
to the element given in the constructor. to the element given in the constructor.
The element given in constructor must be linked with only The element given in constructor must be linked with only
one other element (like report or slave element). one other element (like report or slave element).
This widget detect automaticaly the kind of element given in This widget detect automatically the kind of element given in
the constructor and search all element that can be linked with it. 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

@@ -165,7 +165,7 @@ void MasterPropertiesWidget::setElement(Element *element)
/** /**
@brief MasterPropertiesWidget::apply @brief MasterPropertiesWidget::apply
If link betwen edited element and other change, If link between edited element and other change,
apply the change with a QUndoCommand (got with method associatedUndo) apply the change with a QUndoCommand (got with method associatedUndo)
pushed to the stack of element project. pushed to the stack of element project.
Return true if link change, else false Return true if link change, else false
@@ -179,7 +179,7 @@ void MasterPropertiesWidget::apply()
/** /**
@brief MasterPropertiesWidget::reset @brief MasterPropertiesWidget::reset
Reset curent widget, clear eveything and rebuild widget. Reset current widget, clear eveything and rebuild widget.
*/ */
void MasterPropertiesWidget::reset() void MasterPropertiesWidget::reset()
{ {
@@ -346,11 +346,11 @@ void MasterPropertiesWidget::headerCustomContextMenuRequested(const QPoint &pos)
/** /**
@brief MasterPropertiesWidget::on_link_button_clicked @brief MasterPropertiesWidget::on_link_button_clicked
move curent item in the free_list to linked_list move current item in the free_list to linked_list
*/ */
void MasterPropertiesWidget::on_link_button_clicked() void MasterPropertiesWidget::on_link_button_clicked()
{ {
//take the curent item from free_list and push it to linked_list //take the current item from free_list and push it to linked_list
QTreeWidgetItem *qtwi = ui->m_free_tree_widget->currentItem(); QTreeWidgetItem *qtwi = ui->m_free_tree_widget->currentItem();
if (qtwi) if (qtwi)
{ {
@@ -365,11 +365,11 @@ void MasterPropertiesWidget::on_link_button_clicked()
/** /**
@brief MasterPropertiesWidget::on_unlink_button_clicked @brief MasterPropertiesWidget::on_unlink_button_clicked
move curent item in linked_list to free_list move current item in linked_list to free_list
*/ */
void MasterPropertiesWidget::on_unlink_button_clicked() void MasterPropertiesWidget::on_unlink_button_clicked()
{ {
//take the curent item from linked_list and push it to free_list //take the current item from linked_list and push it to free_list
QTreeWidgetItem *qtwi = ui->m_link_tree_widget->currentItem(); QTreeWidgetItem *qtwi = ui->m_link_tree_widget->currentItem();
if(qtwi) if(qtwi)
{ {
@@ -424,9 +424,9 @@ void MasterPropertiesWidget::showedElementWasDeleted()
void MasterPropertiesWidget::diagramWasdeletedFromProject() void MasterPropertiesWidget::diagramWasdeletedFromProject()
{ {
// We use a timer because if the removed diagram // We use a timer because if the removed diagram
// contain slave element linked to the edited element // contains slave element linked to the edited element
// we must to wait for this elements be unlinked, // we must wait for this elements be unlinked,
// else the linked list provide deleted elements. // or else the linked list provides deleted elements.
QTimer::singleShot(10, this, SLOT(updateUi())); QTimer::singleShot(10, this, SLOT(updateUi()));
} }

View File

@@ -35,7 +35,7 @@
/** /**
@brief The NewConductorPotentialSelector class @brief The NewConductorPotentialSelector class
Use for get the conductor propertie when two potentials is linked by a conductor Used for getting the conductor properties when two potentials are linked by a conductor
*/ */
class NewConductorPotentialSelector : public AbstractPotentialSelector class NewConductorPotentialSelector : public AbstractPotentialSelector
{ {
@@ -45,7 +45,7 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector
{ {
Terminal *terminal_1 = conductor->terminal1; Terminal *terminal_1 = conductor->terminal1;
Terminal *terminal_2 = conductor->terminal2; Terminal *terminal_2 = conductor->terminal2;
//We temporarily remove the conductor of his two terminals, //We temporarily remove the conductor of its two terminals,
//to get the two existing potential //to get the two existing potential
terminal_1->removeConductor(conductor); terminal_1->removeConductor(conductor);
terminal_2->removeConductor(conductor); terminal_2->removeConductor(conductor);
@@ -75,7 +75,7 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector
/** /**
@brief getPotential @brief getPotential
Get the conductor propertie of the potential at terminal, Get the conductor properties of the potential at terminal,
and the number of wire in this potential. and the number of wire in this potential.
@param terminal @param terminal
@param seq_num @param seq_num
@@ -140,7 +140,7 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector
/** /**
@brief The LinkReportPotentialSelector class @brief The LinkReportPotentialSelector class
Use for get the conductor propertie when two potentials is linked with a folio report Use for getting the conductor properties when two potentials are linked with a folio report
*/ */
class LinkReportPotentialSelector : public AbstractPotentialSelector class LinkReportPotentialSelector : public AbstractPotentialSelector
{ {

View File

@@ -434,7 +434,7 @@ void TitleBlockPropertiesWidget::updateTemplateList()
/** /**
@brief TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate @brief TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate
Load the additionnal field of title block "text" Load the additional field of title block "text"
*/ */
void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index) void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index)
{ {

View File

@@ -151,7 +151,7 @@ void XRefPropertiesWidget::saveProperties(int index) {
/** /**
@brief XRefPropertiesWidget::updateDisplay @brief XRefPropertiesWidget::updateDisplay
Update display with the curent displayed type. Update display with the current displayed type.
*/ */
void XRefPropertiesWidget::updateDisplay() void XRefPropertiesWidget::updateDisplay()
{ {

View File

@@ -441,8 +441,8 @@ void AlignmentTextsGroupCommand::undo()
if(m_group) if(m_group)
{ {
m_group.data()->setAlignment(m_previous_alignment); m_group.data()->setAlignment(m_previous_alignment);
//The alignment befor this command was free, then we must //The alignment before this command was free, then we must
//to restor the pos of each texts //to restore the pos of each texts
if(!m_texts_pos.isEmpty()) if(!m_texts_pos.isEmpty())
{ {
for(DynamicElementTextItem *deti : m_group.data()->texts()) for(DynamicElementTextItem *deti : m_group.data()->texts())

View File

@@ -31,7 +31,7 @@
/** /**
@brief DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand @brief DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand
@param diagram : deigram where this undo work @param diagram : diagram where this undo work
@param content : content to remove @param content : content to remove
@param parent : parent undo @param parent : parent undo
*/ */
@@ -53,8 +53,8 @@ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(
} }
//When remove a deti we must to know his parent item, for re-add deti as child of the parent //When removing a deti we must know its parent item, for re-adding deti as child of the parent
//when undo this command //when undoing this command
for(DynamicElementTextItem *deti : m_removed_contents.m_element_texts) for(DynamicElementTextItem *deti : m_removed_contents.m_element_texts)
{ {
if(deti->parentGroup()) if(deti->parentGroup())

View File

@@ -259,12 +259,12 @@ void LinkElementCommand::setUpNewLink(
/** /**
@brief LinkElementCommand::makeLink @brief LinkElementCommand::makeLink
Make the link between m_element and element_list; Make the link between m_element and element_list;
This method unlink elements if needed. This method unlinks elements if needed.
@param element_list @param element_list
*/ */
void LinkElementCommand::makeLink(const QList<Element *> &element_list) void LinkElementCommand::makeLink(const QList<Element *> &element_list)
{ {
//List is empty, that mean m_element must be free, so we unlink all elements //List is empty, that means m_element must be free, so we unlink all elements
if (element_list.isEmpty()) if (element_list.isEmpty())
{ {
m_element->unlinkAllElements(); m_element->unlinkAllElements();
@@ -275,8 +275,8 @@ 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. /* At this point there may be unwanted linked elements to m_element.
* We must to unlink it. * We must unlink it.
* Elements from element_list are wanted so we compare element_list * Elements from element_list are wanted so we compare element_list
* to current linked element of m_element * to current linked element of m_element
*/ */

View File

@@ -152,7 +152,7 @@ QList<Conductor *> ConductorCreator::existingPotential()
{ {
c_list.append(t->conductors().first()); c_list.append(t->conductors().first());
//We must to check m_terminals_list contain a terminal //We must check if m_terminals_list contains a terminal
//in the same potential of c, and if true, exclude this terminal from the search. //in the same potential of c, and if true, exclude this terminal from the search.
for (Conductor *c : t->conductors().first()->relatedPotentialConductors(false)) for (Conductor *c : t->conductors().first()->relatedPotentialConductors(false))
{ {

View File

@@ -29,7 +29,7 @@ namespace QetSettings
* QElectroTech settings * QElectroTech settings
* the value is in form of a string. * the value is in form of a string.
* @a policy can be : Round, Ceil, Floor, RoundPreferFloor, PassThrough * @a policy can be : Round, Ceil, Floor, RoundPreferFloor, PassThrough
* In case of wrong policy, PassThrough is use as defaukt value. * In case of wrong policy, PassThrough is use as default value.
* The value is stored with key : hdpi_scale_factor_rounding_policy * The value is stored with key : hdpi_scale_factor_rounding_policy
* @sa Qt::HighDpiScaleFactorRoundingPolicy * @sa Qt::HighDpiScaleFactorRoundingPolicy
* @param policy * @param policy

Some files were not shown because too many files have changed in this diff Show More