From 790cdc522916763c9c3a39b5a5f7e89435ce2924 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Tue, 18 Aug 2020 20:07:55 +0200 Subject: [PATCH] Fix some doxygen issues (~100) --- .../elementcollectionhandler.cpp | 10 +- .../elementcollectionitem.cpp | 24 +-- .../elementscollectionmodel.cpp | 4 +- .../elementscollectionwidget.cpp | 33 ++-- .../ElementsCollection/elementstreeview.cpp | 2 +- .../fileelementcollectionitem.cpp | 2 +- .../xmlelementcollection.cpp | 142 ++++++++++-------- .../xmlprojectelementcollectionitem.cpp | 2 +- sources/NameList/ui/namelistwidget.cpp | 2 +- .../PropertiesEditor/propertieseditordialog.h | 19 ++- .../propertieseditordockwidget.cpp | 10 +- .../propertieseditorwidget.cpp | 9 +- .../qpropertyundocommand.cpp | 6 +- sources/QWidgetAnimation/qwidgetanimation.cpp | 5 +- sources/QWidgetAnimation/qwidgetanimation.h | 23 ++- .../qetgraphicshandlerutility.cpp | 2 +- .../searchandreplaceworker.cpp | 16 +- .../ui/searchandreplacewidget.cpp | 12 +- sources/autoNum/assignvariables.cpp | 10 +- sources/autoNum/numerotationcontext.cpp | 16 +- .../autoNum/numerotationcontextcommands.cpp | 6 +- .../autoNum/ui/autonumberingmanagementw.cpp | 4 +- 22 files changed, 205 insertions(+), 154 deletions(-) diff --git a/sources/ElementsCollection/elementcollectionhandler.cpp b/sources/ElementsCollection/elementcollectionhandler.cpp index ad35b6a45..847f5375f 100644 --- a/sources/ElementsCollection/elementcollectionhandler.cpp +++ b/sources/ElementsCollection/elementcollectionhandler.cpp @@ -334,7 +334,7 @@ ElementsLocation ElementCollectionHandler::copy(ElementsLocation &source, Elemen /** @brief ElementCollectionHandler::createDir - Create a directorie with name @name as child of @parent. + Create a directorie with name as child of parent. Parent must be a directory @param parent : parent of the dir to create @param name : name of directorie to create @@ -395,8 +395,9 @@ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, c /** @brief ElementCollectionHandler::importFromProject - Import the element represented by @location to the embedded collection of @project at the same path. - @location must represente an element owned by a project embedded collection + Import the element represented by location to the embedded collection + of project at the same path. + location must represente an element owned by a project embedded collection @param project : project where copy the element @param location : location to copy @return true if import with success @@ -438,7 +439,8 @@ bool ElementCollectionHandler::importFromProject(QETProject *project, ElementsLo /** @brief ElementCollectionHandler::setNames - Set the names stored in @name_list as the names of the item represented by location + Set the names stored in name_list as the names + of the item represented by location @param location : location to change the names @param name_list : NamesList to use @return return true if success diff --git a/sources/ElementsCollection/elementcollectionitem.cpp b/sources/ElementsCollection/elementcollectionitem.cpp index 7a9f70c59..7d3770d5e 100644 --- a/sources/ElementsCollection/elementcollectionitem.cpp +++ b/sources/ElementsCollection/elementcollectionitem.cpp @@ -39,11 +39,15 @@ void ElementCollectionItem::clearData() /** @brief ElementCollectionItem::lastItemForPath - Return the last existing item in this ElementCollectionItem hierarchy according to the given path. - Next_item is the first non existing item in this hierarchy according to the given path. - @param path : The path to find last item. The path must be in form : path/otherPath/.../.../myElement.elmt. + Return the last existing item in this ElementCollectionItem hierarchy + according to the given path. + Next_item is the first non existing item in this hierarchy according + to the given path. + @param path : The path to find last item. + The path must be in form : path/otherPath/.../.../myElement.elmt. @param no_found_path : The first item that not exist in this hierarchy - @return : The last item that exist in this hierarchy, or nullptr can't find (an error was occurred, or path already exist) + @return : The last item that exist in this hierarchy, + or nullptr can't find (an error was occurred, or path already exist) */ ElementCollectionItem *ElementCollectionItem::lastItemForPath(const QString &path, QString &no_found_path) { @@ -68,7 +72,7 @@ ElementCollectionItem *ElementCollectionItem::lastItemForPath(const QString &pat /** @brief ElementCollectionItem::childWithCollectionName - Return the child with the collection name @name, else return nullptr + Return the child with the collection name name, else return nullptr @param name @return */ @@ -101,10 +105,10 @@ QList ElementCollectionItem::directChilds() const /** @brief ElementCollectionItem::rowForInsertItem - Return the row for insert a new child item to this item with name @collection_name. - If row can't be found (collection_name is null, or already exist) return -1; - @param collection_name + Return the row for insert a new child item to this item with name. + @param name @return + If row can't be found (name is null, or already exist) return -1; */ int ElementCollectionItem::rowForInsertItem(const QString &name) { @@ -112,7 +116,7 @@ int ElementCollectionItem::rowForInsertItem(const QString &name) return -1; QList child; - //The item to insert is an element we search from element child + //The item to insert is an element we search from element child if (name.endsWith(".elmt")) { child = elementsDirectChild(); @@ -120,7 +124,7 @@ int ElementCollectionItem::rowForInsertItem(const QString &name) if (child.isEmpty()) return rowCount(); } - //The item is a directory, we search from directory child + //The item is a directory, we search from directory child else { child = directoriesDirectChild(); diff --git a/sources/ElementsCollection/elementscollectionmodel.cpp b/sources/ElementsCollection/elementscollectionmodel.cpp index 4dfb2284a..6febf628f 100644 --- a/sources/ElementsCollection/elementscollectionmodel.cpp +++ b/sources/ElementsCollection/elementscollectionmodel.cpp @@ -500,7 +500,7 @@ QList ElementsCollectionModel::items() const /** @brief ElementsCollectionModel::projectItems @param project - @return return all items for project @project. the list can be empty + @return return all items for project. the list can be empty */ QList ElementsCollectionModel::projectItems(QETProject *project) const { @@ -531,7 +531,7 @@ void ElementsCollectionModel::hideElement() /** @brief ElementsCollectionModel::indexFromLocation - Return the index who represent @location. + Return the index who represent location. Index can be non valid @param location @return diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index f3acc4ee4..ce4d55ee8 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -46,21 +46,22 @@ ElementsCollectionWidget::ElementsCollectionWidget(QWidget *parent): QWidget(parent), m_model(nullptr) { - //The connection in the method ElementsCollectionWidget::reload return a warning message at compilation : - //********** - //QObject::connect: Cannot queue arguments of type 'QVector' - //(Make sure 'QVector' is registered using qRegisterMetaType().) - //********** - //Register meta type has recommended by the message. + //The connection in the method ElementsCollectionWidget::reload + //return a warning message at compilation : + //********** + //QObject::connect: Cannot queue arguments of type 'QVector' + //(Make sure 'QVector' is registered using qRegisterMetaType().) + //********** + //Register meta type has recommended by the message. qRegisterMetaType>(); setUpWidget(); setUpAction(); setUpConnection(); - //Timer is used to avoid launching a new search for each letter typed by user - //Timer is started or restarted at every time user type a new letter. - //When the timer emit timeout, we start the search. + //Timer is used to avoid launching a new search for each letter typed by user + //Timer is started or restarted at every time user type a new letter. + //When the timer emit timeout, we start the search. m_search_timer.setInterval(500); m_search_timer.setSingleShot(true); } @@ -80,7 +81,7 @@ void ElementsCollectionWidget::expandFirstItems() /** @brief ElementsCollectionWidget::addProject - Add @project to be displayed + Add project to be displayed @param project */ void ElementsCollectionWidget::addProject(QETProject *project) @@ -105,7 +106,7 @@ void ElementsCollectionWidget::removeProject(QETProject *project) { /** @brief ElementsCollectionWidget::highlightUnusedElement highlight the unused element - @See ElementsCollectionModel::highlightUnusedElement() + @see ElementsCollectionModel::highlightUnusedElement() */ void ElementsCollectionWidget::highlightUnusedElement() { @@ -115,7 +116,7 @@ void ElementsCollectionWidget::highlightUnusedElement() /** @brief ElementsCollectionWidget::setCurrentLocation - Set the current item to be the item for @location + Set the current item to be the item for location @param location */ void ElementsCollectionWidget::setCurrentLocation( @@ -771,11 +772,11 @@ void ElementsCollectionWidget::hideCollection(bool hide) /** @brief ElementsCollectionWidget::hideItem - Hide the item index. If @recursive is true, + Hide the item index. If recursive is true, hide all subchilds of index - @param hide- true = hide , false = visible - @param index- index to hide - @param recursive- true = apply to child , false = only for index + @param hide : - true = hide , false = visible + @param index : - index to hide + @param recursive : - true = apply to child , false = only for index */ void ElementsCollectionWidget::hideItem(bool hide, const QModelIndex &index, diff --git a/sources/ElementsCollection/elementstreeview.cpp b/sources/ElementsCollection/elementstreeview.cpp index 53d50257e..32a0e983a 100644 --- a/sources/ElementsCollection/elementstreeview.cpp +++ b/sources/ElementsCollection/elementstreeview.cpp @@ -64,7 +64,7 @@ void ElementsTreeView::startDrag(Qt::DropActions supportedActions) /** @brief ElementsTreeView::startElementDrag - Build a QDrag according to the content of @location + Build a QDrag according to the content of location @param location : location to use for create the content of the QDrag */ void ElementsTreeView::startElementDrag(const ElementsLocation &location) diff --git a/sources/ElementsCollection/fileelementcollectionitem.cpp b/sources/ElementsCollection/fileelementcollectionitem.cpp index bf5fe767b..c4a430192 100644 --- a/sources/ElementsCollection/fileelementcollectionitem.cpp +++ b/sources/ElementsCollection/fileelementcollectionitem.cpp @@ -241,7 +241,7 @@ bool FileElementCollectionItem::isCustomCollection() const /** @brief FileElementCollectionItem::addChildAtPath Ask to this item item to add a child - with collection name @collection_name + with collection name collection_name @param collection_name */ void FileElementCollectionItem::addChildAtPath(const QString &collection_name) diff --git a/sources/ElementsCollection/xmlelementcollection.cpp b/sources/ElementsCollection/xmlelementcollection.cpp index b9884e2fc..e4fd7cf77 100644 --- a/sources/ElementsCollection/xmlelementcollection.cpp +++ b/sources/ElementsCollection/xmlelementcollection.cpp @@ -25,10 +25,12 @@ @brief XmlElementCollection::XmlElementCollection Build an empty collection. The collection start by : - * - * + + + @endcode All elements and category are stored as child of XmlElementCollection::directories(const QDomElement &parent_element) const { @@ -196,7 +203,7 @@ QList XmlElementCollection::directories(const QDomElement &parent_e /** @brief XmlElementCollection::directoriesNames @param parent_element - @return a list of names for every child directories of @parent_element + @return a list of names for every child directories of parent_element */ QStringList XmlElementCollection::directoriesNames(const QDomElement &parent_element) const { @@ -216,7 +223,7 @@ QStringList XmlElementCollection::directoriesNames(const QDomElement &parent_ele /** @brief XmlElementCollection::elements @param parent_element - @return A list of element stored in @parent_element + @return A list of element stored in parent_element */ QList XmlElementCollection::elements(const QDomElement &parent_element) const { @@ -237,7 +244,7 @@ QList XmlElementCollection::elements(const QDomElement &parent_elem /** @brief XmlElementCollection::elementsNames @param parent_element - @return A list of names fr every childs element of @parent_element + @return A list of names fr every childs element of parent_element */ QStringList XmlElementCollection::elementsNames(const QDomElement &parent_element) const { @@ -257,7 +264,7 @@ QStringList XmlElementCollection::elementsNames(const QDomElement &parent_elemen /** @brief XmlElementCollection::element @param path : path of the element in this collection - @return the QDomElement that represent the element at path @path + @return the QDomElement that represent the element at path path or a null QDomElement if not found or doesn't represent an element */ QDomElement XmlElementCollection::element(const QString &path) const @@ -275,7 +282,7 @@ QDomElement XmlElementCollection::element(const QString &path) const /** @brief XmlElementCollection::directory @param path : path of the directory in this collection - @return the QDomElement that represent the directory at path @path + @return the QDomElement that represent the directory at path path or a null QDomElement if not found. */ QDomElement XmlElementCollection::directory(const QString &path) const @@ -291,35 +298,39 @@ QDomElement XmlElementCollection::directory(const QString &path) const /** @brief XmlElementCollection::addElement Add the element at location to this collection. - The element is copied in this collection in "import" dir with the same path, in other word - if the path is dir1/dir2/dir3/myElement.elmt, myElement is copied to this collection at the path : import/dir1/dir2/dir3/myElement.elmt + The element is copied in this collection + in "import" dir with the same path, in other word + if the path is dir1/dir2/dir3/myElement.elmt, + myElement is copied to this collection at the + path : import/dir1/dir2/dir3/myElement.elmt If the path doesn't exist, he was created. If the element already exist, do nothing. @param location, location of the element - @return the collection path of the added item or a null QString if element can't be added. + @return the collection path of the added item + or a null QString if element can't be added. */ QString XmlElementCollection::addElement(ElementsLocation &location) { - //location must be an element and exist + //location must be an element and exist if (!(location.exist() && location.isElement())) return QString(); - //Add an element from this collection to this collection have no sense + //Add an element from this collection to this collection have no sense if (location.isProject() && location.projectCollection() == this) return QString(); - //First we check if this location exist in this collection if so, we do nothing + //First we check if this location exist in this collection if so, we do nothing if ( exist("import/" + location.collectionPath(false)) ) return QString(); - //Get the import dir of this collection + //Get the import dir of this collection QDomElement parent_element = importCategory(); if (parent_element.isNull()) return QString(); QString integrated_path = parent_element.attribute("name"); - //Split the path + //Split the path QStringList splitted_path = location.collectionPath(false).split("/"); if (splitted_path.isEmpty()) return QString(); @@ -333,11 +344,11 @@ QString XmlElementCollection::addElement(ElementsLocation &location) foreach(QString str, splitted_path) { QDomElement child_element = child(parent_element, str); - //Child doesn't exist, we create it + //Child doesn't exist, we create it if (child_element.isNull()) { QDomElement created_child; - //str is the path of an element, we integrate an element + //str is the path of an element, we integrate an element if (str.endsWith(".elmt")) { QFile element_file(dir.filePath(str)); if (!element_file.exists()) @@ -346,9 +357,9 @@ QString XmlElementCollection::addElement(ElementsLocation &location) created_child = QETXML::fileSystemElementToXmlCollectionElement(m_dom_document, element_file); } - //str is the path of a directory, we integrate a directory. + //str is the path of a directory, we integrate a directory. else { - //Dir doesn't exist. + //Dir doesn't exist. if (!dir.cd(str)) return QString(); @@ -361,7 +372,7 @@ QString XmlElementCollection::addElement(ElementsLocation &location) parent_element.appendChild(created_child); parent_element = created_child; } - //Child exist + //Child exist else { if (!dir.cd(str)) return QString(); @@ -382,11 +393,11 @@ QString XmlElementCollection::addElement(ElementsLocation &location) QDomElement child_element = child(parent_element, str); - //Child doesn't exist, we create it + //Child doesn't exist, we create it if (child_element.isNull()) { QDomElement created_child; - //str is the path of an element, we integrate an element + //str is the path of an element, we integrate an element if (str.endsWith(".elmt")) { created_child = m_dom_document.createElement("element"); created_child.setAttribute("name", str); @@ -394,7 +405,7 @@ QString XmlElementCollection::addElement(ElementsLocation &location) created_child.appendChild(location.xml().cloneNode(true)); } - //str is the path of a directory, we integrate a directory. + //str is the path of a directory, we integrate a directory. else { created_child = m_dom_document.createElement("category"); created_child.setAttribute("name", str); @@ -410,7 +421,7 @@ QString XmlElementCollection::addElement(ElementsLocation &location) parent_element.appendChild(created_child); parent_element = created_child; } - //Child exist + //Child exist else parent_element = child_element; @@ -424,12 +435,15 @@ QString XmlElementCollection::addElement(ElementsLocation &location) /** @brief XmlElementCollection::addElementDefinition - Add the élément defintion @xml_definition in the directory at path @dir_path with the name @elmt_name. - @param dir_path : the path of the directory where we must add the element. + Add the élément defintion xml_definition + in the directory at path dir_path with the name elmt_name. + @param dir_path : + the path of the directory where we must add the element. The path must be an existing directory of this collection. - @param elmt_name : The name used to store the element (the name must end with .elmt, if not, .elmt will be append to @elmt_name) + @param elmt_name : The name used to store the element + (the name must end with .elmt, if not, .elmt will be append to elmt_name) @param xml_definition : The xml definition of the element. - The tag name of @xml_definition must be "definition". + The tag name of xml_definition must be "definition". @return True if the element is added with success. */ bool XmlElementCollection::addElementDefinition(const QString &dir_path, const QString &elmt_name, const QDomElement &xml_definition) @@ -462,7 +476,7 @@ bool XmlElementCollection::addElementDefinition(const QString &dir_path, const Q /** @brief XmlElementCollection::removeElement - Remove the element at path @path. + Remove the element at path path. @param path @return True if element is removed and emit the signal elementRemoved. else false. @@ -482,14 +496,19 @@ bool XmlElementCollection::removeElement(const QString& path) /** @brief XmlElementCollection::copy - Copy the content represented by source (an element or a directory) to destination. + Copy the content represented by source (an element or a directory) + to destination. Destination must be a directory of this collection. - If the destination already have an item at the same path of source, he will be replaced by source. + If the destination already have an item at the same path of source, + he will be replaced by source. @param source : content to copy - @param destination : destination of the copy, must be a directory of this collection - @param rename : rename the copy with @rename else use the name of source - @param deep_copy : if true copy all childs of source (only if source is directory) - @return the ElementLocation that represent the copy, if copy failed return a null ElementLocation + @param destination : destination of the copy, must be a directory + of this collection + @param rename : rename the copy with rename else use the name of source + @param deep_copy : if true copy all childs of source + (only if source is directory) + @return the ElementLocation that represent the copy, + if copy failed return a null ElementLocation */ ElementsLocation XmlElementCollection::copy(ElementsLocation &source, ElementsLocation &destination, const QString& rename, bool deep_copy) { @@ -504,7 +523,7 @@ ElementsLocation XmlElementCollection::copy(ElementsLocation &source, ElementsLo /** @brief XmlElementCollection::exist - Return true if the path @path exist in this collection + Return true if the path path exist in this collection @param path @return */ @@ -552,7 +571,7 @@ bool XmlElementCollection::createDir(const QString& path, const QString& name, c /** @brief XmlElementCollection::removeDir - Remove the directory at path @path. + Remove the directory at path path. @param path @return true if successfuly removed and emit directoryRemoved(QString), else false. @@ -574,7 +593,8 @@ bool XmlElementCollection::removeDir(const QString& path) If dom_element is null, return all location owned by this collection dom_element must be a child of this collection. @param dom_element : dom_element where we must to search location. - @param childs = if true return all childs location of dom_element, if false, only return the direct 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. @return */ QList XmlElementCollection::elementsLocation(QDomElement dom_element, bool childs) const @@ -615,7 +635,8 @@ QList XmlElementCollection::elementsLocation(QDomElement dom_e @brief XmlElementCollection::domToLocation Return the element location who represent the xml element : dom_element dom_element must be owned by this collection - @param dom_element : the dom_element of this collection that represent an element. + @param dom_element : + the dom_element of this collection that represent an element. The tag name of dom_element must be "element" @return the element location, location can be null if fail. */ @@ -668,18 +689,20 @@ void XmlElementCollection::cleanUnusedDirectory() /** @brief XmlElementCollection::copyDirectory Copy the directory represented by source to destination. - if destination have a directory with the same name as source, then this directory is removed + if destination have a directory with the same name as source, + then this directory is removed @param source : directory to copy @param destination : destination of the copy - @param rename : rename the copy with @rename else use the name of source + @param rename : rename the copy with rename else use the name of source @param deep_copy :if true copy all childs of source - @return the ElementLocation that represent the copy, if copy failed return a null ElementLocation + @return the ElementLocation that represent the copy, + if copy failed return a null ElementLocation */ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString& rename, bool deep_copy) { QString new_dir_name = rename.isEmpty() ? source.fileName() : rename; - //Get the xml directory where the new directory must be added + //Get the xml directory where the new directory must be added QDomElement parent_dir_dom = directory(destination.collectionPath(false)); if (parent_dir_dom.isNull()) return ElementsLocation(); @@ -692,7 +715,7 @@ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, E ElementsLocation created_location; - //Copy with a file system collection source + //Copy with a file system collection source if (source.isFileSystem()) { QDir source_dir(source.fileSystemPath()); @@ -716,7 +739,7 @@ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, E copyDirectory(sub_source, created_location); } - //Append all elements of source to the new created directory + //Append all elements of source to the new created directory source_dir.setNameFilters(QStringList() << "*.elmt"); foreach(QString str, source_dir.entryList(QDir::Files | QDir::NoDotAndDotDot, QDir::Name)) { @@ -726,14 +749,15 @@ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, E } } - //Copy with a xml collection source + //Copy with a xml collection source else { if (!source.projectCollection()) return ElementsLocation(); QDomNode other_collection_node = source.projectCollection()->child(source.collectionPath(false)).cloneNode(deep_copy); - //We don't make a deep copy, but we must to get the local names of the copied directory + //We don't make a deep copy, + // but we must to get the local names of the copied directory if (!deep_copy) { QDomNode names = source.projectCollection()->child(source.collectionPath(false)).namedItem("names"); if (!names.isNull() && names.isElement()) @@ -759,7 +783,7 @@ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, E If element already exist in destination he will be replaced by the new. @param source : element to copy @param destination : destination of the copy - @param rename : rename the copy with @rename else use the name of source + @param rename : rename the copy with rename else use the name of source @return The ElementsLocation of the copy */ ElementsLocation XmlElementCollection::copyElement(ElementsLocation &source, ElementsLocation &destination, const QString& rename) @@ -768,14 +792,14 @@ ElementsLocation XmlElementCollection::copyElement(ElementsLocation &source, Ele QDomElement elmt_dom; - //Copy with a file system collection source + //Copy with a file system collection source if (source.isFileSystem()) { QFile file(source.fileSystemPath()); elmt_dom = QETXML::fileSystemElementToXmlCollectionElement(m_dom_document, file, new_elmt_name); if (elmt_dom.isNull()) return ElementsLocation(); } - //Copy with a xml collection source + //Copy with a xml collection source else { QDomElement other_collection = source.xml(); diff --git a/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp b/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp index 9f1f56b84..4d8e40636 100644 --- a/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp +++ b/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp @@ -129,7 +129,7 @@ bool XmlProjectElementCollectionItem::isCollectionRoot() const /** @brief XmlProjectElementCollectionItem::addChildAtPath - Ask to this item item to add a new child with collection name @collection_name + Ask to this item item to add a new child with collection name collection_name (the child must exist in the xml element collection) @param collection_name : name of the child item to add. */ diff --git a/sources/NameList/ui/namelistwidget.cpp b/sources/NameList/ui/namelistwidget.cpp index 612cc6c82..a704ff7a9 100644 --- a/sources/NameList/ui/namelistwidget.cpp +++ b/sources/NameList/ui/namelistwidget.cpp @@ -54,7 +54,7 @@ void NameListWidget::addLine() /** @brief NameListWidget::setNames - Set the current names of this dialog from @name_list + Set the current names of this dialog from name_list @param name_list */ void NameListWidget::setNames(const NamesList &name_list) diff --git a/sources/PropertiesEditor/propertieseditordialog.h b/sources/PropertiesEditor/propertieseditordialog.h index 570f64bdf..b31a0a4c8 100644 --- a/sources/PropertiesEditor/propertieseditordialog.h +++ b/sources/PropertiesEditor/propertieseditordialog.h @@ -26,13 +26,17 @@ /** @brief The PropertiesEditorDialog class Create a dialog to edit some properties of a thing. - Only create a instance of this class and call exec, all is done for you in this class. - The first argument (a template) must be a subclass of QWidget and provide the 3 methods bellow : + Only create a instance of this class and call exec, + all is done for you in this class. + The first argument (a template) must be a subclass + of QWidget and provide the 3 methods bellow : QString::title() void::apply() void::reset() - You can subclass the interface PropertiesEditorWidget who provide all this methods. - This dialog take ownership of the editor, so the editor will be deleted by this dialog + You can subclass the interface PropertiesEditorWidget + who provide all this methods. + This dialog take ownership of the editor, + so the editor will be deleted by this dialog */ class PropertiesEditorDialog : public QDialog { @@ -42,12 +46,13 @@ class PropertiesEditorDialog : public QDialog PropertiesEditorDialog(T editor, QWidget *parent = nullptr) : QDialog (parent) { - //Set dialog title + //Set dialog title setWindowTitle(editor->title()); - //Reparent the editor, to be deleted at the same time of this dialog + // Reparent the editor, + // to be deleted at the same time of this dialog editor->setParent(this); - //Build the dialog + //Build the dialog QVBoxLayout *vlayout = new QVBoxLayout(this); vlayout->addWidget(editor); QDialogButtonBox *button_box = new QDialogButtonBox (QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Reset, this); diff --git a/sources/PropertiesEditor/propertieseditordockwidget.cpp b/sources/PropertiesEditor/propertieseditordockwidget.cpp index 5ac7cac25..4598f48be 100644 --- a/sources/PropertiesEditor/propertieseditordockwidget.cpp +++ b/sources/PropertiesEditor/propertieseditordockwidget.cpp @@ -80,12 +80,13 @@ void PropertiesEditorDockWidget::reset() /** @brief PropertiesEditorDockWidget::addEditor - Add an @editor in this dock at @index in the main vertical layout (note the button box - are displayed at bottom of this layout by default) + Add an editor in this dock at index in the main vertical layout + (note the button box are displayed at bottom of this layout by default) When an editor is added, we enable the button box @param editor : editor to add; @param index : index of editor in the layout - @return true if was added (or already add) or false if can't be add (editor = nullptr) + @return true if was added (or already add) + or false if can't be add (editor = nullptr) */ bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int index) { @@ -107,7 +108,8 @@ QList PropertiesEditorDockWidget::editors() const { /** @brief PropertiesEditorDockWidget::removeEditor - Remove @editor from this dock. The editor wasn't delete a the end of this method + Remove editor from this dock. + The editor wasn't delete a the end of this method If the editor was the last on this widget, we disabled the button box @param editor : editor to remove @return true on success, else false diff --git a/sources/PropertiesEditor/propertieseditorwidget.cpp b/sources/PropertiesEditor/propertieseditorwidget.cpp index a579d9474..79c310617 100644 --- a/sources/PropertiesEditor/propertieseditorwidget.cpp +++ b/sources/PropertiesEditor/propertieseditorwidget.cpp @@ -48,10 +48,13 @@ QString PropertiesEditorWidget::title() const { /** @brief PropertiesEditorWidget::setLiveEdit Set the editor in live edit mode. - When an editor is in live edit mode, every change is applied immediately (no need to call apply). + When an editor is in live edit mode, + every change is applied immediately (no need to call apply). If live edit can be enable, return true, else false. - By default this method do nothing and return false (live edit is disable). - Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode. + By default this method do nothing and return false + (live edit is disable). + Herited class of PropertiesEditorWidget must reimplemente + this methode to manage the live edit mode. @param live_edit true to enable live edit @return true if live edit is enable, else false. */ diff --git a/sources/QPropertyUndoCommand/qpropertyundocommand.cpp b/sources/QPropertyUndoCommand/qpropertyundocommand.cpp index fd7948dc1..f5c4cbb90 100644 --- a/sources/QPropertyUndoCommand/qpropertyundocommand.cpp +++ b/sources/QPropertyUndoCommand/qpropertyundocommand.cpp @@ -21,7 +21,7 @@ /** @brief QPropertyUndoCommand::QPropertyUndoCommand Default constructor with old and new value - This command don't take ownership of @object + This command don't take ownership of object @param object @param old_value @param new_value @@ -38,7 +38,7 @@ QPropertyUndoCommand::QPropertyUndoCommand(QObject *object, const char *property @brief QPropertyUndoCommand::QPropertyUndoCommand Default constructor with old value. Call setNewValue to setup the new value of the edited QObject - This command don't take ownership of @object + This command don't take ownership of object @param object @param old_value @param parent @@ -63,7 +63,7 @@ QPropertyUndoCommand::QPropertyUndoCommand(const QPropertyUndoCommand *other) /** @brief QPropertyUndoCommand::setNewValue - Set the new value of the property (set with redo) to @new_value + Set the new value of the property (set with redo) to new_value @param new_value */ void QPropertyUndoCommand::setNewValue(const QVariant &new_value) { diff --git a/sources/QWidgetAnimation/qwidgetanimation.cpp b/sources/QWidgetAnimation/qwidgetanimation.cpp index 246543f9a..f14aa9b41 100644 --- a/sources/QWidgetAnimation/qwidgetanimation.cpp +++ b/sources/QWidgetAnimation/qwidgetanimation.cpp @@ -22,7 +22,8 @@ @brief QWidgetAnimation::QWidgetAnimation @param widget : widget to animate @param orientation : animate widget horizontally or vertically - @param duration : the duration of animation @see void QVariantAnimation::setDuration(int msecs) + @param duration : the duration of animation + @see void QVariantAnimation::setDuration(int msecs) */ QWidgetAnimation::QWidgetAnimation(QWidget *widget, Qt::Orientation orientation, QWidgetAnimation::Behavior behavior, int duration) : QPropertyAnimation(widget), @@ -149,7 +150,7 @@ void QWidgetAnimation::setHidden(bool hidden) /** @brief QWidgetAnimation::setLastShowSize - Force the last show size value to @size + Force the last show size value to size @param size */ void QWidgetAnimation::setLastShowSize(int size) diff --git a/sources/QWidgetAnimation/qwidgetanimation.h b/sources/QWidgetAnimation/qwidgetanimation.h index 48748d7a9..da74c390c 100644 --- a/sources/QWidgetAnimation/qwidgetanimation.h +++ b/sources/QWidgetAnimation/qwidgetanimation.h @@ -25,15 +25,22 @@ /** @brief The QWidgetAnimation class This class animate the show and hide function of a QWidget. - * - The role of @behavior is to calcul as best the animation process when widget is show. - Because this class don't change the current and final size of the widget but her maximum size during the animation process, + + The role of behavior is to calcul as best the animation process + when widget is show. + Because this class don't change the current and final size + of the widget but her maximum size during the animation process, we must to know in advance the final size of the widget. - Behavior minimumSizeHint : the final size of the widget will be his minimum size hint. - Behavior availableSpace : the final size of widget will be the available size of her parent. - Since parent can have other widgets you can add a QVector of widget to subtract of the final size. - Because we suppose the animated widget will take the maximum available space, we subtract the minimum size hint of widgets in QVector. - Behavior lastSize : The widget will have the same size as the last time he was showed. + Behavior minimumSizeHint : the final size of the widget + will be his minimum size hint. + Behavior availableSpace : the final size of widget will be + the available size of her parent. + Since parent can have other widgets you can add a QVector of widget + to subtract of the final size. + Because we suppose the animated widget will take the maximum + available space, we subtract the minimum size hint of widgets in QVector. + Behavior lastSize : + The widget will have the same size as the last time he was showed. */ class QWidgetAnimation : public QPropertyAnimation { diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp index 827f2d99c..5a53f21bc 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp +++ b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp @@ -182,7 +182,7 @@ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(const QRectF &old_rect /** @brief QetGraphicsHandlerUtility::lineForPosAtIndex - Return a line after modification of @pos at index @index of @old_line. + Return a line after modification of pos at index index of old_line. @param old_line @param pos @param index diff --git a/sources/SearchAndReplace/searchandreplaceworker.cpp b/sources/SearchAndReplace/searchandreplaceworker.cpp index 2995939ad..66ffe9224 100644 --- a/sources/SearchAndReplace/searchandreplaceworker.cpp +++ b/sources/SearchAndReplace/searchandreplaceworker.cpp @@ -33,7 +33,7 @@ SearchAndReplaceWorker::SearchAndReplaceWorker() /** @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 @param diagram_list, list of diagram to be changed, all diagrams must belong to the same project; @@ -93,7 +93,7 @@ void SearchAndReplaceWorker::replaceDiagram(Diagram *diagram) /** @brief SearchAndReplaceWorker::replaceElement - Replace all properties of each elements in @list + Replace all properties of each elements in list All element must belong to the same project, if not this function do nothing. All change are made through a undo command append @@ -151,7 +151,7 @@ void SearchAndReplaceWorker::replaceElement(Element *element) /** @brief SearchAndReplaceWorker::replaceIndiText - Replace all displayed text of independent text of @list + Replace all displayed text of independent text of list Each must belong to the same project, if not this function do nothing @param list */ @@ -187,7 +187,7 @@ void SearchAndReplaceWorker::replaceIndiText(IndependentTextItem *text) /** @brief SearchAndReplaceWorker::replaceConductor - Replace all properties of each conductor in @list + Replace all properties of each conductor in list All conductor must belong to the same project, if not this function do nothing. All change are made through a undo command append @@ -394,7 +394,7 @@ ConductorProperties SearchAndReplaceWorker::invalidConductorProperties() /** @brief SearchAndReplaceWorker::applyChange @param original : the original properties - @param change : the change properties, to be merged with @original + @param change : the change properties, to be merged with original @return a new conductor properties with the change applyed. */ ConductorProperties SearchAndReplaceWorker::applyChange(const ConductorProperties &original, const ConductorProperties &change) @@ -443,7 +443,7 @@ QString SearchAndReplaceWorker::applyChange(const QString &original, const QStri @brief SearchAndReplaceWorker::replaceAdvanced @param diagram @return the titleblock properties with the change applied, - according to the state of @m_advanced_struct + according to the state of m_advanced_struct */ TitleBlockProperties SearchAndReplaceWorker::replaceAdvanced(Diagram *diagram) { @@ -469,7 +469,7 @@ TitleBlockProperties SearchAndReplaceWorker::replaceAdvanced(Diagram *diagram) @brief SearchAndReplaceWorker::replaceAdvanced @param element @return The diagram context with the change applied, - according to the state of @m_advanced_struct + according to the state of m_advanced_struct */ DiagramContext SearchAndReplaceWorker::replaceAdvanced(Element *element) { @@ -494,7 +494,7 @@ DiagramContext SearchAndReplaceWorker::replaceAdvanced(Element *element) @brief SearchAndReplaceWorker::replaceAdvanced @param conductor @return the conductor properties with the change applied, - according to the state of @m_advanced_struct + according to the state of m_advanced_struct */ ConductorProperties SearchAndReplaceWorker::replaceAdvanced(Conductor *conductor) { diff --git a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp index 51aec37fc..b94d501ca 100644 --- a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp +++ b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp @@ -309,7 +309,7 @@ void SearchAndReplaceWidget::fillItemsList() /** @brief SearchAndReplaceWidget::addElement - Add a tree widget item for @element + Add a tree widget item for element @param element */ void SearchAndReplaceWidget::addElement(Element *element) @@ -434,7 +434,7 @@ void SearchAndReplaceWidget::search() /** @brief SearchAndReplaceWidget::setVisibleAllParents - Set visible all parents of @item until the invisible root item + Set visible all parents of item until the invisible root item @param item @param expend_parent */ @@ -452,8 +452,8 @@ void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, /** @brief SearchAndReplaceWidget::nextItem - @param item : find the next item from @item, - if @item is nullptr, start the search for the root of the tree + @param item : find the next item from item, + if item is nullptr, start the search for the root of the tree @param flags @return the next item according to flag or nullptr if there is not a next item @@ -485,8 +485,8 @@ QTreeWidgetItem *SearchAndReplaceWidget::nextItem( /** @brief SearchAndReplaceWidget::previousItem - @param item : find the previous item from @item, - if @item is nullptr, start the search for the root of the tree + @param item : find the previous item from item, + if item is nullptr, start the search for the root of the tree @param flags @return the previous item according to flag or nullptr if there is not a previous item diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index 59905dac9..3ba4be13f 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -174,7 +174,7 @@ namespace autonum /** @brief AssignVariables::formulaToLabel - Return the @formula with variable assigned + Return the formula with variable assigned (ready to be displayed) @param formula - the formula to work @param seqStruct - struct where is stocked int values @@ -199,7 +199,7 @@ namespace autonum /** @brief AssignVariables::replaceVariable - Replace the variables in @formula in form %{my-var} + Replace the variables in formula in form %{my-var} to the corresponding value stored in dc @param formula @param dc @@ -354,7 +354,7 @@ namespace autonum /** @brief setSequentialToList - Append all sequential of type @type owned by @context in list + Append all sequential of type type owned by context in list @param list : list to have value inserted @param context : numerotation context to retrieve value @param type : type of sequential @@ -379,7 +379,7 @@ namespace autonum /** @brief setFolioSequentialToHash - Insert all value of @list in @hash with key @autoNumName + Insert all value of list in hash with key autoNumName @param list : list to get values from @param hash : hash to have values inserted @param autoNumName : name to use as key of hash @@ -542,7 +542,7 @@ namespace autonum @param location @return the prefix for an element represented by location, prefix can be null. - Search for a prefix only if @location represent + Search for a prefix only if location represent an element embedded in a project */ QString elementPrefixForLocation(const ElementsLocation &location) diff --git a/sources/autoNum/numerotationcontext.cpp b/sources/autoNum/numerotationcontext.cpp index 638e81792..7751de901 100644 --- a/sources/autoNum/numerotationcontext.cpp +++ b/sources/autoNum/numerotationcontext.cpp @@ -59,7 +59,8 @@ bool NumerotationContext::addValue(const QString &type, const QVariant &value, c /** @brief NumerotationContext::operator [] - @return the string at position @i + @param i + @return the string at position i */ QString NumerotationContext::operator [] (const int &i) const { return (content_.at(i)); @@ -90,7 +91,8 @@ bool NumerotationContext::isEmpty() const { } /** @brief NumerotationContext::itemAt - @return the content at position @i 1:type 2:value 3:increase + @param i + @return the content at position i 1:type 2:value 3:increase */ QStringList NumerotationContext::itemAt(const int i) const { return (content_.at(i).split("|")); @@ -114,7 +116,7 @@ QString NumerotationContext::validRegExpNumber() const { /** @brief NumerotationContext::keyIsAcceptable - @return true if @type is acceptable + @return true if type is acceptable */ bool NumerotationContext::keyIsAcceptable(const QString &type) const { return (type.contains(QRegExp(validRegExpNum()))); @@ -122,7 +124,7 @@ bool NumerotationContext::keyIsAcceptable(const QString &type) const { /** @brief NumerotationContext::keyIsNumber - @return true if @type represent a number + @return true if type represent a number */ bool NumerotationContext::keyIsNumber(const QString &type) const { return (type.contains(QRegExp(validRegExpNumber()))); @@ -130,7 +132,7 @@ bool NumerotationContext::keyIsNumber(const QString &type) const { /** @brief NumerotationContext::toXml - Save the numerotation context in a QDomElement under the element name @str + Save the numerotation context in a QDomElement under the element name str */ QDomElement NumerotationContext::toXml(QDomDocument &d, const QString& str) { QDomElement num_auto = d.createElement(str); @@ -152,7 +154,7 @@ QDomElement NumerotationContext::toXml(QDomDocument &d, const QString& str) { /** @brief NumerotationContext::fromXml - load numerotation context from @e + load numerotation context from e */ void NumerotationContext::fromXml(QDomElement &e) { clear(); @@ -163,7 +165,7 @@ void NumerotationContext::fromXml(QDomElement &e) { @brief NumerotationContext::replaceValue This class replaces the current NC field value with content @param index of NC Item - @param QString content to replace current value + @param content to replace current value */ void NumerotationContext::replaceValue(int index, QString content) { QString sep = "|"; diff --git a/sources/autoNum/numerotationcontextcommands.cpp b/sources/autoNum/numerotationcontextcommands.cpp index dc9b5f967..67b64bad0 100644 --- a/sources/autoNum/numerotationcontextcommands.cpp +++ b/sources/autoNum/numerotationcontextcommands.cpp @@ -84,7 +84,7 @@ QString NumerotationContextCommands::toRepresentedString() { /** @brief NumerotationContextCommands::setNumStrategy - apply the good strategy relative to @str + apply the good strategy relative to str */ void NumerotationContextCommands::setNumStrategy(const QString &str) { if (strategy_) delete strategy_; @@ -159,7 +159,7 @@ NumStrategy::~NumStrategy() {} /** @brief NumStrategy::nextString - @return the next value of @nc at position @i + @return the next value of nc at position i */ NumerotationContext NumStrategy::nextString (const NumerotationContext &nc, const int i) const { QStringList strl = nc.itemAt(i); @@ -182,7 +182,7 @@ NumerotationContext NumStrategy::nextNumber (const NumerotationContext &nc, cons /** @brief NumStrategy::previousNumber - @return the previous value of @nc at position @i + @return the previous value of nc at position i */ NumerotationContext NumStrategy::previousNumber(const NumerotationContext &nc, const int i) const { QStringList strl = nc.itemAt(i); diff --git a/sources/autoNum/ui/autonumberingmanagementw.cpp b/sources/autoNum/ui/autonumberingmanagementw.cpp index a7361a486..61e24d6a4 100644 --- a/sources/autoNum/ui/autonumberingmanagementw.cpp +++ b/sources/autoNum/ui/autonumberingmanagementw.cpp @@ -182,14 +182,14 @@ void AutoNumberingManagementW::on_m_apply_project_rb_clicked() { /** @brief AutoNumberingManagementW::on_buttonBox_clicked - Action on @buttonBox clicked + Action on buttonBox clicked @param button */ void AutoNumberingManagementW::on_buttonBox_clicked(QAbstractButton *button) { //transform button to int int answer = ui -> buttonBox -> buttonRole(button); switch (answer) { - //apply the context in the diagram displayed by @diagram_chooser. + //apply the context in the diagram displayed by diagram_chooser. case QDialogButtonBox::ApplyRole: applyEnable(false); emit applyPressed();