Fix some doxygen issues

This commit is contained in:
Simon De Backer
2020-08-20 17:44:59 +02:00
parent f24f04084c
commit d1c91a7fc2
16 changed files with 91 additions and 64 deletions

View File

@@ -23,8 +23,10 @@
Default constructor with old and new value
This command don't take ownership of object
@param object
@param property_name
@param old_value
@param new_value
@param parent
*/
QPropertyUndoCommand::QPropertyUndoCommand(QObject *object,
const char *property_name,
@@ -44,6 +46,7 @@ QPropertyUndoCommand::QPropertyUndoCommand(QObject *object,
Call setNewValue to setup the new value of the edited QObject
This command don't take ownership of object
@param object
@param property_name
@param old_value
@param parent
*/
@@ -57,6 +60,10 @@ QPropertyUndoCommand::QPropertyUndoCommand(QObject *object,
m_old_value(old_value)
{}
/**
@brief QPropertyUndoCommand::QPropertyUndoCommand
@param other
*/
QPropertyUndoCommand::QPropertyUndoCommand(const QPropertyUndoCommand *other)
{
m_object = other->m_object;
@@ -89,8 +96,9 @@ void QPropertyUndoCommand::enableAnimation (bool animate) {
/**
@brief QPropertyUndoCommand::setAnimated
@param animate = true for animate this undo
@param first_time = if true, the first animation is done at the first call of redo
if false, the first animation is done at the second call of redo.
@param first_time = if true,
the first animation is done at the first call of redo if false,
the first animation is done at the second call of redo.
*/
void QPropertyUndoCommand::setAnimated(bool animate, bool first_time)
{
@@ -108,7 +116,8 @@ bool QPropertyUndoCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id() || other->childCount()) return false;
QPropertyUndoCommand const *undo = static_cast<const QPropertyUndoCommand *>(other);
if (m_object != undo->m_object || m_property_name != undo->m_property_name) return false;
if (m_object != undo->m_object
|| m_property_name != undo->m_property_name) return false;
m_new_value = undo->m_new_value;
return true;
}

View File

@@ -22,6 +22,7 @@
@brief QWidgetAnimation::QWidgetAnimation
@param widget : widget to animate
@param orientation : animate widget horizontally or vertically
@param behavior :
@param duration : the duration of animation
@see void QVariantAnimation::setDuration(int msecs)
*/

View File

@@ -22,7 +22,7 @@
/**
@brief QetGraphicsHandlerItem::QetGraphicsHandlerItem
@param size, the size of the handler
@param size : the size of the handler
*/
QetGraphicsHandlerItem::QetGraphicsHandlerItem(qreal size) :
m_size(size)
@@ -43,7 +43,7 @@ QRectF QetGraphicsHandlerItem::boundingRect() const {
/**
@brief QetGraphicsHandlerItem::setColor
@param color, set the color of the handler
@param color : set the color of the handler
*/
void QetGraphicsHandlerItem::setColor(QColor color)
{
@@ -81,6 +81,7 @@ void QetGraphicsHandlerItem::paint(QPainter *painter,
/**
@brief QetGraphicsHandlerItem::handlerForPoint
@param points
@param size
@return A list of handler with pos at point
*/
QVector<QetGraphicsHandlerItem *> QetGraphicsHandlerItem::handlerForPoint(

View File

@@ -91,7 +91,7 @@ QVector<QPointF> QetGraphicsHandlerUtility::pointsForArc(const QRectF &rect, qre
/**
@brief QetGraphicsHandlerUtility::rectForPosAtIndex
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 pos - the new position of a key point
@param index - the index of the key point to modifie
@@ -120,8 +120,8 @@ QRectF QetGraphicsHandlerUtility::rectForPosAtIndex(const QRectF &old_rect, cons
/**
@brief QetGraphicsHandlerUtility::mirrorRectForPosAtIndex
Return a rectangle after modification of the point '@pos'
at index '@index' of original rectangle '@old_rect'.
Return a rectangle after modification of the point 'pos'
at index 'index' of original rectangle 'old_rect'.
the opposite edge is modified inversely (like a mirror)
@param old_rect : the rectangle befor modification
@param pos : the new position of a key point

View File

@@ -35,7 +35,7 @@ SearchAndReplaceWorker::SearchAndReplaceWorker()
@brief SearchAndReplaceWorker::replaceDiagram
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,
@param diagram_list : list of diagram to be changed,
all diagrams must belong to the same project;
*/
void SearchAndReplaceWorker::replaceDiagram(QList<Diagram *> diagram_list)
@@ -241,17 +241,17 @@ void SearchAndReplaceWorker::replaceConductor(Conductor *conductor)
Apply the change of text according to the current advancedStruct
All items in the 4 list must belong to the same QETProject,
if not this function do nothing
@param d
@param e
@param t
@param c
@param diagrams :
@param elements :
@param texts :
@param conductors :
*/
void SearchAndReplaceWorker::replaceAdvanced(QList<Diagram *> diagrams, QList<Element *> elements, QList<IndependentTextItem *> texts, QList<Conductor *> conductors)
{
QETProject *project_ = nullptr;
//Some test to check if a least one list have one item
//and if all items belong to the same project
//Some test to check if a least one list have one item
//and if all items belong to the same project
if (!diagrams.isEmpty()) {
project_ = diagrams.first()->project();
} else if (!elements.isEmpty() && elements.first()->diagram()) {
@@ -284,7 +284,7 @@ void SearchAndReplaceWorker::replaceAdvanced(QList<Diagram *> diagrams, QList<El
return;
}
}
//The end of the test
//The end of the test
int who = m_advanced_struct.who;
if (who == -1) {

View File

@@ -26,6 +26,7 @@ typedef SearchAndReplaceWorker sarw;
/**
@brief ReplaceConductorDialog::ReplaceConductorDialog
@param properties
@param parent
*/
ReplaceConductorDialog::ReplaceConductorDialog(const ConductorProperties &properties, QWidget *parent) :

View File

@@ -62,7 +62,7 @@ void ConductorAutoNumerotation::numerate() {
/**
@brief ConductorAutoNumerotation::applyText
apply the text @t to @conductor_
apply the text t to conductor_
and all conductors at the same potential
@param t : Conductor text
*/
@@ -215,7 +215,7 @@ void ConductorAutoNumerotation::numeratePotential()
/**
@brief ConductorAutoNumerotation::numerateNewConductor
create and apply a new numerotation to @m_conductor
create and apply a new numerotation to m_conductor
*/
void ConductorAutoNumerotation::numerateNewConductor()
{

View File

@@ -107,7 +107,7 @@ QString ConductorNumExport::wiresNum() const
/**
@brief ConductorNumExport::fillHash
@value m_hash
make/fill of m_hash
*/
void ConductorNumExport::fillHash()
{

View File

@@ -480,6 +480,7 @@ QList<CustomElementPart *> ScalePartsCommand::scaledPrimitives() const {
}
/**
@brief ScalePartsCommand::setTransformation
Define the transformation applied by this command
@param original_rect Bounding rectangle for all scaled primitives before the operation
@param original_rect Bounding rectangle for all scaled primitives after the operation

View File

@@ -424,8 +424,9 @@ void QETElementEditor::setupMenus() {
/**
@brief QETElementEditor::contextMenu
Display a context menu, with all available action.
@param p, the pos of the menu, in screen coordinate
@param actions, a list of actions who can be prepended to the context menu.
@param p : the pos of the menu, in screen coordinate
@param actions :
a list of actions who can be prepended to the context menu.
*/
void QETElementEditor::contextMenu(QPoint p, QList<QAction *> actions) {
QMenu menu(this);

View File

@@ -35,8 +35,8 @@ QetGraphicsTableFactory::QetGraphicsTableFactory()
/**
@brief QetGraphicsTableFactory::createAndAddNomenclature
Open a dialog for ask user the config of the table ,create a nomenclature table
and add it to diagram @diagram;
Open a dialog for ask user the config of the table,
create a nomenclature table and add it to diagram
@param diagram
*/
void QetGraphicsTableFactory::createAndAddNomenclature(Diagram *diagram)
@@ -51,8 +51,8 @@ void QetGraphicsTableFactory::createAndAddNomenclature(Diagram *diagram)
/**
@brief QetGraphicsTableFactory::createAndAddSummary
Open a dialog for ask user the config of the table ,create a summary table
and add it to diagram @diagram;
Open a dialog for ask user the config of the table,
create a summary table and add it to diagram
@param diagram
*/
void QetGraphicsTableFactory::createAndAddSummary(Diagram *diagram)

View File

@@ -1512,15 +1512,15 @@ void QETDiagramEditor::slot_updateComplexActions()
bool ro = diagram_->isReadOnly();
//Number of selected conductors
//Number of selected conductors
int selected_conductors_count = diagram_->selectedConductors().count();
m_conductor_reset->setEnabled(!ro && selected_conductors_count);
// number of selected elements
// number of selected elements
int selected_elements_count = dc.count(DiagramContent::Elements);
m_find_element->setEnabled(selected_elements_count == 1);
//Action that need items (elements, conductors, texts...) selected, to be enabled
//Action that need items (elements, conductors, texts...) selected, to be enabled
bool copiable_items = dc.hasCopiableItems();
bool deletable_items = dc.hasDeletableItems();
m_cut -> setEnabled(!ro && copiable_items);
@@ -1552,7 +1552,7 @@ void QETDiagramEditor::slot_updateComplexActions()
else
m_group_selected_texts->setDisabled(true);
// actions need only one editable item
// actions need only one editable item
int selected_image = dc.count(DiagramContent::Images);
int selected_shape = dc.count(DiagramContent::Shapes);
@@ -1565,32 +1565,32 @@ void QETDiagramEditor::slot_updateComplexActions()
if (selected_editable == 1)
{
m_edit_selection -> setEnabled(true);
//edit element
//edit element
if (selected_elements_count)
{
m_edit_selection -> setText(tr("Éditer l'élement", "edit element"));
m_edit_selection -> setIcon(QET::Icons::ElementEdit);
}
//edit text field
//edit text field
else if (selected_texts)
{
m_edit_selection -> setText(tr("Éditer le champ de texte", "edit text field"));
m_edit_selection -> setIcon(QET::Icons::EditText);
}
//edit image
//edit image
else if (selected_image)
{
m_edit_selection -> setText(tr("Éditer l'image", "edit image"));
m_edit_selection -> setIcon(QET::Icons::resize_image);
}
//edit conductor
//edit conductor
else if (selected_conductors_count)
{
m_edit_selection -> setText(tr("Éditer le conducteur", "edit conductor"));
m_edit_selection -> setIcon(QET::Icons::ConductorEdit);
}
}
//not an editable item
//not an editable item
else
{
m_edit_selection -> setText(tr("Éditer l'objet sélectionné", "edit selected item"));
@@ -1644,6 +1644,7 @@ void QETDiagramEditor::slot_updateModeActions()
}
/**
@brief QETDiagramEditor::slot_updatePasteAction
Gere les actions ayant besoin du presse-papier
*/
void QETDiagramEditor::slot_updatePasteAction() {
@@ -1656,9 +1657,9 @@ void QETDiagramEditor::slot_updatePasteAction() {
/**
@brief QETDiagramEditor::addProjectView
Add a new project view to workspace and
build the connection between the projectview / project and this QETDiagramEditor.
@param project_view, project view to add
Add a new project view to workspace and build the connection between
the projectview / project and this QETDiagramEditor.
@param project_view : project view to add
*/
void QETDiagramEditor::addProjectView(ProjectView *project_view)
{
@@ -1682,7 +1683,7 @@ void QETDiagramEditor::addProjectView(ProjectView *project_view)
// display error messages sent by the project view
connect(project_view, SIGNAL(errorEncountered(QString)), this, SLOT(showError(const QString &)));
//We maximise the new window if the current window is inexistent or maximized
//We maximise the new window if the current window is inexistent or maximized
QWidget *current_window = m_workspace.activeSubWindow();
bool maximise = ((!current_window) || (current_window -> windowState() & Qt::WindowMaximized));
@@ -1691,9 +1692,9 @@ void QETDiagramEditor::addProjectView(ProjectView *project_view)
sub_window -> setWindowIcon(project_view -> windowIcon());
sub_window -> systemMenu() -> clear();
//By defaut QMdiSubWindow have a QAction "close" with shortcut QKeySequence::Close
//But the QAction m_close_file of this class have the same shortcut too.
//We remove the shortcut of the QAction of QMdiSubWindow for avoid conflic
//By defaut QMdiSubWindow have a QAction "close" with shortcut QKeySequence::Close
//But the QAction m_close_file of this class have the same shortcut too.
//We remove the shortcut of the QAction of QMdiSubWindow for avoid conflic
for(QAction *act : sub_window->actions())
{
if(act->shortcut() == QKeySequence::Close)
@@ -2124,7 +2125,7 @@ void QETDiagramEditor::removeDiagramFromProject()
/**
@brief QETDiagramEditor::diagramWasAdded
Manage the adding of diagram view in a project
@param dv, added diagram view
@param dv : added diagram view
*/
void QETDiagramEditor::diagramWasAdded(DiagramView *dv)
{
@@ -2134,7 +2135,7 @@ void QETDiagramEditor::diagramWasAdded(DiagramView *dv)
/**
@brief QETDiagramEditor::findElementInPanel
Find the item for @location in the element panel
Find the item for location in the element panel
@param location
*/
void QETDiagramEditor::findElementInPanel(const ElementsLocation &location)

View File

@@ -35,7 +35,7 @@ static int no_model_width = 40;
/**
@brief QetGraphicsTableItem::adjustTableToFolio
Adjust the table @table to fit at best the folio
Adjust the table to fit at best the folio
@param table : table to adjust
@param margins : margins between table and folio.
*/
@@ -63,8 +63,9 @@ void QetGraphicsTableItem::adjustTableToFolio(QetGraphicsTableItem *table, QMarg
/**
@brief QetGraphicsTableItem::checkInsufficientRowsCount
Check if the number of rows of @table + linked table is enough to display all
content of the model, if not open a dialog to advise user what to do.
Check if the number of rows of table + linked table is enough
to display all content of the model,
if not open a dialog to advise user what to do.
@param table
*/
void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *table)
@@ -286,7 +287,7 @@ void QetGraphicsTableItem::paint(QPainter *painter, const QStyleOptionGraphicsIt
/**
@brief QetGraphicsTableItem::setSize
Set the current size of the table to @size
Set the current size of the table to size
@param size
*/
void QetGraphicsTableItem::setSize(const QSize &size)
@@ -370,13 +371,17 @@ int QetGraphicsTableItem::displayNRow() const {
/**
@brief QetGraphicsTableItem::setPreviousTable
Set the previous table to @table.
If this table already have a previous table, the previous table will be replaced.
Set the previous table to table.
If this table already have a previous table,
the previous table will be replaced.
Set new table to nullptr to remove an existing previous table.
The table uses the model of the new previous table.
Since the table does not take ownership of the model, it is your responsibility to manage the old model.
Linked tables (table with next and/or previous table) share the same model, a table always take the model of the previous table..
When remove a previous table (set to nullptr) from a table, the model is also removed, you need to set a new model
Since the table does not take ownership of the model,
it is your responsibility to manage the old model.
Linked tables (table with next and/or previous table)
share the same model, a table always take the model of the previous table.
When remove a previous table (set to nullptr) from a table,
the model is also removed, you need to set a new model
@param table
*/
void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table)
@@ -406,7 +411,7 @@ void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table)
/**
@brief QetGraphicsTableItem::setNextTable
Set the next table to @table
Set the next table to table
nullptr will remove an existing next table.
@param table
*/

View File

@@ -19,10 +19,9 @@
#include "diagram.h"
/**
@brief QetGraphicsItem::QetGraphicsItem Default constructor
@param uuid, uuid of the item
@param diagram, diagram aka QGraphicsScene of the item
@param parent, Parent Item
@brief QetGraphicsItem::QetGraphicsItem
Default constructor
@param parent : Parent Item
*/
QetGraphicsItem::QetGraphicsItem(QGraphicsItem *parent):
QGraphicsObject(parent),
@@ -144,8 +143,8 @@ void QetGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
/**
@brief QetGraphicsItem::mouseReleaseEvent
*handle mouse release click
@param e
handle mouse release click
@param event
*/
void QetGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{

View File

@@ -675,6 +675,7 @@ NumerotationContext QETProject::folioAutoNum (const QString &key) const {
/**
@brief QETProject::freezeExistentConductorLabel
Freeze Existent Conductors in the selected folios
@param freeze
@param from - first folio index to apply freeze
@param to - last folio index to apply freeze
*/
@@ -687,6 +688,7 @@ void QETProject::freezeExistentConductorLabel(bool freeze, int from, int to) {
/**
@brief QETProject::freezeNewConductorLabel
Freeze New Conductors in the selected folios
@param freeze
@param from - first folio index to apply freeze
@param to - last folio index to apply freeze
*/
@@ -715,6 +717,7 @@ void QETProject::setFreezeNewConductors(bool set) {
/**
@brief QETProject::freezeExistentElementLabel
Freeze Existent Elements in the selected folios
@param freeze
@param from - first folio index to apply freeze
@param to - last folio index to apply freeze
*/
@@ -727,6 +730,7 @@ void QETProject::freezeExistentElementLabel(bool freeze, int from, int to) {
/**
@brief QETProject::freezeNewElementLabel
Freeze New Elements in the selected folios
@param freeze
@param from - first folio index to apply freeze
@param to - last folio index to apply freeze
*/
@@ -785,7 +789,9 @@ void QETProject::autoFolioNumberingNewFolios(){
/**
@brief QETProject::autoFolioNumberingNewFolios
@param autonum used, index from selected tabs "from" and "to"
@param from
@param to
@param autonum : used, index from selected tabs "from" and "to"
rename folios with selected autonum
*/
void QETProject::autoFolioNumberingSelectedFolios(int from, int to, const QString& autonum){

View File

@@ -82,16 +82,18 @@ bool QETTitleBlockTemplateEditor::isEditing(const QString &filepath) {
}
/**
@param true for this editor to prompt the user for a new template name as
soon as the window appears in order to duplicate the edited one.
@brief QETTitleBlockTemplateEditor::setOpenForDuplication
@param duplicate : true for this editor to prompt the user for a
new template name as soon as the window appears in order to duplicate
the edited one.
*/
void QETTitleBlockTemplateEditor::setOpenForDuplication(bool duplicate) {
duplicate_ = duplicate;
}
/**
@return true if this editor will prompt the user for a new template name as
soon as the window appears in order to duplicate the edited one.
@return true if this editor will prompt the user for a new template
name as soon as the window appears in order to duplicate the edited one.
*/
bool QETTitleBlockTemplateEditor::openForDuplication() const {
return(duplicate_);