From 90417ae5091ba9c02cc0ce2aed5088b665b6cb7f Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 09:40:14 +0200 Subject: [PATCH 01/24] Fix Copyright indentation --- .../elementcollectionhandler.cpp | 24 +++++++-------- .../elementcollectionhandler.h | 24 +++++++-------- .../elementscollectionwidget.cpp | 24 +++++++-------- .../elementscollectionwidget.h | 24 +++++++-------- .../ElementsCollection/ui/renamedialog.cpp | 24 +++++++-------- sources/ElementsCollection/ui/renamedialog.h | 24 +++++++-------- .../qetgraphicshandleritem.cpp | 24 +++++++-------- .../qetgraphicshandleritem.h | 24 +++++++-------- sources/conductornumexport.cpp | 24 +++++++-------- sources/conductornumexport.h | 24 +++++++-------- sources/dataBase/ui/elementquerywidget.cpp | 24 +++++++-------- sources/dataBase/ui/elementquerywidget.h | 24 +++++++-------- sources/diagramevent/diagrameventaddimage.cpp | 24 +++++++-------- sources/diagramevent/diagrameventaddimage.h | 24 +++++++-------- sources/diagramevent/diagrameventaddtext.cpp | 24 +++++++-------- sources/diagramevent/diagrameventaddtext.h | 24 +++++++-------- sources/editor/ui/polygoneditor.cpp | 24 +++++++-------- sources/editor/ui/polygoneditor.h | 24 +++++++-------- sources/factory/propertieseditorfactory.h | 24 +++++++-------- sources/factory/qetgraphicstablefactory.cpp | 24 +++++++-------- sources/factory/qetgraphicstablefactory.h | 24 +++++++-------- .../qetgraphicsitem/ViewItem/projectdbmodel.h | 24 +++++++-------- .../ViewItem/qetgraphicsheaderitem.h | 24 +++++++-------- .../ui/projectdbmodelpropertieswidget.cpp | 24 +++++++-------- .../ui/projectdbmodelpropertieswidget.h | 24 +++++++-------- sources/qetxml.cpp | 24 +++++++-------- sources/qetxml.h | 24 +++++++-------- sources/titleblock/helpercell.h | 30 +++++++++---------- sources/titleblock/splittedhelpercell.h | 30 +++++++++---------- sources/titleblock/templatevisualcell.h | 30 +++++++++---------- sources/ui/bomexportdialog.cpp | 26 ++++++++-------- sources/ui/bomexportdialog.h | 24 +++++++-------- sources/ui/marginseditdialog.cpp | 24 +++++++-------- sources/ui/marginseditdialog.h | 24 +++++++-------- sources/undocommand/itemmodelcommand.cpp | 24 +++++++-------- sources/undocommand/itemmodelcommand.h | 24 +++++++-------- sources/utils/macosxopenevent.cpp | 24 +++++++-------- sources/utils/macosxopenevent.h | 24 +++++++-------- sources/utils/qetutils.cpp | 24 +++++++-------- sources/utils/qetutils.h | 24 +++++++-------- 40 files changed, 490 insertions(+), 490 deletions(-) diff --git a/sources/ElementsCollection/elementcollectionhandler.cpp b/sources/ElementsCollection/elementcollectionhandler.cpp index 653516593..4aa390792 100644 --- a/sources/ElementsCollection/elementcollectionhandler.cpp +++ b/sources/ElementsCollection/elementcollectionhandler.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "elementcollectionhandler.h" #include "renamedialog.h" diff --git a/sources/ElementsCollection/elementcollectionhandler.h b/sources/ElementsCollection/elementcollectionhandler.h index 0bad24579..cdcc5281d 100644 --- a/sources/ElementsCollection/elementcollectionhandler.h +++ b/sources/ElementsCollection/elementcollectionhandler.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef ELEMENTCOLLECTIONHANDLER_H #define ELEMENTCOLLECTIONHANDLER_H diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index 308150307..d8f512723 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "elementscollectionwidget.h" #include "elementscollectionmodel.h" diff --git a/sources/ElementsCollection/elementscollectionwidget.h b/sources/ElementsCollection/elementscollectionwidget.h index 2f5c37b6d..e3a2ba92e 100644 --- a/sources/ElementsCollection/elementscollectionwidget.h +++ b/sources/ElementsCollection/elementscollectionwidget.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef ELEMENTSCOLLECTIONWIDGET_H #define ELEMENTSCOLLECTIONWIDGET_H diff --git a/sources/ElementsCollection/ui/renamedialog.cpp b/sources/ElementsCollection/ui/renamedialog.cpp index a1621299e..9ca1f7bde 100644 --- a/sources/ElementsCollection/ui/renamedialog.cpp +++ b/sources/ElementsCollection/ui/renamedialog.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "renamedialog.h" diff --git a/sources/ElementsCollection/ui/renamedialog.h b/sources/ElementsCollection/ui/renamedialog.h index 74e3d5d47..f2db9ab34 100644 --- a/sources/ElementsCollection/ui/renamedialog.h +++ b/sources/ElementsCollection/ui/renamedialog.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef RENAMEDIALOG_H #define RENAMEDIALOG_H diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp index 4c64b9f42..2a67a985a 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetgraphicshandleritem.h" #include diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h index 48f1bfc1d..185c33356 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QETGRAPHICSHANDLERITEM_H #define QETGRAPHICSHANDLERITEM_H diff --git a/sources/conductornumexport.cpp b/sources/conductornumexport.cpp index d2f45a1af..b694a9cc3 100644 --- a/sources/conductornumexport.cpp +++ b/sources/conductornumexport.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "conductornumexport.h" #include "diagram.h" diff --git a/sources/conductornumexport.h b/sources/conductornumexport.h index c741f8de9..0368482ee 100644 --- a/sources/conductornumexport.h +++ b/sources/conductornumexport.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef ConductorNumExport_H #define ConductorNumExport_H diff --git a/sources/dataBase/ui/elementquerywidget.cpp b/sources/dataBase/ui/elementquerywidget.cpp index c45efa1a2..9df711c3f 100644 --- a/sources/dataBase/ui/elementquerywidget.cpp +++ b/sources/dataBase/ui/elementquerywidget.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "elementquerywidget.h" #include "ui_elementquerywidget.h" diff --git a/sources/dataBase/ui/elementquerywidget.h b/sources/dataBase/ui/elementquerywidget.h index be9be047f..977a8d74e 100644 --- a/sources/dataBase/ui/elementquerywidget.h +++ b/sources/dataBase/ui/elementquerywidget.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef ELEMENTQUERYWIDGET_H #define ELEMENTQUERYWIDGET_H diff --git a/sources/diagramevent/diagrameventaddimage.cpp b/sources/diagramevent/diagrameventaddimage.cpp index 47cb67cfe..f6b99d831 100644 --- a/sources/diagramevent/diagrameventaddimage.cpp +++ b/sources/diagramevent/diagrameventaddimage.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "diagrameventaddimage.h" diff --git a/sources/diagramevent/diagrameventaddimage.h b/sources/diagramevent/diagrameventaddimage.h index c63ff04c1..9f23e7250 100644 --- a/sources/diagramevent/diagrameventaddimage.h +++ b/sources/diagramevent/diagrameventaddimage.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef DIAGRAMEVENTADDIMAGE_H #define DIAGRAMEVENTADDIMAGE_H diff --git a/sources/diagramevent/diagrameventaddtext.cpp b/sources/diagramevent/diagrameventaddtext.cpp index 51b9dee23..e18414f8e 100644 --- a/sources/diagramevent/diagrameventaddtext.cpp +++ b/sources/diagramevent/diagrameventaddtext.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "diagrameventaddtext.h" diff --git a/sources/diagramevent/diagrameventaddtext.h b/sources/diagramevent/diagrameventaddtext.h index 4969ec7be..f84ba44df 100644 --- a/sources/diagramevent/diagrameventaddtext.h +++ b/sources/diagramevent/diagrameventaddtext.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef DIAGRAMEVENTADDTEXT_H #define DIAGRAMEVENTADDTEXT_H diff --git a/sources/editor/ui/polygoneditor.cpp b/sources/editor/ui/polygoneditor.cpp index dae6a3d1f..bea8ae54a 100644 --- a/sources/editor/ui/polygoneditor.cpp +++ b/sources/editor/ui/polygoneditor.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "polygoneditor.h" #include "ui_polygoneditor.h" diff --git a/sources/editor/ui/polygoneditor.h b/sources/editor/ui/polygoneditor.h index 41ebb85f8..66117d100 100644 --- a/sources/editor/ui/polygoneditor.h +++ b/sources/editor/ui/polygoneditor.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef POLYGONEDITOR_H #define POLYGONEDITOR_H diff --git a/sources/factory/propertieseditorfactory.h b/sources/factory/propertieseditorfactory.h index 986af0c55..1e194bf70 100644 --- a/sources/factory/propertieseditorfactory.h +++ b/sources/factory/propertieseditorfactory.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef PROPERTIESEDITORFACTORY_H #define PROPERTIESEDITORFACTORY_H diff --git a/sources/factory/qetgraphicstablefactory.cpp b/sources/factory/qetgraphicstablefactory.cpp index a24d5288e..e120e1621 100644 --- a/sources/factory/qetgraphicstablefactory.cpp +++ b/sources/factory/qetgraphicstablefactory.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetgraphicstablefactory.h" #include "qetgraphicstableitem.h" diff --git a/sources/factory/qetgraphicstablefactory.h b/sources/factory/qetgraphicstablefactory.h index 4ad36068b..868467623 100644 --- a/sources/factory/qetgraphicstablefactory.h +++ b/sources/factory/qetgraphicstablefactory.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QETGRAPHICSTABLEFACTORY_H #define QETGRAPHICSTABLEFACTORY_H diff --git a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h index 8e80d4c92..f04271e38 100644 --- a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h +++ b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef PROJECTDBMODEL_H #define PROJECTDBMODEL_H diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h index e46376bef..323c36cca 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QETGRAPHICSHEADERITEM_H #define QETGRAPHICSHEADERITEM_H diff --git a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp index db47de28d..2108a1c7c 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp +++ b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "projectdbmodelpropertieswidget.h" #include "ui_projectdbmodelpropertieswidget.h" diff --git a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h index 5babea85f..c46ca3f04 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h +++ b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef PROJECTDBMODELPROPERTIESWIDGET_H #define PROJECTDBMODELPROPERTIESWIDGET_H diff --git a/sources/qetxml.cpp b/sources/qetxml.cpp index c2424fb83..433ea7eff 100644 --- a/sources/qetxml.cpp +++ b/sources/qetxml.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetxml.h" #include "nameslist.h" diff --git a/sources/qetxml.h b/sources/qetxml.h index 8710d35a5..aadf0e785 100644 --- a/sources/qetxml.h +++ b/sources/qetxml.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QETXML_H #define QETXML_H diff --git a/sources/titleblock/helpercell.h b/sources/titleblock/helpercell.h index 5763d7390..e2b85c37a 100644 --- a/sources/titleblock/helpercell.h +++ b/sources/titleblock/helpercell.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. - - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. + + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef TITLEBLOCK_SLASH_HELPER_CELL_H #define TITLEBLOCK_SLASH_HELPER_CELL_H diff --git a/sources/titleblock/splittedhelpercell.h b/sources/titleblock/splittedhelpercell.h index ca60b45dd..657ac488e 100644 --- a/sources/titleblock/splittedhelpercell.h +++ b/sources/titleblock/splittedhelpercell.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. - - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. + + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef TITLEBLOCK_SLASH_SPLITTED_HELPER_CELL_H #define TITLEBLOCK_SLASH_SPLITTED_HELPER_CELL_H diff --git a/sources/titleblock/templatevisualcell.h b/sources/titleblock/templatevisualcell.h index 35af4f7b7..030019c69 100644 --- a/sources/titleblock/templatevisualcell.h +++ b/sources/titleblock/templatevisualcell.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. - - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. - - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. + + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H #define TITLEBLOCK_SLASH_QET_TEMPLATE_VISUAL_CELL_H diff --git a/sources/ui/bomexportdialog.cpp b/sources/ui/bomexportdialog.cpp index 5ba87401f..8725d095b 100644 --- a/sources/ui/bomexportdialog.cpp +++ b/sources/ui/bomexportdialog.cpp @@ -1,19 +1,19 @@ - /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. +/* + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "bomexportdialog.h" #include "ui_bomexportdialog.h" diff --git a/sources/ui/bomexportdialog.h b/sources/ui/bomexportdialog.h index 7c20461b2..92dabe42d 100644 --- a/sources/ui/bomexportdialog.h +++ b/sources/ui/bomexportdialog.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef BOMExportDialog_H #define BOMExportDialog_H diff --git a/sources/ui/marginseditdialog.cpp b/sources/ui/marginseditdialog.cpp index 6819715eb..332f9bbd1 100644 --- a/sources/ui/marginseditdialog.cpp +++ b/sources/ui/marginseditdialog.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "marginseditdialog.h" #include "ui_marginseditdialog.h" diff --git a/sources/ui/marginseditdialog.h b/sources/ui/marginseditdialog.h index f47a63acb..073889746 100644 --- a/sources/ui/marginseditdialog.h +++ b/sources/ui/marginseditdialog.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef MARGINSEDITDIALOG_H #define MARGINSEDITDIALOG_H diff --git a/sources/undocommand/itemmodelcommand.cpp b/sources/undocommand/itemmodelcommand.cpp index e12f64a2f..feb4ec54e 100644 --- a/sources/undocommand/itemmodelcommand.cpp +++ b/sources/undocommand/itemmodelcommand.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "itemmodelcommand.h" diff --git a/sources/undocommand/itemmodelcommand.h b/sources/undocommand/itemmodelcommand.h index b66e16e80..4f96c578d 100644 --- a/sources/undocommand/itemmodelcommand.h +++ b/sources/undocommand/itemmodelcommand.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef ITEMMODELCOMMAND_H #define ITEMMODELCOMMAND_H diff --git a/sources/utils/macosxopenevent.cpp b/sources/utils/macosxopenevent.cpp index b5baedcf3..88d010054 100644 --- a/sources/utils/macosxopenevent.cpp +++ b/sources/utils/macosxopenevent.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "macosxopenevent.h" #include "singleapplication.h" diff --git a/sources/utils/macosxopenevent.h b/sources/utils/macosxopenevent.h index 964cf855c..60a4f0b0b 100644 --- a/sources/utils/macosxopenevent.h +++ b/sources/utils/macosxopenevent.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef MACOSXOPENEVENT_H #define MACOSXOPENEVENT_H diff --git a/sources/utils/qetutils.cpp b/sources/utils/qetutils.cpp index cd87e6416..82861001d 100644 --- a/sources/utils/qetutils.cpp +++ b/sources/utils/qetutils.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetutils.h" #include diff --git a/sources/utils/qetutils.h b/sources/utils/qetutils.h index de4884b55..aba43d16d 100644 --- a/sources/utils/qetutils.h +++ b/sources/utils/qetutils.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 The QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QETUTILS_H #define QETUTILS_H From d4ee161c07fb934244454cb411c44a94cfcdf459 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 11:19:36 +0200 Subject: [PATCH 02/24] Mod doc set style de same --- SingleApplication/singleapplication.cpp | 16 +- SingleApplication/singleapplication.h | 100 ++-- SingleApplication/singleapplication_p.cpp | 4 +- .../elementcollectionhandler.cpp | 64 +-- .../elementcollectionhandler.h | 34 +- .../elementcollectionitem.cpp | 94 ++-- .../elementcollectionitem.h | 10 +- .../elementscollectionmodel.cpp | 18 +- .../elementscollectionwidget.cpp | 192 ++++---- .../elementscollectionwidget.h | 10 +- .../ElementsCollection/elementslocation.cpp | 2 +- .../ElementsCollection/elementstreeview.cpp | 22 +- sources/ElementsCollection/elementstreeview.h | 10 +- .../fileelementcollectionitem.h | 8 +- .../xmlelementcollection.cpp | 306 ++++++------ .../ElementsCollection/xmlelementcollection.h | 46 +- .../xmlprojectelementcollectionitem.cpp | 112 ++--- .../xmlprojectelementcollectionitem.h | 6 +- sources/NameList/nameslist.cpp | 18 +- sources/NameList/ui/namelistdialog.cpp | 8 +- sources/NameList/ui/namelistdialog.h | 6 +- sources/NameList/ui/namelistwidget.cpp | 42 +- sources/NameList/ui/namelistwidget.h | 6 +- .../PropertiesEditor/propertieseditordialog.h | 20 +- .../propertieseditordockwidget.cpp | 68 +-- .../propertieseditorwidget.cpp | 48 +- .../PropertiesEditor/propertieseditorwidget.h | 8 +- .../qpropertyundocommand.cpp | 78 ++-- .../qpropertyundocommand.h | 12 +- sources/QWidgetAnimation/qwidgetanimation.cpp | 46 +- sources/QWidgetAnimation/qwidgetanimation.h | 22 +- .../qetgraphicshandleritem.cpp | 36 +- .../qetgraphicshandleritem.h | 12 +- .../qetgraphicshandlerutility.cpp | 157 ++++--- .../qetgraphicshandlerutility.h | 10 +- .../searchandreplaceworker.cpp | 137 +++--- .../SearchAndReplace/searchandreplaceworker.h | 7 +- .../ui/replaceadvanceddialog.cpp | 28 +- .../ui/replaceconductordialog.cpp | 22 +- .../ui/replaceconductordialog.h | 6 +- .../ui/replaceelementdialog.cpp | 14 +- .../ui/replacefoliowidget.cpp | 26 +- .../ui/searchandreplacewidget.cpp | 248 +++++----- sources/autoNum/assignvariables.cpp | 125 ++--- sources/autoNum/assignvariables.h | 8 +- sources/autoNum/numerotationcontext.cpp | 98 ++-- sources/autoNum/numerotationcontext.h | 2 +- .../autoNum/numerotationcontextcommands.cpp | 362 +++++++------- sources/autoNum/numerotationcontextcommands.h | 5 +- .../autoNum/ui/autonumberingdockwidget.cpp | 90 ++-- sources/autoNum/ui/folioautonumbering.cpp | 72 +-- sources/autoNum/ui/formulaautonumberingw.cpp | 32 +- sources/autoNum/ui/numparteditorw.cpp | 62 +-- sources/autoNum/ui/numparteditorw.h | 2 +- sources/autoNum/ui/selectautonumw.cpp | 64 +-- sources/bordertitleblock.cpp | 14 +- sources/conductornumexport.cpp | 28 +- sources/conductornumexport.h | 6 +- sources/conductorproperties.cpp | 40 +- sources/configdialog.cpp | 8 +- sources/configpages.cpp | 68 +-- sources/createdxf.cpp | 52 +-- sources/dataBase/projectdatabase.cpp | 106 ++--- sources/dataBase/projectdatabase.h | 10 +- sources/dataBase/ui/elementquerywidget.cpp | 104 ++--- sources/dataBase/ui/elementquerywidget.h | 8 +- sources/dataBase/ui/summaryquerywidget.cpp | 92 ++-- sources/diagram.cpp | 4 +- sources/diagramcontent.cpp | 128 ++--- sources/diagramcontext.cpp | 36 +- sources/diagramcontext.h | 2 +- .../diagramevent/diagrameventaddelement.cpp | 92 ++-- sources/diagramevent/diagrameventaddelement.h | 8 +- sources/diagramevent/diagrameventaddimage.cpp | 58 +-- sources/diagramevent/diagrameventaddimage.h | 6 +- sources/diagramevent/diagrameventaddshape.cpp | 54 +-- sources/diagramevent/diagrameventaddshape.h | 6 +- sources/diagramevent/diagrameventaddtext.cpp | 18 +- sources/diagramevent/diagrameventaddtext.h | 6 +- .../diagramevent/diagrameventinterface.cpp | 8 +- sources/diagramevent/diagrameventinterface.h | 28 +- sources/diagramview.cpp | 152 +++--- sources/dvevent/dveventinterface.cpp | 12 +- sources/dvevent/dveventinterface.h | 24 +- .../editor/UndoCommand/pastepartscommand.cpp | 40 +- .../editor/UndoCommand/pastepartscommand.h | 6 +- sources/editor/arceditor.cpp | 52 +-- sources/editor/arceditor.h | 9 +- sources/editor/editorcommands.cpp | 14 +- sources/editor/editorcommands.h | 6 +- sources/editor/elementprimitivedecorator.cpp | 60 +-- sources/editor/elementscene.cpp | 2 +- sources/editor/elementview.cpp | 50 +- sources/editor/ellipseeditor.h | 8 +- sources/editor/esevent/eseventaddarc.cpp | 48 +- sources/editor/esevent/eseventaddarc.h | 6 +- .../esevent/eseventadddynamictextfield.cpp | 26 +- .../esevent/eseventadddynamictextfield.h | 6 +- sources/editor/esevent/eseventaddellipse.cpp | 34 +- sources/editor/esevent/eseventaddellipse.h | 6 +- sources/editor/esevent/eseventaddline.cpp | 38 +- sources/editor/esevent/eseventaddline.h | 6 +- sources/editor/esevent/eseventaddpolygon.cpp | 42 +- sources/editor/esevent/eseventaddpolygon.h | 6 +- sources/editor/esevent/eseventaddrect.cpp | 34 +- sources/editor/esevent/eseventaddterminal.cpp | 34 +- sources/editor/esevent/eseventaddterminal.h | 6 +- sources/editor/esevent/eseventaddtext.cpp | 26 +- sources/editor/esevent/eseventaddtext.h | 6 +- sources/editor/esevent/eseventinterface.cpp | 22 +- .../graphicspart/abstractpartellipse.cpp | 121 ++--- .../editor/graphicspart/abstractpartellipse.h | 22 +- .../graphicspart/customelementgraphicpart.cpp | 162 +++---- .../graphicspart/customelementgraphicpart.h | 10 +- sources/editor/graphicspart/partarc.cpp | 130 +++--- sources/editor/graphicspart/partarc.h | 14 +- .../graphicspart/partdynamictextfield.cpp | 140 +++--- .../graphicspart/partdynamictextfield.h | 13 +- sources/editor/graphicspart/partellipse.cpp | 126 ++--- sources/editor/graphicspart/partellipse.h | 14 +- sources/editor/graphicspart/partline.cpp | 244 +++++----- sources/editor/graphicspart/partline.h | 6 +- sources/editor/graphicspart/partpolygon.cpp | 236 +++++----- sources/editor/graphicspart/partpolygon.h | 8 +- sources/editor/graphicspart/partrectangle.cpp | 186 ++++---- sources/editor/graphicspart/partrectangle.h | 12 +- sources/editor/graphicspart/partterminal.cpp | 12 +- sources/editor/graphicspart/partterminal.h | 6 +- sources/editor/lineeditor.cpp | 40 +- sources/editor/lineeditor.h | 9 +- sources/editor/qetelementeditor.cpp | 184 ++++---- sources/editor/styleeditor.cpp | 42 +- sources/editor/ui/dynamictextfieldeditor.cpp | 24 +- sources/editor/ui/dynamictextfieldeditor.h | 6 +- .../ui/elementpropertieseditorwidget.cpp | 56 +-- .../editor/ui/elementpropertieseditorwidget.h | 8 +- sources/editor/ui/polygoneditor.cpp | 58 +-- sources/editor/ui/polygoneditor.h | 9 +- sources/editor/ui/rectangleeditor.cpp | 56 +-- sources/editor/ui/rectangleeditor.h | 12 +- sources/editor/ui/texteditor.cpp | 58 +-- sources/elementdialog.cpp | 72 +-- sources/elementprovider.cpp | 70 +-- sources/elementscategoryeditor.cpp | 40 +- sources/elementscategoryeditor.h | 6 +- sources/elementscollectioncache.cpp | 72 +-- sources/elementsmover.cpp | 46 +- sources/elementspanel.cpp | 8 +- sources/elementspanelwidget.cpp | 2 +- sources/elementtextpattern.cpp | 36 +- sources/elementtextsmover.cpp | 30 +- sources/exportproperties.cpp | 12 +- sources/factory/elementfactory.cpp | 12 +- sources/factory/elementfactory.h | 11 +- sources/factory/elementpicturefactory.cpp | 60 +-- sources/factory/elementpicturefactory.h | 20 +- sources/factory/propertieseditorfactory.cpp | 12 +- sources/factory/qetgraphicstablefactory.cpp | 36 +- sources/factory/qetgraphicstablefactory.h | 4 +- sources/factory/ui/addtabledialog.cpp | 76 +-- sources/factory/ui/addtabledialog.h | 14 +- sources/machine_info.cpp | 2 +- sources/newelementwizard.cpp | 54 +-- sources/nomenclature.cpp | 16 +- sources/projectconfigpages.cpp | 136 +++--- sources/projectview.cpp | 90 ++-- sources/properties/reportproperties.cpp | 6 +- sources/properties/xrefproperties.cpp | 54 +-- sources/properties/xrefproperties.h | 6 +- sources/qet.cpp | 66 +-- sources/qetapp.cpp | 14 +- sources/qetdiagrameditor.cpp | 236 +++++----- .../ViewItem/projectdbmodel.cpp | 140 +++--- .../qetgraphicsitem/ViewItem/projectdbmodel.h | 20 +- .../ViewItem/qetgraphicsheaderitem.cpp | 118 ++--- .../ViewItem/qetgraphicsheaderitem.h | 20 +- .../ViewItem/qetgraphicstableitem.cpp | 256 +++++----- .../ViewItem/qetgraphicstableitem.h | 22 +- .../ui/graphicstablepropertieseditor.cpp | 56 +-- .../ui/graphicstablepropertieseditor.h | 6 +- .../ui/projectdbmodelpropertieswidget.cpp | 22 +- .../ui/projectdbmodelpropertieswidget.h | 6 +- sources/qetgraphicsitem/conductor.cpp | 326 ++++++------- sources/qetgraphicsitem/conductor.h | 10 +- sources/qetgraphicsitem/conductortextitem.cpp | 52 +-- sources/qetgraphicsitem/diagramimageitem.cpp | 76 +-- sources/qetgraphicsitem/diagramtextitem.cpp | 104 ++--- .../dynamicelementtextitem.cpp | 280 +++++------ .../qetgraphicsitem/dynamicelementtextitem.h | 10 +- sources/qetgraphicsitem/element.cpp | 394 ++++++++-------- sources/qetgraphicsitem/element.h | 8 +- .../qetgraphicsitem/elementtextitemgroup.cpp | 138 +++--- .../qetgraphicsitem/elementtextitemgroup.h | 8 +- sources/qetgraphicsitem/masterelement.cpp | 80 ++-- sources/qetgraphicsitem/masterelement.h | 10 +- sources/qetgraphicsitem/qetgraphicsitem.cpp | 58 +-- sources/qetgraphicsitem/qetshapeitem.cpp | 246 +++++----- sources/qetgraphicsitem/qetshapeitem.h | 8 +- .../qetgraphicsitem/qgraphicsitemutility.cpp | 24 +- sources/qetgraphicsitem/reportelement.cpp | 28 +- sources/qetgraphicsitem/reportelement.h | 6 +- sources/qetgraphicsitem/simpleelement.cpp | 26 +- sources/qetgraphicsitem/simpleelement.h | 6 +- sources/qetgraphicsitem/slaveelement.cpp | 44 +- sources/qetgraphicsitem/terminal.cpp | 16 +- sources/qetinformation.cpp | 34 +- sources/qetproject.cpp | 440 +++++++++--------- sources/qetxml.h | 2 +- sources/recentfiles.cpp | 12 +- sources/richtext/richtexteditor.cpp | 4 +- sources/titleblock/qettemplateeditor.cpp | 22 +- sources/titleblock/templatescollection.cpp | 14 +- sources/titleblockproperties.cpp | 16 +- sources/titleblocktemplate.h | 4 +- sources/titleblocktemplaterenderer.cpp | 2 +- .../abstractelementpropertieseditorwidget.h | 6 +- sources/ui/alignmenttextdialog.cpp | 6 +- sources/ui/borderpropertieswidget.cpp | 38 +- sources/ui/borderpropertieswidget.h | 6 +- sources/ui/compositetexteditdialog.cpp | 20 +- sources/ui/compositetexteditdialog.h | 12 +- sources/ui/conductorpropertiesdialog.cpp | 40 +- sources/ui/conductorpropertieswidget.cpp | 128 ++--- .../configpage/generalconfigurationpage.cpp | 42 +- sources/ui/configsaveloaderwidget.h | 14 +- sources/ui/diagramcontextwidget.cpp | 48 +- sources/ui/diagrampropertiesdialog.cpp | 32 +- sources/ui/diagrampropertiesdialog.h | 6 +- .../ui/diagrampropertieseditordockwidget.cpp | 36 +- sources/ui/diagramselection.cpp | 16 +- sources/ui/dialogwaiting.cpp | 46 +- sources/ui/dynamicelementtextitemeditor.cpp | 34 +- sources/ui/dynamicelementtextitemeditor.h | 22 +- sources/ui/dynamicelementtextmodel.cpp | 240 +++++----- sources/ui/dynamicelementtextmodel.h | 10 +- sources/ui/elementinfopartwidget.cpp | 78 ++-- sources/ui/elementinfowidget.cpp | 120 ++--- sources/ui/elementinfowidget.h | 6 +- sources/ui/elementpropertieswidget.cpp | 116 ++--- sources/ui/imagepropertieswidget.cpp | 72 +-- sources/ui/imagepropertieswidget.h | 6 +- sources/ui/importelementtextpatterndialog.cpp | 20 +- sources/ui/importelementtextpatterndialog.h | 10 +- sources/ui/inditextpropertieswidget.cpp | 62 +-- sources/ui/inditextpropertieswidget.h | 6 +- sources/ui/linksingleelementwidget.cpp | 142 +++--- sources/ui/linksingleelementwidget.h | 16 +- sources/ui/marginseditdialog.cpp | 12 +- sources/ui/marginseditdialog.h | 6 +- sources/ui/masterpropertieswidget.cpp | 2 +- sources/ui/masterpropertieswidget.h | 6 +- sources/ui/potentialselectordialog.cpp | 60 +-- sources/ui/potentialselectordialog.h | 26 +- sources/ui/projectpropertiesdialog.cpp | 34 +- sources/ui/projectpropertiesdialog.h | 6 +- .../ui/shapegraphicsitempropertieswidget.cpp | 74 +-- .../ui/shapegraphicsitempropertieswidget.h | 6 +- sources/ui/titleblockpropertieswidget.cpp | 134 +++--- sources/ui/xrefpropertieswidget.cpp | 72 +-- sources/ui/xrefpropertieswidget.h | 6 +- .../changeelementinformationcommand.cpp | 20 +- .../changeelementinformationcommand.h | 6 +- .../undocommand/changetitleblockcommand.cpp | 12 +- sources/undocommand/changetitleblockcommand.h | 6 +- .../deleteqgraphicsitemcommand.cpp | 46 +- sources/undocommand/itemmodelcommand.cpp | 64 +-- sources/undocommand/itemmodelcommand.h | 12 +- sources/undocommand/linkelementcommand.cpp | 108 ++--- sources/undocommand/linkelementcommand.h | 10 +- .../undocommand/rotateselectioncommand.cpp | 14 +- sources/undocommand/rotateselectioncommand.h | 6 +- sources/undocommand/rotatetextscommand.cpp | 10 +- sources/undocommand/rotatetextscommand.h | 8 +- sources/utils/conductorcreator.h | 8 +- 274 files changed, 6823 insertions(+), 6756 deletions(-) diff --git a/SingleApplication/singleapplication.cpp b/SingleApplication/singleapplication.cpp index ebf6f38b2..66327b952 100644 --- a/SingleApplication/singleapplication.cpp +++ b/SingleApplication/singleapplication.cpp @@ -34,12 +34,12 @@ #include "singleapplication_p.h" /** - * @brief Constructor. Checks and fires up LocalServer or closes the program - * if another instance already exists - * @param argc - * @param argv - * @param {bool} allowSecondaryInstances - */ + @brief Constructor. Checks and fires up LocalServer or closes the program + if another instance already exists + @param argc + @param argv + @param {bool} allowSecondaryInstances +*/ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSecondary, Options options, int timeout ) : app_t( argc, argv ), d_ptr( new SingleApplicationPrivate( this ) ) { @@ -142,8 +142,8 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda } /** - * @brief Destructor - */ + @brief Destructor +*/ SingleApplication::~SingleApplication() { Q_D(SingleApplication); diff --git a/SingleApplication/singleapplication.h b/SingleApplication/singleapplication.h index 2528daed5..5a9ab8318 100644 --- a/SingleApplication/singleapplication.h +++ b/SingleApplication/singleapplication.h @@ -36,10 +36,10 @@ class SingleApplicationPrivate; /** - * @brief The SingleApplication class handles multiple instances of the same - * Application - * @see QCoreApplication - */ + @brief The SingleApplication class handles multiple instances of the same + Application + @see QCoreApplication +*/ class SingleApplication : public QAPPLICATION_CLASS { Q_OBJECT @@ -48,15 +48,15 @@ class SingleApplication : public QAPPLICATION_CLASS public: /** - * @brief Mode of operation of SingleApplication. - * Whether the block should be user-wide or system-wide and whether the - * primary instance should be notified when a secondary instance had been - * started. - * @note Operating system can restrict the shared memory blocks to the same - * user, in which case the User/System modes will have no effect and the - * block will be user wide. - * @enum - */ + @brief Mode of operation of SingleApplication. + Whether the block should be user-wide or system-wide and whether the + primary instance should be notified when a secondary instance had been + started. + @note Operating system can restrict the shared memory blocks to the same + user, in which case the User/System modes will have no effect and the + block will be user wide. + @enum + */ enum Mode { User = 1 << 0, System = 1 << 1, @@ -67,59 +67,59 @@ class SingleApplication : public QAPPLICATION_CLASS Q_DECLARE_FLAGS(Options, Mode) /** - * @brief Intitializes a SingleApplication instance with argc command line - * arguments in argv - * @arg {int &} argc - Number of arguments in argv - * @arg {const char *[]} argv - Supplied command line arguments - * @arg {bool} allowSecondary - Whether to start the instance as secondary - * if there is already a primary instance. - * @arg {Mode} mode - Whether for the SingleApplication block to be applied - * User wide or System wide. - * @arg {int} timeout - Timeout to wait in milliseconds. - * @note argc and argv may be changed as Qt removes arguments that it - * recognizes - * @note Mode::SecondaryNotification only works if set on both the primary - * instance and the secondary instance. - * @note The timeout is just a hint for the maximum time of blocking - * operations. It does not guarantee that the SingleApplication - * initialisation will be completed in given time, though is a good hint. - * Usually 4*timeout would be the worst case (fail) scenario. - * @see See the corresponding QAPPLICATION_CLASS constructor for reference - */ + @brief Intitializes a SingleApplication instance with argc command line + arguments in argv + @arg {int &} argc - Number of arguments in argv + @arg {const char *[]} argv - Supplied command line arguments + @arg {bool} allowSecondary - Whether to start the instance as secondary + if there is already a primary instance. + @arg {Mode} mode - Whether for the SingleApplication block to be applied + User wide or System wide. + @arg {int} timeout - Timeout to wait in milliseconds. + @note argc and argv may be changed as Qt removes arguments that it + recognizes + @note Mode::SecondaryNotification only works if set on both the primary + instance and the secondary instance. + @note The timeout is just a hint for the maximum time of blocking + operations. It does not guarantee that the SingleApplication + initialisation will be completed in given time, though is a good hint. + Usually 4*timeout would be the worst case (fail) scenario. + @see See the corresponding QAPPLICATION_CLASS constructor for reference + */ explicit SingleApplication( int &argc, char *argv[], bool allowSecondary = false, Options options = Mode::User, int timeout = 1000 ); ~SingleApplication(); /** - * @brief Returns if the instance is the primary instance - * @returns {bool} - */ + @brief Returns if the instance is the primary instance + @returns {bool} + */ bool isPrimary(); /** - * @brief Returns if the instance is a secondary instance - * @returns {bool} - */ + @brief Returns if the instance is a secondary instance + @returns {bool} + */ bool isSecondary(); /** - * @brief Returns a unique identifier for the current instance - * @returns {qint32} - */ + @brief Returns a unique identifier for the current instance + @returns {qint32} + */ quint32 instanceId(); /** - * @brief Returns the process ID (PID) of the primary instance - * @returns {qint64} - */ + @brief Returns the process ID (PID) of the primary instance + @returns {qint64} + */ qint64 primaryPid(); /** - * @brief Sends a message to the primary instance. Returns true on success. - * @param {int} timeout - Timeout for connecting - * @returns {bool} - * @note sendMessage() will return false if invoked from the primary - * instance. - */ + @brief Sends a message to the primary instance. Returns true on success. + @param {int} timeout - Timeout for connecting + @returns {bool} + @note sendMessage() will return false if invoked from the primary + instance. + */ bool sendMessage( QByteArray message, int timeout = 100 ); Q_SIGNALS: diff --git a/SingleApplication/singleapplication_p.cpp b/SingleApplication/singleapplication_p.cpp index 539ffeddf..93112bbcf 100644 --- a/SingleApplication/singleapplication_p.cpp +++ b/SingleApplication/singleapplication_p.cpp @@ -258,8 +258,8 @@ qint64 SingleApplicationPrivate::primaryPid() } /** - * @brief Executed when a connection has been made to the LocalServer - */ + @brief Executed when a connection has been made to the LocalServer +*/ void SingleApplicationPrivate::slotConnectionEstablished() { QLocalSocket *nextConnSocket = server->nextPendingConnection(); diff --git a/sources/ElementsCollection/elementcollectionhandler.cpp b/sources/ElementsCollection/elementcollectionhandler.cpp index 4aa390792..4ef945e17 100644 --- a/sources/ElementsCollection/elementcollectionhandler.cpp +++ b/sources/ElementsCollection/elementcollectionhandler.cpp @@ -298,9 +298,9 @@ ElementsLocation ECHSToXml::copy() /******************************************************/ /** - * @brief ElementCollectionHandler::ElementCollectionHandler - * @param widget - */ + @brief ElementCollectionHandler::ElementCollectionHandler + @param widget +*/ ElementCollectionHandler::ElementCollectionHandler() {} ElementCollectionHandler::~ElementCollectionHandler() @@ -309,14 +309,14 @@ ElementCollectionHandler::~ElementCollectionHandler() } /** - * @brief ElementCollectionHandler::copy - * Copy the content of collection represented by source to the collection represented by destination. - * Destination must be a directory, else the copy do nothing and return a null ElementLocation - * if destination have an item with the same name of source, a dialog ask to user what to do. - * @param source - * @param destination - * @return - */ + @brief ElementCollectionHandler::copy + Copy the content of collection represented by source to the collection represented by destination. + Destination must be a directory, else the copy do nothing and return a null ElementLocation + if destination have an item with the same name of source, a dialog ask to user what to do. + @param source + @param destination + @return +*/ ElementsLocation ElementCollectionHandler::copy(ElementsLocation &source, ElementsLocation &destination) { if (!source.exist() || !destination.exist() || destination.isElement()) return ElementsLocation(); @@ -332,14 +332,14 @@ ElementsLocation ElementCollectionHandler::copy(ElementsLocation &source, Elemen } /** - * @brief ElementCollectionHandler::createDir - * Create a directorie with name @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 - * @param name_list : translations of the directorie name - * @return : ElementsLocation that represent the new directorie, location can be null if an error was occurred - */ + @brief ElementCollectionHandler::createDir + Create a directorie with name @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 + @param name_list : translations of the directorie name + @return : ElementsLocation that represent the new directorie, location can be null if an error was occurred +*/ ElementsLocation ElementCollectionHandler::createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list) { //Parent must be a directorie and writable @@ -393,13 +393,13 @@ 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 - * @param project : project where copy the element - * @param location : location to copy - * @return true if import with success - */ + @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 + @param project : project where copy the element + @param location : location to copy + @return true if import with success +*/ bool ElementCollectionHandler::importFromProject(QETProject *project, ElementsLocation &location) { if (!(location.isElement() && location.exist() && location.isProject())) return false; @@ -436,12 +436,12 @@ 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 - * @param location : location to change the names - * @param name_list : NamesList to use - * @return return true if success - */ + @brief ElementCollectionHandler::setNames + 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 +*/ bool ElementCollectionHandler::setNames(ElementsLocation &location, const NamesList &name_list) { if ( !(location.exist() && location.isWritable()) ) { diff --git a/sources/ElementsCollection/elementcollectionhandler.h b/sources/ElementsCollection/elementcollectionhandler.h index cdcc5281d..bbfc0568b 100644 --- a/sources/ElementsCollection/elementcollectionhandler.h +++ b/sources/ElementsCollection/elementcollectionhandler.h @@ -24,9 +24,9 @@ class QWidget; /** - * @brief The ECHStrategy class - * Abstract class for manage copy of directory or element from a collection to another - */ + @brief The ECHStrategy class + Abstract class for manage copy of directory or element from a collection to another +*/ class ECHStrategy { public: @@ -38,9 +38,9 @@ class ECHStrategy }; /** - * @brief The ECHSFileToFile class - * Manage the copy of directory or element from a file system collection to another file system collection - */ + @brief The ECHSFileToFile class + Manage the copy of directory or element from a file system collection to another file system collection +*/ class ECHSFileToFile : public ECHStrategy { public: @@ -53,9 +53,9 @@ class ECHSFileToFile : public ECHStrategy }; /** - * @brief The ECHSXmlToFile class - * Manage the copy of a directory or element from an xml collection to a file. - */ + @brief The ECHSXmlToFile class + Manage the copy of a directory or element from an xml collection to a file. +*/ class ECHSXmlToFile : public ECHStrategy { public: @@ -68,10 +68,10 @@ class ECHSXmlToFile : public ECHStrategy }; /** - * @brief The ECHSToXml class - * Manage the copy of a directory or element from a collection (no matter if the source is a file system collection or an xml collection) - * to an xml collection - */ + @brief The ECHSToXml class + Manage the copy of a directory or element from a collection (no matter if the source is a file system collection or an xml collection) + to an xml collection +*/ class ECHSToXml : public ECHStrategy { public: @@ -80,10 +80,10 @@ class ECHSToXml : public ECHStrategy }; /** - * @brief The ElementCollectionHandler class - * Provide several method to copy element or directory from a collection - * to another collection. - */ + @brief The ElementCollectionHandler class + Provide several method to copy element or directory from a collection + to another collection. +*/ class ElementCollectionHandler { public: diff --git a/sources/ElementsCollection/elementcollectionitem.cpp b/sources/ElementsCollection/elementcollectionitem.cpp index c6da9b3d7..7a9f70c59 100644 --- a/sources/ElementsCollection/elementcollectionitem.cpp +++ b/sources/ElementsCollection/elementcollectionitem.cpp @@ -19,16 +19,16 @@ #include "elementcollectionitem.h" /** - * @brief ElementCollectionItem::ElementCollectionItem - * Constructor - */ + @brief ElementCollectionItem::ElementCollectionItem + Constructor +*/ ElementCollectionItem::ElementCollectionItem() {} /** - * @brief ElementCollectionItem::clearData - * Reset the data - */ + @brief ElementCollectionItem::clearData + Reset the data +*/ void ElementCollectionItem::clearData() { setText(QString()); @@ -38,13 +38,13 @@ 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. - * @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) - */ + @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. + @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) +*/ ElementCollectionItem *ElementCollectionItem::lastItemForPath(const QString &path, QString &no_found_path) { QStringList str_list = path.split("/"); @@ -67,11 +67,11 @@ ElementCollectionItem *ElementCollectionItem::lastItemForPath(const QString &pat } /** - * @brief ElementCollectionItem::childWithCollectionName - * Return the child with the collection name @name, else return nullptr - * @param name - * @return - */ + @brief ElementCollectionItem::childWithCollectionName + Return the child with the collection name @name, else return nullptr + @param name + @return +*/ ElementCollectionItem *ElementCollectionItem::childWithCollectionName(const QString& name) const { rowCount(); @@ -85,10 +85,10 @@ ElementCollectionItem *ElementCollectionItem::childWithCollectionName(const QStr } /** - * @brief ElementCollectionItem::directChilds - * Return the direct child of this item - * @return - */ + @brief ElementCollectionItem::directChilds + Return the direct child of this item + @return +*/ QList ElementCollectionItem::directChilds() const { QList item_list; @@ -100,12 +100,12 @@ 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 - */ + @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 +*/ int ElementCollectionItem::rowForInsertItem(const QString &name) { if (name.isEmpty()) @@ -137,10 +137,10 @@ int ElementCollectionItem::rowForInsertItem(const QString &name) } /** - * @brief ElementCollectionItem::itemAtPath - * @param path - * @return the item at path or nullptr if doesn't exist - */ + @brief ElementCollectionItem::itemAtPath + @param path + @return the item at path or nullptr if doesn't exist +*/ ElementCollectionItem *ElementCollectionItem::itemAtPath(const QString &path) { QStringList str_list = path.split("/"); @@ -160,9 +160,9 @@ ElementCollectionItem *ElementCollectionItem::itemAtPath(const QString &path) } /** - * @brief ElementCollectionItem::elementsDirectChild - * @return The direct element child of this item - */ + @brief ElementCollectionItem::elementsDirectChild + @return The direct element child of this item +*/ QList ElementCollectionItem::elementsDirectChild() const { QList element_child; @@ -177,9 +177,9 @@ QList ElementCollectionItem::elementsDirectChild() cons } /** - * @brief ElementCollectionItem::directoriesDirectChild - * @return the direct directory child of this item - */ + @brief ElementCollectionItem::directoriesDirectChild + @return the direct directory child of this item +*/ QList ElementCollectionItem::directoriesDirectChild() const { QList dir_child; @@ -194,9 +194,9 @@ QList ElementCollectionItem::directoriesDirectChild() c } /** - * @brief ElementCollectionItem::elementsChild - * @return Every elements child (direct and indirect) of this item - */ + @brief ElementCollectionItem::elementsChild + @return Every elements child (direct and indirect) of this item +*/ QList ElementCollectionItem::elementsChild() const { QList list = elementsDirectChild(); @@ -208,9 +208,9 @@ QList ElementCollectionItem::elementsChild() const } /** - * @brief ElementCollectionItem::directoriesChild - * @return Every directories child (direct and indirect) of this item - */ + @brief ElementCollectionItem::directoriesChild + @return Every directories child (direct and indirect) of this item +*/ QList ElementCollectionItem::directoriesChild() const { QList list = directoriesDirectChild(); @@ -224,9 +224,9 @@ QList ElementCollectionItem::directoriesChild() const } /** - * @brief ElementCollectionItem::items - * @return every childs of this item (direct and indirect childs) - */ + @brief ElementCollectionItem::items + @return every childs of this item (direct and indirect childs) +*/ QList ElementCollectionItem::items() const { QList list; diff --git a/sources/ElementsCollection/elementcollectionitem.h b/sources/ElementsCollection/elementcollectionitem.h index f84ebd3aa..2e092ed6d 100644 --- a/sources/ElementsCollection/elementcollectionitem.h +++ b/sources/ElementsCollection/elementcollectionitem.h @@ -21,11 +21,11 @@ #include /** - * @brief The ElementCollectionItem class - * This class represent a item (a directory or an element) in a element collection. - * This class must be herited for specialisation. - * This item is used by ElementsCollectionModel for manage the elements collection - */ + @brief The ElementCollectionItem class + This class represent a item (a directory or an element) in a element collection. + This class must be herited for specialisation. + This item is used by ElementsCollectionModel for manage the elements collection +*/ class ElementCollectionItem : public QStandardItem { public: diff --git a/sources/ElementsCollection/elementscollectionmodel.cpp b/sources/ElementsCollection/elementscollectionmodel.cpp index 54193c79a..4dfb2284a 100644 --- a/sources/ElementsCollection/elementscollectionmodel.cpp +++ b/sources/ElementsCollection/elementscollectionmodel.cpp @@ -99,15 +99,15 @@ QStringList ElementsCollectionModel::mimeTypes() const } /** - * @brief ElementsCollectionModel::canDropMimeData - * Reimplemented from QStandardItemModel - * @param data - * @param action - * @param row - * @param column - * @param parent - * @return - */ + @brief ElementsCollectionModel::canDropMimeData + Reimplemented from QStandardItemModel + @param data + @param action + @param row + @param column + @param parent + @return +*/ bool ElementsCollectionModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index d8f512723..df750a57f 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -38,10 +38,10 @@ #include /** - * @brief ElementsCollectionWidget::ElementsCollectionWidget - * Default constructor. - * @param parent : parent widget of this widget. - */ + @brief ElementsCollectionWidget::ElementsCollectionWidget + Default constructor. + @param parent : parent widget of this widget. +*/ ElementsCollectionWidget::ElementsCollectionWidget(QWidget *parent): QWidget(parent), m_model(nullptr) @@ -66,9 +66,9 @@ ElementsCollectionWidget::ElementsCollectionWidget(QWidget *parent): } /** - * @brief ElementsCollectionWidget::expandFirstItems - * Expand each first item in the tree view - */ + @brief ElementsCollectionWidget::expandFirstItems + Expand each first item in the tree view +*/ void ElementsCollectionWidget::expandFirstItems() { if (!m_model) @@ -79,10 +79,10 @@ void ElementsCollectionWidget::expandFirstItems() } /** - * @brief ElementsCollectionWidget::addProject - * Add @project to be displayed - * @param project - */ + @brief ElementsCollectionWidget::addProject + Add @project to be displayed + @param project +*/ void ElementsCollectionWidget::addProject(QETProject *project) { if (m_model) @@ -103,10 +103,10 @@ void ElementsCollectionWidget::removeProject(QETProject *project) { } /** - * @brief ElementsCollectionWidget::highlightUnusedElement - * highlight the unused element - * @See ElementsCollectionModel::highlightUnusedElement() - */ + @brief ElementsCollectionWidget::highlightUnusedElement + highlight the unused element + @See ElementsCollectionModel::highlightUnusedElement() +*/ void ElementsCollectionWidget::highlightUnusedElement() { if (m_model) @@ -114,10 +114,10 @@ void ElementsCollectionWidget::highlightUnusedElement() } /** - * @brief ElementsCollectionWidget::setCurrentLocation - * Set the current item to be the item for @location - * @param location - */ + @brief ElementsCollectionWidget::setCurrentLocation + Set the current item to be the item for @location + @param location +*/ void ElementsCollectionWidget::setCurrentLocation(const ElementsLocation &location) { if (!location.exist()) @@ -151,9 +151,9 @@ void ElementsCollectionWidget::setUpAction() } /** - * @brief ElementsCollectionWidget::setUpWidget - * Setup this widget - */ + @brief ElementsCollectionWidget::setUpWidget + Setup this widget +*/ void ElementsCollectionWidget::setUpWidget() { //Setup the main layout @@ -188,9 +188,9 @@ void ElementsCollectionWidget::setUpWidget() } /** - * @brief ElementsCollectionWidget::setUpConnection - * Setup the connection used in this widget - */ + @brief ElementsCollectionWidget::setUpConnection + Setup the connection used in this widget +*/ void ElementsCollectionWidget::setUpConnection() { connect(m_tree_view, &QTreeView::customContextMenuRequested, this, &ElementsCollectionWidget::customContextMenu); @@ -221,10 +221,10 @@ void ElementsCollectionWidget::setUpConnection() } /** - * @brief ElementsCollectionWidget::customContextMenu - * Display the context menu of this widget at @point - * @param point - */ + @brief ElementsCollectionWidget::customContextMenu + Display the context menu of this widget at @point + @param point +*/ void ElementsCollectionWidget::customContextMenu(const QPoint &point) { m_index_at_context_menu = m_tree_view->indexAt(point); @@ -283,9 +283,9 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) } /** - * @brief ElementsCollectionWidget::openDir - * Open the directory represented by the current selected item - */ + @brief ElementsCollectionWidget::openDir + Open the directory represented by the current selected item +*/ void ElementsCollectionWidget::openDir() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -309,9 +309,9 @@ void ElementsCollectionWidget::openDir() } /** - * @brief ElementsCollectionWidget::editElement - * Edit the element represented by the current selected item - */ + @brief ElementsCollectionWidget::editElement + Edit the element represented by the current selected item +*/ void ElementsCollectionWidget::editElement() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -328,9 +328,9 @@ void ElementsCollectionWidget::editElement() } /** - * @brief ElementsCollectionWidget::deleteElement - * Delete the element represented by the current selected item. - */ + @brief ElementsCollectionWidget::deleteElement + Delete the element represented by the current selected item. +*/ void ElementsCollectionWidget::deleteElement() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -360,9 +360,9 @@ void ElementsCollectionWidget::deleteElement() } /** - * @brief ElementsCollectionWidget::deleteDirectory - * Delete directory represented by the current selected item - */ + @brief ElementsCollectionWidget::deleteDirectory + Delete directory represented by the current selected item +*/ void ElementsCollectionWidget::deleteDirectory() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -394,9 +394,9 @@ void ElementsCollectionWidget::deleteDirectory() } /** - * @brief ElementsCollectionWidget::editDirectory - * Edit the directory represented by the current selected item - */ + @brief ElementsCollectionWidget::editDirectory + Edit the directory represented by the current selected item +*/ void ElementsCollectionWidget::editDirectory() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -414,9 +414,9 @@ void ElementsCollectionWidget::editDirectory() } /** - * @brief ElementsCollectionWidget::newDirectory - * Create a new directory - */ + @brief ElementsCollectionWidget::newDirectory + Create a new directory +*/ void ElementsCollectionWidget::newDirectory() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -433,9 +433,9 @@ void ElementsCollectionWidget::newDirectory() } /** - * @brief ElementsCollectionWidget::newElement - * Create a new element. - */ + @brief ElementsCollectionWidget::newElement + Create a new element. +*/ void ElementsCollectionWidget::newElement() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -459,9 +459,9 @@ void ElementsCollectionWidget::newElement() } /** - * @brief ElementsCollectionWidget::showThisDir - * Hide all directories except the pointed dir; - */ + @brief ElementsCollectionWidget::showThisDir + Hide all directories except the pointed dir; +*/ void ElementsCollectionWidget::showThisDir() { //Disable the yellow background of the previous index @@ -487,10 +487,10 @@ void ElementsCollectionWidget::showThisDir() } /** - * @brief ElementsCollectionWidget::resetShowThisDir - * reset show this dir, all collection are show. - * If search field isn't empty, apply the search after show all collection - */ + @brief ElementsCollectionWidget::resetShowThisDir + reset show this dir, all collection are show. + If search field isn't empty, apply the search after show all collection +*/ void ElementsCollectionWidget::resetShowThisDir() { if (m_showed_index.isValid()) @@ -505,9 +505,9 @@ void ElementsCollectionWidget::resetShowThisDir() } /** - * @brief ElementsCollectionWidget::dirProperties - * Open an informative dialog about the curent index - */ + @brief ElementsCollectionWidget::dirProperties + Open an informative dialog about the curent index +*/ void ElementsCollectionWidget::dirProperties() { ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); @@ -527,8 +527,8 @@ void ElementsCollectionWidget::dirProperties() } /** - * @brief ElementsCollectionWidget::reload, the displayed collections. - */ + @brief ElementsCollectionWidget::reload, the displayed collections. +*/ void ElementsCollectionWidget::reload() { m_progress_bar->show(); @@ -554,9 +554,9 @@ void ElementsCollectionWidget::reload() } /** - * @brief ElementsCollectionWidget::loadingFinished - * Process when collection finished to be loaded - */ + @brief ElementsCollectionWidget::loadingFinished + Process when collection finished to be loaded +*/ void ElementsCollectionWidget::loadingFinished() { if (m_new_model) @@ -579,11 +579,11 @@ void ElementsCollectionWidget::loadingFinished() } /** - * @brief ElementsCollectionWidget::locationWasSaved - * This method is connected with the signal savedToLocation of Element editor (see ElementsCollectionWidget::editElement()) - * Update or add the item represented by location to m_model - * @param location - */ + @brief ElementsCollectionWidget::locationWasSaved + This method is connected with the signal savedToLocation of Element editor (see ElementsCollectionWidget::editElement()) + Update or add the item represented by location to m_model + @param location +*/ void ElementsCollectionWidget::locationWasSaved(const ElementsLocation& location) { //Because this method update an item in the model, location must @@ -606,10 +606,10 @@ void ElementsCollectionWidget::locationWasSaved(const ElementsLocation& location } /** - * @brief ElementsCollectionWidget::search - * Search every item (directory or element) that match the text of m_search_field - * and display it, other item who does not match @text is hidden - */ + @brief ElementsCollectionWidget::search + Search every item (directory or element) that match the text of m_search_field + and display it, other item who does not match @text is hidden +*/ void ElementsCollectionWidget::search() { QString text = m_search_field->text(); @@ -655,10 +655,10 @@ void ElementsCollectionWidget::search() } /** - * @brief ElementsCollectionWidget::hideCollection - * Hide all collection displayed in this tree - * @param hide- true = hide , false = visible - */ + @brief ElementsCollectionWidget::hideCollection + Hide all collection displayed in this tree + @param hide- true = hide , false = visible +*/ void ElementsCollectionWidget::hideCollection(bool hide) { for (int i=0 ; i rowCount() ; i++) @@ -666,12 +666,12 @@ void ElementsCollectionWidget::hideCollection(bool hide) } /** - * @brief ElementsCollectionWidget::hideItem - * 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 - */ + @brief ElementsCollectionWidget::hideItem + 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 +*/ void ElementsCollectionWidget::hideItem(bool hide, const QModelIndex &index, bool recursive) { m_tree_view->setRowHidden(index.row(), index.parent(), hide); @@ -682,14 +682,14 @@ void ElementsCollectionWidget::hideItem(bool hide, const QModelIndex &index, boo } /** - * @brief ElementsCollectionWidget::showAndExpandItem - * Show the item @index and expand it. - * If parent is true, ensure parents of @index is show and expanded - * If child is true, ensure all childs of @index is show and expended - * @param index- index to show - * @param parent- Apply to parent - * @param child- Apply to all childs - */ + @brief ElementsCollectionWidget::showAndExpandItem + Show the item @index and expand it. + If parent is true, ensure parents of @index is show and expanded + If child is true, ensure all childs of @index is show and expended + @param index- index to show + @param parent- Apply to parent + @param child- Apply to all childs +*/ void ElementsCollectionWidget::showAndExpandItem(const QModelIndex &index, bool parent, bool child) { if (index.isValid()) { @@ -702,10 +702,10 @@ void ElementsCollectionWidget::showAndExpandItem(const QModelIndex &index, bool } /** - * @brief ElementsCollectionWidget::elementCollectionItemForIndex - * @param index - * @return The internal pointer of index casted to ElementCollectionItem; - */ + @brief ElementsCollectionWidget::elementCollectionItemForIndex + @param index + @return The internal pointer of index casted to ElementCollectionItem; +*/ ElementCollectionItem *ElementsCollectionWidget::elementCollectionItemForIndex(const QModelIndex &index) { if (!index.isValid()) return nullptr; diff --git a/sources/ElementsCollection/elementscollectionwidget.h b/sources/ElementsCollection/elementscollectionwidget.h index e3a2ba92e..612981680 100644 --- a/sources/ElementsCollection/elementscollectionwidget.h +++ b/sources/ElementsCollection/elementscollectionwidget.h @@ -34,11 +34,11 @@ class QETProject; class ElementsTreeView; /** - * @brief The ElementsCollectionWidget class - * This widget embedd a tree view that display the element collection (common, custom, embedded) - * and all action needed to use this widget. - * This is the element collection widget used in the diagram editor. - */ + @brief The ElementsCollectionWidget class + This widget embedd a tree view that display the element collection (common, custom, embedded) + and all action needed to use this widget. + This is the element collection widget used in the diagram editor. +*/ class ElementsCollectionWidget : public QWidget { Q_OBJECT diff --git a/sources/ElementsCollection/elementslocation.cpp b/sources/ElementsCollection/elementslocation.cpp index 40d55ce0e..87d1bc477 100644 --- a/sources/ElementsCollection/elementslocation.cpp +++ b/sources/ElementsCollection/elementslocation.cpp @@ -125,7 +125,7 @@ bool ElementsLocation::operator!=(const ElementsLocation &other) const { this method don't return the extension name. For exemple if this location represent an element they return myElement. @see fileName() - */ +*/ QString ElementsLocation::baseName() const { QRegExp regexp("^.*([^/]+)\\.elmt$"); if (regexp.exactMatch(m_collection_path)) { diff --git a/sources/ElementsCollection/elementstreeview.cpp b/sources/ElementsCollection/elementstreeview.cpp index b04f473bf..53d50257e 100644 --- a/sources/ElementsCollection/elementstreeview.cpp +++ b/sources/ElementsCollection/elementstreeview.cpp @@ -29,18 +29,18 @@ static int MAX_DND_PIXMAP_WIDTH = 500; static int MAX_DND_PIXMAP_HEIGHT = 375; /** - * @brief ElementsTreeView::ElementsTreeView - * @param parent - */ + @brief ElementsTreeView::ElementsTreeView + @param parent +*/ ElementsTreeView::ElementsTreeView(QWidget *parent) : QTreeView(parent) {} /** - * @brief ElementsTreeView::startDrag - * Reimplemented from QTreeView - * @param supportedActions - */ + @brief ElementsTreeView::startDrag + Reimplemented from QTreeView + @param supportedActions +*/ void ElementsTreeView::startDrag(Qt::DropActions supportedActions) { QModelIndex index = currentIndex(); @@ -63,10 +63,10 @@ void ElementsTreeView::startDrag(Qt::DropActions supportedActions) } /** - * @brief ElementsTreeView::startElementDrag - * Build a QDrag according to the content of @location - * @param location : location to use for create the content of the QDrag - */ + @brief ElementsTreeView::startElementDrag + 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) { if (!location.exist()) diff --git a/sources/ElementsCollection/elementstreeview.h b/sources/ElementsCollection/elementstreeview.h index d864f4ab9..333f843ff 100644 --- a/sources/ElementsCollection/elementstreeview.h +++ b/sources/ElementsCollection/elementstreeview.h @@ -23,11 +23,11 @@ class ElementsLocation; /** - * @brief The ElementsTreeView class - * This class just reimplement startDrag from QTreeView, for set a custom pixmap. - * This class must be used when the tree view have an ElementsCollectionModel as model. - * The pixmap used is the pixmap of the dragged element or a directory pixmap. - */ + @brief The ElementsTreeView class + This class just reimplement startDrag from QTreeView, for set a custom pixmap. + This class must be used when the tree view have an ElementsCollectionModel as model. + The pixmap used is the pixmap of the dragged element or a directory pixmap. +*/ class ElementsTreeView : public QTreeView { public: diff --git a/sources/ElementsCollection/fileelementcollectionitem.h b/sources/ElementsCollection/fileelementcollectionitem.h index b5992bbeb..57f5221f4 100644 --- a/sources/ElementsCollection/fileelementcollectionitem.h +++ b/sources/ElementsCollection/fileelementcollectionitem.h @@ -22,10 +22,10 @@ #include "elementslocation.h" /** - * @brief The FileElementCollectionItem class - * This class specialise ElementCollectionItem for manage a collection in - * a file system. They represente a directory or an element. - */ + @brief The FileElementCollectionItem class + This class specialise ElementCollectionItem for manage a collection in + a file system. They represente a directory or an element. +*/ class FileElementCollectionItem : public ElementCollectionItem { public: diff --git a/sources/ElementsCollection/xmlelementcollection.cpp b/sources/ElementsCollection/xmlelementcollection.cpp index 7fab4e958..b9884e2fc 100644 --- a/sources/ElementsCollection/xmlelementcollection.cpp +++ b/sources/ElementsCollection/xmlelementcollection.cpp @@ -22,16 +22,16 @@ #include "qetproject.h" /** - * @brief XmlElementCollection::XmlElementCollection - * Build an empty collection. - * The collection start by : + @brief XmlElementCollection::XmlElementCollection + Build an empty collection. + The collection start by : * * - * @param project : the project of this collection - */ + All elements and category are stored as child of XmlElementCollection::directories(const QDomElement &parent_element) const { QList directory_list; @@ -194,10 +194,10 @@ 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 - */ + @brief XmlElementCollection::directoriesNames + @param parent_element + @return a list of names for every child directories of @parent_element +*/ QStringList XmlElementCollection::directoriesNames(const QDomElement &parent_element) const { QList childs = directories(parent_element); @@ -214,10 +214,10 @@ QStringList XmlElementCollection::directoriesNames(const QDomElement &parent_ele } /** - * @brief XmlElementCollection::elements - * @param parent_element - * @return A list of element stored in @parent_element - */ + @brief XmlElementCollection::elements + @param parent_element + @return A list of element stored in @parent_element +*/ QList XmlElementCollection::elements(const QDomElement &parent_element) const { QList element_list; @@ -235,10 +235,10 @@ 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 - */ + @brief XmlElementCollection::elementsNames + @param parent_element + @return A list of names fr every childs element of @parent_element +*/ QStringList XmlElementCollection::elementsNames(const QDomElement &parent_element) const { QList childs = elements(parent_element); @@ -255,11 +255,11 @@ 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 - * or a null QDomElement if not found or doesn't represent an element - */ + @brief XmlElementCollection::element + @param path : path of the element in this collection + @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 { if (!path.endsWith(".elmt")) return QDomElement(); @@ -273,11 +273,11 @@ 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 - * or a null QDomElement if not found. - */ + @brief XmlElementCollection::directory + @param path : path of the directory in this collection + @return the QDomElement that represent the directory at path @path + or a null QDomElement if not found. +*/ QDomElement XmlElementCollection::directory(const QString &path) const { QDomElement directory = child(path); @@ -289,15 +289,15 @@ 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 - * 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. - */ + @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 + 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. +*/ QString XmlElementCollection::addElement(ElementsLocation &location) { //location must be an element and exist @@ -423,15 +423,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. - * 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 xml_definition : The xml definition of the element. - * The tag name of @xml_definition must be "definition". - * @return True if the element is added with success. - */ + @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. + 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 xml_definition : The xml definition of the element. + 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) { QDomElement dom_dir = directory(dir_path); @@ -461,12 +461,12 @@ bool XmlElementCollection::addElementDefinition(const QString &dir_path, const Q } /** - * @brief XmlElementCollection::removeElement - * Remove the element at path @path. - * @param path - * @return True if element is removed and emit the signal elementRemoved. - * else false. - */ + @brief XmlElementCollection::removeElement + Remove the element at path @path. + @param path + @return True if element is removed and emit the signal elementRemoved. + else false. +*/ bool XmlElementCollection::removeElement(const QString& path) { QDomElement elmt = element(path); @@ -481,16 +481,16 @@ bool XmlElementCollection::removeElement(const QString& path) } /** - * @brief XmlElementCollection::copy - * 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. - * @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 - */ + @brief XmlElementCollection::copy + 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. + @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 +*/ ElementsLocation XmlElementCollection::copy(ElementsLocation &source, ElementsLocation &destination, const QString& rename, bool deep_copy) { if (!(source.exist() && destination.isDirectory() && destination.isProject() && destination.projectCollection() == this)) @@ -503,11 +503,11 @@ ElementsLocation XmlElementCollection::copy(ElementsLocation &source, ElementsLo } /** - * @brief XmlElementCollection::exist - * Return true if the path @path exist in this collection - * @param path - * @return - */ + @brief XmlElementCollection::exist + Return true if the path @path exist in this collection + @param path + @return +*/ bool XmlElementCollection::exist(const QString &path) const { if (child(path).isNull()) @@ -517,14 +517,14 @@ bool XmlElementCollection::exist(const QString &path) const } /** - * @brief XmlElementCollection::createDir - * Create a child directorie at path @path with the name @name. - * Emit directorieAdded if success. - * @param path : path of parent diectorie - * @param name : name of the directori to create. - * @param name_list : translation of the directorie name. - * @return true if creation success, if directorie already exist return true. - */ + @brief XmlElementCollection::createDir + Create a child directorie at path @path with the name @name. + Emit directorieAdded if success. + @param path : path of parent diectorie + @param name : name of the directori to create. + @param name_list : translation of the directorie name. + @return true if creation success, if directorie already exist return true. +*/ bool XmlElementCollection::createDir(const QString& path, const QString& name, const NamesList &name_list) { QString new_dir_path = path + "/" + name; @@ -551,12 +551,12 @@ bool XmlElementCollection::createDir(const QString& path, const QString& name, c } /** - * @brief XmlElementCollection::removeDir - * Remove the directory at path @path. - * @param path - * @return true if successfuly removed and emit directoryRemoved(QString), - * else false. - */ + @brief XmlElementCollection::removeDir + Remove the directory at path @path. + @param path + @return true if successfuly removed and emit directoryRemoved(QString), + else false. +*/ bool XmlElementCollection::removeDir(const QString& path) { QDomElement dir = directory(path); @@ -569,14 +569,14 @@ bool XmlElementCollection::removeDir(const QString& path) } /** - * @brief XmlElementCollection::elementsLocation - * Return all locations stored in dom_element (element and directory). - * 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. - * @return - */ + @brief XmlElementCollection::elementsLocation + Return all locations stored in dom_element (element and directory). + 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. + @return +*/ QList XmlElementCollection::elementsLocation(QDomElement dom_element, bool childs) const { QList location_list; @@ -612,13 +612,13 @@ 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. - * The tag name of dom_element must be "element" - * @return the element location, location can be null if fail. - */ + @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. + The tag name of dom_element must be "element" + @return the element location, location can be null if fail. +*/ ElementsLocation XmlElementCollection::domToLocation(QDomElement dom_element) const { if (dom_element.ownerDocument() == m_dom_document) { @@ -638,9 +638,9 @@ ElementsLocation XmlElementCollection::domToLocation(QDomElement dom_element) co } /** - * @brief XmlElementCollection::cleanUnusedElement - * Remove elements in this collection which is not used in the owner project - */ + @brief XmlElementCollection::cleanUnusedElement + Remove elements in this collection which is not used in the owner project +*/ void XmlElementCollection::cleanUnusedElement() { foreach (ElementsLocation loc, m_project->unusedElements()) @@ -648,9 +648,9 @@ void XmlElementCollection::cleanUnusedElement() } /** - * @brief XmlElementCollection::cleanUnusedDirectory - * Remove the empty directories of this collection - */ + @brief XmlElementCollection::cleanUnusedDirectory + Remove the empty directories of this collection +*/ void XmlElementCollection::cleanUnusedDirectory() { QDomNodeList lst = importCategory().elementsByTagName("category"); @@ -666,15 +666,15 @@ 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 - * @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 deep_copy :if true copy all childs of source - * @return the ElementLocation that represent the copy, if copy failed return a null ElementLocation - */ + @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 + @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 deep_copy :if true copy all childs of source + @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; @@ -754,14 +754,14 @@ ElementsLocation XmlElementCollection::copyDirectory(ElementsLocation &source, E } /** - * @brief XmlElementCollection::copyElement - * Copy the element represented by source to destination (must be a directory) - * 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 - * @return The ElementsLocation of the copy - */ + @brief XmlElementCollection::copyElement + Copy the element represented by source to destination (must be a directory) + 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 + @return The ElementsLocation of the copy +*/ ElementsLocation XmlElementCollection::copyElement(ElementsLocation &source, ElementsLocation &destination, const QString& rename) { QString new_elmt_name = rename.isEmpty() ? source.fileName() : rename; diff --git a/sources/ElementsCollection/xmlelementcollection.h b/sources/ElementsCollection/xmlelementcollection.h index 9b5ead121..427eda365 100644 --- a/sources/ElementsCollection/xmlelementcollection.h +++ b/sources/ElementsCollection/xmlelementcollection.h @@ -27,9 +27,9 @@ class QFile; class QETProject; /** - * @brief The XmlElementCollection class - * This class represent a collection of elements stored to xml - */ + @brief The XmlElementCollection class + This class represent a collection of elements stored to xml +*/ class XmlElementCollection : public QObject { Q_OBJECT @@ -68,34 +68,34 @@ class XmlElementCollection : public QObject signals: /** - * @brief elementAdded - * This signal is emited when a element is added to this collection - * @param collection_path, the path of element in this collection - */ + @brief elementAdded + This signal is emited when a element is added to this collection + @param collection_path, the path of element in this collection + */ void elementAdded(QString collection_path); /** - * @brief elementChanged - * This signal is emited when the defintion of the element at path was changed - * @param collection_path, the path of this element in this collection - */ + @brief elementChanged + This signal is emited when the defintion of the element at path was changed + @param collection_path, the path of this element in this collection + */ void elementChanged (QString collection_path); /** - * @brief elementRemoved - * This signal is emited when an element is removed to this collection - * @param collection_path, the path of the removed element in this collection - */ + @brief elementRemoved + This signal is emited when an element is removed to this collection + @param collection_path, the path of the removed element in this collection + */ void elementRemoved(QString collection_path); /** - * @brief directorieAdded - * This signal is emited when a directorie is added to this collection - * @param collection_path, the path of the new directorie - */ + @brief directorieAdded + This signal is emited when a directorie is added to this collection + @param collection_path, the path of the new directorie + */ void directorieAdded(QString collection_path); /** - * @brief directoryRemoved - * This signal is emited when a directory is removed to this collection - * @param collection_path, the path of the removed directory - */ + @brief directoryRemoved + This signal is emited when a directory is removed to this collection + @param collection_path, the path of the removed directory + */ void directoryRemoved(QString collection_path); private: diff --git a/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp b/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp index ed2c53f37..9f1f56b84 100644 --- a/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp +++ b/sources/ElementsCollection/xmlprojectelementcollectionitem.cpp @@ -21,16 +21,16 @@ #include "xmlprojectelementcollectionitem.h" /** - * @brief XmlProjectElementCollectionItem::XmlProjectElementCollectionItem - * Constructor - */ + @brief XmlProjectElementCollectionItem::XmlProjectElementCollectionItem + Constructor +*/ XmlProjectElementCollectionItem::XmlProjectElementCollectionItem() {} /** - * @brief XmlProjectElementCollectionItem::isDir - * @return true if this item represent a directory - */ + @brief XmlProjectElementCollectionItem::isDir + @return true if this item represent a directory +*/ bool XmlProjectElementCollectionItem::isDir() const { if (m_dom_element.tagName() == "category") return true; @@ -38,9 +38,9 @@ bool XmlProjectElementCollectionItem::isDir() const } /** - * @brief XmlProjectElementCollectionItem::isElement - * @return true if this item represent an element - */ + @brief XmlProjectElementCollectionItem::isElement + @return true if this item represent an element +*/ bool XmlProjectElementCollectionItem::isElement() const { if (m_dom_element.tagName() == "element") return true; @@ -48,9 +48,9 @@ bool XmlProjectElementCollectionItem::isElement() const } /** - * @brief XmlProjectElementCollectionItem::localName - * @return the located name of this item - */ + @brief XmlProjectElementCollectionItem::localName + @return the located name of this item +*/ QString XmlProjectElementCollectionItem::localName() { if (!text().isNull()) @@ -71,18 +71,18 @@ QString XmlProjectElementCollectionItem::localName() } /** - * @brief XmlProjectElementCollectionItem::name - * @return The collection name of this item - */ + @brief XmlProjectElementCollectionItem::name + @return The collection name of this item +*/ QString XmlProjectElementCollectionItem::name() const { return m_dom_element.attribute("name"); } /** - * @brief XmlProjectElementCollectionItem::collectionPath - * @return The path of this item relative to the collection. - */ + @brief XmlProjectElementCollectionItem::collectionPath + @return The path of this item relative to the collection. +*/ QString XmlProjectElementCollectionItem::collectionPath() const { ElementsLocation loc (embeddedPath(), m_project); @@ -93,10 +93,10 @@ QString XmlProjectElementCollectionItem::collectionPath() const } /** - * @brief XmlProjectElementCollectionItem::embeddedPath - * @return The embedde path of this item - * The path is in form : embed://dir/subdir/myElement.elmt - */ + @brief XmlProjectElementCollectionItem::embeddedPath + @return The embedde path of this item + The path is in form : embed://dir/subdir/myElement.elmt +*/ QString XmlProjectElementCollectionItem::embeddedPath() const { if (isCollectionRoot()) @@ -114,9 +114,9 @@ QString XmlProjectElementCollectionItem::embeddedPath() const } /** - * @brief XmlProjectElementCollectionItem::isCollectionRoot - * @return true if this item represent the root of collection - */ + @brief XmlProjectElementCollectionItem::isCollectionRoot + @return true if this item represent the root of collection +*/ bool XmlProjectElementCollectionItem::isCollectionRoot() const { if (!parent()) @@ -128,11 +128,11 @@ bool XmlProjectElementCollectionItem::isCollectionRoot() const } /** - * @brief XmlProjectElementCollectionItem::addChildAtPath - * 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. - */ + @brief XmlProjectElementCollectionItem::addChildAtPath + 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. +*/ void XmlProjectElementCollectionItem::addChildAtPath(const QString &collection_name) { if (collection_name.isEmpty()) @@ -155,21 +155,21 @@ void XmlProjectElementCollectionItem::addChildAtPath(const QString &collection_n } /** - * @brief XmlProjectElementCollectionItem::project - * @return the paretn project of the managed collection - */ + @brief XmlProjectElementCollectionItem::project + @return the paretn project of the managed collection +*/ QETProject *XmlProjectElementCollectionItem::project() const { return m_project; } /** - * @brief XmlProjectElementCollectionItem::setProject - * Set the project for this item. - * Use this method for set this item the root of the collection - * @param project : project to manage the collection - * @param set_data : if true, call setUpData for every child of this item - */ + @brief XmlProjectElementCollectionItem::setProject + Set the project for this item. + Use this method for set this item the root of the collection + @param project : project to manage the collection + @param set_data : if true, call setUpData for every child of this item +*/ void XmlProjectElementCollectionItem::setProject(QETProject *project, bool set_data, bool hide_element) { if (m_project) @@ -181,9 +181,9 @@ void XmlProjectElementCollectionItem::setProject(QETProject *project, bool set_d } /** - * @brief XmlProjectElementCollectionItem::setUpData - * SetUp the data of this item - */ + @brief XmlProjectElementCollectionItem::setUpData + SetUp the data of this item +*/ void XmlProjectElementCollectionItem::setUpData() { //Setup the displayed name @@ -212,10 +212,10 @@ void XmlProjectElementCollectionItem::setUpData() } /** - * @brief XmlProjectElementCollectionItem::setUpIcon - * SetUp the icon of this item. - * Because icon use several memory, we use this method for setup icon instead setUpData. - */ + @brief XmlProjectElementCollectionItem::setUpIcon + SetUp the icon of this item. + Because icon use several memory, we use this method for setup icon instead setUpData. +*/ void XmlProjectElementCollectionItem::setUpIcon() { if (!icon().isNull()) @@ -232,10 +232,10 @@ void XmlProjectElementCollectionItem::setUpIcon() } /** - * @brief XmlProjectElementCollectionItem::populate - * Create the childs of this item - * @param set_data : if true, call setUpData for every child of this item - */ + @brief XmlProjectElementCollectionItem::populate + Create the childs of this item + @param set_data : if true, call setUpData for every child of this item +*/ void XmlProjectElementCollectionItem::populate(bool set_data, bool hide_element) { QList dom_category = m_project->embeddedElementCollection()->directories(m_dom_element); @@ -267,12 +267,12 @@ void XmlProjectElementCollectionItem::populate(bool set_data, bool hide_element) } /** - * @brief XmlProjectElementCollectionItem::setXmlElement - * Set the managed content of this item - * @param element : the dom element (directory or element), to be managed by this item - * @param project : the parent project of managed collection - * @param set_data : if true, call setUpData for every child of this item - */ + @brief XmlProjectElementCollectionItem::setXmlElement + Set the managed content of this item + @param element : the dom element (directory or element), to be managed by this item + @param project : the parent project of managed collection + @param set_data : if true, call setUpData for every child of this item +*/ void XmlProjectElementCollectionItem::setXmlElement(const QDomElement& element, QETProject *project, bool set_data, bool hide_element) { m_dom_element = element; diff --git a/sources/ElementsCollection/xmlprojectelementcollectionitem.h b/sources/ElementsCollection/xmlprojectelementcollectionitem.h index 1a6de5d4e..2a7bbb508 100644 --- a/sources/ElementsCollection/xmlprojectelementcollectionitem.h +++ b/sources/ElementsCollection/xmlprojectelementcollectionitem.h @@ -24,9 +24,9 @@ class QETProject; /** - * @brief The XmlProjectElementCollectionItem class - * This class specialise ElementCollectionItem for manage an xml collection embedded in a project. - */ + @brief The XmlProjectElementCollectionItem class + This class specialise ElementCollectionItem for manage an xml collection embedded in a project. +*/ class XmlProjectElementCollectionItem : public ElementCollectionItem { public: diff --git a/sources/NameList/nameslist.cpp b/sources/NameList/nameslist.cpp index fc518c4d5..067307f06 100644 --- a/sources/NameList/nameslist.cpp +++ b/sources/NameList/nameslist.cpp @@ -126,15 +126,15 @@ void NamesList::fromXml(const QDomElement &xml_element, const QHash name from an xml description. - * @xml_element must be the parent of a child element tagged "names" - * If a couple lang <-> name already exist, they will overwrited, else - * they will be appened. - * @param xml_element : xml element to analyze - * @param xml_options : A set of options related to XML parsing. - * @see getXmlOptions() - */ + @brief NamesList::fromXml + Load the list of lang <-> name from an xml description. + @xml_element must be the parent of a child element tagged "names" + If a couple lang <-> name already exist, they will overwrited, else + they will be appened. + @param xml_element : xml element to analyze + @param xml_options : A set of options related to XML parsing. + @see getXmlOptions() +*/ void NamesList::fromXml(const pugi::xml_node &xml_element, const QHash &xml_options) { QHash xml_opt = getXmlOptions(xml_options); diff --git a/sources/NameList/ui/namelistdialog.cpp b/sources/NameList/ui/namelistdialog.cpp index 3ded9db89..1f90eed88 100644 --- a/sources/NameList/ui/namelistdialog.cpp +++ b/sources/NameList/ui/namelistdialog.cpp @@ -44,10 +44,10 @@ void NameListDialog::setInformationText(const QString &text) { } /** - * @brief NameListDialog::namelistWidget - * @return the name list widget used by this dialog. - * The ownership of the namelistwidget stay to this dialog - */ + @brief NameListDialog::namelistWidget + @return the name list widget used by this dialog. + The ownership of the namelistwidget stay to this dialog +*/ NameListWidget *NameListDialog::namelistWidget() const { return m_namelist_widget; } diff --git a/sources/NameList/ui/namelistdialog.h b/sources/NameList/ui/namelistdialog.h index 118a8f6d4..35299c04f 100644 --- a/sources/NameList/ui/namelistdialog.h +++ b/sources/NameList/ui/namelistdialog.h @@ -27,9 +27,9 @@ namespace Ui { } /** - * @brief The NameListDialog class - * Provide a dialog for let user define localized string; - */ + @brief The NameListDialog class + Provide a dialog for let user define localized string; +*/ class NameListDialog : public QDialog { Q_OBJECT diff --git a/sources/NameList/ui/namelistwidget.cpp b/sources/NameList/ui/namelistwidget.cpp index 5b3784335..612cc6c82 100644 --- a/sources/NameList/ui/namelistwidget.cpp +++ b/sources/NameList/ui/namelistwidget.cpp @@ -36,9 +36,9 @@ NameListWidget::~NameListWidget() } /** - * @brief NameListWidget::addLine - * Add a new line to the name list widget - */ + @brief NameListWidget::addLine + Add a new line to the name list widget +*/ void NameListWidget::addLine() { clean(); @@ -53,10 +53,10 @@ void NameListWidget::addLine() } /** - * @brief NameListWidget::setNames - * Set the current names of this dialog from @name_list - * @param name_list - */ + @brief NameListWidget::setNames + Set the current names of this dialog from @name_list + @param name_list +*/ void NameListWidget::setNames(const NamesList &name_list) { for (QString lang : name_list.langs()) @@ -74,9 +74,9 @@ void NameListWidget::setNames(const NamesList &name_list) } /** - * @brief NameListWidget::names - * @return the current name list edited by this dialog - */ + @brief NameListWidget::names + @return the current name list edited by this dialog +*/ NamesList NameListWidget::names() const { NamesList nl_; @@ -95,10 +95,10 @@ NamesList NameListWidget::names() const } /** - * @brief NameListWidget::setReadOnly - * Set this dialog to read only or not. - * @param ro - */ + @brief NameListWidget::setReadOnly + Set this dialog to read only or not. + @param ro +*/ void NameListWidget::setReadOnly(bool ro) { m_read_only = ro; @@ -116,10 +116,10 @@ void NameListWidget::setReadOnly(bool ro) } /** - * @brief NameListWidget::isEmpty - * @return true if empty. - * An empty dialog, is a dialog without any edited lang. - */ + @brief NameListWidget::isEmpty + @return true if empty. + An empty dialog, is a dialog without any edited lang. +*/ bool NameListWidget::isEmpty() const { return names().isEmpty(); } @@ -142,9 +142,9 @@ void NameListWidget::setClipboardValue(QHash value) } /** - * @brief NameListWidget::clean - * Clean the lists of names by removing the emtpy lines - */ + @brief NameListWidget::clean + Clean the lists of names by removing the emtpy lines +*/ void NameListWidget::clean() { int names_count = ui->m_tree->topLevelItemCount() - 1; diff --git a/sources/NameList/ui/namelistwidget.h b/sources/NameList/ui/namelistwidget.h index 3bb29bcea..2bd30f531 100644 --- a/sources/NameList/ui/namelistwidget.h +++ b/sources/NameList/ui/namelistwidget.h @@ -26,9 +26,9 @@ namespace Ui { } /** - * @brief The NameListWidget class - * Provide a widget for let user define localized string; - */ + @brief The NameListWidget class + Provide a widget for let user define localized string; +*/ class NameListWidget : public QWidget { Q_OBJECT diff --git a/sources/PropertiesEditor/propertieseditordialog.h b/sources/PropertiesEditor/propertieseditordialog.h index 43d0fab9e..570f64bdf 100644 --- a/sources/PropertiesEditor/propertieseditordialog.h +++ b/sources/PropertiesEditor/propertieseditordialog.h @@ -24,16 +24,16 @@ #include /** - * @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 : - * 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 - */ + @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 : + 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 +*/ class PropertiesEditorDialog : public QDialog { Q_OBJECT diff --git a/sources/PropertiesEditor/propertieseditordockwidget.cpp b/sources/PropertiesEditor/propertieseditordockwidget.cpp index d4d80eb03..497eebefb 100644 --- a/sources/PropertiesEditor/propertieseditordockwidget.cpp +++ b/sources/PropertiesEditor/propertieseditordockwidget.cpp @@ -20,10 +20,10 @@ #include "propertieseditorwidget.h" /** - * @brief PropertiesEditorDockWidget::PropertiesEditorDockWidget - * Constructor - * @param parent : parent widget - */ + @brief PropertiesEditorDockWidget::PropertiesEditorDockWidget + Constructor + @param parent : parent widget +*/ PropertiesEditorDockWidget::PropertiesEditorDockWidget(QWidget *parent) : QDockWidget(parent), ui(new Ui::PropertiesEditorDockWidget) @@ -32,9 +32,9 @@ PropertiesEditorDockWidget::PropertiesEditorDockWidget(QWidget *parent) : } /** - * @brief PropertiesEditorDockWidget::~PropertiesEditorDockWidget - * Destructor - */ + @brief PropertiesEditorDockWidget::~PropertiesEditorDockWidget + Destructor +*/ PropertiesEditorDockWidget::~PropertiesEditorDockWidget() { clear(); @@ -42,10 +42,10 @@ PropertiesEditorDockWidget::~PropertiesEditorDockWidget() } /** - * @brief PropertiesEditorDockWidget::clear - * Remove all editor present in this dock and delete it. - * They also disabled the button box at the bottom of this dock - */ + @brief PropertiesEditorDockWidget::clear + Remove all editor present in this dock and delete it. + They also disabled the button box at the bottom of this dock +*/ void PropertiesEditorDockWidget::clear() { foreach (PropertiesEditorWidget *editor, m_editor_list) @@ -59,9 +59,9 @@ void PropertiesEditorDockWidget::clear() } /** - * @brief PropertiesEditorDockWidget::apply - * Call the apply method for each editor present in this dock - */ + @brief PropertiesEditorDockWidget::apply + Call the apply method for each editor present in this dock +*/ void PropertiesEditorDockWidget::apply() { foreach(PropertiesEditorWidget *editor, m_editor_list) @@ -69,9 +69,9 @@ void PropertiesEditorDockWidget::apply() } /** - * @brief PropertiesEditorDockWidget::reset - * Call the reset method for each editor present in this widget - */ + @brief PropertiesEditorDockWidget::reset + Call the reset method for each editor present in this widget +*/ void PropertiesEditorDockWidget::reset() { foreach(PropertiesEditorWidget *editor, m_editor_list) @@ -79,14 +79,14 @@ 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) - * 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) - */ + @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) + 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) +*/ bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int index) { if (!editor) return false; @@ -98,20 +98,20 @@ bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int i } /** - * @brief PropertiesEditorDockWidget::editors - * @return all editor used in this dock - */ + @brief PropertiesEditorDockWidget::editors + @return all editor used in this dock +*/ QList PropertiesEditorDockWidget::editors() const { return m_editor_list; } /** - * @brief PropertiesEditorDockWidget::removeEditor - * 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 - */ + @brief PropertiesEditorDockWidget::removeEditor + 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 +*/ bool PropertiesEditorDockWidget::removeEditor(PropertiesEditorWidget *editor) { bool result = m_editor_list.removeOne(editor); diff --git a/sources/PropertiesEditor/propertieseditorwidget.cpp b/sources/PropertiesEditor/propertieseditorwidget.cpp index da8f1b07b..a579d9474 100644 --- a/sources/PropertiesEditor/propertieseditorwidget.cpp +++ b/sources/PropertiesEditor/propertieseditorwidget.cpp @@ -19,52 +19,52 @@ #include /** - * @brief PropertiesEditorWidget::PropertiesEditorWidget - * Constructor - * @param parent : parent widget - */ + @brief PropertiesEditorWidget::PropertiesEditorWidget + Constructor + @param parent : parent widget +*/ PropertiesEditorWidget::PropertiesEditorWidget(QWidget *parent) : QWidget(parent), m_live_edit(false) {} /** - * @brief PropertiesEditorWidget::associatedUndo - * By default, return a nullptr - * @return nullptr - */ + @brief PropertiesEditorWidget::associatedUndo + By default, return a nullptr + @return nullptr +*/ QUndoCommand *PropertiesEditorWidget::associatedUndo() const{ return nullptr; } /** - * @brief PropertiesEditorWidget::title - * @return the title of this editor - */ + @brief PropertiesEditorWidget::title + @return the title of this editor +*/ QString PropertiesEditorWidget::title() const { return QString(); } /** - * @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). - * 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. - * @param live_edit true to enable live edit - * @return true if live edit is enable, else false. - */ + @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). + 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. + @param live_edit true to enable live edit + @return true if live edit is enable, else false. +*/ bool PropertiesEditorWidget::setLiveEdit(bool live_edit) { Q_UNUSED(live_edit); return false; } /** - * @brief PropertiesEditorWidget::isLiveEdit - * @return true if this editor is in live edit mode - * else return fasle. - */ + @brief PropertiesEditorWidget::isLiveEdit + @return true if this editor is in live edit mode + else return fasle. +*/ bool PropertiesEditorWidget::isLiveEdit() const { return m_live_edit; } diff --git a/sources/PropertiesEditor/propertieseditorwidget.h b/sources/PropertiesEditor/propertieseditorwidget.h index 96b994edb..f2575a953 100644 --- a/sources/PropertiesEditor/propertieseditorwidget.h +++ b/sources/PropertiesEditor/propertieseditorwidget.h @@ -23,10 +23,10 @@ class QUndoCommand; /** - * @brief The PropertiesEditorWidget class - * This class extend QWidget method for have common way - * to edit propertie. - */ + @brief The PropertiesEditorWidget class + This class extend QWidget method for have common way + to edit propertie. +*/ class PropertiesEditorWidget : public QWidget { Q_OBJECT diff --git a/sources/QPropertyUndoCommand/qpropertyundocommand.cpp b/sources/QPropertyUndoCommand/qpropertyundocommand.cpp index 3ce5ef929..fd7948dc1 100644 --- a/sources/QPropertyUndoCommand/qpropertyundocommand.cpp +++ b/sources/QPropertyUndoCommand/qpropertyundocommand.cpp @@ -19,13 +19,13 @@ #include /** - * @brief QPropertyUndoCommand::QPropertyUndoCommand - * Default constructor with old and new value - * This command don't take ownership of @object - * @param object - * @param old_value - * @param new_value - */ + @brief QPropertyUndoCommand::QPropertyUndoCommand + Default constructor with old and new value + This command don't take ownership of @object + @param object + @param old_value + @param new_value +*/ QPropertyUndoCommand::QPropertyUndoCommand(QObject *object, const char *property_name, const QVariant &old_value, const QVariant &new_value, QUndoCommand *parent) : QUndoCommand(parent), m_object(object), @@ -35,14 +35,14 @@ 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 - * @param object - * @param old_value - * @param parent - */ + @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 + @param object + @param old_value + @param parent +*/ QPropertyUndoCommand::QPropertyUndoCommand(QObject *object, const char *property_name, const QVariant &old_value, QUndoCommand *parent) : QUndoCommand(parent), m_object(object), @@ -62,29 +62,29 @@ QPropertyUndoCommand::QPropertyUndoCommand(const QPropertyUndoCommand *other) } /** - * @brief QPropertyUndoCommand::setNewValue - * Set the new value of the property (set with redo) to @new_value - * @param new_value - */ + @brief QPropertyUndoCommand::setNewValue + Set the new value of the property (set with redo) to @new_value + @param new_value +*/ void QPropertyUndoCommand::setNewValue(const QVariant &new_value) { m_new_value = new_value; } /** - * @brief QPropertyUndoCommand::enableAnimation - * True to enable animation - * @param animate - */ + @brief QPropertyUndoCommand::enableAnimation + True to enable animation + @param animate +*/ void QPropertyUndoCommand::enableAnimation (bool animate) { m_animate = 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. - */ + @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. +*/ void QPropertyUndoCommand::setAnimated(bool animate, bool first_time) { m_animate = animate; @@ -92,11 +92,11 @@ void QPropertyUndoCommand::setAnimated(bool animate, bool first_time) } /** - * @brief QPropertyUndoCommand::mergeWith - * Try to merge this command with other command - * @param other - * @return true if was merged, else false - */ + @brief QPropertyUndoCommand::mergeWith + Try to merge this command with other command + @param other + @return true if was merged, else false +*/ bool QPropertyUndoCommand::mergeWith(const QUndoCommand *other) { if (id() != other->id() || other->childCount()) return false; @@ -107,9 +107,9 @@ bool QPropertyUndoCommand::mergeWith(const QUndoCommand *other) } /** - * @brief QPropertyUndoCommand::redo - * Redo this command - */ + @brief QPropertyUndoCommand::redo + Redo this command +*/ void QPropertyUndoCommand::redo() { if (m_object->property(m_property_name) != m_new_value) @@ -132,9 +132,9 @@ void QPropertyUndoCommand::redo() } /** - * @brief QPropertyUndoCommand::undo - * Undo this command - */ + @brief QPropertyUndoCommand::undo + Undo this command +*/ void QPropertyUndoCommand::undo() { if (m_object->property(m_property_name) != m_old_value) diff --git a/sources/QPropertyUndoCommand/qpropertyundocommand.h b/sources/QPropertyUndoCommand/qpropertyundocommand.h index db2c71907..77f274777 100644 --- a/sources/QPropertyUndoCommand/qpropertyundocommand.h +++ b/sources/QPropertyUndoCommand/qpropertyundocommand.h @@ -24,12 +24,12 @@ class QObject; /** - * @brief The QPropertyUndoCommand class - * This undo command manage QProperty of a QObject. - * This undo command can use QPropertyAnimation to animate the change when undo/redo is call - * To use animation call setAnimated(true). By default animation is disable. - * Some QVariant date can't be animated and result this command don't work. - */ + @brief The QPropertyUndoCommand class + This undo command manage QProperty of a QObject. + This undo command can use QPropertyAnimation to animate the change when undo/redo is call + To use animation call setAnimated(true). By default animation is disable. + Some QVariant date can't be animated and result this command don't work. +*/ class QPropertyUndoCommand : public QUndoCommand { public: diff --git a/sources/QWidgetAnimation/qwidgetanimation.cpp b/sources/QWidgetAnimation/qwidgetanimation.cpp index df0932a91..246543f9a 100644 --- a/sources/QWidgetAnimation/qwidgetanimation.cpp +++ b/sources/QWidgetAnimation/qwidgetanimation.cpp @@ -19,11 +19,11 @@ #include /** - * @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) - */ + @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) +*/ QWidgetAnimation::QWidgetAnimation(QWidget *widget, Qt::Orientation orientation, QWidgetAnimation::Behavior behavior, int duration) : QPropertyAnimation(widget), m_orientation(orientation), @@ -51,10 +51,10 @@ QWidgetAnimation::QWidgetAnimation(QWidget *widget, Qt::Orientation orientation, } /** - * @brief QWidgetAnimation::widgetToSubtract - * Widget to subtract the size when the behavior is availableSpace - * @param widgets - */ + @brief QWidgetAnimation::widgetToSubtract + Widget to subtract the size when the behavior is availableSpace + @param widgets +*/ void QWidgetAnimation::widgetToSubtract(QVector widgets) { m_widget_to_substract.clear(); @@ -62,9 +62,9 @@ void QWidgetAnimation::widgetToSubtract(QVector widgets) } /** - * @brief QWidgetAnimation::show - * show the widget - */ + @brief QWidgetAnimation::show + show the widget +*/ void QWidgetAnimation::show() { if (m_state == QWidgetAnimation::Showing) @@ -113,9 +113,9 @@ void QWidgetAnimation::show() } /** - * @brief QWidgetAnimation::hide - * Hide the widget - */ + @brief QWidgetAnimation::hide + Hide the widget +*/ void QWidgetAnimation::hide() { if (m_state == QWidgetAnimation::Hidding) @@ -135,10 +135,10 @@ void QWidgetAnimation::hide() } /** - * @brief QWidgetAnimation::setHidden - * true hide, false show - * @param hidden - */ + @brief QWidgetAnimation::setHidden + true hide, false show + @param hidden +*/ void QWidgetAnimation::setHidden(bool hidden) { if (hidden) @@ -148,10 +148,10 @@ void QWidgetAnimation::setHidden(bool hidden) } /** - * @brief QWidgetAnimation::setLastShowSize - * Force the last show size value to @size - * @param size - */ + @brief QWidgetAnimation::setLastShowSize + Force the last show size value to @size + @param size +*/ void QWidgetAnimation::setLastShowSize(int size) { if (m_orientation == Qt::Vertical) { diff --git a/sources/QWidgetAnimation/qwidgetanimation.h b/sources/QWidgetAnimation/qwidgetanimation.h index 92e6b18b2..48748d7a9 100644 --- a/sources/QWidgetAnimation/qwidgetanimation.h +++ b/sources/QWidgetAnimation/qwidgetanimation.h @@ -23,18 +23,18 @@ #include /** - * @brief The QWidgetAnimation class - * This class animate the show and hide function of a QWidget. + @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, - * 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. - */ + 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. +*/ class QWidgetAnimation : public QPropertyAnimation { Q_OBJECT diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp index 2a67a985a..8f1bfe79a 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp @@ -21,9 +21,9 @@ #include /** - * @brief QetGraphicsHandlerItem::QetGraphicsHandlerItem - * @param size, the size of the handler - */ + @brief QetGraphicsHandlerItem::QetGraphicsHandlerItem + @param size, the size of the handler +*/ QetGraphicsHandlerItem::QetGraphicsHandlerItem(qreal size) : m_size(size) { @@ -34,17 +34,17 @@ QetGraphicsHandlerItem::QetGraphicsHandlerItem(qreal size) : } /** - * @brief QetGraphicsHandlerItem::boundingRect - * @return - */ + @brief QetGraphicsHandlerItem::boundingRect + @return +*/ QRectF QetGraphicsHandlerItem::boundingRect() const { return m_br; } /** - * @brief QetGraphicsHandlerItem::setColor - * @param color, set the color of the handler - */ + @brief QetGraphicsHandlerItem::setColor + @param color, set the color of the handler +*/ void QetGraphicsHandlerItem::setColor(QColor color) { m_color = std::move(color); @@ -52,11 +52,11 @@ void QetGraphicsHandlerItem::setColor(QColor color) } /** - * @brief QetGraphicsHandlerItem::paint - * @param painter - * @param option - * @param widget - */ + @brief QetGraphicsHandlerItem::paint + @param painter + @param option + @param widget +*/ void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option) @@ -73,10 +73,10 @@ void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphics } /** - * @brief QetGraphicsHandlerItem::handlerForPoint - * @param points - * @return A list of handler with pos at point - */ + @brief QetGraphicsHandlerItem::handlerForPoint + @param points + @return A list of handler with pos at point +*/ QVector QetGraphicsHandlerItem::handlerForPoint(const QVector &points, int size) { QVector list_; diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h index 185c33356..c1a6c2760 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h @@ -22,12 +22,12 @@ #include /** - * @brief The QetGraphicsHandlerItem class - * This graphics item represents a point, destined to be used as an handler, - * for modifie the geometrie of a another graphics item (like shapes). - * The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,. - * The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior. - */ + @brief The QetGraphicsHandlerItem class + This graphics item represents a point, destined to be used as an handler, + for modifie the geometrie of a another graphics item (like shapes). + The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,. + The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior. +*/ class QetGraphicsHandlerItem : public QGraphicsItem { public: diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp index 24557ca7f..827f2d99c 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp +++ b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.cpp @@ -20,19 +20,19 @@ /** - * @brief QetGraphicsHandlerUtility::pointsForRect - * Return the keys points of the rectangle, stored in a vector. - * The points in the vector are stored like this : - * ********** - * 0---1---2 - * | | - * 3 4 - * | | - * 5---6---7 - * ************ - * @param rect - * @return - */ + @brief QetGraphicsHandlerUtility::pointsForRect + Return the keys points of the rectangle, stored in a vector. + The points in the vector are stored like this : + ********** + 0---1---2 + | | + 3 4 + | | + 5---6---7 + ************ + @param rect + @return +*/ QVector QetGraphicsHandlerUtility::pointsForRect(const QRectF &rect) { QVector vector; @@ -56,25 +56,26 @@ QVector QetGraphicsHandlerUtility::pointsForRect(const QRectF &rect) } /** - * @brief QetGraphicsHandlerUtility::pointsForLine - * The point that define a line in a QVector. - * there is two points. - * @param line - * @return - */ + @brief QetGraphicsHandlerUtility::pointsForLine + The point that define a line in a QVector. + there is two points. + @param line + @return +*/ QVector QetGraphicsHandlerUtility::pointsForLine(const QLineF &line) { return (QVector {line.p1(), line.p2()}); } /** - * @brief QetGraphicsHandlerUtility::pointsForArc - * Return the points for the given arc. - * The first value in the vector is the start point, the second the end point. - * @param rect - * @param start_angle : start angle in degree - * @param span_angle : span angle in degree; - * @return - */ + @brief QetGraphicsHandlerUtility::pointsForArc + Return the points for the given arc. + The first value in the vector is the start point, + the second the end point. + @param rect + @param start_angle : start angle in degree + @param span_angle : span angle in degree; + @return +*/ QVector QetGraphicsHandlerUtility::pointsForArc(const QRectF &rect, qreal start_angle, qreal span_angle) { QVector vector; @@ -88,14 +89,18 @@ QVector 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'. - * @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 see QetGraphicsHandlerUtility::pointsForRect to know - * the index of each keys points of a rectangle) - * @return : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect. - */ + @brief QetGraphicsHandlerUtility::rectForPosAtIndex + Return a rectangle after modification + 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 + @see QetGraphicsHandlerUtility::pointsForRect to know + the index of each keys points of a rectangle) + @return : the rectangle with modification. + If index is lower than 0 or higher than 7, + this method return old_rect. +*/ QRectF QetGraphicsHandlerUtility::rectForPosAtIndex(const QRectF &old_rect, const QPointF &pos, int index) { if (index < 0 || index > 7) return old_rect; @@ -114,15 +119,19 @@ 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'. - * 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 - * @param index : the index of the key point to modifie see QetGraphicsHandlerUtility::pointsForRect to know - * the index of each keys points of a rectangle) - * @return : the rectangle with modification. If index is lower than 0 or higher than 7, this method return old_rect. - */ + @brief QetGraphicsHandlerUtility::mirrorRectForPosAtIndex + 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 + @param index : the index of the key point to modifie + @see QetGraphicsHandlerUtility::pointsForRect to know + the index of each keys points of a rectangle) + @return : the rectangle with modification. + If index is lower than 0 or higher than 7, + this method return old_rect. +*/ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(const QRectF &old_rect, const QPointF &pos, int index) { if (index < 0 || index > 7) return old_rect; @@ -172,13 +181,13 @@ QRectF QetGraphicsHandlerUtility::mirrorRectForPosAtIndex(const QRectF &old_rect } /** - * @brief QetGraphicsHandlerUtility::lineForPosAtIndex - * Return a line after modification of @pos at index @index of @old_line. - * @param old_line - * @param pos - * @param index - * @return - */ + @brief QetGraphicsHandlerUtility::lineForPosAtIndex + Return a line after modification of @pos at index @index of @old_line. + @param old_line + @param pos + @param index + @return +*/ QLineF QetGraphicsHandlerUtility::lineForPosAtIndex(const QLineF &old_line, const QPointF &pos, int index) { QLineF line = old_line; index == 0 ? line.setP1(pos) : line.setP2(pos); @@ -186,12 +195,12 @@ QLineF QetGraphicsHandlerUtility::lineForPosAtIndex(const QLineF &old_line, cons } /** - * @brief QetGraphicsHandlerUtility::polygonForInsertPoint - * @param old_polygon : the polygon which we insert a new point. - * @param closed : polygon is closed or not - * @param pos : the pos where the new point must be added - * @return the new polygon - */ + @brief QetGraphicsHandlerUtility::polygonForInsertPoint + @param old_polygon : the polygon which we insert a new point. + @param closed : polygon is closed or not + @param pos : the pos where the new point must be added + @return the new polygon +*/ QPolygonF QetGraphicsHandlerUtility::polygonForInsertPoint(const QPolygonF &old_polygon, bool closed, const QPointF &pos) { qreal max_angle = 0; @@ -241,15 +250,17 @@ QPolygonF QetGraphicsHandlerUtility::polygonForInsertPoint(const QPolygonF &old_ } /** - * @brief QetGraphicsHandlerUtility::pointForRadiusRect - * @param rect the rectangle. - * @param xRadius : x radius - * @param yRadius : y radius - * @param mode : absolute or relative size: NOTE this argument is not used, this function always compute with relative size. - * @return the points of x and y radius of a rounded rect. - * The points are always based on the top right corner of the rect. - * the first point of vector is X the second Y - */ + @brief QetGraphicsHandlerUtility::pointForRadiusRect + @param rect the rectangle. + @param xRadius : x radius + @param yRadius : y radius + @param mode : + absolute or relative size: NOTE this argument is not used, + this function always compute with relative size. + @return the points of x and y radius of a rounded rect. + The points are always based on the top right corner of the rect. + the first point of vector is X the second Y +*/ QVector QetGraphicsHandlerUtility::pointForRadiusRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode) { QVector v; @@ -283,13 +294,13 @@ QVector QetGraphicsHandlerUtility::pointForRadiusRect(const QRectF &rec } /** - * @brief QetGraphicsHandlerUtility::radiusForPosAtIndex - * @param rect the rectangle - * @param pos : the pos of the new radius - * @param index : index of radius 0=X 1=Y - * @param mode - * @return - */ + @brief QetGraphicsHandlerUtility::radiusForPosAtIndex + @param rect the rectangle + @param pos : the pos of the new radius + @param index : index of radius 0=X 1=Y + @param mode + @return +*/ qreal QetGraphicsHandlerUtility::radiusForPosAtIndex(const QRectF &rect, const QPointF &pos, int index, Qt::SizeMode mode) { if (mode == Qt::AbsoluteSize) diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.h b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.h index dee501ec7..950f27fa4 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.h +++ b/sources/QetGraphicsItemModeler/qetgraphicshandlerutility.h @@ -26,11 +26,11 @@ class QPainter; /** - * @brief The QetGraphicsHandlerUtility class - * This class provide some methods to create and use handler for - * modify graphics shape like line rectangle etc... - * They also provide some conveniance static method. - */ + @brief The QetGraphicsHandlerUtility class + This class provide some methods to create and use handler for + modify graphics shape like line rectangle etc... + They also provide some conveniance static method. +*/ class QetGraphicsHandlerUtility { public: diff --git a/sources/SearchAndReplace/searchandreplaceworker.cpp b/sources/SearchAndReplace/searchandreplaceworker.cpp index 654f3b95c..2995939ad 100644 --- a/sources/SearchAndReplace/searchandreplaceworker.cpp +++ b/sources/SearchAndReplace/searchandreplaceworker.cpp @@ -32,11 +32,12 @@ 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, all diagrams must belong to the same project; - */ + @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, + all diagrams must belong to the same project; +*/ void SearchAndReplaceWorker::replaceDiagram(QList diagram_list) { if (diagram_list.isEmpty()) { @@ -91,12 +92,14 @@ void SearchAndReplaceWorker::replaceDiagram(Diagram *diagram) } /** - * @brief SearchAndReplaceWorker::replaceElement - * 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 to undo list of the project. - * @param list - */ + @brief SearchAndReplaceWorker::replaceElement + 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 + to undo list of the project. + @param list +*/ void SearchAndReplaceWorker::replaceElement(QList list) { if (list.isEmpty() || !list.first()->diagram()) { @@ -147,11 +150,11 @@ void SearchAndReplaceWorker::replaceElement(Element *element) } /** - * @brief SearchAndReplaceWorker::replaceIndiText - * Replace all displayed text of independent text of @list - * Each must belong to the same project, if not this function do nothing - * @param list - */ + @brief SearchAndReplaceWorker::replaceIndiText + Replace all displayed text of independent text of @list + Each must belong to the same project, if not this function do nothing + @param list +*/ void SearchAndReplaceWorker::replaceIndiText(QList list) { if (list.isEmpty() || !list.first()->diagram()) { @@ -183,12 +186,14 @@ void SearchAndReplaceWorker::replaceIndiText(IndependentTextItem *text) } /** - * @brief SearchAndReplaceWorker::replaceConductor - * 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 to undo list of the project. - * @param list - */ + @brief SearchAndReplaceWorker::replaceConductor + 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 + to undo list of the project. + @param list +*/ void SearchAndReplaceWorker::replaceConductor(QList list) { if (list.isEmpty() || !list.first()->diagram()) { @@ -232,15 +237,15 @@ void SearchAndReplaceWorker::replaceConductor(Conductor *conductor) } /** - * @brief SearchAndReplaceWorker::replaceAdvanced - * 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 - */ + @brief SearchAndReplaceWorker::replaceAdvanced + 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 +*/ void SearchAndReplaceWorker::replaceAdvanced(QList diagrams, QList elements, QList texts, QList conductors) { QETProject *project_ = nullptr; @@ -348,15 +353,17 @@ void SearchAndReplaceWorker::replaceAdvanced(QList diagrams, QListsetText(str); @@ -385,11 +392,11 @@ ConductorProperties SearchAndReplaceWorker::invalidConductorProperties() } /** - * @brief SearchAndReplaceWorker::applyChange - * @param original : the original properties - * @param change : the change properties, to be merged with @original - * @return a new conductor properties with the change applyed. - */ + @brief SearchAndReplaceWorker::applyChange + @param original : the original properties + @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) { ConductorProperties new_properties = original; @@ -420,11 +427,11 @@ ConductorProperties SearchAndReplaceWorker::applyChange(const ConductorPropertie } /** - * @brief SearchAndReplaceWorker::applyChange - * @param original : the original string - * @param change : the changed string: - * @return the string to be use in the properties - */ + @brief SearchAndReplaceWorker::applyChange + @param original : the original string + @param change : the changed string: + @return the string to be use in the properties +*/ QString SearchAndReplaceWorker::applyChange(const QString &original, const QString &change) { if (change.isEmpty()) {return original;} @@ -433,11 +440,11 @@ 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 - */ + @brief SearchAndReplaceWorker::replaceAdvanced + @param diagram + @return the titleblock properties with the change applied, + according to the state of @m_advanced_struct +*/ TitleBlockProperties SearchAndReplaceWorker::replaceAdvanced(Diagram *diagram) { TitleBlockProperties p = diagram->border_and_titleblock.exportTitleBlock(); @@ -459,11 +466,11 @@ 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 - */ + @brief SearchAndReplaceWorker::replaceAdvanced + @param element + @return The diagram context with the change applied, + according to the state of @m_advanced_struct +*/ DiagramContext SearchAndReplaceWorker::replaceAdvanced(Element *element) { DiagramContext context = element->elementInformations(); @@ -484,11 +491,11 @@ 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 - */ + @brief SearchAndReplaceWorker::replaceAdvanced + @param conductor + @return the conductor properties with the change applied, + according to the state of @m_advanced_struct +*/ ConductorProperties SearchAndReplaceWorker::replaceAdvanced(Conductor *conductor) { ConductorProperties properties = conductor->properties(); diff --git a/sources/SearchAndReplace/searchandreplaceworker.h b/sources/SearchAndReplace/searchandreplaceworker.h index 5740c4b9c..0f6e7f7bb 100644 --- a/sources/SearchAndReplace/searchandreplaceworker.h +++ b/sources/SearchAndReplace/searchandreplaceworker.h @@ -44,9 +44,10 @@ struct advancedReplaceStruct }; /** - * @brief The SearchAndReplaceWorker class - * This class is the worker use to change properties when use the search and replace function of QET - */ + @brief The SearchAndReplaceWorker class + This class is the worker use to change properties + when use the search and replace function of QET +*/ class SearchAndReplaceWorker { public: diff --git a/sources/SearchAndReplace/ui/replaceadvanceddialog.cpp b/sources/SearchAndReplace/ui/replaceadvanceddialog.cpp index dc9acebf0..ae3aea8f1 100644 --- a/sources/SearchAndReplace/ui/replaceadvanceddialog.cpp +++ b/sources/SearchAndReplace/ui/replaceadvanceddialog.cpp @@ -22,10 +22,10 @@ #include /** - * @brief replaceAdvancedDialog::replaceAdvancedDialog - * @param advanced - * @param parent - */ + @brief replaceAdvancedDialog::replaceAdvancedDialog + @param advanced + @param parent +*/ replaceAdvancedDialog::replaceAdvancedDialog(advancedReplaceStruct advanced, QWidget *parent) : QDialog(parent), ui(new Ui::replaceAdvancedDialog) @@ -47,10 +47,10 @@ replaceAdvancedDialog::~replaceAdvancedDialog() } /** - * @brief replaceAdvancedDialog::setAdvancedStruct - * Set the edited advanced struct - * @param advanced - */ + @brief replaceAdvancedDialog::setAdvancedStruct + Set the edited advanced struct + @param advanced +*/ void replaceAdvancedDialog::setAdvancedStruct(advancedReplaceStruct advanced) { int index = advanced.who; @@ -73,9 +73,9 @@ void replaceAdvancedDialog::setAdvancedStruct(advancedReplaceStruct advanced) } /** - * @brief replaceAdvancedDialog::advancedStruct - * @return the edited advanced struct - */ + @brief replaceAdvancedDialog::advancedStruct + @return the edited advanced struct +*/ advancedReplaceStruct replaceAdvancedDialog::advancedStruct() const { advancedReplaceStruct a; @@ -110,9 +110,9 @@ void replaceAdvancedDialog::fillWhatComboBox(int index) } /** - * @brief replaceAdvancedDialog::on_m_who_cb_currentIndexChanged - * @param index - */ + @brief replaceAdvancedDialog::on_m_who_cb_currentIndexChanged + @param index +*/ void replaceAdvancedDialog::on_m_who_cb_currentIndexChanged(int index) { fillWhatComboBox(index); } diff --git a/sources/SearchAndReplace/ui/replaceconductordialog.cpp b/sources/SearchAndReplace/ui/replaceconductordialog.cpp index d95423c46..f0e1e6e7a 100644 --- a/sources/SearchAndReplace/ui/replaceconductordialog.cpp +++ b/sources/SearchAndReplace/ui/replaceconductordialog.cpp @@ -25,9 +25,9 @@ typedef SearchAndReplaceWorker sarw; /** - * @brief ReplaceConductorDialog::ReplaceConductorDialog - * @param parent - */ + @brief ReplaceConductorDialog::ReplaceConductorDialog + @param parent +*/ ReplaceConductorDialog::ReplaceConductorDialog(const ConductorProperties &properties, QWidget *parent) : QDialog(parent), ui(new Ui::ReplaceConductorDialog) @@ -43,11 +43,11 @@ ReplaceConductorDialog::~ReplaceConductorDialog() } /** - * @brief ReplaceConductorDialog::updatePreview - * Update the preview for single line - * @param b true: update from the value displayed by this widget - * false: update from the properties given at the constructor of this widget - */ + @brief ReplaceConductorDialog::updatePreview + Update the preview for single line + @param b true: update from the value displayed by this widget + false: update from the properties given at the constructor of this widget +*/ void ReplaceConductorDialog::updatePreview(bool b) { const QRect pixmap_rect(0, 0, 96, 96); @@ -124,9 +124,9 @@ void ReplaceConductorDialog::setProperties(const ConductorProperties &properties } /** - * @brief ReplaceConductorDialog::properties - * @return the properties edited by this widget - */ + @brief ReplaceConductorDialog::properties + @return the properties edited by this widget +*/ ConductorProperties ReplaceConductorDialog::properties() const { ConductorProperties properties_; diff --git a/sources/SearchAndReplace/ui/replaceconductordialog.h b/sources/SearchAndReplace/ui/replaceconductordialog.h index 8b99900fb..a28ed243d 100644 --- a/sources/SearchAndReplace/ui/replaceconductordialog.h +++ b/sources/SearchAndReplace/ui/replaceconductordialog.h @@ -27,9 +27,9 @@ namespace Ui { } /** - * @brief The ReplaceConductorDialog class - * A Qdialog to edit a conductor properties, use for the search and replace feature of QElectrotech. - */ + @brief The ReplaceConductorDialog class + A Qdialog to edit a conductor properties, use for the search and replace feature of QElectrotech. +*/ class ReplaceConductorDialog : public QDialog { Q_OBJECT diff --git a/sources/SearchAndReplace/ui/replaceelementdialog.cpp b/sources/SearchAndReplace/ui/replaceelementdialog.cpp index 837a1152f..c0fb6d57d 100644 --- a/sources/SearchAndReplace/ui/replaceelementdialog.cpp +++ b/sources/SearchAndReplace/ui/replaceelementdialog.cpp @@ -39,10 +39,10 @@ ReplaceElementDialog::~ReplaceElementDialog() } /** - * @brief ReplaceElementDialog::setContext - * Set the current diagram context to be edited - * @param context - */ + @brief ReplaceElementDialog::setContext + Set the current diagram context to be edited + @param context +*/ void ReplaceElementDialog::setContext(DiagramContext context) { m_context = context; @@ -53,9 +53,9 @@ void ReplaceElementDialog::setContext(DiagramContext context) } /** - * @brief ReplaceElementDialog::context - * @return The edited diagram context - */ + @brief ReplaceElementDialog::context + @return The edited diagram context +*/ DiagramContext ReplaceElementDialog::context() const { DiagramContext context; diff --git a/sources/SearchAndReplace/ui/replacefoliowidget.cpp b/sources/SearchAndReplace/ui/replacefoliowidget.cpp index f953c2341..ba36810f6 100644 --- a/sources/SearchAndReplace/ui/replacefoliowidget.cpp +++ b/sources/SearchAndReplace/ui/replacefoliowidget.cpp @@ -39,9 +39,9 @@ ReplaceFolioWidget::~ReplaceFolioWidget() } /** - * @brief ReplaceFolioWidget::titleBlockProperties - * @return the title block properties edited by this widget - */ + @brief ReplaceFolioWidget::titleBlockProperties + @return the title block properties edited by this widget +*/ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const { TitleBlockProperties prop; @@ -71,10 +71,10 @@ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const } /** - * @brief ReplaceFolioWidget::setTitleBlockProperties - * Set the title block properties edited by this widget - * @param properties - */ + @brief ReplaceFolioWidget::setTitleBlockProperties + Set the title block properties edited by this widget + @param properties +*/ void ReplaceFolioWidget::setTitleBlockProperties(const TitleBlockProperties &properties) { sarw::setupLineEdit(ui->m_title_le, ui->m_title_cb, properties.title); @@ -130,17 +130,17 @@ ReplaceFolioDialog::~ReplaceFolioDialog() {} /** - * @brief ReplaceFolioDialog::titleBlockProperties - * @return The title block properties edited by this dialog - */ + @brief ReplaceFolioDialog::titleBlockProperties + @return The title block properties edited by this dialog +*/ TitleBlockProperties ReplaceFolioDialog::titleBlockProperties() const { return m_widget->titleBlockProperties(); } /** - * @brief ReplaceFolioDialog::setTitleBlockProperties - * @param properties : set the title block properties edited by this dialog - */ + @brief ReplaceFolioDialog::setTitleBlockProperties + @param properties : set the title block properties edited by this dialog +*/ void ReplaceFolioDialog::setTitleBlockProperties(const TitleBlockProperties &properties) { m_widget->setTitleBlockProperties(properties); } diff --git a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp index 3e4351a33..c4405f5ba 100644 --- a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp +++ b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp @@ -36,10 +36,10 @@ #include /** - * @brief SearchAndReplaceWidget::SearchAndReplaceWidget - * Constructor - * @param parent - */ + @brief SearchAndReplaceWidget::SearchAndReplaceWidget + Constructor + @param parent +*/ SearchAndReplaceWidget::SearchAndReplaceWidget(QWidget *parent) : QWidget(parent), ui(new Ui::SearchAndReplaceWidget) @@ -59,20 +59,20 @@ SearchAndReplaceWidget::SearchAndReplaceWidget(QWidget *parent) : } /** - * @brief SearchAndReplaceWidget::~SearchAndReplaceWidget - * Destructor - */ + @brief SearchAndReplaceWidget::~SearchAndReplaceWidget + Destructor +*/ SearchAndReplaceWidget::~SearchAndReplaceWidget() { delete ui; } /** - * @brief SearchAndReplaceWidget::event - * Reimplemented to clear the the lines edit and hide - * the advanced widgets, when this widget become hidden - * @param event - * @return - */ + @brief SearchAndReplaceWidget::event + Reimplemented to clear the the lines edit and hide + the advanced widgets, when this widget become hidden + @param event + @return +*/ bool SearchAndReplaceWidget::event(QEvent *event) { if (event->type() == QEvent::Hide) @@ -95,10 +95,10 @@ bool SearchAndReplaceWidget::event(QEvent *event) } /** - * @brief SearchAndReplaceWidget::clear - * Clear the content of the search and replace line edit - * Clear all tree items in the tree widget (except the category items). - */ + @brief SearchAndReplaceWidget::clear + Clear the content of the search and replace line edit + Clear all tree items in the tree widget (except the category items). +*/ void SearchAndReplaceWidget::clear() { disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, this, &SearchAndReplaceWidget::itemChanged); @@ -128,18 +128,18 @@ void SearchAndReplaceWidget::clear() } /** - * @brief SearchAndReplaceWidget::setEditor - * Set the diagram editor of this widget - * @param editor - */ + @brief SearchAndReplaceWidget::setEditor + Set the diagram editor of this widget + @param editor +*/ void SearchAndReplaceWidget::setEditor(QETDiagramEditor *editor) { m_editor = editor; } /** - * @brief SearchAndReplaceWidget::setUpTreeItems - * Set up the main tree widget items - */ + @brief SearchAndReplaceWidget::setUpTreeItems + Set up the main tree widget items +*/ void SearchAndReplaceWidget::setUpTreeItems() { m_root_qtwi = new QTreeWidgetItem(ui->m_tree_widget); @@ -207,10 +207,10 @@ void SearchAndReplaceWidget::setUpTreeItems() } /** - * @brief SearchAndReplaceWidget::setHideAdvanced - * Hide advanced widgets - * @param hide - */ + @brief SearchAndReplaceWidget::setHideAdvanced + Hide advanced widgets + @param hide +*/ void SearchAndReplaceWidget::setHideAdvanced(bool hide) { m_vertical_animation->setHidden(hide); @@ -218,9 +218,9 @@ void SearchAndReplaceWidget::setHideAdvanced(bool hide) } /** - * @brief SearchAndReplaceWidget::fillItemsList - * Fill the tree - */ + @brief SearchAndReplaceWidget::fillItemsList + Fill the tree +*/ void SearchAndReplaceWidget::fillItemsList() { disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, this, &SearchAndReplaceWidget::itemChanged); @@ -296,10 +296,10 @@ void SearchAndReplaceWidget::fillItemsList() } /** - * @brief SearchAndReplaceWidget::addElement - * Add a tree widget item for @element - * @param element - */ + @brief SearchAndReplaceWidget::addElement + Add a tree widget item for @element + @param element +*/ void SearchAndReplaceWidget::addElement(Element *element) { QTreeWidgetItem *parent = m_elements_qtwi; @@ -341,9 +341,9 @@ void SearchAndReplaceWidget::addElement(Element *element) } /** - * @brief SearchAndReplaceWidget::search - * Start the search - */ + @brief SearchAndReplaceWidget::search + Start the search +*/ void SearchAndReplaceWidget::search() { QString str = ui->m_search_le->text(); @@ -413,11 +413,11 @@ void SearchAndReplaceWidget::search() } /** - * @brief SearchAndReplaceWidget::setVisibleAllParents - * Set visible all parents of @item until the invisible root item - * @param item - * @param expend_parent - */ + @brief SearchAndReplaceWidget::setVisibleAllParents + Set visible all parents of @item until the invisible root item + @param item + @param expend_parent +*/ void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, bool expend_parent) { if (item->parent()) @@ -430,11 +430,13 @@ void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, bool ex } /** - * @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 flags - * @return the next item according to flag or nullptr if there is not a next 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 flags + @return the next item according to flag + or nullptr if there is not a next item +*/ QTreeWidgetItem *SearchAndReplaceWidget::nextItem(QTreeWidgetItem *item, QTreeWidgetItemIterator::IteratorFlag flags) const { QTreeWidgetItem *qtwi = item; @@ -459,11 +461,13 @@ QTreeWidgetItem *SearchAndReplaceWidget::nextItem(QTreeWidgetItem *item, QTreeWi } /** - * @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 flags - * @return the previous item according to flag or nullptr if there is not a previous item - */ + @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 flags + @return the previous item according to flag + or nullptr if there is not a previous item +*/ QTreeWidgetItem *SearchAndReplaceWidget::previousItem(QTreeWidgetItem *item, QTreeWidgetItemIterator::IteratorFlag flags) const { QTreeWidgetItem *qtwi = item; @@ -488,10 +492,10 @@ QTreeWidgetItem *SearchAndReplaceWidget::previousItem(QTreeWidgetItem *item, QTr } /** - * @brief SearchAndReplaceWidget::updateNextPreviousButtons - * According to the current item, if there is a next or a previous item, - * we enable/disable the buttons next/previous item. - */ + @brief SearchAndReplaceWidget::updateNextPreviousButtons + According to the current item, if there is a next or a previous item, + we enable/disable the buttons next/previous item. +*/ void SearchAndReplaceWidget::updateNextPreviousButtons() { QTreeWidgetItem *item_ = ui->m_tree_widget->currentItem(); @@ -536,12 +540,12 @@ void SearchAndReplaceWidget::updateNextPreviousButtons() } /** - * @brief SearchAndReplaceWidget::itemChanged - * Reimplemented from QTreeWidget. - * Use to update the check state of items. - * @param item - * @param column - */ + @brief SearchAndReplaceWidget::itemChanged + Reimplemented from QTreeWidget. + Use to update the check state of items. + @param item + @param column +*/ void SearchAndReplaceWidget::itemChanged(QTreeWidgetItem *item, int column) { Q_UNUSED(column); @@ -554,11 +558,11 @@ void SearchAndReplaceWidget::itemChanged(QTreeWidgetItem *item, int column) } /** - * @brief SearchAndReplaceWidget::setChildCheckState - * @param item : Parent of the items to be evaluated - * @param check : check state - * @param deep : if true, we evaluate every subchilds. - */ + @brief SearchAndReplaceWidget::setChildCheckState + @param item : Parent of the items to be evaluated + @param check : check state + @param deep : if true, we evaluate every subchilds. +*/ void SearchAndReplaceWidget::setChildCheckState(QTreeWidgetItem *item, Qt::CheckState check, bool deep) { for (int i=0 ; ichildCount() ; ++i) @@ -571,10 +575,11 @@ void SearchAndReplaceWidget::setChildCheckState(QTreeWidgetItem *item, Qt::Check } /** - * @brief SearchAndReplaceWidget::updateParentCheckState - * @param item : a child item of the parent to be evaluated. - * @param all_parents : if true, we evaluate every parents, until the root item. - */ + @brief SearchAndReplaceWidget::updateParentCheckState + @param item : a child item of the parent to be evaluated. + @param all_parents : if true, we evaluate every parents, + until the root item. +*/ void SearchAndReplaceWidget::updateParentCheckState(QTreeWidgetItem *item, bool all_parents) { QTreeWidgetItem *parent = item->parent(); @@ -616,9 +621,9 @@ void SearchAndReplaceWidget::updateParentCheckState(QTreeWidgetItem *item, bool } /** - * @brief SearchAndReplaceWidget::activateNextChecked - * Activate the next checked (and visible) item - */ + @brief SearchAndReplaceWidget::activateNextChecked + Activate the next checked (and visible) item +*/ void SearchAndReplaceWidget::activateNextChecked() { //Next button is disabled, so there is not a next item. @@ -632,9 +637,9 @@ void SearchAndReplaceWidget::activateNextChecked() } /** - * @brief SearchAndReplaceWidget::selectedDiagram - * @return The list of visible and selected diagram in the tree widget - */ + @brief SearchAndReplaceWidget::selectedDiagram + @return The list of visible and selected diagram in the tree widget +*/ QList SearchAndReplaceWidget::selectedDiagram() const { QList diagram_list; @@ -654,9 +659,9 @@ QList SearchAndReplaceWidget::selectedDiagram() const } /** - * @brief SearchAndReplaceWidget::selectedElement - * @return The list of visible and selected element in the tree widget - */ + @brief SearchAndReplaceWidget::selectedElement + @return The list of visible and selected element in the tree widget +*/ QList SearchAndReplaceWidget::selectedElement() const { QList element_list; @@ -676,9 +681,9 @@ QList SearchAndReplaceWidget::selectedElement() const } /** - * @brief SearchAndReplaceWidget::selectedConductor - * @return The list of visible and selected conductor in the tree widget - */ + @brief SearchAndReplaceWidget::selectedConductor + @return The list of visible and selected conductor in the tree widget +*/ QList SearchAndReplaceWidget::selectedConductor() const { QList conductor_list; @@ -698,9 +703,10 @@ QList SearchAndReplaceWidget::selectedConductor() const } /** - * @brief SearchAndReplaceWidget::selectedText - * @return The list of visible and selected independant text in the tree widget - */ + @brief SearchAndReplaceWidget::selectedText + @return The list of visible and selected independant text + in the tree widget +*/ QList SearchAndReplaceWidget::selectedText() const { QList text_list; @@ -720,10 +726,10 @@ QList SearchAndReplaceWidget::selectedText() const } /** - * @brief SearchAndReplaceWidget::searchTerms - * @param diagram - * @return All QStrings use as terms for search. - */ + @brief SearchAndReplaceWidget::searchTerms + @param diagram + @return All QStrings use as terms for search. +*/ QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) { QStringList list; @@ -744,10 +750,10 @@ QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) } /** - * @brief SearchAndReplaceWidget::searchTerms - * @param element - * @return All QString use as terms for search - */ + @brief SearchAndReplaceWidget::searchTerms + @param element + @return All QString use as terms for search +*/ QStringList SearchAndReplaceWidget::searchTerms(Element *element) { QStringList list; @@ -781,10 +787,10 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) } /** - * @brief SearchAndReplaceWidget::searchTerms - * @param conductor - * @return all QString use as terms for search. - */ + @brief SearchAndReplaceWidget::searchTerms + @param conductor + @return all QString use as terms for search. +*/ QStringList SearchAndReplaceWidget::searchTerms(Conductor *conductor) { QStringList list; @@ -800,8 +806,8 @@ QStringList SearchAndReplaceWidget::searchTerms(Conductor *conductor) } /** - * @brief SearchAndReplaceWidget::on_m_quit_button_clicked - */ + @brief SearchAndReplaceWidget::on_m_quit_button_clicked +*/ void SearchAndReplaceWidget::on_m_quit_button_clicked() { if (auto animator = this->findChild("search and replace animator")) { @@ -990,9 +996,9 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked() } /** - * @brief SearchAndReplaceWidget::on_m_replace_pb_clicked - * Replace the current selection - */ + @brief SearchAndReplaceWidget::on_m_replace_pb_clicked + Replace the current selection +*/ void SearchAndReplaceWidget::on_m_replace_pb_clicked() { QTreeWidgetItem *qtwi = ui->m_tree_widget->currentItem(); @@ -1082,9 +1088,9 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() } /** - * @brief SearchAndReplaceWidget::on_m_replace_all_pb_clicked - * Replace all checked item - */ + @brief SearchAndReplaceWidget::on_m_replace_all_pb_clicked + Replace all checked item +*/ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked() { if (ui->m_folio_pb->text().endsWith(tr(" [édité]"))) { @@ -1140,10 +1146,10 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked() } /** - * @brief SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged - * Update the search when user change mode. - * @param index - */ + @brief SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged + Update the search when user change mode. + @param index +*/ void SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged(int index) { Q_UNUSED(index); @@ -1151,10 +1157,10 @@ void SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged(int index) } /** - * @brief SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged - * Update the search when change the case sensitive - * @param arg1 - */ + @brief SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged + Update the search when change the case sensitive + @param arg1 +*/ void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1) { Q_UNUSED(arg1); @@ -1162,9 +1168,9 @@ void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1) } /** - * @brief SearchAndReplaceWidget::on_m_conductor_pb_clicked - * Open a dialog to edit the condutor properties - */ + @brief SearchAndReplaceWidget::on_m_conductor_pb_clicked + Open a dialog to edit the condutor properties +*/ void SearchAndReplaceWidget::on_m_conductor_pb_clicked() { ReplaceConductorDialog *dialog = new ReplaceConductorDialog(m_worker.m_conductor_properties, this); @@ -1191,9 +1197,9 @@ void SearchAndReplaceWidget::on_m_conductor_pb_clicked() } /** - * @brief SearchAndReplaceWidget::on_m_advanced_replace_pb_clicked - * Open the advanced editor. - */ + @brief SearchAndReplaceWidget::on_m_advanced_replace_pb_clicked + Open the advanced editor. +*/ void SearchAndReplaceWidget::on_m_advanced_replace_pb_clicked() { replaceAdvancedDialog *dialog = new replaceAdvancedDialog(m_worker.m_advanced_struct, this); diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index b2962a489..09ea034a9 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -29,8 +29,8 @@ namespace autonum { /** - * @brief sequentialNumbers::sequentialNumbers - */ + @brief sequentialNumbers::sequentialNumbers + */ sequentialNumbers::sequentialNumbers() {} @@ -83,12 +83,13 @@ namespace autonum } /** - * @brief sequentialNumbers::toXml - * export this sequential numbers into a QDomElement. - * @param document : QDomDocument used to create the QDomElement - * @param tag_name : the tag name used for the QDomElement. - * @return A QDomElement, if this sequential have no value, the returned QDomELement is empty - */ + @brief sequentialNumbers::toXml + export this sequential numbers into a QDomElement. + @param document : QDomDocument used to create the QDomElement + @param tag_name : the tag name used for the QDomElement. + @return A QDomElement, if this sequential have no value, + the returned QDomELement is empty + */ QDomElement sequentialNumbers::toXml(QDomDocument &document, const QString& tag_name) const { QDomElement element = document.createElement(tag_name); @@ -110,10 +111,10 @@ namespace autonum } /** - * @brief sequentialNumbers::fromXml - * Import sequential values from a QDomElement - * @param element - */ + @brief sequentialNumbers::fromXml + Import sequential values from a QDomElement + @param element + */ void sequentialNumbers::fromXml(const QDomElement &element) { if (!element.hasChildNodes()) @@ -152,14 +153,17 @@ namespace autonum } /** - * @brief AssignVariables::formulaToLabel - * Return the @formula with variable assigned (ready to be displayed) - * @param formula - the formula to work - * @param seqStruct - struct where is stocked int values (struct is passed as a reference and modified by this static method) - * @param diagram - the diagram where occure the formula. - * @param elmt - parent element (if any) of the formula - * @return the string with variable assigned. - */ + @brief AssignVariables::formulaToLabel + Return the @formula with variable assigned + (ready to be displayed) + @param formula - the formula to work + @param seqStruct - struct where is stocked int values + (struct is passed as a reference + and modified by this static method) + @param diagram - the diagram where occure the formula. + @param elmt - parent element (if any) of the formula + @return the string with variable assigned. + */ QString AssignVariables::formulaToLabel(QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt) { AssignVariables av(std::move(formula), seqStruct, diagram, elmt); @@ -168,12 +172,13 @@ namespace autonum } /** - * @brief AssignVariables::replaceVariable - * Replace the variables in @formula in form %{my-var} to the corresponding value stored in @dc - * @param formula - * @param dc - * @return - */ + @brief AssignVariables::replaceVariable + Replace the variables in @formula in form %{my-var} + to the corresponding value stored in @dc + @param formula + @param dc + @return + */ QString AssignVariables::replaceVariable(const QString &formula, const DiagramContext &dc) { QString str = formula; @@ -297,12 +302,13 @@ namespace autonum } /** - * @brief setSequentialToList - * 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 (unit, unitfolio, ten, tenfolio, hundred, hundredfolio) - */ + @brief setSequentialToList + 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 + (unit, unitfolio, ten, tenfolio, hundred, hundredfolio) + */ void setSequentialToList(QStringList &list, NumerotationContext &context, const QString& type) { for (int i = 0; i < context.size(); i++) @@ -321,12 +327,12 @@ namespace autonum } /** - * @brief setFolioSequentialToHash - * 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 - */ + @brief setFolioSequentialToHash + 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 + */ void setFolioSequentialToHash(QStringList &list, QHash &hash, const QString& autoNumName) { if (hash.isEmpty() || !hash.contains(autoNumName)) @@ -355,15 +361,20 @@ namespace autonum } /** - * @brief setSequential - * Fill seqStruct - * @param label : label of sequential to fill (%sequ_, %sequf_, %seqt_, ect....) - * @param seqStruct : struct to fill - * @param context : numerotation context use to know the current sequential num. - * @param diagram : diagram where the sequential occur, notably use when label is folio type (%sequf_, %seqtf_, %seqhf_), - * to keep up to date the current sequential of folio. - * @param hashKey : the hash key used to store the sequential for folio type. - */ + @brief setSequential + Fill seqStruct + @param label : label of sequential to fill + (%sequ_, %sequf_, %seqt_, ect....) + @param seqStruct : struct to fill + @param context : numerotation context use + to know the current sequential num. + @param diagram : diagram where the sequential occur, + notably use when label is folio type + (%sequf_, %seqtf_, %seqhf_), + to keep up to date the current sequential of folio. + @param hashKey : + the hash key used to store the sequential for folio type. + */ void setSequential(const QString& label, sequentialNumbers &seqStruct, NumerotationContext &context, Diagram *diagram, const QString& hashKey) { if (!context.isEmpty()) @@ -399,10 +410,10 @@ namespace autonum } /** - * @brief numerotationContextToFormula - * @param nc - * @return the numerotation context, converted to formula - */ + @brief numerotationContextToFormula + @param nc + @return the numerotation context, converted to formula + */ QString numerotationContextToFormula(const NumerotationContext &nc) { QString type; @@ -476,11 +487,13 @@ namespace autonum } /** - * @brief elementPrefixForLocation - * @param location - * @return the prefix for an element represented by location, prefix can be null. - * Search for a prefix only if @location represent an element embedded in a project - */ + @brief elementPrefixForLocation + @param location + @return the prefix for an element represented by location, + prefix can be null. + Search for a prefix only if @location represent + an element embedded in a project + */ QString elementPrefixForLocation(const ElementsLocation &location) { if (!location.isProject()) diff --git a/sources/autoNum/assignvariables.h b/sources/autoNum/assignvariables.h index c695148d1..ee99c4dae 100644 --- a/sources/autoNum/assignvariables.h +++ b/sources/autoNum/assignvariables.h @@ -55,10 +55,10 @@ namespace autonum }; /** - * @brief The AssignVariables class - * This class assign variable of a formula string. - * Return the final string used to be displayed from a formula string. - */ + @brief The AssignVariables class + This class assign variable of a formula string. + Return the final string used to be displayed from a formula string. + */ class AssignVariables { public: diff --git a/sources/autoNum/numerotationcontext.cpp b/sources/autoNum/numerotationcontext.cpp index 99c302b9a..638e81792 100644 --- a/sources/autoNum/numerotationcontext.cpp +++ b/sources/autoNum/numerotationcontext.cpp @@ -21,32 +21,32 @@ #include "qet.h" /** - * Constructor - */ + Constructor +*/ NumerotationContext::NumerotationContext(){ } /** - * Constructor from xml - */ + Constructor from xml +*/ NumerotationContext::NumerotationContext(QDomElement &e) { fromXml(e); } /** - * @brief NumerotationContext::clear, clear the content - */ + @brief NumerotationContext::clear, clear the content +*/ void NumerotationContext::clear () { content_.clear(); } /** - * @brief NumerotationContext::addValue, add a new value on the contexte - * @param type the type of value - * @param value the value itself - * @param increase the increase number of value - * @return true if value is append - */ + @brief NumerotationContext::addValue, add a new value on the contexte + @param type the type of value + @param value the value itself + @param increase the increase number of value + @return true if value is append +*/ bool NumerotationContext::addValue(const QString &type, const QVariant &value, const int increase, const int initialvalue) { if (!keyIsAcceptable(type) && !value.canConvert(QVariant::String)) return false; if (keyIsNumber(type) && !value.canConvert(QVariant::Int)) return false; @@ -58,80 +58,80 @@ bool NumerotationContext::addValue(const QString &type, const QVariant &value, c } /** - * @brief NumerotationContext::operator [] - * @return the string at position @i - */ + @brief NumerotationContext::operator [] + @return the string at position @i +*/ QString NumerotationContext::operator [] (const int &i) const { return (content_.at(i)); } /** - * @brief NumerotationContext::operator << , append other - */ + @brief NumerotationContext::operator << , append other +*/ void NumerotationContext::operator << (const NumerotationContext &other) { for (int i=0; i 0) return false; return true; } /** - * @brief NumerotationContext::itemAt - * @return the content at position @i 1:type 2:value 3:increase - */ + @brief NumerotationContext::itemAt + @return the content at position @i 1:type 2:value 3:increase +*/ QStringList NumerotationContext::itemAt(const int i) const { return (content_.at(i).split("|")); } /** - * @brief validRegExpNum - * @return all type use to numerotation - */ + @brief validRegExpNum + @return all type use to numerotation +*/ QString NumerotationContext::validRegExpNum () const { return ("unit|unitfolio|ten|tenfolio|hundred|hundredfolio|string|idfolio|folio|plant|locmach|elementline|elementcolumn|elementprefix"); } /** - * @brief NumerotationContext::validRegExpNumber - * @return all type represents a number - */ + @brief NumerotationContext::validRegExpNumber + @return all type represents a number +*/ QString NumerotationContext::validRegExpNumber() const { return ("unit|unitfolio|ten|tenfolio|hundred|hundredfolio"); } /** - * @brief NumerotationContext::keyIsAcceptable - * @return true if @type is acceptable - */ + @brief NumerotationContext::keyIsAcceptable + @return true if @type is acceptable +*/ bool NumerotationContext::keyIsAcceptable(const QString &type) const { return (type.contains(QRegExp(validRegExpNum()))); } /** - * @brief NumerotationContext::keyIsNumber - * @return true if @type represent a number - */ + @brief NumerotationContext::keyIsNumber + @return true if @type represent a number +*/ bool NumerotationContext::keyIsNumber(const QString &type) const { return (type.contains(QRegExp(validRegExpNumber()))); } /** - * @brief NumerotationContext::toXml - * Save the numerotation context in a QDomElement under the element name @str - */ + @brief NumerotationContext::toXml + 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); for (int i=0; idisconnect(); @@ -48,9 +48,9 @@ AutoNumberingDockWidget::~AutoNumberingDockWidget() } /** - * @brief AutoNumberingDockWidget::clear - * Remove all combo box values - */ + @brief AutoNumberingDockWidget::clear + Remove all combo box values +*/ void AutoNumberingDockWidget::clear() { ui->m_conductor_cb->clear(); @@ -67,11 +67,11 @@ void AutoNumberingDockWidget::projectClosed() } /** - * @brief AutoNumberingDockWidget::setProject - * @param project: project to be setted - * @param projectview: projectview to be setted - * assign Project and ProjectView, connect all signals and setContext - */ + @brief AutoNumberingDockWidget::setProject + @param project: project to be setted + @param projectview: projectview to be setted + assign Project and ProjectView, connect all signals and setContext +*/ void AutoNumberingDockWidget::setProject(QETProject *project, ProjectView *projectview) { //Disconnect previous project @@ -133,9 +133,9 @@ void AutoNumberingDockWidget::setProject(QETProject *project, ProjectView *proje } /** - * @brief AutoNumberingDockWidget::setContext - * Add all itens to comboboxes - */ + @brief AutoNumberingDockWidget::setContext + Add all itens to comboboxes +*/ void AutoNumberingDockWidget::setContext() { this->clear(); @@ -165,9 +165,9 @@ void AutoNumberingDockWidget::setContext() { } /** - * @brief AutoNumberingDockWidget::setConductorActive - * @param dv: activated diagramview - */ + @brief AutoNumberingDockWidget::setConductorActive + @param dv: activated diagramview +*/ void AutoNumberingDockWidget::setConductorActive(DiagramView* dv) { if (dv!=nullptr) { QString conductor_autonum = dv->diagram()->conductorsAutonumName(); @@ -177,9 +177,9 @@ void AutoNumberingDockWidget::setConductorActive(DiagramView* dv) { } /** - * @brief AutoNumberingDockWidget::setActive - * Set current used autonumberings - */ + @brief AutoNumberingDockWidget::setActive + Set current used autonumberings +*/ void AutoNumberingDockWidget::setActive() { if (m_project_view!=nullptr) { @@ -206,9 +206,9 @@ void AutoNumberingDockWidget::setActive() { } /** - * @brief AutoNumberingDockWidget::conductorAutoNumChanged - * Add new or remove conductor auto num from combobox - */ + @brief AutoNumberingDockWidget::conductorAutoNumChanged + Add new or remove conductor auto num from combobox +*/ void AutoNumberingDockWidget::conductorAutoNumChanged() { ui->m_conductor_cb->clear(); @@ -222,10 +222,10 @@ void AutoNumberingDockWidget::conductorAutoNumChanged() { } /** - * @brief AutoNumberingDockWidget::on_m_conductor_cb_activated - * @param unused - * Set new conductor AutoNum - */ + @brief AutoNumberingDockWidget::on_m_conductor_cb_activated + @param unused + Set new conductor AutoNum +*/ void AutoNumberingDockWidget::on_m_conductor_cb_activated(int) { QString current_autonum = ui->m_conductor_cb->currentText(); @@ -236,9 +236,9 @@ void AutoNumberingDockWidget::on_m_conductor_cb_activated(int) } /** - * @brief AutoNumberingDockWidget::elementAutoNumChanged - * Add new or remove element auto num from combobox - */ + @brief AutoNumberingDockWidget::elementAutoNumChanged + Add new or remove element auto num from combobox +*/ void AutoNumberingDockWidget::elementAutoNumChanged() { ui->m_element_cb->clear(); @@ -253,10 +253,10 @@ void AutoNumberingDockWidget::elementAutoNumChanged() { } /** - * @brief AutoNumberingDockWidget::on_m_element_cb_activated - * @param unused - * Set new element AutoNum - */ + @brief AutoNumberingDockWidget::on_m_element_cb_activated + @param unused + Set new element AutoNum +*/ void AutoNumberingDockWidget::on_m_element_cb_activated(int) { m_project->setCurrrentElementAutonum(ui->m_element_cb->currentText()); @@ -264,9 +264,9 @@ void AutoNumberingDockWidget::on_m_element_cb_activated(int) } /** - * @brief AutoNumberingDockWidget::folioAutoNumChanged - * Add new or remove folio auto num from combobox - */ + @brief AutoNumberingDockWidget::folioAutoNumChanged + Add new or remove folio auto num from combobox +*/ void AutoNumberingDockWidget::folioAutoNumChanged() { ui->m_folio_cb->clear(); @@ -281,10 +281,10 @@ void AutoNumberingDockWidget::folioAutoNumChanged() { } /** - * @brief AutoNumberingDockWidget::on_m_folio_cb_activated - * @param unused - * Set new folio AutoNum - */ + @brief AutoNumberingDockWidget::on_m_folio_cb_activated + @param unused + Set new folio AutoNum +*/ void AutoNumberingDockWidget::on_m_folio_cb_activated(int) { QString current_autonum = ui->m_folio_cb->currentText(); TitleBlockProperties ip = m_project -> defaultTitleBlockProperties(); diff --git a/sources/autoNum/ui/folioautonumbering.cpp b/sources/autoNum/ui/folioautonumbering.cpp index 71a6373c2..0b5c16448 100644 --- a/sources/autoNum/ui/folioautonumbering.cpp +++ b/sources/autoNum/ui/folioautonumbering.cpp @@ -23,8 +23,8 @@ #include "qetproject.h" #include "diagram.h" /** - * Constructor - */ + Constructor +*/ FolioAutonumberingW::FolioAutonumberingW(QETProject *project, QWidget *parent) : QWidget(parent), project_(project), @@ -39,56 +39,56 @@ FolioAutonumberingW::FolioAutonumberingW(QETProject *project, QWidget *parent) : } /** - * Destructor - */ + Destructor +*/ FolioAutonumberingW::~FolioAutonumberingW() { delete ui; } /** - * @brief FolioAutonumberingW::setContext - * construct autonums in the comboBox selected in the @autonum_chooser QcomboBox - */ + @brief FolioAutonumberingW::setContext + construct autonums in the comboBox selected in the @autonum_chooser QcomboBox +*/ void FolioAutonumberingW::setContext(QList autonums) { foreach (QString str, autonums) { ui->m_autonums_cb->addItem(str);} } /** - * @brief FolioAutonumberingW::autoNumSelected - * returns the current autonum selected - */ + @brief FolioAutonumberingW::autoNumSelected + returns the current autonum selected +*/ QString FolioAutonumberingW::autoNumSelected(){ return ui->m_autonums_cb->currentText(); } /** - * @brief FolioAutonumberingW::fromFolio - * returns the current "From Folio" index - */ + @brief FolioAutonumberingW::fromFolio + returns the current "From Folio" index +*/ int FolioAutonumberingW::fromFolio(){ return ui->m_from_cb->currentIndex()-1; } /** - * @brief FolioAutonumberingW::toFolio - * returns the current "To Folio" index - */ + @brief FolioAutonumberingW::toFolio + returns the current "To Folio" index +*/ int FolioAutonumberingW::toFolio(){ return ui->m_to_cb->currentIndex()+this->fromFolio()+1; } /** - * @brief FolioAutonumberingW::newFoliosNumber - * returns the number of folios to create - */ + @brief FolioAutonumberingW::newFoliosNumber + returns the number of folios to create +*/ int FolioAutonumberingW::newFoliosNumber(){ return ui->m_new_tabs_sb->value(); } /** - * @brief FolioAutonumberingW::updateFolioList - * update Folio List in From and To ComboBox - */ + @brief FolioAutonumberingW::updateFolioList + update Folio List in From and To ComboBox +*/ void FolioAutonumberingW::updateFolioList(){ ui -> m_from_cb->clear(); ui -> m_to_cb->clear(); @@ -100,9 +100,9 @@ void FolioAutonumberingW::updateFolioList(){ } /** - * @brief FolioAutonumberingW::on_m_create_new_tabs_rb_clicked + @brief FolioAutonumberingW::on_m_create_new_tabs_rb_clicked * Enable New Tabs SpinBox - */ +*/ void FolioAutonumberingW::on_m_create_new_tabs_rb_clicked() { ui->m_from_cb->setEnabled(false); ui->m_to_cb->setEnabled(false); @@ -112,9 +112,9 @@ void FolioAutonumberingW::on_m_create_new_tabs_rb_clicked() { } /** - * @brief FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked + @brief FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked * Enable From ComboBox, fill From ComboBox - */ +*/ void FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked() { ui->m_new_tabs_sb->setEnabled(false); ui->m_from_cb->setEnabled(true); @@ -131,18 +131,18 @@ void FolioAutonumberingW::on_m_autonumber_tabs_rb_clicked() { } /** - * @brief FolioAutonumberingW::on_m_new_tabs_sb_valueChanged + @brief FolioAutonumberingW::on_m_new_tabs_sb_valueChanged * Enable Apply if any new folio is to be created - */ +*/ void FolioAutonumberingW::on_m_new_tabs_sb_valueChanged(int){ if (ui->m_new_tabs_sb->value()>0) applyEnable(true); else applyEnable(false); } /** - * @brief FolioAutonumberingW::on_m_from_cb_currentIndexChanged + @brief FolioAutonumberingW::on_m_from_cb_currentIndexChanged * Enable To ComboBox - */ +*/ void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(int){ int index = ui->m_from_cb->currentIndex(); ui->m_to_cb->clear(); @@ -159,9 +159,9 @@ void FolioAutonumberingW::on_m_from_cb_currentIndexChanged(int){ } /** - * @brief SelectAutonumW::on_buttonBox_clicked - * Action on @buttonBox clicked - */ + @brief SelectAutonumW::on_buttonBox_clicked + Action on @buttonBox clicked +*/ void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) { //transform button to int int answer = ui -> buttonBox -> buttonRole(button); @@ -194,9 +194,9 @@ void FolioAutonumberingW::on_buttonBox_clicked(QAbstractButton *button) { } /** - * @brief SelectAutonumW::applyEnable - * enable/disable the apply button - */ + @brief SelectAutonumW::applyEnable + enable/disable the apply button +*/ void FolioAutonumberingW::applyEnable(bool b) { if (b){ bool valid = true; diff --git a/sources/autoNum/ui/formulaautonumberingw.cpp b/sources/autoNum/ui/formulaautonumberingw.cpp index af9264214..5a2ee35b9 100644 --- a/sources/autoNum/ui/formulaautonumberingw.cpp +++ b/sources/autoNum/ui/formulaautonumberingw.cpp @@ -23,8 +23,8 @@ #include /** - * Constructor - */ + Constructor +*/ FormulaAutonumberingW::FormulaAutonumberingW(QWidget *parent) : QWidget(parent), ui(new Ui::FormulaAutonumberingW) @@ -35,41 +35,41 @@ FormulaAutonumberingW::FormulaAutonumberingW(QWidget *parent) : } /** - * Destructor - */ + Destructor +*/ FormulaAutonumberingW::~FormulaAutonumberingW() { delete ui; } /** - * @brief FormulaAutonumberingW::setContext - * @param formula to be inserted into context - */ + @brief FormulaAutonumberingW::setContext + @param formula to be inserted into context +*/ void FormulaAutonumberingW::setContext(const QString& formula) { ui->m_formula_le->insert(formula); } /** - * @brief FormulaAutonumberingW::clearContext - * @param clear formula line edit text - */ + @brief FormulaAutonumberingW::clearContext + @param clear formula line edit text +*/ void FormulaAutonumberingW::clearContext() { ui->m_formula_le->clear(); } /** - * @brief FormulaAutonumberingW::formula - * @return formula to be stored into project - */ + @brief FormulaAutonumberingW::formula + @return formula to be stored into project +*/ QString FormulaAutonumberingW::formula() { return ui->m_formula_le->text(); } /** - * @brief FormulaAutonumberingW::on_m_formula_le_textChanged - * Update Apply Button - */ + @brief FormulaAutonumberingW::on_m_formula_le_textChanged + Update Apply Button +*/ void FormulaAutonumberingW::on_m_formula_le_textChanged(QString text) { emit (textChanged(std::move(text))); } diff --git a/sources/autoNum/ui/numparteditorw.cpp b/sources/autoNum/ui/numparteditorw.cpp index f632196bc..bc9aa8f24 100644 --- a/sources/autoNum/ui/numparteditorw.cpp +++ b/sources/autoNum/ui/numparteditorw.cpp @@ -20,8 +20,8 @@ #include "ui_numparteditorw.h" /** - * Constructor - */ + Constructor +*/ NumPartEditorW::NumPartEditorW(int type, QWidget *parent) : QWidget(parent), ui(new Ui::NumPartEditorW), @@ -34,9 +34,9 @@ NumPartEditorW::NumPartEditorW(int type, QWidget *parent) : } /** - * Constructor - * Build with value of @context at position i - */ + Constructor + Build with value of @context at position i +*/ NumPartEditorW::NumPartEditorW (NumerotationContext &context, int i, int type, QWidget *parent): QWidget(parent), ui(new Ui::NumPartEditorW), @@ -69,8 +69,8 @@ NumPartEditorW::NumPartEditorW (NumerotationContext &context, int i, int type, Q } /** - * Destructor - */ + Destructor +*/ NumPartEditorW::~NumPartEditorW() { delete intValidator; @@ -102,9 +102,9 @@ void NumPartEditorW::setVisibleItems() } /** - * @brief NumPartEditorW::toNumContext - * @return the display to NumerotationContext - */ + @brief NumPartEditorW::toNumContext + @return the display to NumerotationContext +*/ NumerotationContext NumPartEditorW::toNumContext() { NumerotationContext nc; QString type_str; @@ -160,9 +160,9 @@ NumerotationContext NumPartEditorW::toNumContext() { } /** - * @brief NumPartEditorW::isValid - * @return true if value field isn't empty or if type is folio - */ + @brief NumPartEditorW::isValid + @return true if value field isn't empty or if type is folio +*/ bool NumPartEditorW::isValid() { if (type_ == folio || type_ == idfolio || type_ == elementline || type_ == plant || type_ == locmach || type_ == elementcolumn || type_ == elementprefix) {return true;} @@ -171,9 +171,9 @@ bool NumPartEditorW::isValid() { } /** - * @brief NumPartEditorW::on_type_cb_activated - * Action when user change the type comboBox - */ + @brief NumPartEditorW::on_type_cb_activated + Action when user change the type comboBox +*/ void NumPartEditorW::on_type_cb_activated(int) { if (ui->type_cb->currentText() == tr("Chiffre 1")) setType(unit); @@ -207,27 +207,27 @@ void NumPartEditorW::on_type_cb_activated(int) { } /** - * @brief NumPartEditorW::on_value_field_textChanged - * emit changed when @value_field text changed - */ + @brief NumPartEditorW::on_value_field_textChanged + emit changed when @value_field text changed +*/ void NumPartEditorW::on_value_field_textEdited() { emit changed(); } /** - * @brief NumPartEditorW::on_increase_spinBox_valueChanged - * emit changed when @increase_spinBox value changed - */ + @brief NumPartEditorW::on_increase_spinBox_valueChanged + emit changed when @increase_spinBox value changed +*/ void NumPartEditorW::on_increase_spinBox_valueChanged(int) { if (!ui -> value_field -> text().isEmpty()) emit changed(); } /** - * @brief NumPartEditorW::setType - * Set good behavior by type @t - * @param t, type used - * @param fnum, force the behavior of numeric type - */ + @brief NumPartEditorW::setType + Set good behavior by type @t + @param t, type used + @param fnum, force the behavior of numeric type +*/ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) { setCurrentIndex(t); @@ -285,10 +285,10 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) { } /** - * @brief NumPartEditorW::setCurrentIndex - * Set Current Index of type_cb - * @param t, type used - */ + @brief NumPartEditorW::setCurrentIndex + Set Current Index of type_cb + @param t, type used +*/ void NumPartEditorW::setCurrentIndex(NumPartEditorW::type t) { int i=-1; if (t == unit) diff --git a/sources/autoNum/ui/numparteditorw.h b/sources/autoNum/ui/numparteditorw.h index c3fcdbb37..a191e25cd 100644 --- a/sources/autoNum/ui/numparteditorw.h +++ b/sources/autoNum/ui/numparteditorw.h @@ -26,7 +26,7 @@ *This class represent a single part num widget. By this widget, we can define and edit *how the num auto must work . *This widget is called by selectautonumw. - */ +*/ namespace Ui { class NumPartEditorW; } diff --git a/sources/autoNum/ui/selectautonumw.cpp b/sources/autoNum/ui/selectautonumw.cpp index 54d099436..5f42abb50 100644 --- a/sources/autoNum/ui/selectautonumw.cpp +++ b/sources/autoNum/ui/selectautonumw.cpp @@ -25,8 +25,8 @@ #include "assignvariables.h" /** - * Constructor - */ + Constructor +*/ SelectAutonumW::SelectAutonumW(int type, QWidget *parent) : QWidget(parent), ui(new Ui::SelectAutonumW), @@ -72,17 +72,17 @@ SelectAutonumW::SelectAutonumW(const NumerotationContext &context, int type, QWi } /** - * Destructor - */ + Destructor +*/ SelectAutonumW::~SelectAutonumW() { delete ui; } /** - * @brief SelectAutonumW::setCurrentContext - * build the context of current diagram selected in the @diagram_chooser QcomboBox - */ + @brief SelectAutonumW::setCurrentContext + build the context of current diagram selected in the @diagram_chooser QcomboBox +*/ void SelectAutonumW::setContext(const NumerotationContext &context) { m_context = context; @@ -109,9 +109,9 @@ void SelectAutonumW::setContext(const NumerotationContext &context) { } /** - * @brief SelectAutonumW::toNumContext - * @return the content to @num_part_list to NumerotationContext - */ + @brief SelectAutonumW::toNumContext + @return the content to @num_part_list to NumerotationContext +*/ NumerotationContext SelectAutonumW::toNumContext() const { NumerotationContext nc; foreach (NumPartEditorW *npew, num_part_list_) nc << npew -> toNumContext(); @@ -119,9 +119,9 @@ NumerotationContext SelectAutonumW::toNumContext() const { } /** - * @brief SelectAutonumW::on_add_button_clicked + @brief SelectAutonumW::on_add_button_clicked * Action on add_button, add a @NumPartEditor - */ +*/ void SelectAutonumW::on_add_button_clicked() { applyEnable(false); @@ -133,9 +133,9 @@ void SelectAutonumW::on_add_button_clicked() } /** - * @brief SelectAutonumW::on_remove_button_clicked + @brief SelectAutonumW::on_remove_button_clicked * Action on remove button, remove the last @NumPartEditor - */ +*/ void SelectAutonumW::on_remove_button_clicked() { //remove if @num_part_list contains more than one item if (num_part_list_.size() > 1) { @@ -150,9 +150,9 @@ void SelectAutonumW::on_remove_button_clicked() { } /** - * @brief SelectAutonumW::formula - * @return autonumbering widget formula - */ + @brief SelectAutonumW::formula + @return autonumbering widget formula +*/ QString SelectAutonumW::formula() { if (m_edited_type == 0) @@ -169,9 +169,9 @@ QComboBox *SelectAutonumW::contextComboBox() const } /** - * @brief SelectAutonumW::on_buttonBox_clicked - * Action on @buttonBox clicked - */ + @brief SelectAutonumW::on_buttonBox_clicked + Action on @buttonBox clicked +*/ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button) { //transform button to int int answer = ui -> buttonBox -> buttonRole(button); @@ -233,9 +233,9 @@ void SelectAutonumW::on_buttonBox_clicked(QAbstractButton *button) { } /** - * @brief SelectAutonumW::applyEnable - * enable/disable the apply button - */ + @brief SelectAutonumW::applyEnable + enable/disable the apply button +*/ void SelectAutonumW::applyEnable(bool b) { if (b){ bool valid= true; @@ -252,9 +252,9 @@ void SelectAutonumW::applyEnable(bool b) { } /** - * @brief SelectAutonumW::contextToFormula - * Apply formula to ElementAutonumbering Widget - */ + @brief SelectAutonumW::contextToFormula + Apply formula to ElementAutonumbering Widget +*/ void SelectAutonumW::contextToFormula() { FormulaAutonumberingW* m_faw = nullptr; @@ -271,9 +271,9 @@ void SelectAutonumW::contextToFormula() } /** - * @brief SelectAutonumW::on_m_next_pb_clicked - * Increase NumerotationContext - */ + @brief SelectAutonumW::on_m_next_pb_clicked + Increase NumerotationContext +*/ void SelectAutonumW::on_m_next_pb_clicked() { NumerotationContextCommands ncc (toNumContext()); @@ -282,9 +282,9 @@ void SelectAutonumW::on_m_next_pb_clicked() } /** - * @brief SelectAutonumW::on_m_previous_pb_clicked - * Decrease NumerotationContext - */ + @brief SelectAutonumW::on_m_previous_pb_clicked + Decrease NumerotationContext +*/ void SelectAutonumW::on_m_previous_pb_clicked() { NumerotationContextCommands ncc (toNumContext()); diff --git a/sources/bordertitleblock.cpp b/sources/bordertitleblock.cpp index a416140bd..1a9f9b207 100644 --- a/sources/bordertitleblock.cpp +++ b/sources/bordertitleblock.cpp @@ -605,13 +605,13 @@ void BorderTitleBlock::draw(QPainter *painter) } /** - * @brief BorderTitleBlock::drawDxf - * @param width - * @param height - * @param keep_aspect_ratio - * @param file_path - * @param color - */ + @brief BorderTitleBlock::drawDxf + @param width + @param height + @param keep_aspect_ratio + @param file_path + @param color +*/ void BorderTitleBlock::drawDxf( int width, int height, diff --git a/sources/conductornumexport.cpp b/sources/conductornumexport.cpp index b694a9cc3..86c65f5b7 100644 --- a/sources/conductornumexport.cpp +++ b/sources/conductornumexport.cpp @@ -26,10 +26,10 @@ #include /** - * @brief ConductorNumExport::ConductorNumExport - * @param project : the project to export the conductors num - * @param parent : parent widget - */ + @brief ConductorNumExport::ConductorNumExport + @param project : the project to export the conductors num + @param parent : parent widget +*/ ConductorNumExport::ConductorNumExport(QETProject *project, QWidget *parent) : m_project(project), m_parent_widget(parent) @@ -38,10 +38,10 @@ ConductorNumExport::ConductorNumExport(QETProject *project, QWidget *parent) : } /** - * @brief ConductorNumExport::toCsv - * Export the num of conductors into a csv file. - * @return true if suceesfully exported. - */ + @brief ConductorNumExport::toCsv + Export the num of conductors into a csv file. + @return true if suceesfully exported. +*/ bool ConductorNumExport::toCsv() { QString name = QObject::tr("numero_de_fileries_") + m_project->title() + ".csv"; @@ -86,9 +86,9 @@ bool ConductorNumExport::toCsv() } /** - * @brief ConductorNumExport::wiresNum - * @return the wire num formated in csv - */ + @brief ConductorNumExport::wiresNum + @return the wire num formated in csv +*/ QString ConductorNumExport::wiresNum() const { QString csv; @@ -106,9 +106,9 @@ QString ConductorNumExport::wiresNum() const } /** - * @brief ConductorNumExport::fillHash - * @value m_hash - */ + @brief ConductorNumExport::fillHash + @value m_hash +*/ void ConductorNumExport::fillHash() { //We used this rx to avoid insert num composed only withe white space. diff --git a/sources/conductornumexport.h b/sources/conductornumexport.h index 0368482ee..973da3f7b 100644 --- a/sources/conductornumexport.h +++ b/sources/conductornumexport.h @@ -24,9 +24,9 @@ class QETProject; class QWidget; /** - * @brief The ConductorNumExport class - * A class to export the num of conductors into a csv file. - */ + @brief The ConductorNumExport class + A class to export the num of conductors into a csv file. +*/ class ConductorNumExport { public: diff --git a/sources/conductorproperties.cpp b/sources/conductorproperties.cpp index 40bcf4499..2ae95ea70 100644 --- a/sources/conductorproperties.cpp +++ b/sources/conductorproperties.cpp @@ -241,10 +241,10 @@ ConductorProperties::~ConductorProperties() { /** - * @brief ConductorProperties::toXml - * Export conductor propertie, in the XML element 'e' - * @param e the xml element - */ + @brief ConductorProperties::toXml + Export conductor propertie, in the XML element 'e' + @param e the xml element +*/ void ConductorProperties::toXml(QDomElement &e) const { e.setAttribute("type", typeToString(type)); @@ -284,10 +284,10 @@ void ConductorProperties::toXml(QDomElement &e) const /** - * @brief ConductorProperties::fromXml - * Import conductor propertie, from the attribute of the xml element 'e' - * @param e the xml document - */ + @brief ConductorProperties::fromXml + Import conductor propertie, from the attribute of the xml element 'e' + @param e the xml document +*/ void ConductorProperties::fromXml(QDomElement &e) { // get conductor color @@ -440,11 +440,11 @@ QString ConductorProperties::typeToString(ConductorType t) } /** - * @brief ConductorProperties::applyForEqualAttributes - * Test each attribute of properties in the list separatly. - * For each attributes, if is equal, the attribute is apply to this. - * @param list - */ + @brief ConductorProperties::applyForEqualAttributes + Test each attribute of properties in the list separatly. + For each attributes, if is equal, the attribute is apply to this. + @param list +*/ void ConductorProperties::applyForEqualAttributes(QList list) { const QList clist = std::move(list); @@ -698,9 +698,9 @@ void ConductorProperties::applyForEqualAttributes(QList lis } /** - * @brief ConductorProperties::defaultProperties - * @return the default properties stored in the setting file - */ + @brief ConductorProperties::defaultProperties + @return the default properties stored in the setting file +*/ ConductorProperties ConductorProperties::defaultProperties() { QSettings settings; @@ -712,10 +712,10 @@ ConductorProperties ConductorProperties::defaultProperties() } /** - * @brief ConductorProperties::operator == - * @param other - * @return true if other == this - */ + @brief ConductorProperties::operator == + @param other + @return true if other == this +*/ bool ConductorProperties::operator==(const ConductorProperties &other) const { return( diff --git a/sources/configdialog.cpp b/sources/configdialog.cpp index 1d5889ccf..3981734b7 100644 --- a/sources/configdialog.cpp +++ b/sources/configdialog.cpp @@ -137,10 +137,10 @@ void ConfigDialog::addPage(ConfigPage *page) { } /** - * @brief ConfigDialog::setCurrentPage - * Set the current index to @index - * @param index - */ + @brief ConfigDialog::setCurrentPage + Set the current index to @index + @param index +*/ void ConfigDialog::setCurrentPage(const int index) { pages_list->setCurrentRow(index); } diff --git a/sources/configpages.cpp b/sources/configpages.cpp index 80626c650..b0b228965 100644 --- a/sources/configpages.cpp +++ b/sources/configpages.cpp @@ -33,12 +33,12 @@ #include /** - * @brief NewDiagramPage::NewDiagramPage - * Default constructor - * @param project, If project, edit the propertie of Project - * else edit the properties by default of QElectroTech - * @param parent, parent widget - */ + @brief NewDiagramPage::NewDiagramPage + Default constructor + @param project, If project, edit the propertie of Project + else edit the properties by default of QElectroTech + @param parent, parent widget +*/ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent, ProjectPropertiesDialog *ppd) : ConfigPage (parent), ppd_ (ppd), @@ -93,18 +93,18 @@ NewDiagramPage::NewDiagramPage(QETProject *project, QWidget *parent, ProjectProp } /** - * @brief NewDiagramPage::~NewDiagramPage - */ + @brief NewDiagramPage::~NewDiagramPage +*/ NewDiagramPage::~NewDiagramPage() { disconnect(ipw,SIGNAL(openAutoNumFolioEditor(QString)),this,SLOT(changeToAutoFolioTab())); } /** - * @brief NewDiagramPage::applyConf - * Apply conf for this page. - * If there is a project, save in the project, - * else save to the default conf of QElectroTech - */ + @brief NewDiagramPage::applyConf + Apply conf for this page. + If there is a project, save in the project, + else save to the default conf of QElectroTech +*/ void NewDiagramPage::applyConf() { if (m_project) { //If project we save to the project if (m_project -> isReadOnly()) return; @@ -171,27 +171,27 @@ void NewDiagramPage::applyConf() { } /** - * @brief NewDiagramPage::icon - * @return icon of this page - */ + @brief NewDiagramPage::icon + @return icon of this page +*/ QIcon NewDiagramPage::icon() const { if (m_project) return(QET::Icons::NewDiagram); return(QET::Icons::Projects); } /** - * @brief NewDiagramPage::title - * @return title of this page - */ + @brief NewDiagramPage::title + @return title of this page +*/ QString NewDiagramPage::title() const { if (m_project) return(tr("Nouveau folio", "configuration page title")); return(tr("Nouveau projet", "configuration page title")); } /** - * @brief NewDiagramPage::changeToAutoFolioTab - * Set the current tab to Autonum - */ + @brief NewDiagramPage::changeToAutoFolioTab + Set the current tab to Autonum +*/ void NewDiagramPage::changeToAutoFolioTab(){ if (m_project){ ppd_->setCurrentPage(ProjectPropertiesDialog::Autonum); @@ -201,9 +201,9 @@ void NewDiagramPage::changeToAutoFolioTab(){ } /** - * @brief NewDiagramPage::setFolioAutonum - * Set temporary TBP to use in auto folio num - */ + @brief NewDiagramPage::setFolioAutonum + Set temporary TBP to use in auto folio num +*/ void NewDiagramPage::setFolioAutonum(QString autoNum){ TitleBlockProperties tbptemp = ipw->propertiesAutoNum(std::move(autoNum)); ipw->setProperties(tbptemp); @@ -211,17 +211,17 @@ void NewDiagramPage::setFolioAutonum(QString autoNum){ } /** - * @brief NewDiagramPage::saveCurrentTbp - * Save current TBP to retrieve after auto folio num - */ + @brief NewDiagramPage::saveCurrentTbp + Save current TBP to retrieve after auto folio num +*/ void NewDiagramPage::saveCurrentTbp(){ savedTbp = ipw->properties(); } /** - * @brief NewDiagramPage::loadSavedTbp - * Retrieve saved auto folio num - */ + @brief NewDiagramPage::loadSavedTbp + Retrieve saved auto folio num +*/ void NewDiagramPage::loadSavedTbp(){ ipw->setProperties(savedTbp); applyConf(); @@ -304,9 +304,9 @@ PrintConfigPage::~PrintConfigPage() { } /** - * @brief PrintConfigPage::applyConf - * Apply the config of this page - */ + @brief PrintConfigPage::applyConf + Apply the config of this page +*/ void PrintConfigPage::applyConf() { QString prefix = "print/default"; diff --git a/sources/createdxf.cpp b/sources/createdxf.cpp index 5e04ed579..861cf77c1 100644 --- a/sources/createdxf.cpp +++ b/sources/createdxf.cpp @@ -378,14 +378,14 @@ long Createdxf::RGBcodeTable[255]{ }; /** - * @brief Createdxf::getcolorCode - * This function returns the ACI color which is the "nearest" color to - * the color defined by the red, green and blue (RGB) values passed - * in argument. - * @param red - * @param green - * @param blue - */ + @brief Createdxf::getcolorCode + This function returns the ACI color which is the "nearest" color to + the color defined by the red, green and blue (RGB) values passed + in argument. + @param red + @param green + @param blue +*/ int Createdxf::getcolorCode (const long red, const long green, const long blue) { long acirgb, r,g,b; @@ -409,12 +409,12 @@ int Createdxf::getcolorCode (const long red, const long green, const long blue) } /** - * @brief Createdxf::drawLine - * Conveniance function to draw line - * @param filepath - * @param line - * @param colorcode - */ + @brief Createdxf::drawLine + Conveniance function to draw line + @param filepath + @param line + @param colorcode +*/ void Createdxf::drawLine(const QString &filepath, const QLineF &line, const int &colorcode) { drawLine(filepath, line.p1().x() * xScale, sheetHeight - (line.p1().y() * yScale), @@ -547,12 +547,12 @@ void Createdxf::drawArcEllipse(const QString &file_path, qreal x, qreal y, qreal } /** - * @brief Createdxf::drawEllipse - * Conveniance function for draw ellipse - * @param filepath - * @param rect - * @param colorcode - */ + @brief Createdxf::drawEllipse + Conveniance function for draw ellipse + @param filepath + @param rect + @param colorcode +*/ void Createdxf::drawEllipse(const QString &filepath, const QRectF &rect, const int &colorcode) { drawArcEllipse(filepath, rect.topLeft().x() * xScale, sheetHeight - (rect.topLeft().y() * yScale), @@ -653,12 +653,12 @@ void Createdxf::drawRectangle (const QString &fileName, double x1, double y1, do } /** - * @brief Createdxf::drawRectangle - * Conveniance function for draw rectangle - * @param filepath - * @param rect - * @param color - */ + @brief Createdxf::drawRectangle + Conveniance function for draw rectangle + @param filepath + @param rect + @param color +*/ void Createdxf::drawRectangle(const QString &filepath, const QRectF &rect, const int &colorcode) { drawRectangle(filepath, rect.bottomLeft().x() * xScale, sheetHeight - (rect.bottomLeft().y() * yScale), diff --git a/sources/dataBase/projectdatabase.cpp b/sources/dataBase/projectdatabase.cpp index 93e3cea9c..9313a6e43 100644 --- a/sources/dataBase/projectdatabase.cpp +++ b/sources/dataBase/projectdatabase.cpp @@ -26,11 +26,11 @@ #include /** - * @brief projectDataBase::projectDataBase - * Default constructor - * @param project : project from the database work - * @param parent : parent QObject - */ + @brief projectDataBase::projectDataBase + Default constructor + @param project : project from the database work + @param parent : parent QObject +*/ projectDataBase::projectDataBase(QETProject *project, QObject *parent) : QObject(parent), m_project(project) @@ -46,18 +46,18 @@ projectDataBase::projectDataBase(QETProject *project, const QString &connection_ } /** - * @brief projectDataBase::~projectDataBase - * Destructor - */ + @brief projectDataBase::~projectDataBase + Destructor +*/ projectDataBase::~projectDataBase() { m_data_base.close(); } /** - * @brief projectDataBase::updateDB - * Up to date the content of the data base. - * Emit the signal dataBaseUpdated - */ + @brief projectDataBase::updateDB + Up to date the content of the data base. + Emit the signal dataBaseUpdated +*/ void projectDataBase::updateDB() { populateDiagramTable(); @@ -68,25 +68,25 @@ void projectDataBase::updateDB() } /** - * @brief projectDataBase::project - * @return the project of this database - */ + @brief projectDataBase::project + @return the project of this database +*/ QETProject *projectDataBase::project() const { return m_project; } /** - * @brief projectDataBase::newQuery - * @return a QSqlquery with @query as query and the internal database of this class as database to use. - */ + @brief projectDataBase::newQuery + @return a QSqlquery with @query as query and the internal database of this class as database to use. +*/ QSqlQuery projectDataBase::newQuery(const QString &query) { return QSqlQuery(query, m_data_base); } /** - * @brief projectDataBase::addElement - * @param element - */ + @brief projectDataBase::addElement + @param element +*/ void projectDataBase::addElement(Element *element) { m_insert_elements_query.bindValue(":uuid", element->uuid().toString()); @@ -115,9 +115,9 @@ void projectDataBase::addElement(Element *element) } /** - * @brief projectDataBase::removeElement - * @param element - */ + @brief projectDataBase::removeElement + @param element +*/ void projectDataBase::removeElement(Element *element) { m_remove_element_query.bindValue(":uuid", element->uuid().toString()); @@ -129,9 +129,9 @@ void projectDataBase::removeElement(Element *element) } /** - * @brief projectDataBase::elementInfoChanged - * @param element - */ + @brief projectDataBase::elementInfoChanged + @param element +*/ void projectDataBase::elementInfoChanged(Element *element) { auto hash = elementInfoToString(element); @@ -186,10 +186,10 @@ void projectDataBase::removeDiagram(Diagram *diagram) } /** - * @brief projectDataBase::createDataBase - * Create the data base - * @return : true if the data base was successfully created. - */ + @brief projectDataBase::createDataBase + Create the data base + @return : true if the data base was successfully created. +*/ bool projectDataBase::createDataBase(const QString &connection_name, const QString &name) { @@ -285,8 +285,8 @@ bool projectDataBase::createDataBase(const QString &connection_name, const QStri } /** - * @brief projectDataBase::createElementNomenclatureView - */ + @brief projectDataBase::createElementNomenclatureView +*/ void projectDataBase::createElementNomenclatureView() { QString create_view ("CREATE VIEW element_nomenclature_view AS SELECT " @@ -322,8 +322,8 @@ void projectDataBase::createElementNomenclatureView() } /** - * @brief projectDataBase::createSummaryView - */ + @brief projectDataBase::createSummaryView +*/ void projectDataBase::createSummaryView() { QString create_view ("CREATE VIEW project_summary_view AS SELECT " @@ -360,9 +360,9 @@ void projectDataBase::populateDiagramTable() } /** - * @brief projectDataBase::populateElementTable - * Populate the element table - */ + @brief projectDataBase::populateElementTable + Populate the element table +*/ void projectDataBase::populateElementTable() { QSqlQuery query_(m_data_base); @@ -388,9 +388,9 @@ void projectDataBase::populateElementTable() } /** - * @brief projectDataBase::populateElementsTable - * Populate the elements table - */ + @brief projectDataBase::populateElementsTable + Populate the elements table +*/ void projectDataBase::populateElementInfoTable() { QSqlQuery query(m_data_base); @@ -506,10 +506,10 @@ void projectDataBase::prepareQuery() } /** - * @brief projectDataBase::elementInfoToString - * @param elmt - * @return the element information in hash as key for the info name and value as the information value. - */ + @brief projectDataBase::elementInfoToString + @param elmt + @return the element information in hash as key for the info name and value as the information value. +*/ QHash projectDataBase::elementInfoToString(Element *elmt) { QHash hash; //Store the value for each columns @@ -527,14 +527,14 @@ QHash projectDataBase::elementInfoToString(Element *elmt) } /** - * @brief projectDataBase::exportDb - * @param parent - * @param caption - * @param dir - * @param filter - * @param selectedFilter - * @param options - */ + @brief projectDataBase::exportDb + @param parent + @param caption + @param dir + @param filter + @param selectedFilter + @param options +*/ void projectDataBase::exportDb(projectDataBase *db, QWidget *parent, const QString &caption, const QString &dir) { auto caption_ = caption; diff --git a/sources/dataBase/projectdatabase.h b/sources/dataBase/projectdatabase.h index bcfca5659..d98d44eff 100644 --- a/sources/dataBase/projectdatabase.h +++ b/sources/dataBase/projectdatabase.h @@ -29,12 +29,12 @@ class QETProject; class Diagram; /** - * @brief The projectDataBase class - * This class wrap a sqlite data base where you can find several thing about - * the content of a project. + @brief The projectDataBase class + This class wrap a sqlite data base where you can find several thing about + the content of a project. * - * NOTE this class is still in developement. - */ + @note this class is still in developement. +*/ class projectDataBase : public QObject { Q_OBJECT diff --git a/sources/dataBase/ui/elementquerywidget.cpp b/sources/dataBase/ui/elementquerywidget.cpp index 9df711c3f..d23bf8695 100644 --- a/sources/dataBase/ui/elementquerywidget.cpp +++ b/sources/dataBase/ui/elementquerywidget.cpp @@ -22,9 +22,9 @@ #include /** - * @brief ElementQueryWidget::ElementQueryWidget - * @param parent - */ + @brief ElementQueryWidget::ElementQueryWidget + @param parent +*/ ElementQueryWidget::ElementQueryWidget(QWidget *parent) : QWidget(parent), ui(new Ui::ElementQueryWidget) @@ -96,18 +96,18 @@ ElementQueryWidget::ElementQueryWidget(QWidget *parent) : } /** - * @brief ElementQueryWidget::~ElementQueryWidget - */ + @brief ElementQueryWidget::~ElementQueryWidget +*/ ElementQueryWidget::~ElementQueryWidget() { delete ui; } /** - * @brief ElementQueryWidget::setQuery - * @param query - * Set the current query to @query. - * If it's possible, rebuild the state of the widget from the query - */ + @brief ElementQueryWidget::setQuery + @param query + Set the current query to @query. + If it's possible, rebuild the state of the widget from the query +*/ void ElementQueryWidget::setQuery(const QString &query) { if (query.startsWith("SELECT")) @@ -271,9 +271,9 @@ void ElementQueryWidget::setQuery(const QString &query) } /** - * @brief ElementQueryWidget::queryStr - * @return The current query - */ + @brief ElementQueryWidget::queryStr + @return The current query +*/ QString ElementQueryWidget::queryStr() const { //User define is own query @@ -370,16 +370,16 @@ QString ElementQueryWidget::queryStr() const } /** - * @brief ElementQueryWidget::updateQueryLine - */ + @brief ElementQueryWidget::updateQueryLine +*/ void ElementQueryWidget::updateQueryLine() { ui->m_sql_query->setText(queryStr()); } /** - * @brief ElementQueryWidget::selectedKeys - * @return the current keys of selected infos to be exported - */ + @brief ElementQueryWidget::selectedKeys + @return the current keys of selected infos to be exported +*/ QStringList ElementQueryWidget::selectedKeys() const { //Made a string list with the colomns (keys) choosen by the user @@ -395,8 +395,8 @@ QStringList ElementQueryWidget::selectedKeys() const } /** - * @brief ElementQueryWidget::setUpItems - */ + @brief ElementQueryWidget::setUpItems +*/ void ElementQueryWidget::setUpItems() { for(QString key : QETApp::elementInfoKeys()) @@ -419,18 +419,18 @@ void ElementQueryWidget::setUpItems() } /** - * @brief ElementQueryWidget::FilterFor - * @param key - * @return the filter associated to key - */ + @brief ElementQueryWidget::FilterFor + @param key + @return the filter associated to key +*/ QPair ElementQueryWidget::FilterFor(const QString &key) const { return m_filter.value(key, qMakePair(0, QString())); } /** - * @brief ElementQueryWidget::fillSavedQuery - * Fill the combobox of saved queries - */ + @brief ElementQueryWidget::fillSavedQuery + Fill the combobox of saved queries +*/ void ElementQueryWidget::fillSavedQuery() { QFile file(QETApp::configDir() + "/nomenclature.json"); @@ -446,8 +446,8 @@ void ElementQueryWidget::fillSavedQuery() } /** - * @brief ElementQueryWidget::on_m_up_pb_clicked - */ + @brief ElementQueryWidget::on_m_up_pb_clicked +*/ void ElementQueryWidget::on_m_up_pb_clicked() { auto row = ui->m_choosen_list->currentRow(); @@ -463,8 +463,8 @@ void ElementQueryWidget::on_m_up_pb_clicked() } /** - * @brief ElementQueryWidget::on_m_add_pb_clicked - */ + @brief ElementQueryWidget::on_m_add_pb_clicked +*/ void ElementQueryWidget::on_m_add_pb_clicked() { if (auto *item = ui->m_var_list->takeItem(ui->m_var_list->currentRow())) { @@ -475,8 +475,8 @@ void ElementQueryWidget::on_m_add_pb_clicked() } /** - * @brief ElementQueryWidget::on_m_remove_pb_clicked - */ + @brief ElementQueryWidget::on_m_remove_pb_clicked +*/ void ElementQueryWidget::on_m_remove_pb_clicked() { if (auto *item = ui->m_choosen_list->takeItem(ui->m_choosen_list->currentRow())) { @@ -487,8 +487,8 @@ void ElementQueryWidget::on_m_remove_pb_clicked() } /** - * @brief ElementQueryWidget::on_m_down_pb_clicked - */ + @brief ElementQueryWidget::on_m_down_pb_clicked +*/ void ElementQueryWidget::on_m_down_pb_clicked() { auto row = ui->m_choosen_list->currentRow(); @@ -504,8 +504,8 @@ void ElementQueryWidget::on_m_down_pb_clicked() } /** - * @brief ElementQueryWidget::on_m_edit_sql_query_cb_clicked - */ + @brief ElementQueryWidget::on_m_edit_sql_query_cb_clicked +*/ void ElementQueryWidget::on_m_edit_sql_query_cb_clicked() { ui->m_sql_query->setEnabled(ui->m_edit_sql_query_cb->isChecked()); @@ -524,9 +524,9 @@ void ElementQueryWidget::on_m_edit_sql_query_cb_clicked() } /** - * @brief ElementQueryWidget::on_m_filter_le_textEdited - * @param arg1 - */ + @brief ElementQueryWidget::on_m_filter_le_textEdited + @param arg1 +*/ void ElementQueryWidget::on_m_filter_le_textEdited(const QString &arg1) { if (auto item = ui->m_choosen_list->currentItem()) @@ -541,9 +541,9 @@ void ElementQueryWidget::on_m_filter_le_textEdited(const QString &arg1) } /** - * @brief ElementQueryWidget::on_m_filter_type_cb_activated - * @param index - */ + @brief ElementQueryWidget::on_m_filter_type_cb_activated + @param index +*/ void ElementQueryWidget::on_m_filter_type_cb_activated(int index) { if (auto item = ui->m_choosen_list->currentItem()) @@ -559,9 +559,9 @@ void ElementQueryWidget::on_m_filter_type_cb_activated(int index) } /** - * @brief ElementQueryWidget::on_m_load_pb_clicked - * Load a query from nomenclature.json file - */ + @brief ElementQueryWidget::on_m_load_pb_clicked + Load a query from nomenclature.json file +*/ void ElementQueryWidget::on_m_load_pb_clicked() { auto name = ui->m_conf_cb->currentText(); @@ -589,9 +589,9 @@ void ElementQueryWidget::on_m_load_pb_clicked() } /** - * @brief ElementQueryWidget::on_m_save_current_conf_pb_clicked - * Save the actual query to nomenclature.json file - */ + @brief ElementQueryWidget::on_m_save_current_conf_pb_clicked + Save the actual query to nomenclature.json file +*/ void ElementQueryWidget::on_m_save_current_conf_pb_clicked() { QFile file_(QETApp::configDir() + "/nomenclature.json"); @@ -648,9 +648,9 @@ void ElementQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *it } /** - * @brief ElementQueryWidget::reset - * Clear this widget aka set to initial state - */ + @brief ElementQueryWidget::reset + Clear this widget aka set to initial state +*/ void ElementQueryWidget::reset() { //Ugly hack to force to remove all selected infos diff --git a/sources/dataBase/ui/elementquerywidget.h b/sources/dataBase/ui/elementquerywidget.h index 977a8d74e..5b7effab5 100644 --- a/sources/dataBase/ui/elementquerywidget.h +++ b/sources/dataBase/ui/elementquerywidget.h @@ -28,10 +28,10 @@ class ElementQueryWidget; } /** - * @brief The ElementQueryWidget class - * A widget use to edit a sql query for get element information - * This widget only work to get information from ProjectDataBase - */ + @brief The ElementQueryWidget class + A widget use to edit a sql query for get element information + This widget only work to get information from ProjectDataBase +*/ class ElementQueryWidget : public QWidget { Q_OBJECT diff --git a/sources/dataBase/ui/summaryquerywidget.cpp b/sources/dataBase/ui/summaryquerywidget.cpp index 7f84fa804..5e6a8b4e7 100644 --- a/sources/dataBase/ui/summaryquerywidget.cpp +++ b/sources/dataBase/ui/summaryquerywidget.cpp @@ -22,9 +22,9 @@ #include /** - * @brief SummaryQueryWidget::SummaryQueryWidget - * @param parent - */ + @brief SummaryQueryWidget::SummaryQueryWidget + @param parent +*/ SummaryQueryWidget::SummaryQueryWidget(QWidget *parent) : QWidget(parent), ui(new Ui::SummaryQueryWidget) @@ -39,17 +39,17 @@ SummaryQueryWidget::SummaryQueryWidget(QWidget *parent) : } /** - * @brief SummaryQueryWidget::~SummaryQueryWidget - */ + @brief SummaryQueryWidget::~SummaryQueryWidget +*/ SummaryQueryWidget::~SummaryQueryWidget() { delete ui; } /** - * @brief SummaryQueryWidget::queryStr - * @return The current query string - */ + @brief SummaryQueryWidget::queryStr + @return The current query string +*/ QString SummaryQueryWidget::queryStr() const { //User define is own query @@ -80,11 +80,11 @@ QString SummaryQueryWidget::queryStr() const } /** - * @brief SummaryQueryWidget::setQuery - * @param query - * set the current query to @query. - * If it's possible, rebuild the state of the widget from the query - */ + @brief SummaryQueryWidget::setQuery + @param query + set the current query to @query. + If it's possible, rebuild the state of the widget from the query +*/ void SummaryQueryWidget::setQuery(const QString &query) { if (query.startsWith("SELECT")) @@ -114,8 +114,8 @@ void SummaryQueryWidget::setQuery(const QString &query) } /** - * @brief SummaryQueryWidget::setUpItems - */ + @brief SummaryQueryWidget::setUpItems +*/ void SummaryQueryWidget::setUpItems() { for (auto key : QETApp::diagramInfoKeys()) @@ -133,9 +133,9 @@ void SummaryQueryWidget::setUpItems() } /** - * @brief SummaryQueryWidget::fillSavedQuery - * Fill the combo box of the saved query - */ + @brief SummaryQueryWidget::fillSavedQuery + Fill the combo box of the saved query +*/ void SummaryQueryWidget::fillSavedQuery() { QFile file(QETApp::configDir() + "/summary.json"); @@ -151,16 +151,16 @@ void SummaryQueryWidget::fillSavedQuery() } /** - * @brief SummaryQueryWidget::updateQueryLine - */ + @brief SummaryQueryWidget::updateQueryLine +*/ void SummaryQueryWidget::updateQueryLine() { ui->m_user_query_le->setText(queryStr()); } /** - * @brief SummaryQueryWidget::selectedKeys - * @return - */ + @brief SummaryQueryWidget::selectedKeys + @return +*/ QStringList SummaryQueryWidget::selectedKeys() const { //Made a string list with the colomns (keys) choosen by the user @@ -176,9 +176,9 @@ QStringList SummaryQueryWidget::selectedKeys() const } /** - * @brief SummaryQueryWidget::on_m_available_list_itemDoubleClicked - * @param item - */ + @brief SummaryQueryWidget::on_m_available_list_itemDoubleClicked + @param item +*/ void SummaryQueryWidget::on_m_available_list_itemDoubleClicked(QListWidgetItem *item) { Q_UNUSED(item) @@ -186,9 +186,9 @@ void SummaryQueryWidget::on_m_available_list_itemDoubleClicked(QListWidgetItem * } /** - * @brief SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked - * @param item - */ + @brief SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked + @param item +*/ void SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *item) { Q_UNUSED(item) @@ -196,8 +196,8 @@ void SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked(QListWidgetItem *it } /** - * @brief SummaryQueryWidget::on_m_up_pb_clicked - */ + @brief SummaryQueryWidget::on_m_up_pb_clicked +*/ void SummaryQueryWidget::on_m_up_pb_clicked() { auto row = ui->m_choosen_list->currentRow(); @@ -213,8 +213,8 @@ void SummaryQueryWidget::on_m_up_pb_clicked() } /** - * @brief SummaryQueryWidget::on_m_add_pb_clicked - */ + @brief SummaryQueryWidget::on_m_add_pb_clicked +*/ void SummaryQueryWidget::on_m_add_pb_clicked() { if (auto *item = ui->m_available_list->takeItem(ui->m_available_list->currentRow())) { @@ -225,8 +225,8 @@ void SummaryQueryWidget::on_m_add_pb_clicked() } /** - * @brief SummaryQueryWidget::on_m_remove_pb_clicked - */ + @brief SummaryQueryWidget::on_m_remove_pb_clicked +*/ void SummaryQueryWidget::on_m_remove_pb_clicked() { if (auto *item = ui->m_choosen_list->takeItem(ui->m_choosen_list->currentRow())) { @@ -237,8 +237,8 @@ void SummaryQueryWidget::on_m_remove_pb_clicked() } /** - * @brief SummaryQueryWidget::on_m_down_pb_clicked - */ + @brief SummaryQueryWidget::on_m_down_pb_clicked +*/ void SummaryQueryWidget::on_m_down_pb_clicked() { auto row = ui->m_choosen_list->currentRow(); @@ -254,8 +254,8 @@ void SummaryQueryWidget::on_m_down_pb_clicked() } /** - * @brief SummaryQueryWidget::on_m_edit_sql_query_cb_clicked - */ + @brief SummaryQueryWidget::on_m_edit_sql_query_cb_clicked +*/ void SummaryQueryWidget::on_m_edit_sql_query_cb_clicked() { ui->m_user_query_le->setEnabled(ui->m_edit_sql_query_cb->isChecked()); @@ -273,9 +273,9 @@ void SummaryQueryWidget::on_m_edit_sql_query_cb_clicked() } /** - * @brief SummaryQueryWidget::reset - * Clear this widget aka set to initial state - */ + @brief SummaryQueryWidget::reset + Clear this widget aka set to initial state +*/ void SummaryQueryWidget::reset() { //Ugly hack to force to remove all selected infos @@ -286,8 +286,8 @@ void SummaryQueryWidget::reset() } /** - * @brief SummaryQueryWidget::saveConfig - */ + @brief SummaryQueryWidget::saveConfig +*/ void SummaryQueryWidget::saveConfig() { QFile file_(QETApp::configDir() + "/summary.json"); @@ -316,8 +316,8 @@ void SummaryQueryWidget::saveConfig() } /** - * @brief SummaryQueryWidget::loadConfig - */ + @brief SummaryQueryWidget::loadConfig +*/ void SummaryQueryWidget::loadConfig() { auto name = ui->m_config_gb->selectedText(); diff --git a/sources/diagram.cpp b/sources/diagram.cpp index 86e030cd1..e32f2335e 100644 --- a/sources/diagram.cpp +++ b/sources/diagram.cpp @@ -1484,7 +1484,7 @@ bool Diagram::fromXml(QDomElement &document, * @param folioSeq type * @param seq type * @param type of sequential - */ +*/ void Diagram::folioSequentialsFromXml(const QDomElement &root, QHash* hash, @@ -1727,7 +1727,7 @@ void Diagram::updateLabels() * @param sequential to be treated * @param type to be treated * @param Numerotation Context to be manipulated - */ +*/ void Diagram::insertFolioSeqHash(QHash *hash, const QString& title, diff --git a/sources/diagramcontent.cpp b/sources/diagramcontent.cpp index 002f2c6cd..eb9f1a0c8 100644 --- a/sources/diagramcontent.cpp +++ b/sources/diagramcontent.cpp @@ -30,16 +30,16 @@ #include "qetgraphicstableitem.h" /** - * @brief DiagramContent::DiagramContent - */ + @brief DiagramContent::DiagramContent +*/ DiagramContent::DiagramContent() {} /** - * @brief DiagramContent::DiagramContent - * Constructor - * @param diagram : Construct a diagramContent and fill it with the selected item of @diagram - * @param selected : this diagramcontent get only selected items if true. - */ + @brief DiagramContent::DiagramContent + Constructor + @param diagram : Construct a diagramContent and fill it with the selected item of @diagram + @param selected : this diagramcontent get only selected items if true. +*/ DiagramContent::DiagramContent(Diagram *diagram, bool selected) : m_selected_items(diagram->selectedItems()) { @@ -120,12 +120,12 @@ DiagramContent::~DiagramContent() {} /** - * @brief DiagramContent::selectedTexts - * @return a list of every selected texts (every kind of texts) - * Note that the returned list of texts, correspond to the selected texts - * at the moment of the creation of this DiagramContent, - * with the constructor : DiagramContent::DiagramContent(Diagram *diagram) - */ + @brief DiagramContent::selectedTexts + @return a list of every selected texts (every kind of texts) + Note that the returned list of texts, correspond to the selected texts + at the moment of the creation of this DiagramContent, + with the constructor : DiagramContent::DiagramContent(Diagram *diagram) +*/ QList DiagramContent::selectedTexts() const { QList selected_texts; @@ -140,12 +140,12 @@ QList DiagramContent::selectedTexts() const } /** - * @brief DiagramContent::selectedTextsGroup - * @return a list of selected texts group - * Note that the returned list of texts group, correspond to the selected texts group - * at the moment of the creation of this DiagramContent, - * with the constructor : DiagramContent::DiagramContent(Diagram *diagram) - */ + @brief DiagramContent::selectedTextsGroup + @return a list of selected texts group + Note that the returned list of texts group, correspond to the selected texts group + at the moment of the creation of this DiagramContent, + with the constructor : DiagramContent::DiagramContent(Diagram *diagram) +*/ QList DiagramContent::selectedTextsGroup() const { QList groups; @@ -159,10 +159,10 @@ QList DiagramContent::selectedTextsGroup() const } /** - * @brief DiagramContent::conductors - * @param filter - * @return Every conductors according to the filter - */ + @brief DiagramContent::conductors + @param filter + @return Every conductors according to the filter +*/ QList DiagramContent::conductors(int filter) const { QList result; @@ -180,12 +180,12 @@ QList DiagramContent::conductors(int filter) const } /** - * @brief DiagramContent::hasDeletableItems - * @return true if this diagram content have deletable item - * The deletable items correspond to the selected items of diagram - * at the moment of the creation of this DiagramContent, - * with the constructor : DiagramContent::DiagramContent(Diagram *diagram) - */ + @brief DiagramContent::hasDeletableItems + @return true if this diagram content have deletable item + The deletable items correspond to the selected items of diagram + at the moment of the creation of this DiagramContent, + with the constructor : DiagramContent::DiagramContent(Diagram *diagram) +*/ bool DiagramContent::hasDeletableItems() const { for(QGraphicsItem *qgi : m_selected_items) @@ -206,9 +206,9 @@ bool DiagramContent::hasDeletableItems() const } /** - * @brief DiagramContent::hasCopiableItems - * @return true if this diagram content have copiable items. - */ + @brief DiagramContent::hasCopiableItems + @return true if this diagram content have copiable items. +*/ bool DiagramContent::hasCopiableItems() const { if(!m_images.isEmpty()) return true; @@ -220,9 +220,9 @@ bool DiagramContent::hasCopiableItems() const } /** - * @brief DiagramContent::clear - * Remove all items from the diagram content - */ + @brief DiagramContent::clear + Remove all items from the diagram content +*/ void DiagramContent::clear() { m_elements.clear(); @@ -239,10 +239,10 @@ void DiagramContent::clear() } /** - * @brief DiagramContent::removeNonMovableItems - * Remove all non movable item. - * @return : return the numbers of removed item - */ + @brief DiagramContent::removeNonMovableItems + Remove all non movable item. + @return : return the numbers of removed item +*/ int DiagramContent::removeNonMovableItems() { int count_ = 0; @@ -333,10 +333,10 @@ DiagramContent &DiagramContent::operator+=(const DiagramContent &other) } /** - * @brief DiagramContent::potentialIsManaged - * @param conductors a list of conductors at the same potential. - * @return true, if m_potential_conductors already have a conductor of this potential. - */ + @brief DiagramContent::potentialIsManaged + @param conductors a list of conductors at the same potential. + @return true, if m_potential_conductors already have a conductor of this potential. +*/ bool DiagramContent::potentialIsManaged(QList conductors) { bool b = false; @@ -351,9 +351,9 @@ bool DiagramContent::potentialIsManaged(QList conductors) } /** - * @brief DiagramContent::hasTextEditing - * @return true if handle a text currently in editing intercation - */ + @brief DiagramContent::hasTextEditing + @return true if handle a text currently in editing intercation +*/ bool DiagramContent::hasTextEditing() { for (DiagramTextItem *dti : selectedTexts()) { @@ -366,10 +366,10 @@ bool DiagramContent::hasTextEditing() } /** - * @brief DiagramContent::items - * @param filter - * @return The items of this diagram content according to @filter - */ + @brief DiagramContent::items + @param filter + @return The items of this diagram content according to @filter +*/ QList DiagramContent::items(int filter) const { QList items_list; @@ -393,10 +393,10 @@ QList DiagramContent::items(int filter) const } /** - * @brief DiagramContent::count - * @param filter - * @return The number of items, according to @filter - */ + @brief DiagramContent::count + @param filter + @return The number of items, according to @filter +*/ int DiagramContent::count(int filter) const { int count = 0; @@ -428,11 +428,11 @@ int DiagramContent::count(int filter) const } /** - * @brief DiagramContent::sentence - * @param filter - * @return A string that describe the items of the diagram content according to @filter. - * Exemple : X elements, Y conductors etc.... - */ + @brief DiagramContent::sentence + @param filter + @return A string that describe the items of the diagram content according to @filter. + Exemple : X elements, Y conductors etc.... +*/ QString DiagramContent::sentence(int filter) const { int elements_count = (filter & Elements) ? m_elements.count() : 0; @@ -457,11 +457,11 @@ QString DiagramContent::sentence(int filter) const } /** - * @brief operator << Use to debug a diagram content - * @param d : QDebug to use for display the debug info - * @param content : content to debug - * @return - */ + @brief operator << Use to debug a diagram content + @param d : QDebug to use for display the debug info + @param content : content to debug + @return +*/ QDebug &operator<<(QDebug d, DiagramContent &content) { Q_UNUSED(content) d << "DiagramContent {" << "\n"; diff --git a/sources/diagramcontext.cpp b/sources/diagramcontext.cpp index 0afc4e14c..21d2a7fe8 100644 --- a/sources/diagramcontext.cpp +++ b/sources/diagramcontext.cpp @@ -21,13 +21,13 @@ #include /** - * @brief DiagramContext::add - * Add all value of @other to this. - * If a key already exist, the value is replaced. - * If a key doesn't exist, she will be added. - * All other keys of this context, which are not present in @other, stay unchanged. - * @param other - */ + @brief DiagramContext::add + Add all value of @other to this. + If a key already exist, the value is replaced. + If a key doesn't exist, she will be added. + All other keys of this context, which are not present in @other, stay unchanged. + @param other +*/ void DiagramContext::add(DiagramContext other) { for (QString key : other.keys()) { @@ -36,9 +36,9 @@ void DiagramContext::add(DiagramContext other) } /** - * @brief DiagramContext::remove - * @param key - */ + @brief DiagramContext::remove + @param key +*/ void DiagramContext::remove(const QString &key) { m_content.remove(key); } @@ -117,9 +117,9 @@ int DiagramContext::count() { } /** - * @brief DiagramContext::keyMustShow - * @return the value pairs with key, if key no found, return false - */ + @brief DiagramContext::keyMustShow + @return the value pairs with key, if key no found, return false +*/ bool DiagramContext::keyMustShow(const QString &key) const { if (m_content_show.contains(key)) return m_content_show[key]; @@ -163,11 +163,11 @@ void DiagramContext::fromXml(const QDomElement &e, const QString &tag_name) { } /** - * @brief DiagramContext::fromXml - * Read this context properties from the @dom_element, looking for tags named @tag_name - * @param dom_element : dom element to parse - * @param tag_name : tag name to find, by default "property" - */ + @brief DiagramContext::fromXml + Read this context properties from the @dom_element, looking for tags named @tag_name + @param dom_element : dom element to parse + @param tag_name : tag name to find, by default "property" +*/ void DiagramContext::fromXml(const pugi::xml_node &dom_element, const QString &tag_name) { for(auto node = dom_element.child(tag_name.toStdString().c_str()) ; node ; node = node.next_sibling(tag_name.toStdString().c_str())) diff --git a/sources/diagramcontext.h b/sources/diagramcontext.h index 6eeaa1508..f887b0ff6 100644 --- a/sources/diagramcontext.h +++ b/sources/diagramcontext.h @@ -51,7 +51,7 @@ * location -> the location assigned to the element * frozenLabel -> label locked at a given time * - */ +*/ class DiagramContext { public: diff --git a/sources/diagramevent/diagrameventaddelement.cpp b/sources/diagramevent/diagrameventaddelement.cpp index f7417429f..eff821ce7 100644 --- a/sources/diagramevent/diagrameventaddelement.cpp +++ b/sources/diagramevent/diagrameventaddelement.cpp @@ -24,12 +24,12 @@ /** - * @brief DiagramEventAddElement::DiagramEventAddElement - * Defaut constructor - * @param location :location of diagram - * @param diagram : diagram owner of this event - * @param pos : first pos of item ( optional, by defaut QPointF(0,0) ) - */ + @brief DiagramEventAddElement::DiagramEventAddElement + Defaut constructor + @param location :location of diagram + @param diagram : diagram owner of this event + @param pos : first pos of item ( optional, by defaut QPointF(0,0) ) +*/ DiagramEventAddElement::DiagramEventAddElement(ElementsLocation &location, Diagram *diagram, QPointF pos) : DiagramEventInterface(diagram), m_location(location), @@ -53,10 +53,10 @@ DiagramEventAddElement::DiagramEventAddElement(ElementsLocation &location, Diagr } /** - * @brief DiagramEventAddElement::~DiagramEventAddElement - * Destructor - * Enable context menu for each view of diagram - */ + @brief DiagramEventAddElement::~DiagramEventAddElement + Destructor + Enable context menu for each view of diagram +*/ DiagramEventAddElement::~DiagramEventAddElement() { if (m_element) @@ -69,11 +69,11 @@ DiagramEventAddElement::~DiagramEventAddElement() } /** - * @brief DiagramEventAddElement::mouseMoveEvent - * Move the element to new pos of mouse - * the event is always accepted - * @param event - */ + @brief DiagramEventAddElement::mouseMoveEvent + Move the element to new pos of mouse + the event is always accepted + @param event +*/ void DiagramEventAddElement::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (m_element) { @@ -83,22 +83,22 @@ void DiagramEventAddElement::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddElement::mousePressEvent - * Do nothing, but return true for not transit the event to other thing in diagram. - * the event is always accepted - * @param event - */ + @brief DiagramEventAddElement::mousePressEvent + Do nothing, but return true for not transit the event to other thing in diagram. + the event is always accepted + @param event +*/ void DiagramEventAddElement::mousePressEvent(QGraphicsSceneMouseEvent *event) { event->setAccepted(true); } /** - * @brief DiagramEventAddElement::mouseReleaseEvent - * Right button finish this event (isRunning = false) and emit finish. - * Left button add an element to diagram - * the event is always accepted - * @param event - */ + @brief DiagramEventAddElement::mouseReleaseEvent + Right button finish this event (isRunning = false) and emit finish. + Left button add an element to diagram + the event is always accepted + @param event +*/ void DiagramEventAddElement::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (m_element) @@ -121,11 +121,11 @@ void DiagramEventAddElement::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddElement::mouseDoubleClickEvent - * If mouse left double clic, finish this event (isRunning = false) and emit finish - * the event is always accepted - * @param event - */ + @brief DiagramEventAddElement::mouseDoubleClickEvent + If mouse left double clic, finish this event (isRunning = false) and emit finish + the event is always accepted + @param event +*/ void DiagramEventAddElement::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { if (m_element && (event -> button() == Qt::LeftButton)) @@ -141,11 +141,11 @@ void DiagramEventAddElement::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *eve } /** - * @brief DiagramEventAddElement::keyPressEvent - * Press space key rotate the element to 90° (return true) - * else call DiagramEventInterface::keyPressEvent(event), and return the value. - * @param event - */ + @brief DiagramEventAddElement::keyPressEvent + Press space key rotate the element to 90° (return true) + else call DiagramEventInterface::keyPressEvent(event), and return the value. + @param event +*/ void DiagramEventAddElement::keyPressEvent(QKeyEvent *event) { if (m_element && event->key() == Qt::Key_Space) @@ -159,9 +159,9 @@ void DiagramEventAddElement::keyPressEvent(QKeyEvent *event) } /** - * @brief DiagramEventAddElement::init - * Init this event. - */ + @brief DiagramEventAddElement::init + Init this event. +*/ void DiagramEventAddElement::init() { foreach(QGraphicsView *view, m_diagram->views()) @@ -169,9 +169,9 @@ void DiagramEventAddElement::init() } /** - * @brief DiagramEventAddElement::buildElement - * Build the element, if the element is build successfully, we return true, otherwise false - */ + @brief DiagramEventAddElement::buildElement + Build the element, if the element is build successfully, we return true, otherwise false +*/ bool DiagramEventAddElement::buildElement() { ElementsLocation import_loc = m_diagram->project()->importElement(m_location); @@ -196,10 +196,10 @@ bool DiagramEventAddElement::buildElement() } /** - * @brief DiagramEventAddElement::addElement - * Add an element at the current pos en current rotation, - * if project autoconductor option is enable, and the element can be wired, we do it. - */ + @brief DiagramEventAddElement::addElement + Add an element at the current pos en current rotation, + if project autoconductor option is enable, and the element can be wired, we do it. +*/ void DiagramEventAddElement::addElement() { int state; diff --git a/sources/diagramevent/diagrameventaddelement.h b/sources/diagramevent/diagrameventaddelement.h index a23cbf33a..f06387792 100644 --- a/sources/diagramevent/diagrameventaddelement.h +++ b/sources/diagramevent/diagrameventaddelement.h @@ -24,10 +24,10 @@ class Element; /** - * @brief The DiagramEventAddElement class - * This diagram event add a new element, for each left click button at the position of click. - * Space key rotate current element by 90°, right click button finish this event. - */ + @brief The DiagramEventAddElement class + This diagram event add a new element, for each left click button at the position of click. + Space key rotate current element by 90°, right click button finish this event. +*/ class DiagramEventAddElement : public DiagramEventInterface { Q_OBJECT diff --git a/sources/diagramevent/diagrameventaddimage.cpp b/sources/diagramevent/diagrameventaddimage.cpp index f6b99d831..ac61233d5 100644 --- a/sources/diagramevent/diagrameventaddimage.cpp +++ b/sources/diagramevent/diagrameventaddimage.cpp @@ -22,10 +22,10 @@ #include "diagramcommands.h" /** - * @brief DiagramEventAddImage::DiagramEventAddImage - * Default constructor - * @param diagram : diagram where operate this event - */ + @brief DiagramEventAddImage::DiagramEventAddImage + Default constructor + @param diagram : diagram where operate this event +*/ DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) : DiagramEventInterface(diagram), m_image (nullptr), @@ -35,8 +35,8 @@ DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) : } /** - * @brief DiagramEventAddImage::~DiagramEventAddImage - */ + @brief DiagramEventAddImage::~DiagramEventAddImage +*/ DiagramEventAddImage::~DiagramEventAddImage() { if (m_running || m_abort) @@ -50,10 +50,10 @@ DiagramEventAddImage::~DiagramEventAddImage() } /** - * @brief DiagramEventAddImage::mousePressEvent - * Action when mouse is pressed - * @param event : event of mouse pressed - */ + @brief DiagramEventAddImage::mousePressEvent + Action when mouse is pressed + @param event : event of mouse pressed +*/ void DiagramEventAddImage::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (m_image && event -> button() == Qt::LeftButton) @@ -79,10 +79,10 @@ void DiagramEventAddImage::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddImage::mouseMoveEvent - * Action when mouse move - * @param event : event of mouse move - */ + @brief DiagramEventAddImage::mouseMoveEvent + Action when mouse move + @param event : event of mouse move +*/ void DiagramEventAddImage::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (!m_image || event->buttons() != Qt::NoButton) { @@ -106,20 +106,20 @@ void DiagramEventAddImage::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddImage::mouseDoubleClickEvent - * This method is only use to overwrite double click. - * When double click, image propertie dialog isn't open. - * @param event : event of mouse double click. - */ + @brief DiagramEventAddImage::mouseDoubleClickEvent + This method is only use to overwrite double click. + When double click, image propertie dialog isn't open. + @param event : event of mouse double click. +*/ void DiagramEventAddImage::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { event->setAccepted(true); } /** - * @brief DiagramEventAddImage::wheelEvent - * Action when mouse wheel is rotate - * @param event: evet of mouse wheel - */ + @brief DiagramEventAddImage::wheelEvent + Action when mouse wheel is rotate + @param event: evet of mouse wheel +*/ void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event) { if (!m_is_added || !m_image || event -> modifiers() != Qt::CTRL) { @@ -136,9 +136,9 @@ void DiagramEventAddImage::wheelEvent(QGraphicsSceneWheelEvent *event) } /** - * @brief DiagramEventAddImage::isNull - * @return : true if image can't be loaded, otherwise return false. - */ + @brief DiagramEventAddImage::isNull + @return : true if image can't be loaded, otherwise return false. +*/ bool DiagramEventAddImage::isNull() const { if (!m_image) return true; @@ -146,9 +146,9 @@ bool DiagramEventAddImage::isNull() const } /** - * @brief DiagramEventAddImage::openDialog - * Open dialog for select the image to add. - */ + @brief DiagramEventAddImage::openDialog + Open dialog for select the image to add. +*/ void DiagramEventAddImage::openDialog() { if (m_diagram -> isReadOnly()) return; diff --git a/sources/diagramevent/diagrameventaddimage.h b/sources/diagramevent/diagrameventaddimage.h index 9f23e7250..d6d3ca504 100644 --- a/sources/diagramevent/diagrameventaddimage.h +++ b/sources/diagramevent/diagrameventaddimage.h @@ -24,9 +24,9 @@ class Diagram; class DiagramImageItem; /** - * @brief The DiagramEventAddImage class - * This diagram event, handle the adding of an image in a diagram. - */ + @brief The DiagramEventAddImage class + This diagram event, handle the adding of an image in a diagram. +*/ class DiagramEventAddImage : public DiagramEventInterface { Q_OBJECT diff --git a/sources/diagramevent/diagrameventaddshape.cpp b/sources/diagramevent/diagrameventaddshape.cpp index 1256094f5..be9d69f34 100644 --- a/sources/diagramevent/diagrameventaddshape.cpp +++ b/sources/diagramevent/diagrameventaddshape.cpp @@ -20,11 +20,11 @@ #include "diagramcommands.h" /** - * @brief DiagramEventAddShape::DiagramEventAddShape - * Default constructor - * @param diagram : the diagram where this event must operate - * @param shape_type : the type of shape to draw - */ + @brief DiagramEventAddShape::DiagramEventAddShape + Default constructor + @param diagram : the diagram where this event must operate + @param shape_type : the type of shape to draw +*/ DiagramEventAddShape::DiagramEventAddShape(Diagram *diagram, QetShapeItem::ShapeType shape_type) : DiagramEventInterface(diagram), m_shape_type (shape_type), @@ -37,8 +37,8 @@ DiagramEventAddShape::DiagramEventAddShape(Diagram *diagram, QetShapeItem::Shape } /** - * @brief DiagramEventAddShape::~DiagramEventAddShape - */ + @brief DiagramEventAddShape::~DiagramEventAddShape +*/ DiagramEventAddShape::~DiagramEventAddShape() { if ((m_running || m_abort) && m_shape_item) @@ -54,10 +54,10 @@ DiagramEventAddShape::~DiagramEventAddShape() } /** - * @brief DiagramEventAddShape::mousePressEvent - * Action when mouse is pressed - * @param event : event of mouse press - */ + @brief DiagramEventAddShape::mousePressEvent + Action when mouse is pressed + @param event : event of mouse press +*/ void DiagramEventAddShape::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (Q_UNLIKELY(m_diagram->isReadOnly())) { @@ -107,10 +107,10 @@ void DiagramEventAddShape::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddShape::mouseMoveEvent - * Action when mouse move - * @param event : event of mouse move - */ + @brief DiagramEventAddShape::mouseMoveEvent + Action when mouse move + @param event : event of mouse move +*/ void DiagramEventAddShape::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross(event->scenePos()); @@ -128,10 +128,10 @@ void DiagramEventAddShape::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddShape::mouseReleaseEvent - * Action when mouse button is released - * @param event : event of mouse release - */ + @brief DiagramEventAddShape::mouseReleaseEvent + Action when mouse button is released + @param event : event of mouse release +*/ void DiagramEventAddShape::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::RightButton) @@ -170,10 +170,10 @@ void DiagramEventAddShape::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramEventAddShape::mouseDoubleClickEvent - * Action when mouse button is double clicked - * @param event : event of mouse double click - */ + @brief DiagramEventAddShape::mouseDoubleClickEvent + Action when mouse button is double clicked + @param event : event of mouse double click +*/ void DiagramEventAddShape::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { //If current item is a polyline, add it with an undo command @@ -204,10 +204,10 @@ void DiagramEventAddShape::init() } /** - * @brief DiagramEventAddShape::updateHelpCross - * Create and update the position of the cross to help user for draw new shape - * @param p : the center of the cross - */ + @brief DiagramEventAddShape::updateHelpCross + Create and update the position of the cross to help user for draw new shape + @param p : the center of the cross +*/ void DiagramEventAddShape::updateHelpCross(const QPointF &p) { //If line isn't created yet, we create it. diff --git a/sources/diagramevent/diagrameventaddshape.h b/sources/diagramevent/diagrameventaddshape.h index cc43eff6c..a079a5909 100644 --- a/sources/diagramevent/diagrameventaddshape.h +++ b/sources/diagramevent/diagrameventaddshape.h @@ -22,9 +22,9 @@ #include "qetshapeitem.h" /** - * @brief The DiagramEventAddShape class - * This event manage the creation of a shape. - */ + @brief The DiagramEventAddShape class + This event manage the creation of a shape. +*/ class DiagramEventAddShape : public DiagramEventInterface { Q_OBJECT diff --git a/sources/diagramevent/diagrameventaddtext.cpp b/sources/diagramevent/diagrameventaddtext.cpp index e18414f8e..dd7e1fd7f 100644 --- a/sources/diagramevent/diagrameventaddtext.cpp +++ b/sources/diagramevent/diagrameventaddtext.cpp @@ -22,24 +22,24 @@ #include "diagram.h" /** - * @brief DiagramEventAddText::DiagramEventAddText - * Default constructor - * @param diagram : the diagram where this event must operate - */ + @brief DiagramEventAddText::DiagramEventAddText + Default constructor + @param diagram : the diagram where this event must operate +*/ DiagramEventAddText::DiagramEventAddText(Diagram *diagram) : DiagramEventInterface(diagram) {} /** - * @brief DiagramEventAddText::~DiagramEventAddText - */ + @brief DiagramEventAddText::~DiagramEventAddText +*/ DiagramEventAddText::~DiagramEventAddText() {} /** - * @brief DiagramEventAddText::mousePressEvent - * @param event : event of mouse press event. - */ + @brief DiagramEventAddText::mousePressEvent + @param event : event of mouse press event. +*/ void DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) diff --git a/sources/diagramevent/diagrameventaddtext.h b/sources/diagramevent/diagrameventaddtext.h index f84ba44df..8f44d6bd1 100644 --- a/sources/diagramevent/diagrameventaddtext.h +++ b/sources/diagramevent/diagrameventaddtext.h @@ -23,9 +23,9 @@ class Diagram; /** - * @brief The DiagramEventAddText class - * This diagram event handle the creation of a new text in a diagram - */ + @brief The DiagramEventAddText class + This diagram event handle the creation of a new text in a diagram +*/ class DiagramEventAddText : public DiagramEventInterface { Q_OBJECT diff --git a/sources/diagramevent/diagrameventinterface.cpp b/sources/diagramevent/diagrameventinterface.cpp index 4915e36a7..c8dcb4844 100644 --- a/sources/diagramevent/diagrameventinterface.cpp +++ b/sources/diagramevent/diagrameventinterface.cpp @@ -52,10 +52,10 @@ void DiagramEventInterface::wheelEvent(QGraphicsSceneWheelEvent *event) { } /** - * @brief DiagramEventInterface::keyPressEvent - * By default, press escape key abort the curent action - * @param event - */ + @brief DiagramEventInterface::keyPressEvent + By default, press escape key abort the curent action + @param event +*/ void DiagramEventInterface::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) diff --git a/sources/diagramevent/diagrameventinterface.h b/sources/diagramevent/diagrameventinterface.h index 4150291a0..28dc638fd 100644 --- a/sources/diagramevent/diagrameventinterface.h +++ b/sources/diagramevent/diagrameventinterface.h @@ -26,22 +26,22 @@ class QKeyEvent; class Diagram; /** - * @brief The DiagramEventInterface class - * isRunning() return true if action is running (do something). By default return false. + @brief The DiagramEventInterface class + isRunning() return true if action is running (do something). By default return false. * - * ##USE DiagramEventInterface## - * This class is the basic interface for manage event on a diagram. - * To create a behavior for event diagram, we need to herite this class. - * This interface work like this : - * 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, - * they send the event (with the status accepted to false) to the interface (for exemple 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. - * 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, - * the bool m_abort is here for that at destruction time. + ##USE DiagramEventInterface## + This class is the basic interface for manage event on a diagram. + To create a behavior for event diagram, we need to herite this class. + This interface work like this : + 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, + they send the event (with the status accepted to false) to the interface (for exemple 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. + 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, + the bool m_abort is here for that at destruction time. * - */ +*/ class DiagramEventInterface : public QObject { Q_OBJECT diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index 8b22dbbed..34a18c771 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -198,10 +198,10 @@ void DiagramView::handleElementDrop(QDropEvent *event) } /** - * @brief DiagramView::handleTitleBlockDrop - * Handle the dropEvent that contain data of a titleblock - * @param e - */ + @brief DiagramView::handleTitleBlockDrop + Handle the dropEvent that contain data of a titleblock + @param e +*/ void DiagramView::handleTitleBlockDrop(QDropEvent *e) { // fetch the title block template location from the drop event TitleBlockTemplateLocation tbt_loc; @@ -247,10 +247,10 @@ void DiagramView::handleTitleBlockDrop(QDropEvent *e) { } /** - * @brief DiagramView::handleTextDrop + @brief DiagramView::handleTextDrop *handle the drop of text - * @param e the QDropEvent describing the current drag'n drop - */ + @param e the QDropEvent describing the current drag'n drop +*/ void DiagramView::handleTextDrop(QDropEvent *e) { if (m_diagram -> isReadOnly() || (e -> mimeData() -> hasText() == false) ) return; @@ -284,12 +284,12 @@ void DiagramView::setSelectionMode() { } /** - * @brief DiagramView::zoom - * Zomm the view. - * A zoom_factor > 1 zoom in. - * A zoom_factor < 1 zoom out - * @param zoom_factor - */ + @brief DiagramView::zoom + Zomm the view. + A zoom_factor > 1 zoom in. + A zoom_factor < 1 zoom out + @param zoom_factor +*/ void DiagramView::zoom(const qreal zoom_factor) { if (zoom_factor >= 1){ @@ -357,11 +357,11 @@ void DiagramView::copy() { } /** - * @brief DiagramView::paste - * Import the element stored in the clipboard to the diagram. - * @param pos : top left corner of the bounding rect of imported elements - * @param clipboard_mode - */ + @brief DiagramView::paste + Import the element stored in the clipboard to the diagram. + @param pos : top left corner of the bounding rect of imported elements + @param clipboard_mode +*/ void DiagramView::paste(const QPointF &pos, QClipboard::Mode clipboard_mode) { if (!isInteractive() || m_diagram -> isReadOnly()) return; @@ -448,9 +448,9 @@ void DiagramView::mousePressEvent(QMouseEvent *e) } /** - * @brief DiagramView::mouseMoveEvent - * Manage the event move mouse - */ + @brief DiagramView::mouseMoveEvent + Manage the event move mouse +*/ void DiagramView::mouseMoveEvent(QMouseEvent *e) { if (m_event_interface && m_event_interface->mouseMoveEvent(e)) return; @@ -509,9 +509,9 @@ void DiagramView::mouseMoveEvent(QMouseEvent *e) } /** - * @brief DiagramView::mouseReleaseEvent - * Manage event release click mouse - */ + @brief DiagramView::mouseReleaseEvent + Manage event release click mouse +*/ void DiagramView::mouseReleaseEvent(QMouseEvent *e) { if (m_event_interface && m_event_interface->mouseReleaseEvent(e)) return; @@ -563,9 +563,9 @@ void DiagramView::mouseReleaseEvent(QMouseEvent *e) } /** - * @brief DiagramView::gestures - * @return - */ + @brief DiagramView::gestures + @return +*/ bool DiagramView::gestures() const { QSettings settings; @@ -606,11 +606,11 @@ void DiagramView::wheelEvent(QWheelEvent *event) } /** - * @brief DiagramView::gestureEvent - * Use the pinch of the trackpad for zoom - * @param event - * @return - */ + @brief DiagramView::gestureEvent + Use the pinch of the trackpad for zoom + @param event + @return +*/ bool DiagramView::gestureEvent(QGestureEvent *event) { if (QGesture *gesture = event->gesture(Qt::PinchGesture)) @@ -639,11 +639,11 @@ void DiagramView::focusInEvent(QFocusEvent *e) { } /** - * @brief DiagramView::keyPressEvent - * Handles "key press" events. Reimplemented here to switch to visualisation - * mode if needed. - * @param e - */ + @brief DiagramView::keyPressEvent + Handles "key press" events. Reimplemented here to switch to visualisation + mode if needed. + @param e +*/ void DiagramView::keyPressEvent(QKeyEvent *e) { if (m_event_interface && m_event_interface->keyPressEvent(e)) @@ -821,17 +821,17 @@ QString DiagramView::title() const { } /** - * @brief DiagramView::editDiagramProperties - * Edit the properties of the viewed digram - */ + @brief DiagramView::editDiagramProperties + Edit the properties of the viewed digram +*/ void DiagramView::editDiagramProperties() { DiagramPropertiesDialog::diagramPropertiesDialog(m_diagram, diagramEditor()); } /** - * @brief DiagramView::adjustSceneRect - * Calcul and set the area of the scene visualized by this view - */ + @brief DiagramView::adjustSceneRect + Calcul and set the area of the scene visualized by this view +*/ void DiagramView::adjustSceneRect() { QRectF scene_rect = m_diagram->sceneRect(); @@ -912,9 +912,9 @@ void DiagramView::applyReadOnly() { } /** - * @brief DiagramView::editSelectedConductorColor - * Edit the color of the selected conductor; does nothing if multiple conductors are selected - */ + @brief DiagramView::editSelectedConductorColor + Edit the color of the selected conductor; does nothing if multiple conductors are selected +*/ void DiagramView::editSelectedConductorColor() { //retrieve selected content @@ -996,14 +996,14 @@ void DiagramView::resetConductors() { @param e Evenement */ /** - * @brief DiagramView::event - * Manage the event on this diagram view. - * -At first activation (QEvent::WindowActivate or QEvent::Show) we zoomFit. - * -Convert event interpreted to mouse event to gesture event if needed. - * -send Shortcut to view (by default send to QMenu /QAction) - * @param e the event. - * @return - */ + @brief DiagramView::event + Manage the event on this diagram view. + -At first activation (QEvent::WindowActivate or QEvent::Show) we zoomFit. + -Convert event interpreted to mouse event to gesture event if needed. + -send Shortcut to view (by default send to QMenu /QAction) + @param e the event. + @return +*/ bool DiagramView::event(QEvent *e) { if (Q_UNLIKELY(m_first_activation)) { if (e -> type() == QEvent::Show) { @@ -1031,10 +1031,10 @@ bool DiagramView::event(QEvent *e) { } /** - * @brief DiagramView::paintEvent - * Reimplemented from QGraphicsView - * @param event - */ + @brief DiagramView::paintEvent + Reimplemented from QGraphicsView + @param event +*/ void DiagramView::paintEvent(QPaintEvent *event) { QGraphicsView::paintEvent(event); @@ -1113,9 +1113,9 @@ bool DiagramView::selectedItemHasFocus() { } /** - * @brief DiagramView::editSelection - * Edit the selected item if he can be edited and if only one item is selected - */ + @brief DiagramView::editSelection + Edit the selected item if he can be edited and if only one item is selected +*/ void DiagramView::editSelection() { if (m_diagram -> isReadOnly() || m_diagram -> selectedItems().size() != 1 ) return; @@ -1133,11 +1133,11 @@ void DiagramView::editSelection() { } /** - * @brief DiagramView::setEventInterface - * Set an event interface to diagram view. - * If diagram view already have an event interface, he delete it before. - * Diagram view take ownership of event interface and delete it when event interface is finish - */ + @brief DiagramView::setEventInterface + Set an event interface to diagram view. + If diagram view already have an event interface, he delete it before. + Diagram view take ownership of event interface and delete it when event interface is finish +*/ void DiagramView::setEventInterface(DVEventInterface *event_interface) { if (m_event_interface) delete m_event_interface; @@ -1146,10 +1146,10 @@ void DiagramView::setEventInterface(DVEventInterface *event_interface) } /** - * @brief DiagramView::contextMenuActions - * @return a list of actions currently available for a context menu. - * - */ + @brief DiagramView::contextMenuActions + @return a list of actions currently available for a context menu. + +*/ QList DiagramView::contextMenuActions() const { QList list; @@ -1189,9 +1189,9 @@ QList DiagramView::contextMenuActions() const } /** - * @brief DiagramView::contextMenuEvent - * @param e - */ + @brief DiagramView::contextMenuEvent + @param e +*/ void DiagramView::contextMenuEvent(QContextMenuEvent *e) { QGraphicsView::contextMenuEvent(e); @@ -1237,9 +1237,9 @@ QETDiagramEditor *DiagramView::diagramEditor() const { } /** - * @brief DiagramView::mouseDoubleClickEvent - * @param e - */ + @brief DiagramView::mouseDoubleClickEvent + @param e +*/ void DiagramView::mouseDoubleClickEvent(QMouseEvent *e) { if (m_event_interface && m_event_interface -> mouseDoubleClickEvent(e)) return; diff --git a/sources/dvevent/dveventinterface.cpp b/sources/dvevent/dveventinterface.cpp index 4d5a84e57..d436db1f5 100644 --- a/sources/dvevent/dveventinterface.cpp +++ b/sources/dvevent/dveventinterface.cpp @@ -57,12 +57,12 @@ bool DVEventInterface::wheelEvent(QWheelEvent *event) { } /** - * @brief DVEventInterface::keyPressEvent - * By default, press escape key abort the curent action. - * isFinish return true, and emit finish - * @param event - * @return - */ + @brief DVEventInterface::keyPressEvent + By default, press escape key abort the curent action. + isFinish return true, and emit finish + @param event + @return +*/ bool DVEventInterface::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) diff --git a/sources/dvevent/dveventinterface.h b/sources/dvevent/dveventinterface.h index 7685b120f..2322f004b 100644 --- a/sources/dvevent/dveventinterface.h +++ b/sources/dvevent/dveventinterface.h @@ -27,14 +27,18 @@ class DiagramView; class Diagram; /** - * @brief The DVEventInterface class - * This class is the main interface for manage event of a Diagram View. - * This do nothing, for create new event behavior, we must to create new class from this. - * Each method return a bool: True if the methode do something else return false. - * Each method of DVEventInterface return false; - * isRunning() return true if action is started but not finish. By default return false. - * isFinish() return true when the action is finish, or not started. By default return true. - */ + @brief The DVEventInterface class + This class is the main interface for manage event of a Diagram View. + This do nothing, for create new event behavior, + we must to create new class from this. + Each method return a bool: + True if the methode do something else return false. + Each method of DVEventInterface return false; + isRunning() return true if action is started but not finish. + By default return false. + isFinish() return true when the action is finish, or not started. + By default return true. +*/ class DVEventInterface : public QObject { Q_OBJECT @@ -54,8 +58,8 @@ class DVEventInterface : public QObject signals: /** - * @brief finish - * emited when the interface finish is work + @brief finish + emited when the interface finish is work */ void finish(); diff --git a/sources/editor/UndoCommand/pastepartscommand.cpp b/sources/editor/UndoCommand/pastepartscommand.cpp index a72cfe8c7..3b53ec7f1 100644 --- a/sources/editor/UndoCommand/pastepartscommand.cpp +++ b/sources/editor/UndoCommand/pastepartscommand.cpp @@ -20,14 +20,14 @@ #include "partterminal.h" /** - * @brief PastePartsCommand::PastePartsCommand - * @param view : view where this command work - * @param content_to_paste : content to paste - * @param parent : parent undo command + @brief PastePartsCommand::PastePartsCommand + @param view : view where this command work + @param content_to_paste : content to paste + @param parent : parent undo command * - * Note : all terminal stored in @content_to_paste get a new uuid in the constructor of this class to avoid have - * several terminal of an element with the same uuid. - */ + Note : all terminal stored in @content_to_paste get a new uuid in the constructor of this class to avoid have + several terminal of an element with the same uuid. +*/ PastePartsCommand::PastePartsCommand(ElementView *view, const ElementContent &content_to_paste, QUndoCommand *parent) : ElementEditionCommand(view ? view -> scene() : nullptr, view, parent) { @@ -44,16 +44,16 @@ PastePartsCommand::PastePartsCommand(ElementView *view, const ElementContent &co } /** - * @brief PastePartsCommand::~PastePartsCommand - */ + @brief PastePartsCommand::~PastePartsCommand +*/ PastePartsCommand::~PastePartsCommand() { m_scene->qgiManager().release(m_pasted_content); } /** - * @brief PastePartsCommand::undo - */ + @brief PastePartsCommand::undo +*/ void PastePartsCommand::undo() { m_scene->blockSignals(true); @@ -72,8 +72,8 @@ void PastePartsCommand::undo() } /** - * @brief PastePartsCommand::redo - */ + @brief PastePartsCommand::redo +*/ void PastePartsCommand::redo() { if (m_first_redo) { @@ -97,13 +97,13 @@ void PastePartsCommand::redo() } /** - * @brief PastePartsCommand::setOffset - * Describe the offset to use with this undo command - * @param old_offset_paste_count - * @param old_start_top_left_corner - * @param new_offset_paste_count - * @param new_start_top_left_corner - */ + @brief PastePartsCommand::setOffset + Describe the offset to use with this undo command + @param old_offset_paste_count + @param old_start_top_left_corner + @param new_offset_paste_count + @param new_start_top_left_corner +*/ void PastePartsCommand::setOffset(int old_offset_paste_count, const QPointF &old_start_top_left_corner, int new_offset_paste_count, const QPointF &new_start_top_left_corner) { m_old_offset_paste_count = old_offset_paste_count; diff --git a/sources/editor/UndoCommand/pastepartscommand.h b/sources/editor/UndoCommand/pastepartscommand.h index eac997eee..34841f6d1 100644 --- a/sources/editor/UndoCommand/pastepartscommand.h +++ b/sources/editor/UndoCommand/pastepartscommand.h @@ -24,9 +24,9 @@ class ElementView; /** - * @brief The PastePartsCommand class - * Undo command for paste element primitive in an element editor - */ + @brief The PastePartsCommand class + Undo command for paste element primitive in an element editor +*/ class PastePartsCommand : public ElementEditionCommand { public: diff --git a/sources/editor/arceditor.cpp b/sources/editor/arceditor.cpp index 4c9a73fbb..87cbcb5dd 100644 --- a/sources/editor/arceditor.cpp +++ b/sources/editor/arceditor.cpp @@ -95,12 +95,12 @@ void ArcEditor::disconnectChangeConnections() } /** - * @brief ArcEditor::setPart - * Specifie to this editor the part to edit. - * Note that an editor can accept or refuse to edit a part. This editor accept only partArc. - * @param new_part - * @return - */ + @brief ArcEditor::setPart + Specifie to this editor the part to edit. + Note that an editor can accept or refuse to edit a part. This editor accept only partArc. + @param new_part + @return +*/ bool ArcEditor::setPart(CustomElementPart *new_part) { if (!new_part) @@ -137,9 +137,9 @@ bool ArcEditor::setParts(QList parts) } /** - * @brief ArcEditor::currentPart - * @return the curent edited part, or 0 if there is no edited part - */ + @brief ArcEditor::currentPart + @return the curent edited part, or 0 if there is no edited part +*/ CustomElementPart *ArcEditor::currentPart() const { return(part); } @@ -149,9 +149,9 @@ QList ArcEditor::currentParts() const { } /** - * @brief ArcEditor::updateArcS - * Update the start angle of the arc according to the edited value. - */ + @brief ArcEditor::updateArcS + Update the start angle of the arc according to the edited value. +*/ void ArcEditor::updateArcS() { if (m_locked) return; @@ -175,9 +175,9 @@ void ArcEditor::updateArcS() } /** - * @brief ArcEditor::updateArcA - * Update the span angle of the arc according to the edited value. - */ + @brief ArcEditor::updateArcA + Update the span angle of the arc according to the edited value. +*/ void ArcEditor::updateArcA() { if (m_locked) return; @@ -200,9 +200,9 @@ void ArcEditor::updateArcA() } /** - * @brief ArcEditor::updateArcRect - * Update the geometrie of the rect that define this arc according the the edited values - */ + @brief ArcEditor::updateArcRect + Update the geometrie of the rect that define this arc according the the edited values +*/ void ArcEditor::updateArcRectX() { if (m_locked) return; @@ -300,9 +300,9 @@ void ArcEditor::updateArcRectV() } /** - * @brief ArcEditor::updateForm - * Update the value of the widgets - */ + @brief ArcEditor::updateForm + Update the value of the widgets +*/ void ArcEditor::updateForm() { if (!part) return; @@ -318,11 +318,11 @@ void ArcEditor::updateForm() } /** - * @brief ArcEditor::activeConnections - * Enable/disable connection between editor widget and slot editingFinished - * True == enable | false == disable - * @param active - */ + @brief ArcEditor::activeConnections + Enable/disable connection between editor widget and slot editingFinished + True == enable | false == disable + @param active +*/ void ArcEditor::activeConnections(bool active) { if (active) diff --git a/sources/editor/arceditor.h b/sources/editor/arceditor.h index aaa79efe2..b5b8d38fc 100644 --- a/sources/editor/arceditor.h +++ b/sources/editor/arceditor.h @@ -67,10 +67,11 @@ class ArcEditor : public ElementItemEditor private: void activeConnections(bool); - /*! - * \brief setUpChangeConnections - * Setup the connection from the arc(s) to the widget, to update it when the arc(s) are changed (moved ...) - */ + /** + @brief setUpChangeConnections + Setup the connection from the arc(s) to the widget, + to update it when the arc(s) are changed (moved ...) + */ void setUpChangeConnections(); void disconnectChangeConnections(); }; diff --git a/sources/editor/editorcommands.cpp b/sources/editor/editorcommands.cpp index 7c4526b79..92dd0a4b4 100644 --- a/sources/editor/editorcommands.cpp +++ b/sources/editor/editorcommands.cpp @@ -523,13 +523,13 @@ void ScalePartsCommand::adjustText() { } } /** - * @brief ChangePropertiesCommand::ChangePropertiesCommand - * Change the properties of the drawed element - * @param scene: scene to belong the property - * @param type: new type of element. - * @param context: new info about type. - * @param parent: parent undo - */ + @brief ChangePropertiesCommand::ChangePropertiesCommand + Change the properties of the drawed element + @param scene: scene to belong the property + @param type: new type of element. + @param context: new info about type. + @param parent: parent undo +*/ ChangePropertiesCommand::ChangePropertiesCommand(ElementScene *scene, const QString& type, const DiagramContext& info, const DiagramContext& elmt_info, QUndoCommand *parent) : ElementEditionCommand(scene, nullptr, parent) { diff --git a/sources/editor/editorcommands.h b/sources/editor/editorcommands.h index d6174ffbf..07ec7a4c2 100644 --- a/sources/editor/editorcommands.h +++ b/sources/editor/editorcommands.h @@ -24,11 +24,11 @@ #include "qgimanager.h" /** - * @brief The ElementEditionCommand class - * ElementEditionCommand is the base class for all commands classes involved in + @brief The ElementEditionCommand class + ElementEditionCommand is the base class for all commands classes involved in the edition of an electrical element. It provides commonly required methods and attributes, such as accessors to the modified scene and view. - */ +*/ class ElementEditionCommand : public QUndoCommand { // constructors, destructor diff --git a/sources/editor/elementprimitivedecorator.cpp b/sources/editor/elementprimitivedecorator.cpp index 612d42ea2..f7c90baed 100644 --- a/sources/editor/elementprimitivedecorator.cpp +++ b/sources/editor/elementprimitivedecorator.cpp @@ -472,8 +472,8 @@ QVector ElementPrimitiveDecorator::getResizingsPoints() const } /** - * @brief ElementPrimitiveDecorator::adjusteHandlerPos - */ + @brief ElementPrimitiveDecorator::adjusteHandlerPos +*/ void ElementPrimitiveDecorator::adjusteHandlerPos() { QVector points_vector = mapToScene(getResizingsPoints()); @@ -482,10 +482,10 @@ void ElementPrimitiveDecorator::adjusteHandlerPos() } /** - * @brief ElementPrimitiveDecorator::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief ElementPrimitiveDecorator::handlerMousePressEvent + @param qghi + @param event +*/ void ElementPrimitiveDecorator::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); @@ -499,10 +499,10 @@ void ElementPrimitiveDecorator::handlerMousePressEvent(QetGraphicsHandlerItem *q } /** - * @brief ElementPrimitiveDecorator::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief ElementPrimitiveDecorator::handlerMouseMoveEvent + @param qghi + @param event +*/ void ElementPrimitiveDecorator::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -554,10 +554,10 @@ void ElementPrimitiveDecorator::handlerMouseMoveEvent(QetGraphicsHandlerItem *qg } /** - * @brief ElementPrimitiveDecorator::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief ElementPrimitiveDecorator::handlerMouseReleaseEvent + @param qghi + @param event +*/ void ElementPrimitiveDecorator::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -585,9 +585,9 @@ void ElementPrimitiveDecorator::handlerMouseReleaseEvent(QetGraphicsHandlerItem } /** - * @brief ElementPrimitiveDecorator::addHandler - * Add handlers for this item - */ + @brief ElementPrimitiveDecorator::addHandler + Add handlers for this item +*/ void ElementPrimitiveDecorator::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -605,9 +605,9 @@ void ElementPrimitiveDecorator::addHandler() } /** - * @brief ElementPrimitiveDecorator::removeHandler - * Remove the handlers of this item - */ + @brief ElementPrimitiveDecorator::removeHandler + Remove the handlers of this item +*/ void ElementPrimitiveDecorator::removeHandler() { if (!m_handler_vector.isEmpty()) @@ -688,11 +688,11 @@ QET::ScalingMethod ElementPrimitiveDecorator::scalingMethod(QGraphicsSceneMouseE } /** - * @brief ElementPrimitiveDecorator::itemChange - * @param change - * @param value - * @return - */ + @brief ElementPrimitiveDecorator::itemChange + @param change + @param value + @return +*/ QVariant ElementPrimitiveDecorator::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSceneHasChanged) @@ -718,11 +718,11 @@ QVariant ElementPrimitiveDecorator::itemChange(QGraphicsItem::GraphicsItemChange } /** - * @brief ElementPrimitiveDecorator::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief ElementPrimitiveDecorator::sceneEventFilter + @param watched + @param event + @return +*/ bool ElementPrimitiveDecorator::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler diff --git a/sources/editor/elementscene.cpp b/sources/editor/elementscene.cpp index b206ac3ee..9681bd487 100644 --- a/sources/editor/elementscene.cpp +++ b/sources/editor/elementscene.cpp @@ -75,7 +75,7 @@ ElementScene::ElementScene(QETElementEditor *editor, QObject *parent) : /** @brief ElementScene::~ElementScene - */ +*/ ElementScene::~ElementScene() { //Disconnect to avoid crash, see bug report N° 122. diff --git a/sources/editor/elementview.cpp b/sources/editor/elementview.cpp index a8da50452..3d92e3d5d 100644 --- a/sources/editor/elementview.cpp +++ b/sources/editor/elementview.cpp @@ -144,10 +144,10 @@ void ElementView::zoomReset() { } /** - * @brief ElementView::adjustSceneRect - * Adjust the scenRect, so that he include all primitives of element - * plus the viewport of the scene with a margin of 1/3 of herself - */ + @brief ElementView::adjustSceneRect + Adjust the scenRect, so that he include all primitives of element + plus the viewport of the scene with a margin of 1/3 of herself +*/ void ElementView::adjustSceneRect() { QRectF esgr = m_scene -> elementSceneGeometricRect(); QRectF vpbr = mapToScene(this -> viewport()->rect()).boundingRect(); @@ -156,10 +156,10 @@ void ElementView::adjustSceneRect() { } /** - * @brief ElementView::resetSceneRect - * reset le sceneRect (zone du schéma visualisée par l'ElementView) afin que - * celui-ci inclut uniquement les primitives de l'élément dessiné. - */ + @brief ElementView::resetSceneRect + reset le sceneRect (zone du schéma visualisée par l'ElementView) afin que + celui-ci inclut uniquement les primitives de l'élément dessiné. +*/ void ElementView::resetSceneRect() { setSceneRect(m_scene -> elementSceneGeometricRect()); } @@ -366,9 +366,9 @@ void ElementView::mousePressEvent(QMouseEvent *e) { } /** - * @brief ElementView::mouseMoveEvent - * Manage the event move mouse - */ + @brief ElementView::mouseMoveEvent + Manage the event move mouse +*/ void ElementView::mouseMoveEvent(QMouseEvent *e) { if (e->buttons() == Qt::MidButton) { @@ -384,9 +384,9 @@ void ElementView::mouseMoveEvent(QMouseEvent *e) { } /** - * @brief ElementView::mouseReleaseEvent - * Manage event release click mouse - */ + @brief ElementView::mouseReleaseEvent + Manage event release click mouse +*/ void ElementView::mouseReleaseEvent(QMouseEvent *e) { if (e -> button() == Qt::MidButton) { setCursor(Qt::ArrowCursor); @@ -397,9 +397,9 @@ void ElementView::mouseReleaseEvent(QMouseEvent *e) { } /** - * @brief ElementView::gestures - * @return - */ + @brief ElementView::gestures + @return +*/ bool ElementView::gestures() const { QSettings settings; @@ -408,9 +408,9 @@ bool ElementView::gestures() const /** - * @brief ElementView::wheelEvent - * @param e - */ + @brief ElementView::wheelEvent + @param e +*/ void ElementView::wheelEvent(QWheelEvent *e) { //Zoom and scrolling if ( gestures() ) { @@ -439,11 +439,11 @@ bool ElementView::event(QEvent *e) { } /** - * Utilise le pincement du trackpad pour zoomer - * @brief ElementView::gestureEvent - * @param event - * @return - */ + Utilise le pincement du trackpad pour zoomer + @brief ElementView::gestureEvent + @param event + @return +*/ bool ElementView::gestureEvent(QGestureEvent *event){ if (QGesture *gesture = event->gesture(Qt::PinchGesture)) { QPinchGesture *pinch = static_cast(gesture); diff --git a/sources/editor/ellipseeditor.h b/sources/editor/ellipseeditor.h index 735561631..6dca2d015 100644 --- a/sources/editor/ellipseeditor.h +++ b/sources/editor/ellipseeditor.h @@ -62,10 +62,10 @@ class EllipseEditor : public ElementItemEditor private: void activeConnections(bool); - /*! - * \brief setUpChangeConnections - * Setup the connection from the ellipse(s) to the widget, to update it when the ellipse(s) are changed (moved ...) - */ + /** + @brief setUpChangeConnections + Setup the connection from the ellipse(s) to the widget, to update it when the ellipse(s) are changed (moved ...) + */ void setUpChangeConnections(); void disconnectChangeConnections(); }; diff --git a/sources/editor/esevent/eseventaddarc.cpp b/sources/editor/esevent/eseventaddarc.cpp index 214dc1ed4..5f37f4981 100644 --- a/sources/editor/esevent/eseventaddarc.cpp +++ b/sources/editor/esevent/eseventaddarc.cpp @@ -23,9 +23,9 @@ #include "eseventaddarc.h" /** - * @brief ESEventAddArc::ESEventAddArc - * @param scene - */ + @brief ESEventAddArc::ESEventAddArc + @param scene +*/ ESEventAddArc::ESEventAddArc(ElementScene *scene) : ESEventInterface(scene), m_arc(nullptr), @@ -33,18 +33,18 @@ ESEventAddArc::ESEventAddArc(ElementScene *scene) : {} /** - * @brief ESEventAddArc::~ESEventAddArc - */ + @brief ESEventAddArc::~ESEventAddArc +*/ ESEventAddArc::~ESEventAddArc() { if (m_running || m_abort) delete m_arc; } /** - * @brief ESEventAddPolygon::mousePressEvent - * @param event - * @return - */ + @brief ESEventAddPolygon::mousePressEvent + @param event + @return +*/ bool ESEventAddArc::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) @@ -79,10 +79,10 @@ bool ESEventAddArc::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ESEventAddArc::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddArc::mouseMoveEvent + @param event + @return +*/ bool ESEventAddArc::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross(event -> scenePos()); if (!m_arc) return false; @@ -94,10 +94,10 @@ bool ESEventAddArc::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddArc::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddArc::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::RightButton) { if (m_arc) {delete m_arc; m_arc = nullptr;} @@ -108,10 +108,10 @@ bool ESEventAddArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddArc::keyPressEvent - * @param event - * @return - */ + @brief ESEventAddArc::keyPressEvent + @param event + @return +*/ bool ESEventAddArc::keyPressEvent(QKeyEvent *event) { if (m_arc && event->key() == Qt::Key_Space) { m_inverted = m_inverted ? false : true; @@ -123,9 +123,9 @@ bool ESEventAddArc::keyPressEvent(QKeyEvent *event) { } /** - * @brief ESEventAddArc::updateArc - * Redraw the arc with curent value - */ + @brief ESEventAddArc::updateArc + Redraw the arc with curent value +*/ void ESEventAddArc::updateArc() { qreal width = (m_mouse_pos.x() - m_origin.x())*2; diff --git a/sources/editor/esevent/eseventaddarc.h b/sources/editor/esevent/eseventaddarc.h index 4418af9d4..382d04016 100644 --- a/sources/editor/esevent/eseventaddarc.h +++ b/sources/editor/esevent/eseventaddarc.h @@ -25,9 +25,9 @@ class PartArc; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddArc class - * This ESEvent manage creation of arc in an ElementScene - */ + @brief The ESEventAddArc class + This ESEvent manage creation of arc in an ElementScene +*/ class ESEventAddArc : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventadddynamictextfield.cpp b/sources/editor/esevent/eseventadddynamictextfield.cpp index b556bf131..9933ce513 100644 --- a/sources/editor/esevent/eseventadddynamictextfield.cpp +++ b/sources/editor/esevent/eseventadddynamictextfield.cpp @@ -23,9 +23,9 @@ #include /** - * @brief ESEventAddDynamicTextField::ESEventAddDynamicTextField - * @param scene - */ + @brief ESEventAddDynamicTextField::ESEventAddDynamicTextField + @param scene +*/ ESEventAddDynamicTextField::ESEventAddDynamicTextField(ElementScene *scene) : ESEventInterface(scene) { @@ -35,17 +35,17 @@ ESEventAddDynamicTextField::ESEventAddDynamicTextField(ElementScene *scene) : } /** - * @brief ESEventAddDynamicTextField::~ESEventAddDynamicTextField - */ + @brief ESEventAddDynamicTextField::~ESEventAddDynamicTextField +*/ ESEventAddDynamicTextField::~ESEventAddDynamicTextField() { delete m_text; } /** - * @brief ESEventAddDynamicTextField::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddDynamicTextField::mouseMoveEvent + @param event + @return +*/ bool ESEventAddDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { QPointF pos = m_scene->snapToGrid(event->scenePos()); @@ -55,10 +55,10 @@ bool ESEventAddDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ESEventAddDynamicTextField::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddDynamicTextField::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddDynamicTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) diff --git a/sources/editor/esevent/eseventadddynamictextfield.h b/sources/editor/esevent/eseventadddynamictextfield.h index 8e322e532..8734f41d8 100644 --- a/sources/editor/esevent/eseventadddynamictextfield.h +++ b/sources/editor/esevent/eseventadddynamictextfield.h @@ -25,9 +25,9 @@ class PartDynamicTextField; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddDynamicTextField class - * This ESEvent manage creation of dynamic text field in an ElementScene - */ + @brief The ESEventAddDynamicTextField class + This ESEvent manage creation of dynamic text field in an ElementScene +*/ class ESEventAddDynamicTextField : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventaddellipse.cpp b/sources/editor/esevent/eseventaddellipse.cpp index 059bed288..4fa910ab0 100644 --- a/sources/editor/esevent/eseventaddellipse.cpp +++ b/sources/editor/esevent/eseventaddellipse.cpp @@ -23,17 +23,17 @@ #include "elementscene.h" /** - * @brief ESEventAddEllipse::ESEventAddEllipse - * @param scene - */ + @brief ESEventAddEllipse::ESEventAddEllipse + @param scene +*/ ESEventAddEllipse::ESEventAddEllipse(ElementScene *scene) : ESEventInterface(scene), m_ellipse(nullptr) {} /** - * @brief ESEventAddEllipse::~ESEventAddEllipse - */ + @brief ESEventAddEllipse::~ESEventAddEllipse +*/ ESEventAddEllipse::~ESEventAddEllipse() { if (m_running || m_abort){ delete m_ellipse; @@ -41,10 +41,10 @@ ESEventAddEllipse::~ESEventAddEllipse() { } /** - * @brief ESEventAddEllipse::mousePressEvent - * @param event - * @return - */ + @brief ESEventAddEllipse::mousePressEvent + @param event + @return +*/ bool ESEventAddEllipse::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) { if(!m_running) m_running = true; @@ -72,10 +72,10 @@ bool ESEventAddEllipse::mousePressEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddRect::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddRect::mouseMoveEvent + @param event + @return +*/ bool ESEventAddEllipse::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross(event -> scenePos()); if (!m_ellipse) return false; @@ -94,10 +94,10 @@ bool ESEventAddEllipse::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddEllipse::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddEllipse::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddEllipse::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::RightButton) { if (m_ellipse) {delete m_ellipse; m_ellipse = nullptr;} diff --git a/sources/editor/esevent/eseventaddellipse.h b/sources/editor/esevent/eseventaddellipse.h index d9a5a276f..585683652 100644 --- a/sources/editor/esevent/eseventaddellipse.h +++ b/sources/editor/esevent/eseventaddellipse.h @@ -26,9 +26,9 @@ class PartEllipse; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddEllipse class - * This ESEvent manage creation of ellpise in an ElementScene - */ + @brief The ESEventAddEllipse class + This ESEvent manage creation of ellpise in an ElementScene +*/ class ESEventAddEllipse : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventaddline.cpp b/sources/editor/esevent/eseventaddline.cpp index 5dd9d2e63..7c7373775 100644 --- a/sources/editor/esevent/eseventaddline.cpp +++ b/sources/editor/esevent/eseventaddline.cpp @@ -25,29 +25,29 @@ #include "editorcommands.h" /** - * @brief ESEventAddLine::ESEventAddLine - * Constructor - * @param scene : scene where we operate this action - */ + @brief ESEventAddLine::ESEventAddLine + Constructor + @param scene : scene where we operate this action +*/ ESEventAddLine::ESEventAddLine(ElementScene *scene) : ESEventInterface (scene), m_line (nullptr) {} /** - * @brief ESEventAddLine::~ESEventAddLine - * destructor - */ + @brief ESEventAddLine::~ESEventAddLine + destructor +*/ ESEventAddLine::~ESEventAddLine() { if (m_running || m_abort) delete m_line; } /** - * @brief ESEventAddLine::mousePressEvent - * @param event - * @return - */ + @brief ESEventAddLine::mousePressEvent + @param event + @return +*/ bool ESEventAddLine::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) { @@ -76,10 +76,10 @@ bool ESEventAddLine::mousePressEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddLine::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddLine::mouseMoveEvent + @param event + @return +*/ bool ESEventAddLine::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross (event -> scenePos()); @@ -92,10 +92,10 @@ bool ESEventAddLine::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ESEventAddLine::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddLine::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddLine::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::RightButton) { if (m_line) {delete m_line; m_line = nullptr;} diff --git a/sources/editor/esevent/eseventaddline.h b/sources/editor/esevent/eseventaddline.h index f7f122119..00ffe8576 100644 --- a/sources/editor/esevent/eseventaddline.h +++ b/sources/editor/esevent/eseventaddline.h @@ -25,9 +25,9 @@ class PartLine; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddLine class - * This ESEvent manage creation of line in a ElementScene - */ + @brief The ESEventAddLine class + This ESEvent manage creation of line in a ElementScene +*/ class ESEventAddLine : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventaddpolygon.cpp b/sources/editor/esevent/eseventaddpolygon.cpp index 5de96f7a4..07dc78789 100644 --- a/sources/editor/esevent/eseventaddpolygon.cpp +++ b/sources/editor/esevent/eseventaddpolygon.cpp @@ -23,27 +23,27 @@ #include "editorcommands.h" /** - * @brief ESEventAddPolygon::ESEventAddPolygon - * @param scene - */ + @brief ESEventAddPolygon::ESEventAddPolygon + @param scene +*/ ESEventAddPolygon::ESEventAddPolygon(ElementScene *scene) : ESEventInterface(scene), m_polygon(nullptr) {} /** - * @brief ESEventAddPolygon::~ESEventAddPolygon - */ + @brief ESEventAddPolygon::~ESEventAddPolygon +*/ ESEventAddPolygon::~ESEventAddPolygon() { if (m_running || m_abort) delete m_polygon; } /** - * @brief ESEventAddPolygon::mousePressEvent - * @param event - * @return - */ + @brief ESEventAddPolygon::mousePressEvent + @param event + @return +*/ bool ESEventAddPolygon::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) { if(!m_running) m_running = true; @@ -63,10 +63,10 @@ bool ESEventAddPolygon::mousePressEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddPolygon::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddPolygon::mouseMoveEvent + @param event + @return +*/ bool ESEventAddPolygon::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross(event -> scenePos()); if (!m_polygon) return false; @@ -76,10 +76,10 @@ bool ESEventAddPolygon::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddPolygon::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddPolygon::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddPolygon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::RightButton) { if (m_polygon) { @@ -99,10 +99,10 @@ bool ESEventAddPolygon::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddPolygon::mouseDoubleClickEvent - * @param event - * @return - */ + @brief ESEventAddPolygon::mouseDoubleClickEvent + @param event + @return +*/ bool ESEventAddPolygon::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) diff --git a/sources/editor/esevent/eseventaddpolygon.h b/sources/editor/esevent/eseventaddpolygon.h index 7b05251e3..b31673acd 100644 --- a/sources/editor/esevent/eseventaddpolygon.h +++ b/sources/editor/esevent/eseventaddpolygon.h @@ -25,9 +25,9 @@ class PartPolygon; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddPolygon class - * This ESEvent manage creation of polygon in an ElementScene - */ + @brief The ESEventAddPolygon class + This ESEvent manage creation of polygon in an ElementScene +*/ class ESEventAddPolygon : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventaddrect.cpp b/sources/editor/esevent/eseventaddrect.cpp index 2ac973a85..0e3386701 100644 --- a/sources/editor/esevent/eseventaddrect.cpp +++ b/sources/editor/esevent/eseventaddrect.cpp @@ -23,27 +23,27 @@ #include "editorcommands.h" /** - * @brief ESEventAddRect::ESEventAddRect - * @param scene - */ + @brief ESEventAddRect::ESEventAddRect + @param scene +*/ ESEventAddRect::ESEventAddRect(ElementScene *scene) : ESEventInterface(scene), m_rect(nullptr) {} /** - * @brief ESEventAddRect::~ESEventAddRect - */ + @brief ESEventAddRect::~ESEventAddRect +*/ ESEventAddRect::~ESEventAddRect() { if (m_running || m_abort) delete m_rect; } /** - * @brief ESEventAddRect::mousePressEvent - * @param event - * @return - */ + @brief ESEventAddRect::mousePressEvent + @param event + @return +*/ bool ESEventAddRect::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) @@ -75,10 +75,10 @@ bool ESEventAddRect::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ESEventAddRect::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddRect::mouseMoveEvent + @param event + @return +*/ bool ESEventAddRect::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { updateHelpCross(event -> scenePos()); if (!m_rect) return false; @@ -89,10 +89,10 @@ bool ESEventAddRect::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddRect::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddRect::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddRect::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::RightButton) { if (m_rect) {delete m_rect; m_rect = nullptr;} diff --git a/sources/editor/esevent/eseventaddterminal.cpp b/sources/editor/esevent/eseventaddterminal.cpp index 55efe3ae4..beac60416 100644 --- a/sources/editor/esevent/eseventaddterminal.cpp +++ b/sources/editor/esevent/eseventaddterminal.cpp @@ -23,9 +23,9 @@ #include "eseventaddterminal.h" /** - * @brief ESEventAddTerminal::ESEventAddTerminal - * @param scene - */ + @brief ESEventAddTerminal::ESEventAddTerminal + @param scene +*/ ESEventAddTerminal::ESEventAddTerminal(ElementScene *scene) : ESEventInterface(scene) { @@ -35,17 +35,17 @@ ESEventAddTerminal::ESEventAddTerminal(ElementScene *scene) : } /** - * @brief ESEventAddTerminal::~ESEventAddTerminal - */ + @brief ESEventAddTerminal::~ESEventAddTerminal +*/ ESEventAddTerminal::~ESEventAddTerminal() { delete m_terminal; } /** - * @brief ESEventAddTerminal::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddTerminal::mouseMoveEvent + @param event + @return +*/ bool ESEventAddTerminal::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { QPointF pos = m_scene -> snapToGrid(event -> scenePos()); updateHelpCross(pos); @@ -54,10 +54,10 @@ bool ESEventAddTerminal::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddTerminal::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddTerminal::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddTerminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event -> button() == Qt::LeftButton) { m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Borne"), m_scene, m_terminal)); @@ -80,10 +80,10 @@ bool ESEventAddTerminal::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddTerminal::keyPressEvent - * @param event - * @return - */ + @brief ESEventAddTerminal::keyPressEvent + @param event + @return +*/ bool ESEventAddTerminal::keyPressEvent(QKeyEvent *event) { if (event -> key() == Qt::Key_Space) { switch (m_terminal->orientation()) { diff --git a/sources/editor/esevent/eseventaddterminal.h b/sources/editor/esevent/eseventaddterminal.h index c3af503ea..edb856181 100644 --- a/sources/editor/esevent/eseventaddterminal.h +++ b/sources/editor/esevent/eseventaddterminal.h @@ -25,9 +25,9 @@ class PartTerminal; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddTerminal class - * This ESEvent manage creation of terminal in an ElementScene - */ + @brief The ESEventAddTerminal class + This ESEvent manage creation of terminal in an ElementScene +*/ class ESEventAddTerminal : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventaddtext.cpp b/sources/editor/esevent/eseventaddtext.cpp index e8a1e6588..041747a1f 100644 --- a/sources/editor/esevent/eseventaddtext.cpp +++ b/sources/editor/esevent/eseventaddtext.cpp @@ -23,9 +23,9 @@ #include "elementscene.h" /** - * @brief ESEventAddText::ESEventAddText - * @param scene - */ + @brief ESEventAddText::ESEventAddText + @param scene +*/ ESEventAddText::ESEventAddText(ElementScene *scene) : ESEventInterface(scene) { @@ -35,17 +35,17 @@ ESEventAddText::ESEventAddText(ElementScene *scene) : } /** - * @brief ESEventAddText::~ESEventAddText - */ + @brief ESEventAddText::~ESEventAddText +*/ ESEventAddText::~ESEventAddText() { delete m_text; } /** - * @brief ESEventAddText::mouseMoveEvent - * @param event - * @return - */ + @brief ESEventAddText::mouseMoveEvent + @param event + @return +*/ bool ESEventAddText::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { QPointF pos = m_scene -> snapToGrid(event -> scenePos()); updateHelpCross(pos); @@ -54,10 +54,10 @@ bool ESEventAddText::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ESEventAddText::mouseReleaseEvent - * @param event - * @return - */ + @brief ESEventAddText::mouseReleaseEvent + @param event + @return +*/ bool ESEventAddText::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) { m_scene -> undoStack().push(new AddPartCommand(QObject::tr("Texte"), m_scene, m_text)); diff --git a/sources/editor/esevent/eseventaddtext.h b/sources/editor/esevent/eseventaddtext.h index 4a587693b..2c00423b8 100644 --- a/sources/editor/esevent/eseventaddtext.h +++ b/sources/editor/esevent/eseventaddtext.h @@ -25,9 +25,9 @@ class PartText; class QGraphicsSceneMouseEvent; /** - * @brief The ESEventAddText class - * This ESEvent manage creation of text in an ElementScene - */ + @brief The ESEventAddText class + This ESEvent manage creation of text in an ElementScene +*/ class ESEventAddText : public ESEventInterface { public: diff --git a/sources/editor/esevent/eseventinterface.cpp b/sources/editor/esevent/eseventinterface.cpp index 1a65330d8..d44fa0811 100644 --- a/sources/editor/esevent/eseventinterface.cpp +++ b/sources/editor/esevent/eseventinterface.cpp @@ -32,9 +32,9 @@ ESEventInterface::ESEventInterface(ElementScene *scene) : } /** - * @brief ESEventInterface::init - * Init this event interface - */ + @brief ESEventInterface::init + Init this event interface +*/ void ESEventInterface::init() { m_scene->setBehavior(ElementScene::Behavior::AddPart); @@ -42,9 +42,9 @@ void ESEventInterface::init() } /** - * @brief ESEventInterface::~ESEventInterface - * Destructor - */ + @brief ESEventInterface::~ESEventInterface + Destructor +*/ ESEventInterface::~ESEventInterface() { delete m_help_horiz; @@ -80,11 +80,11 @@ bool ESEventInterface::wheelEvent(QGraphicsSceneWheelEvent *event) { } /** - * @brief ESEventInterface::keyPressEvent - * By default, press escape key abort the curent action - * @param event - * @return - */ + @brief ESEventInterface::keyPressEvent + By default, press escape key abort the curent action + @param event + @return +*/ bool ESEventInterface::keyPressEvent(QKeyEvent *event) { if (event->key() == Qt::Key_Escape) { m_running = false; diff --git a/sources/editor/graphicspart/abstractpartellipse.cpp b/sources/editor/graphicspart/abstractpartellipse.cpp index 2efbad722..32a1920fd 100644 --- a/sources/editor/graphicspart/abstractpartellipse.cpp +++ b/sources/editor/graphicspart/abstractpartellipse.cpp @@ -18,11 +18,11 @@ #include "abstractpartellipse.h" /** - * @brief AbstractPartEllipse::AbstractPartEllipse - * Constructor - * @param editor : QETElementEditor of this part - * @param parent : parent item - */ + @brief AbstractPartEllipse::AbstractPartEllipse + Constructor + @param editor : QETElementEditor of this part + @param parent : parent item +*/ AbstractPartEllipse::AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem *parent) : CustomElementGraphicPart(editor, parent), m_rect (QRectF(0, 0, 0, 0)), @@ -31,17 +31,17 @@ AbstractPartEllipse::AbstractPartEllipse(QETElementEditor *editor, QGraphicsItem {} /** - * @brief AbstractPartEllipse::~AbstractPartEllipse - * Destructor - */ + @brief AbstractPartEllipse::~AbstractPartEllipse + Destructor +*/ AbstractPartEllipse::~AbstractPartEllipse() {} /** - * @brief AbstractPartEllipse::startUserTransformation - * Start the user-induced transformation, provided this primitive is contained - * within the initial_selection_rect bounding rectangle. - * @param initial_selection_rect - */ + @brief AbstractPartEllipse::startUserTransformation + Start the user-induced transformation, provided this primitive is contained + within the initial_selection_rect bounding rectangle. + @param initial_selection_rect +*/ void AbstractPartEllipse::startUserTransformation(const QRectF &initial_selection_rect) { Q_UNUSED(initial_selection_rect) @@ -51,11 +51,11 @@ void AbstractPartEllipse::startUserTransformation(const QRectF &initial_selectio } /** - * @brief AbstractPartEllipse::handleUserTransformation - * Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect - * @param initial_selection_rect - * @param new_selection_rect - */ + @brief AbstractPartEllipse::handleUserTransformation + Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect + @param initial_selection_rect + @param new_selection_rect +*/ void AbstractPartEllipse::handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) { QList mapped_points = mapPoints(initial_selection_rect, new_selection_rect, saved_points_); @@ -63,10 +63,10 @@ void AbstractPartEllipse::handleUserTransformation(const QRectF &initial_selecti } /** - * @brief AbstractPartEllipse::boundingRect - * Bounding rectangle this part can fit into - * @return - */ + @brief AbstractPartEllipse::boundingRect + Bounding rectangle this part can fit into + @return +*/ QRectF AbstractPartEllipse::boundingRect() const { qreal adjust = (SHADOWS_HEIGHT + penWeight()) / 2; @@ -79,40 +79,43 @@ QRectF AbstractPartEllipse::boundingRect() const } /** - * @brief AbstractPartEllipse::sceneGeometricRect - * @return the minimum, margin-less rectangle this part can fit into in scene coordinates. - * It is different from boundingRect() because it is not supposed - * to imply any margin, and it is different from shape because it is a regular - * rectangle, not a complex shape. - */ + @brief AbstractPartEllipse::sceneGeometricRect + @return the minimum, + margin-less rectangle this part can fit into in scene coordinates. + It is different from boundingRect() because it is not supposed + to imply any margin, + and it is different from shape because it is a regular + rectangle, not a complex shape. +*/ QRectF AbstractPartEllipse::sceneGeometricRect() const { return(mapToScene(rect()).boundingRect()); } /** - * @brief AbstractPartEllipse::sceneTopLeft - * @return return the top left of rectangle, in scene coordinate - */ + @brief AbstractPartEllipse::sceneTopLeft + @return return the top left of rectangle, in scene coordinate +*/ QPointF AbstractPartEllipse::sceneTopLeft() const { return(mapToScene(rect().topLeft())); } /** - * @brief AbstractPartEllipse::rect - * Returns the item's ellipse geometry as a QRectF. - */ + @brief AbstractPartEllipse::rect + Returns the item's ellipse geometry as a QRectF. +*/ QRectF AbstractPartEllipse::rect() const { return m_rect; } /** - * @brief AbstractPartEllipse::setRect - * Sets the item's ellipse geometry to rect. - * The rectangle's left edge defines the left edge of the ellipse, - * and the rectangle's top edge describes the top of the ellipse - * The height and width of the rectangle describe the height and width of the ellipse. - * @param rect - */ + @brief AbstractPartEllipse::setRect + Sets the item's ellipse geometry to rect. + The rectangle's left edge defines the left edge of the ellipse, + and the rectangle's top edge describes the top of the ellipse + The height and width of the rectangle + describe the height and width of the ellipse. + @param rect +*/ void AbstractPartEllipse::setRect(const QRectF &rect) { if (rect == m_rect) return; @@ -123,21 +126,24 @@ void AbstractPartEllipse::setRect(const QRectF &rect) } /** - * @brief AbstractPartEllipse::isUseless - * @return true if this part is irrelevant and does not deserve to be Retained / registered. - * An ellipse is relevant when is rect is not null. - */ + @brief AbstractPartEllipse::isUseless + @return true if this part is irrelevant + and does not deserve to be Retained / registered. + An ellipse is relevant when is rect is not null. +*/ bool AbstractPartEllipse::isUseless() const { return(rect().isNull()); } /** - * @brief AbstractPartEllipse::setStartAngle - * Sets the start angle for an ellipse segment to angle, which is in 16ths of a degree. - * This angle is used together with spanAngle() for representing an ellipse segment (a pie). - * By default, the start angle is 0. - * @param start_angle - */ + @brief AbstractPartEllipse::setStartAngle + Sets the start angle for an ellipse segment to angle, + which is in 16ths of a degree. + This angle is used together with spanAngle() + for representing an ellipse segment (a pie). + By default, the start angle is 0. + @param start_angle +*/ void AbstractPartEllipse::setStartAngle(const int &start_angle) { if (m_start_angle == start_angle) return; @@ -147,12 +153,13 @@ void AbstractPartEllipse::setStartAngle(const int &start_angle) } /** - * @brief AbstractPartEllipse::setSpanAngle - * Returns the span angle of an ellipse segment in 16ths of a degree. - * This angle is used together with startAngle() for representing an ellipse segment (a pie). - * By default, this function returns 5760 (360 * 16, a full ellipse). - * @param span_angle - */ + @brief AbstractPartEllipse::setSpanAngle + Returns the span angle of an ellipse segment in 16ths of a degree. + This angle is used together with startAngle() + for representing an ellipse segment (a pie). + By default, this function returns 5760 (360 * 16, a full ellipse). + @param span_angle +*/ void AbstractPartEllipse::setSpanAngle(const int &span_angle) { if (m_span_angle == span_angle) return; diff --git a/sources/editor/graphicspart/abstractpartellipse.h b/sources/editor/graphicspart/abstractpartellipse.h index 3503cd8b3..c4dd5b136 100644 --- a/sources/editor/graphicspart/abstractpartellipse.h +++ b/sources/editor/graphicspart/abstractpartellipse.h @@ -23,15 +23,19 @@ class QetGraphicsHandlerItem; /** - * @brief The AbstractPartEllipse class - * This is the base class for all ellipse based item like ellipse, circle, arc. - * This class only provide common method for edit the ellipse like rect that contain the ellipse. - * All coordinates is in item coordinate, except pos(), center(), centerX() and centerY() - * which are in parent coordinate (or scene if no parent). - * - * In several points, this class is a copy of QGraphicsEllipseItem with some change, - * (the use of Q_PROPERTY) to be easily used with Element editor. - */ + @brief The AbstractPartEllipse class + This is the base class for all ellipse based item like ellipse, + circle, arc. + This class only provide common method for edit the ellipse + like rect that contain the ellipse. + All coordinates is in item coordinate, except pos(), + center(), centerX() and centerY() + which are in parent coordinate (or scene if no parent). + + In several points, + this class is a copy of QGraphicsEllipseItem with some change, + (the use of Q_PROPERTY) to be easily used with Element editor. +*/ class AbstractPartEllipse : public CustomElementGraphicPart { Q_OBJECT diff --git a/sources/editor/graphicspart/customelementgraphicpart.cpp b/sources/editor/graphicspart/customelementgraphicpart.cpp index d01114d8c..193a7bd5b 100644 --- a/sources/editor/graphicspart/customelementgraphicpart.cpp +++ b/sources/editor/graphicspart/customelementgraphicpart.cpp @@ -20,12 +20,12 @@ #include "QPropertyUndoCommand/qpropertyundocommand.h" /** - * @brief CustomElementGraphicPart::CustomElementGraphicPart - * Default constructor. - * By default, item is selectable, send geometry change (Qt > 4.6), - * accept mouse left button and accept hover event - * @param editor QETElement editor that belong this. - */ + @brief CustomElementGraphicPart::CustomElementGraphicPart + Default constructor. + By default, item is selectable, send geometry change (Qt > 4.6), + accept mouse left button and accept hover event + @param editor QETElement editor that belong this. +*/ CustomElementGraphicPart::CustomElementGraphicPart(QETElementEditor *editor, QGraphicsItem *parent) : QGraphicsObject (parent), CustomElementPart(editor), @@ -41,18 +41,18 @@ CustomElementGraphicPart::CustomElementGraphicPart(QETElementEditor *editor, QGr } /** - * @brief CustomElementGraphicPart::~CustomElementGraphicPart - * Destructor - */ + @brief CustomElementGraphicPart::~CustomElementGraphicPart + Destructor +*/ CustomElementGraphicPart::~CustomElementGraphicPart() {} /** - * @brief CustomElementGraphicPart::drawCross - * Draw a cross at pos center - * @param center : center of cross - * @param painter : painter to use for draw cross, - * the painter state is restored at end of this method. - */ + @brief CustomElementGraphicPart::drawCross + Draw a cross at pos center + @param center : center of cross + @param painter : painter to use for draw cross, + the painter state is restored at end of this method. +*/ void CustomElementGraphicPart::drawCross(const QPointF ¢er, QPainter *painter) { painter -> save(); @@ -64,10 +64,10 @@ void CustomElementGraphicPart::drawCross(const QPointF ¢er, QPainter *painte } /** - * @brief CustomElementGraphicPart::setLineStyle - * Set line style to ls - * @param ls - */ + @brief CustomElementGraphicPart::setLineStyle + Set line style to ls + @param ls +*/ void CustomElementGraphicPart::setLineStyle(const LineStyle ls) { if (_linestyle == ls) return; @@ -76,10 +76,10 @@ void CustomElementGraphicPart::setLineStyle(const LineStyle ls) } /** - * @brief CustomElementGraphicPart::setLineWeight - * Set line weight to lw - * @param lw - */ + @brief CustomElementGraphicPart::setLineWeight + Set line weight to lw + @param lw +*/ void CustomElementGraphicPart::setLineWeight(const LineWeight lw) { if (_lineweight == lw) return; @@ -88,9 +88,9 @@ void CustomElementGraphicPart::setLineWeight(const LineWeight lw) } /** - * @brief CustomElementGraphicPart::penWeight - * @return the weight of pen - */ + @brief CustomElementGraphicPart::penWeight + @return the weight of pen +*/ qreal CustomElementGraphicPart::penWeight() const { if (_lineweight == NoneWeight || _lineweight == ThinWeight) return 0; @@ -101,10 +101,10 @@ qreal CustomElementGraphicPart::penWeight() const } /** - * @brief CustomElementGraphicPart::setFilling - * Set filling to f - * @param f - */ + @brief CustomElementGraphicPart::setFilling + Set filling to f + @param f +*/ void CustomElementGraphicPart::setFilling(const Filling f) { if (_filling == f) return; @@ -113,10 +113,10 @@ void CustomElementGraphicPart::setFilling(const Filling f) } /** - * @brief CustomElementGraphicPart::setColor - * Set color to c - * @param c - */ + @brief CustomElementGraphicPart::setColor + Set color to c + @param c +*/ void CustomElementGraphicPart::setColor(const Color c) { if (_color == c) return; @@ -125,10 +125,10 @@ void CustomElementGraphicPart::setColor(const Color c) } /** - * @brief CustomElementGraphicPart::setAntialiased - * Set antialias to b - * @param b - */ + @brief CustomElementGraphicPart::setAntialiased + Set antialias to b + @param b +*/ void CustomElementGraphicPart::setAntialiased(const bool b) { if (_antialiased == b) return; @@ -137,13 +137,13 @@ void CustomElementGraphicPart::setAntialiased(const bool b) } /** - * @brief CustomElementGraphicPart::stylesToXml - * Write the curent style to xml element. - * The style are stored like this: - * name-of-style:value;name-of-style:value - * Each style separate by ; and name-style/value are separate by : - * @param qde : QDOmElement used to write the style. - */ + @brief CustomElementGraphicPart::stylesToXml + Write the curent style to xml element. + The style are stored like this: + name-of-style:value;name-of-style:value + Each style separate by ; and name-style/value are separate by : + @param qde : QDOmElement used to write the style. +*/ void CustomElementGraphicPart::stylesToXml(QDomElement &qde) const { QString css_like_styles; @@ -486,10 +486,10 @@ void CustomElementGraphicPart::stylesToXml(QDomElement &qde) const /** - * @brief CustomElementGraphicPart::stylesFromXml - * Read the style used by this, from a xml element. - * @param qde : QDomElement used to read the style - */ + @brief CustomElementGraphicPart::stylesFromXml + Read the style used by this, from a xml element. + @param qde : QDomElement used to read the style +*/ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde) { resetStyles(); @@ -849,10 +849,10 @@ void CustomElementGraphicPart::stylesFromXml(const QDomElement &qde) /** - * @brief CustomElementGraphicPart::resetStyles - * Reset the curent style to default, - * same style of default constructor - */ + @brief CustomElementGraphicPart::resetStyles + Reset the curent style to default, + same style of default constructor +*/ void CustomElementGraphicPart::resetStyles() { _linestyle = NormalStyle; @@ -863,10 +863,10 @@ void CustomElementGraphicPart::resetStyles() } /** - * @brief CustomElementGraphicPart::applyStylesToQPainter - * Apply the current style to the QPainter - * @param painter - */ + @brief CustomElementGraphicPart::applyStylesToQPainter + Apply the current style to the QPainter + @param painter +*/ void CustomElementGraphicPart::applyStylesToQPainter(QPainter &painter) const { //Get the pen and brush @@ -1216,12 +1216,12 @@ void CustomElementGraphicPart::applyStylesToQPainter(QPainter &painter) const } /** - * @brief CustomElementGraphicPart::drawShadowShape - * Draw a transparent blue shadow arround the shape of this item. - * The QPainterPathStroker used to draw shadows have a width of SHADOWS_HEIGHT - * Be carefull if penWeight of this item is to 0 the outline of strock is bigger of 0.5 - * @param painter : painter to use for draw this shadows - */ + @brief CustomElementGraphicPart::drawShadowShape + Draw a transparent blue shadow arround the shape of this item. + The QPainterPathStroker used to draw shadows have a width of SHADOWS_HEIGHT + Be carefull if penWeight of this item is to 0 the outline of strock is bigger of 0.5 + @param painter : painter to use for draw this shadows +*/ void CustomElementGraphicPart::drawShadowShape(QPainter *painter) { //@FIXME if pen weight is 0, the strock outline is SHADOWS_HEIGHT/2 + 0.5 @@ -1240,14 +1240,14 @@ void CustomElementGraphicPart::drawShadowShape(QPainter *painter) } /** - * @brief CustomElementGraphicPart::itemChange - * Reimplemented from QGraphicsObject. - * If the item position change call updateCurrentPartEditor() - * the change is always send to QGraphicsObject - * @param change - * @param value - * @return the returned value of QGraphicsObject::itemChange - */ + @brief CustomElementGraphicPart::itemChange + Reimplemented from QGraphicsObject. + If the item position change call updateCurrentPartEditor() + the change is always send to QGraphicsObject + @param change + @param value + @return the returned value of QGraphicsObject::itemChange +*/ QVariant CustomElementGraphicPart::itemChange(GraphicsItemChange change, const QVariant &value) { if (scene()) @@ -1258,11 +1258,11 @@ QVariant CustomElementGraphicPart::itemChange(GraphicsItemChange change, const Q } /** - * @brief CustomElementGraphicPart::hoverEnterEvent - * Reimplemented from QGraphicsObject. - * Set m_hovered to true - * @param event - */ + @brief CustomElementGraphicPart::hoverEnterEvent + Reimplemented from QGraphicsObject. + Set m_hovered to true + @param event +*/ void CustomElementGraphicPart::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { m_hovered = true; @@ -1270,11 +1270,11 @@ void CustomElementGraphicPart::hoverEnterEvent(QGraphicsSceneHoverEvent *event) } /** - * @brief CustomElementGraphicPart::hoverLeaveEvent - * Reimplemented from QGraphicsObject. - * Set m_hovered to false - * @param event - */ + @brief CustomElementGraphicPart::hoverLeaveEvent + Reimplemented from QGraphicsObject. + Set m_hovered to false + @param event +*/ void CustomElementGraphicPart::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { m_hovered = false; diff --git a/sources/editor/graphicspart/customelementgraphicpart.h b/sources/editor/graphicspart/customelementgraphicpart.h index 341c245c2..e4500a606 100644 --- a/sources/editor/graphicspart/customelementgraphicpart.h +++ b/sources/editor/graphicspart/customelementgraphicpart.h @@ -26,10 +26,12 @@ class QPainter; /** - * @brief The CustomElementGraphicPart class - * This class is the base for all home-made primitive like line, rectangle, ellipse etc.... - * It provides methods and enums to manage style attributes available for primitive (color, pen style, etc...) - */ + @brief The CustomElementGraphicPart class + This class is the base for all home-made primitive like line, + rectangle, ellipse etc.... + It provides methods and enums to manage style attributes available + for primitive (color, pen style, etc...) +*/ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPart { #define SHADOWS_HEIGHT 4.0 diff --git a/sources/editor/graphicspart/partarc.cpp b/sources/editor/graphicspart/partarc.cpp index a42bff805..344f6a8e0 100644 --- a/sources/editor/graphicspart/partarc.cpp +++ b/sources/editor/graphicspart/partarc.cpp @@ -23,11 +23,11 @@ /** - * @brief PartArc::PartArc - * Constructor - * @param editor : QETElementEditor of this part - * @param parent : parent item - */ + @brief PartArc::PartArc + Constructor + @param editor : QETElementEditor of this part + @param parent : parent item +*/ PartArc::PartArc(QETElementEditor *editor, QGraphicsItem *parent) : AbstractPartEllipse(editor, parent) { @@ -36,9 +36,9 @@ PartArc::PartArc(QETElementEditor *editor, QGraphicsItem *parent) : } /** - * @brief PartArc::~PartArc - * Destructor - */ + @brief PartArc::~PartArc + Destructor +*/ PartArc::~PartArc() { if(m_undo_command) delete m_undo_command; @@ -46,12 +46,12 @@ PartArc::~PartArc() } /** - * @brief PartArc::paint - * Draw this arc - * @param painter - * @param options - * @param widget - */ + @brief PartArc::paint + Draw this arc + @param painter + @param options + @param widget +*/ void PartArc::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { Q_UNUSED(widget); @@ -90,11 +90,11 @@ void PartArc::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, } /** - * @brief PartArc::toXml - * Export this arc in xml - * @param xml_document : Xml document to use for create the xml element. - * @return : an xml element that describe this arc - */ + @brief PartArc::toXml + Export this arc in xml + @param xml_document : Xml document to use for create the xml element. + @return : an xml element that describe this arc +*/ const QDomElement PartArc::toXml(QDomDocument &xml_document) const { QDomElement xml_element = xml_document.createElement("arc"); QPointF top_left(sceneTopLeft()); @@ -110,10 +110,10 @@ const QDomElement PartArc::toXml(QDomDocument &xml_document) const { } /** - * @brief PartArc::fromXml - * Import the properties of this arc from a xml element. - * @param qde : Xml document to use. - */ + @brief PartArc::fromXml + Import the properties of this arc from a xml element. + @param qde : Xml document to use. +*/ void PartArc::fromXml(const QDomElement &qde) { stylesFromXml(qde); m_rect = QRectF(mapFromScene(qde.attribute("x", "0").toDouble(), @@ -126,9 +126,9 @@ void PartArc::fromXml(const QDomElement &qde) { } /** - * @brief PartArc::shape - * @return the shape of this item - */ + @brief PartArc::shape + @return the shape of this item +*/ QPainterPath PartArc::shape() const { QPainterPath shape; @@ -155,10 +155,10 @@ QPainterPath PartArc::shadowShape() const } /** - * @brief PartArc::mouseReleaseEvent - * Handle mouse release event - * @param event - */ + @brief PartArc::mouseReleaseEvent + Handle mouse release event + @param event +*/ void PartArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton && event->buttonDownPos(Qt::LeftButton) == event->pos()) @@ -168,11 +168,11 @@ void PartArc::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief PartArc::itemChange - * @param change - * @param value - * @return - */ + @brief PartArc::itemChange + @param change + @param value + @return +*/ QVariant PartArc::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged && scene()) @@ -208,11 +208,11 @@ QVariant PartArc::itemChange(QGraphicsItem::GraphicsItemChange change, const QVa } /** - * @brief PartArc::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief PartArc::sceneEventFilter + @param watched + @param event + @return +*/ bool PartArc::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -248,8 +248,8 @@ bool PartArc::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } /** - * @brief PartArc::switchResizeMode - */ + @brief PartArc::switchResizeMode +*/ void PartArc::switchResizeMode() { if (m_resize_mode == 1) @@ -283,8 +283,8 @@ void PartArc::switchResizeMode() } /** - * @brief PartArc::adjusteHandlerPos - */ + @brief PartArc::adjusteHandlerPos +*/ void PartArc::adjusteHandlerPos() { if (m_handler_vector.isEmpty()) @@ -307,10 +307,10 @@ void PartArc::adjusteHandlerPos() } /** - * @brief PartArc::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief PartArc::handlerMousePressEvent + @param qghi + @param event +*/ void PartArc::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -346,10 +346,10 @@ void PartArc::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsScen } /** - * @brief PartArc::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief PartArc::handlerMouseMoveEvent + @param qghi + @param event +*/ void PartArc::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -380,10 +380,10 @@ void PartArc::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsScene } /** - * @brief PartArc::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief PartArc::handlerMouseReleaseEvent + @param qghi + @param event +*/ void PartArc::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -421,9 +421,9 @@ void PartArc::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSc } /** - * @brief PartArc::sceneSelectionChanged - * When the scene selection change, if there are several primitive selected, we remove the handler of this item - */ + @brief PartArc::sceneSelectionChanged + When the scene selection change, if there are several primitive selected, we remove the handler of this item +*/ void PartArc::sceneSelectionChanged() { if (this->isSelected() && scene()->selectedItems().size() == 1) @@ -433,9 +433,9 @@ void PartArc::sceneSelectionChanged() } /** - * @brief PartArc::addHandler - * Add handlers for this item - */ + @brief PartArc::addHandler + Add handlers for this item +*/ void PartArc::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -464,9 +464,9 @@ void PartArc::addHandler() } /** - * @brief PartArc::removeHandler - * Remove the handlers of this item - */ + @brief PartArc::removeHandler + Remove the handlers of this item +*/ void PartArc::removeHandler() { if (!m_handler_vector.isEmpty()) diff --git a/sources/editor/graphicspart/partarc.h b/sources/editor/graphicspart/partarc.h index b0c8a8816..29a3c93e0 100644 --- a/sources/editor/graphicspart/partarc.h +++ b/sources/editor/graphicspart/partarc.h @@ -24,10 +24,10 @@ class QPropertyUndoCommand; class QetGraphicsHandlerItem; /** - * @brief The PartArc class - * This class represents an elliptical arc primitive which may be used to - * compose the drawing of an electrical element within the element editor. - */ + @brief The PartArc class + This class represents an elliptical arc primitive which may be used to + compose the drawing of an electrical element within the element editor. +*/ class PartArc : public AbstractPartEllipse { Q_OBJECT @@ -42,9 +42,9 @@ class PartArc : public AbstractPartEllipse public: enum { Type = UserType + 1101 }; /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartArc. - * @return the QGraphicsItem type - */ + Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartArc. + @return the QGraphicsItem type + */ int type() const override { return Type; } void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override; diff --git a/sources/editor/graphicspart/partdynamictextfield.cpp b/sources/editor/graphicspart/partdynamictextfield.cpp index ee005048a..285cddbbe 100644 --- a/sources/editor/graphicspart/partdynamictextfield.cpp +++ b/sources/editor/graphicspart/partdynamictextfield.cpp @@ -58,22 +58,24 @@ QString PartDynamicTextField::xmlName() const { } /** - * @brief PartDynamicTextField::startUserTransformation - * @param initial_selection_rect - * Start the user-induced transformation, provided this primitive is contained - * within the initial_selection_rect bounding rectangle. - */ + @brief PartDynamicTextField::startUserTransformation + @param initial_selection_rect + Start the user-induced transformation, + provided this primitive is contained + within the initial_selection_rect bounding rectangle. +*/ void PartDynamicTextField::startUserTransformation(const QRectF &initial_selection_rect) { Q_UNUSED(initial_selection_rect) m_saved_point = pos(); // scene coordinates, no need to mapFromScene() } /** - * @brief PartDynamicTextField::handleUserTransformation - * @param initial_selection_rect - * @param new_selection_rect - * Handle the user-induced transformation from initial_selection_rect to new_selection_rect - */ + @brief PartDynamicTextField::handleUserTransformation + @param initial_selection_rect + @param new_selection_rect + Handle the user-induced transformation + from initial_selection_rect to new_selection_rect +*/ void PartDynamicTextField::handleUserTransformation( const QRectF &initial_selection_rect, const QRectF &new_selection_rect) @@ -84,10 +86,10 @@ void PartDynamicTextField::handleUserTransformation( } /** - * @brief PartDynamicTextField::toXml - * @param document - * @return - */ + @brief PartDynamicTextField::toXml + @param document + @return +*/ const QDomElement PartDynamicTextField::toXml(QDomDocument &dom_doc) const { QDomElement root_element = dom_doc.createElement(xmlName()); @@ -147,9 +149,9 @@ const QDomElement PartDynamicTextField::toXml(QDomDocument &dom_doc) const { } /** - * @brief PartDynamicTextField::fromXml - * @param element - */ + @brief PartDynamicTextField::fromXml + @param element +*/ void PartDynamicTextField::fromXml(const QDomElement &dom_elmt) { if (dom_elmt.tagName() != xmlName()) { qDebug() << "PartDynamicTextField::fromXml : Wrong tagg name"; @@ -215,10 +217,11 @@ void PartDynamicTextField::fromXml(const QDomElement &dom_elmt) { } /** - * @brief PartDynamicTextField::fromTextFieldXml - * Setup this text from the xml definition of a text field (The xml tagg of a text field is "input"); - * @param dom_element - */ + @brief PartDynamicTextField::fromTextFieldXml + Setup this text from the xml definition + of a text field (The xml tagg of a text field is "input"); + @param dom_element +*/ void PartDynamicTextField::fromTextFieldXml(const QDomElement &dom_element) { if(dom_element.tagName() != "input") @@ -254,18 +257,18 @@ void PartDynamicTextField::fromTextFieldXml(const QDomElement &dom_element) } /** - * @brief PartDynamicTextField::textFrom - * @return what the final text is created from. - */ + @brief PartDynamicTextField::textFrom + @return what the final text is created from. +*/ DynamicElementTextItem::TextFrom PartDynamicTextField::textFrom() const { return m_text_from; } /** - * @brief PartDynamicTextField::setTextFrom - * Set the final text is created from. - * @param text_from - */ + @brief PartDynamicTextField::setTextFrom + Set the final text is created from. + @param text_from +*/ void PartDynamicTextField::setTextFrom(DynamicElementTextItem::TextFrom text_from) { m_text_from = text_from; switch (m_text_from) { @@ -285,18 +288,18 @@ void PartDynamicTextField::setTextFrom(DynamicElementTextItem::TextFrom text_fro } /** - * @brief PartDynamicTextField::text - * @return the text of this text - */ + @brief PartDynamicTextField::text + @return the text of this text +*/ QString PartDynamicTextField::text() const { return m_text; } /** - * @brief PartDynamicTextField::setText - * Set the text of this text - * @param text - */ + @brief PartDynamicTextField::setText + Set the text of this text + @param text +*/ void PartDynamicTextField::setText(const QString &text) { m_text = text; setPlainText(m_text); @@ -311,18 +314,18 @@ void PartDynamicTextField::setInfoName(const QString &info_name) { } /** - * @brief PartDynamicTextField::infoName - * @return the info name of this text - */ + @brief PartDynamicTextField::infoName + @return the info name of this text +*/ QString PartDynamicTextField::infoName() const{ return m_info_name; } /** - * @brief PartDynamicTextField::setCompositeText - * Set the composite text of this text item to @text - * @param text - */ + @brief PartDynamicTextField::setCompositeText + Set the composite text of this text item to @text + @param text +*/ void PartDynamicTextField::setCompositeText(const QString &text) { m_composite_text = text; if(m_text_from == DynamicElementTextItem::CompositeText && elementScene()) @@ -331,26 +334,26 @@ void PartDynamicTextField::setCompositeText(const QString &text) { } /** - * @brief PartDynamicTextField::compositeText - * @return the composite text of this text - */ + @brief PartDynamicTextField::compositeText + @return the composite text of this text +*/ QString PartDynamicTextField::compositeText() const { return m_composite_text; } /** - * @brief PartDynamicTextField::setColor - * @param color set text color to color - */ + @brief PartDynamicTextField::setColor + @param color set text color to color +*/ void PartDynamicTextField::setColor(const QColor& color) { setDefaultTextColor(color); emit colorChanged(color); } /** - * @brief PartDynamicTextField::color - * @return The color of this text - */ + @brief PartDynamicTextField::color + @return The color of this text +*/ QColor PartDynamicTextField::color() const { return defaultTextColor(); } @@ -415,9 +418,9 @@ void PartDynamicTextField::setFont(const QFont &font) { } /** - * @brief PartDynamicTextField::mouseMoveEvent - * @param event - */ + @brief PartDynamicTextField::mouseMoveEvent + @param event +*/ void PartDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if((event -> buttons() & Qt::LeftButton) && (flags() & QGraphicsItem::ItemIsMovable)) { QPointF pos = event -> scenePos() + (m_origine_pos - event -> buttonDownScenePos(Qt::LeftButton)); @@ -428,9 +431,9 @@ void PartDynamicTextField::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief PartDynamicTextField::mousePressEvent - * @param event - */ + @brief PartDynamicTextField::mousePressEvent + @param event +*/ void PartDynamicTextField::mousePressEvent(QGraphicsSceneMouseEvent *event) { if(event -> button() == Qt::LeftButton) m_origine_pos = this -> pos(); @@ -439,9 +442,9 @@ void PartDynamicTextField::mousePressEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief PartDynamicTextField::mouseReleaseEvent - * @param event - */ + @brief PartDynamicTextField::mouseReleaseEvent + @param event +*/ void PartDynamicTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if((event -> button() & Qt::LeftButton) && (flags() & QGraphicsItem::ItemIsMovable) && @@ -457,11 +460,11 @@ void PartDynamicTextField::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief PartDynamicTextField::itemChange - * @param change - * @param value - * @return - */ + @brief PartDynamicTextField::itemChange + @param change + @param value + @return +*/ QVariant PartDynamicTextField::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == QGraphicsItem::ItemPositionHasChanged || change == QGraphicsItem::ItemSceneHasChanged) { updateCurrentPartEditor(); @@ -525,9 +528,10 @@ void PartDynamicTextField::paint(QPainter *painter, const QStyleOptionGraphicsIt } /** - * @brief PartDynamicTextField::elementInfoChanged - * Used to up to date this text field, when the element information (see elementScene) changed - */ + @brief PartDynamicTextField::elementInfoChanged + Used to up to date this text field, + when the element information (see elementScene) changed +*/ void PartDynamicTextField::elementInfoChanged() { if(!elementScene()) return; diff --git a/sources/editor/graphicspart/partdynamictextfield.h b/sources/editor/graphicspart/partdynamictextfield.h index 509407e23..2ed40a123 100644 --- a/sources/editor/graphicspart/partdynamictextfield.h +++ b/sources/editor/graphicspart/partdynamictextfield.h @@ -23,12 +23,13 @@ #include "dynamicelementtextitem.h" /** - * @brief The PartDynamicTextField class - * This class represents an editable dynamic text field which may be used to compose the - * drawing of an electrical element within the element editor. - * The field will remain editable once the element is added onto - * a diagram - */ + @brief The PartDynamicTextField class + This class represents an editable dynamic text field + which may be used to compose the + drawing of an electrical element within the element editor. + The field will remain editable once the element is added onto + a diagram +*/ class PartDynamicTextField : public QGraphicsTextItem, public CustomElementPart { Q_OBJECT diff --git a/sources/editor/graphicspart/partellipse.cpp b/sources/editor/graphicspart/partellipse.cpp index c6fbdcba4..8e30f2636 100644 --- a/sources/editor/graphicspart/partellipse.cpp +++ b/sources/editor/graphicspart/partellipse.cpp @@ -22,20 +22,20 @@ #include "QetGraphicsItemModeler/qetgraphicshandlerutility.h" /** - * @brief PartEllipse::PartEllipse - * Constructor - * @param editor : QETElementEditor of this part - * @param parent : parent item - */ + @brief PartEllipse::PartEllipse + Constructor + @param editor : QETElementEditor of this part + @param parent : parent item +*/ PartEllipse::PartEllipse(QETElementEditor *editor, QGraphicsItem *parent) : AbstractPartEllipse(editor, parent), m_undo_command(nullptr) {} /** - * @brief PartEllipse::~PartEllipse - * Destructor - */ + @brief PartEllipse::~PartEllipse + Destructor +*/ PartEllipse::~PartEllipse() { if(m_undo_command) delete m_undo_command; @@ -43,12 +43,12 @@ PartEllipse::~PartEllipse() } /** - * @brief PartEllipse::paint - * Draw this ellpise - * @param painter - * @param options - * @param widget - */ + @brief PartEllipse::paint + Draw this ellpise + @param painter + @param options + @param widget +*/ void PartEllipse::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { Q_UNUSED(widget); @@ -71,11 +71,11 @@ void PartEllipse::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio } /** - * @brief PartEllipse::toXml - * Export this ellipse in xml - * @param xml_document : Xml document to use for create the xml element. - * @return : an xml element that describe this ellipse - */ + @brief PartEllipse::toXml + Export this ellipse in xml + @param xml_document : Xml document to use for create the xml element. + @return : an xml element that describe this ellipse +*/ const QDomElement PartEllipse::toXml(QDomDocument &xml_document) const { QDomElement xml_element; @@ -101,10 +101,10 @@ const QDomElement PartEllipse::toXml(QDomDocument &xml_document) const } /** - * @brief PartEllipse::fromXml - * Import the properties of this ellipse from a xml element. - * @param qde : Xml document to use. - */ + @brief PartEllipse::fromXml + Import the properties of this ellipse from a xml element. + @param qde : Xml document to use. +*/ void PartEllipse::fromXml(const QDomElement &qde) { stylesFromXml(qde); @@ -124,9 +124,9 @@ void PartEllipse::fromXml(const QDomElement &qde) } /** - * @brief PartEllipse::shape - * @return the shape of this item - */ + @brief PartEllipse::shape + @return the shape of this item +*/ QPainterPath PartEllipse::shape() const { QPainterPath shape; @@ -151,10 +151,10 @@ QPainterPath PartEllipse::shadowShape() const } /** - * @brief PartEllipse::mouseReleaseEvent - * Handle mouse release event - * @param event - */ + @brief PartEllipse::mouseReleaseEvent + Handle mouse release event + @param event +*/ void PartEllipse::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton && event->buttonDownPos(Qt::LeftButton) == event->pos()) @@ -164,11 +164,11 @@ void PartEllipse::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief PartEllipse::itemChange - * @param change - * @param value - * @return - */ + @brief PartEllipse::itemChange + @param change + @param value + @return +*/ QVariant PartEllipse::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged && scene()) @@ -204,11 +204,11 @@ QVariant PartEllipse::itemChange(QGraphicsItem::GraphicsItemChange change, const } /** - * @brief PartEllipse::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief PartEllipse::sceneEventFilter + @param watched + @param event + @return +*/ bool PartEllipse::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -260,8 +260,8 @@ void PartEllipse::switchResizeMode() } /** - * @brief PartEllipse::adjusteHandlerPos - */ + @brief PartEllipse::adjusteHandlerPos +*/ void PartEllipse::adjusteHandlerPos() { if (m_handler_vector.isEmpty()) @@ -278,10 +278,10 @@ void PartEllipse::adjusteHandlerPos() } /** - * @brief PartEllipse::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief PartEllipse::handlerMousePressEvent + @param qghi + @param event +*/ void PartEllipse::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -294,10 +294,10 @@ void PartEllipse::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphics } /** - * @brief PartEllipse::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief PartEllipse::handlerMouseMoveEvent + @param qghi + @param event +*/ void PartEllipse::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -316,10 +316,10 @@ void PartEllipse::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsS } /** - * @brief PartEllipse::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief PartEllipse::handlerMouseReleaseEvent + @param qghi + @param event +*/ void PartEllipse::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -332,9 +332,9 @@ void PartEllipse::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphi } /** - * @brief PartEllipse::sceneSelectionChanged - * When the scene selection change, if there are several primitive selected, we remove the handler of this item - */ + @brief PartEllipse::sceneSelectionChanged + When the scene selection change, if there are several primitive selected, we remove the handler of this item +*/ void PartEllipse::sceneSelectionChanged() { if (this->isSelected() && scene()->selectedItems().size() == 1) @@ -344,9 +344,9 @@ void PartEllipse::sceneSelectionChanged() } /** - * @brief PartEllipse::addHandler - * Add handlers for this item - */ + @brief PartEllipse::addHandler + Add handlers for this item +*/ void PartEllipse::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -368,9 +368,9 @@ void PartEllipse::addHandler() } /** - * @brief PartEllipse::removeHandler - * Remove the handlers of this item - */ + @brief PartEllipse::removeHandler + Remove the handlers of this item +*/ void PartEllipse::removeHandler() { if (!m_handler_vector.isEmpty()) diff --git a/sources/editor/graphicspart/partellipse.h b/sources/editor/graphicspart/partellipse.h index b7f42dcf7..477db5111 100644 --- a/sources/editor/graphicspart/partellipse.h +++ b/sources/editor/graphicspart/partellipse.h @@ -23,10 +23,10 @@ class QPropertyUndoCommand; /** - * @brief The PartEllipse class - * This class represents an ellipse primitive which may be used to compose the - * drawing of an electrical element within the element editor. - */ + @brief The PartEllipse class + This class represents an ellipse primitive which may be used to compose the + drawing of an electrical element within the element editor. +*/ class PartEllipse : public AbstractPartEllipse { Q_OBJECT @@ -43,9 +43,9 @@ class PartEllipse : public AbstractPartEllipse public: enum { Type = UserType + 1103 }; /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartEllipse. - * @return the QGraphicsItem type - */ + Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartEllipse. + @return the QGraphicsItem type + */ int type() const override { return Type; } void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override; diff --git a/sources/editor/graphicspart/partline.cpp b/sources/editor/graphicspart/partline.cpp index fc6d0746e..c6cd22339 100644 --- a/sources/editor/graphicspart/partline.cpp +++ b/sources/editor/graphicspart/partline.cpp @@ -23,11 +23,11 @@ /** - * @brief PartLine::PartLine - * Constructor - * @param editor : QETElementEditor of this part - * @param parent : parent item - */ + @brief PartLine::PartLine + Constructor + @param editor : QETElementEditor of this part + @param parent : parent item +*/ PartLine::PartLine(QETElementEditor *editor, QGraphicsItem *parent) : CustomElementGraphicPart(editor, parent), first_end(Qet::None), @@ -47,10 +47,10 @@ PartLine::~PartLine() } /** - * @brief PartLine::requiredLengthForEndType - * @param end_type - * @return the number of "length" needed to draw a extremity of type Qet::EndType. - */ + @brief PartLine::requiredLengthForEndType + @param end_type + @return the number of "length" needed to draw a extremity of type Qet::EndType. +*/ uint PartLine::requiredLengthForEndType(const Qet::EndType &end_type) { uint length_count_required = 0; @@ -64,12 +64,12 @@ uint PartLine::requiredLengthForEndType(const Qet::EndType &end_type) } /** - * @brief PartLine::paint - * Draw this line - * @param painter - * @param options - * @param widget - */ + @brief PartLine::paint + Draw this line + @param painter + @param options + @param widget +*/ void PartLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { Q_UNUSED(widget); @@ -97,11 +97,11 @@ void PartLine::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, } /** - * @brief PartLine::toXml - * Export this line in xml - * @param xml_document : Xml document to use for create the xml element. - * @return an xml element that describe this line - */ + @brief PartLine::toXml + Export this line in xml + @param xml_document : Xml document to use for create the xml element. + @return an xml element that describe this line +*/ const QDomElement PartLine::toXml(QDomDocument &xml_document) const { QPointF p1(sceneP1()); @@ -122,10 +122,10 @@ const QDomElement PartLine::toXml(QDomDocument &xml_document) const } /** - * @brief PartLine::fromXml - * Import the properties of this line from a xml element. - * @param qde : Xml document to use - */ + @brief PartLine::fromXml + Import the properties of this line from a xml element. + @param qde : Xml document to use +*/ void PartLine::fromXml(const QDomElement &qde) { stylesFromXml(qde); m_line = QLineF(mapFromScene(qde.attribute("x1", "0").toDouble(), @@ -140,11 +140,11 @@ void PartLine::fromXml(const QDomElement &qde) { } /** - * @brief PartLine::itemChange - * @param change - * @param value - * @return - */ + @brief PartLine::itemChange + @param change + @param value + @return +*/ QVariant PartLine::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged && scene()) @@ -180,11 +180,11 @@ QVariant PartLine::itemChange(QGraphicsItem::GraphicsItemChange change, const QV } /** - * @brief PartLine::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief PartLine::sceneEventFilter + @param watched + @param event + @return +*/ bool PartLine::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -220,9 +220,9 @@ bool PartLine::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } /** - * @brief PartLine::adjusteHandlerPos - * Adjust the position of the handler item - */ + @brief PartLine::adjusteHandlerPos + Adjust the position of the handler item +*/ void PartLine::adjusteHandlerPos() { if(m_handler_vector.isEmpty()) @@ -240,10 +240,10 @@ void PartLine::adjusteHandlerPos() } /** - * @brief PartLine::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief PartLine::handlerMousePressEvent + @param qghi + @param event +*/ void PartLine::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -256,10 +256,10 @@ void PartLine::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSce } /** - * @brief PartLine::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief PartLine::handlerMouseMoveEvent + @param qghi + @param event +*/ void PartLine::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -279,10 +279,10 @@ void PartLine::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsScen } /** - * @brief PartLine::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief PartLine::handlerMouseReleaseEvent + @param qghi + @param event +*/ void PartLine::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -295,9 +295,9 @@ void PartLine::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsS } /** - * @brief PartLine::sceneSelectionChanged - * When the scene selection change, if there are several primitive selected, we remove the handler of this item - */ + @brief PartLine::sceneSelectionChanged + When the scene selection change, if there are several primitive selected, we remove the handler of this item +*/ void PartLine::sceneSelectionChanged() { if (this->isSelected() && scene()->selectedItems().size() == 1) @@ -307,9 +307,9 @@ void PartLine::sceneSelectionChanged() } /** - * @brief PartLine::addHandler - * Add handlers for this item - */ + @brief PartLine::addHandler + Add handlers for this item +*/ void PartLine::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -330,9 +330,9 @@ void PartLine::addHandler() } /** - * @brief PartLine::removeHandler - * Remove the handlers of this item - */ + @brief PartLine::removeHandler + Remove the handlers of this item +*/ void PartLine::removeHandler() { if (!m_handler_vector.isEmpty()) @@ -343,25 +343,25 @@ void PartLine::removeHandler() } /** - * @brief PartLine::sceneP1 - * @return the point p1 in scene coordinate - */ + @brief PartLine::sceneP1 + @return the point p1 in scene coordinate +*/ QPointF PartLine::sceneP1() const { return(mapToScene(m_line.p1())); } /** - * @brief PartLine::sceneP2 - * @return the point p2 in scen coordinate - */ + @brief PartLine::sceneP2 + @return the point p2 in scen coordinate +*/ QPointF PartLine::sceneP2() const { return(mapToScene(m_line.p2())); } /** - * @brief PartLine::shape - * @return the shape of this item - */ + @brief PartLine::shape + @return the shape of this item +*/ QPainterPath PartLine::shape() const { QPainterPath shape; @@ -404,10 +404,10 @@ QPainterPath PartLine::shadowShape() const } /** - * @brief PartLine::fourShapePoints - * @return a list with the two points that delimite the line - * + the four points surrounding these two points - */ + @brief PartLine::fourShapePoints + @return a list with the two points that delimite the line + + the four points surrounding these two points +*/ QList PartLine::fourShapePoints() const { const qreal marge = 2.0; @@ -452,9 +452,9 @@ QList PartLine::fourShapePoints() const } /** - * @brief PartLine::firstEndCircleRect - * @return the rectangle bordering the entirety of the first extremity - */ + @brief PartLine::firstEndCircleRect + @return the rectangle bordering the entirety of the first extremity +*/ QRectF PartLine::firstEndCircleRect() const { QList interesting_points = fourEndPoints(m_line.p1(), @@ -470,9 +470,9 @@ QRectF PartLine::firstEndCircleRect() const } /** - * @brief PartLine::secondEndCircleRect - * @return the rectangle bordering the entirety of the second extremity - */ + @brief PartLine::secondEndCircleRect + @return the rectangle bordering the entirety of the second extremity +*/ QRectF PartLine::secondEndCircleRect() const { QList interesting_points = fourEndPoints(m_line.p2(), m_line.p1(), @@ -487,13 +487,13 @@ QRectF PartLine::secondEndCircleRect() const { } /** - * @brief PartLine::debugPaint - * Display several composante of the drawing - * -the bounding rect - * -special points at each extremity - * -the quadrature of the circle at each extremity, even if itself is an other type - * @param painter - */ + @brief PartLine::debugPaint + Display several composante of the drawing + -the bounding rect + -special points at each extremity + -the quadrature of the circle at each extremity, even if itself is an other type + @param painter +*/ void PartLine::debugPaint(QPainter *painter) { painter -> save(); @@ -516,9 +516,9 @@ void PartLine::debugPaint(QPainter *painter) } /** - * @brief PartLine::boundingRect - * @return the bounding rect of this part - */ + @brief PartLine::boundingRect + @return the bounding rect of this part +*/ QRectF PartLine::boundingRect() const { QRectF bound; @@ -539,31 +539,31 @@ QRectF PartLine::boundingRect() const } /** - * @brief PartLine::isUseless - * @return true if this part is irrelevant and does not deserve to be Retained / registered. - * A line is relevant when is two point is different - */ + @brief PartLine::isUseless + @return true if this part is irrelevant and does not deserve to be Retained / registered. + A line is relevant when is two point is different +*/ bool PartLine::isUseless() const { return(m_line.p1() == m_line.p2()); } /** - * @brief PartLine::sceneGeometricRect - * @return the minimum, margin-less rectangle this part can fit into, in scene - * coordinates. It is different from boundingRect() because it is not supposed - * to imply any margin, and it is different from shape because it is a regular - * rectangle, not a complex shape. - */ + @brief PartLine::sceneGeometricRect + @return the minimum, margin-less rectangle this part can fit into, in scene + coordinates. It is different from boundingRect() because it is not supposed + to imply any margin, and it is different from shape because it is a regular + rectangle, not a complex shape. +*/ QRectF PartLine::sceneGeometricRect() const { return(QRectF(sceneP1(), sceneP2())); } /** - * @brief PartLine::startUserTransformation - * Start the user-induced transformation, provided this primitive is contained - * within the \a initial_selection_rect bounding rectangle. - * @param initial_selection_rect - */ + @brief PartLine::startUserTransformation + Start the user-induced transformation, provided this primitive is contained + within the \a initial_selection_rect bounding rectangle. + @param initial_selection_rect +*/ void PartLine::startUserTransformation(const QRectF &initial_selection_rect) { Q_UNUSED(initial_selection_rect) @@ -572,11 +572,11 @@ void PartLine::startUserTransformation(const QRectF &initial_selection_rect) } /** - * @brief PartLine::handleUserTransformation - * Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect - * @param initial_selection_rect - * @param new_selection_rect - */ + @brief PartLine::handleUserTransformation + Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect + @param initial_selection_rect + @param new_selection_rect +*/ void PartLine::handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) { QList mapped_points = mapPoints(initial_selection_rect, new_selection_rect, saved_points_); @@ -585,19 +585,19 @@ void PartLine::handleUserTransformation(const QRectF &initial_selection_rect, co } /** - * @brief PartLine::fourEndPoints - * Return the four interesting point needed to draw the shape - * at extremity of line (circle, diamond, arrow, triangle) - * This points are in order : + @brief PartLine::fourEndPoints + Return the four interesting point needed to draw the shape + at extremity of line (circle, diamond, arrow, triangle) + This points are in order : * O : point on the line, at a distance 'length' of the extremity * A : point on the line at a 'length' of 2x the extremity length * B : point at a distance of length O - O is the projection of B on the line * C : point at a distance of length O - O is the projection of C on the line - * @param end_point : The concerned extremity - * @param other_point : other needed point to define the line - * @param length : length to use between the extremity and the point O - * @return - */ + @param end_point : The concerned extremity + @param other_point : other needed point to define the line + @param length : length to use between the extremity and the point O + @return +*/ QList PartLine::fourEndPoints(const QPointF &end_point, const QPointF &other_point, const qreal &length) { //Vector and length of the line @@ -665,12 +665,12 @@ void PartLine::setSecondEndLength(const qreal &l) } /** - * @brief PartLine::path - * @return this line has a QPainterPath. - * It's notably use when this line have an end type (circle, triangle etc....), - * because return a QPainterPath with end already draw. - * Else if there isn't an end type get P1 and P2 of line is better (faster). - */ + @brief PartLine::path + @return this line has a QPainterPath. + It's notably use when this line have an end type (circle, triangle etc....), + because return a QPainterPath with end already draw. + Else if there isn't an end type get P1 and P2 of line is better (faster). +*/ QPainterPath PartLine::path() const { QPainterPath path; diff --git a/sources/editor/graphicspart/partline.h b/sources/editor/graphicspart/partline.h index 9c2d858d7..148599ed1 100644 --- a/sources/editor/graphicspart/partline.h +++ b/sources/editor/graphicspart/partline.h @@ -63,9 +63,9 @@ class PartLine : public CustomElementGraphicPart enum { Type = UserType + 1104 }; /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartLine. - * @return the QGraphicsItem type - */ + Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartLine. + @return the QGraphicsItem type + */ int type() const override { return Type; } void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override; QString name() const override { return(QObject::tr("ligne", "element part name")); } diff --git a/sources/editor/graphicspart/partpolygon.cpp b/sources/editor/graphicspart/partpolygon.cpp index 4767337ca..70afc569a 100644 --- a/sources/editor/graphicspart/partpolygon.cpp +++ b/sources/editor/graphicspart/partpolygon.cpp @@ -25,11 +25,11 @@ /** - * @brief PartPolygon::PartPolygon - * Constructor - * @param editor : editor of this item - * @param parent : parent item - */ + @brief PartPolygon::PartPolygon + Constructor + @param editor : editor of this item + @param parent : parent item +*/ PartPolygon::PartPolygon(QETElementEditor *editor, QGraphicsItem *parent) : CustomElementGraphicPart(editor, parent), m_closed(false), @@ -44,8 +44,8 @@ PartPolygon::PartPolygon(QETElementEditor *editor, QGraphicsItem *parent) : } /** - * @brief PartPolygon::~PartPolygon - */ + @brief PartPolygon::~PartPolygon +*/ PartPolygon::~PartPolygon() { if(m_undo_command) delete m_undo_command; @@ -53,12 +53,12 @@ PartPolygon::~PartPolygon() } /** - * @brief PartPolygon::paint - * Draw this polygon - * @param painter - * @param options - * @param widget - */ + @brief PartPolygon::paint + Draw this polygon + @param painter + @param options + @param widget +*/ void PartPolygon::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { Q_UNUSED(widget); @@ -78,10 +78,10 @@ void PartPolygon::paint(QPainter *painter, const QStyleOptionGraphicsItem *optio } /** - * @brief PartPolygon::fromXml - * Import the properties of this polygon from a xml element - * @param qde : Xml document to use - */ + @brief PartPolygon::fromXml + Import the properties of this polygon from a xml element + @param qde : Xml document to use +*/ void PartPolygon::fromXml(const QDomElement &qde) { stylesFromXml(qde); @@ -108,11 +108,11 @@ void PartPolygon::fromXml(const QDomElement &qde) } /** - * @brief PartPolygon::toXml - * Export this polygin in xml - * @param xml_document : Xml document to use for create the xml element - * @return an xml element that describe this polygon - */ + @brief PartPolygon::toXml + Export this polygin in xml + @param xml_document : Xml document to use for create the xml element + @return an xml element that describe this polygon +*/ const QDomElement PartPolygon::toXml(QDomDocument &xml_document) const { QDomElement xml_element = xml_document.createElement("polygon"); @@ -129,10 +129,10 @@ const QDomElement PartPolygon::toXml(QDomDocument &xml_document) const } /** - * @brief PartPolygon::isUseless - * @return true if this part is irrelevant and does not deserve to be Retained / registered. - * A polygon is relevant when he have 2 differents points - */ + @brief PartPolygon::isUseless + @return true if this part is irrelevant and does not deserve to be Retained / registered. + A polygon is relevant when he have 2 differents points +*/ bool PartPolygon::isUseless() const { if (m_polygon.count() < 2) return(true); @@ -144,22 +144,22 @@ bool PartPolygon::isUseless() const } /** - * @brief PartPolygon::sceneGeometricRect - * @return the minimum, margin-less rectangle this part can fit into, in scene - * coordinates. It is different from boundingRect() because it is not supposed - * to imply any margin, and it is different from shape because it is a regular - * rectangle, not a complex shape. - */ + @brief PartPolygon::sceneGeometricRect + @return the minimum, margin-less rectangle this part can fit into, in scene + coordinates. It is different from boundingRect() because it is not supposed + to imply any margin, and it is different from shape because it is a regular + rectangle, not a complex shape. +*/ QRectF PartPolygon::sceneGeometricRect() const { return(mapToScene(m_polygon.boundingRect()).boundingRect()); } /** - * @brief PartPolygon::startUserTransformation - * Start the user-induced transformation, provided this primitive is contained - * within the initial_selection_rect bounding rectangle. - * @param initial_selection_rect - */ + @brief PartPolygon::startUserTransformation + Start the user-induced transformation, provided this primitive is contained + within the initial_selection_rect bounding rectangle. + @param initial_selection_rect +*/ void PartPolygon::startUserTransformation(const QRectF &initial_selection_rect) { Q_UNUSED(initial_selection_rect) @@ -167,11 +167,11 @@ void PartPolygon::startUserTransformation(const QRectF &initial_selection_rect) } /** - * @brief PartPolygon::handleUserTransformation - * Handle the user-induced transformation from initial_selection_rect to new_selection_rect - * @param initial_selection_rect - * @param new_selection_rect - */ + @brief PartPolygon::handleUserTransformation + Handle the user-induced transformation from initial_selection_rect to new_selection_rect + @param initial_selection_rect + @param new_selection_rect +*/ void PartPolygon::handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) { QList mapped_points = mapPoints(initial_selection_rect, new_selection_rect, saved_points_); @@ -179,29 +179,29 @@ void PartPolygon::handleUserTransformation(const QRectF &initial_selection_rect, } /** - * @brief PartPolygon::preferredScalingMethod - * This method is called by the decorator when it needs to determine the best - * way to interactively scale a primitive. It is typically called when only a - * single primitive is being scaled. - * @return : This reimplementation systematically returns QET::RoundScaleRatios. - */ + @brief PartPolygon::preferredScalingMethod + This method is called by the decorator when it needs to determine the best + way to interactively scale a primitive. It is typically called when only a + single primitive is being scaled. + @return : This reimplementation systematically returns QET::RoundScaleRatios. +*/ QET::ScalingMethod PartPolygon::preferredScalingMethod() const { return(QET::RoundScaleRatios); } /** - * @brief PartPolygon::polygon - * @return the item's polygon, or an empty polygon if no polygon has been set. - */ + @brief PartPolygon::polygon + @return the item's polygon, or an empty polygon if no polygon has been set. +*/ QPolygonF PartPolygon::polygon() const { return m_polygon; } /** - * @brief PartPolygon::setPolygon - * Sets the item's polygon to be the given polygon. - * @param polygon - */ + @brief PartPolygon::setPolygon + Sets the item's polygon to be the given polygon. + @param polygon +*/ void PartPolygon::setPolygon(const QPolygonF &polygon) { if (m_polygon == polygon) return; @@ -212,10 +212,10 @@ void PartPolygon::setPolygon(const QPolygonF &polygon) } /** - * @brief PartPolygon::addPoint - * Add new point to polygon - * @param point - */ + @brief PartPolygon::addPoint + Add new point to polygon + @param point +*/ void PartPolygon::addPoint(const QPointF &point) { prepareGeometryChange(); @@ -223,10 +223,10 @@ void PartPolygon::addPoint(const QPointF &point) } /** - * @brief PartPolygon::setLastPoint - * Set the last point of polygon to @point - * @param point - */ + @brief PartPolygon::setLastPoint + Set the last point of polygon to @point + @param point +*/ void PartPolygon::setLastPoint(const QPointF &point) { if (m_polygon.size()) @@ -237,9 +237,9 @@ void PartPolygon::setLastPoint(const QPointF &point) } /** - * @brief PartPolygon::removeLastPoint - * Remove the last point of polygon - */ + @brief PartPolygon::removeLastPoint + Remove the last point of polygon +*/ void PartPolygon::removeLastPoint() { if (m_polygon.size()) @@ -258,11 +258,11 @@ void PartPolygon::setClosed(bool close) } /** - * @brief PartPolygon::setHandlerColor - * Set the handler at pos @pos (in polygon coordinate) to color @color. - * @param pos - * @param color - */ + @brief PartPolygon::setHandlerColor + Set the handler at pos @pos (in polygon coordinate) to color @color. + @param pos + @param color +*/ void PartPolygon::setHandlerColor(QPointF pos, const QColor &color) { for (QetGraphicsHandlerItem *qghi : m_handler_vector) { @@ -273,8 +273,8 @@ void PartPolygon::setHandlerColor(QPointF pos, const QColor &color) } /** - * @brief PartPolygon::resetAllHandlerColor - * Reset the color of every handlers + @brief PartPolygon::resetAllHandlerColor + Reset the color of every handlers */ void PartPolygon::resetAllHandlerColor() { @@ -284,11 +284,11 @@ void PartPolygon::resetAllHandlerColor() } /** - * @brief PartPolygon::itemChange - * @param change - * @param value - * @return - */ + @brief PartPolygon::itemChange + @param change + @param value + @return +*/ QVariant PartPolygon::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged && scene()) @@ -324,11 +324,11 @@ QVariant PartPolygon::itemChange(QGraphicsItem::GraphicsItemChange change, const } /** - * @brief PartPolygon::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief PartPolygon::sceneEventFilter + @param watched + @param event + @return +*/ bool PartPolygon::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -388,8 +388,8 @@ void PartPolygon::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) } /** - * @brief PartPolygon::adjusteHandlerPos - */ + @brief PartPolygon::adjusteHandlerPos +*/ void PartPolygon::adjusteHandlerPos() { if(m_handler_vector.isEmpty()) @@ -410,10 +410,10 @@ void PartPolygon::adjusteHandlerPos() } /** - * @brief PartPolygon::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief PartPolygon::handlerMousePressEvent + @param qghi + @param event +*/ void PartPolygon::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -424,10 +424,10 @@ void PartPolygon::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphics } /** - * @brief PartPolygon::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief PartPolygon::handlerMouseMoveEvent + @param qghi + @param event +*/ void PartPolygon::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -444,10 +444,10 @@ void PartPolygon::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsS } /** - * @brief PartPolygon::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief PartPolygon::handlerMouseReleaseEvent + @param qghi + @param event +*/ void PartPolygon::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -460,9 +460,9 @@ void PartPolygon::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphi } /** - * @brief PartPolygon::sceneSelectionChanged - * When the scene selection change, if there are several primitive selected, we remove the handler of this item - */ + @brief PartPolygon::sceneSelectionChanged + When the scene selection change, if there are several primitive selected, we remove the handler of this item +*/ void PartPolygon::sceneSelectionChanged() { if (this->isSelected() && scene()->selectedItems().size() == 1) @@ -472,9 +472,9 @@ void PartPolygon::sceneSelectionChanged() } /** - * @brief PartPolygon::addHandler - * Add handlers for this item - */ + @brief PartPolygon::addHandler + Add handlers for this item +*/ void PartPolygon::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -492,9 +492,9 @@ void PartPolygon::addHandler() } /** - * @brief PartPolygon::removeHandler - * Remove the handlers of this item - */ + @brief PartPolygon::removeHandler + Remove the handlers of this item +*/ void PartPolygon::removeHandler() { if (!m_handler_vector.isEmpty()) @@ -505,9 +505,9 @@ void PartPolygon::removeHandler() } /** - * @brief PartPolygon::insertPoint - * Insert a point in this polygone - */ + @brief PartPolygon::insertPoint + Insert a point in this polygone +*/ void PartPolygon::insertPoint() { QPolygonF new_polygon = QetGraphicsHandlerUtility::polygonForInsertPoint(m_polygon, m_closed, elementScene()->snapToGrid(m_context_menu_pos)); @@ -522,9 +522,9 @@ void PartPolygon::insertPoint() } /** - * @brief PartPolygon::removePoint - * remove a point on this polygon - */ + @brief PartPolygon::removePoint + remove a point on this polygon +*/ void PartPolygon::removePoint() { if (m_handler_vector.size() == 2) @@ -556,9 +556,9 @@ void PartPolygon::removePoint() } /** - * @brief PartPolygon::shape - * @return the shape of this item - */ + @brief PartPolygon::shape + @return the shape of this item +*/ QPainterPath PartPolygon::shape() const { QPainterPath shape; @@ -589,9 +589,9 @@ QPainterPath PartPolygon::shadowShape() const } /** - * @brief PartPolygon::boundingRect - * @return the bounding rect of this item - */ + @brief PartPolygon::boundingRect + @return the bounding rect of this item +*/ QRectF PartPolygon::boundingRect() const { QRectF r = m_polygon.boundingRect(); diff --git a/sources/editor/graphicspart/partpolygon.h b/sources/editor/graphicspart/partpolygon.h index e10eadff1..4a7891459 100644 --- a/sources/editor/graphicspart/partpolygon.h +++ b/sources/editor/graphicspart/partpolygon.h @@ -26,10 +26,10 @@ class QetGraphicsHandlerItem; class QAction; /** - * @brief The PartPolygon class - * This class represents a polygon primitive which may be used to compose the - * drawing of an electrical element within the element editor. - */ + @brief The PartPolygon class + This class represents a polygon primitive which may be used to compose the + drawing of an electrical element within the element editor. +*/ class PartPolygon : public CustomElementGraphicPart { Q_OBJECT diff --git a/sources/editor/graphicspart/partrectangle.cpp b/sources/editor/graphicspart/partrectangle.cpp index 5f17b7252..152bf659f 100644 --- a/sources/editor/graphicspart/partrectangle.cpp +++ b/sources/editor/graphicspart/partrectangle.cpp @@ -22,29 +22,29 @@ #include "QetGraphicsItemModeler/qetgraphicshandlerutility.h" /** - * @brief PartRectangle::PartRectangle - * Constructor - * @param editor the QETElementEditor of this item - * @param parent parent item - */ + @brief PartRectangle::PartRectangle + Constructor + @param editor the QETElementEditor of this item + @param parent parent item +*/ PartRectangle::PartRectangle(QETElementEditor *editor, QGraphicsItem *parent) : CustomElementGraphicPart(editor, parent) {} /** - * @brief PartRectangle::~PartRectangle - */ + @brief PartRectangle::~PartRectangle +*/ PartRectangle::~PartRectangle() { removeHandler(); } /** - * @brief PartRectangle::paint - * Draw this Rectangle - * @param painter - * @param options - * @param widget - */ + @brief PartRectangle::paint + Draw this Rectangle + @param painter + @param options + @param widget +*/ void PartRectangle::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *widget) { Q_UNUSED(widget); @@ -72,11 +72,11 @@ void PartRectangle::paint(QPainter *painter, const QStyleOptionGraphicsItem *opt } /** - * @brief PartRectangle::toXml - * Export this rectangle in xml - * @param xml_document : Xml document to use for create the xml element. - * @return an xml element that describe this ellipse - */ + @brief PartRectangle::toXml + Export this rectangle in xml + @param xml_document : Xml document to use for create the xml element. + @return an xml element that describe this ellipse +*/ const QDomElement PartRectangle::toXml(QDomDocument &xml_document) const { QDomElement xml_element = xml_document.createElement("rect"); @@ -104,10 +104,10 @@ const QDomElement PartRectangle::toXml(QDomDocument &xml_document) const } /** - * @brief PartRectangle::fromXml - * Import the properties of this rectangle from a xml element. - * @param qde : Xml document to use. - */ + @brief PartRectangle::fromXml + Import the properties of this rectangle from a xml element. + @param qde : Xml document to use. +*/ void PartRectangle::fromXml(const QDomElement &qde) { stylesFromXml(qde); @@ -123,18 +123,18 @@ void PartRectangle::fromXml(const QDomElement &qde) } /** - * @brief PartRectangle::rect - * @return : Returns the item's rectangle. - */ + @brief PartRectangle::rect + @return : Returns the item's rectangle. +*/ QRectF PartRectangle::rect() const { return m_rect; } /** - * @brief PartRectangle::setRect - * Sets the item's rectangle to be the given rectangle. - * @param rect - */ + @brief PartRectangle::setRect + Sets the item's rectangle to be the given rectangle. + @param rect +*/ void PartRectangle::setRect(const QRectF &rect) { if (rect == m_rect) return; @@ -161,28 +161,28 @@ void PartRectangle::setYRadius(qreal Y) } /** - * @brief PartRectangle::sceneGeometricRect - * @return the minimum, margin-less rectangle this part can fit into, in scene - * coordinates. It is different from boundingRect() because it is not supposed - * to imply any margin, and it is different from shape because it is a regular - * rectangle, not a complex shape. - */ + @brief PartRectangle::sceneGeometricRect + @return the minimum, margin-less rectangle this part can fit into, in scene + coordinates. It is different from boundingRect() because it is not supposed + to imply any margin, and it is different from shape because it is a regular + rectangle, not a complex shape. +*/ QRectF PartRectangle::sceneGeometricRect() const { return(mapToScene(rect()).boundingRect()); } /** - * @brief PartRectangle::sceneTopLeft - * @return the top left of rectangle, in scene coordinate - */ + @brief PartRectangle::sceneTopLeft + @return the top left of rectangle, in scene coordinate +*/ QPointF PartRectangle::sceneTopLeft() const { return(mapToScene(rect().topLeft())); } /** - * @brief PartRectangle::shape - * @return the shape of this item - */ + @brief PartRectangle::shape + @return the shape of this item +*/ QPainterPath PartRectangle::shape() const { QPainterPath shape; @@ -207,9 +207,9 @@ QPainterPath PartRectangle::shadowShape() const } /** - * @brief PartRectangle::boundingRect - * @return Bounding rectangle this part can fit into - */ + @brief PartRectangle::boundingRect + @return Bounding rectangle this part can fit into +*/ QRectF PartRectangle::boundingRect() const { qreal adjust = (SHADOWS_HEIGHT + penWeight()) / 2; @@ -224,20 +224,20 @@ QRectF PartRectangle::boundingRect() const } /** - * @brief PartRectangle::isUseless - * @return true if this part is irrelevant and does not deserve to be Retained / registered. - * An rectangle is relevant when he's not null. - */ + @brief PartRectangle::isUseless + @return true if this part is irrelevant and does not deserve to be Retained / registered. + An rectangle is relevant when he's not null. +*/ bool PartRectangle::isUseless() const { return(rect().isNull()); } /** - * @brief PartRectangle::startUserTransformation - * Start the user-induced transformation, provided this primitive is contained - * within the initial_selection_rect bounding rectangle. - * @param initial_selection_rect - */ + @brief PartRectangle::startUserTransformation + Start the user-induced transformation, provided this primitive is contained + within the initial_selection_rect bounding rectangle. + @param initial_selection_rect +*/ void PartRectangle::startUserTransformation(const QRectF &initial_selection_rect) { Q_UNUSED(initial_selection_rect) @@ -247,11 +247,11 @@ void PartRectangle::startUserTransformation(const QRectF &initial_selection_rect } /** - * @brief PartRectangle::handleUserTransformation - * Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect - * @param initial_selection_rect - * @param new_selection_rect - */ + @brief PartRectangle::handleUserTransformation + Handle the user-induced transformation from \a initial_selection_rect to \a new_selection_rect + @param initial_selection_rect + @param new_selection_rect +*/ void PartRectangle::handleUserTransformation(const QRectF &initial_selection_rect, const QRectF &new_selection_rect) { QList mapped_points = mapPoints(initial_selection_rect, new_selection_rect, saved_points_); @@ -259,10 +259,10 @@ void PartRectangle::handleUserTransformation(const QRectF &initial_selection_rec } /** - * @brief PartRectangle::mouseReleaseEvent - * Handle mouse release event - * @param event - */ + @brief PartRectangle::mouseReleaseEvent + Handle mouse release event + @param event +*/ void PartRectangle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton && event->buttonDownPos(Qt::LeftButton) == event->pos()) @@ -272,11 +272,11 @@ void PartRectangle::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief PartRectangle::itemChange - * @param change - * @param value - * @return - */ + @brief PartRectangle::itemChange + @param change + @param value + @return +*/ QVariant PartRectangle::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged && scene()) @@ -312,11 +312,11 @@ QVariant PartRectangle::itemChange(QGraphicsItem::GraphicsItemChange change, con } /** - * @brief PartRectangle::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief PartRectangle::sceneEventFilter + @param watched + @param event + @return +*/ bool PartRectangle::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -352,8 +352,8 @@ bool PartRectangle::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } /** - * @brief PartRectangle::switchResizeMode - */ + @brief PartRectangle::switchResizeMode +*/ void PartRectangle::switchResizeMode() { if (m_resize_mode == 1) @@ -385,8 +385,8 @@ void PartRectangle::switchResizeMode() } /** - * @brief PartRectangle::adjusteHandlerPos - */ + @brief PartRectangle::adjusteHandlerPos +*/ void PartRectangle::adjusteHandlerPos() { if (m_handler_vector.isEmpty()) { @@ -417,10 +417,10 @@ void PartRectangle::adjusteHandlerPos() } /** - * @brief PartRectangle::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief PartRectangle::handlerMousePressEvent + @param qghi + @param event +*/ void PartRectangle::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi) @@ -435,10 +435,10 @@ void PartRectangle::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphi } /** - * @brief PartRectangle::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief PartRectangle::handlerMouseMoveEvent + @param qghi + @param event +*/ void PartRectangle::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi) @@ -496,9 +496,9 @@ void PartRectangle::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGrap } /** - * @brief PartRectangle::sceneSelectionChanged - * When the scene selection change, if there are several primitive selected, we remove the handler of this item - */ + @brief PartRectangle::sceneSelectionChanged + When the scene selection change, if there are several primitive selected, we remove the handler of this item +*/ void PartRectangle::sceneSelectionChanged() { if (this->isSelected() && scene()->selectedItems().size() == 1) @@ -508,9 +508,9 @@ void PartRectangle::sceneSelectionChanged() } /** - * @brief PartRectangle::addHandler - * Add handlers for this item - */ + @brief PartRectangle::addHandler + Add handlers for this item +*/ void PartRectangle::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -538,9 +538,9 @@ void PartRectangle::addHandler() } /** - * @brief PartRectangle::removeHandler - * Remove the handlers of this item - */ + @brief PartRectangle::removeHandler + Remove the handlers of this item +*/ void PartRectangle::removeHandler() { if (!m_handler_vector.isEmpty()) diff --git a/sources/editor/graphicspart/partrectangle.h b/sources/editor/graphicspart/partrectangle.h index d6d7a6608..4c001fae6 100644 --- a/sources/editor/graphicspart/partrectangle.h +++ b/sources/editor/graphicspart/partrectangle.h @@ -23,9 +23,9 @@ class QetGraphicsHandlerItem; /** - * This class represents a rectangle primitive which may be used to compose the - * drawing of an electrical element within the element editor. - * All coordinates is in item coordinate, except pos() + This class represents a rectangle primitive which may be used to compose the + drawing of an electrical element within the element editor. + All coordinates is in item coordinate, except pos() */ class PartRectangle : public CustomElementGraphicPart { @@ -52,9 +52,9 @@ class PartRectangle : public CustomElementGraphicPart public: enum { Type = UserType + 1109 }; /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartRectangle. - * @return the QGraphicsItem type - */ + Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartRectangle. + @return the QGraphicsItem type + */ int type () const override { return Type; } void paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget * = nullptr) override; QString name () const override { return(QObject::tr("rectangle", "element part name")); } diff --git a/sources/editor/graphicspart/partterminal.cpp b/sources/editor/graphicspart/partterminal.cpp index b8586ec64..a3d55b8b4 100644 --- a/sources/editor/graphicspart/partterminal.cpp +++ b/sources/editor/graphicspart/partterminal.cpp @@ -93,9 +93,9 @@ void PartTerminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, Q } /** - * @brief PartTerminal::shape - * @return the shape of this item - */ + @brief PartTerminal::shape + @return the shape of this item +*/ QPainterPath PartTerminal::shape() const { QPainterPath shape; shape.lineTo(d -> second_point); @@ -107,9 +107,9 @@ QPainterPath PartTerminal::shape() const { } /** - * @brief PartTerminal::boundingRect - * @return the bounding rect of this item - */ + @brief PartTerminal::boundingRect + @return the bounding rect of this item +*/ QRectF PartTerminal::boundingRect() const { QRectF br(QPointF(0, 0), d -> second_point); br = br.normalized(); diff --git a/sources/editor/graphicspart/partterminal.h b/sources/editor/graphicspart/partterminal.h index 5cff09fe7..49f7beafd 100644 --- a/sources/editor/graphicspart/partterminal.h +++ b/sources/editor/graphicspart/partterminal.h @@ -47,9 +47,9 @@ class PartTerminal : public CustomElementGraphicPart { public: enum { Type = UserType + 1106 }; /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartTerminal. - * @return the QGraphicsItem type - */ + Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a PartTerminal. + @return the QGraphicsItem type + */ int type() const override { return Type; } QString name() const override { return d -> m_name; } QString xmlName() const override { return(QString("terminal")); } diff --git a/sources/editor/lineeditor.cpp b/sources/editor/lineeditor.cpp index 90498ae51..ecb9ae939 100644 --- a/sources/editor/lineeditor.cpp +++ b/sources/editor/lineeditor.cpp @@ -110,12 +110,12 @@ void LineEditor::disconnectChangeConnections() } /** - * @brief LineEditor::setPart - * Specifie to this editor the part to edit. - * Note that an editor can accept or refuse to edit a part. This editor accept only PartLine. - * @param new_part - * @return - */ + @brief LineEditor::setPart + Specifie to this editor the part to edit. + Note that an editor can accept or refuse to edit a part. This editor accept only PartLine. + @param new_part + @return +*/ bool LineEditor::setPart(CustomElementPart *new_part) { if (!new_part) @@ -164,17 +164,17 @@ QList LineEditor::currentParts() const { } /** - * @brief LineEditor::editedP1 - * @return The edited P1 in item coordinate - */ + @brief LineEditor::editedP1 + @return The edited P1 in item coordinate +*/ QPointF LineEditor::editedP1() const { return part -> mapFromScene(x1->value(), y1->value()); } /** - * @brief LineEditor::editedP2 - * @return The edited P2 in item coordinate - */ + @brief LineEditor::editedP2 + @return The edited P2 in item coordinate +*/ QPointF LineEditor::editedP2() const { return part -> mapFromScene(x2->value(), y2->value()); } @@ -366,9 +366,9 @@ void LineEditor::lineEditingFinishedY2() } /** - * @brief LineEditor::updateForm - * Update the value of the widgets - */ + @brief LineEditor::updateForm + Update the value of the widgets +*/ void LineEditor::updateForm() { if (!part) return; @@ -387,11 +387,11 @@ void LineEditor::updateForm() } /** - * @brief LineEditor::activeConnections - * Enable/disable connection between editor widget and slot editingFinished - * True == enable | false == disable - * @param active - */ + @brief LineEditor::activeConnections + Enable/disable connection between editor widget and slot editingFinished + True == enable | false == disable + @param active +*/ void LineEditor::activeConnections(bool active) { if (active) diff --git a/sources/editor/lineeditor.h b/sources/editor/lineeditor.h index e04d01558..9cf24ba05 100644 --- a/sources/editor/lineeditor.h +++ b/sources/editor/lineeditor.h @@ -70,10 +70,11 @@ class LineEditor : public ElementItemEditor private: void activeConnections(bool); - /*! - * \brief setUpChangeConnections - * Setup the connection from the line(s) to the widget, to update it when the line(s) are changed (moved ...) - */ + /** + @brief setUpChangeConnections + Setup the connection from the line(s) to the widget, + to update it when the line(s) are changed (moved ...) + */ void setUpChangeConnections(); void disconnectChangeConnections(); }; diff --git a/sources/editor/qetelementeditor.cpp b/sources/editor/qetelementeditor.cpp index 39cb8c243..3ba4c1094 100644 --- a/sources/editor/qetelementeditor.cpp +++ b/sources/editor/qetelementeditor.cpp @@ -106,10 +106,10 @@ QETElementEditor::~QETElementEditor() { } /** - * @brief QETElementEditor::setLocation - * The new location to edit - * @param el - */ + @brief QETElementEditor::setLocation + The new location to edit + @param el +*/ void QETElementEditor::setLocation(const ElementsLocation &el) { location_ = el; opened_from_file = false; @@ -132,9 +132,9 @@ void QETElementEditor::setFileName(const QString &fn) { } /** - * @brief QETElementEditor::setupActions - * Create action used in Element editor - */ + @brief QETElementEditor::setupActions + Create action used in Element editor +*/ void QETElementEditor::setupActions() { new_element = new QAction(QET::Icons::DocumentNew, tr("&Nouveau"), this); open = new QAction(QET::Icons::FolderOpen, tr("&Ouvrir"), this); @@ -260,7 +260,7 @@ void QETElementEditor::setupActions() { addToolBar(Qt::TopToolBarArea, depth_toolbar); /* - * Action related to zoom + Action related to zoom */ m_zoom_ag = new QActionGroup(this); @@ -280,7 +280,7 @@ void QETElementEditor::setupActions() { connect(zoom_reset, SIGNAL(triggered()), m_view, SLOT(zoomReset() )); /* - * Action related to primitive creation + Action related to primitive creation */ connect (m_elmt_scene, SIGNAL(partsAdded()), this, SLOT(UncheckAddPrimitive())); parts = new QActionGroup(this); @@ -359,8 +359,8 @@ void QETElementEditor::setupActions() { } /** - * @brief QETElementEditor::setupMenus - */ + @brief QETElementEditor::setupMenus +*/ void QETElementEditor::setupMenus() { file_menu = new QMenu(tr("&Fichier"), this); edit_menu = new QMenu(tr("&Édition"), this); @@ -422,11 +422,11 @@ 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. - */ + @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. +*/ void QETElementEditor::contextMenu(QPoint p, QList actions) { QMenu menu(this); menu.addActions(std::move(actions)); @@ -511,8 +511,8 @@ void QETElementEditor::slot_updateTitle() { } /** - * @brief QETElementEditor::setupInterface - */ + @brief QETElementEditor::setupInterface +*/ void QETElementEditor::setupInterface() { // editeur m_elmt_scene = new ElementScene(this, this); @@ -747,10 +747,10 @@ void QETElementEditor::slot_updateInformations() { } /** - * @brief QETElementEditor::checkElement - * Do several check about element. - * If error is occurred return false - */ + @brief QETElementEditor::checkElement + Do several check about element. + If error is occurred return false +*/ bool QETElementEditor::checkElement() { //List of warning and error typedef QPair QETWarning; @@ -897,11 +897,11 @@ void QETElementEditor::fromFile(const QString &filepath) { } /** - * @brief QETElementEditor::toFile - * Save to file the drawed element. - * @param fn : path of the file - * @return : true if succesfully save. - */ + @brief QETElementEditor::toFile + Save to file the drawed element. + @param fn : path of the file + @return : true if succesfully save. +*/ bool QETElementEditor::toFile(const QString &fn) { m_elmt_scene -> clearEventInterface(); m_elmt_scene -> clearSelection(); @@ -920,11 +920,11 @@ bool QETElementEditor::toFile(const QString &fn) { } /** - * @brief QETElementEditor::toLocation - * Save the element to Location - * @param location : location where we must save the current element - * @return true if succesfully saved - */ + @brief QETElementEditor::toLocation + Save the element to Location + @param location : location where we must save the current element + @return true if succesfully saved +*/ bool QETElementEditor::toLocation(const ElementsLocation &location) { m_elmt_scene -> clearEventInterface(); m_elmt_scene -> clearSelection(); @@ -1002,73 +1002,73 @@ bool QETElementEditor::isReadOnly() const { } /** - * @brief QETElementEditor::addLine - * Set line creation interface to scene - */ + @brief QETElementEditor::addLine + Set line creation interface to scene +*/ void QETElementEditor::addLine() { m_elmt_scene -> setEventInterface(new ESEventAddLine(m_elmt_scene)); } /** - * @brief QETElementEditor::addRect - * Set rectangle creation interface to scene - */ + @brief QETElementEditor::addRect + Set rectangle creation interface to scene +*/ void QETElementEditor::addRect() { m_elmt_scene -> setEventInterface(new ESEventAddRect(m_elmt_scene)); } /** - * @brief QETElementEditor::addEllipse - * Set ellipse creation interface to scene - */ + @brief QETElementEditor::addEllipse + Set ellipse creation interface to scene +*/ void QETElementEditor::addEllipse() { m_elmt_scene -> setEventInterface(new ESEventAddEllipse(m_elmt_scene)); } /** - * @brief QETElementEditor::addPolygon - * Set polygon creation interface to scene - */ + @brief QETElementEditor::addPolygon + Set polygon creation interface to scene +*/ void QETElementEditor::addPolygon() { m_elmt_scene -> setEventInterface(new ESEventAddPolygon(m_elmt_scene)); } /** - * @brief QETElementEditor::addArc - * Set arc creation interface to scene - */ + @brief QETElementEditor::addArc + Set arc creation interface to scene +*/ void QETElementEditor::addArc() { m_elmt_scene -> setEventInterface(new ESEventAddArc(m_elmt_scene)); } /** - * @brief QETElementEditor::addText - * Set text creation interface to scene - */ + @brief QETElementEditor::addText + Set text creation interface to scene +*/ void QETElementEditor::addText() { m_elmt_scene -> setEventInterface(new ESEventAddText(m_elmt_scene)); } /** - * @brief QETElementEditor::addTerminal - * Set terminal creation interface to scene - */ + @brief QETElementEditor::addTerminal + Set terminal creation interface to scene +*/ void QETElementEditor::addTerminal() { m_elmt_scene -> setEventInterface(new ESEventAddTerminal(m_elmt_scene)); } /** - * @brief QETElementEditor::addDynamicTextField - * Set dynamic text field creation interface to scene - */ + @brief QETElementEditor::addDynamicTextField + Set dynamic text field creation interface to scene +*/ void QETElementEditor::addDynamicTextField() { m_elmt_scene -> setEventInterface(new ESEventAddDynamicTextField(m_elmt_scene)); } /** - * @brief QETElementEditor::UncheckAddPrimitive - * Uncheck all action related to primitive - */ + @brief QETElementEditor::UncheckAddPrimitive + Uncheck all action related to primitive +*/ void QETElementEditor::UncheckAddPrimitive() { foreach(QAction *action, parts -> actions()) { action -> setChecked(false); @@ -1126,8 +1126,8 @@ void QETElementEditor::openRecentFile(const QString &filepath) { } /** - * @brief QETElementEditor::slot_openDxf - */ + @brief QETElementEditor::slot_openDxf +*/ void QETElementEditor::slot_openDxf (){ #if defined(Q_OS_WIN32) || defined(Q_OS_WIN64) @@ -1170,9 +1170,9 @@ void QETElementEditor::openElement(const QString &filepath) { } /** - * @brief QETElementEditor::slot_reload - * Reload the element from the file or location - */ + @brief QETElementEditor::slot_reload + Reload the element from the file or location +*/ void QETElementEditor::slot_reload() { //If user already edit the element, ask confirmation to reload if (!m_elmt_scene -> undoStack().isClean()) { @@ -1197,11 +1197,11 @@ void QETElementEditor::slot_reload() { } /** - * @brief QETElementEditor::slot_save - * Save the current editing element. - * If the filepath or location is unknown, use save_as instead - * @return true if save with success - */ + @brief QETElementEditor::slot_save + Save the current editing element. + If the filepath or location is unknown, use save_as instead + @return true if save with success +*/ bool QETElementEditor::slot_save() { // Check element befor writing if (checkElement()) { @@ -1236,11 +1236,11 @@ bool QETElementEditor::slot_save() { } /** - * @brief QETElementEditor::slot_saveAs - * Ask a location to user and save the current edited element - * to this location - * @return true if save with success - */ + @brief QETElementEditor::slot_saveAs + Ask a location to user and save the current edited element + to this location + @return true if save with success +*/ bool QETElementEditor::slot_saveAs() { // Check element befor writing if (checkElement()) { @@ -1264,10 +1264,10 @@ bool QETElementEditor::slot_saveAs() { } /** - * @brief QETElementEditor::slot_saveAsFile - * Ask a file to user and save the current edited element to this file - * @return true if save with success - */ + @brief QETElementEditor::slot_saveAsFile + Ask a file to user and save the current edited element to this file + @return true if save with success +*/ bool QETElementEditor::slot_saveAsFile() { // Check element befor writing if (checkElement()) { @@ -1480,9 +1480,9 @@ void QETElementEditor::slot_updateSelectionFromPartsList() { } /** - * @brief QETElementEditor::readSettings - * Read settings - */ + @brief QETElementEditor::readSettings + Read settings +*/ void QETElementEditor::readSettings() { QSettings settings; @@ -1503,9 +1503,9 @@ void QETElementEditor::readSettings() { } /** - * @brief QETElementEditor::writeSettings - * Write the settings - */ + @brief QETElementEditor::writeSettings + Write the settings +*/ void QETElementEditor::writeSettings() { QSettings settings; settings.setValue("elementeditor/geometry", saveGeometry()); @@ -1547,10 +1547,10 @@ QString QETElementEditor::getOpenElementFileName(QWidget *parent, const QString } /** - * @brief QETElementEditor::fromLocation - * Location of the element to edit - * @param location - */ + @brief QETElementEditor::fromLocation + Location of the element to edit + @param location +*/ void QETElementEditor::fromLocation(const ElementsLocation &location) { if (!location.isElement()) { QET::QetMessageBox::critical(this, @@ -1622,10 +1622,10 @@ void QETElementEditor::pasteFromFile() { } /** - * @brief QETElementEditor::pasteFromElement - * Ask an element to user, copy the xml definition of the element - * to the clipboard and call ElementView::PasteInArea - */ + @brief QETElementEditor::pasteFromElement + Ask an element to user, copy the xml definition of the element + to the clipboard and call ElementView::PasteInArea +*/ void QETElementEditor::pasteFromElement() { //Ask for a location ElementsLocation location = ElementDialog::getOpenElementLocation(this); diff --git a/sources/editor/styleeditor.cpp b/sources/editor/styleeditor.cpp index 08a41dec9..09cb543fd 100644 --- a/sources/editor/styleeditor.cpp +++ b/sources/editor/styleeditor.cpp @@ -432,9 +432,9 @@ void StyleEditor::updatePartFilling() { } /** - * @brief StyleEditor::updateForm - * Update the edition form according to the value of edited part(s) - */ + @brief StyleEditor::updateForm + Update the edition form according to the value of edited part(s) +*/ void StyleEditor::updateForm() { if (!part && m_part_list.isEmpty()) return; @@ -471,12 +471,12 @@ void StyleEditor::updateForm() } /** - * @brief StyleEditor::setPart - * Set the part to edit by this editor. - * Note : editor can accept or refuse to edit a part - * @param new_part : part to edit - * @return true if editor accept to edit this CustomElementPart otherwise false - */ + @brief StyleEditor::setPart + Set the part to edit by this editor. + Note : editor can accept or refuse to edit a part + @param new_part : part to edit + @return true if editor accept to edit this CustomElementPart otherwise false +*/ bool StyleEditor::setPart(CustomElementPart *new_part) { m_part_list.clear(); m_cep_list.clear(); @@ -499,14 +499,14 @@ bool StyleEditor::setPart(CustomElementPart *new_part) { } /** - * @brief StyleEditor::setParts - * Set several parts to edit by this editor. - * Note : editor can accept or refuse to edit several parts. - * @param part_list - * @return true if every customeElementPart stored in part_list can - * be edited by this part editor, otherwise return false - * (see StyleEditor::isStyleEditable) - */ + @brief StyleEditor::setParts + Set several parts to edit by this editor. + Note : editor can accept or refuse to edit several parts. + @param part_list + @return true if every customeElementPart stored in part_list can + be edited by this part editor, otherwise return false + (see StyleEditor::isStyleEditable) +*/ bool StyleEditor::setParts(QList part_list) { if (part_list.isEmpty()) return false; @@ -545,10 +545,10 @@ QList StyleEditor::currentParts() const { } /** - * @brief StyleEditor::isStyleEditable - * @param cep_list - * @return true if all of the content of cep_list can be edited by style editor, else return false. - */ + @brief StyleEditor::isStyleEditable + @param cep_list + @return true if all of the content of cep_list can be edited by style editor, else return false. +*/ bool StyleEditor::isStyleEditable(QList cep_list) { QStringList str; diff --git a/sources/editor/ui/dynamictextfieldeditor.cpp b/sources/editor/ui/dynamictextfieldeditor.cpp index 7b5f5e750..018d58455 100644 --- a/sources/editor/ui/dynamictextfieldeditor.cpp +++ b/sources/editor/ui/dynamictextfieldeditor.cpp @@ -53,11 +53,11 @@ DynamicTextFieldEditor::~DynamicTextFieldEditor() { } /** - * @brief DynamicTextFieldEditor::setPart - * Set @part as current edited part of this widget. - * @param part - * @return true if @part can be edited by this widget - */ + @brief DynamicTextFieldEditor::setPart + Set @part as current edited part of this widget. + @param part + @return true if @part can be edited by this widget +*/ bool DynamicTextFieldEditor::setPart(CustomElementPart *part) { disconnectConnections(); @@ -104,10 +104,10 @@ bool DynamicTextFieldEditor::setParts(QList parts) { } /** - * @brief DynamicTextFieldEditor::currentPart - * @return The current edited part, note they can return nullptr if - * there is not a currently edited part. - */ + @brief DynamicTextFieldEditor::currentPart + @return The current edited part, note they can return nullptr if + there is not a currently edited part. +*/ CustomElementPart *DynamicTextFieldEditor::currentPart() const { return m_text_field.data(); } @@ -187,9 +187,9 @@ void DynamicTextFieldEditor::disconnectConnections() { } /** - * @brief DynamicTextFieldEditor::fillInfoComboBox - * Fill the combo box "element information" - */ + @brief DynamicTextFieldEditor::fillInfoComboBox + Fill the combo box "element information" +*/ void DynamicTextFieldEditor::fillInfoComboBox() { ui -> m_elmt_info_cb -> clear(); diff --git a/sources/editor/ui/dynamictextfieldeditor.h b/sources/editor/ui/dynamictextfieldeditor.h index a9991283c..2d5630f52 100644 --- a/sources/editor/ui/dynamictextfieldeditor.h +++ b/sources/editor/ui/dynamictextfieldeditor.h @@ -26,9 +26,9 @@ namespace Ui { } /** - * @brief The DynamicTextFieldEditor class - * This class provide a widget used to edit the property of a dynamic text field - */ + @brief The DynamicTextFieldEditor class + This class provide a widget used to edit the property of a dynamic text field +*/ class DynamicTextFieldEditor : public ElementItemEditor { Q_OBJECT diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index d17bff735..20b366650 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -22,10 +22,10 @@ #include /** - * @brief The EditorDelegate class - * This delegate is only use for disable the edition of the first - * column of the information tree widget - */ + @brief The EditorDelegate class + This delegate is only use for disable the edition of the first + column of the information tree widget +*/ class EditorDelegate : public QItemDelegate { public: @@ -44,13 +44,13 @@ class EditorDelegate : public QItemDelegate }; /** - * @brief ElementPropertiesEditorWidget::ElementPropertiesEditorWidget - * Default constructor - * @param basic_type : QString of the drawed element - * @param kind_info : DiagramContext to store kindInfo of drawed element - * @param elmt_info : the information of element (label, manufacturer etc...] - * @param parent : parent widget - */ + @brief ElementPropertiesEditorWidget::ElementPropertiesEditorWidget + Default constructor + @param basic_type : QString of the drawed element + @param kind_info : DiagramContext to store kindInfo of drawed element + @param elmt_info : the information of element (label, manufacturer etc...] + @param parent : parent widget +*/ ElementPropertiesEditorWidget::ElementPropertiesEditorWidget(QString &basic_type, DiagramContext &kind_info, DiagramContext &elmt_info, QWidget *parent) : QDialog(parent), ui(new Ui::ElementPropertiesEditorWidget), @@ -64,18 +64,18 @@ ElementPropertiesEditorWidget::ElementPropertiesEditorWidget(QString &basic_type } /** - * @brief ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget - * Default destructor - */ + @brief ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget + Default destructor +*/ ElementPropertiesEditorWidget::~ElementPropertiesEditorWidget() { delete ui; } /** - * @brief ElementPropertiesEditorWidget::upDateInterface - * Update the interface with the curent value - */ + @brief ElementPropertiesEditorWidget::upDateInterface + Update the interface with the curent value +*/ void ElementPropertiesEditorWidget::upDateInterface() { ui->m_base_type_cb->setCurrentIndex(ui->m_base_type_cb->findData(QVariant(m_basic_type))); @@ -94,8 +94,8 @@ void ElementPropertiesEditorWidget::upDateInterface() } /** - * @brief ElementPropertiesEditorWidget::setUpInterface - */ + @brief ElementPropertiesEditorWidget::setUpInterface +*/ void ElementPropertiesEditorWidget::setUpInterface() { // Type combo box @@ -147,9 +147,9 @@ void ElementPropertiesEditorWidget::updateTree() } /** - * @brief ElementPropertiesEditorWidget::populateTree - * Create QTreeWidgetItem of the tree widget and populate it - */ + @brief ElementPropertiesEditorWidget::populateTree + Create QTreeWidgetItem of the tree widget and populate it +*/ void ElementPropertiesEditorWidget::populateTree() { QStringList keys{"label", "plant", "comment", "description", "designation", "manufacturer", "manufacturer_reference", "supplier", "quantity", "unity", "machine_manufacturer_reference"}; @@ -165,9 +165,9 @@ void ElementPropertiesEditorWidget::populateTree() } /** - * @brief ElementPropertiesEditorWidget::on_m_buttonBox_accepted - * Action on button accepted : the new information is set - */ + @brief ElementPropertiesEditorWidget::on_m_buttonBox_accepted + Action on button accepted : the new information is set +*/ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted() { m_basic_type = ui -> m_base_type_cb -> itemData(ui -> m_base_type_cb -> currentIndex()).toString(); @@ -194,9 +194,9 @@ void ElementPropertiesEditorWidget::on_m_buttonBox_accepted() } /** - * @brief ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged - * @param index : Action when combo-box base type index change - */ + @brief ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged + @param index : Action when combo-box base type index change +*/ void ElementPropertiesEditorWidget::on_m_base_type_cb_currentIndexChanged(int index) { bool slave = false , master = false; diff --git a/sources/editor/ui/elementpropertieseditorwidget.h b/sources/editor/ui/elementpropertieseditorwidget.h index 105c4512d..ca0337ca4 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.h +++ b/sources/editor/ui/elementpropertieseditorwidget.h @@ -27,10 +27,10 @@ namespace Ui { } /** - * @brief The ElementPropertiesEditorWidget class - * This class provide a dialog for edit various property of element, like - * the type (master, slave, report etc....) and kind info. - */ + @brief The ElementPropertiesEditorWidget class + This class provide a dialog for edit various property of element, like + the type (master, slave, report etc....) and kind info. +*/ class ElementPropertiesEditorWidget : public QDialog { Q_OBJECT diff --git a/sources/editor/ui/polygoneditor.cpp b/sources/editor/ui/polygoneditor.cpp index bea8ae54a..4658d00db 100644 --- a/sources/editor/ui/polygoneditor.cpp +++ b/sources/editor/ui/polygoneditor.cpp @@ -24,11 +24,11 @@ #include "QPropertyUndoCommand/qpropertyundocommand.h" /** - * @brief PolygonEditor::PolygonEditor - * @param editor - * @param part - * @param parent - */ + @brief PolygonEditor::PolygonEditor + @param editor + @param part + @param parent +*/ PolygonEditor::PolygonEditor(QETElementEditor *editor, PartPolygon *part, QWidget *parent) : ElementItemEditor(editor, parent), ui(new Ui::PolygonEditor), @@ -44,8 +44,8 @@ PolygonEditor::PolygonEditor(QETElementEditor *editor, PartPolygon *part, QWidge } /** - * @brief PolygonEditor::~PolygonEditor - */ + @brief PolygonEditor::~PolygonEditor +*/ PolygonEditor::~PolygonEditor() { delete ui; } @@ -67,10 +67,10 @@ void PolygonEditor::disconnectChangeConnections() } /** - * @brief PolygonEditor::setPart - * @param new_part - * @return - */ + @brief PolygonEditor::setPart + @param new_part + @return +*/ bool PolygonEditor::setPart(CustomElementPart *new_part) { if (!new_part) @@ -98,9 +98,9 @@ bool PolygonEditor::setPart(CustomElementPart *new_part) } /** - * @brief PolygonEditor::currentPart - * @return the curent edited part - */ + @brief PolygonEditor::currentPart + @return the curent edited part +*/ CustomElementPart *PolygonEditor::currentPart() const { return m_part; } @@ -110,9 +110,9 @@ QList PolygonEditor::currentParts() const { } /** - * @brief PolygonEditor::updateForm - * Update the widget - */ + @brief PolygonEditor::updateForm + Update the widget +*/ void PolygonEditor::updateForm() { if (!m_part) { @@ -135,10 +135,10 @@ void PolygonEditor::updateForm() } /** - * @brief PolygonEditor::pointsFromTree - * @return the point of polygon from the current value of the tree editor - * if part coordinate. - */ + @brief PolygonEditor::pointsFromTree + @return the point of polygon from the current value of the tree editor + if part coordinate. +*/ QVector PolygonEditor::pointsFromTree() { QVector points; @@ -173,8 +173,8 @@ bool PolygonEditor::eventFilter(QObject *watched, QEvent *event) } /** - * @brief PolygonEditor::on_m_close_polygon_cb_stateChanged - */ + @brief PolygonEditor::on_m_close_polygon_cb_stateChanged +*/ void PolygonEditor::on_m_close_polygon_cb_stateChanged(int arg1) { Q_UNUSED(arg1); @@ -192,9 +192,9 @@ void PolygonEditor::on_m_close_polygon_cb_stateChanged(int arg1) } /** - * @brief PolygonEditor::on_m_points_list_tree_itemChanged - * Update the polygon according to the current value of the tree editor - */ + @brief PolygonEditor::on_m_points_list_tree_itemChanged + Update the polygon according to the current value of the tree editor +*/ void PolygonEditor::on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int column) { Q_UNUSED(item); @@ -220,9 +220,9 @@ void PolygonEditor::on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int } /** - * @brief PolygonEditor::on_m_points_list_tree_itemSelectionChanged - * Used to change the color of the current selected point. - */ + @brief PolygonEditor::on_m_points_list_tree_itemSelectionChanged + Used to change the color of the current selected point. +*/ void PolygonEditor::on_m_points_list_tree_itemSelectionChanged() { //Prevent when selection change but the widget ins't focused diff --git a/sources/editor/ui/polygoneditor.h b/sources/editor/ui/polygoneditor.h index 66117d100..f8ccbefba 100644 --- a/sources/editor/ui/polygoneditor.h +++ b/sources/editor/ui/polygoneditor.h @@ -51,10 +51,11 @@ class PolygonEditor : public ElementItemEditor void on_m_remove_point_action_triggered(); private: - /*! - * \brief setUpChangeConnections - * Setup the connection from the line(s) to the widget, to update it when the line(s) are changed (moved ...) - */ + /** + @brief setUpChangeConnections + Setup the connection from the line(s) to the widget, + to update it when the line(s) are changed (moved ...) + */ void setUpChangeConnections(); void disconnectChangeConnections(); diff --git a/sources/editor/ui/rectangleeditor.cpp b/sources/editor/ui/rectangleeditor.cpp index cc8e05c2a..913b1976c 100644 --- a/sources/editor/ui/rectangleeditor.cpp +++ b/sources/editor/ui/rectangleeditor.cpp @@ -24,11 +24,11 @@ #include "qeticons.h" /** - * @brief RectangleEditor::RectangleEditor - * @param editor - * @param rect - * @param parent - */ + @brief RectangleEditor::RectangleEditor + @param editor + @param rect + @param parent +*/ RectangleEditor::RectangleEditor(QETElementEditor *editor, PartRectangle *rect, QWidget *parent) : ElementItemEditor(editor, parent), m_part(rect), @@ -40,8 +40,8 @@ RectangleEditor::RectangleEditor(QETElementEditor *editor, PartRectangle *rect, } /** - * @brief RectangleEditor::~RectangleEditor - */ + @brief RectangleEditor::~RectangleEditor +*/ RectangleEditor::~RectangleEditor() { delete ui; } @@ -64,10 +64,10 @@ void RectangleEditor::disconnectChangeConnections() } /** - * @brief RectangleEditor::setPart - * @param part - * @return - */ + @brief RectangleEditor::setPart + @param part + @return +*/ bool RectangleEditor::setPart(CustomElementPart *part) { if (!part) @@ -109,9 +109,9 @@ bool RectangleEditor::setParts(QList parts) } /** - * @brief RectangleEditor::currentPart - * @return - */ + @brief RectangleEditor::currentPart + @return +*/ CustomElementPart *RectangleEditor::currentPart() const { return m_part; } @@ -121,16 +121,16 @@ QList RectangleEditor::currentParts() const { } /** - * @brief RectangleEditor::topLeft - * @return The edited topLeft already mapped to part coordinate - */ + @brief RectangleEditor::topLeft + @return The edited topLeft already mapped to part coordinate +*/ QPointF RectangleEditor::editedTopLeft() const { return m_part->mapFromScene(ui->m_x_sb->value(), ui->m_y_sb->value()); } /** - * @brief RectangleEditor::updateForm - */ + @brief RectangleEditor::updateForm +*/ void RectangleEditor::updateForm() { if (!m_part) { @@ -153,10 +153,10 @@ void RectangleEditor::updateForm() } /** - * @brief RectangleEditor::editingFinished - * Slot called when a editor widget is finish to be edited - * Update the geometry of the rectangle according to value of editing widget. - */ + @brief RectangleEditor::editingFinished + Slot called when a editor widget is finish to be edited + Update the geometry of the rectangle according to value of editing widget. +*/ void RectangleEditor::editingFinished() { if (m_locked) { @@ -340,11 +340,11 @@ void RectangleEditor::yRadiusChanged() /** - * @brief RectangleEditor::activeConnections - * Enable/disable connection between editor widget and slot editingFinished - * True == enable | false == disable - * @param active - */ + @brief RectangleEditor::activeConnections + Enable/disable connection between editor widget and slot editingFinished + True == enable | false == disable + @param active +*/ void RectangleEditor::activeConnections(bool active) { if (active) diff --git a/sources/editor/ui/rectangleeditor.h b/sources/editor/ui/rectangleeditor.h index 09e606897..94c7480d1 100644 --- a/sources/editor/ui/rectangleeditor.h +++ b/sources/editor/ui/rectangleeditor.h @@ -29,9 +29,9 @@ namespace Ui { } /** - * @brief The RectangleEditor class - * This class provides a widget to edit rectangles within the element editor. - */ + @brief The RectangleEditor class + This class provides a widget to edit rectangles within the element editor. +*/ class RectangleEditor : public ElementItemEditor { Q_OBJECT @@ -58,9 +58,9 @@ class RectangleEditor : public ElementItemEditor void xRadiusChanged(); void yRadiusChanged(); /*! - * \brief setUpChangeConnections - * Setup the connection from the rectangles(s) to the widget, to update it when the rectangles(s) are changed (moved ...) - */ + \brief setUpChangeConnections + Setup the connection from the rectangles(s) to the widget, to update it when the rectangles(s) are changed (moved ...) + */ void setUpChangeConnections(); void disconnectChangeConnections(); diff --git a/sources/editor/ui/texteditor.cpp b/sources/editor/ui/texteditor.cpp index 0749f6de4..e7a30df70 100644 --- a/sources/editor/ui/texteditor.cpp +++ b/sources/editor/ui/texteditor.cpp @@ -22,12 +22,12 @@ #include /** - * @brief TextEditor::TextEditor - * Default constructor - * @param editor : the element editor who use this editor - * @param text : the text to edit - * @param parent : the parent widget - */ + @brief TextEditor::TextEditor + Default constructor + @param editor : the element editor who use this editor + @param text : the text to edit + @param parent : the parent widget +*/ TextEditor::TextEditor(QETElementEditor *editor, PartText *text, QWidget *parent) : ElementItemEditor(editor, parent), ui(new Ui::TextEditor) { @@ -40,16 +40,16 @@ TextEditor::TextEditor(QETElementEditor *editor, PartText *text, QWidget *paren } /** - * @brief TextEditor::~TextEditor - */ + @brief TextEditor::~TextEditor +*/ TextEditor::~TextEditor() { delete ui; } /** - * @brief TextEditor::updateForm - * Update the gui - */ + @brief TextEditor::updateForm + Update the gui +*/ void TextEditor::updateForm() { if (m_text.isNull()) { @@ -94,12 +94,12 @@ void TextEditor::disconnectEditConnection() { } /** - * @brief TextEditor::setPart - * Set the current text to edit. - * Set @part to nullptr to clear the current text. - * @param part : part to edit - * @return : return if @part is a partext or nullptr, else return false - */ + @brief TextEditor::setPart + Set the current text to edit. + Set @part to nullptr to clear the current text. + @param part : part to edit + @return : return if @part is a partext or nullptr, else return false +*/ bool TextEditor::setPart(CustomElementPart *part) { if (!part) { m_text = nullptr; @@ -147,9 +147,9 @@ bool TextEditor::setParts(QList parts) { } /** - * @brief TextEditor::currentPart - * @return The current part - */ + @brief TextEditor::currentPart + @return The current part +*/ CustomElementPart *TextEditor::currentPart() const { return m_text; } @@ -163,10 +163,10 @@ QList TextEditor::currentParts() const { } /** - * @brief TextEditor::setUpEditConnection - * Setup the connection between the widgets of this editor and the undo command - * use to apply the change to the edited text. - */ + @brief TextEditor::setUpEditConnection + Setup the connection between the widgets of this editor and the undo command + use to apply the change to the edited text. +*/ void TextEditor::setUpEditConnection() { disconnectEditConnection(); @@ -234,8 +234,8 @@ void TextEditor::setUpEditConnection() { } /** - * @brief TextEditor::on_m_font_pb_clicked - */ + @brief TextEditor::on_m_font_pb_clicked +*/ void TextEditor::on_m_font_pb_clicked() { bool ok; QFont font_ = QFontDialog::getFont(&ok, m_text -> font(), this); @@ -259,9 +259,9 @@ void TextEditor::on_m_font_pb_clicked() { } /** - * @brief TextEditor::on_m_color_pb_changed - * @param newColor - */ + @brief TextEditor::on_m_color_pb_changed + @param newColor +*/ void TextEditor::on_m_color_pb_changed(const QColor &newColor) { for (int i=0; i < m_parts.length(); i++) { PartText* partText = m_parts[i]; diff --git a/sources/elementdialog.cpp b/sources/elementdialog.cpp index d42b0f8c0..777911865 100644 --- a/sources/elementdialog.cpp +++ b/sources/elementdialog.cpp @@ -30,10 +30,10 @@ #include "qetmessagebox.h" /** - * @brief ElementDialog::ElementDialog - * @param mode - * @param parent - */ + @brief ElementDialog::ElementDialog + @param mode + @param parent +*/ ElementDialog::ElementDialog(uint mode, QWidget *parent) : QDialog(parent), m_mode(mode) @@ -43,9 +43,9 @@ ElementDialog::ElementDialog(uint mode, QWidget *parent) : } /** - * @brief ElementDialog::setUpWidget - * Build and setup the widgets of this dialog - */ + @brief ElementDialog::setUpWidget + Build and setup the widgets of this dialog +*/ void ElementDialog::setUpWidget() { setWindowModality(Qt::WindowModal); @@ -124,9 +124,9 @@ void ElementDialog::setUpWidget() } /** - * @brief ElementDialog::setUpConnection - * Setup connection of this dialog - */ + @brief ElementDialog::setUpConnection + Setup connection of this dialog +*/ void ElementDialog::setUpConnection() { connect(m_tree_view, &QTreeView::clicked, this, &ElementDialog::indexClicked); @@ -137,9 +137,9 @@ void ElementDialog::setUpConnection() } /** - * @brief ElementDialog::indexClicked - * @param index - */ + @brief ElementDialog::indexClicked + @param index +*/ void ElementDialog::indexClicked(const QModelIndex &index) { ElementCollectionItem *eci = static_cast (m_model->itemFromIndex(index)); @@ -148,9 +148,9 @@ void ElementDialog::indexClicked(const QModelIndex &index) } /** - * @brief ElementDialog::checkCurrentLocation - * Update this dialog according to the current selected location and the current mode - */ + @brief ElementDialog::checkCurrentLocation + Update this dialog according to the current selected location and the current mode +*/ void ElementDialog::checkCurrentLocation() { if (m_mode == OpenElement) { @@ -236,10 +236,10 @@ void ElementDialog::checkAccept() } /** - * @brief ElementDialog::location - * @return The selected location or a null location if user has selected nothing - * or selection isn't compatible with the curent mode - */ + @brief ElementDialog::location + @return The selected location or a null location if user has selected nothing + or selection isn't compatible with the curent mode +*/ ElementsLocation ElementDialog::location() const { if (m_mode == OpenElement) @@ -272,32 +272,32 @@ ElementsLocation ElementDialog::location() const } /** - * @brief ElementDialog::getOpenElementLocation - * Display a dialog for open an element through her location - * @param parentWidget - * @return The location of the selected element - */ + @brief ElementDialog::getOpenElementLocation + Display a dialog for open an element through her location + @param parentWidget + @return The location of the selected element +*/ ElementsLocation ElementDialog::getOpenElementLocation(QWidget *parentWidget) { return(ElementDialog::execConfiguredDialog(ElementDialog::OpenElement, parentWidget)); } /** - * @brief ElementDialog::getSaveElementLocation - * Display a dialog that allow to user to select an element (existing or not) who he want to save - * @param parentWidget - * @return The location where the element must be save - */ + @brief ElementDialog::getSaveElementLocation + Display a dialog that allow to user to select an element (existing or not) who he want to save + @param parentWidget + @return The location where the element must be save +*/ ElementsLocation ElementDialog::getSaveElementLocation(QWidget *parentWidget) { return(ElementDialog::execConfiguredDialog(ElementDialog::SaveElement, parentWidget)); } /** - * @brief ElementDialog::execConfiguredDialog - * launch a dialog with the chosen mode - * @param mode : mode of the dialog - * @param parentWidget : parent widget of the dialog - * @return the chosen location - */ + @brief ElementDialog::execConfiguredDialog + launch a dialog with the chosen mode + @param mode : mode of the dialog + @param parentWidget : parent widget of the dialog + @return the chosen location +*/ ElementsLocation ElementDialog::execConfiguredDialog(int mode, QWidget *parentWidget) { ElementDialog *element_dialog = new ElementDialog(mode, parentWidget); diff --git a/sources/elementprovider.cpp b/sources/elementprovider.cpp index 50847b348..2653fac4e 100644 --- a/sources/elementprovider.cpp +++ b/sources/elementprovider.cpp @@ -23,10 +23,10 @@ #include /** - * @brief ElementProvider::ElementProvider Constructor - * @param prj the project where we must find element - * @param diagram the diagram to exclude from the search - */ + @brief ElementProvider::ElementProvider Constructor + @param prj the project where we must find element + @param diagram the diagram to exclude from the search +*/ ElementProvider::ElementProvider(QETProject *prj, Diagram *diagram) { m_diagram_list = prj->diagrams(); @@ -34,22 +34,22 @@ ElementProvider::ElementProvider(QETProject *prj, Diagram *diagram) } /** - * @brief ElementProvider::ElementProvider Constructor - * @param diag Diagram to search - */ + @brief ElementProvider::ElementProvider Constructor + @param diag Diagram to search +*/ ElementProvider::ElementProvider(Diagram *diag) { m_diagram_list << diag; } /** - * @brief ElementProvider::FreeElement - * Search and return the asked element corresponding with the given filter - * All returned element are free, ie element aren't connected with another element - * @param filter - * the filter for search element - * (You can find all filter with the #define in Element.h) - * @return - */ + @brief ElementProvider::FreeElement + Search and return the asked element corresponding with the given filter + All returned element are free, ie element aren't connected with another element + @param filter + the filter for search element + (You can find all filter with the #define in Element.h) + @return +*/ QList ElementProvider::freeElement(const int filter) const{ QList free_elmt; @@ -67,10 +67,10 @@ QList ElementProvider::freeElement(const int filter) const{ } /** - * @brief ElementProvider::fromUuids - * @param uuid_list list of uuid must be found - * @return all elements with uuid corresponding to uuid in @uuid_list - */ + @brief ElementProvider::fromUuids + @param uuid_list list of uuid must be found + @return all elements with uuid corresponding to uuid in @uuid_list +*/ QList ElementProvider::fromUuids(QList uuid_list) const { QList found_element; @@ -86,12 +86,12 @@ QList ElementProvider::fromUuids(QList uuid_list) const { } /** - * @brief ElementProvider::find - * Search and return the asked element corresponding with the given filter - * @param filter - * the filter for search element - * (You can find all filter with the #define in Element.h) - */ + @brief ElementProvider::find + Search and return the asked element corresponding with the given filter + @param filter + the filter for search element + (You can find all filter with the #define in Element.h) +*/ QList ElementProvider::find(const int filter) const { QList elmt_; @@ -109,12 +109,12 @@ QList ElementProvider::find(const int filter) const { } /** - * @brief ElementProvider::table - * @param table - * @param model - * @return All tables wich display the derivated class of @model (if set) and not already in all the chain of next/previous table of @table (if set) - * If table and model are nullptr, return every tables - */ + @brief ElementProvider::table + @param table + @param model + @return All tables wich display the derivated class of @model (if set) and not already in all the chain of next/previous table of @table (if set) + If table and model are nullptr, return every tables +*/ QVector ElementProvider::table(QetGraphicsTableItem *table, QAbstractItemModel *model) { QVector v_; @@ -158,10 +158,10 @@ QVector ElementProvider::table(QetGraphicsTableItem *tab } /** - * @brief ElementProvider::tableFromUuid - * @param uuid - * @return the table with uuid @uuid or nullptr if not found - */ + @brief ElementProvider::tableFromUuid + @param uuid + @return the table with uuid @uuid or nullptr if not found +*/ QetGraphicsTableItem *ElementProvider::tableFromUuid(const QUuid &uuid) { for (auto table : this->table()) diff --git a/sources/elementscategoryeditor.cpp b/sources/elementscategoryeditor.cpp index 43e2e1a9e..6eceedc65 100644 --- a/sources/elementscategoryeditor.cpp +++ b/sources/elementscategoryeditor.cpp @@ -28,12 +28,12 @@ #include /** - * @brief ElementsCategoryEditor::ElementsCategoryEditor - * Constructor - * @param location : location of the category to edit, or parent directory/category for the creation of a new category - * @param edit : true = edit mode, false = creation mode - * @param parent : parent widget - */ + @brief ElementsCategoryEditor::ElementsCategoryEditor + Constructor + @param location : location of the category to edit, or parent directory/category for the creation of a new category + @param edit : true = edit mode, false = creation mode + @param parent : parent widget +*/ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &location, bool edit, QWidget *parent) : QDialog(parent), m_edit_mode(edit), @@ -84,24 +84,24 @@ ElementsCategoryEditor::ElementsCategoryEditor(const ElementsLocation &location, } /** - * @brief ElementsCategoryEditor::~ElementsCategoryEditor - * Destructor - */ + @brief ElementsCategoryEditor::~ElementsCategoryEditor + Destructor +*/ ElementsCategoryEditor::~ElementsCategoryEditor() { } /** - * @brief ElementsCategoryEditor::createdLocation - * @return the location of the created directory - */ + @brief ElementsCategoryEditor::createdLocation + @return the location of the created directory +*/ ElementsLocation ElementsCategoryEditor::createdLocation() const { return m_created_location; } /** - * @brief ElementsCategoryEditor::setUpWidget - */ + @brief ElementsCategoryEditor::setUpWidget +*/ void ElementsCategoryEditor::setUpWidget() { QVBoxLayout *editor_layout = new QVBoxLayout(); @@ -125,9 +125,9 @@ void ElementsCategoryEditor::setUpWidget() } /** - * @brief ElementsCategoryEditor::acceptCreation - * Valid the creation of the category - */ + @brief ElementsCategoryEditor::acceptCreation + Valid the creation of the category +*/ void ElementsCategoryEditor::acceptCreation() { if (!m_location.isWritable()) { @@ -176,9 +176,9 @@ void ElementsCategoryEditor::acceptCreation() } /** - * @brief ElementsCategoryEditor::acceptUpdate - * Valid the update of the category - */ + @brief ElementsCategoryEditor::acceptUpdate + Valid the update of the category +*/ void ElementsCategoryEditor::acceptUpdate() { if (!m_location.isWritable()) { diff --git a/sources/elementscategoryeditor.h b/sources/elementscategoryeditor.h index ae620bea7..aab809c66 100644 --- a/sources/elementscategoryeditor.h +++ b/sources/elementscategoryeditor.h @@ -27,9 +27,9 @@ class QDialogButtonBox; class QLabel; /** - * @brief The ElementsCategoryEditor class - * This class provides a dialog to edit an existing category or create a new one. - */ + @brief The ElementsCategoryEditor class + This class provides a dialog to edit an existing category or create a new one. +*/ class ElementsCategoryEditor : public QDialog { Q_OBJECT diff --git a/sources/elementscollectioncache.cpp b/sources/elementscollectioncache.cpp index 0b293d426..3c8189dfc 100644 --- a/sources/elementscollectioncache.cpp +++ b/sources/elementscollectioncache.cpp @@ -150,14 +150,14 @@ QString ElementsCollectionCache::pixmapStorageFormat() const { } /** - * @brief ElementsCollectionCache::fetchElement - * Retrieve the data for a given element, using the cache if available, - * filling it otherwise. Data are then available through pixmap() and name() methods. - * @param location The definition of an element. - * @see pixmap() - * @see name() - * @return True if the retrieval succeeded, false otherwise. - */ + @brief ElementsCollectionCache::fetchElement + Retrieve the data for a given element, using the cache if available, + filling it otherwise. Data are then available through pixmap() and name() methods. + @param location The definition of an element. + @see pixmap() + @see name() + @return True if the retrieval succeeded, false otherwise. +*/ bool ElementsCollectionCache::fetchElement(ElementsLocation &location) { // can we use the cache with this element? @@ -222,13 +222,13 @@ bool ElementsCollectionCache::fetchData(const ElementsLocation &location) { } /** - * @brief ElementsCollectionCache::fetchNameFromCache - * Retrieve the name for an element, given its path and uuid - * The value is then available through the name() method. - * @param path : Element path (as obtained using ElementsLocation::toString()) - * @param uuid : Element uuid - * @return True if the retrieval succeeded, false otherwise. - */ + @brief ElementsCollectionCache::fetchNameFromCache + Retrieve the name for an element, given its path and uuid + The value is then available through the name() method. + @param path : Element path (as obtained using ElementsLocation::toString()) + @param uuid : Element uuid + @return True if the retrieval succeeded, false otherwise. +*/ bool ElementsCollectionCache::fetchNameFromCache(const QString &path, const QUuid &uuid) { select_name_ -> bindValue(":path", path); @@ -250,13 +250,13 @@ bool ElementsCollectionCache::fetchNameFromCache(const QString &path, const QUui } /** - * @brief ElementsCollectionCache::fetchPixmapFromCache - * Retrieve the pixmap for an element, given its path and uuid. - * It is then available through the pixmap() method. - * @param path : Element path (as obtained using ElementsLocation::toString()) - * @param uuid : Element uuid - * @return True if the retrieval succeeded, false otherwise. - */ + @brief ElementsCollectionCache::fetchPixmapFromCache + Retrieve the pixmap for an element, given its path and uuid. + It is then available through the pixmap() method. + @param path : Element path (as obtained using ElementsLocation::toString()) + @param uuid : Element uuid + @return True if the retrieval succeeded, false otherwise. +*/ bool ElementsCollectionCache::fetchPixmapFromCache(const QString &path, const QUuid &uuid) { select_pixmap_ -> bindValue(":path", path); @@ -280,13 +280,13 @@ bool ElementsCollectionCache::fetchPixmapFromCache(const QString &path, const QU } /** - * @brief ElementsCollectionCache::cacheName - * Cache the current (i.e. last retrieved) name The cache entry will use the locale set via setLocale(). - * @param path : Element path (as obtained using ElementsLocation::toString()) - * @param uuid :Element uuid - * @return True if the caching succeeded, false otherwise. - * @see name() - */ + @brief ElementsCollectionCache::cacheName + Cache the current (i.e. last retrieved) name The cache entry will use the locale set via setLocale(). + @param path : Element path (as obtained using ElementsLocation::toString()) + @param uuid :Element uuid + @return True if the caching succeeded, false otherwise. + @see name() +*/ bool ElementsCollectionCache::cacheName(const QString &path, const QUuid &uuid) { insert_name_ -> bindValue(":path", path); @@ -302,13 +302,13 @@ bool ElementsCollectionCache::cacheName(const QString &path, const QUuid &uuid) } /** - * @brief ElementsCollectionCache::cachePixmap - * Cache the current (i.e. last retrieved) pixmap - * @param path : Element path (as obtained using ElementsLocation::toString()) - * @param uuid : Element uuid - * @return True if the caching succeeded, false otherwise. - * @see pixmap() - */ + @brief ElementsCollectionCache::cachePixmap + Cache the current (i.e. last retrieved) pixmap + @param path : Element path (as obtained using ElementsLocation::toString()) + @param uuid : Element uuid + @return True if the caching succeeded, false otherwise. + @see pixmap() +*/ bool ElementsCollectionCache::cachePixmap(const QString &path, const QUuid &uuid) { QByteArray ba; diff --git a/sources/elementsmover.cpp b/sources/elementsmover.cpp index 3452f427f..0ddd63ff1 100644 --- a/sources/elementsmover.cpp +++ b/sources/elementsmover.cpp @@ -28,8 +28,8 @@ #include "elementtextitemgroup.h" /** - * @brief ElementsMover::ElementsMover Constructor - */ + @brief ElementsMover::ElementsMover Constructor +*/ ElementsMover::ElementsMover() : movement_running_(false), current_movement_(), @@ -41,27 +41,27 @@ ElementsMover::ElementsMover() : } /** - * @brief ElementsMover::~ElementsMover Destructor - */ + @brief ElementsMover::~ElementsMover Destructor +*/ ElementsMover::~ElementsMover() { } /** - * @brief ElementsMover::isReady - * @return True if this element mover is ready to be used. - * A element mover is ready when the previous managed movement is finish. - */ + @brief ElementsMover::isReady + @return True if this element mover is ready to be used. + A element mover is ready when the previous managed movement is finish. +*/ bool ElementsMover::isReady() const { return(!movement_running_); } /** - * @brief ElementsMover::beginMovement - * Start a new movement - * @param diagram diagram where the movement is applied - * @param driver_item item moved by mouse and don't be moved by Element mover - * @return the numbers of items to be moved or -1 if movement can't be init. - */ + @brief ElementsMover::beginMovement + Start a new movement + @param diagram diagram where the movement is applied + @param driver_item item moved by mouse and don't be moved by Element mover + @return the numbers of items to be moved or -1 if movement can't be init. +*/ int ElementsMover::beginMovement(Diagram *diagram, QGraphicsItem *driver_item) { // They must be no movement in progress @@ -105,10 +105,10 @@ int ElementsMover::beginMovement(Diagram *diagram, QGraphicsItem *driver_item) } /** - * @brief ElementsMover::continueMovement - * Add a move to the current movement. - * @param movement movement to applied - */ + @brief ElementsMover::continueMovement + Add a move to the current movement. + @param movement movement to applied +*/ void ElementsMover::continueMovement(const QPointF &movement) { if (!movement_running_ || movement.isNull()) return; @@ -142,11 +142,11 @@ void ElementsMover::continueMovement(const QPointF &movement) } /** - * @brief ElementsMover::endMovement - * Ended the current movement by creating an undo added to the undostack of the diagram. - * If there is only one element moved, we try to auto-connect new conductor from this element - * and other possible element. - */ + @brief ElementsMover::endMovement + Ended the current movement by creating an undo added to the undostack of the diagram. + If there is only one element moved, we try to auto-connect new conductor from this element + and other possible element. +*/ void ElementsMover::endMovement() { // A movement must be inited diff --git a/sources/elementspanel.cpp b/sources/elementspanel.cpp index 6b66b740c..f855ccc08 100644 --- a/sources/elementspanel.cpp +++ b/sources/elementspanel.cpp @@ -186,10 +186,10 @@ bool ElementsPanel::matchesFilter(const QTreeWidgetItem *item, const QString& fi } /** - * @brief ElementsPanel::reload - * Reload the elements tree - * @param reload_collections true for read all collections since their sources (files, projects ...) - */ + @brief ElementsPanel::reload + Reload the elements tree + @param reload_collections true for read all collections since their sources (files, projects ...) +*/ void ElementsPanel::reload(bool reload_collections) { Q_UNUSED(reload_collections); diff --git a/sources/elementspanelwidget.cpp b/sources/elementspanelwidget.cpp index e3a7a3ed4..8282be4f0 100644 --- a/sources/elementspanelwidget.cpp +++ b/sources/elementspanelwidget.cpp @@ -215,7 +215,7 @@ void ElementsPanelWidget::deleteDiagram() { /** Emet le signal requestForDiagramMoveUpTop avec le schema selectionne -+ */ ++*/ void ElementsPanelWidget::moveDiagramUpTop() { if (Diagram *selected_diagram = elements_panel -> selectedDiagram()) { emit(requestForDiagramMoveUpTop(selected_diagram)); diff --git a/sources/elementtextpattern.cpp b/sources/elementtextpattern.cpp index b1253f948..22d2da5ae 100644 --- a/sources/elementtextpattern.cpp +++ b/sources/elementtextpattern.cpp @@ -35,10 +35,10 @@ #include /** - * @brief ExportElementTextPattern::ExportElementTextPattern - * Constructor - * @param elmt - */ + @brief ExportElementTextPattern::ExportElementTextPattern + Constructor + @param elmt +*/ ExportElementTextPattern::ExportElementTextPattern(Element *elmt) : m_element(elmt) { @@ -74,10 +74,10 @@ ExportElementTextPattern::ExportElementTextPattern(Element *elmt) : } /** - * @brief ExportElementTextConf::getName - * Open a dialog to let user set the name of the conf and return it - * @return - */ + @brief ExportElementTextConf::getName + Open a dialog to let user set the name of the conf and return it + @return +*/ QString ExportElementTextPattern::getName(bool &ok) const { QString text = QInputDialog::getText(parentWidget(), @@ -159,11 +159,11 @@ ImportElementTextPattern::ImportElementTextPattern(Element *elmt): } /** - * @brief ImportElementTextPattern::getName - * Open a dialog to let user select a conf - * @param ok - * @return - */ + @brief ImportElementTextPattern::getName + Open a dialog to let user select a conf + @param ok + @return +*/ QString ImportElementTextPattern::getName(const QStringList& list, bool *ok, bool *erase) const { return ImportElementTextPatternDialog::getItem(parentWidget(), @@ -185,11 +185,11 @@ QWidget *ImportElementTextPattern::parentWidget() const /** - * @brief ImportElementTextPattern::apply - * Apply the user choice - * @param name : the name of the selected pattern - * @param erase : erase the existing texts and groups of element. - */ + @brief ImportElementTextPattern::apply + Apply the user choice + @param name : the name of the selected pattern + @param erase : erase the existing texts and groups of element. +*/ void ImportElementTextPattern::apply(QString name, bool erase) const { if(!name.endsWith(".xml")) diff --git a/sources/elementtextsmover.cpp b/sources/elementtextsmover.cpp index 878255199..cb3cca76f 100644 --- a/sources/elementtextsmover.cpp +++ b/sources/elementtextsmover.cpp @@ -23,26 +23,26 @@ #include /** - * @brief ElementTextsMover::ElementTextsMover - */ + @brief ElementTextsMover::ElementTextsMover +*/ ElementTextsMover::ElementTextsMover() {} /** - * @brief ElementTextsMover::isReady - * @return true if this ElementTextsMover is ready to process a new movement. - * False if this ElementTextsMover is actually process a movement - */ + @brief ElementTextsMover::isReady + @return true if this ElementTextsMover is ready to process a new movement. + False if this ElementTextsMover is actually process a movement +*/ bool ElementTextsMover::isReady() const { return(!m_movement_running); } /** - * @brief ElementTextsMover::beginMovement - * Begin a movement - * @param diagram : diagram where the movement is apply - * @param driver_item : item moved by the mouse - * @return : the number of moved text (driver_item include), or -1 if this ElementTextsMover can't begin a movement - */ + @brief ElementTextsMover::beginMovement + Begin a movement + @param diagram : diagram where the movement is apply + @param driver_item : item moved by the mouse + @return : the number of moved text (driver_item include), or -1 if this ElementTextsMover can't begin a movement +*/ int ElementTextsMover::beginMovement(Diagram *diagram, QGraphicsItem *driver_item) { if (m_movement_running || !diagram) @@ -101,9 +101,9 @@ void ElementTextsMover::continueMovement(QGraphicsSceneMouseEvent *event) } /** - * @brief ElementTextsMover::endMovement - * Finish the movement by pushing an undo command to the parent diagram of text item - */ + @brief ElementTextsMover::endMovement + Finish the movement by pushing an undo command to the parent diagram of text item +*/ void ElementTextsMover::endMovement() { //No movement or no items to move diff --git a/sources/exportproperties.cpp b/sources/exportproperties.cpp index 45265cf52..2dadaa24d 100644 --- a/sources/exportproperties.cpp +++ b/sources/exportproperties.cpp @@ -83,9 +83,9 @@ void ExportProperties::fromSettings(QSettings &settings, const QString &prefix) } /** - * @brief ExportProperties::defaultProperties - * @return the default properties stored in the setting file - */ + @brief ExportProperties::defaultProperties + @return the default properties stored in the setting file +*/ ExportProperties ExportProperties::defaultExportProperties() { QSettings settings; @@ -97,9 +97,9 @@ ExportProperties ExportProperties::defaultExportProperties() } /** - * @brief ExportProperties::defaultPrintProperties - * @return the default properties stored in the setting file - */ + @brief ExportProperties::defaultPrintProperties + @return the default properties stored in the setting file +*/ ExportProperties ExportProperties::defaultPrintProperties() { QSettings settings; diff --git a/sources/factory/elementfactory.cpp b/sources/factory/elementfactory.cpp index 6246b6ac6..c41c4e097 100644 --- a/sources/factory/elementfactory.cpp +++ b/sources/factory/elementfactory.cpp @@ -25,12 +25,12 @@ ElementFactory* ElementFactory::factory_ = nullptr; /** - * @brief ElementFactory::createElement - * @param location create element at this location - * @param qgi parent item for this elemnt - * @param state state of the creation - * @return the element or 0 - */ + @brief ElementFactory::createElement + @param location create element at this location + @param qgi parent item for this elemnt + @param state state of the creation + @return the element or 0 +*/ Element * ElementFactory::createElement(const ElementsLocation &location, QGraphicsItem *qgi, int *state) { if (Q_UNLIKELY( !(location.isElement() && location.exist()) )) diff --git a/sources/factory/elementfactory.h b/sources/factory/elementfactory.h index 9dc4a36df..9d5d71889 100644 --- a/sources/factory/elementfactory.h +++ b/sources/factory/elementfactory.h @@ -25,12 +25,11 @@ class ElementsLocation; class QGraphicsItem; /** - * @brief The ElementFactory class - *this class is a pattern factory and also a singleton factory. - *this class create new instance of herited class element like - *simple element or report element. - * - */ + @brief The ElementFactory class + this class is a pattern factory and also a singleton factory. + this class create new instance of herited class element like + simple element or report element. +*/ class ElementFactory { //methods for singleton pattern diff --git a/sources/factory/elementpicturefactory.cpp b/sources/factory/elementpicturefactory.cpp index 2cb0b11bc..2529cbe96 100644 --- a/sources/factory/elementpicturefactory.cpp +++ b/sources/factory/elementpicturefactory.cpp @@ -32,13 +32,13 @@ ElementPictureFactory* ElementPictureFactory::m_factory = nullptr; /** - * @brief ElementPictureFactory::getPictures - * Set the picture of the element at location. - * Note, picture can be null - * @param location - * @param picture - * @param low_picture - */ + @brief ElementPictureFactory::getPictures + Set the picture of the element at location. + Note, picture can be null + @param location + @param picture + @param low_picture +*/ void ElementPictureFactory::getPictures(const ElementsLocation &location, QPicture &picture, QPicture &low_picture) { if(!location.exist()) { @@ -68,11 +68,11 @@ void ElementPictureFactory::getPictures(const ElementsLocation &location, QPictu } /** - * @brief ElementPictureFactory::pixmap - * @param location - * @return the pixmap of the element at @location - * Note pixmap can be null - */ + @brief ElementPictureFactory::pixmap + @param location + @return the pixmap of the element at @location + Note pixmap can be null +*/ QPixmap ElementPictureFactory::pixmap(const ElementsLocation &location) { QUuid uuid = location.uuid(); @@ -113,10 +113,10 @@ QPixmap ElementPictureFactory::pixmap(const ElementsLocation &location) /** - * @brief ElementPictureFactory::getPrimitives - * @param location - * @return The primtive used to draw the element at @location - */ + @brief ElementPictureFactory::getPrimitives + @param location + @return The primtive used to draw the element at @location +*/ ElementPictureFactory::primitives ElementPictureFactory::getPrimitives(const ElementsLocation &location) { if(!m_primitives_H.contains(location.uuid())) @@ -132,15 +132,15 @@ ElementPictureFactory::~ElementPictureFactory() { } /** - * @brief ElementPictureFactory::build - * Build the picture from location. - * @param location - * @param picture - * @param low_picture - * if @picture and/or @low_picture are not null this function draw on it and don't store it. - * if null, this function create a QPicture for normal and low zoom, draw on it and store it in m_pictures_H and m_low_pictures_H - * @return - */ + @brief ElementPictureFactory::build + Build the picture from location. + @param location + @param picture + @param low_picture + if @picture and/or @low_picture are not null this function draw on it and don't store it. + if null, this function create a QPicture for normal and low zoom, draw on it and store it in m_pictures_H and m_low_pictures_H + @return +*/ bool ElementPictureFactory::build(const ElementsLocation &location, QPicture *picture, QPicture *low_picture) { QDomElement dom = location.xml(); @@ -542,11 +542,11 @@ void ElementPictureFactory::parseText(const QDomElement &dom, QPainter &painter, } /** - * @brief ElementPictureFactory::setPainterStyle - * apply the style store in dom to painter. - * @param dom - * @param painter - */ + @brief ElementPictureFactory::setPainterStyle + apply the style store in dom to painter. + @param dom + @param painter +*/ void ElementPictureFactory::setPainterStyle(const QDomElement &dom, QPainter &painter) const { QPen pen = painter.pen(); diff --git a/sources/factory/elementpicturefactory.h b/sources/factory/elementpicturefactory.h index 811cf99fb..03b80417b 100644 --- a/sources/factory/elementpicturefactory.h +++ b/sources/factory/elementpicturefactory.h @@ -30,10 +30,10 @@ class QPainter; class QGraphicsSimpleTextItem; /** - * @brief The ElementPictureFactory class - * This class is singleton factory, use - * to create and get the picture use by elements - */ + @brief The ElementPictureFactory class + This class is singleton factory, use + to create and get the picture use by elements +*/ class ElementPictureFactory { public : @@ -49,9 +49,9 @@ class ElementPictureFactory /** - * @brief instance - * @return The instance of the factory - */ + @brief instance + @return The instance of the factory + */ static ElementPictureFactory* instance() { static QMutex mutex; @@ -67,9 +67,9 @@ class ElementPictureFactory } /** - * @brief dropInstance - * Drop the instance of factory - */ + @brief dropInstance + Drop the instance of factory + */ static void dropInstance() { static QMutex mutex; diff --git a/sources/factory/propertieseditorfactory.cpp b/sources/factory/propertieseditorfactory.cpp index 6966fec09..cf4f7c36f 100644 --- a/sources/factory/propertieseditorfactory.cpp +++ b/sources/factory/propertieseditorfactory.cpp @@ -36,12 +36,12 @@ #include "projectdbmodel.h" /** - * @brief PropertiesEditorFactory::propertiesEditor - * @param model : the model to be edited - * @param editor : if the properties editor to be created is the same class as @editor, the this function set @item as edited item of @editor and return editor - * @param parent : parent widget of the returned editor - * @return an editor or nullptr - */ + @brief PropertiesEditorFactory::propertiesEditor + @param model : the model to be edited + @param editor : if the properties editor to be created is the same class as @editor, the this function set @item as edited item of @editor and return editor + @param parent : parent widget of the returned editor + @return an editor or nullptr +*/ PropertiesEditorWidget *PropertiesEditorFactory::propertiesEditor(QAbstractItemModel *model, PropertiesEditorWidget *editor, QWidget *parent) { Q_UNUSED(model) diff --git a/sources/factory/qetgraphicstablefactory.cpp b/sources/factory/qetgraphicstablefactory.cpp index e120e1621..9a85d1e2f 100644 --- a/sources/factory/qetgraphicstablefactory.cpp +++ b/sources/factory/qetgraphicstablefactory.cpp @@ -34,11 +34,11 @@ 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; - * @param diagram - */ + @brief QetGraphicsTableFactory::createAndAddNomenclature + Open a dialog for ask user the config of the table ,create a nomenclature table + and add it to diagram @diagram; + @param diagram +*/ void QetGraphicsTableFactory::createAndAddNomenclature(Diagram *diagram) { QScopedPointer d(new AddTableDialog(new ElementQueryWidget(), diagram->views().first())); @@ -50,11 +50,11 @@ 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; - * @param 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; + @param diagram +*/ void QetGraphicsTableFactory::createAndAddSummary(Diagram *diagram) { QScopedPointer d(new AddTableDialog(new SummaryQueryWidget(), diagram->views().first())); @@ -104,14 +104,14 @@ void QetGraphicsTableFactory::create(Diagram *diagram, AddTableDialog *dialog) } /** - * @brief QetGraphicsTableFactory::newTable - * Create a new table . - * @param diagram : Diagram where we must add the new table. - * @param dialog : dialog conf, it's used to setup the model. - * @param previous_table : If you know that the new table will have a previous table and you already now the previous table, - * set it now they will improve time needed for creating the new table by avoiding to create a new model. - * @return the new table - */ + @brief QetGraphicsTableFactory::newTable + Create a new table . + @param diagram : Diagram where we must add the new table. + @param dialog : dialog conf, it's used to setup the model. + @param previous_table : If you know that the new table will have a previous table and you already now the previous table, + set it now they will improve time needed for creating the new table by avoiding to create a new model. + @return the new table +*/ QetGraphicsTableItem *QetGraphicsTableFactory::newTable(Diagram *diagram, AddTableDialog *dialog, QetGraphicsTableItem *previous_table) { auto table = new QetGraphicsTableItem(); diff --git a/sources/factory/qetgraphicstablefactory.h b/sources/factory/qetgraphicstablefactory.h index 868467623..c245d26c2 100644 --- a/sources/factory/qetgraphicstablefactory.h +++ b/sources/factory/qetgraphicstablefactory.h @@ -23,8 +23,8 @@ class QetGraphicsTableItem; class AddTableDialog; /** - * @brief The QetGraphicsTableFactory class - */ + @brief The QetGraphicsTableFactory class +*/ class QetGraphicsTableFactory { public: diff --git a/sources/factory/ui/addtabledialog.cpp b/sources/factory/ui/addtabledialog.cpp index b50eba5a9..3201471f2 100644 --- a/sources/factory/ui/addtabledialog.cpp +++ b/sources/factory/ui/addtabledialog.cpp @@ -24,11 +24,11 @@ #include /** - * @brief AddTableDialog::AddTableDialog - * @param content_widget : the widget to display in the "content" tab. - * This dialog take ownership of @content_widget. - * @param parent : parent widget. - */ + @brief AddTableDialog::AddTableDialog + @param content_widget : the widget to display in the "content" tab. + This dialog take ownership of @content_widget. + @param parent : parent widget. +*/ AddTableDialog::AddTableDialog(QWidget *content_widget, QWidget *parent) : QDialog(parent), ui(new Ui::AddTableDialog) @@ -46,57 +46,57 @@ AddTableDialog::AddTableDialog(QWidget *content_widget, QWidget *parent) : } /** - * @brief AddTableDialog::~AddNomenclatureDialog - */ + @brief AddTableDialog::~AddNomenclatureDialog +*/ AddTableDialog::~AddTableDialog() { delete ui; } /** - * @brief AddTableDialog::setQueryWidget - * Not implemented yet - * @param widget - */ + @brief AddTableDialog::setQueryWidget + Not implemented yet + @param widget +*/ void AddTableDialog::setQueryWidget(QWidget *widget) { Q_UNUSED(widget) } /** - * @brief AddTableDialog::adjustTableToFolio - * @return - */ + @brief AddTableDialog::adjustTableToFolio + @return +*/ bool AddTableDialog::adjustTableToFolio() const { return ui->m_adjust_table_size_cb->isChecked(); } /** - * @brief AddTableDialog::addNewTableToNewDiagram - * @return - */ + @brief AddTableDialog::addNewTableToNewDiagram + @return +*/ bool AddTableDialog::addNewTableToNewDiagram() const { return ui->m_add_table_and_folio->isChecked(); } /** - * @brief AddTableDialog::tableName - * @return - */ + @brief AddTableDialog::tableName + @return +*/ QString AddTableDialog::tableName() const { return ui->m_table_name_le->text(); } /** - * @brief AddTableDialog::headerMargins - * @return - */ + @brief AddTableDialog::headerMargins + @return +*/ QMargins AddTableDialog::headerMargins() const { return m_header_margins; } /** - * @brief AddTableDialog::headerAlignment - * @return - */ + @brief AddTableDialog::headerAlignment + @return +*/ Qt::Alignment AddTableDialog::headerAlignment() const { switch (ui->m_header_alignment_cb->currentIndex()) { @@ -110,25 +110,25 @@ Qt::Alignment AddTableDialog::headerAlignment() const } /** - * @brief AddTableDialog::headerFont - * @return - */ + @brief AddTableDialog::headerFont + @return +*/ QFont AddTableDialog::headerFont() const { return m_header_font; } /** - * @brief AddTableDialog::tableMargins - * @return - */ + @brief AddTableDialog::tableMargins + @return +*/ QMargins AddTableDialog::tableMargins() const { return m_table_margins; } /** - * @brief AddTableDialog::tableAlignment - * @return - */ + @brief AddTableDialog::tableAlignment + @return +*/ Qt::Alignment AddTableDialog::tableAlignment() const { switch (ui->m_table_alignment_cb->currentIndex()) { @@ -142,9 +142,9 @@ Qt::Alignment AddTableDialog::tableAlignment() const } /** - * @brief AddTableDialog::tableFont - * @return - */ + @brief AddTableDialog::tableFont + @return +*/ QFont AddTableDialog::tableFont() const { return m_table_font; } diff --git a/sources/factory/ui/addtabledialog.h b/sources/factory/ui/addtabledialog.h index 484e44d84..0aca20e8e 100644 --- a/sources/factory/ui/addtabledialog.h +++ b/sources/factory/ui/addtabledialog.h @@ -27,13 +27,13 @@ class AddTableDialog; } /** - * @brief The AddTableDialog class - * Provide a dialog used to edit the properties of table befor adding to a diagram. - * The main difference betwen this dialog and the widget used to edit the properties of table - * is that the dialog have two extra check box. - * 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 - */ + @brief The AddTableDialog class + Provide a dialog used to edit the properties of table befor adding to a diagram. + The main difference betwen this dialog and the widget used to edit the properties of table + is that the dialog have two extra check box. + 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 +*/ class AddTableDialog : public QDialog { Q_OBJECT diff --git a/sources/machine_info.cpp b/sources/machine_info.cpp index 37ec10778..77fa4de1f 100644 --- a/sources/machine_info.cpp +++ b/sources/machine_info.cpp @@ -258,7 +258,7 @@ void Machine_info::init_get_cpu_info_macos() /** @brief Machine_info::i_max_screen_width @return max screen width - */ +*/ int32_t Machine_info::i_max_screen_width() { return pc.screen.Max_width; diff --git a/sources/newelementwizard.cpp b/sources/newelementwizard.cpp index a9cf648f0..65113e8a5 100644 --- a/sources/newelementwizard.cpp +++ b/sources/newelementwizard.cpp @@ -55,10 +55,10 @@ NewElementWizard::~NewElementWizard() { } /** - * @brief NewElementWizard::preselectedLocation - * Select item in the tree view represented by location, - * @param location - */ + @brief NewElementWizard::preselectedLocation + Select item in the tree view represented by location, + @param location +*/ void NewElementWizard::preselectedLocation(const ElementsLocation &location) { QModelIndex index = m_model->indexFromLocation(location); @@ -69,9 +69,9 @@ void NewElementWizard::preselectedLocation(const ElementsLocation &location) } /** - * @brief NewElementWizard::buildStep1 - * @return - */ + @brief NewElementWizard::buildStep1 + @return +*/ QWizardPage *NewElementWizard::buildStep1() { QWizardPage *page = new QWizardPage(); @@ -96,9 +96,9 @@ QWizardPage *NewElementWizard::buildStep1() } /** - * @brief NewElementWizard::buildStep2 - * @return - */ + @brief NewElementWizard::buildStep2 + @return +*/ QWizardPage *NewElementWizard::buildStep2() { QWizardPage *page = new QWizardPage(); page -> setProperty("WizardState", Filename); @@ -120,9 +120,9 @@ QWizardPage *NewElementWizard::buildStep2() { } /** - * @brief NewElementWizard::buildStep3 - * @return - */ + @brief NewElementWizard::buildStep3 + @return +*/ QWizardPage *NewElementWizard::buildStep3() { QWizardPage *page = new QWizardPage(); page -> setProperty("WizardState", Names); @@ -141,9 +141,9 @@ QWizardPage *NewElementWizard::buildStep3() { } /** - * @brief NewElementWizard::validateCurrentPage - * @return true if the current step is valid - */ + @brief NewElementWizard::validateCurrentPage + @return true if the current step is valid +*/ bool NewElementWizard::validateCurrentPage() { WizardState wizard_state = static_cast(currentPage() -> property("WizardState").toInt()); @@ -166,10 +166,10 @@ bool NewElementWizard::validateCurrentPage() } /** - * @brief NewElementWizard::validStep1 - * Valid the setp 1 - * @return trie if the step is valid. - */ + @brief NewElementWizard::validStep1 + Valid the setp 1 + @return trie if the step is valid. +*/ bool NewElementWizard::validStep1() { //They must be one directory selected @@ -198,10 +198,10 @@ bool NewElementWizard::validStep1() } /** - * @brief NewElementWizard::validStep2 - * Valid the step 2 - * @return true if step is valid - */ + @brief NewElementWizard::validStep2 + Valid the step 2 + @return true if step is valid +*/ bool NewElementWizard::validStep2() { QString file_name = m_qle_filename -> text(); @@ -230,9 +230,9 @@ bool NewElementWizard::validStep2() { } /** - * @brief NewElementWizard::createNewElement - * Lauch an element editor for create the new element - */ + @brief NewElementWizard::createNewElement + Lauch an element editor for create the new element +*/ void NewElementWizard::createNewElement() { QETElementEditor *edit_new_element = new QETElementEditor(parentWidget()); edit_new_element -> setNames(m_names_list -> names()); diff --git a/sources/nomenclature.cpp b/sources/nomenclature.cpp index 97b315b17..761d9aece 100644 --- a/sources/nomenclature.cpp +++ b/sources/nomenclature.cpp @@ -81,10 +81,10 @@ bool nomenclature::saveToCSVFile() } /** - * @brief nomenclature::getNomenclature - * Create and formated a nomenclature to csv file. - * @return The QString of nomenclature - */ + @brief nomenclature::getNomenclature + Create and formated a nomenclature to csv file. + @return The QString of nomenclature +*/ QString nomenclature::getNomenclature() { //Process... @@ -161,10 +161,10 @@ QString nomenclature::getNomenclature() } /** - * @brief nomenclature::getElementInfo - * @param elmt : the element to getinfo - * @return : QString with information about element formated to csv file - */ + @brief nomenclature::getElementInfo + @param elmt : the element to getinfo + @return : QString with information about element formated to csv file +*/ QString nomenclature::getElementInfo(Element *elmt) { QString info; diff --git a/sources/projectconfigpages.cpp b/sources/projectconfigpages.cpp index a106209ae..0c769ff20 100644 --- a/sources/projectconfigpages.cpp +++ b/sources/projectconfigpages.cpp @@ -204,7 +204,7 @@ void ProjectMainConfigPage::readValuesFromProject() { /** Set the content of this page read only if the project is read only, editable if the project is editable. - */ +*/ void ProjectMainConfigPage::adjustReadOnly() { bool is_read_only = m_project -> isReadOnly(); title_value_ -> setReadOnly(is_read_only); @@ -213,11 +213,11 @@ void ProjectMainConfigPage::adjustReadOnly() { //######################################################################################// /** - * @brief ProjectAutoNumConfigPage::ProjectAutoNumConfigPage - * Default constructor - * @param project, project to edit - * @param parent, parent widget - */ + @brief ProjectAutoNumConfigPage::ProjectAutoNumConfigPage + Default constructor + @param project, project to edit + @param parent, parent widget +*/ ProjectAutoNumConfigPage::ProjectAutoNumConfigPage (QETProject *project, QWidget *parent) : ProjectConfigPage(project, parent) { @@ -227,32 +227,32 @@ ProjectAutoNumConfigPage::ProjectAutoNumConfigPage (QETProject *project, QWidget } /** - * @brief ProjectAutoNumConfigPage::title - * Title of this config page - * @return - */ + @brief ProjectAutoNumConfigPage::title + Title of this config page + @return +*/ QString ProjectAutoNumConfigPage::title() const { return tr("Numérotation auto"); } /** - * @brief ProjectAutoNumConfigPage::icon - * Icon of this config pafe - * @return - */ + @brief ProjectAutoNumConfigPage::icon + Icon of this config pafe + @return +*/ QIcon ProjectAutoNumConfigPage::icon() const { return QIcon (QET::Icons::AutoNum); } /** - * @brief ProjectAutoNumConfigPage::applyProjectConf - */ + @brief ProjectAutoNumConfigPage::applyProjectConf +*/ void ProjectAutoNumConfigPage::applyProjectConf() {} /** - * @brief ProjectAutoNumConfigPage::initWidgets - * Init some widget of this page - */ + @brief ProjectAutoNumConfigPage::initWidgets + Init some widget of this page +*/ void ProjectAutoNumConfigPage::initWidgets() { QTabWidget *tab_widget = new QTabWidget(this); @@ -283,9 +283,9 @@ void ProjectAutoNumConfigPage::initWidgets() } /** - * @brief ProjectAutoNumConfigPage::readValuesFromProject - * Read value stored on project, and update display - */ + @brief ProjectAutoNumConfigPage::readValuesFromProject + Read value stored on project, and update display +*/ void ProjectAutoNumConfigPage::readValuesFromProject() { //Conductor Tab @@ -305,16 +305,16 @@ void ProjectAutoNumConfigPage::readValuesFromProject() } /** - * @brief ProjectAutoNumConfigPage::adjustReadOnly - * set this config page disable if project is read only - */ + @brief ProjectAutoNumConfigPage::adjustReadOnly + set this config page disable if project is read only +*/ void ProjectAutoNumConfigPage::adjustReadOnly() { } /** - * @brief ProjectAutoNumConfigPage::buildConnections - * setup some connections - */ + @brief ProjectAutoNumConfigPage::buildConnections + setup some connections +*/ void ProjectAutoNumConfigPage::buildConnections() { //Management Tab @@ -340,30 +340,30 @@ void ProjectAutoNumConfigPage::buildConnections() } /** - * @brief ProjectAutoNumConfigPage::updateContext_conductor - * Display the current selected context for conductor - * @param str, key of context stored in project - */ + @brief ProjectAutoNumConfigPage::updateContext_conductor + Display the current selected context for conductor + @param str, key of context stored in project +*/ void ProjectAutoNumConfigPage::updateContextConductor(const QString& str) { if (str == tr("Nom de la nouvelle numérotation")) m_saw_conductor -> setContext(NumerotationContext()); else m_saw_conductor ->setContext(m_project->conductorAutoNum(str)); } /** - * @brief ProjectAutoNumConfigPage::updateContext_folio - * Display the current selected context for folio - * @param str, key of context stored in project - */ + @brief ProjectAutoNumConfigPage::updateContext_folio + Display the current selected context for folio + @param str, key of context stored in project +*/ void ProjectAutoNumConfigPage::updateContextFolio(const QString& str) { if (str == tr("Nom de la nouvelle numérotation")) m_saw_folio -> setContext(NumerotationContext()); else m_saw_folio ->setContext(m_project->folioAutoNum(str)); } /** - * @brief ProjectAutoNumConfigPage::updateContextElement - * Display the current selected context for element - * @param str, key of context stored in project - */ + @brief ProjectAutoNumConfigPage::updateContextElement + Display the current selected context for element + @param str, key of context stored in project +*/ void ProjectAutoNumConfigPage::updateContextElement(const QString& str) { if (str == tr("Nom de la nouvelle numérotation")) @@ -377,9 +377,9 @@ void ProjectAutoNumConfigPage::updateContextElement(const QString& str) } /** - * @brief ProjectAutoNumConfigPage::saveContextElement - * Save the current displayed Element formula in project - */ + @brief ProjectAutoNumConfigPage::saveContextElement + Save the current displayed Element formula in project +*/ void ProjectAutoNumConfigPage::saveContextElement() { // If the text is the default text "Name of new numerotation" save the edited context @@ -408,9 +408,9 @@ void ProjectAutoNumConfigPage::saveContextElement() } /** - * @brief ProjectAutoNumConfigPage::removeContextElement - * Remove from project the current element numerotation context - */ + @brief ProjectAutoNumConfigPage::removeContextElement + Remove from project the current element numerotation context +*/ void ProjectAutoNumConfigPage::removeContextElement() { //if default text, return @@ -421,9 +421,9 @@ void ProjectAutoNumConfigPage::removeContextElement() } /** - * @brief ProjectAutoNumConfigPage::saveContext_conductor - * Save the current displayed conductor context in project - */ + @brief ProjectAutoNumConfigPage::saveContext_conductor + Save the current displayed conductor context in project +*/ void ProjectAutoNumConfigPage::saveContextConductor() { // If the text is the default text "Name of new numerotation" save the edited context @@ -451,9 +451,9 @@ void ProjectAutoNumConfigPage::saveContextConductor() } /** - * @brief ProjectAutoNumConfigPage::saveContext_folio - * Save the current displayed folio context in project - */ + @brief ProjectAutoNumConfigPage::saveContext_folio + Save the current displayed folio context in project +*/ void ProjectAutoNumConfigPage::saveContextFolio() { // If the text is the default text "Name of new numerotation" save the edited context // With the the name "No name" @@ -474,9 +474,9 @@ void ProjectAutoNumConfigPage::saveContextFolio() { } /** - * @brief ProjectAutoNumConfigPage::applyAutoNum - * Apply auto folio numbering, New Folios or Selected Folios - */ + @brief ProjectAutoNumConfigPage::applyAutoNum + Apply auto folio numbering, New Folios or Selected Folios +*/ void ProjectAutoNumConfigPage::applyAutoNum() { if (m_faw->newFolios){ @@ -498,9 +498,9 @@ void ProjectAutoNumConfigPage::applyAutoNum() { } /** - * @brief ProjectAutoNumConfigPage::applyAutoManagement - * Apply Management Options in Selected Folios - */ + @brief ProjectAutoNumConfigPage::applyAutoManagement + Apply Management Options in Selected Folios +*/ void ProjectAutoNumConfigPage::applyManagement() { int from; int to; @@ -592,9 +592,9 @@ void ProjectAutoNumConfigPage::applyManagement() { } /** - * @brief ProjectAutoNumConfigPage::removeContext - * Remove from project the current conductor numerotation context - */ + @brief ProjectAutoNumConfigPage::removeContext + Remove from project the current conductor numerotation context +*/ void ProjectAutoNumConfigPage::removeContextConductor() { //if default text, return if ( m_saw_conductor->contextComboBox()-> currentText() == tr("Nom de la nouvelle numérotation") ) return; @@ -604,9 +604,9 @@ void ProjectAutoNumConfigPage::removeContextConductor() { } /** - * @brief ProjectAutoNumConfigPage::removeContext_folio - * Remove from project the current folio numerotation context - */ + @brief ProjectAutoNumConfigPage::removeContext_folio + Remove from project the current folio numerotation context +*/ void ProjectAutoNumConfigPage::removeContextFolio() { //if default text, return if ( m_saw_folio->contextComboBox() -> currentText() == tr("Nom de la nouvelle numérotation") ) return; @@ -616,10 +616,10 @@ void ProjectAutoNumConfigPage::removeContextFolio() { } /** - * @brief ProjectAutoNumConfigPage::changeToTab - * @param tab index - * Change to Selected Tab - */ + @brief ProjectAutoNumConfigPage::changeToTab + @param tab index + Change to Selected Tab +*/ void ProjectAutoNumConfigPage::changeToTab(int i) { Q_UNUSED(i); diff --git a/sources/projectview.cpp b/sources/projectview.cpp index 434c570ab..7b54ddc1b 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -67,10 +67,10 @@ QETProject *ProjectView::project() { } /** - * @brief ProjectView::setProject - * Set the project display by the project view - * @param project - */ + @brief ProjectView::setProject + Set the project display by the project view + @param project +*/ void ProjectView::setProject(QETProject *project) { if (!m_project) @@ -99,9 +99,9 @@ QList ProjectView::diagram_views() const { } /** - * @brief ProjectView::currentDiagram - * @return The current active diagram view or nullptr if there isn't diagramView in this project view. - */ + @brief ProjectView::currentDiagram + @return The current active diagram view or nullptr if there isn't diagramView in this project view. +*/ DiagramView *ProjectView::currentDiagram() const { int current_tab_index = m_tab -> currentIndex(); if (current_tab_index == -1) @@ -276,11 +276,11 @@ bool ProjectView::tryClosingElementEditors() { } /** - * @brief ProjectView::tryClosingDiagrams - * try to close this project, if diagram or project option are changed - * a dialog ask if user want to save the modification. - * @return the answer of dialog or discard if no change. - */ + @brief ProjectView::tryClosingDiagrams + try to close this project, if diagram or project option are changed + a dialog ask if user want to save the modification. + @return the answer of dialog or discard if no change. +*/ int ProjectView::tryClosingDiagrams() { if (!m_project) return(QMessageBox::Discard); @@ -345,10 +345,10 @@ QETResult ProjectView::noProjectResult() const { } /** - * @brief ProjectView::removeDiagram - * Remove a diagram (folio) of the project - * @param diagram_view : diagram view to remove - */ + @brief ProjectView::removeDiagram + Remove a diagram (folio) of the project + @param diagram_view : diagram view to remove +*/ void ProjectView::removeDiagram(DiagramView *diagram_view) { if (!diagram_view) @@ -493,8 +493,8 @@ void ProjectView::moveDiagramDown(Diagram *diagram) { } /* - * Deplace le schema diagram_view vers le haut / la gauche en position 0 - */ + Deplace le schema diagram_view vers le haut / la gauche en position 0 +*/ void ProjectView::moveDiagramUpTop(DiagramView *diagram_view) { if (!diagram_view) return; @@ -508,8 +508,8 @@ void ProjectView::moveDiagramUpTop(DiagramView *diagram_view) } /* - * Deplace le schema diagram vers le haut / la gauche en position 0 - */ + Deplace le schema diagram vers le haut / la gauche en position 0 +*/ void ProjectView::moveDiagramUpTop(Diagram *diagram) { moveDiagramUpTop(findDiagram(diagram)); @@ -782,11 +782,11 @@ void ProjectView::initLayout() { /** - * @brief ProjectView::loadDiagrams - * Load diagrams of project. - * We create a diagram view for each diagram, - * and add it to the project view. - */ + @brief ProjectView::loadDiagrams + Load diagrams of project. + We create a diagram view for each diagram, + and add it to the project view. +*/ void ProjectView::loadDiagrams() { if (!m_project) return; @@ -822,9 +822,9 @@ void ProjectView::loadDiagrams() } /** - * @brief ProjectView::updateWindowTitle - * Update the project view title - */ + @brief ProjectView::updateWindowTitle + Update the project view title +*/ void ProjectView::updateWindowTitle() { QString title; if (m_project) { @@ -852,10 +852,10 @@ void ProjectView::adjustReadOnlyState() { } /** - * @brief ProjectView::diagramAdded - * Slot called when qetproject emit diagramAdded - * @param diagram - */ + @brief ProjectView::diagramAdded + Slot called when qetproject emit diagramAdded + @param diagram +*/ void ProjectView::diagramAdded(Diagram *diagram) { auto dv = new DiagramView(diagram); @@ -881,10 +881,10 @@ void ProjectView::diagramAdded(Diagram *diagram) } /** - * @brief ProjectView::updateTabTitle - * Update the title of the tab which display the diagram view @diagram_view. - * @param diagram : The diagram view. - */ + @brief ProjectView::updateTabTitle + Update the title of the tab which display the diagram view @diagram_view. + @param diagram : The diagram view. +*/ void ProjectView::updateTabTitle(DiagramView *diagram_view) { int diagram_tab_id = m_diagram_ids.key(diagram_view, -1); @@ -911,9 +911,9 @@ void ProjectView::updateTabTitle(DiagramView *diagram_view) } /** - * @brief ProjectView::updateAllTabsTitle - * Update all tabs title - */ + @brief ProjectView::updateAllTabsTitle + Update all tabs title +*/ void ProjectView::updateAllTabsTitle() { for (DiagramView *dv : m_diagram_ids.values()) @@ -969,12 +969,12 @@ void ProjectView::rebuildDiagramsMap() { } /** - * @brief ProjectView::tabChanged - * Manage the tab change. - * If tab_id == -1 (there is no diagram opened), - * we display the fallback widget. - * @param tab_id - */ + @brief ProjectView::tabChanged + Manage the tab change. + If tab_id == -1 (there is no diagram opened), + we display the fallback widget. + @param tab_id +*/ void ProjectView::tabChanged(int tab_id) { if (tab_id == -1) diff --git a/sources/properties/reportproperties.cpp b/sources/properties/reportproperties.cpp index 61b913570..973e1857a 100644 --- a/sources/properties/reportproperties.cpp +++ b/sources/properties/reportproperties.cpp @@ -22,9 +22,9 @@ ReportProperties::ReportProperties() {} /** - * @brief ReportProperties::defaultProperties - * @return the default properties stored in the setting file - */ + @brief ReportProperties::defaultProperties + @return the default properties stored in the setting file +*/ QString ReportProperties::defaultProperties() { QSettings settings; diff --git a/sources/properties/xrefproperties.cpp b/sources/properties/xrefproperties.cpp index 538549761..f4116abe7 100644 --- a/sources/properties/xrefproperties.cpp +++ b/sources/properties/xrefproperties.cpp @@ -20,9 +20,9 @@ #include /** - * @brief XRefProperties::XRefProperties - * Default Constructor - */ + @brief XRefProperties::XRefProperties + Default Constructor +*/ XRefProperties::XRefProperties() { m_show_power_ctc = true; @@ -36,11 +36,11 @@ XRefProperties::XRefProperties() } /** - * @brief XRefProperties::toSettings - * Save to settings - * @param settings: QSettings to use - * @param prefix: prefix before properties name - */ + @brief XRefProperties::toSettings + Save to settings + @param settings: QSettings to use + @param prefix: prefix before properties name +*/ void XRefProperties::toSettings(QSettings &settings, const QString prefix) const { settings.setValue(prefix + "showpowerctc", m_show_power_ctc); QString display = m_display == Cross? "cross" : "contacts"; @@ -64,11 +64,11 @@ void XRefProperties::toSettings(QSettings &settings, const QString prefix) const } /** - * @brief XRefProperties::fromSettings - * load from settings - * @param settings: QSettings to use - * @param prefix: prefix before properties name - */ + @brief XRefProperties::fromSettings + load from settings + @param settings: QSettings to use + @param prefix: prefix before properties name +*/ void XRefProperties::fromSettings(const QSettings &settings, const QString prefix) { m_show_power_ctc = settings.value(prefix + "showpowerctc", true).toBool(); @@ -89,10 +89,10 @@ void XRefProperties::fromSettings(const QSettings &settings, const QString prefi } /** - * @brief XRefProperties::toXml - * Save to xml - * @param xml_element: QDomElement to use for saving - */ + @brief XRefProperties::toXml + Save to xml + @param xml_element: QDomElement to use for saving +*/ QDomElement XRefProperties::toXml(QDomDocument &xml_document) const { QDomElement xml_element = xml_document.createElement("xref"); @@ -123,10 +123,10 @@ QDomElement XRefProperties::toXml(QDomDocument &xml_document) const { } /** - * @brief XRefProperties::fromXml - * Load from xml - * @param xml_element: QDomElement to use for load - */ + @brief XRefProperties::fromXml + Load from xml + @param xml_element: QDomElement to use for load +*/ bool XRefProperties::fromXml(const QDomElement &xml_element) { m_show_power_ctc = xml_element.attribute("showpowerctc") == "true"; QString display = xml_element.attribute("displayhas", "cross"); @@ -153,12 +153,12 @@ bool XRefProperties::fromXml(const QDomElement &xml_element) { } /** - * @brief XRefProperties::defaultProperties - * @return the default properties stored in the setting file - * For the xref, there is 2 propreties. - * For coil, stored with the string "coil" in the returned QHash. - * For protection, stored with the string "protection" in the returned QHash. - */ + @brief XRefProperties::defaultProperties + @return the default properties stored in the setting file + For the xref, there is 2 propreties. + For coil, stored with the string "coil" in the returned QHash. + For protection, stored with the string "protection" in the returned QHash. +*/ QHash XRefProperties::defaultProperties() { QHash hash; diff --git a/sources/properties/xrefproperties.h b/sources/properties/xrefproperties.h index dc03196cf..9a292c3ec 100644 --- a/sources/properties/xrefproperties.h +++ b/sources/properties/xrefproperties.h @@ -22,9 +22,9 @@ #include /** - * @brief The XRefProperties class - * this class store properties used by XrefItem - */ + @brief The XRefProperties class + this class store properties used by XrefItem +*/ class XRefProperties : public PropertiesInterface { public: diff --git a/sources/qet.cpp b/sources/qet.cpp index 9a83f9e98..725db3424 100644 --- a/sources/qet.cpp +++ b/sources/qet.cpp @@ -69,11 +69,11 @@ bool Qet::surLeMemeAxe(Qet::Orientation a, Qet::Orientation b) { } /** - * @brief Qet::isOpposed - * @param a - * @param b - * @return true if a and b is opposed, else false; - */ + @brief Qet::isOpposed + @param a + @param b + @return true if a and b is opposed, else false; +*/ bool Qet::isOpposed(Qet::Orientation a, Qet::Orientation b) { bool result = false; @@ -100,19 +100,19 @@ bool Qet::isOpposed(Qet::Orientation a, Qet::Orientation b) } /** - * @brief Qet::isHorizontal - * @param a - * @return true if @a is horizontal, else false. - */ + @brief Qet::isHorizontal + @param a + @return true if @a is horizontal, else false. +*/ bool Qet::isHorizontal(Qet::Orientation a) { return(a == Qet::East || a == Qet::West); } /** - * @brief Qet::isVertical - * @param a - * @return true if @a is vertical, else false. - */ + @brief Qet::isVertical + @param a + @return true if @a is vertical, else false. +*/ bool Qet::isVertical(Qet::Orientation a) { return(a == Qet::North || a == Qet::South); } @@ -595,12 +595,12 @@ bool QET::writeXmlFile(QDomDocument &xml_doc, const QString &filepath, QString * } /** - * @brief QET::eachStrIsEqual - * @param qsl list of string to compare - * @return true if every string is identical, else false; - * The list must not be empty - * If the list can be empty, call isEmpty() before calling this function - */ + @brief QET::eachStrIsEqual + @param qsl list of string to compare + @return true if every string is identical, else false; + The list must not be empty + If the list can be empty, call isEmpty() before calling this function +*/ bool QET::eachStrIsEqual(const QStringList &qsl) { if (qsl.size() == 1) return true; foreach (const QString t, qsl) { @@ -610,10 +610,10 @@ bool QET::eachStrIsEqual(const QStringList &qsl) { } /** - * @brief QET::qetCollectionToString - * @param c QetCollection value to convert - * @return The QetCollection enum value converted to a QString - */ + @brief QET::qetCollectionToString + @param c QetCollection value to convert + @return The QetCollection enum value converted to a QString +*/ QString QET::qetCollectionToString(const QET::QetCollection &c) { switch (c) @@ -630,11 +630,11 @@ QString QET::qetCollectionToString(const QET::QetCollection &c) } /** - * @brief QET::qetCollectionFromString - * @param str string to convert - * @return The corresponding QetCollection value from a string. - * If the string don't match anything, we return the failsafe value QetCollection::Common - */ + @brief QET::qetCollectionFromString + @param str string to convert + @return The corresponding QetCollection value from a string. + If the string don't match anything, we return the failsafe value QetCollection::Common +*/ QET::QetCollection QET::qetCollectionFromString(const QString &str) { if (str == "common") @@ -648,11 +648,11 @@ QET::QetCollection QET::qetCollectionFromString(const QString &str) } /** - * @brief QET::depthActionGroup - * @param parent - * @return an action group which contain 4 actions (forward, raise, lower, backward) - * already made with icon, shortcut and data (see QET::DepthOption) - */ + @brief QET::depthActionGroup + @param parent + @return an action group which contain 4 actions (forward, raise, lower, backward) + already made with icon, shortcut and data (see QET::DepthOption) +*/ QActionGroup *QET::depthActionGroup(QObject *parent) { QActionGroup *action_group = new QActionGroup(parent); diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 5f68287cf..495fba82e 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -284,7 +284,7 @@ void QETApp::restoreEveryEditor() { @brief QETApp::reduceDiagramEditors Minimize all schema editors in the systray \~French Reduit tous les editeurs de schemas dans le systray - */ +*/ void QETApp::reduceDiagramEditors() { setMainWindowsVisible(false); } @@ -312,7 +312,7 @@ void QETApp::reduceElementEditors() { @brief QETApp::restoreElementEditors Restore all element editors in the systray \~French Restaure tous les editeurs d'element dans le systray - */ +*/ void QETApp::restoreElementEditors() { setMainWindowsVisible(true); } @@ -870,7 +870,7 @@ QString QETApp::realPath(const QString &sym_path) { or the path symbolic designating the element. \~French Une chaine de caracteres vide en cas d'erreur ou le chemin symbolique designant l'element. - */ +*/ QString QETApp::symbolicPath(const QString &real_path) { // get the common and custom folders // recupere les dossier common et custom @@ -895,7 +895,7 @@ QString QETApp::symbolicPath(const QString &real_path) { @brief QETApp::handledFileExtensions @return the list of file extensions QElectroTech is able to open and supposed to handle. Note they are provided with no leading point. - */ +*/ QStringList QETApp::handledFileExtensions() { static QStringList ext; if (!ext.count()) { @@ -936,7 +936,7 @@ QStringList QETApp::handledFiles(const QList &urls) { or 0 if this file is not edited by the application. \~French le QETDiagramEditor editant le fichier filepath, ou 0 si ce fichier n'est pas edite par l'application. - */ +*/ QETDiagramEditor *QETApp::diagramEditorForFile(const QString &filepath) { if (filepath.isEmpty()) return(nullptr); @@ -1043,7 +1043,7 @@ void QETApp::overrideLangDir(const QString &new_ld) { @brief QETApp::languagesPath @return The path of the folder containing the language files \~French Le chemin du dossier contenant les fichiers de langue - */ +*/ QString QETApp::languagesPath() { if (!lang_dir.isEmpty()) { return(lang_dir); @@ -2259,7 +2259,7 @@ void QETApp::checkBackupFiles() \~ @param diagrams : QList \~ @param elements : QList \~ @param tbtemplates : QList - */ +*/ void QETApp::fetchWindowStats( const QList &diagrams, const QList &elements, diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 93ce710da..4cc1ab2d9 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -44,11 +44,11 @@ /** - * @brief QETDiagramEditor::QETDiagramEditor - * Constructor - * @param files, list of files to open - * @param parent, parent widget - */ + @brief QETDiagramEditor::QETDiagramEditor + Constructor + @param files, list of files to open + @param parent, parent widget +*/ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : QETMainWindow(parent), m_row_column_actions_group (this), @@ -132,9 +132,9 @@ QETDiagramEditor::~QETDiagramEditor() { } /** - * @brief QETDiagramEditor::setUpElementsPanel - * Setup the element panel and element panel widget - */ + @brief QETDiagramEditor::setUpElementsPanel + Setup the element panel and element panel widget +*/ void QETDiagramEditor::setUpElementsPanel() { //Add the element panel as a QDockWidget qdw_pa = new QDockWidget(tr("Projets", "dock title"), this); @@ -163,9 +163,9 @@ void QETDiagramEditor::setUpElementsPanel() { } /** - * @brief QETDiagramEditor::setUpElementsCollectionWidget - * Set up the dock widget of element collection - */ + @brief QETDiagramEditor::setUpElementsCollectionWidget + Set up the dock widget of element collection +*/ void QETDiagramEditor::setUpElementsCollectionWidget() { m_qdw_elmt_collection = new QDockWidget(tr("Collections"), this); @@ -181,9 +181,9 @@ void QETDiagramEditor::setUpElementsCollectionWidget() } /** - * @brief QETDiagramEditor::setUpUndoStack - * Setup the undostack and undo stack widget - */ + @brief QETDiagramEditor::setUpUndoStack + Setup the undostack and undo stack widget +*/ void QETDiagramEditor::setUpUndoStack() { QUndoView *undo_view = new QUndoView(&undo_group, this); @@ -204,9 +204,9 @@ void QETDiagramEditor::setUpUndoStack() { } /** - * @brief QETDiagramEditor::setUpSelectionPropertiesEditor - * Setup the dock for edit the current selection - */ + @brief QETDiagramEditor::setUpSelectionPropertiesEditor + Setup the dock for edit the current selection +*/ void QETDiagramEditor::setUpSelectionPropertiesEditor() { m_selection_properties_editor = new DiagramPropertiesEditorDockWidget(this); @@ -215,9 +215,9 @@ void QETDiagramEditor::setUpSelectionPropertiesEditor() } /** - * @brief QETDiagramEditor::setUpAutonumberingWidget - * Setup the dock for AutoNumbering Selection - */ + @brief QETDiagramEditor::setUpAutonumberingWidget + Setup the dock for AutoNumbering Selection +*/ void QETDiagramEditor::setUpAutonumberingWidget() { m_autonumbering_dock = new AutoNumberingDockWidget(this); @@ -227,9 +227,9 @@ void QETDiagramEditor::setUpAutonumberingWidget() } /** - * @brief QETDiagramEditor::setUpActions - * Set up all Qaction - */ + @brief QETDiagramEditor::setUpActions + Set up all Qaction +*/ void QETDiagramEditor::setUpActions() { //Export to another file type (jpeg, dxf etc...) @@ -654,8 +654,8 @@ void QETDiagramEditor::setUpActions() } /** - * @brief QETDiagramEditor::setUpToolBar - */ + @brief QETDiagramEditor::setUpToolBar +*/ void QETDiagramEditor::setUpToolBar() { main_tool_bar = new QToolBar(tr("Outils"), this); @@ -709,8 +709,8 @@ void QETDiagramEditor::setUpToolBar() } /** - * @brief QETDiagramEditor::setUpMenu - */ + @brief QETDiagramEditor::setUpMenu +*/ void QETDiagramEditor::setUpMenu() { QMenu *menu_fichier = new QMenu(tr("&Fichier")); @@ -830,12 +830,12 @@ void QETDiagramEditor::closeEvent(QCloseEvent *qce) { } /** - * @brief QETDiagramEditor::event - * Reimplemented to : - * -Load elements collection when WindowActivate. - * @param e - * @return - */ + @brief QETDiagramEditor::event + Reimplemented to : + -Load elements collection when WindowActivate. + @param e + @return +*/ bool QETDiagramEditor::event(QEvent *e) { if (m_first_show && e->type() == QEvent::WindowActivate) @@ -847,9 +847,9 @@ bool QETDiagramEditor::event(QEvent *e) } /** - * @brief QETDiagramEditor::save - * Ask the current active project to save - */ + @brief QETDiagramEditor::save + Ask the current active project to save +*/ void QETDiagramEditor::save() { if (ProjectView *project_view = currentProjectView()) { QETResult saved = project_view -> save(); @@ -871,9 +871,9 @@ void QETDiagramEditor::save() { } /** - * @brief QETDiagramEditor::saveAs - * Ask the current active project to save as - */ + @brief QETDiagramEditor::saveAs + Ask the current active project to save as +*/ void QETDiagramEditor::saveAs() { if (ProjectView *project_view = currentProjectView()) { QETResult save_file = project_view -> saveAs(); @@ -893,10 +893,10 @@ void QETDiagramEditor::saveAs() { } /** - * @brief QETDiagramEditor::newProject - * Create a new project with an empty diagram - * @return - */ + @brief QETDiagramEditor::newProject + Create a new project with an empty diagram + @return +*/ bool QETDiagramEditor::newProject() { auto new_project = new QETProject(this); @@ -1140,10 +1140,10 @@ ProjectView *QETDiagramEditor::currentProjectView() const { } /** - * @brief QETDiagramEditor::currentProject - * @return the current edited project. - * This function can return nullptr. - */ + @brief QETDiagramEditor::currentProject + @return the current edited project. + This function can return nullptr. +*/ QETProject *QETDiagramEditor::currentProject() const { ProjectView *view = currentProjectView(); @@ -1288,10 +1288,10 @@ void QETDiagramEditor::zoomGroupTriggered(QAction *action) } /** - * @brief QETDiagramEditor::selectGroupTriggered - * This slot is called when selection need to change. - * @param action : Action that describes what to do. - */ + @brief QETDiagramEditor::selectGroupTriggered + This slot is called when selection need to change. + @param action : Action that describes what to do. +*/ void QETDiagramEditor::selectGroupTriggered(QAction *action) { QString value = action->data().toString(); @@ -1308,11 +1308,11 @@ void QETDiagramEditor::selectGroupTriggered(QAction *action) } /** - * @brief QETDiagramEditor::addItemGroupTriggered - * This slot is called when an item must be added to the curent diagram, - * this slot use the DVEventInterface to add item - * @param action : Action that describe the item to add. - */ + @brief QETDiagramEditor::addItemGroupTriggered + This slot is called when an item must be added to the curent diagram, + this slot use the DVEventInterface to add item + @param action : Action that describe the item to add. +*/ void QETDiagramEditor::addItemGroupTriggered(QAction *action) { QString value = action->data().toString(); @@ -1359,10 +1359,10 @@ void QETDiagramEditor::addItemGroupTriggered(QAction *action) } /** - * @brief QETDiagramEditor::selectionGroupTriggered - * This slot is called when an action should be made on the current selection - * @param action : Action that describe the action to do. - */ + @brief QETDiagramEditor::selectionGroupTriggered + This slot is called when an action should be made on the current selection + @param action : Action that describe the action to do. +*/ void QETDiagramEditor::selectionGroupTriggered(QAction *action) { QString value = action->data().toString(); @@ -1424,9 +1424,9 @@ void QETDiagramEditor::rowColumnGroupTriggered(QAction *action) } /** - * @brief QETDiagramEditor::slot_updateActions - * Manage actions - */ + @brief QETDiagramEditor::slot_updateActions + Manage actions +*/ void QETDiagramEditor::slot_updateActions() { DiagramView *dv = currentDiagramView(); @@ -1467,9 +1467,9 @@ void QETDiagramEditor::slot_updateActions() } /** - * @brief QETDiagramEditor::slot_updateAutoNumDock - * Update Auto Num Dock Widget when changing Project - */ + @brief QETDiagramEditor::slot_updateAutoNumDock + Update Auto Num Dock Widget when changing Project +*/ void QETDiagramEditor::slot_updateAutoNumDock() { if ( m_workspace.subWindowList().indexOf(m_workspace.activeSubWindow()) != activeSubWindowIndex) { activeSubWindowIndex = m_workspace.subWindowList().indexOf(m_workspace.activeSubWindow()); @@ -1480,9 +1480,9 @@ void QETDiagramEditor::slot_updateAutoNumDock() { } /** - * @brief QETDiagramEditor::slot_updateUndoStack - * Update the undo stack view - */ + @brief QETDiagramEditor::slot_updateUndoStack + Update the undo stack view +*/ void QETDiagramEditor::slot_updateUndoStack() { if(currentProjectView()) @@ -1490,10 +1490,10 @@ void QETDiagramEditor::slot_updateUndoStack() } /** - * @brief QETDiagramEditor::slot_updateComplexActions - * Manage the actions who need some conditions to be enable or not. - * This method does nothing if there is no project opened - */ + @brief QETDiagramEditor::slot_updateComplexActions + Manage the actions who need some conditions to be enable or not. + This method does nothing if there is no project opened +*/ void QETDiagramEditor::slot_updateComplexActions() { DiagramView *dv = currentDiagramView(); @@ -1607,9 +1607,9 @@ void QETDiagramEditor::slot_updateComplexActions() } /** - * @brief QETDiagramEditor::slot_updateModeActions - * Manage action who need an opened diagram or project to be updated - */ + @brief QETDiagramEditor::slot_updateModeActions + Manage action who need an opened diagram or project to be updated +*/ void QETDiagramEditor::slot_updateModeActions() { DiagramView *dv = currentDiagramView(); @@ -1655,11 +1655,11 @@ 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 - */ + @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 +*/ void QETDiagramEditor::addProjectView(ProjectView *project_view) { if (!project_view) return; @@ -1743,17 +1743,17 @@ ProjectView *QETDiagramEditor::viewForFile(const QString &filepath) const { } /** - * @brief QETDiagramEditor::drawGrid - * @return true if the grid of folio must be displayed - */ + @brief QETDiagramEditor::drawGrid + @return true if the grid of folio must be displayed +*/ bool QETDiagramEditor::drawGrid() const { return m_draw_grid->isChecked(); } /** - * @brief QETDiagramEditor::openBackupFiles - * @param backup_files - */ + @brief QETDiagramEditor::openBackupFiles + @param backup_files +*/ void QETDiagramEditor::openBackupFiles(QList backup_files) { for (KAutoSaveFile *file : backup_files) @@ -1862,9 +1862,9 @@ void QETDiagramEditor::setTabbedMode() { } /** - * @brief QETDiagramEditor::readSettings - * Read the settings - */ + @brief QETDiagramEditor::readSettings + Read the settings +*/ void QETDiagramEditor::readSettings() { QSettings settings; @@ -1887,9 +1887,9 @@ void QETDiagramEditor::readSettings() } /** - * @brief QETDiagramEditor::writeSettings - * Write the settings - */ + @brief QETDiagramEditor::writeSettings + Write the settings +*/ void QETDiagramEditor::writeSettings() { QSettings settings; @@ -1930,9 +1930,9 @@ void QETDiagramEditor::activateProject(ProjectView *project_view) { } /*** @brief QETDiagramEditor::projectWasClosed - * Manage the close of a project. - * @param project_view - */ + Manage the close of a project. + @param project_view +*/ void QETDiagramEditor::projectWasClosed(ProjectView *project_view) { QETProject *project = project_view -> project(); @@ -1971,10 +1971,10 @@ void QETDiagramEditor::editProjectProperties(QETProject *project) { } /** - * @brief QETDiagramEditor::addDiagramToProject - * Add a diagram to project - * @param project - */ + @brief QETDiagramEditor::addDiagramToProject + Add a diagram to project + @param project +*/ void QETDiagramEditor::addDiagramToProject(QETProject *project) { if (!project) { @@ -2051,7 +2051,7 @@ void QETDiagramEditor::moveDiagramDown(Diagram *diagram) { Change l'ordre des schemas d'un projet, en decalant le schema vers le haut / la gauche en position 0 @param diagram Schema a decaler vers le haut / la gauche en position 0 - */ +*/ void QETDiagramEditor::moveDiagramUpTop(Diagram *diagram) { if (!diagram) return; @@ -2122,10 +2122,10 @@ void QETDiagramEditor::removeDiagramFromProject() } /** - * @brief QETDiagramEditor::diagramWasAdded - * Manage the adding of diagram view in a project - * @param dv, added diagram view - */ + @brief QETDiagramEditor::diagramWasAdded + Manage the adding of diagram view in a project + @param dv, added diagram view +*/ void QETDiagramEditor::diagramWasAdded(DiagramView *dv) { connect(dv->diagram(), &QGraphicsScene::selectionChanged, this, &QETDiagramEditor::selectionChanged, Qt::DirectConnection); @@ -2133,10 +2133,10 @@ void QETDiagramEditor::diagramWasAdded(DiagramView *dv) } /** - * @brief QETDiagramEditor::findElementInPanel - * Find the item for @location in the element panel - * @param location - */ + @brief QETDiagramEditor::findElementInPanel + Find the item for @location in the element panel + @param location +*/ void QETDiagramEditor::findElementInPanel(const ElementsLocation &location) { m_element_collection_widget->setCurrentLocation(location); @@ -2177,10 +2177,10 @@ void QETDiagramEditor::showError(const QString &error) { } /** - * @brief QETDiagramEditor::subWindowActivated - * Slot used to update menu and undo stack when subwindows of MDIarea was activated - * @param subWindows - */ + @brief QETDiagramEditor::subWindowActivated + Slot used to update menu and undo stack when subwindows of MDIarea was activated + @param subWindows +*/ void QETDiagramEditor::subWindowActivated(QMdiSubWindow *subWindows) { Q_UNUSED(subWindows); @@ -2190,9 +2190,9 @@ void QETDiagramEditor::subWindowActivated(QMdiSubWindow *subWindows) } /** - * @brief QETDiagramEditor::selectionChanged - * This slot is called when a diagram selection was changed. - */ + @brief QETDiagramEditor::selectionChanged + This slot is called when a diagram selection was changed. +*/ void QETDiagramEditor::selectionChanged() { slot_updateComplexActions(); @@ -2204,8 +2204,8 @@ void QETDiagramEditor::selectionChanged() /** - * @brief QETDiagramEditor::generateTerminalBlock - */ + @brief QETDiagramEditor::generateTerminalBlock +*/ void QETDiagramEditor::generateTerminalBlock() { bool success; diff --git a/sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp b/sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp index 7e4897f1d..29a72cb27 100644 --- a/sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp +++ b/sources/qetgraphicsitem/ViewItem/projectdbmodel.cpp @@ -25,10 +25,10 @@ #include /** - * @brief ProjectDBModel::ProjectDBModel - * @param project :project of this nomenclature - * @param parent : parent QObject - */ + @brief ProjectDBModel::ProjectDBModel + @param project :project of this nomenclature + @param parent : parent QObject +*/ ProjectDBModel::ProjectDBModel(QETProject *project, QObject *parent) : QAbstractTableModel(parent), m_project(project) @@ -37,9 +37,9 @@ ProjectDBModel::ProjectDBModel(QETProject *project, QObject *parent) : } /** - * @brief ProjectDBModel::ProjectDBModel - * @param other_model - */ + @brief ProjectDBModel::ProjectDBModel + @param other_model +*/ ProjectDBModel::ProjectDBModel(const ProjectDBModel &other_model) : QAbstractTableModel(other_model.parent()) { @@ -51,11 +51,11 @@ ProjectDBModel::ProjectDBModel(const ProjectDBModel &other_model) : } /** - * @brief ProjectDBModel::rowCount - * Reimplemented for QAbstractTableModel - * @param parent - * @return - */ + @brief ProjectDBModel::rowCount + Reimplemented for QAbstractTableModel + @param parent + @return +*/ int ProjectDBModel::rowCount(const QModelIndex &parent) const { if (parent.isValid()) @@ -65,11 +65,11 @@ int ProjectDBModel::rowCount(const QModelIndex &parent) const } /** - * @brief ProjectDBModel::columnCount - * Reimplemented for QAbstractTableModel - * @param parent - * @return - */ + @brief ProjectDBModel::columnCount + Reimplemented for QAbstractTableModel + @param parent + @return +*/ int ProjectDBModel::columnCount(const QModelIndex &parent) const { if (parent.isValid()) @@ -83,15 +83,15 @@ int ProjectDBModel::columnCount(const QModelIndex &parent) const } /** - * @brief ProjectDBModel::setHeaderData - * Reimplemented from QAbstractTableModel. - * Only horizontal orientation is accepted. - * @param section - * @param orientation - * @param value - * @param role - * @return - */ + @brief ProjectDBModel::setHeaderData + Reimplemented from QAbstractTableModel. + Only horizontal orientation is accepted. + @param section + @param orientation + @param value + @param role + @return +*/ bool ProjectDBModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role) { if (orientation == Qt::Vertical) { @@ -105,13 +105,13 @@ bool ProjectDBModel::setHeaderData(int section, Qt::Orientation orientation, con } /** - * @brief ProjectDBModel::headerData - * Reimplemented from QAbstractTableModel. - * @param section - * @param orientation - * @param role - * @return - */ + @brief ProjectDBModel::headerData + Reimplemented from QAbstractTableModel. + @param section + @param orientation + @param role + @return +*/ QVariant ProjectDBModel::headerData(int section, Qt::Orientation orientation, int role) const { if (orientation == Qt::Vertical) { @@ -130,13 +130,13 @@ QVariant ProjectDBModel::headerData(int section, Qt::Orientation orientation, in } /** - * @brief ProjectDBModel::setData - * Only store the data for the index 0.0 - * @param index - * @param value - * @param role - * @return - */ + @brief ProjectDBModel::setData + Only store the data for the index 0.0 + @param index + @param value + @param role + @return +*/ bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, int role) { if (!index.isValid() || index.row() != 0 || index.column() != 0) { @@ -148,12 +148,12 @@ bool ProjectDBModel::setData(const QModelIndex &index, const QVariant &value, in } /** - * @brief ProjectDBModel::data - * Reimplemented for QAbstractTableModel - * @param index - * @param role - * @return - */ + @brief ProjectDBModel::data + Reimplemented for QAbstractTableModel + @param index + @param role + @return +*/ QVariant ProjectDBModel::data(const QModelIndex &index, int role) const { if (!index.isValid()) @@ -174,10 +174,10 @@ QVariant ProjectDBModel::data(const QModelIndex &index, int role) const } /** - * @brief ProjectDBModel::setQuery - * Query the internall bd with @query. - * @param query - */ + @brief ProjectDBModel::setQuery + Query the internall bd with @query. + @param query +*/ void ProjectDBModel::setQuery(const QString &query) { auto rm_ = m_query != query; @@ -206,9 +206,9 @@ void ProjectDBModel::setQuery(const QString &query) } /** - * @brief ProjectDBModel::queryString - * @return the current query used by this model - */ + @brief ProjectDBModel::queryString + @return the current query used by this model +*/ QString ProjectDBModel::queryString() const { return m_query; } @@ -218,12 +218,12 @@ QETProject *ProjectDBModel::project() const { } /** - * @brief ProjectDBModel::toXml - * Save the model to xml,since model can have unlimited data we only save few data (only these used by qelectrotech). - * The query, all header data. and some data of index::(0,0). All other data are not saved. - * @param document - * @return - */ + @brief ProjectDBModel::toXml + Save the model to xml,since model can have unlimited data we only save few data (only these used by qelectrotech). + The query, all header data. and some data of index::(0,0). All other data are not saved. + @param document + @return +*/ QDomElement ProjectDBModel::toXml(QDomDocument &document) const { auto dom_element = document.createElement(xmlTagName()); @@ -265,10 +265,10 @@ QDomElement ProjectDBModel::toXml(QDomDocument &document) const } /** - * @brief ProjectDBModel::fromXml - * Restore the model from xml - * @param element - */ + @brief ProjectDBModel::fromXml + Restore the model from xml + @param element +*/ void ProjectDBModel::fromXml(const QDomElement &element) { if (element.tagName() != xmlTagName()) @@ -290,18 +290,18 @@ void ProjectDBModel::fromXml(const QDomElement &element) } /** - * @brief ProjectDBModel::setIdentifier - * Set the identifier of this model to @identifier - * @param identifier - */ + @brief ProjectDBModel::setIdentifier + Set the identifier of this model to @identifier + @param identifier +*/ void ProjectDBModel::setIdentifier(const QString &identifier) { m_identifier = identifier; } /** - * @brief ProjectDBModel::dataBaseUpdated - * slot called when the project database is updated - */ + @brief ProjectDBModel::dataBaseUpdated + slot called when the project database is updated +*/ void ProjectDBModel::dataBaseUpdated() { auto original_record = m_record; diff --git a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h index f04271e38..7d351f89b 100644 --- a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h +++ b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h @@ -25,16 +25,16 @@ class QETProject; /** - * @brief The ProjectDBModel class - * This model is intended to be use with the @class projectDataBase - * and is designed to be displayed by the @class QetGraphicsTableItem (but can be use by other view class since it inherit from QAbstractTableModel). - * This class should be sufficient to display the content of the project data base from a query set by the method void ProjectDBModel::setQuery(const QString &query). - * The indentifier method is used by widget editor to retrieve the good widget for edit the query. By defaut identifer return the string 'unknow'. - * You should use setIdentfier method to set your custom identifier. - * At the time this sentence is written, there is two identifier : - * nomenclature - * summary - */ + @brief The ProjectDBModel class + This model is intended to be use with the @class projectDataBase + and is designed to be displayed by the @class QetGraphicsTableItem (but can be use by other view class since it inherit from QAbstractTableModel). + This class should be sufficient to display the content of the project data base from a query set by the method void ProjectDBModel::setQuery(const QString &query). + The indentifier method is used by widget editor to retrieve the good widget for edit the query. By defaut identifer return the string 'unknow'. + You should use setIdentfier method to set your custom identifier. + At the time this sentence is written, there is two identifier : + nomenclature + summary +*/ class ProjectDBModel : public QAbstractTableModel { Q_OBJECT diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp index a6e85c78d..2f598c073 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp @@ -26,20 +26,20 @@ static int no_model_height = 20; static int no_model_width = 40; /** - * @brief QetGraphicsHeaderItem::QetGraphicsHeaderItem - * @param parent - */ + @brief QetGraphicsHeaderItem::QetGraphicsHeaderItem + @param parent +*/ QetGraphicsHeaderItem::QetGraphicsHeaderItem(QGraphicsItem *parent) : QGraphicsObject(parent) {} /** - * @brief QetGraphicsHeaderItem::setModel - * Set the model presented by this item - * Since QetGraphicsHeaderItem don't take ownership of model, - * if item already have a model, it's your responsability to delete it. - * @param model - */ + @brief QetGraphicsHeaderItem::setModel + Set the model presented by this item + Since QetGraphicsHeaderItem don't take ownership of model, + if item already have a model, it's your responsability to delete it. + @param model +*/ void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model) { if (m_model) { @@ -65,29 +65,29 @@ void QetGraphicsHeaderItem::setModel(QAbstractItemModel *model) } /** - * @brief QetGraphicsHeaderItem::model - * @return the model that this item is presenting - */ + @brief QetGraphicsHeaderItem::model + @return the model that this item is presenting +*/ QAbstractItemModel *QetGraphicsHeaderItem::model() const { return m_model; } /** - * @brief QetGraphicsHeaderItem::boundingRect - * Reimplemented from QGraphicsObject::boundingRect() const; - * @return - */ + @brief QetGraphicsHeaderItem::boundingRect + Reimplemented from QGraphicsObject::boundingRect() const; + @return +*/ QRectF QetGraphicsHeaderItem::boundingRect() const { return m_bounding_rect; } /** - * @brief QetGraphicsHeaderItem::paint - * Reimplemented from QGraphicsObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) const; - * @param painter - * @param option - * @param widget - */ + @brief QetGraphicsHeaderItem::paint + Reimplemented from QGraphicsObject::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) const; + @param painter + @param option + @param widget +*/ void QetGraphicsHeaderItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option) @@ -141,18 +141,18 @@ void QetGraphicsHeaderItem::paint(QPainter *painter, const QStyleOptionGraphicsI } /** - * @brief QetGraphicsHeaderItem::rect - * @return the current rect of the item aka the size of rectangle painted. - */ + @brief QetGraphicsHeaderItem::rect + @return the current rect of the item aka the size of rectangle painted. +*/ QRect QetGraphicsHeaderItem::rect() const { return m_current_rect; } /** - * @brief QetGraphicsHeaderItem::resizeSection - * @param logicalIndex - * @param size - */ + @brief QetGraphicsHeaderItem::resizeSection + @param logicalIndex + @param size +*/ void QetGraphicsHeaderItem::resizeSection(int logicalIndex, int size) { if (!m_model) @@ -187,10 +187,10 @@ void QetGraphicsHeaderItem::resizeSection(int logicalIndex, int size) } /** - * @brief QetGraphicsHeaderItem::sectionSize - * @param logical_index - * @return the width (or height for vertical headers) of the given logicalIndex. - */ + @brief QetGraphicsHeaderItem::sectionSize + @param logical_index + @return the width (or height for vertical headers) of the given logicalIndex. +*/ int QetGraphicsHeaderItem::sectionSize(int logical_index) const { if (logical_index>=0 && logical_indexdiagram()) { @@ -62,11 +62,11 @@ 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. - * @param table - */ + @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. + @param table +*/ void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *table) { if (!table->diagram() || !table->model()) { @@ -114,10 +114,10 @@ void QetGraphicsTableItem::checkInsufficientRowsCount(QetGraphicsTableItem *tabl } /** - * @brief QetGraphicsTableItem::QetGraphicsTableItem - * Default constructor - * @param parent - */ + @brief QetGraphicsTableItem::QetGraphicsTableItem + Default constructor + @param parent +*/ QetGraphicsTableItem::QetGraphicsTableItem(QGraphicsItem *parent) : QetGraphicsItem(parent) { @@ -146,12 +146,12 @@ QetGraphicsTableItem::~QetGraphicsTableItem() {} /** - * @brief QetGraphicsTableItem::setModel - * Set the model presented by this item. - * Since QetGraphicsTableItem don't take ownership of model, - * if item already have a model, it's your responsibility to delete it. - * @param model - */ + @brief QetGraphicsTableItem::setModel + Set the model presented by this item. + Since QetGraphicsTableItem don't take ownership of model, + if item already have a model, it's your responsibility to delete it. + @param model +*/ void QetGraphicsTableItem::setModel(QAbstractItemModel *model) { if (m_model) @@ -178,29 +178,29 @@ void QetGraphicsTableItem::setModel(QAbstractItemModel *model) } /** - * @brief QetGraphicsTableItem::model - * @return The model that this item is presenting - */ + @brief QetGraphicsTableItem::model + @return The model that this item is presenting +*/ QAbstractItemModel *QetGraphicsTableItem::model() const { return m_model; } /** - * @brief QetGraphicsTableItem::boundingRect - * Reimplemented from QGraphicsObject - * @return - */ + @brief QetGraphicsTableItem::boundingRect + Reimplemented from QGraphicsObject + @return +*/ QRectF QetGraphicsTableItem::boundingRect() const { return m_bounding_rect; } /** - * @brief QetGraphicsTableItem::paint - * Draw the table - * @param painter - * @param option - * @param widget - */ + @brief QetGraphicsTableItem::paint + Draw the table + @param painter + @param option + @param widget +*/ void QetGraphicsTableItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option) @@ -285,10 +285,10 @@ void QetGraphicsTableItem::paint(QPainter *painter, const QStyleOptionGraphicsIt } /** - * @brief QetGraphicsTableItem::setSize - * Set the current size of the table to @size - * @param size - */ + @brief QetGraphicsTableItem::setSize + Set the current size of the table to @size + @param size +*/ void QetGraphicsTableItem::setSize(const QSize &size) { auto new_size = size; @@ -309,9 +309,9 @@ void QetGraphicsTableItem::setSize(const QSize &size) } /** - * @brief QetGraphicsTableItem::size - * @return The current size of the table - */ + @brief QetGraphicsTableItem::size + @return The current size of the table +*/ QSize QetGraphicsTableItem::size() const { QSize size_(m_header_item->rect().width(), m_current_size.height()); @@ -319,10 +319,10 @@ QSize QetGraphicsTableItem::size() const } /** - * @brief QetGraphicsTableItem::minimumSize - * @return the minimum size the table can be - * The returned size take care of the table's minimum width, but also the header item's minimum width - */ + @brief QetGraphicsTableItem::minimumSize + @return the minimum size the table can be + The returned size take care of the table's minimum width, but also the header item's minimum width +*/ QSize QetGraphicsTableItem::minimumSize() const { if (!m_model) { @@ -348,10 +348,10 @@ QSize QetGraphicsTableItem::minimumSize() const } /** - * @brief QetGraphicsTableItem::setDisplayNRow - * Limit the number of row to display - * @param number : set to 0 or less to disabled the limit of row to display - */ + @brief QetGraphicsTableItem::setDisplayNRow + Limit the number of row to display + @param number : set to 0 or less to disabled the limit of row to display +*/ void QetGraphicsTableItem::setDisplayNRow(const int &number) { m_number_of_displayed_row = number; setToMinimumHeight(); @@ -360,25 +360,25 @@ void QetGraphicsTableItem::setDisplayNRow(const int &number) { } /** - * @brief QetGraphicsTableItem::displayNRow - * @return the number of row displayed. - * A value of 0 or less mean there is no limit - */ + @brief QetGraphicsTableItem::displayNRow + @return the number of row displayed. + A value of 0 or less mean there is no limit +*/ int QetGraphicsTableItem::displayNRow() const { return m_number_of_displayed_row; } /** - * @brief QetGraphicsTableItem::setPreviousTable - * 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 - * @param table - */ + @brief QetGraphicsTableItem::setPreviousTable + 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 + @param table +*/ void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table) { if (m_previous_table == table || @@ -405,11 +405,11 @@ void QetGraphicsTableItem::setPreviousTable(QetGraphicsTableItem *table) } /** - * @brief QetGraphicsTableItem::setNextTable - * Set the next table to @table - * nullptr will remove an existing next table. - * @param table - */ + @brief QetGraphicsTableItem::setNextTable + Set the next table to @table + nullptr will remove an existing next table. + @param table +*/ void QetGraphicsTableItem::setNextTable(QetGraphicsTableItem *table) { if (m_next_table == table || @@ -440,10 +440,10 @@ QString QetGraphicsTableItem::tableName() const { } /** - * @brief QetGraphicsTableItem::displayNRowOffset - * @return the offset (aka the last displayed row) of displayed row. - * If this item have a previous table, the previous offset is added. - */ + @brief QetGraphicsTableItem::displayNRowOffset + @return the offset (aka the last displayed row) of displayed row. + If this item have a previous table, the previous offset is added. +*/ int QetGraphicsTableItem::displayNRowOffset() const { auto offset_ = m_number_of_displayed_row; @@ -462,10 +462,10 @@ QetGraphicsTableItem *QetGraphicsTableItem::nextTable() const { } /** - * @brief QetGraphicsTableItem::setToMinimumHeight - * Set the height to the the minimum. - * The width stay unchanged. - */ + @brief QetGraphicsTableItem::setToMinimumHeight + Set the height to the the minimum. + The width stay unchanged. +*/ void QetGraphicsTableItem::setToMinimumHeight() { auto size_ = size(); @@ -487,19 +487,19 @@ void QetGraphicsTableItem::initLink() } /** - * @brief QetGraphicsTableItem::minimumRowHeigth - * @return the minimum height of a row - */ + @brief QetGraphicsTableItem::minimumRowHeigth + @return the minimum height of a row +*/ int QetGraphicsTableItem::minimumRowHeigth() const { return m_minimum_row_height; } /** - * @brief QetGraphicsTableItem::toXml - * Save the table to xml - * @param dom_document : parent document - * @return the dom_element that describe the table - */ + @brief QetGraphicsTableItem::toXml + Save the table to xml + @param dom_document : parent document + @return the dom_element that describe the table +*/ QDomElement QetGraphicsTableItem::toXml(QDomDocument &dom_document) const { auto dom_table = dom_document.createElement(xmlTagName()); @@ -535,11 +535,11 @@ QDomElement QetGraphicsTableItem::toXml(QDomDocument &dom_document) const } /** - * @brief QetGraphicsTableItem::fromXml - * Restore the table from xml. - * Make this item is already in a diagram to - * @param dom_element - */ + @brief QetGraphicsTableItem::fromXml + Restore the table from xml. + Make this item is already in a diagram to + @param dom_element +*/ void QetGraphicsTableItem::fromXml(const QDomElement &dom_element) { if (dom_element.tagName() != xmlTagName()) { @@ -573,10 +573,10 @@ void QetGraphicsTableItem::fromXml(const QDomElement &dom_element) } /** - * @brief QetGraphicsTableItem::hoverEnterEvent - * Reimplemented from QetGraphicsItem - * @param event - */ + @brief QetGraphicsTableItem::hoverEnterEvent + Reimplemented from QetGraphicsItem + @param event +*/ void QetGraphicsTableItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { if (m_model) @@ -589,10 +589,10 @@ void QetGraphicsTableItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) } /** - * @brief QetGraphicsTableItem::hoverLeaveEvent - * Reimplemented from QetGraphicsItem - * @param event - */ + @brief QetGraphicsTableItem::hoverLeaveEvent + Reimplemented from QetGraphicsItem + @param event +*/ void QetGraphicsTableItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { if (m_model) { @@ -602,12 +602,12 @@ void QetGraphicsTableItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) } /** - * @brief QetGraphicsTableItem::sceneEventFilter - * Reimplemented from QetGraphicsItem - * @param watched - * @param event - * @return - */ + @brief QetGraphicsTableItem::sceneEventFilter + Reimplemented from QetGraphicsItem + @param watched + @param event + @return +*/ bool QetGraphicsTableItem::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { if (watched == &m_handler_item) @@ -633,11 +633,11 @@ bool QetGraphicsTableItem::sceneEventFilter(QGraphicsItem *watched, QEvent *even } /** - * @brief QetGraphicsTableItem::itemChange - * @param change - * @param value - * @return - */ + @brief QetGraphicsTableItem::itemChange + @param change + @param value + @return +*/ QVariant QetGraphicsTableItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { //item was removed from scene, we remove the handler @@ -660,10 +660,10 @@ void QetGraphicsTableItem::modelReseted() { } /** - * @brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize - * Calcule the minimum row height and the minimum column width for each columns - * this function doesn't change the geometry of the table. - */ + @brief QetGraphicsTableItem::setUpColumnAndRowMinimumSize + Calcule the minimum row height and the minimum column width for each columns + this function doesn't change the geometry of the table. +*/ void QetGraphicsTableItem::setUpColumnAndRowMinimumSize() { if (!m_model) @@ -693,8 +693,8 @@ void QetGraphicsTableItem::setUpColumnAndRowMinimumSize() } /** - * @brief QetGraphicsTableItem::setUpBoundingRect - */ + @brief QetGraphicsTableItem::setUpBoundingRect +*/ void QetGraphicsTableItem::setUpBoundingRect() { QSize header_size = m_header_item->rect().size(); @@ -703,16 +703,16 @@ void QetGraphicsTableItem::setUpBoundingRect() } /** - * @brief QetGraphicsTableItem::adjustHandlerPos - * Adjust the pos of the handler item - */ + @brief QetGraphicsTableItem::adjustHandlerPos + Adjust the pos of the handler item +*/ void QetGraphicsTableItem::adjustHandlerPos() { m_handler_item.setPos(mapToScene(QRect(QPoint(0,0), size()).bottomRight())); } /** - * @brief QetGraphicsTableItem::setUpHandler - */ + @brief QetGraphicsTableItem::setUpHandler +*/ void QetGraphicsTableItem::setUpHandler() { m_handler_item.setColor(Qt::blue); @@ -759,9 +759,9 @@ void QetGraphicsTableItem::handlerMouseReleaseEvent(QGraphicsSceneMouseEvent *ev } /** - * @brief QetGraphicsTableItem::adjustColumnsWidth - * Adjust the size of each column according to the current table width by setting the sectionSize of the header item - */ + @brief QetGraphicsTableItem::adjustColumnsWidth + Adjust the size of each column according to the current table width by setting the sectionSize of the header item +*/ void QetGraphicsTableItem::adjustColumnsWidth() { if (!m_model) @@ -819,9 +819,9 @@ void QetGraphicsTableItem::dataChanged(const QModelIndex &topLeft, const QModelI } /** - * @brief QetGraphicsTableItem::headerSectionResized - * Connected to the header signal QetGraphicsTableItem sectionResized - */ + @brief QetGraphicsTableItem::headerSectionResized + Connected to the header signal QetGraphicsTableItem sectionResized +*/ void QetGraphicsTableItem::headerSectionResized() { auto header_size = m_header_item->rect().size(); @@ -834,10 +834,10 @@ void QetGraphicsTableItem::headerSectionResized() } /** - * @brief QetGraphicsTableItem::adjustSize - * If needed, this function resize the current height and width of table and/or the size of columns. - * according to there minimum - */ + @brief QetGraphicsTableItem::adjustSize + If needed, this function resize the current height and width of table and/or the size of columns. + according to there minimum +*/ void QetGraphicsTableItem::adjustSize() { //If there is no model, set the size to minimum diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h index 90bb22215..35e5e449e 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h @@ -28,17 +28,17 @@ class QAbstractItemModel; class QetGraphicsHeaderItem; /** - * @brief The QetGraphicsTableItem class - * This item display a table destined to represent the content of a QAbstractItemModel - * The table have a few parameters to edit her visual aspect. - * Margins, to edit the margin between the cell and the text. - * Text font. - * 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. - * 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. - * The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString - */ + @brief The QetGraphicsTableItem class + This item display a table destined to represent the content of a QAbstractItemModel + The table have a few parameters to edit her visual aspect. + Margins, to edit the margin between the cell and the text. + Text font. + 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. + 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. + The margins is stored in the model in index Qt::UserRole+1 and for value a QString. See QETUtils::marginsFromString and QETUtils::marginsToString +*/ class QetGraphicsTableItem : public QetGraphicsItem { Q_OBJECT diff --git a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.cpp b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.cpp index c1e48344d..44feeca0b 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.cpp +++ b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.cpp @@ -30,10 +30,10 @@ #include /** - * @brief GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor - * @param table - * @param parent - */ + @brief GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor + @param table + @param parent +*/ GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor(QetGraphicsTableItem *table, QWidget *parent) : PropertiesEditorWidget(parent), ui(new Ui::GraphicsTablePropertiesEditor) @@ -57,17 +57,17 @@ GraphicsTablePropertiesEditor::GraphicsTablePropertiesEditor(QetGraphicsTableIte } /** - * @brief GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor - */ + @brief GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor +*/ GraphicsTablePropertiesEditor::~GraphicsTablePropertiesEditor() { delete ui; } /** - * @brief GraphicsTablePropertiesEditor::setTable - * Set the table to be edited - * @param table - */ + @brief GraphicsTablePropertiesEditor::setTable + Set the table to be edited + @param table +*/ void GraphicsTablePropertiesEditor::setTable(QetGraphicsTableItem *table) { if (m_table_item) { @@ -97,9 +97,9 @@ void GraphicsTablePropertiesEditor::setTable(QetGraphicsTableItem *table) } /** - * @brief GraphicsTablePropertiesEditor::apply - * Apply the current edition - */ + @brief GraphicsTablePropertiesEditor::apply + Apply the current edition +*/ void GraphicsTablePropertiesEditor::apply() { if(!m_table_item && m_table_item->diagram()) { @@ -113,9 +113,9 @@ void GraphicsTablePropertiesEditor::apply() } /** - * @brief GraphicsTablePropertiesEditor::associatedUndo - * @return the undo command associated to the edition - */ + @brief GraphicsTablePropertiesEditor::associatedUndo + @return the undo command associated to the edition +*/ QUndoCommand *GraphicsTablePropertiesEditor::associatedUndo() const { if (m_live_edit) @@ -198,8 +198,8 @@ bool GraphicsTablePropertiesEditor::setLiveEdit(bool live_edit) } /** - * @brief GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked - */ + @brief GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked +*/ void GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked() { if (m_table_item && m_table_item->model()) @@ -219,8 +219,8 @@ void GraphicsTablePropertiesEditor::on_m_header_font_pb_clicked() } /** - * @brief GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked - */ + @brief GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked +*/ void GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked() { if (m_table_item && m_table_item->model()) @@ -241,8 +241,8 @@ void GraphicsTablePropertiesEditor::on_m_table_font_pb_clicked() } /** - * @brief GraphicsTablePropertiesEditor::updateUi - */ + @brief GraphicsTablePropertiesEditor::updateUi +*/ void GraphicsTablePropertiesEditor::updateUi() { //Disconnect every connections of editor widgets @@ -343,8 +343,8 @@ void GraphicsTablePropertiesEditor::updateInfoLabel() } /** - * @brief GraphicsTablePropertiesEditor::setUpEditConnection - */ + @brief GraphicsTablePropertiesEditor::setUpEditConnection +*/ void GraphicsTablePropertiesEditor::setUpEditConnection() { for (QMetaObject::Connection c : m_edit_connection) { @@ -410,8 +410,8 @@ void GraphicsTablePropertiesEditor::on_m_next_pb_clicked() } /** - * @brief GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked - */ + @brief GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked +*/ void GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked() { if (m_table_item) { @@ -420,8 +420,8 @@ void GraphicsTablePropertiesEditor::on_m_auto_geometry_pb_clicked() } /** - * @brief GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked - */ + @brief GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked +*/ void GraphicsTablePropertiesEditor::on_m_apply_geometry_to_linked_table_pb_clicked() { if (m_table_item.isNull() || !m_table_item->diagram() || (!m_table_item->nextTable() && !m_table_item->previousTable())) { diff --git a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h index f152727e8..449fb2a42 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h +++ b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h @@ -32,9 +32,9 @@ class QUndoStack; class QButtonGroup; /** - * @brief The GraphicsTablePropertiesEditor class - * This widget is used to edit the property of both QetGraphicsTableItem and QetGraphicsHeaderItem - */ + @brief The GraphicsTablePropertiesEditor class + This widget is used to edit the property of both QetGraphicsTableItem and QetGraphicsHeaderItem +*/ class GraphicsTablePropertiesEditor : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp index 2108a1c7c..7f7d5b6bc 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp +++ b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.cpp @@ -25,10 +25,10 @@ #include /** - * @brief projectDBModelPropertiesWidget::projectDBModelPropertiesWidget - * @param model - * @param parent - */ + @brief projectDBModelPropertiesWidget::projectDBModelPropertiesWidget + @param model + @param parent +*/ ProjectDBModelPropertiesWidget::ProjectDBModelPropertiesWidget(ProjectDBModel *model, QWidget *parent) : PropertiesEditorWidget(parent), ui(new Ui::ProjectDBModelPropertiesWidget) @@ -38,16 +38,16 @@ ProjectDBModelPropertiesWidget::ProjectDBModelPropertiesWidget(ProjectDBModel *m } /** - * @brief projectDBModelPropertiesWidget::~projectDBModelPropertiesWidget - */ + @brief projectDBModelPropertiesWidget::~projectDBModelPropertiesWidget +*/ ProjectDBModelPropertiesWidget::~ProjectDBModelPropertiesWidget() { delete ui; } /** - * @brief projectDBModelPropertiesWidget::setModel - * @param model - */ + @brief projectDBModelPropertiesWidget::setModel + @param model +*/ void ProjectDBModelPropertiesWidget::setModel(ProjectDBModel *model) { m_model = model; ui->m_edit_query_pb->setEnabled(m_model); @@ -55,8 +55,8 @@ void ProjectDBModelPropertiesWidget::setModel(ProjectDBModel *model) { } /** - * @brief projectDBModelPropertiesWidget::on_m_edit_query_pb_clicked - */ + @brief projectDBModelPropertiesWidget::on_m_edit_query_pb_clicked +*/ void ProjectDBModelPropertiesWidget::on_m_edit_query_pb_clicked() { QDialog d(this); diff --git a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h index c46ca3f04..ca36ae6dc 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h +++ b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h @@ -27,9 +27,9 @@ class ProjectDBModelPropertiesWidget; } /** - * @brief The projectDBModelPropertiesWidget class - * This class is an editor for a NomenclatureModel - */ + @brief The projectDBModelPropertiesWidget class + This class is an editor for a NomenclatureModel +*/ class ProjectDBModelPropertiesWidget : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index 9acdf6bd0..618ab9d10 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -69,11 +69,11 @@ class ConductorXmlRetroCompatibility }; /** - * @brief Conductor::Conductor - * Default constructor. - * @param p1 : first terminal of this conductor. - * @param p2 : second terminal of this conductor. - */ + @brief Conductor::Conductor + Default constructor. + @param p1 : first terminal of this conductor. + @param p2 : second terminal of this conductor. +*/ Conductor::Conductor(Terminal *p1, Terminal* p2) : terminal1(p1), terminal2(p2), @@ -131,9 +131,9 @@ Conductor::Conductor(Terminal *p1, Terminal* p2) : } /** - * @brief Conductor::~Conductor - * Destructor. The conductor is removed from is terminal - */ + @brief Conductor::~Conductor + Destructor. The conductor is removed from is terminal +*/ Conductor::~Conductor() { removeHandler(); @@ -143,10 +143,10 @@ Conductor::~Conductor() } /** - * @brief Conductor::isValid - * @return true if conductor is valid else false; - * A non valid conductor, is a conductor without two terminal - */ + @brief Conductor::isValid + @return true if conductor is valid else false; + A non valid conductor, is a conductor without two terminal +*/ bool Conductor::isValid() const { return m_valid; } @@ -171,9 +171,9 @@ void Conductor::updatePath(const QRectF &rect) { } /** - * @brief Conductor::segmentsToPath - * Generate the QPainterPath from the list of points - */ + @brief Conductor::segmentsToPath + Generate the QPainterPath from the list of points +*/ void Conductor::segmentsToPath() { QPainterPath path; @@ -606,20 +606,20 @@ bool Conductor::valideXml(QDomElement &e){ } /** - * @brief Conductor::mouseDoubleClickEvent - * Manage the mouse double click - * @param event - */ + @brief Conductor::mouseDoubleClickEvent + Manage the mouse double click + @param event +*/ void Conductor::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { event->accept(); editProperty(); } /** - * @brief Conductor::mousePressEvent - * Manage the mouse press event - * @param event - */ + @brief Conductor::mousePressEvent + Manage the mouse press event + @param event +*/ void Conductor::mousePressEvent(QGraphicsSceneMouseEvent *event) { QGraphicsObject::mousePressEvent(event); @@ -629,9 +629,9 @@ void Conductor::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief Conductor::mouseReleaseEvent - * @param event - */ + @brief Conductor::mouseReleaseEvent + @param event +*/ void Conductor::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (!(event -> modifiers() & Qt::ControlModifier)) @@ -639,10 +639,10 @@ void Conductor::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief Conductor::hoverEnterEvent - * Manage the hover enter event - * @param event - */ + @brief Conductor::hoverEnterEvent + Manage the hover enter event + @param event +*/ void Conductor::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); m_mouse_over = true; @@ -650,10 +650,10 @@ void Conductor::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { } /** - * @brief Conductor::hoverLeaveEvent - * Manage the mouse leave event - * @param event - */ + @brief Conductor::hoverLeaveEvent + Manage the mouse leave event + @param event +*/ void Conductor::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { Q_UNUSED(event); update(); @@ -661,11 +661,11 @@ void Conductor::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { } /** - * @brief Conductor::itemChange - * @param change - * @param value - * @return - */ + @brief Conductor::itemChange + @param change + @param value + @return +*/ QVariant Conductor::itemChange(GraphicsItemChange change, const QVariant &value) { if (change == QGraphicsItem::ItemSelectedChange) @@ -702,11 +702,11 @@ QVariant Conductor::itemChange(GraphicsItemChange change, const QVariant &value) } /** - * @brief Conductor::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief Conductor::sceneEventFilter + @param watched + @param event + @return +*/ bool Conductor::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -747,9 +747,9 @@ bool Conductor::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } /** - * @brief Conductor::adjusteHandlerPos - * Adjust the position of the handler item - */ + @brief Conductor::adjusteHandlerPos + Adjust the position of the handler item +*/ void Conductor::adjusteHandlerPos() { if (m_handler_vector.isEmpty()) @@ -764,10 +764,10 @@ void Conductor::adjusteHandlerPos() } /** - * @brief Conductor::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief Conductor::handlerMousePressEvent + @param qghi + @param event +*/ void Conductor::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); @@ -787,10 +787,10 @@ void Conductor::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSc } /** - * @brief Conductor::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief Conductor::handlerMouseMoveEvent + @param qghi + @param event +*/ void Conductor::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { if (m_moving_segment) @@ -815,10 +815,10 @@ void Conductor::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSce } /** - * @brief Conductor::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief Conductor::handlerMouseReleaseEvent + @param qghi + @param event +*/ void Conductor::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(event); @@ -839,9 +839,9 @@ void Conductor::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphics } /** - * @brief Conductor::addHandler - * Add handlers for this item - */ + @brief Conductor::addHandler + Add handlers for this item +*/ void Conductor::addHandler() { if (m_handler_vector.isEmpty() && scene()) @@ -859,9 +859,9 @@ void Conductor::addHandler() } /** - * @brief Conductor::removeHandler - * Remove the handlers of this item - */ + @brief Conductor::removeHandler + Remove the handlers of this item +*/ void Conductor::removeHandler() { if (!m_handler_vector.isEmpty()) @@ -872,9 +872,9 @@ void Conductor::removeHandler() } /** - * @brief Conductor::boundingRect - * @return - */ + @brief Conductor::boundingRect + @return +*/ QRectF Conductor::boundingRect() const { QRectF br = shape().boundingRect(); @@ -882,10 +882,10 @@ QRectF Conductor::boundingRect() const } /** - * @brief Conductor::shape - * @return the shape of conductor. - * The shape thickness is bigger when conductor is hovered - */ + @brief Conductor::shape + @return the shape of conductor. + The shape thickness is bigger when conductor is hovered +*/ QPainterPath Conductor::shape() const { QPainterPathStroker pps; @@ -898,9 +898,9 @@ QPainterPath Conductor::shape() const } /** - * @brief Conductor::nearShape - * @return : An area in which it is considered a point is near this conductor. - */ + @brief Conductor::nearShape + @return : An area in which it is considered a point is near this conductor. +*/ QPainterPath Conductor::nearShape() const { QPainterPathStroker pps; @@ -968,11 +968,11 @@ void Conductor::pointsToSegments(const QList& points_list) { } /** - * @brief Conductor::fromXml - * Load the conductor and her information from xml element - * @param e - * @return true is loading success else return false - */ + @brief Conductor::fromXml + Load the conductor and her information from xml element + @param e + @return true is loading success else return false +*/ bool Conductor::fromXml(QDomElement &dom_element) { setPos(dom_element.attribute("x", nullptr).toDouble(), @@ -1061,12 +1061,12 @@ QDomElement Conductor::toXml(QDomDocument &dom_document, QHash } /** - * @brief Conductor::pathFromXml - * Generate the path (of the line) from xml file by checking the segments in the xml - * file - * @param e - * @return true if generate path success else return false - */ + @brief Conductor::pathFromXml + Generate the path (of the line) from xml file by checking the segments in the xml + file + @param e + @return true if generate path success else return false +*/ bool Conductor::pathFromXml(const QDomElement &e) { // parcourt les elements XML "segment" et en extrait deux listes de longueurs // les segments non valides sont ignores @@ -1139,12 +1139,12 @@ bool Conductor::pathFromXml(const QDomElement &e) { } /** - * @brief Conductor::handlerPoints - * @return The points used to draw the handler square, used to modify - * the path of the conductor. - * The points stored in the QVector are the middle point of each segments that compose the conductor, - * at exception of the first and last segment because there just here to extend the terminal. - */ + @brief Conductor::handlerPoints + @return The points used to draw the handler square, used to modify + the path of the conductor. + The points stored in the QVector are the middle point of each segments that compose the conductor, + at exception of the first and last segment because there just here to extend the terminal. +*/ QVector Conductor::handlerPoints() const { QList sl = segmentsList(); @@ -1178,9 +1178,9 @@ const QList Conductor::segmentsList() const { } /** - * @brief Conductor::length - * @return the length of this conductor - */ + @brief Conductor::length + @return the length of this conductor +*/ qreal Conductor::length() const{ return path().length(); } @@ -1206,11 +1206,11 @@ ConductorSegment *Conductor::middleSegment() { } /** - * @brief Conductor::posForText - * Calculate and return the better pos for text. - * @param flag : flag is used to know if text pos is near of - * a vertical or horizontal conductor segment. - */ + @brief Conductor::posForText + Calculate and return the better pos for text. + @param flag : flag is used to know if text pos is near of + a vertical or horizontal conductor segment. +*/ QPointF Conductor::posForText(Qt::Orientations &flag) { @@ -1277,11 +1277,11 @@ QPointF Conductor::posForText(Qt::Orientations &flag) } /** - * @brief Conductor::calculateTextItemPosition - * Move the text at middle of conductor (if is vertical or horizontal) - * otherwise, move conductor at the middle of the longest segment of conductor. - * If text was moved by user, this function do nothing, except check if text is near conductor. - */ + @brief Conductor::calculateTextItemPosition + Move the text at middle of conductor (if is vertical or horizontal) + otherwise, move conductor at the middle of the longest segment of conductor. + If text was moved by user, this function do nothing, except check if text is near conductor. +*/ void Conductor::calculateTextItemPosition() { if (!m_text_item || !diagram() || m_properties.type != ConductorProperties::Multi) @@ -1440,10 +1440,10 @@ ConductorProfile Conductor::profile(Qt::Corner path_type) const { } /** - * @brief Conductor::refreshText - * Refresh the text of this conductor. - * recalcule and set the text according to the formula. - */ + @brief Conductor::refreshText + Refresh the text of this conductor. + recalcule and set the text according to the formula. +*/ void Conductor::refreshText() { if (m_freeze_label) @@ -1489,13 +1489,13 @@ QPainterPath Conductor::path() const } /** - * @brief Conductor::setPropertiesToPotential - * @param properties - * @param only_text - * Set @propertie to conductor and every conductors in the same potential of @conductor. - * If @only_text is true only formula, text, function and tension/protocol is set - * to other conductor in the same potential, the other values of property stay unmodified - */ + @brief Conductor::setPropertiesToPotential + @param properties + @param only_text + Set @propertie to conductor and every conductors in the same potential of @conductor. + If @only_text is true only formula, text, function and tension/protocol is set + to other conductor in the same potential, the other values of property stay unmodified +*/ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool only_text) { setProperties(property); @@ -1522,10 +1522,10 @@ void Conductor::setPropertyToPotential(const ConductorProperties &property, bool } /** - * @brief Conductor::setProperties - * Set @property as current property of conductor - * @param properties : properties - */ + @brief Conductor::setProperties + Set @property as current property of conductor + @param properties : properties +*/ void Conductor::setProperties(const ConductorProperties &property) { if (m_properties == property) return; @@ -1566,9 +1566,9 @@ void Conductor::setProperties(const ConductorProperties &property) } /** - * @brief Conductor::properties - * @return the properties of this Conductor - */ + @brief Conductor::properties + @return the properties of this Conductor +*/ ConductorProperties Conductor::properties() const { return(m_properties); @@ -1590,10 +1590,10 @@ void Conductor::setHighlighted(Conductor::Highlight hl) { } /** - * @brief Conductor::displayedTextChanged - * Update the properties (text) of this conductor and other conductors - * at the same potential of this conductor. - */ + @brief Conductor::displayedTextChanged + Update the properties (text) of this conductor and other conductors + at the same potential of this conductor. +*/ void Conductor::displayedTextChanged() { QVariant old_value, new_value; @@ -1627,14 +1627,14 @@ void Conductor::displayedTextChanged() /** - * @brief Conductor::relatedPotentialConductors - * Return all conductors at the same potential of this conductor, this conductor isn't - * part of the returned QSet. - * @param all_diagram : if true search in all diagram of the project, - * false search only in the parent diagram of this conductor - * @param t_list, a list of terminal already found for this potential. - * @return a QSet of conductor at the same potential. - */ + @brief Conductor::relatedPotentialConductors + Return all conductors at the same potential of this conductor, this conductor isn't + part of the returned QSet. + @param all_diagram : if true search in all diagram of the project, + false search only in the parent diagram of this conductor + @param t_list, a list of terminal already found for this potential. + @return a QSet of conductor at the same potential. +*/ QSet Conductor::relatedPotentialConductors(const bool all_diagram, QList *t_list) { bool declar_t_list = false; @@ -1688,9 +1688,9 @@ QSet Conductor::relatedPotentialConductors(const bool all_diagram, } /** - * @brief Conductor::diagramEditor - * @return The parent diagram editor or nullptr; - */ + @brief Conductor::diagramEditor + @return The parent diagram editor or nullptr; +*/ QETDiagramEditor* Conductor::diagramEditor() const { if (!diagram()) return nullptr; if (diagram() -> views().isEmpty()) return nullptr; @@ -1703,8 +1703,8 @@ QETDiagramEditor* Conductor::diagramEditor() const { } /** - * @brief Conductor::editProperty - */ + @brief Conductor::editProperty +*/ void Conductor::editProperty() { ConductorPropertiesDialog::PropertiesDialog(this, diagramEditor()); } @@ -1716,11 +1716,11 @@ void Conductor::setSequenceNum(const autonum::sequentialNumbers& sn) } /** - * @brief Conductor::setUpConnectionForFormula - * setup connection according to the variable of formula - * @param old_formula - * @param new_formula - */ + @brief Conductor::setUpConnectionForFormula + setup connection according to the variable of formula + @param old_formula + @param new_formula +*/ void Conductor::setUpConnectionForFormula(QString old_formula, QString new_formula) { if (diagram()) @@ -1909,9 +1909,9 @@ ConductorProfilesGroup Conductor::profiles() const { } /** - * @brief Conductor::setProfiles - * @param cpg : the new profils of conductor - */ + @brief Conductor::setProfiles + @param cpg : the new profils of conductor +*/ void Conductor::setProfiles(const ConductorProfilesGroup &cpg) { conductor_profiles = cpg; if (conductor_profiles[currentPathType()].isNull()) { @@ -1988,11 +1988,11 @@ QPointF Conductor::movePointIntoPolygon(const QPointF &point, const QPainterPath } /** - * @brief longuestConductorInPotential - * @param conductor : a conductor in the potential to search - * @param all_diagram : true -> search in the whole project, false -> search only in the diagram of conductor - * @return the longuest conductor in the same potential of conductor - */ + @brief longuestConductorInPotential + @param conductor : a conductor in the potential to search + @param all_diagram : true -> search in the whole project, false -> search only in the diagram of conductor + @return the longuest conductor in the same potential of conductor +*/ Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram) { Conductor *longuest_conductor = conductor; //Search the longuest conductor @@ -2004,11 +2004,11 @@ Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram) } /** - * @brief relatedConductors - * @param conductor - * @return return all conductors who share the same terminals of @conductor given as parametre, - * except @conductor himself. - */ + @brief relatedConductors + @param conductor + @return return all conductors who share the same terminals of @conductor given as parametre, + except @conductor himself. +*/ QList relatedConductors(const Conductor *conductor) { QList other_conductors_list = conductor -> terminal1 -> conductors(); other_conductors_list << conductor -> terminal2->conductors(); @@ -2017,11 +2017,11 @@ QList relatedConductors(const Conductor *conductor) { } /** - * @brief Conductor::setFreezeLabel - * Freeze this conductor label if true - * Unfreeze this conductor label if false - * @param freeze - */ + @brief Conductor::setFreezeLabel + Freeze this conductor label if true + Unfreeze this conductor label if false + @param freeze +*/ void Conductor::setFreezeLabel(bool freeze) { m_freeze_label = freeze; diff --git a/sources/qetgraphicsitem/conductor.h b/sources/qetgraphicsitem/conductor.h index 818ba1444..949569de1 100644 --- a/sources/qetgraphicsitem/conductor.h +++ b/sources/qetgraphicsitem/conductor.h @@ -68,10 +68,12 @@ class Conductor : public QGraphicsObject Terminal *terminal2; public: - /** - * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into a conductor. - * @return the QGraphicsItem type - */ + /** + @brief type + Enable the use of qgraphicsitem_cast + to safely cast a QGraphicsItem into a conductor. + @return the QGraphicsItem type + */ int type() const override { return Type; } Diagram *diagram() const; ConductorTextItem *textItem() const; diff --git a/sources/qetgraphicsitem/conductortextitem.cpp b/sources/qetgraphicsitem/conductortextitem.cpp index 012d98a43..2812c85d9 100644 --- a/sources/qetgraphicsitem/conductortextitem.cpp +++ b/sources/qetgraphicsitem/conductortextitem.cpp @@ -62,10 +62,10 @@ Conductor *ConductorTextItem::parentConductor() const { } /** - * @brief ConductorTextItem::fromXml - * Read the properties stored in the xml element given in parameter - * @param e - */ + @brief ConductorTextItem::fromXml + Read the properties stored in the xml element given in parameter + @param e +*/ void ConductorTextItem::fromXml(const QDomElement &e) { if (e.hasAttribute("userx")) { setPos(e.attribute("userx").toDouble(), @@ -87,9 +87,9 @@ bool ConductorTextItem::wasMovedByUser() const { } /** - * @brief ConductorTextItem::wasRotateByUser - * @return true if text was explicit moved by user else false - */ + @brief ConductorTextItem::wasRotateByUser + @return true if text was explicit moved by user else false +*/ bool ConductorTextItem::wasRotateByUser() const { return(rotate_by_user_); } @@ -110,11 +110,11 @@ void ConductorTextItem::forceMovedByUser(bool moved_by_user) { } /** - * @brief ConductorTextItem::forceRotateByUser - * @param rotate_by_user true pour que la rotation du texte soit consideree + @brief ConductorTextItem::forceRotateByUser + @param rotate_by_user true pour que la rotation du texte soit consideree comme ayant ete definie par l'utilisateur (et donc soit sauvegardee), false pour remettre le texte a sont angle originelle - */ +*/ void ConductorTextItem::forceRotateByUser(bool rotate_by_user) { if (rotate_by_user == rotate_by_user_) return; @@ -125,9 +125,9 @@ void ConductorTextItem::forceRotateByUser(bool rotate_by_user) { } /** - * @brief ConductorTextItem::setPos - * @param pos - */ + @brief ConductorTextItem::setPos + @param pos +*/ void ConductorTextItem::setPos(const QPointF &pos) { /* @@ -149,10 +149,10 @@ void ConductorTextItem::setPos(const QPointF &pos) } /** - * @brief ConductorTextItem::setPos - * @param x - * @param y - */ + @brief ConductorTextItem::setPos + @param x + @param y +*/ void ConductorTextItem::setPos(qreal x, qreal y) { QPointF p(x,y); @@ -160,18 +160,18 @@ void ConductorTextItem::setPos(qreal x, qreal y) } /** - * @brief ConductorTextItem::mousePressEvent - * @param event - */ + @brief ConductorTextItem::mousePressEvent + @param event +*/ void ConductorTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { before_mov_pos_ = pos(); DiagramTextItem::mousePressEvent(event); } /** - * @brief ConductorTextItem::mouseMoveEvent - * @param event - */ + @brief ConductorTextItem::mouseMoveEvent + @param event +*/ void ConductorTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (textInteractionFlags() & Qt::TextEditable) QGraphicsTextItem::mouseMoveEvent(event); @@ -194,9 +194,9 @@ void ConductorTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief ConductorTextItem::mouseReleaseEvent - * @param e - */ + @brief ConductorTextItem::mouseReleaseEvent + @param e +*/ void ConductorTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *e) { if (flags() & QGraphicsItem::ItemIsMovable) { diff --git a/sources/qetgraphicsitem/diagramimageitem.cpp b/sources/qetgraphicsitem/diagramimageitem.cpp index bf80136c6..812dadf99 100644 --- a/sources/qetgraphicsitem/diagramimageitem.cpp +++ b/sources/qetgraphicsitem/diagramimageitem.cpp @@ -21,10 +21,10 @@ #include "imagepropertieswidget.h" /** - * @brief DiagramImageItem::DiagramImageItem - * Constructor without pixmap - * @param parent_item the parent graphics item - */ + @brief DiagramImageItem::DiagramImageItem + Constructor without pixmap + @param parent_item the parent graphics item +*/ DiagramImageItem::DiagramImageItem(QetGraphicsItem *parent_item): QetGraphicsItem(parent_item) { @@ -32,11 +32,11 @@ DiagramImageItem::DiagramImageItem(QetGraphicsItem *parent_item): } /** - * @brief DiagramImageItem::DiagramImageItem - * Constructor with pixmap - * @param pixmap the pixmap to be draw - * @param parent_item the parent graphic item - */ + @brief DiagramImageItem::DiagramImageItem + Constructor with pixmap + @param pixmap the pixmap to be draw + @param parent_item the parent graphic item +*/ DiagramImageItem::DiagramImageItem(const QPixmap &pixmap, QetGraphicsItem *parent_item): QetGraphicsItem(parent_item), pixmap_(pixmap) @@ -46,19 +46,19 @@ DiagramImageItem::DiagramImageItem(const QPixmap &pixmap, QetGraphicsItem *paren } /** - * @brief DiagramImageItem::~DiagramImageItem - * Destructor - */ + @brief DiagramImageItem::~DiagramImageItem + Destructor +*/ DiagramImageItem::~DiagramImageItem() { } /** - * @brief DiagramImageItem::paint - * Draw the pixmap. - * @param painter the Qpainter to use for draw the pixmap - * @param option the style option - * @param widget the QWidget where we draw the pixmap - */ + @brief DiagramImageItem::paint + Draw the pixmap. + @param painter the Qpainter to use for draw the pixmap + @param option the style option + @param widget the QWidget where we draw the pixmap +*/ void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter -> drawPixmap(pixmap_.rect(),pixmap_); @@ -80,9 +80,9 @@ void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * } /** - * @brief DiagramImageItem::editProperty - * Open the approriate dialog to edit this image - */ + @brief DiagramImageItem::editProperty + Open the approriate dialog to edit this image +*/ void DiagramImageItem::editProperty() { if (diagram() -> isReadOnly()) return; @@ -91,21 +91,21 @@ void DiagramImageItem::editProperty() } /** - * @brief DiagramImageItem::setPixmap - * Set the new pixmap to be draw - * @param pixmap the new pixmap - */ + @brief DiagramImageItem::setPixmap + Set the new pixmap to be draw + @param pixmap the new pixmap +*/ void DiagramImageItem::setPixmap(const QPixmap &pixmap) { pixmap_ = pixmap; setTransformOriginPoint(boundingRect().center()); } /** - * @brief DiagramImageItem::boundingRect - * the outer bounds of the item as a rectangle, - * if no pixmap are set, return a default QRectF - * @return a QRectF represent the bounding rectangle - */ + @brief DiagramImageItem::boundingRect + the outer bounds of the item as a rectangle, + if no pixmap are set, return a default QRectF + @return a QRectF represent the bounding rectangle +*/ QRectF DiagramImageItem::boundingRect() const { if (!pixmap_.isNull()) { return (QRectF(pixmap_.rect())); @@ -116,19 +116,19 @@ QRectF DiagramImageItem::boundingRect() const { } /** - * @brief DiagramImageItem::name - * @return the generic name of this item (picture) - */ + @brief DiagramImageItem::name + @return the generic name of this item (picture) +*/ QString DiagramImageItem::name() const { return tr("une image"); } /** - * @brief DiagramImageItem::fromXml - * Load this image fro xml elemebt @e - * @param e - * @return true if succesfully load. - */ + @brief DiagramImageItem::fromXml + Load this image fro xml elemebt @e + @param e + @return true if succesfully load. +*/ bool DiagramImageItem::fromXml(const QDomElement &e) { if (e.tagName() != "image") { diff --git a/sources/qetgraphicsitem/diagramtextitem.cpp b/sources/qetgraphicsitem/diagramtextitem.cpp index b9f8d9024..c2687fa06 100644 --- a/sources/qetgraphicsitem/diagramtextitem.cpp +++ b/sources/qetgraphicsitem/diagramtextitem.cpp @@ -22,18 +22,18 @@ #include "diagram.h" /** - * @brief DiagramTextItem::DiagramTextItem - * @param parent : parent item - */ + @brief DiagramTextItem::DiagramTextItem + @param parent : parent item +*/ DiagramTextItem::DiagramTextItem(QGraphicsItem *parent) : QGraphicsTextItem(parent) { build(); } /** - * @brief DiagramTextItem::DiagramTextItem - * @param text : text to display - * @param parent : parent item - */ + @brief DiagramTextItem::DiagramTextItem + @param text : text to display + @param parent : parent item +*/ DiagramTextItem::DiagramTextItem(const QString &text, QGraphicsItem *parent) : QGraphicsTextItem(text, parent), m_mouse_hover(false), @@ -41,9 +41,9 @@ DiagramTextItem::DiagramTextItem(const QString &text, QGraphicsItem *parent) : { build(); } /** - * @brief DiagramTextItem::build - * Build this item with default value - */ + @brief DiagramTextItem::build + Build this item with default value +*/ void DiagramTextItem::build() { //set Zvalue at 10 to be upper than the DiagramImageItem @@ -57,19 +57,19 @@ void DiagramTextItem::build() } /** - * @brief DiagramTextItem::diagram - * @return The diagram of this item or 0 if this text isn't in a diagram - */ + @brief DiagramTextItem::diagram + @return The diagram of this item or 0 if this text isn't in a diagram +*/ Diagram *DiagramTextItem::diagram() const { return(qobject_cast(scene())); } /** - * @brief DiagramTextItem::toXml - * This method do nothing and return an empty DomElement - * This is used to be inherited by child class - * @return - */ + @brief DiagramTextItem::toXml + This method do nothing and return an empty DomElement + This is used to be inherited by child class + @return +*/ QDomElement DiagramTextItem::toXml(QDomDocument &) const { return QDomElement(); } @@ -186,9 +186,9 @@ Qt::Alignment DiagramTextItem::alignment() const } /** - * @brief DiagramTextItem::frameRect - * @return the rect used to draw a frame around this text - */ + @brief DiagramTextItem::frameRect + @return the rect used to draw a frame around this text +*/ QRectF DiagramTextItem::frameRect() const { //Get the bounding rectangle of the text @@ -226,13 +226,13 @@ bool DiagramTextItem::isHtml() const { } /** - * @brief DiagramTextItem::paint - * Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. - * If text is hovered, this method draw the bounding rect in grey - * @param painter : painter to use - * @param option : style option - * @param widget : widget where must to draw - */ + @brief DiagramTextItem::paint + Draw this text field. This method draw the text by calling QGraphicsTextItem::paint. + If text is hovered, this method draw the bounding rect in grey + @param painter : painter to use + @param option : style option + @param widget : widget where must to draw +*/ void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { painter -> setRenderHint(QPainter::Antialiasing, false); @@ -261,9 +261,9 @@ void DiagramTextItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *o } /** - * @brief DiagramTextItem::focusInEvent - * @param e - */ + @brief DiagramTextItem::focusInEvent + @param e +*/ void DiagramTextItem::focusInEvent(QFocusEvent *event) { QGraphicsTextItem::focusInEvent(event); @@ -275,9 +275,9 @@ void DiagramTextItem::focusInEvent(QFocusEvent *event) } /** - * @brief DiagramTextItem::focusOutEvent - * @param event - */ + @brief DiagramTextItem::focusOutEvent + @param event +*/ void DiagramTextItem::focusOutEvent(QFocusEvent *event) { QGraphicsTextItem::focusOutEvent(event); @@ -313,9 +313,9 @@ void DiagramTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief DiagramTextItem::mousePressEvent - * @param event - */ + @brief DiagramTextItem::mousePressEvent + @param event +*/ void DiagramTextItem::mousePressEvent (QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) @@ -328,9 +328,9 @@ void DiagramTextItem::mousePressEvent (QGraphicsSceneMouseEvent *event) } /** - * @brief DiagramTextItem::mouseMoveEvent - * @param event - */ + @brief DiagramTextItem::mouseMoveEvent + @param event +*/ void DiagramTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (textInteractionFlags() & Qt::TextEditable) QGraphicsTextItem::mouseMoveEvent(event); @@ -359,9 +359,9 @@ void DiagramTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { } /** - * @brief DiagramTextItem::mouseReleaseEvent - * @param event - */ + @brief DiagramTextItem::mouseReleaseEvent + @param event +*/ void DiagramTextItem::mouseReleaseEvent (QGraphicsSceneMouseEvent *event) { //Signal to diagram movement is finish @@ -394,19 +394,19 @@ void DiagramTextItem::applyRotation(const qreal &angle) { } /** - * @brief DiagramTextItem::prepareAlignment - * Call this function before changing the bounding rect of this text. - */ + @brief DiagramTextItem::prepareAlignment + Call this function before changing the bounding rect of this text. +*/ void DiagramTextItem::prepareAlignment() { m_alignment_rect = boundingRect(); } /** - * @brief DiagramTextItem::finishAlignment - * Call this function after changing the bouding rect of this text - * to set the position of this text according to the alignment property. - */ + @brief DiagramTextItem::finishAlignment + Call this function after changing the bouding rect of this text + to set the position of this text according to the alignment property. +*/ void DiagramTextItem::finishAlignment() { if(m_block_alignment) @@ -448,8 +448,8 @@ void DiagramTextItem::finishAlignment() } /** - * @brief Edit the text with HtmlEditor - */ + @brief Edit the text with HtmlEditor +*/ void DiagramTextItem::edit() { QWidget *parent = nullptr; diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.cpp b/sources/qetgraphicsitem/dynamicelementtextitem.cpp index ba8ea4fcb..3d4cf2257 100644 --- a/sources/qetgraphicsitem/dynamicelementtextitem.cpp +++ b/sources/qetgraphicsitem/dynamicelementtextitem.cpp @@ -31,10 +31,10 @@ #include /** - * @brief DynamicElementTextItem::DynamicElementTextItem - * Constructor - * @param parent_element - */ + @brief DynamicElementTextItem::DynamicElementTextItem + Constructor + @param parent_element +*/ DynamicElementTextItem::DynamicElementTextItem(Element *parent_element) : m_parent_element(parent_element), m_uuid(QUuid::createUuid()) @@ -66,9 +66,9 @@ DynamicElementTextItem::~DynamicElementTextItem() {} /** - * @brief DynamicElementTextItem::textFromMetaEnum - * @return The QMetaEnum of the enum TextFrom - */ + @brief DynamicElementTextItem::textFromMetaEnum + @return The QMetaEnum of the enum TextFrom +*/ QMetaEnum DynamicElementTextItem::textFromMetaEnum() { DynamicElementTextItem deti; @@ -79,11 +79,11 @@ DynamicElementTextItem::DynamicElementTextItem() {} /** - * @brief DynamicElementTextItem::toXml - * Export this text to xml - * @param dom_doc - * @return - */ + @brief DynamicElementTextItem::toXml + Export this text to xml + @param dom_doc + @return +*/ QDomElement DynamicElementTextItem::toXml(QDomDocument &dom_doc) const { QDomElement root_element = dom_doc.createElement(xmlTagName()); @@ -147,10 +147,10 @@ QDomElement DynamicElementTextItem::toXml(QDomDocument &dom_doc) const } /** - * @brief DynamicElementTextItem::fromXml - * Import this text from xml - * @param dom_elmt - */ + @brief DynamicElementTextItem::fromXml + Import this text from xml + @param dom_elmt +*/ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt) { if (dom_elmt.tagName() != xmlTagName()) { @@ -219,20 +219,20 @@ void DynamicElementTextItem::fromXml(const QDomElement &dom_elmt) } /** - * @brief DynamicElementTextItem::ParentElement - * @return a pointer to the parent element. Note the pointer can be null. - * Note that the text can return a parent element, - * even if the text belong to a group of this same element. - */ + @brief DynamicElementTextItem::ParentElement + @return a pointer to the parent element. Note the pointer can be null. + Note that the text can return a parent element, + even if the text belong to a group of this same element. +*/ Element *DynamicElementTextItem::parentElement() const { return m_parent_element; } /** - * @brief DynamicElementTextItem::parentGroup - * @return The group where this text belong, if this item - * is note in a group, return nullptr. - */ + @brief DynamicElementTextItem::parentGroup + @return The group where this text belong, if this item + is note in a group, return nullptr. +*/ ElementTextItemGroup *DynamicElementTextItem::parentGroup() const { if(parentItem()) @@ -245,16 +245,16 @@ ElementTextItemGroup *DynamicElementTextItem::parentGroup() const } /** - * @brief DynamicElementTextItem::elementUseForInfo - * @return a pointer to the element we must use for the variable information. - * If this text is owned by a simple element, the simple element is returned, this is the same element returned by the function parentElement(). - * If this text is owned by a master element, the master element is returned, this is the same element returned by the function parentElement(). - * If this text is owned by a report element, the report element is returned, this is the same element returned by the function parentElement(). - * If this text is owned by a terminal element, the terminal element is returned, this is the same element returned by the function parentElement(). - * If this text is owned by a slave element, we return the master element set as master of the parent slave element, - * if the parent slave is not linked to a master, this function return a nullptr. - * If this text have no parent element, return nullptr - */ + @brief DynamicElementTextItem::elementUseForInfo + @return a pointer to the element we must use for the variable information. + If this text is owned by a simple element, the simple element is returned, this is the same element returned by the function parentElement(). + If this text is owned by a master element, the master element is returned, this is the same element returned by the function parentElement(). + If this text is owned by a report element, the report element is returned, this is the same element returned by the function parentElement(). + If this text is owned by a terminal element, the terminal element is returned, this is the same element returned by the function parentElement(). + If this text is owned by a slave element, we return the master element set as master of the parent slave element, + if the parent slave is not linked to a master, this function return a nullptr. + If this text have no parent element, return nullptr +*/ Element *DynamicElementTextItem::elementUseForInfo() const { Element *elmt = parentElement(); @@ -286,10 +286,10 @@ Element *DynamicElementTextItem::elementUseForInfo() const } /** - * @brief DynamicElementTextItem::refreshLabelConnection - * Refresh the connection of this text when the source of text is label, - * or composite text, with a variable %{label} - */ + @brief DynamicElementTextItem::refreshLabelConnection + Refresh the connection of this text when the source of text is label, + or composite text, with a variable %{label} +*/ void DynamicElementTextItem::refreshLabelConnection() { if ((m_text_from == ElementInfo && m_info_name == "label") || @@ -309,18 +309,18 @@ void DynamicElementTextItem::refreshLabelConnection() } /** - * @brief DynamicElementTextItem::textFrom - * @return what the final text is created from. - */ + @brief DynamicElementTextItem::textFrom + @return what the final text is created from. +*/ DynamicElementTextItem::TextFrom DynamicElementTextItem::textFrom() const { return m_text_from; } /** - * @brief DynamicElementTextItem::setTextFrom - * Set the final text is created from. - * @param text_from - */ + @brief DynamicElementTextItem::setTextFrom + Set the final text is created from. + @param text_from +*/ void DynamicElementTextItem::setTextFrom(DynamicElementTextItem::TextFrom text_from) { if(m_text_from == text_from) @@ -372,18 +372,18 @@ void DynamicElementTextItem::setTextFrom(DynamicElementTextItem::TextFrom text_f } /** - * @brief DynamicElementTextItem::text - * @return the text of this text - */ + @brief DynamicElementTextItem::text + @return the text of this text +*/ QString DynamicElementTextItem::text() const { return m_text; } /** - * @brief DynamicElementTextItem::setText - * Set the text of this text - * @param formula - */ + @brief DynamicElementTextItem::setText + Set the text of this text + @param formula +*/ void DynamicElementTextItem::setText(const QString &text) { m_text = text; @@ -393,10 +393,10 @@ void DynamicElementTextItem::setText(const QString &text) } /** - * @brief DynamicElementTextItem::setInfoName - * Set the information name of the parent element. - * @param info_name - */ + @brief DynamicElementTextItem::setInfoName + Set the information name of the parent element. + @param info_name +*/ void DynamicElementTextItem::setInfoName(const QString &info_name) { QString old_info_name = m_info_name; @@ -439,18 +439,18 @@ void DynamicElementTextItem::setInfoName(const QString &info_name) } /** - * @brief DynamicElementTextItem::infoName - * @return the info name of this text - */ + @brief DynamicElementTextItem::infoName + @return the info name of this text +*/ QString DynamicElementTextItem::infoName() const { return m_info_name; } /** - * @brief DynamicElementTextItem::setCompositeText - * Set the composite text of this text item to @text - * @param text - */ + @brief DynamicElementTextItem::setCompositeText + Set the composite text of this text item to @text + @param text +*/ void DynamicElementTextItem::setCompositeText(const QString &text) { QString old_composite_text = m_composite_text; @@ -495,9 +495,9 @@ void DynamicElementTextItem::setCompositeText(const QString &text) } /** - * @brief DynamicElementTextItem::compositeText - * @return - */ + @brief DynamicElementTextItem::compositeText + @return +*/ QString DynamicElementTextItem::compositeText() const { return m_composite_text; @@ -521,9 +521,9 @@ QUuid DynamicElementTextItem::uuid() const } /** - * @brief DynamicElementTextItem::mousePressEvent - * @param event - */ + @brief DynamicElementTextItem::mousePressEvent + @param event +*/ void DynamicElementTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { //The text become selected, we set the real color, otherwise the editor will display the color of text as blue, @@ -540,9 +540,9 @@ void DynamicElementTextItem::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DynamicElementTextItem::mouseMoveEvent - * @param event - */ + @brief DynamicElementTextItem::mouseMoveEvent + @param event +*/ void DynamicElementTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if((event->buttons() & Qt::LeftButton) && (flags() & ItemIsMovable)) @@ -576,9 +576,9 @@ void DynamicElementTextItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DynamicElementTextItem::mouseReleaseEvent - * @param event - */ + @brief DynamicElementTextItem::mouseReleaseEvent + @param event +*/ void DynamicElementTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (m_parent_element) @@ -592,12 +592,12 @@ void DynamicElementTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief DynamicElementTextItem::mouseDoubleClickEvent - * Reimplemented functions, for add extra feature when this text is owned by a slave. - * In this case if the parent slave element is linked to a master, and this text display the label of the master - * (both if the 'text from' is 'element info' or 'composite text') the QGraphicsView go to master and select it. - * @param event - */ + @brief DynamicElementTextItem::mouseDoubleClickEvent + Reimplemented functions, for add extra feature when this text is owned by a slave. + In this case if the parent slave element is linked to a master, and this text display the label of the master + (both if the 'text from' is 'element info' or 'composite text') the QGraphicsView go to master and select it. + @param event +*/ void DynamicElementTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { DiagramTextItem::mouseDoubleClickEvent(event); @@ -605,12 +605,12 @@ void DynamicElementTextItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *eve } /** - * @brief DynamicElementTextItem::hoverEnterEvent - * If the parent element of this text is a folio report or a slave element, the element is linked - * and the text display the variable "label" we set the text blue for signal the user that the text act like - * a link when we double click on. - * @param event - */ + @brief DynamicElementTextItem::hoverEnterEvent + If the parent element of this text is a folio report or a slave element, the element is linked + and the text display the variable "label" we set the text blue for signal the user that the text act like + a link when we double click on. + @param event +*/ void DynamicElementTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { DiagramTextItem::hoverEnterEvent(event); @@ -632,9 +632,9 @@ void DynamicElementTextItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) } /** - * @brief DynamicElementTextItem::hoverLeaveEvent - * @param event - */ + @brief DynamicElementTextItem::hoverLeaveEvent + @param event +*/ void DynamicElementTextItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { DiagramTextItem::hoverLeaveEvent(event); @@ -806,10 +806,10 @@ void DynamicElementTextItem::elementInfoChanged() } /** - * @brief DynamicElementTextItem::masterChanged - * This function is only use when the parent element is a slave. - * Call when the master element linked to the parent slave element of this text change - */ + @brief DynamicElementTextItem::masterChanged + This function is only use when the parent element is a slave. + Call when the master element linked to the parent slave element of this text change +*/ void DynamicElementTextItem::masterChanged() { //First we remove the old connection @@ -834,10 +834,10 @@ void DynamicElementTextItem::masterChanged() } /** - * @brief DynamicElementTextItem::reportChanged - * This function is only use when parent element of this text is a folio report - * The linked report of the parent element was changed - */ + @brief DynamicElementTextItem::reportChanged + This function is only use when parent element of this text is a folio report + The linked report of the parent element was changed +*/ void DynamicElementTextItem::reportChanged() { /* @@ -880,9 +880,9 @@ void DynamicElementTextItem::reportChanged() } /** - * @brief DynamicElementTextItem::reportFormulaChanged - * The report formula use in the project was changed - */ + @brief DynamicElementTextItem::reportFormulaChanged + The report formula use in the project was changed +*/ void DynamicElementTextItem::reportFormulaChanged() { m_report_formula = parentElement()->diagram()->project()->defaultReportProperties(); @@ -947,9 +947,9 @@ void DynamicElementTextItem::removeConnectionForReportFormula(const QString &for } /** - * @brief DynamicElementTextItem::setupFormulaConnection - * Setup the required connection for the formula of the label. - */ + @brief DynamicElementTextItem::setupFormulaConnection + Setup the required connection for the formula of the label. +*/ void DynamicElementTextItem::setupFormulaConnection() { if ((m_text_from == ElementInfo && m_info_name == "label") || @@ -1006,9 +1006,9 @@ void DynamicElementTextItem::updateReportFormulaConnection() } /** - * @brief DynamicElementTextItem::updateReportText - * This function is only use when this text is owned by a report, and this text have for info the Label. - */ + @brief DynamicElementTextItem::updateReportText + This function is only use when this text is owned by a report, and this text have for info the Label. +*/ void DynamicElementTextItem::updateReportText() { if(!(m_parent_element.data()->linkType() & Element::AllReport)) @@ -1034,11 +1034,11 @@ void DynamicElementTextItem::updateReportText() } /** - * @brief DynamicElementTextItem::updateLabel - * Update the displayed text, when this dynamic text is based on the label of the parent element. - * This function is notably use when the label itself is based from a formula. - * If this dynamic text isn't based on label, this function do nothing. - */ + @brief DynamicElementTextItem::updateLabel + Update the displayed text, when this dynamic text is based on the label of the parent element. + This function is notably use when the label itself is based from a formula. + If this dynamic text isn't based on label, this function do nothing. +*/ void DynamicElementTextItem::updateLabel() { if ((m_text_from == ElementInfo && m_info_name == "label") || @@ -1061,10 +1061,10 @@ void DynamicElementTextItem::updateLabel() } /** - * @brief DynamicElementTextItem::conductorWasAdded - * Function only use when parent element is a folio report - * @param conductor - */ + @brief DynamicElementTextItem::conductorWasAdded + Function only use when parent element is a folio report + @param conductor +*/ void DynamicElementTextItem::conductorWasAdded(Conductor *conductor) { Q_UNUSED(conductor) @@ -1072,10 +1072,10 @@ void DynamicElementTextItem::conductorWasAdded(Conductor *conductor) } /** - * @brief DynamicElementTextItem::conductorWasRemoved - * Function only use when parent element is a folio report - * @param conductor - */ + @brief DynamicElementTextItem::conductorWasRemoved + Function only use when parent element is a folio report + @param conductor +*/ void DynamicElementTextItem::conductorWasRemoved(Conductor *conductor) { if(m_watched_conductor.data() == conductor) @@ -1087,10 +1087,10 @@ void DynamicElementTextItem::conductorWasRemoved(Conductor *conductor) } /** - * @brief DynamicElementTextItem::setPotentialConductor - * This function is only used when the parent element of this text is a report element - * Get a conductor in the potential of the parent report - */ + @brief DynamicElementTextItem::setPotentialConductor + This function is only used when the parent element of this text is a report element + Get a conductor in the potential of the parent report +*/ void DynamicElementTextItem::setPotentialConductor() { if(parentElement() && (parentElement()->linkType() & Element::AllReport)) @@ -1137,9 +1137,9 @@ void DynamicElementTextItem::setPotentialConductor() } /** - * @brief DynamicElementTextItem::conductorPropertiesChanged - * This function is only used when the parent element of this text is a report element - */ + @brief DynamicElementTextItem::conductorPropertiesChanged + This function is only used when the parent element of this text is a report element +*/ void DynamicElementTextItem::conductorPropertiesChanged() { if(m_parent_element && (m_parent_element.data()->linkType() & Element::AllReport)) @@ -1162,11 +1162,11 @@ void DynamicElementTextItem::conductorPropertiesChanged() } /** - * @brief DynamicElementTextItem::reportReplacedCompositeText - * This function is only used when the parent element of this text is a report element - * @return the composite text with the variable replaced by the real value. - * If the parent element of this text is not a folio report, return a default QString. - */ + @brief DynamicElementTextItem::reportReplacedCompositeText + This function is only used when the parent element of this text is a report element + @return the composite text with the variable replaced by the real value. + If the parent element of this text is not a folio report, return a default QString. +*/ QString DynamicElementTextItem::reportReplacedCompositeText() const { QString string; @@ -1199,10 +1199,10 @@ QString DynamicElementTextItem::reportReplacedCompositeText() const } /** - * @brief DynamicElementTextItem::zoomToLinkedElement - * If the parent element is a folio report or a slave element, - * and is linked, zoom to the linked element - */ + @brief DynamicElementTextItem::zoomToLinkedElement + If the parent element is a folio report or a slave element, + and is linked, zoom to the linked element +*/ void DynamicElementTextItem::zoomToLinkedElement() { if(!parentElement()) @@ -1245,9 +1245,9 @@ void DynamicElementTextItem::zoomToLinkedElement() } /** - * @brief DynamicElementTextItem::updateXref - * Create or delete the Xref according to the current properties of the project - */ + @brief DynamicElementTextItem::updateXref + Create or delete the Xref according to the current properties of the project +*/ void DynamicElementTextItem::updateXref() { if(diagram()) diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.h b/sources/qetgraphicsitem/dynamicelementtextitem.h index 69e03a94b..a83eaeffe 100644 --- a/sources/qetgraphicsitem/dynamicelementtextitem.h +++ b/sources/qetgraphicsitem/dynamicelementtextitem.h @@ -30,11 +30,11 @@ class ElementTextItemGroup; class CrossRefItem; /** - * @brief The DynamicElementTextItem class - * This class provide a simple text field of element who can be added or removed directly from the diagram editor. - * This text is created to compensate a big lack of the ElementTextItem : ElementTextItem can't be added or removed directly in the diagram editor - * - */ + @brief The DynamicElementTextItem class + This class provide a simple text field of element who can be added or removed directly from the diagram editor. + This text is created to compensate a big lack of the ElementTextItem : ElementTextItem can't be added or removed directly in the diagram editor + +*/ class DynamicElementTextItem : public DiagramTextItem { friend class DynamicTextItemDelegate; diff --git a/sources/qetgraphicsitem/element.cpp b/sources/qetgraphicsitem/element.cpp index 4ec049821..a724e7646 100644 --- a/sources/qetgraphicsitem/element.cpp +++ b/sources/qetgraphicsitem/element.cpp @@ -70,11 +70,11 @@ class ElementXmlRetroCompatibility }; /** - * @brief Element::Element - * @param location, location of this element - * @param parent, parent graphics item - * @param state, state of the instanciation - */ + @brief Element::Element + @param location, location of this element + @param parent, parent graphics item + @param state, state of the instanciation +*/ Element::Element(const ElementsLocation &location, QGraphicsItem *parent, int *state, @@ -120,8 +120,8 @@ Element::Element(const ElementsLocation &location, } /** - * @brief Element::~Element - */ + @brief Element::~Element +*/ Element::~Element() { qDeleteAll (m_dynamic_text_list); @@ -129,19 +129,19 @@ Element::~Element() } /** - * @brief Element::terminals - * @return the list of terminals of this element. - */ + @brief Element::terminals + @return the list of terminals of this element. +*/ QList Element::terminals() const { return m_terminals; } /** - * @brief Element::conductors - * @return The list of conductors docked to this element - * the list is sorted according to the position of the terminal where the conductor is docked - * from top to bottom, and left to right. - */ + @brief Element::conductors + @return The list of conductors docked to this element + the list is sorted according to the position of the terminal where the conductor is docked + from top to bottom, and left to right. +*/ QList Element::conductors() const { QList conductors; @@ -179,10 +179,10 @@ void Element::setHighlighted(bool hl) { } /** - * @brief Element::displayHelpLine - * Display the help line of each terminal if b is true - * @param b - */ + @brief Element::displayHelpLine + Display the help line of each terminal if b is true + @param b +*/ void Element::displayHelpLine(bool b) { foreach (Terminal *t, terminals()) @@ -190,11 +190,11 @@ void Element::displayHelpLine(bool b) } /** - * @brief Element::paint - * @param painter - * @param options - * @param widget - */ + @brief Element::paint + @param painter + @param options + @param widget +*/ void Element::paint(QPainter *painter, const QStyleOptionGraphicsItem *options, QWidget *) @@ -224,13 +224,13 @@ QRectF Element::boundingRect() const { } /** - * @brief Element::setSize - * Define the size of the element. - * The size must be a multiple of 10. - * If not, the dimensions indicated will be arrrondies to higher tens. - * @param wid - * @param hei - */ + @brief Element::setSize + Define the size of the element. + The size must be a multiple of 10. + If not, the dimensions indicated will be arrrondies to higher tens. + @param wid + @param hei +*/ void Element::setSize(int wid, int hei) { prepareGeometryChange(); @@ -273,9 +273,9 @@ QPoint Element::hotspot() const { } /** - * @brief Element::pixmap - * @return the pixmap of this element - */ + @brief Element::pixmap + @return the pixmap of this element +*/ QPixmap Element::pixmap() { return ElementPictureFactory::instance()->pixmap(m_location); } @@ -306,7 +306,7 @@ void Element::drawAxes(QPainter *painter, Dessine le cadre de selection de l'element de maniere systematiquement non antialiasee. @param painter Le QPainter a utiliser pour dessiner les bornes. @param options Les options de style a prendre en compte - */ +*/ void Element::drawSelection(QPainter *painter, const QStyleOptionGraphicsItem *options) { Q_UNUSED(options); @@ -332,7 +332,7 @@ void Element::drawSelection(QPainter *painter, Dessine le cadre de selection de l'element de maniere systematiquement non antialiasee. @param painter Le QPainter a utiliser pour dessiner les bornes. @param options Les options de style a prendre en compte - */ +*/ void Element::drawHighlight(QPainter *painter, const QStyleOptionGraphicsItem *options) { Q_UNUSED(options); @@ -359,19 +359,19 @@ void Element::drawHighlight(QPainter *painter, } /** - * @brief Element::buildFromXml - * Build this element from an xml description - * @param xml_def_elmt - * @param state - * Optional pointer which define the status of build - * 0 - evreything all right - * 4 - xml isn't a "definition" - * 5 - attribute of the definition isn't present or valid - * 6 - the definition is empty - * 7 - parsing of a xml node who describe a graphical part failed. - * 8 - No part of the drawing could be loaded - * @return - */ + @brief Element::buildFromXml + Build this element from an xml description + @param xml_def_elmt + @param state + Optional pointer which define the status of build + 0 - evreything all right + 4 - xml isn't a "definition" + 5 - attribute of the definition isn't present or valid + 6 - the definition is empty + 7 - parsing of a xml node who describe a graphical part failed. + 8 - No part of the drawing could be loaded + @return +*/ bool Element::buildFromXml(const QDomElement &xml_def_elmt, int *state) { m_state = QET::GIBuildingFromXml; @@ -517,11 +517,11 @@ bool Element::buildFromXml(const QDomElement &xml_def_elmt, int *state) } /** - * @brief Element::parseElement - * Parse the element of the xml description of this element - * @param dom - * @return - */ + @brief Element::parseElement + Parse the element of the xml description of this element + @param dom + @return +*/ bool Element::parseElement(const QDomElement &dom) { if (dom.tagName() == "terminal") return(parseTerminal(dom)); @@ -531,13 +531,13 @@ bool Element::parseElement(const QDomElement &dom) } /** - * @brief Element::parseInput - * Parse the input (old text field) - * the parsed input are converted to dynamic text field, this function - * is only here to keep compatibility with old text. - * @param dom_element - * @return - */ + @brief Element::parseInput + Parse the input (old text field) + the parsed input are converted to dynamic text field, this function + is only here to keep compatibility with old text. + @param dom_element + @return +*/ bool Element::parseInput(const QDomElement &dom_element) { qreal pos_x, pos_y; @@ -588,11 +588,11 @@ bool Element::parseInput(const QDomElement &dom_element) } /** - * @brief Element::parseDynamicText - * Create the dynamic text field describ in @dom_element - * @param dom_element - * @return - */ + @brief Element::parseDynamicText + Create the dynamic text field describ in @dom_element + @param dom_element + @return +*/ DynamicElementTextItem *Element::parseDynamicText( const QDomElement &dom_element) { @@ -610,11 +610,11 @@ DynamicElementTextItem *Element::parseDynamicText( } /*! - * \brief Element::parseTerminal - * Parse partTerminal from xml structure - * \param dom_element - * \return - */ + \brief Element::parseTerminal + Parse partTerminal from xml structure + \param dom_element + \return +*/ Terminal *Element::parseTerminal(const QDomElement &dom_element) { @@ -668,18 +668,18 @@ bool Element::valideXml(QDomElement &e) { } /** - * @brief Element::fromXml - * Import the parameters of this element from a xml document. - * When call this function ensure this element is already in a scene, because - * the dynamic text item and element text item group (in the xml file) are created in this function - * and need a diagram for create their Xref, when this element is linked to another. - * If not the Xref can be not displayed, until the next call of update Xref of the group or text item. - * @param e : the dom element where the parameter is stored - * @param table_id_adr : Reference to the mapping table between IDs of the XML file - * and the addresses in memory. If the import succeeds, it must be add the right couples (id, address). - * @param handle_inputs_rotation : apply the rotation of this element to his child text - * @return - */ + @brief Element::fromXml + Import the parameters of this element from a xml document. + When call this function ensure this element is already in a scene, because + the dynamic text item and element text item group (in the xml file) are created in this function + and need a diagram for create their Xref, when this element is linked to another. + If not the Xref can be not displayed, until the next call of update Xref of the group or text item. + @param e : the dom element where the parameter is stored + @param table_id_adr : Reference to the mapping table between IDs of the XML file + and the addresses in memory. If the import succeeds, it must be add the right couples (id, address). + @param handle_inputs_rotation : apply the rotation of this element to his child text + @return +*/ bool Element::fromXml(QDomElement &e, QHash &table_id_adr, @@ -1245,11 +1245,11 @@ QDomElement Element::toXml(QDomDocument &document, } /** - * @brief Element::addDynamiqueTextItem - * Add @deti as a dynamic text item of this element, @deti is reparented to this - * If @deti is null, a new DynamicElementTextItem is created and added to this element. - * @param deti - */ + @brief Element::addDynamiqueTextItem + Add @deti as a dynamic text item of this element, @deti is reparented to this + If @deti is null, a new DynamicElementTextItem is created and added to this element. + @param deti +*/ void Element::addDynamicTextItem(DynamicElementTextItem *deti) { if (deti && !m_dynamic_text_list.contains(deti)) @@ -1267,11 +1267,11 @@ void Element::addDynamicTextItem(DynamicElementTextItem *deti) } /** - * @brief Element::removeDynamicTextItem - * Remove @deti, no matter if is a child of this element or a child of a group of this element. - * Set he parent item of @deti to 0, @deti is not deleted. - * @param deti - */ + @brief Element::removeDynamicTextItem + Remove @deti, no matter if is a child of this element or a child of a group of this element. + Set he parent item of @deti to 0, @deti is not deleted. + @param deti +*/ void Element::removeDynamicTextItem(DynamicElementTextItem *deti) { if (m_dynamic_text_list.contains(deti)) @@ -1296,23 +1296,23 @@ void Element::removeDynamicTextItem(DynamicElementTextItem *deti) } /** - * @brief Element::dynamicTextItems - * @return all dynamic text items of this element directly child of this element. - * Texts in text-groups belonging to this element are not returned by this function. - * @see ElementTextItemGroup::texts - */ + @brief Element::dynamicTextItems + @return all dynamic text items of this element directly child of this element. + Texts in text-groups belonging to this element are not returned by this function. + @see ElementTextItemGroup::texts +*/ QList Element::dynamicTextItems() const { return m_dynamic_text_list; } /** - * @brief Element::addTextGroup - * Create and add an element text item group to this element. - * If this element already have a group with the same name, - * then @name will renamed to name1 or name2 etc.... - * @param name : the name of the group - * @return the created group. - */ + @brief Element::addTextGroup + Create and add an element text item group to this element. + If this element already have a group with the same name, + then @name will renamed to name1 or name2 etc.... + @param name : the name of the group + @return the created group. +*/ ElementTextItemGroup *Element::addTextGroup(const QString &name) { if(m_texts_group.isEmpty()) @@ -1341,10 +1341,10 @@ ElementTextItemGroup *Element::addTextGroup(const QString &name) } /** - * @brief Element::addTextGroup - * @param group add group @group to the group of this element. - * the group must not be owned by an element. - */ + @brief Element::addTextGroup + @param group add group @group to the group of this element. + the group must not be owned by an element. +*/ void Element::addTextGroup(ElementTextItemGroup *group) { if(group->parentElement()) @@ -1356,12 +1356,12 @@ void Element::addTextGroup(ElementTextItemGroup *group) } /** - * @brief Element::removeTextGroup - * Remove the text group @group from this element, and set the parent of group to 0. - * group is not deleted. - * All texts owned by the group will be reparented to this element - * @param name - */ + @brief Element::removeTextGroup + Remove the text group @group from this element, and set the parent of group to 0. + group is not deleted. + All texts owned by the group will be reparented to this element + @param name +*/ void Element::removeTextGroup(ElementTextItemGroup *group) { if(!m_texts_group.contains(group)) @@ -1386,11 +1386,11 @@ void Element::removeTextGroup(ElementTextItemGroup *group) } /** - * @brief Element::textGroup - * @param name - * @return the text group named @name or nullptr if this element - * haven't got a group with this name - */ + @brief Element::textGroup + @param name + @return the text group named @name or nullptr if this element + haven't got a group with this name +*/ ElementTextItemGroup *Element::textGroup(const QString &name) const { for (ElementTextItemGroup *group : m_texts_group) @@ -1401,21 +1401,21 @@ ElementTextItemGroup *Element::textGroup(const QString &name) const } /** - * @brief Element::textGroups - * @return All texts groups of this element - */ + @brief Element::textGroups + @return All texts groups of this element +*/ QList Element::textGroups() const { return m_texts_group; } /** - * @brief Element::addTextToGroup - * Add the text @text to the group @group; - * If @group isn't owned by this element return false. - * The text must be a text of this element. - * @return : true if the text was succesfully added to the group. - */ + @brief Element::addTextToGroup + Add the text @text to the group @group; + If @group isn't owned by this element return false. + The text must be a text of this element. + @return : true if the text was succesfully added to the group. +*/ bool Element::addTextToGroup(DynamicElementTextItem *text, ElementTextItemGroup *group) { @@ -1434,10 +1434,10 @@ bool Element::addTextToGroup(DynamicElementTextItem *text, } /** - * @brief Element::removeTextFromGroup - * Remove the text @text from the group @group, en reparent @text to this element - * @return true if text was succesfully removed - */ + @brief Element::removeTextFromGroup + Remove the text @text from the group @group, en reparent @text to this element + @return true if text was succesfully removed +*/ bool Element::removeTextFromGroup(DynamicElementTextItem *text, ElementTextItemGroup *group) { @@ -1456,13 +1456,13 @@ bool Element::removeTextFromGroup(DynamicElementTextItem *text, } /** - * @brief Element::AlignedFreeTerminals - * @return a list of terminal (owned by this element) aligned to other terminal (from other element) - * The first Terminal of QPair is a Terminal owned by this element, - * this terminal haven't got any conductor docked. - * The second Terminal of QPair is a Terminal owned by an other element, - * which is aligned with the first Terminal. The second Terminal can have or not docked conductors. - */ + @brief Element::AlignedFreeTerminals + @return a list of terminal (owned by this element) aligned to other terminal (from other element) + The first Terminal of QPair is a Terminal owned by this element, + this terminal haven't got any conductor docked. + The second Terminal of QPair is a Terminal owned by an other element, + which is aligned with the first Terminal. The second Terminal can have or not docked conductors. +*/ QList > Element::AlignedFreeTerminals() const { QList > list; @@ -1482,14 +1482,14 @@ QList > Element::AlignedFreeTerminals() const } /** - * @brief Element::initLink - * Initialise the link between this element and other elements. - * This method can be call once because init the link according to - * uuid store in a private list, after link, the list is clear, so - * call another time do nothing. + @brief Element::initLink + Initialise the link between this element and other elements. + This method can be call once because init the link according to + uuid store in a private list, after link, the list is clear, so + call another time do nothing. * - * @param prj, ownership project of this element and other element to be linked - */ + @param prj, ownership project of this element and other element to be linked +*/ void Element::initLink(QETProject *prj) { // if nothing to link return now @@ -1524,11 +1524,11 @@ QString Element::linkTypeToString() const } /** - * @brief Element::setElementInformations - * Set new information for this element. - * If new information is different of current infotmation emit @elementInfoChange - * @param dc - */ + @brief Element::setElementInformations + Set new information for this element. + If new information is different of current infotmation emit @elementInfoChange + @param dc +*/ void Element::setElementInformations(DiagramContext dc) { if (m_element_informations == dc) { @@ -1542,12 +1542,12 @@ void Element::setElementInformations(DiagramContext dc) } /** - * @brief comparPos - * Compare position of the two elements. Compare 3 points: - * 1 folio - 2 row - 3 line - * returns a response when a comparison is found. - * @return true if elmt1 is at lower position than elmt 2, else false - */ + @brief comparPos + Compare position of the two elements. Compare 3 points: + 1 folio - 2 row - 3 line + returns a response when a comparison is found. + @return true if elmt1 is at lower position than elmt 2, else false +*/ bool comparPos(const Element *elmt1, const Element *elmt2) { //Compare folio first if (elmt1->diagram()->folioIndex() != elmt2->diagram()->folioIndex()) @@ -1570,9 +1570,9 @@ bool comparPos(const Element *elmt1, const Element *elmt2) { } /** - * @brief Element::mouseMoveEvent - * @param event - */ + @brief Element::mouseMoveEvent + @param event +*/ void Element::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { QetGraphicsItem::mouseMoveEvent(event); @@ -1583,9 +1583,9 @@ void Element::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief Element::mouseReleaseEvent - * @param event - */ + @brief Element::mouseReleaseEvent + @param event +*/ void Element::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { QetGraphicsItem::mouseReleaseEvent(event); @@ -1596,10 +1596,10 @@ void Element::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) } /** - * When mouse over element - * change m_mouse_over to true (used in paint() function ) - * Also highlight linked elements - * @param e QGraphicsSceneHoverEvent + When mouse over element + change m_mouse_over to true (used in paint() function ) + Also highlight linked elements + @param e QGraphicsSceneHoverEvent */ void Element::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e) @@ -1613,10 +1613,10 @@ void Element::hoverEnterEvent(QGraphicsSceneHoverEvent *e) { } /** - * When mouse over element leave the position - * change m_mouse_over to false(used in paint() function ) - * Also un-highlight linked elements - * @param e QGraphicsSceneHoverEvent + When mouse over element leave the position + change m_mouse_over to false(used in paint() function ) + Also un-highlight linked elements + @param e QGraphicsSceneHoverEvent */ void Element::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) { Q_UNUSED(e) @@ -1629,11 +1629,11 @@ void Element::hoverLeaveEvent(QGraphicsSceneHoverEvent *e) { } /** - * @brief Element::setUpFormula - * Set up the formula used to create the label of this element - * @param : if true set tagged text to code letter (ex K for coil) with condition : - * formula is empty, text tagged "label" is emptty or "_"; - */ + @brief Element::setUpFormula + Set up the formula used to create the label of this element + @param : if true set tagged text to code letter (ex K for coil) with condition : + formula is empty, text tagged "label" is emptty or "_"; +*/ void Element::setUpFormula(bool code_letter) { Q_UNUSED(code_letter) @@ -1676,34 +1676,34 @@ void Element::setUpFormula(bool code_letter) } /** - * @brief Element::getPrefix - * get Element Prefix - */ + @brief Element::getPrefix + get Element Prefix +*/ QString Element::getPrefix() const{ return m_prefix; } /** - * @brief Element::setPrefix - * set Element Prefix - */ + @brief Element::setPrefix + set Element Prefix +*/ void Element::setPrefix(QString prefix) { m_prefix = std::move(prefix); } /** - * @brief Element::freezeLabel - * Freeze this element label - */ + @brief Element::freezeLabel + Freeze this element label +*/ void Element::freezeLabel(bool freeze) { m_freeze_label = freeze; } /** - * @brief Element::freezeNewAddedElement - * Freeze this label if needed - */ + @brief Element::freezeNewAddedElement + Freeze this label if needed +*/ void Element::freezeNewAddedElement() { if (this->diagram()->freezeNewElements() || this->diagram()->project()->isFreezeNewElements()) { @@ -1713,11 +1713,11 @@ void Element::freezeNewAddedElement() { } /** - * @brief Element::actualLabel - * 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. - * @return - */ + @brief Element::actualLabel + 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. + @return +*/ QString Element::actualLabel() { if (m_element_informations.value("formula").toString().isEmpty()) { @@ -1733,9 +1733,9 @@ QString Element::actualLabel() } /** - * @brief Element::name - * @return the human name of this element - */ + @brief Element::name + @return the human name of this element +*/ QString Element::name() const { return m_names.name(m_location.baseName()); } diff --git a/sources/qetgraphicsitem/element.h b/sources/qetgraphicsitem/element.h index ee4c68bfa..7a3448a74 100644 --- a/sources/qetgraphicsitem/element.h +++ b/sources/qetgraphicsitem/element.h @@ -46,7 +46,7 @@ class Element : public QetGraphicsItem /** * @brief The kind enum * Used to know the kind of this element (master, slave, report ect...) - */ + */ enum kind {Simple = 1, NextReport = 2, PreviousReport = 4, @@ -68,7 +68,7 @@ class Element : public QetGraphicsItem /** * Enable the use of qgraphicsitem_cast to safely cast a QGraphicsItem into an Element. * @return the QGraphicsItem type - */ + */ enum { Type = UserType + 1000 }; int type() const override { return Type; } @@ -243,7 +243,7 @@ inline int Element::orientation() const { /** * @brief Element::uuid * @return the uuid of this element - */ +*/ inline QUuid Element::uuid() const { return m_uuid; } @@ -251,7 +251,7 @@ inline QUuid Element::uuid() const { /** * @brief Element::linkedElements * @return the list of linked elements, the list is sorted by position - */ +*/ inline QList Element::linkedElements() { std::sort(connected_elements.begin(), connected_elements.end(), diff --git a/sources/qetgraphicsitem/elementtextitemgroup.cpp b/sources/qetgraphicsitem/elementtextitemgroup.cpp index cb2207ed4..fb4d15201 100644 --- a/sources/qetgraphicsitem/elementtextitemgroup.cpp +++ b/sources/qetgraphicsitem/elementtextitemgroup.cpp @@ -36,9 +36,9 @@ bool sorting(QGraphicsItem *qgia, QGraphicsItem *qgib) } /** - * @brief ElementTextItemGroup::ElementTextItemGroup - * @param parent - */ + @brief ElementTextItemGroup::ElementTextItemGroup + @param parent +*/ ElementTextItemGroup::ElementTextItemGroup(const QString &name, Element *parent) : QGraphicsItemGroup(parent), m_name(name), @@ -52,9 +52,9 @@ ElementTextItemGroup::~ElementTextItemGroup() {} /** - * @brief ElementTextItemGroup::addToGroup - * @param item - */ + @brief ElementTextItemGroup::addToGroup + @param item +*/ void ElementTextItemGroup::addToGroup(QGraphicsItem *item) { if(item->type() == DynamicElementTextItem::Type) @@ -83,9 +83,9 @@ void ElementTextItemGroup::addToGroup(QGraphicsItem *item) } /** - * @brief ElementTextItemGroup::removeFromGroup - * @param item - */ + @brief ElementTextItemGroup::removeFromGroup + @param item +*/ void ElementTextItemGroup::removeFromGroup(QGraphicsItem *item) { QGraphicsItemGroup::removeFromGroup(item); @@ -114,21 +114,21 @@ void ElementTextItemGroup::removeFromGroup(QGraphicsItem *item) } /** - * @brief ElementTextItemGroup::blockAlignmentUpdate - * If true, the texts in this group are never aligned, moved, rotated etc... - * the texts stay as it was, until blockAlignmentUpdate is set to false. - * @param block - */ + @brief ElementTextItemGroup::blockAlignmentUpdate + If true, the texts in this group are never aligned, moved, rotated etc... + the texts stay as it was, until blockAlignmentUpdate is set to false. + @param block +*/ void ElementTextItemGroup::blockAlignmentUpdate(bool block) { m_block_alignment_update = block; } /** - * @brief ElementTextItemGroup::setAlignement - * Set the alignement of this group - * @param alignement - */ + @brief ElementTextItemGroup::setAlignement + Set the alignement of this group + @param alignement +*/ void ElementTextItemGroup::setAlignment(Qt::Alignment alignement) { m_alignment = alignement; @@ -142,11 +142,11 @@ Qt::Alignment ElementTextItemGroup::alignment() const } /** - * @brief ElementTextItemGroup::setAlignment - * Update the alignement of the items in this group, according - * to the current alignement. - * @param alignement - */ + @brief ElementTextItemGroup::setAlignment + Update the alignement of the items in this group, according + to the current alignement. + @param alignement +*/ void ElementTextItemGroup::updateAlignment() { if(m_block_alignment_update) @@ -235,11 +235,11 @@ void ElementTextItemGroup::updateAlignment() } /** - * @brief ElementTextItemGroup::setVerticalAdjustment - * Set the value of the vertical adjustment to @v. - * The vertical adjutment is use to adjust the space between the texts of this group. - * @param v - */ + @brief ElementTextItemGroup::setVerticalAdjustment + Set the value of the vertical adjustment to @v. + The vertical adjutment is use to adjust the space between the texts of this group. + @param v +*/ void ElementTextItemGroup::setVerticalAdjustment(int v) { prepareGeometryChange(); @@ -249,9 +249,9 @@ void ElementTextItemGroup::setVerticalAdjustment(int v) } /** - * @brief ElementTextItemGroup::setName - * @param name Set the name of this group - */ + @brief ElementTextItemGroup::setName + @param name Set the name of this group +*/ void ElementTextItemGroup::setName(QString name) { m_name = std::move(name); @@ -311,9 +311,9 @@ bool ElementTextItemGroup::frame() const { } /** - * @brief ElementTextItemGroup::texts - * @return Every texts in this group - */ + @brief ElementTextItemGroup::texts + @return Every texts in this group +*/ QList ElementTextItemGroup::texts() const { QList list; @@ -326,9 +326,9 @@ QList ElementTextItemGroup::texts() const } /** - * @brief ElementTextItemGroup::diagram - * @return The diagram of this group, or nullptr if this group is not in a diagram - */ + @brief ElementTextItemGroup::diagram + @return The diagram of this group, or nullptr if this group is not in a diagram +*/ Diagram *ElementTextItemGroup::diagram() const { if(scene()) @@ -338,9 +338,9 @@ Diagram *ElementTextItemGroup::diagram() const } /** - * @brief ElementTextItemGroup::parentElement - * @return The parent element of this group or nullptr - */ + @brief ElementTextItemGroup::parentElement + @return The parent element of this group or nullptr +*/ Element *ElementTextItemGroup::parentElement() const { if(parentItem() && parentItem()->type() == Element::Type) @@ -350,11 +350,11 @@ Element *ElementTextItemGroup::parentElement() const } /** - * @brief ElementTextItemGroup::toXml - * Export data of this group to xml - * @param dom_document - * @return - */ + @brief ElementTextItemGroup::toXml + Export data of this group to xml + @param dom_document + @return +*/ QDomElement ElementTextItemGroup::toXml(QDomDocument &dom_document) const { QDomElement dom_element = dom_document.createElement(this->xmlTaggName()); @@ -385,10 +385,10 @@ QDomElement ElementTextItemGroup::toXml(QDomDocument &dom_document) const } /** - * @brief ElementTextItemGroup::fromXml - * Import data of this group from xml - * @param dom_element - */ + @brief ElementTextItemGroup::fromXml + Import data of this group from xml + @param dom_element +*/ void ElementTextItemGroup::fromXml(QDomElement &dom_element) { if (dom_element.tagName() != xmlTaggName()) { @@ -430,11 +430,11 @@ void ElementTextItemGroup::fromXml(QDomElement &dom_element) } /** - * @brief ElementTextItemGroup::paint - * @param painter - * @param option - * @param widget - */ + @brief ElementTextItemGroup::paint + @param painter + @param option + @param widget +*/ void ElementTextItemGroup::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option); @@ -484,9 +484,9 @@ void ElementTextItemGroup::paint(QPainter *painter, const QStyleOptionGraphicsIt } /** - * @brief ElementTextItemGroup::boundingRect - * @return - */ + @brief ElementTextItemGroup::boundingRect + @return +*/ QRectF ElementTextItemGroup::boundingRect() const { //If we refer to the Qt doc, the bounding rect of a QGraphicsItemGroup, @@ -530,9 +530,9 @@ void ElementTextItemGroup::setPos(qreal x, qreal y) } /** - * @brief ElementTextItemGroup::mousePressEvent - * @param event - */ + @brief ElementTextItemGroup::mousePressEvent + @param event +*/ void ElementTextItemGroup::mousePressEvent(QGraphicsSceneMouseEvent *event) { if(event->button() == Qt::LeftButton) @@ -546,9 +546,9 @@ void ElementTextItemGroup::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ElementTextItemGroup::mouseMoveEvent - * @param event - */ + @brief ElementTextItemGroup::mouseMoveEvent + @param event +*/ void ElementTextItemGroup::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if((event->buttons() & Qt::LeftButton) && (flags() & ItemIsMovable)) @@ -582,9 +582,9 @@ void ElementTextItemGroup::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief ElementTextItemGroup::mouseReleaseEvent - * @param event - */ + @brief ElementTextItemGroup::mouseReleaseEvent + @param event +*/ void ElementTextItemGroup::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if(diagram()) @@ -631,9 +631,9 @@ void ElementTextItemGroup::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event } /** - * @brief ElementTextItemGroup::keyPressEvent - * @param event - */ + @brief ElementTextItemGroup::keyPressEvent + @param event +*/ void ElementTextItemGroup::keyPressEvent(QKeyEvent *event) { if(event->modifiers() == Qt::ControlModifier) diff --git a/sources/qetgraphicsitem/elementtextitemgroup.h b/sources/qetgraphicsitem/elementtextitemgroup.h index 9623abb31..09dbc9d73 100644 --- a/sources/qetgraphicsitem/elementtextitemgroup.h +++ b/sources/qetgraphicsitem/elementtextitemgroup.h @@ -28,10 +28,10 @@ class Diagram; class CrossRefItem; /** - * @brief The ElementTextItemGroup class - * This class represent a group of element text - * Texts in the group can be aligned left / center /right - */ + @brief The ElementTextItemGroup class + This class represent a group of element text + Texts in the group can be aligned left / center /right +*/ class ElementTextItemGroup : public QObject, public QGraphicsItemGroup { Q_OBJECT diff --git a/sources/qetgraphicsitem/masterelement.cpp b/sources/qetgraphicsitem/masterelement.cpp index 331728eef..302d092ae 100644 --- a/sources/qetgraphicsitem/masterelement.cpp +++ b/sources/qetgraphicsitem/masterelement.cpp @@ -22,31 +22,31 @@ #include /** - * @brief MasterElement::MasterElement - * Default constructor - * @param location location of xml definition - * @param qgi parent QGraphicItem - * @param s parent diagram - * @param state int used to know if the creation of element have error - */ + @brief MasterElement::MasterElement + Default constructor + @param location location of xml definition + @param qgi parent QGraphicItem + @param s parent diagram + @param state int used to know if the creation of element have error +*/ MasterElement::MasterElement(const ElementsLocation &location, QGraphicsItem *qgi, int *state) : Element(location, qgi, state, Element::Master) {} /** - * @brief MasterElement::~MasterElement - * default destructor - */ + @brief MasterElement::~MasterElement + default destructor +*/ MasterElement::~MasterElement() { unlinkAllElements(); } /** - * @brief MasterElement::linkToElement - * Link this master to another element - * For this class element must be a slave - * @param elmt - */ + @brief MasterElement::linkToElement + Link this master to another element + For this class element must be a slave + @param elmt +*/ void MasterElement::linkToElement(Element *elmt) { // check if element is slave and if isn't already linked @@ -65,9 +65,9 @@ void MasterElement::linkToElement(Element *elmt) } /** - * @brief MasterElement::unlinkAllElements - * Unlink all of the element in the QList connected_elements - */ + @brief MasterElement::unlinkAllElements + Unlink all of the element in the QList connected_elements +*/ void MasterElement::unlinkAllElements() { // if this element is free no need to do something @@ -80,10 +80,10 @@ void MasterElement::unlinkAllElements() } /** - * @brief MasterElement::unlinkElement - * Unlink the given elmt in parametre - * @param elmt element to unlink from this - */ + @brief MasterElement::unlinkElement + Unlink the given elmt in parametre + @param elmt element to unlink from this +*/ void MasterElement::unlinkElement(Element *elmt) { //Ensure elmt is linked to this element @@ -99,21 +99,21 @@ void MasterElement::unlinkElement(Element *elmt) } /** - * @brief MasterElement::initLink - * @param project - * Call init Link from custom element and after - * call update label for setup it. - */ + @brief MasterElement::initLink + @param project + Call init Link from custom element and after + call update label for setup it. +*/ void MasterElement::initLink(QETProject *project) { //Create the link with other element if needed Element::initLink(project); } /** - * @brief MasterElement::XrefBoundingRect - * @return The bounding rect of the Xref, if this element - * haven't got a xref, return a default QRectF - */ + @brief MasterElement::XrefBoundingRect + @return The bounding rect of the Xref, if this element + haven't got a xref, return a default QRectF +*/ QRectF MasterElement::XrefBoundingRect() const { if(m_Xref_item) @@ -149,15 +149,15 @@ void MasterElement::xrefPropertiesChanged() } /** - * @brief MasterElement::aboutDeleteXref - * Check if Xref item must be displayed, if not, delete it. - * If Xref item is deleted or already not used (nullptr) return true; - * Else return false if Xref item is used - * 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 - * option show power contact is disable, the cross isn't draw. - * @return - */ + @brief MasterElement::aboutDeleteXref + Check if Xref item must be displayed, if not, delete it. + If Xref item is deleted or already not used (nullptr) return true; + Else return false if Xref item is used + 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 + option show power contact is disable, the cross isn't draw. + @return +*/ void MasterElement::aboutDeleteXref() { if(!m_Xref_item) diff --git a/sources/qetgraphicsitem/masterelement.h b/sources/qetgraphicsitem/masterelement.h index fdd5ee28c..451ed1f43 100644 --- a/sources/qetgraphicsitem/masterelement.h +++ b/sources/qetgraphicsitem/masterelement.h @@ -23,11 +23,11 @@ class CrossRefItem; /** - * @brief The MasterElement class - * This class is a custom element, with extended behavior - * to be a master element. Master element can be linked with slave element - * and display a cross ref item for know with what other element he is linked - */ + @brief The MasterElement class + This class is a custom element, with extended behavior + to be a master element. Master element can be linked with slave element + and display a cross ref item for know with what other element he is linked +*/ class MasterElement : public Element { Q_OBJECT diff --git a/sources/qetgraphicsitem/qetgraphicsitem.cpp b/sources/qetgraphicsitem/qetgraphicsitem.cpp index 51e6736d8..2768d0c84 100644 --- a/sources/qetgraphicsitem/qetgraphicsitem.cpp +++ b/sources/qetgraphicsitem/qetgraphicsitem.cpp @@ -19,11 +19,11 @@ #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 uuid, uuid of the item + @param diagram, diagram aka QGraphicsScene of the item + @param parent, Parent Item +*/ QetGraphicsItem::QetGraphicsItem(QGraphicsItem *parent): QGraphicsObject(parent), is_movable_(true), @@ -35,18 +35,18 @@ QetGraphicsItem::~QetGraphicsItem() {} /** - * @brief QetGraphicsItem::diagram + @brief QetGraphicsItem::diagram *return the diagram of this item - */ +*/ Diagram* QetGraphicsItem::diagram() const{ return(qobject_cast(scene())); } /** - * @brief QetGraphicsItem::setPos + @brief QetGraphicsItem::setPos *set the position of the item to p - * @param p the new position of item - */ + @param p the new position of item +*/ void QetGraphicsItem::setPos(const QPointF &p) { QPointF pp = Diagram::snapToGrid(p); if (pp == pos() || !is_movable_) @@ -55,28 +55,28 @@ void QetGraphicsItem::setPos(const QPointF &p) { } /** - * @brief QetGraphicsItem::setPos + @brief QetGraphicsItem::setPos *set the position of the item - * @param x new abscisse of item - * @param y new ordonne of item - */ + @param x new abscisse of item + @param y new ordonne of item +*/ void QetGraphicsItem::setPos(qreal x, qreal y) { setPos(QPointF(x, y)); } /** - * @brief QetGraphicsItem::state - * @return the current state of this item - */ + @brief QetGraphicsItem::state + @return the current state of this item +*/ QET::GraphicsItemState QetGraphicsItem::state() const { return m_state; } /** - * @brief QetGraphicsItem::mousePressEvent + @brief QetGraphicsItem::mousePressEvent *handle the mouse click - * @param event - */ + @param event +*/ void QetGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *event) { if (event->button() == Qt::LeftButton) @@ -91,10 +91,10 @@ void QetGraphicsItem::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief QetGraphicsItem::mouseDoubleClickEvent + @brief QetGraphicsItem::mouseDoubleClickEvent *handle the mouse double click - * @param event - */ + @param event +*/ void QetGraphicsItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) { editProperty(); @@ -102,10 +102,10 @@ void QetGraphicsItem::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief QetGraphicsItem::mouseMoveEvent + @brief QetGraphicsItem::mouseMoveEvent *handle mouse movement - * @param event - */ + @param event +*/ void QetGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { if (isSelected() && event->buttons() & Qt::LeftButton) @@ -143,10 +143,10 @@ void QetGraphicsItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief QetGraphicsItem::mouseReleaseEvent + @brief QetGraphicsItem::mouseReleaseEvent *handle mouse release click - * @param e - */ + @param e +*/ void QetGraphicsItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { if (diagram()) { diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp index 20208a32c..a00203906 100644 --- a/sources/qetgraphicsitem/qetshapeitem.cpp +++ b/sources/qetgraphicsitem/qetshapeitem.cpp @@ -28,13 +28,13 @@ #include "qeticons.h" /** - * @brief QetShapeItem::QetShapeItem - * Constructor of shape item. point 1 and 2 must be in scene coordinate - * @param p1 first point - * @param p2 second point - * @param type type of item (line, rectangle, ellipse) - * @param parent parent item - */ + @brief QetShapeItem::QetShapeItem + Constructor of shape item. point 1 and 2 must be in scene coordinate + @param p1 first point + @param p2 second point + @param type type of item (line, rectangle, ellipse) + @param parent parent item +*/ QetShapeItem::QetShapeItem(QPointF p1, QPointF p2, ShapeType type, QGraphicsItem *parent) : QetGraphicsItem(parent), m_shapeType(type), @@ -69,10 +69,10 @@ QetShapeItem::~QetShapeItem() } /** - * @brief QetShapeItem::setPen - * Set the pen to use for draw the shape - * @param pen - */ + @brief QetShapeItem::setPen + Set the pen to use for draw the shape + @param pen +*/ void QetShapeItem::setPen(const QPen &pen) { if (m_pen == pen) return; @@ -82,10 +82,10 @@ void QetShapeItem::setPen(const QPen &pen) } /** - * @brief QetShapeItem::setBrush - * Set the brush to use for the fill the shape - * @param brush - */ + @brief QetShapeItem::setBrush + Set the brush to use for the fill the shape + @param brush +*/ void QetShapeItem::setBrush(const QBrush &brush) { if (m_brush == brush) return; @@ -95,12 +95,12 @@ void QetShapeItem::setBrush(const QBrush &brush) } /** - * @brief QetShapeItem::setP2 - * Set the second point of this item. - * If this item is a polyline, - * the last point of the polyline is replaced by P2. - * @param P2 - */ + @brief QetShapeItem::setP2 + Set the second point of this item. + If this item is a polyline, + the last point of the polyline is replaced by P2. + @param P2 +*/ void QetShapeItem::setP2(const QPointF &P2) { if (m_shapeType == Polygon && m_polygon.last() != P2) @@ -116,11 +116,11 @@ void QetShapeItem::setP2(const QPointF &P2) } /** - * @brief QetShapeItem::setLine - * Set item geometry to line (only available for line shape) - * @param line - * @return : true when shape is a Line, else false - */ + @brief QetShapeItem::setLine + Set item geometry to line (only available for line shape) + @param line + @return : true when shape is a Line, else false +*/ bool QetShapeItem::setLine(const QLineF &line) { if (Q_UNLIKELY(m_shapeType != Line)) return false; @@ -132,11 +132,11 @@ bool QetShapeItem::setLine(const QLineF &line) } /** - * @brief QetShapeItem::setRect - * Set this item geometry to rect (only available if shape is a rectangle or an ellipse) - * @param rect : new rect - * @return : true when shape is rectangle or ellipse, else false - */ + @brief QetShapeItem::setRect + Set this item geometry to rect (only available if shape is a rectangle or an ellipse) + @param rect : new rect + @return : true when shape is rectangle or ellipse, else false +*/ bool QetShapeItem::setRect(const QRectF &rect) { if (Q_LIKELY(m_shapeType == Rectangle || m_shapeType == Ellipse)) @@ -152,11 +152,11 @@ bool QetShapeItem::setRect(const QRectF &rect) } /** - * @brief QetShapeItem::setPolygon - * Set this item geometry to polygon (only available if shape is a polyline) - * @param polygon : new polygon - * @return true if item is polygon, else false - */ + @brief QetShapeItem::setPolygon + Set this item geometry to polygon (only available if shape is a polyline) + @param polygon : new polygon + @return true if item is polygon, else false +*/ bool QetShapeItem::setPolygon(const QPolygonF &polygon) { if (Q_UNLIKELY(m_shapeType != Polygon)) { @@ -169,10 +169,10 @@ bool QetShapeItem::setPolygon(const QPolygonF &polygon) } /** - * @brief QetShapeItem::setClosed - * Close this item, have effect only if this item is a polygon. - * @param close - */ + @brief QetShapeItem::setClosed + Close this item, have effect only if this item is a polygon. + @param close +*/ void QetShapeItem::setClosed(bool close) { if (m_shapeType == Polygon && close != m_closed) @@ -200,18 +200,18 @@ void QetShapeItem::setYRadius(qreal Y) } /** - * @brief QetShapeItem::pointCount - * @return the number of point in the polygon - */ + @brief QetShapeItem::pointCount + @return the number of point in the polygon +*/ int QetShapeItem::pointsCount() const { return m_polygon.size(); } /** - * @brief QetShapeItem::setNextPoint - * Add a new point to the curent polygon - * @param P the new point. - */ + @brief QetShapeItem::setNextPoint + Add a new point to the curent polygon + @param P the new point. +*/ void QetShapeItem::setNextPoint(QPointF P) { prepareGeometryChange(); @@ -219,11 +219,11 @@ void QetShapeItem::setNextPoint(QPointF P) } /** - * @brief QetShapeItem::removePoints - * Number of point to remove on the polygon - * If @number is superior to number of polygon points-2, - * all points of polygon will be removed except the first two (minimum point for the polygon); - */ + @brief QetShapeItem::removePoints + Number of point to remove on the polygon + If @number is superior to number of polygon points-2, + all points of polygon will be removed except the first two (minimum point for the polygon); +*/ void QetShapeItem::removePoints(int number) { if (pointsCount() == 2 || number < 1) return; @@ -242,17 +242,17 @@ void QetShapeItem::removePoints(int number) } /** - * @brief QetShapeItem::boundingRect - * @return the bounding rect of this item - */ + @brief QetShapeItem::boundingRect + @return the bounding rect of this item +*/ QRectF QetShapeItem::boundingRect() const { return shape().boundingRect().adjusted(-6, -6, 6, 6); } /** - * @brief QetShapeItem::shape - * @return the shape of this item - */ + @brief QetShapeItem::shape + @return the shape of this item +*/ QPainterPath QetShapeItem::shape() const { QPainterPath path; @@ -286,12 +286,12 @@ QPainterPath QetShapeItem::shape() const } /** - * @brief QetShapeItem::paint - * Paint this item - * @param painter - * @param option - * @param widget - */ + @brief QetShapeItem::paint + Paint this item + @param painter + @param option + @param widget +*/ void QetShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) { Q_UNUSED(option) @@ -326,10 +326,10 @@ void QetShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti } /** - * @brief QetShapeItem::hoverEnterEvent - * Handle hover enter event - * @param event - */ + @brief QetShapeItem::hoverEnterEvent + Handle hover enter event + @param event +*/ void QetShapeItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) { m_hovered = true; @@ -337,10 +337,10 @@ void QetShapeItem::hoverEnterEvent(QGraphicsSceneHoverEvent *event) } /** - * @brief QetShapeItem::hoverLeaveEvent - * Handle hover leave event - * @param event - */ + @brief QetShapeItem::hoverLeaveEvent + Handle hover leave event + @param event +*/ void QetShapeItem::hoverLeaveEvent(QGraphicsSceneHoverEvent *event) { m_hovered = false; @@ -359,11 +359,11 @@ void QetShapeItem::mousePressEvent(QGraphicsSceneMouseEvent *event) } /** - * @brief QetShapeItem::itemChange - * @param change - * @param value - * @return - */ + @brief QetShapeItem::itemChange + @param change + @param value + @return +*/ QVariant QetShapeItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) { if (change == ItemSelectedHasChanged) @@ -396,11 +396,11 @@ QVariant QetShapeItem::itemChange(QGraphicsItem::GraphicsItemChange change, cons } /** - * @brief QetShapeItem::sceneEventFilter - * @param watched - * @param event - * @return - */ + @brief QetShapeItem::sceneEventFilter + @param watched + @param event + @return +*/ bool QetShapeItem::sceneEventFilter(QGraphicsItem *watched, QEvent *event) { //Watched must be an handler @@ -436,9 +436,9 @@ bool QetShapeItem::sceneEventFilter(QGraphicsItem *watched, QEvent *event) } /** - * @brief QetShapeItem::contextMenuEvent - * @param event - */ + @brief QetShapeItem::contextMenuEvent + @param event +*/ void QetShapeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) { m_context_menu_pos = event->pos(); @@ -495,8 +495,8 @@ void QetShapeItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *event) } /** - * @brief QetShapeItem::switchResizeMode - */ + @brief QetShapeItem::switchResizeMode +*/ void QetShapeItem::switchResizeMode() { if (m_shapeType == Ellipse) @@ -590,9 +590,9 @@ void QetShapeItem::addHandler() } /** - * @brief QetShapeItem::adjusteHandlerPos - * Adjust the position of the handler item - */ + @brief QetShapeItem::adjusteHandlerPos + Adjust the position of the handler item +*/ void QetShapeItem::adjusteHandlerPos() { if (m_handler_vector.isEmpty()) { @@ -689,10 +689,10 @@ void QetShapeItem::removePoint() } /** - * @brief QetShapeItem::handlerMousePressEvent - * @param qghi - * @param event - */ + @brief QetShapeItem::handlerMousePressEvent + @param qghi + @param event +*/ void QetShapeItem::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi) @@ -709,10 +709,10 @@ void QetShapeItem::handlerMousePressEvent(QetGraphicsHandlerItem *qghi, QGraphic } /** - * @brief QetShapeItem::handlerMouseMoveEvent - * @param qghi - * @param event - */ + @brief QetShapeItem::handlerMouseMoveEvent + @param qghi + @param event +*/ void QetShapeItem::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi) @@ -773,10 +773,10 @@ void QetShapeItem::handlerMouseMoveEvent(QetGraphicsHandlerItem *qghi, QGraphics } /** - * @brief QetShapeItem::handlerMouseReleaseEvent - * @param qghi - * @param event - */ + @brief QetShapeItem::handlerMouseReleaseEvent + @param qghi + @param event +*/ void QetShapeItem::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraphicsSceneMouseEvent *event) { Q_UNUSED(qghi); @@ -831,11 +831,11 @@ void QetShapeItem::handlerMouseReleaseEvent(QetGraphicsHandlerItem *qghi, QGraph } /** - * @brief QetShapeItem::fromXml - * Build this item from the xml description - * @param e element where is stored this item - * @return true if load success - */ + @brief QetShapeItem::fromXml + Build this item from the xml description + @param e element where is stored this item + @return true if load success +*/ bool QetShapeItem::fromXml(const QDomElement &e) { if (e.tagName() != "shape") return (false); @@ -888,11 +888,11 @@ bool QetShapeItem::fromXml(const QDomElement &e) } /** - * @brief QetShapeItem::toXml - * Save this item to xml element - * @param document parent document xml - * @return element xml where is write this item - */ + @brief QetShapeItem::toXml + Save this item to xml element + @param document parent document xml + @return element xml where is write this item +*/ QDomElement QetShapeItem::toXml(QDomDocument &document) const { QDomElement result = document.createElement("shape"); @@ -948,11 +948,11 @@ QDomElement QetShapeItem::toXml(QDomDocument &document) const } /** - * @brief QetShapeItem::toDXF - * Draw this element to the dxf document - * @param filepath file path of the the dxf document - * @return true if draw success - */ + @brief QetShapeItem::toDXF + Draw this element to the dxf document + @param filepath file path of the the dxf document + @return true if draw success +*/ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) { @@ -966,9 +966,9 @@ bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) } /** - * @brief QetShapeItem::editProperty - * Edit the property of this item - */ + @brief QetShapeItem::editProperty + Edit the property of this item +*/ void QetShapeItem::editProperty() { if (diagram() -> isReadOnly()) return; @@ -978,9 +978,9 @@ void QetShapeItem::editProperty() } /** - * @brief QetShapeItem::name - * @return the name of the curent shape. - */ + @brief QetShapeItem::name + @return the name of the curent shape. +*/ QString QetShapeItem::name() const { switch (m_shapeType) { case Line: return tr("une ligne"); diff --git a/sources/qetgraphicsitem/qetshapeitem.h b/sources/qetgraphicsitem/qetshapeitem.h index 2474ec85d..565d6a56c 100644 --- a/sources/qetgraphicsitem/qetshapeitem.h +++ b/sources/qetgraphicsitem/qetshapeitem.h @@ -28,10 +28,10 @@ class QetGraphicsHandlerItem; class QAction; /** - * @brief The QetShapeItem class - * this class is used to draw a basic shape (line, rectangle, ellipse) - * into a diagram, that can be saved to .qet file. - */ + @brief The QetShapeItem class + this class is used to draw a basic shape (line, rectangle, ellipse) + into a diagram, that can be saved to .qet file. +*/ class QetShapeItem : public QetGraphicsItem { Q_OBJECT diff --git a/sources/qetgraphicsitem/qgraphicsitemutility.cpp b/sources/qetgraphicsitem/qgraphicsitemutility.cpp index c105fd6b4..88c8b90cc 100644 --- a/sources/qetgraphicsitem/qgraphicsitemutility.cpp +++ b/sources/qetgraphicsitem/qgraphicsitemutility.cpp @@ -22,11 +22,11 @@ #include /** - * @brief centerToParentBottom - * Center the item at the bottom of is parent. - * @param item item to center - * @return true if centered else false (item have not parent) - */ + @brief centerToParentBottom + Center the item at the bottom of is parent. + @param item item to center + @return true if centered else false (item have not parent) +*/ bool centerToParentBottom(QGraphicsItem *item) { if (! item->parentItem()) { qDebug() << "Qet::centerToParentBottom : item have not parent"; @@ -42,13 +42,13 @@ bool centerToParentBottom(QGraphicsItem *item) { } /** - * @brief centerToBottomDiagram - * Set item pos to the bottom of diagram and centered vertically to element_to_follow, and add offset. - * @param item_to_center - * @param element_to_follow - * @param offset - * @return true if element is centered else false (element_to_follow have not diagram) - */ + @brief centerToBottomDiagram + Set item pos to the bottom of diagram and centered vertically to element_to_follow, and add offset. + @param item_to_center + @param element_to_follow + @param offset + @return true if element is centered else false (element_to_follow have not diagram) +*/ #include "elementtextitemgroup.h" #include "crossrefitem.h" bool centerToBottomDiagram (QGraphicsItem *item_to_center, Element *element_to_follow, qreal offset) { diff --git a/sources/qetgraphicsitem/reportelement.cpp b/sources/qetgraphicsitem/reportelement.cpp index a5fdc513d..90c76928d 100644 --- a/sources/qetgraphicsitem/reportelement.cpp +++ b/sources/qetgraphicsitem/reportelement.cpp @@ -30,9 +30,9 @@ ReportElement::ReportElement(const ElementsLocation &location, const QString& li {} /** - * @brief ReportElement::~ReportElement - * Destructor - */ + @brief ReportElement::~ReportElement + Destructor +*/ ReportElement::~ReportElement() { unlinkAllElements(); @@ -41,11 +41,11 @@ ReportElement::~ReportElement() } /** - * @brief ReportElement::linkToElement - * Link this element to the other element - * @param elmt - * element to be linked with this - */ + @brief ReportElement::linkToElement + Link this element to the other element + @param elmt + element to be linked with this +*/ void ReportElement::linkToElement(Element * elmt) { if (!diagram() && !elmt -> diagram()) @@ -70,9 +70,9 @@ void ReportElement::linkToElement(Element * elmt) } /** - * @brief ReportElement::unLinkAllElements - * Unlink all of the element in the QList connected_elements - */ + @brief ReportElement::unLinkAllElements + Unlink all of the element in the QList connected_elements +*/ void ReportElement::unlinkAllElements() { if (isFree()) @@ -92,12 +92,12 @@ void ReportElement::unlinkAllElements() emit linkedElementChanged(); } /** - * @brief ReportElement::unlinkElement + @brief ReportElement::unlinkElement *unlink the specified element. *for reportelement, they must be only one linked element, so we call *unlinkAllElements for clear the connected_elements list. - * @param elmt - */ + @param elmt +*/ void ReportElement::unlinkElement(Element *elmt) { Q_UNUSED (elmt); unlinkAllElements(); diff --git a/sources/qetgraphicsitem/reportelement.h b/sources/qetgraphicsitem/reportelement.h index 84f03266e..361fe0194 100644 --- a/sources/qetgraphicsitem/reportelement.h +++ b/sources/qetgraphicsitem/reportelement.h @@ -21,10 +21,10 @@ #include "element.h" /** - * @brief The ReportElement class + @brief The ReportElement class *this class represent an element that can be linked to an other ReportElement - * a folio report in a diagram is a element that show a wire go on an other folio - */ + a folio report in a diagram is a element that show a wire go on an other folio +*/ class ReportElement : public Element { Q_OBJECT diff --git a/sources/qetgraphicsitem/simpleelement.cpp b/sources/qetgraphicsitem/simpleelement.cpp index e8715b437..04da9f802 100644 --- a/sources/qetgraphicsitem/simpleelement.cpp +++ b/sources/qetgraphicsitem/simpleelement.cpp @@ -19,27 +19,27 @@ #include "diagram.h" /** - * @brief SimpleElement::SimpleElement - * @param location - * @param qgi - * @param s - * @param state - */ + @brief SimpleElement::SimpleElement + @param location + @param qgi + @param s + @param state +*/ SimpleElement::SimpleElement(const ElementsLocation &location, QGraphicsItem *qgi, int *state) : Element(location, qgi, state, Element::Simple) {} /** - * @brief SimpleElement::~SimpleElement - */ + @brief SimpleElement::~SimpleElement +*/ SimpleElement::~SimpleElement() {} /** - * @brief SimpleElement::initLink - * @param project - * Call init Link from custom element and after - * call update label for setup it. - */ + @brief SimpleElement::initLink + @param project + Call init Link from custom element and after + call update label for setup it. +*/ void SimpleElement::initLink(QETProject *project) { Element::initLink(project); } diff --git a/sources/qetgraphicsitem/simpleelement.h b/sources/qetgraphicsitem/simpleelement.h index d042b926f..50705bddb 100644 --- a/sources/qetgraphicsitem/simpleelement.h +++ b/sources/qetgraphicsitem/simpleelement.h @@ -23,9 +23,9 @@ class QETProject; /** - * @brief The SimpleElement class - *this class represente a simple element with no specific attribute - */ + @brief The SimpleElement class + this class represente a simple element with no specific attribute +*/ class SimpleElement : public Element { Q_OBJECT diff --git a/sources/qetgraphicsitem/slaveelement.cpp b/sources/qetgraphicsitem/slaveelement.cpp index 2a2f4fb08..c4e81c6a2 100644 --- a/sources/qetgraphicsitem/slaveelement.cpp +++ b/sources/qetgraphicsitem/slaveelement.cpp @@ -22,13 +22,13 @@ #include "dynamicelementtextitem.h" /** - * @brief SlaveElement::SlaveElement - * Default constructor - * @param location location of xml definition - * @param qgi parent QGraphicItem - * @param s parent diagram - * @param state int used to know if the creation of element have error - */ + @brief SlaveElement::SlaveElement + Default constructor + @param location location of xml definition + @param qgi parent QGraphicItem + @param s parent diagram + @param state int used to know if the creation of element have error +*/ SlaveElement::SlaveElement(const ElementsLocation &location, QGraphicsItem *qgi, int *state) : Element(location, qgi, state, Element::Slave) { @@ -36,19 +36,19 @@ SlaveElement::SlaveElement(const ElementsLocation &location, QGraphicsItem *qgi, } /** - * @brief SlaveElement::~SlaveElement - * default destructor - */ + @brief SlaveElement::~SlaveElement + default destructor +*/ SlaveElement::~SlaveElement() { unlinkAllElements(); } /** - * @brief SlaveElement::linkToElement - * Link this slave to another element - * For this class element must be a master - * @param elmt - */ + @brief SlaveElement::linkToElement + Link this slave to another element + For this class element must be a master + @param elmt +*/ void SlaveElement::linkToElement(Element *elmt) { // check if element is master and if isn't already linked @@ -65,9 +65,9 @@ void SlaveElement::linkToElement(Element *elmt) } /** - * @brief SlaveElement::unlinkAllElements - * Unlink all of the element in the QList connected_elements - */ + @brief SlaveElement::unlinkAllElements + Unlink all of the element in the QList connected_elements +*/ void SlaveElement::unlinkAllElements() { // if this element is free no need to do something @@ -80,10 +80,10 @@ void SlaveElement::unlinkAllElements() } /** - * @brief SlaveElement::unlinkElement - * Unlink the given elmt in parametre - * @param elmt - */ + @brief SlaveElement::unlinkElement + Unlink the given elmt in parametre + @param elmt +*/ void SlaveElement::unlinkElement(Element *elmt) { //Ensure elmt is linked to this element diff --git a/sources/qetgraphicsitem/terminal.cpp b/sources/qetgraphicsitem/terminal.cpp index 4412d527c..0789e1ccb 100644 --- a/sources/qetgraphicsitem/terminal.cpp +++ b/sources/qetgraphicsitem/terminal.cpp @@ -72,14 +72,14 @@ void Terminal::init(QString number, QString name, bool hiddenName) { } /*! - * \brief Terminal::init - * Additionaly to the init above, this method stores position and orientation into the data class - * \param pf - * \param o - * \param number - * \param name - * \param hiddenName - */ + \brief Terminal::init + Additionaly to the init above, this method stores position and orientation into the data class + \param pf + \param o + \param number + \param name + \param hiddenName +*/ void Terminal::init(QPointF pf, Qet::Orientation o, QString number, QString name, bool hiddenName) { // definition du pount d'amarrage pour un conducteur diff --git a/sources/qetinformation.cpp b/sources/qetinformation.cpp index 80af19a67..30ad34d77 100644 --- a/sources/qetinformation.cpp +++ b/sources/qetinformation.cpp @@ -21,9 +21,9 @@ #include /** - * @brief QETInformation::titleblockInfoKeys - * @return all available key for use with a titleblock - */ + @brief QETInformation::titleblockInfoKeys + @return all available key for use with a titleblock +*/ QStringList QETInformation::titleblockInfoKeys() { QStringList info_list; @@ -52,11 +52,11 @@ QStringList QETInformation::titleblockInfoKeys() } /** - * @brief QETInformation::titleblockTranslatedInfoKey - * @param info : info key to be translated - * @return the translated information given by @info - * If @info don't match, return an empty string - */ + @brief QETInformation::titleblockTranslatedInfoKey + @param info : info key to be translated + @return the translated information given by @info + If @info don't match, return an empty string +*/ QString QETInformation::titleblockTranslatedInfoKey(const QString &info) { if (info == "author") return QObject::tr("Auteur"); @@ -83,11 +83,11 @@ QString QETInformation::titleblockTranslatedInfoKey(const QString &info) } /** - * @brief QETInformation::titleblockInfoKeysToVar - * @param info - * @return var in form %{my-var} corresponding to the info. - * if there is not available var for the given info, the returned var is %{void} - */ + @brief QETInformation::titleblockInfoKeysToVar + @param info + @return var in form %{my-var} corresponding to the info. + if there is not available var for the given info, the returned var is %{void} +*/ QString QETInformation::titleblockInfoKeysToVar(const QString &info) { if (info == "author") return QString("%{author}"); @@ -114,10 +114,10 @@ QString QETInformation::titleblockInfoKeysToVar(const QString &info) } /** - * @brief QETInformation::titleblockTranslatedKeyHashVar - * @return a QHash with for key, the translated information key of title block, - * and for value the corresponding var. - */ + @brief QETInformation::titleblockTranslatedKeyHashVar + @return a QHash with for key, the translated information key of title block, + and for value the corresponding var. +*/ QHash QETInformation::titleblockTranslatedKeyHashVar() { QHash hash_; diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index b8fe7e9d6..baba579c7 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -38,10 +38,10 @@ static int BACKUP_INTERVAL = 120000; //interval in ms of backup = 2min /** - * @brief QETProject::QETProject - * Create a empty project - * @param parent - */ + @brief QETProject::QETProject + Create a empty project + @param parent +*/ QETProject::QETProject(QObject *parent) : QObject (parent), m_titleblocks_collection(this), @@ -54,11 +54,11 @@ QETProject::QETProject(QObject *parent) : } /** - * @brief QETProject::QETProject - * Construct a project from a .qet file - * @param path : path of the file - * @param parent : parent QObject - */ + @brief QETProject::QETProject + Construct a project from a .qet file + @param path : path of the file + @param parent : parent QObject +*/ QETProject::QETProject(const QString &path, QObject *parent) : QObject (parent), m_titleblocks_collection(this), @@ -74,10 +74,10 @@ QETProject::QETProject(const QString &path, QObject *parent) : } /** - * @brief QETProject::QETProject - * @param backup : backup file to open, QETProject take ownership of backup. - * @param parent : parent QObject - */ + @brief QETProject::QETProject + @param backup : backup file to open, QETProject take ownership of backup. + @param parent : parent QObject +*/ QETProject::QETProject(KAutoSaveFile *backup, QObject *parent) : QObject (parent), m_titleblocks_collection(this), @@ -108,9 +108,9 @@ QETProject::QETProject(KAutoSaveFile *backup, QObject *parent) : } /** - * @brief QETProject::~QETProject - * Destructor - */ + @brief QETProject::~QETProject + Destructor +*/ QETProject::~QETProject() { for (auto diagram : m_diagrams_list) @@ -118,24 +118,24 @@ QETProject::~QETProject() } /** - * @brief QETProject::dataBase - * @return The data base of this project - */ + @brief QETProject::dataBase + @return The data base of this project +*/ projectDataBase *QETProject::dataBase() { return &m_data_base; } /** - * @brief QETProject::uuid - * @return the uuid of this project - */ + @brief QETProject::uuid + @return the uuid of this project +*/ QUuid QETProject::uuid() const { return m_uuid; } /** - * @brief QETProject::init - */ + @brief QETProject::init +*/ void QETProject::init() { connect(&m_titleblocks_collection, &TitleBlockTemplatesCollection::changed, this, &QETProject::updateDiagramsTitleBlockTemplate); @@ -165,10 +165,10 @@ void QETProject::init() } /** - * @brief QETProject::openFile - * @param file - * @return - */ + @brief QETProject::openFile + @param file + @return +*/ QETProject::ProjectState QETProject::openFile(QFile *file) { bool opened_here = file->isOpen() ? false : true; @@ -228,9 +228,9 @@ int QETProject::folioIndex(const Diagram *diagram) const { } /** - * @brief QETProject::embeddedCollection - * @return The embedded collection - */ + @brief QETProject::embeddedCollection + @return The embedded collection +*/ XmlElementCollection *QETProject::embeddedElementCollection() const { return m_elements_collection; } @@ -250,13 +250,13 @@ QString QETProject::filePath() { } /** - * @brief QETProject::setFilePath - * Set the filepath of this project file - * Set a file path also create a backup file according to the path. - * If a previous path was set, the previous backup file is deleted and a new one - * is created according to the path. - * @param filepath - */ + @brief QETProject::setFilePath + Set the filepath of this project file + Set a file path also create a backup file according to the path. + If a previous path was set, the previous backup file is deleted and a new one + is created according to the path. + @param filepath +*/ void QETProject::setFilePath(const QString &filepath) { if (filepath == m_file_path) { @@ -416,10 +416,10 @@ TitleBlockProperties QETProject::defaultTitleBlockProperties() const { } /** - * @brief QETProject::setDefaultTitleBlockProperties - * Specify the title block to be used at the creation of a new diagram for this project - * @param titleblock - */ + @brief QETProject::setDefaultTitleBlockProperties + Specify the title block to be used at the creation of a new diagram for this project + @param titleblock +*/ void QETProject::setDefaultTitleBlockProperties(const TitleBlockProperties &titleblock) { default_titleblock_properties_ = titleblock; //Integrate the title block in this project @@ -485,26 +485,26 @@ void QETProject::setDefaultXRefProperties(QHash hash) } /** - * @brief QETProject::conductorAutoNum - * @return All value of conductor autonum stored in project - */ + @brief QETProject::conductorAutoNum + @return All value of conductor autonum stored in project +*/ QHash QETProject::conductorAutoNum() const { return m_conductor_autonum; } /** - * @brief QETProject::elementAutoNum - * @return All value of element autonum stored in project - */ + @brief QETProject::elementAutoNum + @return All value of element autonum stored in project +*/ QHash QETProject::elementAutoNum() const { return m_element_autonum; } /** - * @brief QETProject::elementAutoNumFormula - * @param element autonum title - * @return Formula of element autonum stored in element autonum - */ + @brief QETProject::elementAutoNumFormula + @param element autonum title + @return Formula of element autonum stored in element autonum +*/ QString QETProject::elementAutoNumFormula (const QString& key) const { if (m_element_autonum.contains(key)) { @@ -515,34 +515,34 @@ QString QETProject::elementAutoNumFormula (const QString& key) const } /** - * @brief QETProject::elementAutoNumCurrentFormula - * @return current formula being used by project - */ + @brief QETProject::elementAutoNumCurrentFormula + @return current formula being used by project +*/ QString QETProject::elementAutoNumCurrentFormula() const { return elementAutoNumFormula(m_current_element_autonum); } /** - * @brief QETProject::elementCurrentAutoNum - * @return current element autonum title - */ + @brief QETProject::elementCurrentAutoNum + @return current element autonum title +*/ QString QETProject::elementCurrentAutoNum () const { return m_current_element_autonum; } /** - * @brief QETProject::setCurrrentElementAutonum - * @param autoNum : set the current element autonum to @autonum - */ + @brief QETProject::setCurrrentElementAutonum + @param autoNum : set the current element autonum to @autonum +*/ void QETProject::setCurrrentElementAutonum(QString autoNum) { m_current_element_autonum = std::move(autoNum); } /** - * @brief QETProject::conductorAutoNumFormula - * @param conductor autonum title - * @return Formula of element autonum stored in conductor autonum - */ + @brief QETProject::conductorAutoNumFormula + @param conductor autonum title + @return Formula of element autonum stored in conductor autonum +*/ QString QETProject::conductorAutoNumFormula (const QString& key) const { if (m_conductor_autonum.contains(key)) @@ -552,47 +552,47 @@ QString QETProject::conductorAutoNumFormula (const QString& key) const } /** - * @brief QETProject::conductorCurrentAutoNum - * @return current conductor autonum title - */ + @brief QETProject::conductorCurrentAutoNum + @return current conductor autonum title +*/ QString QETProject::conductorCurrentAutoNum () const { return m_current_conductor_autonum; } /** - * @brief QETProject::setCurrentConductorAutoNum - * @param autoNum set the current conductor autonum to @autonum - */ + @brief QETProject::setCurrentConductorAutoNum + @param autoNum set the current conductor autonum to @autonum +*/ void QETProject::setCurrentConductorAutoNum(QString autoNum) { m_current_conductor_autonum = std::move(autoNum); } /** - * @brief QETProject::folioAutoNum - * @return All value of folio autonum stored in project - */ + @brief QETProject::folioAutoNum + @return All value of folio autonum stored in project +*/ QHash QETProject::folioAutoNum() const { return m_folio_autonum; } /** - * @brief QETProject::addConductorAutoNum - * Add a new conductor numerotation context. If key already exist, - * replace old context by the new context - * @param key - * @param context - */ + @brief QETProject::addConductorAutoNum + Add a new conductor numerotation context. If key already exist, + replace old context by the new context + @param key + @param context +*/ void QETProject::addConductorAutoNum(const QString& key, const NumerotationContext& context) { m_conductor_autonum.insert(key, context); } /** - * @brief QETProject::addElementAutoNum - * Add a new element numerotation context. If key already exist, - * replace old context by the new context - * @param key - * @param context - */ + @brief QETProject::addElementAutoNum + Add a new element numerotation context. If key already exist, + replace old context by the new context + @param key + @param context +*/ void QETProject::addElementAutoNum(const QString& key, const NumerotationContext& context) { m_element_autonum.insert(key, context); @@ -600,30 +600,30 @@ void QETProject::addElementAutoNum(const QString& key, const NumerotationContext } /** - * @brief QETProject::addFolioAutoNum - * Add a new folio numerotation context. If key already exist, - * replace old context by the new context - * @param key - * @param context - */ + @brief QETProject::addFolioAutoNum + Add a new folio numerotation context. If key already exist, + replace old context by the new context + @param key + @param context +*/ void QETProject::addFolioAutoNum(const QString& key, const NumerotationContext& context) { m_folio_autonum.insert(key, context); } /** - * @brief QETProject::removeConductorAutoNum - * Remove Conductor Numerotation Context stored with key - * @param key - */ + @brief QETProject::removeConductorAutoNum + Remove Conductor Numerotation Context stored with key + @param key +*/ void QETProject::removeConductorAutoNum(const QString& key) { m_conductor_autonum.remove(key); } /** - * @brief QETProject::removeElementAutonum - * Remove Element Numerotation Context stored with key - * @param key - */ + @brief QETProject::removeElementAutonum + Remove Element Numerotation Context stored with key + @param key +*/ void QETProject::removeElementAutoNum(const QString& key) { m_element_autonum.remove(key); @@ -631,53 +631,53 @@ void QETProject::removeElementAutoNum(const QString& key) } /** - * @brief QETProject::removeFolioAutonum - * Remove Folio Numerotation Context stored with key - * @param key - */ + @brief QETProject::removeFolioAutonum + Remove Folio Numerotation Context stored with key + @param key +*/ void QETProject::removeFolioAutoNum(const QString& key) { m_folio_autonum.remove(key); } /** - * @brief QETProject::conductorAutoNum - * Return conductor numerotation context stored with @key. - * If key is not found, return an empty numerotation context - * @param key - */ + @brief QETProject::conductorAutoNum + Return conductor numerotation context stored with @key. + If key is not found, return an empty numerotation context + @param key +*/ NumerotationContext QETProject::conductorAutoNum (const QString &key) const { if (m_conductor_autonum.contains(key)) return m_conductor_autonum[key]; else return NumerotationContext(); } /** - * @brief QETProject::elementAutoNum - * Return element numerotation context stored with @key. - * If key is not found, return an empty numerotation context - * @param key - */ + @brief QETProject::elementAutoNum + Return element numerotation context stored with @key. + If key is not found, return an empty numerotation context + @param key +*/ NumerotationContext QETProject::elementAutoNum (const QString &key) { if (m_element_autonum.contains(key)) return m_element_autonum[key]; else return NumerotationContext(); } /** - * @brief QETProject::folioAutoNum - * Return folio numerotation context stored with @key. - * If key is not found, return an empty numerotation context - * @param key - */ + @brief QETProject::folioAutoNum + Return folio numerotation context stored with @key. + If key is not found, return an empty numerotation context + @param key +*/ NumerotationContext QETProject::folioAutoNum (const QString &key) const { if (m_folio_autonum.contains(key)) return m_folio_autonum[key]; else return NumerotationContext(); } /** - * @brief QETProject::freezeExistentConductorLabel - * Freeze Existent Conductors in the selected folios - * @param from - first folio index to apply freeze - * @param to - last folio index to apply freeze - */ + @brief QETProject::freezeExistentConductorLabel + Freeze Existent Conductors in the selected folios + @param from - first folio index to apply freeze + @param to - last folio index to apply freeze +*/ void QETProject::freezeExistentConductorLabel(bool freeze, int from, int to) { for (int i = from; i <= to; i++) { m_diagrams_list.at(i)->freezeConductors(freeze); @@ -685,11 +685,11 @@ void QETProject::freezeExistentConductorLabel(bool freeze, int from, int to) { } /** - * @brief QETProject::freezeNewConductorLabel - * Freeze New Conductors in the selected folios - * @param from - first folio index to apply freeze - * @param to - last folio index to apply freeze - */ + @brief QETProject::freezeNewConductorLabel + Freeze New Conductors in the selected folios + @param from - first folio index to apply freeze + @param to - last folio index to apply freeze +*/ void QETProject::freezeNewConductorLabel(bool freeze, int from, int to) { for (int i = from; i <= to; i++) { m_diagrams_list.at(i)->setFreezeNewConductors(freeze); @@ -697,27 +697,27 @@ void QETProject::freezeNewConductorLabel(bool freeze, int from, int to) { } /** - * @brief QETProject::isFreezeNewConductors - * @return freeze new conductors Project Wide status - */ + @brief QETProject::isFreezeNewConductors + @return freeze new conductors Project Wide status +*/ bool QETProject::isFreezeNewConductors() { return m_freeze_new_conductors; } /** - * @brief QETProject::setfreezeNewConductors - * Set Project Wide freeze new conductors - */ + @brief QETProject::setfreezeNewConductors + Set Project Wide freeze new conductors +*/ void QETProject::setFreezeNewConductors(bool set) { m_freeze_new_conductors = set; } /** - * @brief QETProject::freezeExistentElementLabel - * Freeze Existent Elements in the selected folios - * @param from - first folio index to apply freeze - * @param to - last folio index to apply freeze - */ + @brief QETProject::freezeExistentElementLabel + Freeze Existent Elements in the selected folios + @param from - first folio index to apply freeze + @param to - last folio index to apply freeze +*/ void QETProject::freezeExistentElementLabel(bool freeze, int from, int to) { for (int i = from; i <= to; i++) { m_diagrams_list.at(i)->freezeElements(freeze); @@ -725,11 +725,11 @@ void QETProject::freezeExistentElementLabel(bool freeze, int from, int to) { } /** - * @brief QETProject::freezeNewElementLabel - * Freeze New Elements in the selected folios - * @param from - first folio index to apply freeze - * @param to - last folio index to apply freeze - */ + @brief QETProject::freezeNewElementLabel + Freeze New Elements in the selected folios + @param from - first folio index to apply freeze + @param to - last folio index to apply freeze +*/ void QETProject::freezeNewElementLabel(bool freeze, int from, int to) { for (int i = from; i <= to; i++) { m_diagrams_list.at(i)->setFreezeNewElements(freeze); @@ -737,37 +737,37 @@ void QETProject::freezeNewElementLabel(bool freeze, int from, int to) { } /** - * @brief QETProject::freezeNewElements - * @return freeze new elements Project Wide status - */ + @brief QETProject::freezeNewElements + @return freeze new elements Project Wide status +*/ bool QETProject::isFreezeNewElements() { return m_freeze_new_elements; } /** - * @brief QETProject::setfreezeNewElements - * Set Project Wide freeze new elements - */ + @brief QETProject::setfreezeNewElements + Set Project Wide freeze new elements +*/ void QETProject::setFreezeNewElements(bool set) { m_freeze_new_elements = set; } /** - * @brief QETProject::autoConductor - * @return true if use of auto conductor is authorized. - * See also Q_PROPERTY autoConductor - */ + @brief QETProject::autoConductor + @return true if use of auto conductor is authorized. + See also Q_PROPERTY autoConductor +*/ bool QETProject::autoConductor() const { return m_auto_conductor; } /** - * @brief QETProject::setAutoConductor - * @param ac - * Enable the use of auto conductor if true - * See also Q_PROPERTY autoConductor - */ + @brief QETProject::setAutoConductor + @param ac + Enable the use of auto conductor if true + See also Q_PROPERTY autoConductor +*/ void QETProject::setAutoConductor(bool ac) { if (ac != m_auto_conductor) @@ -775,19 +775,19 @@ void QETProject::setAutoConductor(bool ac) } /** - * @brief QETProject::autoFolioNumberingNewFolios - * emit Signal to add new Diagram with autonum - * properties - */ + @brief QETProject::autoFolioNumberingNewFolios + emit Signal to add new Diagram with autonum + properties +*/ void QETProject::autoFolioNumberingNewFolios(){ emit addAutoNumDiagram(); } /** - * @brief QETProject::autoFolioNumberingNewFolios - * @param autonum used, index from selected tabs "from" and "to" - * rename folios with selected autonum - */ + @brief QETProject::autoFolioNumberingNewFolios + @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){ int total_folio = m_diagrams_list.count(); DiagramContext project_wide_properties = m_project_properties; @@ -862,12 +862,12 @@ bool QETProject::close() { } /** - * @brief QETProject::write - * Save the project in a file - * @see filePath() - * @see setFilePath() - * @return true if the project was successfully saved, else false - */ + @brief QETProject::write + Save the project in a file + @see filePath() + @see setFilePath() + @return true if the project was successfully saved, else false +*/ QETResult QETProject::write() { // this operation requires a filepath @@ -903,10 +903,10 @@ bool QETProject::isReadOnly() const { } /** - * @brief QETProject::setReadOnly - * Set this project to read only if @read_only = true - * @param read_only - */ + @brief QETProject::setReadOnly + Set this project to read only if @read_only = true + @param read_only +*/ void QETProject::setReadOnly(bool read_only) { if (m_read_only != read_only) @@ -940,11 +940,11 @@ bool QETProject::isEmpty() const { } /** - * @brief QETProject::importElement - * Import the element represented by @location to the embbeded collection of this project - * @param location - * @return the location of the imported element, location can be null. - */ + @brief QETProject::importElement + Import the element represented by @location to the embbeded collection of this project + @param location + @return the location of the imported element, location can be null. +*/ ElementsLocation QETProject::importElement(ElementsLocation &location) { //Location isn't an element or doesn't exist @@ -1079,12 +1079,12 @@ bool QETProject::usesElement(const ElementsLocation &location) const } /** - * @brief QETProject::unusedElements - * @return the list of unused element (exactly her location) - * An unused element, is an element present in the embedded collection but not present in a diagram of this project. - * Be aware that an element can be not present in a diagram, - * but managed by an undo command (delete an element), so an unused element can be used after an undo. - */ + @brief QETProject::unusedElements + @return the list of unused element (exactly her location) + An unused element, is an element present in the embedded collection but not present in a diagram of this project. + Be aware that an element can be not present in a diagram, + but managed by an undo command (delete an element), so an unused element can be used after an undo. +*/ QList QETProject::unusedElements() const { QList unused_list; @@ -1114,11 +1114,11 @@ bool QETProject::usesTitleBlockTemplate(const TitleBlockTemplateLocation &locati } /** - * @brief QETProject::addNewDiagram - * Add a new diagram in project at position pos. - * @param pos - * @return the new created diagram - */ + @brief QETProject::addNewDiagram + Add a new diagram in project at position pos. + @param pos + @return the new created diagram +*/ Diagram *QETProject::addNewDiagram(int pos) { if (isReadOnly()) { @@ -1137,10 +1137,10 @@ Diagram *QETProject::addNewDiagram(int pos) } /** - * @brief QETProject::removeDiagram - * Remove @diagram from project - * @param diagram - */ + @brief QETProject::removeDiagram + Remove @diagram from project + @param diagram +*/ void QETProject::removeDiagram(Diagram *diagram) { if (isReadOnly() || @@ -1190,10 +1190,10 @@ void QETProject::setModified(bool modified) { } /** - * @brief QETProject::readProjectXml - * Read and make the project from an xml description - * @param xml_project : the description of the project from an xml - */ + @brief QETProject::readProjectXml + Read and make the project from an xml description + @param xml_project : the description of the project from an xml +*/ void QETProject::readProjectXml(QDomDocument &xml_project) { QDomElement root_elmt = xml_project.documentElement(); @@ -1256,11 +1256,11 @@ void QETProject::readProjectXml(QDomDocument &xml_project) } /** - * @brief QETProject::readDiagramsXml - * Load the diagrams from the xml description of the project. - * Note a project can have 0 diagram - * @param xml_project - */ + @brief QETProject::readDiagramsXml + Load the diagrams from the xml description of the project. + Note a project can have 0 diagram + @param xml_project +*/ void QETProject::readDiagramsXml(QDomDocument &xml_project) { //@TODO try to solve a weird bug (dialog is black) since port to Qt5 with the DialogWaiting @@ -1328,10 +1328,10 @@ void QETProject::readDiagramsXml(QDomDocument &xml_project) } /** - * @brief QETProject::readElementsCollectionXml - * Load the diagrams from the xml description of the project - * @param xml_project : the xml description of the project - */ + @brief QETProject::readElementsCollectionXml + Load the diagrams from the xml description of the project + @param xml_project : the xml description of the project +*/ void QETProject::readElementsCollectionXml(QDomDocument &xml_project) { //Get the embedded elements collection of the project @@ -1354,10 +1354,10 @@ void QETProject::readElementsCollectionXml(QDomDocument &xml_project) } /** - * @brief QETProject::readProjectPropertiesXml - * Load project properties from the XML description of the project - * @param xml_project : the xml description of the project - */ + @brief QETProject::readProjectPropertiesXml + Load project properties from the XML description of the project + @param xml_project : the xml description of the project +*/ void QETProject::readProjectPropertiesXml(QDomDocument &xml_project) { foreach (QDomElement e, QET::findInDomElement(xml_project.documentElement(), "properties")) @@ -1365,11 +1365,11 @@ void QETProject::readProjectPropertiesXml(QDomDocument &xml_project) } /** - * @brief QETProject::readDefaultPropertiesXml - * load default properties for new diagram, found in the xml of this project - * or by default find in the QElectroTech global conf - * @param xml_project : the xml description of the project - */ + @brief QETProject::readDefaultPropertiesXml + load default properties for new diagram, found in the xml of this project + or by default find in the QElectroTech global conf + @param xml_project : the xml description of the project +*/ void QETProject::readDefaultPropertiesXml(QDomDocument &xml_project) { // Find xml element where is stored properties for new diagram diff --git a/sources/qetxml.h b/sources/qetxml.h index aadf0e785..72ff046b1 100644 --- a/sources/qetxml.h +++ b/sources/qetxml.h @@ -28,7 +28,7 @@ class QAbstractItemModel; /** *This namespace contain some function to use xml with QET. - */ +*/ namespace QETXML { QDomElement penToXml(QDomDocument &parent_document, const QPen& pen); diff --git a/sources/recentfiles.cpp b/sources/recentfiles.cpp index 547112d24..ad9cc3139 100644 --- a/sources/recentfiles.cpp +++ b/sources/recentfiles.cpp @@ -111,9 +111,9 @@ void RecentFiles::fileWasOpened(const QString &filepath) { } /** - * @brief RecentFiles::extractFilesFromSettings - * Read the list of recent file from settings - */ + @brief RecentFiles::extractFilesFromSettings + Read the list of recent file from settings +*/ void RecentFiles::extractFilesFromSettings() { //Forget the list of recent files @@ -148,9 +148,9 @@ void RecentFiles::insertFile(const QString &filepath) { } /** - * @brief RecentFiles::saveFilesToSettings - * Write the list of recent files to settings - */ + @brief RecentFiles::saveFilesToSettings + Write the list of recent files to settings +*/ void RecentFiles::saveFilesToSettings() { QSettings settings; diff --git a/sources/richtext/richtexteditor.cpp b/sources/richtext/richtexteditor.cpp index df9cbda5a..2cb0b8b85 100644 --- a/sources/richtext/richtexteditor.cpp +++ b/sources/richtext/richtexteditor.cpp @@ -811,8 +811,8 @@ RichTextEditorDialog::~RichTextEditorDialog() } /** - * @brief RichTextEditorDialog::on_buttonBox_accepted - */ + @brief RichTextEditorDialog::on_buttonBox_accepted +*/ void RichTextEditorDialog::on_buttonBox_accepted() { emit applyEditText( text(Qt::RichText) ); this->close(); diff --git a/sources/titleblock/qettemplateeditor.cpp b/sources/titleblock/qettemplateeditor.cpp index 7a0b39b28..8a985bb87 100644 --- a/sources/titleblock/qettemplateeditor.cpp +++ b/sources/titleblock/qettemplateeditor.cpp @@ -584,9 +584,9 @@ QString QETTitleBlockTemplateEditor::currentlyEditedTitle() const { } /** - * @brief QETTitleBlockTemplateEditor::readSettings - * Read settings - */ + @brief QETTitleBlockTemplateEditor::readSettings + Read settings +*/ void QETTitleBlockTemplateEditor::readSettings() { QSettings settings; @@ -601,9 +601,9 @@ void QETTitleBlockTemplateEditor::readSettings() } /** - * @brief QETTitleBlockTemplateEditor::writeSettings - * Write the settings - */ + @brief QETTitleBlockTemplateEditor::writeSettings + Write the settings +*/ void QETTitleBlockTemplateEditor::writeSettings() { QSettings settings; @@ -907,11 +907,11 @@ void QETTitleBlockTemplateEditor::quit() { } /** - * @brief QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings - * Save the new preview width to application settings - * @param former_preview_width : former_preview_width Unused, former preview width - * @param new_preview_width : new_preview_width New preview width - */ + @brief QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings + Save the new preview width to application settings + @param former_preview_width : former_preview_width Unused, former preview width + @param new_preview_width : new_preview_width New preview width +*/ void QETTitleBlockTemplateEditor::savePreviewWidthToApplicationSettings(int former_preview_width, int new_preview_width) { Q_UNUSED(former_preview_width) diff --git a/sources/titleblock/templatescollection.cpp b/sources/titleblock/templatescollection.cpp index e98805e3a..7d6a3454d 100644 --- a/sources/titleblock/templatescollection.cpp +++ b/sources/titleblock/templatescollection.cpp @@ -67,18 +67,18 @@ void TitleBlockTemplatesCollection::setProtocol(const QString &protocol) { } /** - * @brief TitleBlockTemplatesCollection::collection - * @return the collection where is stored this collection. - */ + @brief TitleBlockTemplatesCollection::collection + @return the collection where is stored this collection. +*/ QET::QetCollection TitleBlockTemplatesCollection::collection() const { return m_collection; } /** - * @brief TitleBlockTemplatesCollection::setCollection - * Set the storage of this collection - * @param c - */ + @brief TitleBlockTemplatesCollection::setCollection + Set the storage of this collection + @param c +*/ void TitleBlockTemplatesCollection::setCollection(QET::QetCollection c) { m_collection = c; } diff --git a/sources/titleblockproperties.cpp b/sources/titleblockproperties.cpp index c645c3779..642b758f7 100644 --- a/sources/titleblockproperties.cpp +++ b/sources/titleblockproperties.cpp @@ -131,11 +131,11 @@ void TitleBlockProperties::fromXml(const QDomElement &e) { } /** - * @brief TitleBlockProperties::toSettings - * Export the TitleBlockProperties into a QSettings - * @param settings : setting to use - * @param prefix : name to use as prefix for this property - */ + @brief TitleBlockProperties::toSettings + Export the TitleBlockProperties into a QSettings + @param settings : setting to use + @param prefix : name to use as prefix for this property +*/ void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix) const { settings.setValue(prefix + "title", title); settings.setValue(prefix + "author", author); @@ -176,9 +176,9 @@ void TitleBlockProperties::fromSettings(QSettings &settings, const QString &pref } /** - * @brief TitleBlockProperties::defaultProperties - * Return the default properties stored in the setting file - */ + @brief TitleBlockProperties::defaultProperties + Return the default properties stored in the setting file +*/ TitleBlockProperties TitleBlockProperties::defaultProperties() { QSettings settings; diff --git a/sources/titleblocktemplate.h b/sources/titleblocktemplate.h index c6c5cfb59..2ecc78889 100644 --- a/sources/titleblocktemplate.h +++ b/sources/titleblocktemplate.h @@ -189,7 +189,7 @@ class TitleBlockTemplate : public QObject { QHash vector_logos_; /** @brief bitmap_logos_ : Pixmaps for bitmap logos - */ + */ QHash bitmap_logos_; QList rows_heights_; ///< rows heights -- simple integers @@ -201,7 +201,7 @@ class TitleBlockTemplate : public QObject { /** @brief registered_cells_ : Cells objects created rattached to this template, but not mandatorily used - */ + */ QList registered_cells_; QList< QList > cells_; ///< Cells grid }; diff --git a/sources/titleblocktemplaterenderer.cpp b/sources/titleblocktemplaterenderer.cpp index ebe518957..e1ab13d51 100644 --- a/sources/titleblocktemplaterenderer.cpp +++ b/sources/titleblocktemplaterenderer.cpp @@ -32,7 +32,7 @@ const TitleBlockTemplate *TitleBlockTemplateRenderer::titleBlockTemplate() const /** @brief TitleBlockTemplateRenderer::setTitleBlockTemplate @param titleblock_template : TitleBlock template to render. - */ +*/ void TitleBlockTemplateRenderer::setTitleBlockTemplate( const TitleBlockTemplate *titleblock_template) { if (titleblock_template != m_titleblock_template) { diff --git a/sources/ui/abstractelementpropertieseditorwidget.h b/sources/ui/abstractelementpropertieseditorwidget.h index 3e38f0354..52589e9f2 100644 --- a/sources/ui/abstractelementpropertieseditorwidget.h +++ b/sources/ui/abstractelementpropertieseditorwidget.h @@ -24,9 +24,9 @@ class Element; /** - * @brief The AbstractElementPropertiesEditorWidget class - * This class provide common method for all widget used to edit some properties of an element - */ + @brief The AbstractElementPropertiesEditorWidget class + This class provide common method for all widget used to edit some properties of an element +*/ class AbstractElementPropertiesEditorWidget : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/alignmenttextdialog.cpp b/sources/ui/alignmenttextdialog.cpp index f5980295b..faff36c1f 100644 --- a/sources/ui/alignmenttextdialog.cpp +++ b/sources/ui/alignmenttextdialog.cpp @@ -51,9 +51,9 @@ AlignmentTextDialog::~AlignmentTextDialog() } /** - * @brief AlignmentTextDialog::alignment - * @return the selected alignment - */ + @brief AlignmentTextDialog::alignment + @return the selected alignment +*/ Qt::Alignment AlignmentTextDialog::alignment() const { if(ui->top_left->isChecked()) diff --git a/sources/ui/borderpropertieswidget.cpp b/sources/ui/borderpropertieswidget.cpp index bd83c8ffc..46f27b943 100644 --- a/sources/ui/borderpropertieswidget.cpp +++ b/sources/ui/borderpropertieswidget.cpp @@ -20,11 +20,11 @@ #include "diagram.h" /** - * @brief BorderPropertiesWidget::BorderPropertiesWidget - * default constructor - * @param bp properties - * @param parent paretn widget - */ + @brief BorderPropertiesWidget::BorderPropertiesWidget + default constructor + @param bp properties + @param parent paretn widget +*/ BorderPropertiesWidget::BorderPropertiesWidget(const BorderProperties &bp, QWidget *parent) : QWidget(parent), ui(new Ui::BorderPropertiesWidget) @@ -34,19 +34,19 @@ BorderPropertiesWidget::BorderPropertiesWidget(const BorderProperties &bp, QWidg } /** - * @brief BorderPropertiesWidget::~BorderPropertiesWidget - * default destructor - */ + @brief BorderPropertiesWidget::~BorderPropertiesWidget + default destructor +*/ BorderPropertiesWidget::~BorderPropertiesWidget() { delete ui; } /** - * @brief BorderPropertiesWidget::setProperties - * Set the current properties to edit - * @param bp properties to edit - */ + @brief BorderPropertiesWidget::setProperties + Set the current properties to edit + @param bp properties to edit +*/ void BorderPropertiesWidget::setProperties(const BorderProperties &bp) { m_properties = bp; ui -> m_colums_count_sp ->setValue (m_properties.columns_count); @@ -58,9 +58,9 @@ void BorderPropertiesWidget::setProperties(const BorderProperties &bp) { } /** - * @brief BorderPropertiesWidget::properties - * @return the edited border properties - */ + @brief BorderPropertiesWidget::properties + @return the edited border properties +*/ const BorderProperties &BorderPropertiesWidget::properties () { m_properties.columns_count = ui -> m_colums_count_sp -> value(); m_properties.columns_width = ui -> m_columns_width_sp -> value(); @@ -72,10 +72,10 @@ const BorderProperties &BorderPropertiesWidget::properties () { } /** - * @brief BorderPropertiesWidget::setReadOnly - * Enable or disable this widget - * @param ro true-disable / false-enable - */ + @brief BorderPropertiesWidget::setReadOnly + Enable or disable this widget + @param ro true-disable / false-enable +*/ void BorderPropertiesWidget::setReadOnly(const bool &ro) { ui->border_gb->setDisabled(ro); } diff --git a/sources/ui/borderpropertieswidget.h b/sources/ui/borderpropertieswidget.h index 6b9c973bc..65044ef0e 100644 --- a/sources/ui/borderpropertieswidget.h +++ b/sources/ui/borderpropertieswidget.h @@ -26,9 +26,9 @@ namespace Ui { } /** - * @brief The BorderPropertiesWidget class - * this widget edit the properties of a border - */ + @brief The BorderPropertiesWidget class + this widget edit the properties of a border +*/ class BorderPropertiesWidget : public QWidget { Q_OBJECT diff --git a/sources/ui/compositetexteditdialog.cpp b/sources/ui/compositetexteditdialog.cpp index 5478c8ef3..69d2e1600 100644 --- a/sources/ui/compositetexteditdialog.cpp +++ b/sources/ui/compositetexteditdialog.cpp @@ -35,17 +35,17 @@ CompositeTextEditDialog::~CompositeTextEditDialog() { } /** - * @brief CompositeTextEditDialog::plainText - * @return The edited text - */ + @brief CompositeTextEditDialog::plainText + @return The edited text +*/ QString CompositeTextEditDialog::plainText() const { return ui->m_plain_text_edit->toPlainText(); } /** - * @brief CompositeTextEditDialog::setUpComboBox - * Add the available element information in the combo box - */ + @brief CompositeTextEditDialog::setUpComboBox + Add the available element information in the combo box +*/ void CompositeTextEditDialog::setUpComboBox() { QStringList qstrl; @@ -78,10 +78,10 @@ void CompositeTextEditDialog::on_m_info_cb_activated(const QString &arg1) } /** - * @brief CompositeTextEditDialog::focusInEvent - * Reimplemented from QWidget::focusInEvent - * @param event - */ + @brief CompositeTextEditDialog::focusInEvent + Reimplemented from QWidget::focusInEvent + @param event +*/ void CompositeTextEditDialog::focusInEvent(QFocusEvent *event) { ui->m_plain_text_edit->setFocus(); diff --git a/sources/ui/compositetexteditdialog.h b/sources/ui/compositetexteditdialog.h index 537f3cab6..c2653a65c 100644 --- a/sources/ui/compositetexteditdialog.h +++ b/sources/ui/compositetexteditdialog.h @@ -10,12 +10,12 @@ namespace Ui { class DynamicElementTextItem; /** - * @brief The CompositeTextEditDialog class - * CompositeTextEditDialog display a dialog use to write the complex text - * of a dynamic element text item. - * This dialog provide a QComboBox to quickly add an information of the element - * in the composite text. - */ + @brief The CompositeTextEditDialog class + CompositeTextEditDialog display a dialog use to write the complex text + of a dynamic element text item. + This dialog provide a QComboBox to quickly add an information of the element + in the composite text. +*/ class CompositeTextEditDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/conductorpropertiesdialog.cpp b/sources/ui/conductorpropertiesdialog.cpp index ebc96d4f4..7d51f667a 100644 --- a/sources/ui/conductorpropertiesdialog.cpp +++ b/sources/ui/conductorpropertiesdialog.cpp @@ -24,11 +24,11 @@ #include "QPropertyUndoCommand/qpropertyundocommand.h" /** - * @brief ConductorPropertiesDialog::ConductorPropertiesDialog - * Constructor - * @param conductor, conductor to edit propertie - * @param parent, parent widget - */ + @brief ConductorPropertiesDialog::ConductorPropertiesDialog + Constructor + @param conductor, conductor to edit propertie + @param parent, parent widget +*/ ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor, QWidget *parent) : QDialog(parent), ui(new Ui::ConductorPropertiesDialog) @@ -45,19 +45,19 @@ ConductorPropertiesDialog::ConductorPropertiesDialog(Conductor *conductor, QWidg } /** - * @brief ConductorPropertiesDialog::~ConductorPropertiesDialog - */ + @brief ConductorPropertiesDialog::~ConductorPropertiesDialog +*/ ConductorPropertiesDialog::~ConductorPropertiesDialog() { delete ui; } /** - * @brief ConductorPropertiesDialog::PropertiesDialog - * Static method for open and apply properties. - * @param conductor, conductor to edit propertie - * @param parent, parent widget - */ + @brief ConductorPropertiesDialog::PropertiesDialog + Static method for open and apply properties. + @param conductor, conductor to edit propertie + @param parent, parent widget +*/ void ConductorPropertiesDialog::PropertiesDialog(Conductor *conductor, QWidget *parent) { ConductorPropertiesDialog cpd (conductor, parent); @@ -86,19 +86,19 @@ void ConductorPropertiesDialog::PropertiesDialog(Conductor *conductor, QWidget * } /** - * @brief ConductorPropertiesDialog::properties - * @return the edited properties - */ + @brief ConductorPropertiesDialog::properties + @return the edited properties +*/ ConductorProperties ConductorPropertiesDialog::properties() const { return m_cpw -> properties(); } /** - * @brief ConductorPropertiesDialog::applyAll - * @return - * true -> must apply the propertie to all conductor at the same potential - * false -> must apply properties only for the edited conductor - */ + @brief ConductorPropertiesDialog::applyAll + @return + true -> must apply the propertie to all conductor at the same potential + false -> must apply properties only for the edited conductor +*/ bool ConductorPropertiesDialog::applyAll() const { return ui -> m_apply_all_cb -> isChecked(); } diff --git a/sources/ui/conductorpropertieswidget.cpp b/sources/ui/conductorpropertieswidget.cpp index 40ca02651..972380af2 100644 --- a/sources/ui/conductorpropertieswidget.cpp +++ b/sources/ui/conductorpropertieswidget.cpp @@ -22,10 +22,10 @@ #include "qtextorientationspinboxwidget.h" /** - * @brief ConductorPropertiesWidget::ConductorPropertiesWidget - * Constructor - * @param parent, paretn widget - */ + @brief ConductorPropertiesWidget::ConductorPropertiesWidget + Constructor + @param parent, paretn widget +*/ ConductorPropertiesWidget::ConductorPropertiesWidget(QWidget *parent) : QWidget(parent), ui(new Ui::ConductorPropertiesWidget) @@ -38,11 +38,11 @@ ConductorPropertiesWidget::ConductorPropertiesWidget(QWidget *parent) : /** - * @brief ConductorPropertiesWidget::ConductorPropertiesWidget - * Constructor with properties - * @param properties, properties to edit - * @param parent, parent widget - */ + @brief ConductorPropertiesWidget::ConductorPropertiesWidget + Constructor with properties + @param properties, properties to edit + @param parent, parent widget +*/ ConductorPropertiesWidget::ConductorPropertiesWidget(const ConductorProperties &properties, QWidget *parent) : QWidget(parent), ui(new Ui::ConductorPropertiesWidget) @@ -53,19 +53,19 @@ ConductorPropertiesWidget::ConductorPropertiesWidget(const ConductorProperties & } /** - * @brief ConductorPropertiesWidget::~ConductorPropertiesWidget - * destructor - */ + @brief ConductorPropertiesWidget::~ConductorPropertiesWidget + destructor +*/ ConductorPropertiesWidget::~ConductorPropertiesWidget() { delete ui; } /** - * @brief ConductorPropertiesWidget::setProperties - * Set the properties - * @param properties - */ + @brief ConductorPropertiesWidget::setProperties + Set the properties + @param properties +*/ void ConductorPropertiesWidget::setProperties(const ConductorProperties &properties) { if (m_properties == properties) @@ -107,9 +107,9 @@ void ConductorPropertiesWidget::setProperties(const ConductorProperties &propert } /** - * @brief ConductorPropertiesWidget::properties - * @return the edited properties - */ + @brief ConductorPropertiesWidget::properties + @return the edited properties +*/ ConductorProperties ConductorPropertiesWidget::properties() const { ConductorProperties properties_; @@ -146,10 +146,10 @@ ConductorProperties ConductorPropertiesWidget::properties() const } /** - * @brief ConductorPropertiesWidget::event - * @param event - * @return - */ + @brief ConductorPropertiesWidget::event + @param event + @return +*/ bool ConductorPropertiesWidget::event(QEvent *event) { if (event->type() == QEvent::WindowActivate) { @@ -160,42 +160,42 @@ bool ConductorPropertiesWidget::event(QEvent *event) /** - * @brief ConductorPropertiesWidget::setReadOnly - * @param ro if true this widget is disabled - */ + @brief ConductorPropertiesWidget::setReadOnly + @param ro if true this widget is disabled +*/ void ConductorPropertiesWidget::setReadOnly(const bool &ro) { this->setDisabled(ro); } /** - * @brief ConductorPropertiesWidget::addAutonumWidget - * @param widget - */ + @brief ConductorPropertiesWidget::addAutonumWidget + @param widget +*/ void ConductorPropertiesWidget::addAutonumWidget(QWidget *widget) { ui->m_autonum_layout->addWidget(widget); } /** - * @brief ConductorPropertiesWidget::setHiddenOneTextPerFolio - * @param hide - */ + @brief ConductorPropertiesWidget::setHiddenOneTextPerFolio + @param hide +*/ void ConductorPropertiesWidget::setHiddenOneTextPerFolio(const bool &hide) { ui -> m_one_text_per_folio_cb -> setHidden(hide); } /** - * @brief ConductorPropertiesWidget::setDisabledShowText - * @param disable - */ + @brief ConductorPropertiesWidget::setDisabledShowText + @param disable +*/ void ConductorPropertiesWidget::setDisabledShowText(const bool &disable) { ui->m_show_text_cb->setDisabled(disable==true? true : false); } /** - * @brief ConductorPropertiesWidget::setHiddenAvailableAutonum - * Hide the label, combo box and push button of available autonum - * @param hide - */ + @brief ConductorPropertiesWidget::setHiddenAvailableAutonum + Hide the label, combo box and push button of available autonum + @param hide +*/ void ConductorPropertiesWidget::setHiddenAvailableAutonum(const bool &hide) { ui->m_autonum_label->setHidden(hide); @@ -214,8 +214,8 @@ QPushButton *ConductorPropertiesWidget::editAutonumPushButton() const } /** - * @brief ConductorPropertiesWidget::initWidget - */ + @brief ConductorPropertiesWidget::initWidget +*/ void ConductorPropertiesWidget::initWidget() { m_verti_select = QETApp::createTextOrientationSpinBoxWidget(); ui -> m_text_angle_gl -> addWidget(m_verti_select, 2, 0, Qt::AlignHCenter); @@ -236,10 +236,10 @@ void ConductorPropertiesWidget::initWidget() { } /** - * @brief ConductorPropertiesWidget::setConductorType - * Update this widget to the new conductor type - * @param type - */ + @brief ConductorPropertiesWidget::setConductorType + Update this widget to the new conductor type + @param type +*/ void ConductorPropertiesWidget::setConductorType(ConductorProperties::ConductorType type) { switch (type) { case ConductorProperties::Multi: @@ -255,11 +255,11 @@ void ConductorPropertiesWidget::setConductorType(ConductorProperties::ConductorT } /** - * @brief ConductorPropertiesWidget::updatePreview - * Update the preview for single lien - * @param b true: update from the value displayed by this widget - * false: update from the properties given at the constructor of this widget - */ + @brief ConductorPropertiesWidget::updatePreview + Update the preview for single lien + @param b true: update from the value displayed by this widget + false: update from the properties given at the constructor of this widget +*/ void ConductorPropertiesWidget::updatePreview(bool b) { const QRect pixmap_rect(0, 0, 96, 96); QPixmap pixmap(pixmap_rect.width(), pixmap_rect.height()); @@ -277,10 +277,10 @@ void ConductorPropertiesWidget::updatePreview(bool b) { } /** - * @brief ConductorPropertiesWidget::on_m_earth_cb_toggled - * Update the widget when toggled - * @param checked - */ + @brief ConductorPropertiesWidget::on_m_earth_cb_toggled + Update the widget when toggled + @param checked +*/ void ConductorPropertiesWidget::on_m_earth_cb_toggled(bool checked) { if (checked && ui -> m_neutral_cb -> isChecked()) ui -> m_pen_cb -> setEnabled(true); @@ -288,10 +288,10 @@ void ConductorPropertiesWidget::on_m_earth_cb_toggled(bool checked) { } /** - * @brief ConductorPropertiesWidget::on_m_neutral_cb_toggled - * Update the widget when toggled - * @param checked - */ + @brief ConductorPropertiesWidget::on_m_neutral_cb_toggled + Update the widget when toggled + @param checked +*/ void ConductorPropertiesWidget::on_m_neutral_cb_toggled(bool checked) { if (checked && ui -> m_earth_cb -> isChecked()) ui -> m_pen_cb -> setEnabled(true); @@ -299,12 +299,12 @@ void ConductorPropertiesWidget::on_m_neutral_cb_toggled(bool checked) { } /** - * @brief ConductorPropertiesWidget::on_m_update_preview_pb_clicked - * Update the preview of single line. - * m_update_preview_pb is a no used button and hidden, his role is only - * to centralize signal from various widget to edit single ligne properties, - * for update the preview - */ + @brief ConductorPropertiesWidget::on_m_update_preview_pb_clicked + Update the preview of single line. + m_update_preview_pb is a no used button and hidden, his role is only + to centralize signal from various widget to edit single ligne properties, + for update the preview +*/ void ConductorPropertiesWidget::on_m_update_preview_pb_clicked() { updatePreview(); } diff --git a/sources/ui/configpage/generalconfigurationpage.cpp b/sources/ui/configpage/generalconfigurationpage.cpp index cfe3b6432..1d1f85c10 100644 --- a/sources/ui/configpage/generalconfigurationpage.cpp +++ b/sources/ui/configpage/generalconfigurationpage.cpp @@ -25,9 +25,9 @@ #include /** - * @brief GeneralConfigurationPage::GeneralConfigurationPage - * @param parent - */ + @brief GeneralConfigurationPage::GeneralConfigurationPage + @param parent +*/ GeneralConfigurationPage::GeneralConfigurationPage(QWidget *parent) : ConfigPage(parent), ui(new Ui::GeneralConfigurationPage) @@ -131,9 +131,9 @@ GeneralConfigurationPage::~GeneralConfigurationPage() } /** - * @brief GeneralConfigurationPage::applyConf - * Write all configuration in settings file - */ + @brief GeneralConfigurationPage::applyConf + Write all configuration in settings file +*/ void GeneralConfigurationPage::applyConf() { QSettings settings; @@ -231,25 +231,25 @@ void GeneralConfigurationPage::applyConf() } /** - * @brief GeneralConfigurationPage::title - * @return The title of this page - */ + @brief GeneralConfigurationPage::title + @return The title of this page +*/ QString GeneralConfigurationPage::title() const { return(tr("Général", "configuration page title")); } /** - * @brief GeneralConfigurationPage::icon - * @return The icon of this page - */ + @brief GeneralConfigurationPage::icon + @return The icon of this page +*/ QIcon GeneralConfigurationPage::icon() const { return(QET::Icons::Settings); } /** - * @brief GeneralConfigurationPage::fillLang - * fill all available lang - */ + @brief GeneralConfigurationPage::fillLang + fill all available lang +*/ void GeneralConfigurationPage::fillLang() { ui->m_lang_cb->addItem(QET::Icons::translation, tr("Système"), "system"); @@ -295,9 +295,9 @@ void GeneralConfigurationPage::fillLang() } /** - * @brief GeneralConfigurationPage::on_m_font_pb_clicked - * Apply font to config - */ + @brief GeneralConfigurationPage::on_m_font_pb_clicked + Apply font to config +*/ void GeneralConfigurationPage::on_m_font_pb_clicked() { bool ok; @@ -317,9 +317,9 @@ void GeneralConfigurationPage::on_m_font_pb_clicked() } /** - * @brief GeneralConfigurationPage::m_dyn_text_font_pb_clicked - * Apply font to config - */ + @brief GeneralConfigurationPage::m_dyn_text_font_pb_clicked + Apply font to config +*/ void GeneralConfigurationPage::on_m_dyn_text_font_pb_clicked() { bool ok; diff --git a/sources/ui/configsaveloaderwidget.h b/sources/ui/configsaveloaderwidget.h index 92a65bdf4..7209d9db5 100644 --- a/sources/ui/configsaveloaderwidget.h +++ b/sources/ui/configsaveloaderwidget.h @@ -25,13 +25,13 @@ class ConfigSaveLoaderWidget; } /** - * @brief The ConfigSaveLoaderWidget class - * This group box provide 4 widget: - * A combo box with the available config. - * A push button to load the selected config of combo box - * A line edit to edit the text of the config to save - * A push button to save the config - */ + @brief The ConfigSaveLoaderWidget class + This group box provide 4 widget: + A combo box with the available config. + A push button to load the selected config of combo box + A line edit to edit the text of the config to save + A push button to save the config +*/ class ConfigSaveLoaderWidget : public QGroupBox { Q_OBJECT diff --git a/sources/ui/diagramcontextwidget.cpp b/sources/ui/diagramcontextwidget.cpp index a33126f9a..7b6117a46 100644 --- a/sources/ui/diagramcontextwidget.cpp +++ b/sources/ui/diagramcontextwidget.cpp @@ -32,9 +32,9 @@ DiagramContextWidget::~DiagramContextWidget() } /** - * @brief DiagramContextWidget::context - * @return The diagram context object edited by this widget - */ + @brief DiagramContextWidget::context + @return The diagram context object edited by this widget +*/ DiagramContext DiagramContextWidget::context() const { DiagramContext context; @@ -60,10 +60,10 @@ DiagramContext DiagramContextWidget::context() const } /** - * @brief DiagramContextWidget::setContext - * Load the content from @context into this widget - * @param context - */ + @brief DiagramContextWidget::setContext + Load the content from @context into this widget + @param context +*/ void DiagramContextWidget::setContext (const DiagramContext &context) { clear(); @@ -80,9 +80,9 @@ void DiagramContextWidget::setContext (const DiagramContext &context) } /** - * @brief DiagramContextWidget::nameLessRowsCount - * @return The count of name-less rows in the table - */ + @brief DiagramContextWidget::nameLessRowsCount + @return The count of name-less rows in the table +*/ int DiagramContextWidget::nameLessRowsCount() const { int name_less_rows_count = 0; @@ -98,9 +98,9 @@ int DiagramContextWidget::nameLessRowsCount() const } /** - * @brief DiagramContextWidget::clear - * Clear any values entered within this widget - */ + @brief DiagramContextWidget::clear + Clear any values entered within this widget +*/ void DiagramContextWidget::clear() { ui->m_table->clearContents(); @@ -112,10 +112,10 @@ void DiagramContextWidget::clear() } /** - * @brief DiagramContextWidget::highlightNonAcceptableKeys - * Highlight keys that would not be accepted by a DiagramContext object. - * @return the number of highlighted keys. - */ + @brief DiagramContextWidget::highlightNonAcceptableKeys + Highlight keys that would not be accepted by a DiagramContext object. + @return the number of highlighted keys. +*/ int DiagramContextWidget::highlightNonAcceptableKeys() { static QRegExp re(DiagramContext::validKeyRegExp()); @@ -146,10 +146,10 @@ int DiagramContextWidget::highlightNonAcceptableKeys() } /** - * @brief DiagramContextWidget::refreshFormatLabel - * Sets the text describing the acceptable format for keys when adding extra - * key/value pairs. - */ + @brief DiagramContextWidget::refreshFormatLabel + Sets the text describing the acceptable format for keys when adding extra + key/value pairs. +*/ void DiagramContextWidget::refreshFormatLabel() { QString format_text = tr( @@ -164,9 +164,9 @@ void DiagramContextWidget::refreshFormatLabel() } /** - * @brief DiagramContextWidget::checkTableRows - * Adds a row in the additional fields table if needed - */ + @brief DiagramContextWidget::checkTableRows + Adds a row in the additional fields table if needed +*/ void DiagramContextWidget::checkTableRows() { refreshFormatLabel(); diff --git a/sources/ui/diagrampropertiesdialog.cpp b/sources/ui/diagrampropertiesdialog.cpp index b7e2752ba..5b1f4cbb6 100644 --- a/sources/ui/diagrampropertiesdialog.cpp +++ b/sources/ui/diagrampropertiesdialog.cpp @@ -25,11 +25,11 @@ #include "changetitleblockcommand.h" /** - * @brief DiagramPropertiesDialog::DiagramPropertiesDialog - * Deafult constructor - * @param diagram : diagram to edit properties - * @param parent : parent widget - */ + @brief DiagramPropertiesDialog::DiagramPropertiesDialog + Deafult constructor + @param diagram : diagram to edit properties + @param parent : parent widget +*/ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *parent) : QDialog (parent), m_diagram (diagram) @@ -121,19 +121,19 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare } /** - * @brief DiagramPropertiesDialog::diagramPropertiesDialog - * Static method to get a DiagramPropertiesDialog. - * @param diagram : diagram to edit properties - * @param parent : parent widget - */ + @brief DiagramPropertiesDialog::diagramPropertiesDialog + Static method to get a DiagramPropertiesDialog. + @param diagram : diagram to edit properties + @param parent : parent widget +*/ void DiagramPropertiesDialog::diagramPropertiesDialog(Diagram *diagram, QWidget *parent) { DiagramPropertiesDialog dialog(diagram, parent); } /** - * @brief DiagramPropertiesDialog::editAutonum - * Open conductor autonum editor - */ + @brief DiagramPropertiesDialog::editAutonum + Open conductor autonum editor +*/ void DiagramPropertiesDialog::editAutonum() { ProjectPropertiesDialog ppd (m_diagram->project(), this); @@ -144,9 +144,9 @@ void DiagramPropertiesDialog::editAutonum() } /** - * @brief DiagramPropertiesDialog::editAutonum - * Open folio autonum editor - */ + @brief DiagramPropertiesDialog::editAutonum + Open folio autonum editor +*/ void DiagramPropertiesDialog::editAutoFolioNum () { ProjectPropertiesDialog ppd (m_diagram->project(), this); ppd.setCurrentPage(ProjectPropertiesDialog::Autonum); diff --git a/sources/ui/diagrampropertiesdialog.h b/sources/ui/diagrampropertiesdialog.h index 9eb31f8f1..85dab08d4 100644 --- a/sources/ui/diagrampropertiesdialog.h +++ b/sources/ui/diagrampropertiesdialog.h @@ -24,9 +24,9 @@ class Diagram; class ConductorPropertiesWidget; /** - * @brief The DiagramPropertiesDialog class - * This dialog open a windows for edit properties of a diagram. - */ + @brief The DiagramPropertiesDialog class + This dialog open a windows for edit properties of a diagram. +*/ class DiagramPropertiesDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/diagrampropertieseditordockwidget.cpp b/sources/ui/diagrampropertieseditordockwidget.cpp index a97e5257f..7e62c4974 100644 --- a/sources/ui/diagrampropertieseditordockwidget.cpp +++ b/sources/ui/diagrampropertieseditordockwidget.cpp @@ -21,10 +21,10 @@ #include "propertieseditorfactory.h" /** - * @brief DiagramPropertiesEditorDockWidget::DiagramPropertiesEditorDockWidget - * Constructor - * @param parent : parent widget - */ + @brief DiagramPropertiesEditorDockWidget::DiagramPropertiesEditorDockWidget + Constructor + @param parent : parent widget +*/ DiagramPropertiesEditorDockWidget::DiagramPropertiesEditorDockWidget(QWidget *parent) : PropertiesEditorDockWidget(parent), m_diagram(nullptr), @@ -32,13 +32,13 @@ DiagramPropertiesEditorDockWidget::DiagramPropertiesEditorDockWidget(QWidget *pa {} /** - * @brief DiagramPropertiesEditorDockWidget::setDiagram - * Set the diagram to edit the selection. - * Connect the diagram signal selectionChanged() to this slot selectionChanged(); - * If diagram = nullptr, we just disconnect all signal and remove editor. - * @param diagram - * @param diagram - */ + @brief DiagramPropertiesEditorDockWidget::setDiagram + Set the diagram to edit the selection. + Connect the diagram signal selectionChanged() to this slot selectionChanged(); + If diagram = nullptr, we just disconnect all signal and remove editor. + @param diagram + @param diagram +*/ void DiagramPropertiesEditorDockWidget::setDiagram(Diagram *diagram) { if (m_diagram == diagram) return; @@ -65,10 +65,10 @@ void DiagramPropertiesEditorDockWidget::setDiagram(Diagram *diagram) } /** - * @brief DiagramPropertiesEditorDockWidget::selectionChanged - * The current selection of diagram was changed. - * We fill the dock with the appropriate ElementPropertiesWidget of the current selection. - */ + @brief DiagramPropertiesEditorDockWidget::selectionChanged + The current selection of diagram was changed. + We fill the dock with the appropriate ElementPropertiesWidget of the current selection. +*/ void DiagramPropertiesEditorDockWidget::selectionChanged() { if (!m_diagram) { @@ -92,9 +92,9 @@ void DiagramPropertiesEditorDockWidget::selectionChanged() } /** - * @brief DiagramPropertiesEditorDockWidget::diagramWasDeleted - * Remove current editor and set m_diagram to nullptr. - */ + @brief DiagramPropertiesEditorDockWidget::diagramWasDeleted + Remove current editor and set m_diagram to nullptr. +*/ void DiagramPropertiesEditorDockWidget::diagramWasDeleted() { m_diagram = nullptr; diff --git a/sources/ui/diagramselection.cpp b/sources/ui/diagramselection.cpp index 9104da7da..72be98369 100644 --- a/sources/ui/diagramselection.cpp +++ b/sources/ui/diagramselection.cpp @@ -38,8 +38,8 @@ diagramselection::~diagramselection() { } /** - * @brief load all Diagrams of project in table - */ + @brief load all Diagrams of project in table +*/ void diagramselection::load_TableDiagram() { // Clear all items ui -> tableDiagram -> clear(); @@ -80,9 +80,9 @@ void diagramselection::load_TableDiagram() { } /** - * @brief get list of Diagrams is selected - * @return this list of Diagrams - */ + @brief get list of Diagrams is selected + @return this list of Diagrams +*/ QList diagramselection::list_of_DiagramSelected() { QList listDiag; for(int i=0; i tableDiagram -> rowCount();i++){ @@ -94,9 +94,9 @@ QList diagramselection::list_of_DiagramSelected() { } /** - * @brief contextMenuRequested - * @param pos - */ + @brief contextMenuRequested + @param pos +*/ void diagramselection::on_tableDiagram_customContextMenuRequested(const QPoint &pos){ QMenu menu(this); QAction *desl = menu.addAction( tr("Désélectionner tout") ); diff --git a/sources/ui/dialogwaiting.cpp b/sources/ui/dialogwaiting.cpp index 0f11071eb..8b00c1333 100644 --- a/sources/ui/dialogwaiting.cpp +++ b/sources/ui/dialogwaiting.cpp @@ -23,9 +23,9 @@ DialogWaiting *DialogWaiting::m_static_dialog = nullptr; /** - * @brief DialogWaiting::DialogWaiting - * @param parent - */ + @brief DialogWaiting::DialogWaiting + @param parent +*/ DialogWaiting::DialogWaiting(QWidget *parent) : QDialog(parent), ui(new Ui::DialogWaiting) @@ -36,58 +36,58 @@ DialogWaiting::DialogWaiting(QWidget *parent) : } /** - * @brief DialogWaiting::~DialogWaiting - */ + @brief DialogWaiting::~DialogWaiting +*/ DialogWaiting::~DialogWaiting() { delete ui; } /** - * @brief DialogWaiting::setProgressBar - * @param val is the progressBar value - */ + @brief DialogWaiting::setProgressBar + @param val is the progressBar value +*/ void DialogWaiting::setProgressBar(int val){ ui->progressBar->setValue(val); qApp->processEvents(); } /** - * @brief DialogWaiting::setProgressReset, clear progressBar and reset - */ + @brief DialogWaiting::setProgressReset, clear progressBar and reset +*/ void DialogWaiting::setProgressReset(){ ui->progressBar->reset(); } /** - * @brief DialogWaiting::setProgressBarRange - * @param min is the minimum of progressBar - * @param max is the maximun of progressBar - */ + @brief DialogWaiting::setProgressBarRange + @param min is the minimum of progressBar + @param max is the maximun of progressBar +*/ void DialogWaiting::setProgressBarRange(int min, int max){ ui->progressBar->setRange(min,max); ui->progressBar->setFormat(QObject::tr("%p% effectué (%v sur %m)")); } /** - * @brief DialogWaiting::setTitle of action - * @param val is the string of action - */ + @brief DialogWaiting::setTitle of action + @param val is the string of action +*/ void DialogWaiting::setTitle(const QString& val){ ui->labelTitle->setText(val); } /** - * @brief DialogWaiting::setDetail of action - * @param val is the string of detail action - */ + @brief DialogWaiting::setDetail of action + @param val is the string of detail action +*/ void DialogWaiting::setDetail(const QString& val){ ui->label_detail->setText(val); } /** - * @brief DialogWaiting::progressBarValue - * @return The current vcalue of the progress bar - */ + @brief DialogWaiting::progressBarValue + @return The current vcalue of the progress bar +*/ int DialogWaiting::progressBarValue() const { return ui->progressBar->value(); diff --git a/sources/ui/dynamicelementtextitemeditor.cpp b/sources/ui/dynamicelementtextitemeditor.cpp index 32799a9c0..b61df0243 100644 --- a/sources/ui/dynamicelementtextitemeditor.cpp +++ b/sources/ui/dynamicelementtextitemeditor.cpp @@ -135,10 +135,10 @@ void DynamicElementTextItemEditor::apply() } /** - * @brief DynamicElementTextItemEditor::setCurrentText - * Expand and select the item for text @text - * @param text - */ + @brief DynamicElementTextItemEditor::setCurrentText + Expand and select the item for text @text + @param text +*/ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text) { QModelIndex index = m_model->indexFromText(text); @@ -152,10 +152,10 @@ void DynamicElementTextItemEditor::setCurrentText(DynamicElementTextItem *text) } /** - * @brief DynamicElementTextItemEditor::setCurrentGroup - * Expand and select the item for group @group - * @param group - */ + @brief DynamicElementTextItemEditor::setCurrentGroup + Expand and select the item for group @group + @param group +*/ void DynamicElementTextItemEditor::setCurrentGroup(ElementTextItemGroup *group) { QModelIndex index = m_model->indexFromGroup(group); @@ -193,9 +193,9 @@ void DynamicElementTextItemEditor::dataEdited() } /** - * @brief DynamicElementTextItemEditor::on_m_add_text_clicked - * Add a new dynamic text - */ + @brief DynamicElementTextItemEditor::on_m_add_text_clicked + Add a new dynamic text +*/ void DynamicElementTextItemEditor::on_m_add_text_clicked() { if (!m_element) @@ -214,9 +214,9 @@ void DynamicElementTextItemEditor::on_m_add_text_clicked() } /** - * @brief DynamicElementTextItemEditor::on_m_remove_selection_clicked - * Remove the selected item - */ + @brief DynamicElementTextItemEditor::on_m_remove_selection_clicked + Remove the selected item +*/ void DynamicElementTextItemEditor::on_m_remove_selection_clicked() { DynamicElementTextItem *deti = m_model->textFromIndex(ui->m_tree_view->currentIndex()); @@ -236,9 +236,9 @@ void DynamicElementTextItemEditor::on_m_remove_selection_clicked() } /** - * @brief DynamicElementTextItemEditor::on_m_add_group_clicked - * Add a new group - */ + @brief DynamicElementTextItemEditor::on_m_add_group_clicked + Add a new group +*/ void DynamicElementTextItemEditor::on_m_add_group_clicked() { QString name = QInputDialog::getText(this, tr("Nom du groupe"), tr("Entrer le nom du nouveau groupe")); diff --git a/sources/ui/dynamicelementtextitemeditor.h b/sources/ui/dynamicelementtextitemeditor.h index c383865cc..02fe4390c 100644 --- a/sources/ui/dynamicelementtextitemeditor.h +++ b/sources/ui/dynamicelementtextitemeditor.h @@ -31,14 +31,16 @@ namespace Ui { class DynamicElementTextItemEditor : public AbstractElementPropertiesEditorWidget { - Q_OBJECT - + Q_OBJECT + public: - explicit DynamicElementTextItemEditor(Element *element, QWidget *parent = nullptr); + explicit DynamicElementTextItemEditor( + Element *element, + QWidget *parent = nullptr); ~DynamicElementTextItemEditor() override; void setElement(Element *element) override; - QString title() const override {return tr("Textes");} + QString title() const override {return tr("Textes");} bool setLiveEdit(bool live_edit) override; void apply() override; void setCurrentText(DynamicElementTextItem *text); @@ -47,18 +49,18 @@ class DynamicElementTextItemEditor : public AbstractElementPropertiesEditorWidge private: void dataEdited(); - - private slots: - void on_m_add_text_clicked(); - void on_m_remove_selection_clicked(); + + private slots: + void on_m_add_text_clicked(); + void on_m_remove_selection_clicked(); void on_m_add_group_clicked(); void on_m_tree_view_clicked(const QModelIndex &index); void on_m_export_pb_clicked(); void on_m_import_pb_clicked(); - private: + private: Ui::DynamicElementTextItemEditor *ui; - DynamicElementTextModel *m_model = nullptr; + DynamicElementTextModel *m_model = nullptr; }; #endif // DYNAMICELEMENTTEXTITEMEDITOR_H diff --git a/sources/ui/dynamicelementtextmodel.cpp b/sources/ui/dynamicelementtextmodel.cpp index fc9709d9e..935a33560 100644 --- a/sources/ui/dynamicelementtextmodel.cpp +++ b/sources/ui/dynamicelementtextmodel.cpp @@ -92,10 +92,10 @@ DynamicElementTextModel::~DynamicElementTextModel() } /** - * @brief DynamicElementTextModel::indexIsInGroup - * @param index - * @return True if the index represent a group or an item in a group - */ + @brief DynamicElementTextModel::indexIsInGroup + @param index + @return True if the index represent a group or an item in a group +*/ bool DynamicElementTextModel::indexIsInGroup(const QModelIndex &index) const { QStandardItem *item = itemFromIndex(index); @@ -113,12 +113,12 @@ bool DynamicElementTextModel::indexIsInGroup(const QModelIndex &index) const } /** - * @brief DynamicElementTextModel::itemsForText - * @param deti - * @return The items for the text @deti, if the text @deti is already managed by this model - * the returned list is empty - * The returned items haven't got the same number of childs if the text is in a group or not. - */ + @brief DynamicElementTextModel::itemsForText + @param deti + @return The items for the text @deti, if the text @deti is already managed by this model + the returned list is empty + The returned items haven't got the same number of childs if the text is in a group or not. +*/ QList DynamicElementTextModel::itemsForText(DynamicElementTextItem *deti) { QList qsi_list; @@ -328,18 +328,18 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI } /** - * @brief DynamicElementTextModel::addText - * @param deti - */ + @brief DynamicElementTextModel::addText + @param deti +*/ void DynamicElementTextModel::addText(DynamicElementTextItem *deti) { this->appendRow(itemsForText(deti)); } /** - * @brief DynamicElementTextModel::removeText - * @param deti - */ + @brief DynamicElementTextModel::removeText + @param deti +*/ void DynamicElementTextModel::removeText(DynamicElementTextItem *deti) { if (!m_texts_list.contains(deti)) @@ -352,11 +352,11 @@ void DynamicElementTextModel::removeText(DynamicElementTextItem *deti) } /** - * @brief DynamicElementTextModel::textFromIndex - * @param index - * @return the text associated with @index. Returned value can be nullptr - * @Index can be a child of an index associated with a text and can be the column 0 or 1. - */ + @brief DynamicElementTextModel::textFromIndex + @param index + @return the text associated with @index. Returned value can be nullptr + @Index can be a child of an index associated with a text and can be the column 0 or 1. +*/ DynamicElementTextItem *DynamicElementTextModel::textFromIndex(const QModelIndex &index) const { if(!index.isValid()) @@ -369,12 +369,12 @@ DynamicElementTextItem *DynamicElementTextModel::textFromIndex(const QModelIndex } /** - * @brief DynamicElementTextModel::textFromItem - * @param item - * @return the text associated with @item. Return value can be nullptr - * @item can be a child of an item associated with a text and can be the column 0 or 1. - * Note can return nullptr - */ + @brief DynamicElementTextModel::textFromItem + @param item + @return the text associated with @item. Return value can be nullptr + @item can be a child of an item associated with a text and can be the column 0 or 1. + Note can return nullptr +*/ DynamicElementTextItem *DynamicElementTextModel::textFromItem(QStandardItem *item) const { //Get the item of the column 0 @@ -424,10 +424,10 @@ DynamicElementTextItem *DynamicElementTextModel::textFromItem(QStandardItem *ite } /** - * @brief DynamicElementTextModel::indexFromText - * @param text - * @return the QModelIndex for @text, or a default QModelIndex if not match - */ + @brief DynamicElementTextModel::indexFromText + @param text + @return the QModelIndex for @text, or a default QModelIndex if not match +*/ QModelIndex DynamicElementTextModel::indexFromText(DynamicElementTextItem *text) const { if(m_texts_list.contains(text)) @@ -437,12 +437,12 @@ QModelIndex DynamicElementTextModel::indexFromText(DynamicElementTextItem *text) } /** - * @brief DynamicElementTextModel::undoForEditedText - * @param deti - * @return A QUndoCommand that describe all changes made for @deti. - * Each change made for @deti is append as a child of the returned QUndoCommand. - * In other word, if the returned QUndoCommand have no child, that mean there is no change. - */ + @brief DynamicElementTextModel::undoForEditedText + @param deti + @return A QUndoCommand that describe all changes made for @deti. + Each change made for @deti is append as a child of the returned QUndoCommand. + In other word, if the returned QUndoCommand have no child, that mean there is no change. +*/ QUndoCommand *DynamicElementTextModel::undoForEditedText(DynamicElementTextItem *deti, QUndoCommand *parent_undo) const { @@ -562,13 +562,13 @@ QUndoCommand *DynamicElementTextModel::undoForEditedText(DynamicElementTextItem } /** - * @brief DynamicElementTextModel::undoForEditedGroup - * @param group - * @param parent_undo - * @return A QUndoCommand that describe all changes made for @group. - * Each change made for @group is append as a child of the returned QUndoCommand. - * In other word, if the returned QUndoCommand have no child, that mean there is no change. - */ + @brief DynamicElementTextModel::undoForEditedGroup + @param group + @param parent_undo + @return A QUndoCommand that describe all changes made for @group. + Each change made for @group is append as a child of the returned QUndoCommand. + In other word, if the returned QUndoCommand have no child, that mean there is no change. +*/ QUndoCommand *DynamicElementTextModel::undoForEditedGroup(ElementTextItemGroup *group, QUndoCommand *parent_undo) const { QUndoCommand *undo = nullptr; @@ -629,10 +629,10 @@ QUndoCommand *DynamicElementTextModel::undoForEditedGroup(ElementTextItemGroup * } /** - * @brief DynamicElementTextModel::AddGroup - * Add a text item group to this model - * @param group - */ + @brief DynamicElementTextModel::AddGroup + Add a text item group to this model + @param group +*/ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) { if(m_groups_list.keys().contains(group)) @@ -759,10 +759,10 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) } /** - * @brief DynamicElementTextModel::removeGroup - * Remove the text item group from this model - * @param group - */ + @brief DynamicElementTextModel::removeGroup + Remove the text item group from this model + @param group +*/ void DynamicElementTextModel::removeGroup(ElementTextItemGroup *group) { if(m_groups_list.keys().contains(group)) @@ -775,11 +775,11 @@ void DynamicElementTextModel::removeGroup(ElementTextItemGroup *group) } /** - * @brief DynamicElementTextModel::textAddedToGroup - * Add the text @text to the group @group - * @param deti - * @param group - */ + @brief DynamicElementTextModel::textAddedToGroup + Add the text @text to the group @group + @param deti + @param group +*/ void DynamicElementTextModel::addTextToGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group) { QStandardItem *group_item = m_groups_list.value(group); @@ -800,11 +800,11 @@ void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti, } /** - * @brief DynamicElementTextModel::groupFromIndex - * @param index - * @return the group associated with @index. Return value can be nullptr - * @Index can be a child of an index associated with a group and can be the column 0 or 1. - */ + @brief DynamicElementTextModel::groupFromIndex + @param index + @return the group associated with @index. Return value can be nullptr + @Index can be a child of an index associated with a group and can be the column 0 or 1. +*/ ElementTextItemGroup *DynamicElementTextModel::groupFromIndex(const QModelIndex &index) const { if(!index.isValid()) @@ -817,11 +817,11 @@ ElementTextItemGroup *DynamicElementTextModel::groupFromIndex(const QModelIndex } /** - * @brief DynamicElementTextModel::groupFromItem - * @param item - * @return the group associated with @item. Return value can be nullptr - * @item can be a child of an item associated with a group and can be the column 0 or 1. - */ + @brief DynamicElementTextModel::groupFromItem + @param item + @return the group associated with @item. Return value can be nullptr + @item can be a child of an item associated with a group and can be the column 0 or 1. +*/ ElementTextItemGroup *DynamicElementTextModel::groupFromItem(QStandardItem *item) const { //Get the item of the column 0 @@ -843,11 +843,11 @@ ElementTextItemGroup *DynamicElementTextModel::groupFromItem(QStandardItem *item } /** - * @brief DynamicElementTextModel::indexFromGroup - * @param group - * @return The index associated to the group @group - * or a default QModelIndex if not match - */ + @brief DynamicElementTextModel::indexFromGroup + @param group + @return The index associated to the group @group + or a default QModelIndex if not match +*/ QModelIndex DynamicElementTextModel::indexFromGroup(ElementTextItemGroup *group) const { if(m_groups_list.keys().contains(group)) @@ -857,11 +857,11 @@ QModelIndex DynamicElementTextModel::indexFromGroup(ElementTextItemGroup *group) } /** - * @brief DynamicElementTextModel::indexIsText - * @param index - * @return True if @index represente a text, both for the column 0 and 1. - * Return false if @index is a child of an index associated to a text. - */ + @brief DynamicElementTextModel::indexIsText + @param index + @return True if @index represente a text, both for the column 0 and 1. + Return false if @index is a child of an index associated to a text. +*/ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const { QStandardItem *item = nullptr; @@ -884,11 +884,11 @@ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const } /** - * @brief DynamicElementTextModel::indexIsGroup - * @param index - * @return True if @index represente a group, both for the column 0 and 1. - * Return false if @index is a child of an index associated to a group. - */ + @brief DynamicElementTextModel::indexIsGroup + @param index + @return True if @index represente a group, both for the column 0 and 1. + Return false if @index is a child of an index associated to a group. +*/ bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const { QStandardItem *item = nullptr; @@ -957,14 +957,14 @@ bool DynamicElementTextModel::canDropMimeData(const QMimeData *data, Qt::DropAct } /** - * @brief DynamicElementTextModel::dropMimeData - * @param data - * @param action - * @param row - * @param column - * @param parent - * @return In any case return false, for overwrite the default behavior of model. - */ + @brief DynamicElementTextModel::dropMimeData + @param data + @param action + @param row + @param column + @param parent + @return In any case return false, for overwrite the default behavior of model. +*/ bool DynamicElementTextModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) { Q_UNUSED(action) @@ -1081,9 +1081,9 @@ QMimeData *DynamicElementTextModel::mimeData(const QModelIndexList &indexes) con } /** - * @brief DynamicElementTextModel::mimeTypes - * @return - */ + @brief DynamicElementTextModel::mimeTypes + @return +*/ QStringList DynamicElementTextModel::mimeTypes() const { QStringList mime_list = QAbstractItemModel::mimeTypes(); @@ -1092,11 +1092,11 @@ QStringList DynamicElementTextModel::mimeTypes() const } /** - * @brief DynamicElementTextModel::enableSourceText - * Enable the good field, according to the current source of text, for the edited text @deti - * @param deti - * @param tf - */ + @brief DynamicElementTextModel::enableSourceText + Enable the good field, according to the current source of text, for the edited text @deti + @param deti + @param tf +*/ void DynamicElementTextModel::enableSourceText(DynamicElementTextItem *deti, DynamicElementTextItem::TextFrom tf) { if (!m_texts_list.contains(deti)) @@ -1124,10 +1124,10 @@ void DynamicElementTextModel::enableSourceText(DynamicElementTextItem *deti, Dyn } /** - * @brief DynamicElementTextModel::enableGroupRotation - * Enable/disable the item "group rotation" according the option hold to bottom - * @param group - */ + @brief DynamicElementTextModel::enableGroupRotation + Enable/disable the item "group rotation" according the option hold to bottom + @param group +*/ void DynamicElementTextModel::enableGroupRotationAndPos(ElementTextItemGroup *group) { if(!m_groups_list.contains(group)) @@ -1218,12 +1218,12 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi) } /** - * @brief DynamicElementTextModel::setConnection - * Set up the connection for @deti to keep up to date the data of this model and the text. - * Is notably use with the use of QUndoCommand. - * @param deti - text to setup connection - * @param set - true = set connection - false unset connection - */ + @brief DynamicElementTextModel::setConnection + Set up the connection for @deti to keep up to date the data of this model and the text. + Is notably use with the use of QUndoCommand. + @param deti - text to setup connection + @param set - true = set connection - false unset connection +*/ void DynamicElementTextModel::setConnection(DynamicElementTextItem *deti, bool set) { if(set) @@ -1258,12 +1258,12 @@ void DynamicElementTextModel::setConnection(DynamicElementTextItem *deti, bool s } /** - * @brief DynamicElementTextModel::setConnection - * Set up the connection for @group to keep up to date the data of this model and the group. - * Is notably use with the use of QUndoCommand. - * @param group group to setup the connection - * @param set true = set connection - false unset connection - */ + @brief DynamicElementTextModel::setConnection + Set up the connection for @group to keep up to date the data of this model and the group. + Is notably use with the use of QUndoCommand. + @param group group to setup the connection + @param set true = set connection - false unset connection +*/ void DynamicElementTextModel::setConnection(ElementTextItemGroup *group, bool set) { if(set) @@ -1440,8 +1440,8 @@ void DynamicElementTextModel::updateDataFromGroup(ElementTextItemGroup *group, D /*************************************************** - * A little delegate only for add a combobox and a color dialog, - * for use with the model + A little delegate only for add a combobox and a color dialog, + for use with the model ***************************************************/ DynamicTextItemDelegate::DynamicTextItemDelegate(QObject *parent) : @@ -1763,10 +1763,10 @@ bool DynamicTextItemDelegate::eventFilter(QObject *object, QEvent *event) } /** - * @brief DynamicTextItemDelegate::availableInfo - * @param deti - * @return A list of available info of element - */ + @brief DynamicTextItemDelegate::availableInfo + @param deti + @return A list of available info of element +*/ QStringList DynamicTextItemDelegate::availableInfo(DynamicElementTextItem *deti) const { QStringList qstrl; diff --git a/sources/ui/dynamicelementtextmodel.h b/sources/ui/dynamicelementtextmodel.h index 493290947..82836db37 100644 --- a/sources/ui/dynamicelementtextmodel.h +++ b/sources/ui/dynamicelementtextmodel.h @@ -27,11 +27,11 @@ class ElementTextItemGroup; class Element; /** - * @brief The DynamicElementTextModel class - * A model to use with QtView. - * This model display and can edit the value of dynamic text of an element. - * Set the delegate DynamicTextItemDelegate as delegate of this model. - */ + @brief The DynamicElementTextModel class + A model to use with QtView. + This model display and can edit the value of dynamic text of an element. + Set the delegate DynamicTextItemDelegate as delegate of this model. +*/ class DynamicElementTextModel : public QStandardItemModel { Q_OBJECT diff --git a/sources/ui/elementinfopartwidget.cpp b/sources/ui/elementinfopartwidget.cpp index 00ffc2532..f2b3c1a20 100644 --- a/sources/ui/elementinfopartwidget.cpp +++ b/sources/ui/elementinfopartwidget.cpp @@ -24,12 +24,12 @@ typedef SearchAndReplaceWorker sarw; /** - * @brief ElementInfoPartWidget::ElementInfoPartWidget - * Constructor - * @param key the string key what represent this info part - * @param translated_key the string key translated - * @param parent parent widget - */ + @brief ElementInfoPartWidget::ElementInfoPartWidget + Constructor + @param key the string key what represent this info part + @param translated_key the string key translated + @param parent parent widget +*/ ElementInfoPartWidget::ElementInfoPartWidget(QString key, const QString& translated_key, QWidget *parent): QWidget(parent), ui(new Ui::ElementInfoPartWidget), @@ -44,19 +44,19 @@ ElementInfoPartWidget::ElementInfoPartWidget(QString key, const QString& transla } /** - * @brief ElementInfoPartWidget::~ElementInfoPartWidget - * destructor - */ + @brief ElementInfoPartWidget::~ElementInfoPartWidget + destructor +*/ ElementInfoPartWidget::~ElementInfoPartWidget() { delete ui; } /** - * @brief ElementInfoPartWidget::setText - * Set text to line edit - * @param txt - */ + @brief ElementInfoPartWidget::setText + Set text to line edit + @param txt +*/ void ElementInfoPartWidget::setText(const QString &txt) { if (m_show_erase) { @@ -67,68 +67,68 @@ void ElementInfoPartWidget::setText(const QString &txt) } /** - * @brief ElementInfoPartWidget::text - * @return the text in the line edit - */ + @brief ElementInfoPartWidget::text + @return the text in the line edit +*/ QString ElementInfoPartWidget::text() const { return (ui->line_edit->text()); } /** - * @brief ElementInfoPartWidget::setPlaceHolderText - * @param text - */ + @brief ElementInfoPartWidget::setPlaceHolderText + @param text +*/ void ElementInfoPartWidget::setPlaceHolderText(const QString &text) { ui->line_edit->setPlaceholderText(text); } /** - * @brief ElementInfoPartWidget::setFocusTolineEdit - * Set the focus to the line edit - */ + @brief ElementInfoPartWidget::setFocusTolineEdit + Set the focus to the line edit +*/ void ElementInfoPartWidget::setFocusTolineEdit() { ui->line_edit->setFocus(); } /** - * @brief ElementInfoPartWidget::setEnabled - * enable the line edit - * @param e - */ + @brief ElementInfoPartWidget::setEnabled + enable the line edit + @param e +*/ void ElementInfoPartWidget::setEnabled(bool e) { ui->line_edit->setEnabled(e); } /** - * @brief ElementInfoPartWidget::setDisabled - * disable the line edit - * @param d - */ + @brief ElementInfoPartWidget::setDisabled + disable the line edit + @param d +*/ void ElementInfoPartWidget::setDisabled(bool d) { ui->line_edit->setDisabled(d); } /** - * @brief ElementInfoPartWidget::setEraseTextVisible - * @param visible - */ + @brief ElementInfoPartWidget::setEraseTextVisible + @param visible +*/ void ElementInfoPartWidget::setEraseTextVisible(bool visible) { ui->m_erase_text->setVisible(visible); m_show_erase = visible; } /** - * @brief ElementInfoPartWidget::setEraseTextChecked - * @param check - */ + @brief ElementInfoPartWidget::setEraseTextChecked + @param check +*/ void ElementInfoPartWidget::setEraseTextChecked(bool check) { ui->m_erase_text->setChecked(check); } /** - * @brief ElementInfoPartWidget::EraseTextCheckState - * @return - */ + @brief ElementInfoPartWidget::EraseTextCheckState + @return +*/ Qt::CheckState ElementInfoPartWidget::EraseTextCheckState() const { return ui->m_erase_text->checkState(); } diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp index 0ba00c706..89af5edf8 100644 --- a/sources/ui/elementinfowidget.cpp +++ b/sources/ui/elementinfowidget.cpp @@ -24,11 +24,11 @@ #include "element.h" /** - * @brief ElementInfoWidget::ElementInfoWidget - * Constructor - * @param elmt element to edit information - * @param parent parent widget - */ + @brief ElementInfoWidget::ElementInfoWidget + Constructor + @param elmt element to edit information + @param parent parent widget +*/ ElementInfoWidget::ElementInfoWidget(Element *elmt, QWidget *parent) : AbstractElementPropertiesEditorWidget(parent), ui(new Ui::ElementInfoWidget), @@ -40,9 +40,9 @@ ElementInfoWidget::ElementInfoWidget(Element *elmt, QWidget *parent) : } /** - * @brief ElementInfoWidget::~ElementInfoWidget - * Destructor - */ + @brief ElementInfoWidget::~ElementInfoWidget + Destructor +*/ ElementInfoWidget::~ElementInfoWidget() { qDeleteAll(m_eipw_list); @@ -50,10 +50,10 @@ ElementInfoWidget::~ElementInfoWidget() } /** - * @brief ElementInfoWidget::setElement - * Set @element to be the edited element - * @param element - */ + @brief ElementInfoWidget::setElement + Set @element to be the edited element + @param element +*/ void ElementInfoWidget::setElement(Element *element) { if (m_element == element) return; @@ -84,10 +84,10 @@ void ElementInfoWidget::setElement(Element *element) } /** - * @brief ElementInfoWidget::apply - * Apply the new information with a new undo command (got with method associatedUndo) - * pushed to the stack of element project. - */ + @brief ElementInfoWidget::apply + Apply the new information with a new undo command (got with method associatedUndo) + pushed to the stack of element project. +*/ void ElementInfoWidget::apply() { if (QUndoCommand *undo = associatedUndo()) @@ -95,12 +95,12 @@ void ElementInfoWidget::apply() } /** - * @brief ElementInfoWidget::associatedUndo - * If the edited info is different of the actual element info, - * return a QUndoCommand with the change. - * If no change return nullptr; - * @return - */ + @brief ElementInfoWidget::associatedUndo + If the edited info is different of the actual element info, + return a QUndoCommand with the change. + If no change return nullptr; + @return +*/ QUndoCommand* ElementInfoWidget::associatedUndo() const { DiagramContext new_info = currentInfo(); @@ -113,10 +113,10 @@ QUndoCommand* ElementInfoWidget::associatedUndo() const } /** - * @brief ElementInfoWidget::setLiveEdit - * @param live_edit true : enable the live edit mode, false disable - * @return always true; - */ + @brief ElementInfoWidget::setLiveEdit + @param live_edit true : enable the live edit mode, false disable + @return always true; +*/ bool ElementInfoWidget::setLiveEdit(bool live_edit) { if (m_live_edit == live_edit) return true; @@ -131,13 +131,13 @@ bool ElementInfoWidget::setLiveEdit(bool live_edit) } /** - * @brief ElementInfoWidget::event - * Reimplemented from QWidget::event - * Only give focus to the first line edit at first activation. - * After send the event to QWidget. - * @param event - * @return - */ + @brief ElementInfoWidget::event + Reimplemented from QWidget::event + Only give focus to the first line edit at first activation. + After send the event to QWidget. + @param event + @return +*/ bool ElementInfoWidget::event(QEvent *event) { if (m_first_activation) @@ -152,9 +152,9 @@ bool ElementInfoWidget::event(QEvent *event) } /** - * @brief ElementInfoWidget::enableLiveEdit - * Enable the live edit mode - */ + @brief ElementInfoWidget::enableLiveEdit + Enable the live edit mode +*/ void ElementInfoWidget::enableLiveEdit() { for (ElementInfoPartWidget *eipw : m_eipw_list) @@ -162,9 +162,9 @@ void ElementInfoWidget::enableLiveEdit() } /** - * @brief ElementInfoWidget::disableLiveEdit - * disable the live edit mode - */ + @brief ElementInfoWidget::disableLiveEdit + disable the live edit mode +*/ void ElementInfoWidget::disableLiveEdit() { for (ElementInfoPartWidget *eipw : m_eipw_list) @@ -172,9 +172,9 @@ void ElementInfoWidget::disableLiveEdit() } /** - * @brief ElementInfoWidget::buildInterface - * Build the widget - */ + @brief ElementInfoWidget::buildInterface + Build the widget +*/ void ElementInfoWidget::buildInterface() { foreach (QString str, QETApp::elementInfoKeys()) @@ -187,10 +187,10 @@ void ElementInfoWidget::buildInterface() } /** - * @brief ElementInfoWidget::infoPartWidgetForKey - * @param key - * @return the ElementInfoPartWidget with key @key, if not found return nullptr; - */ + @brief ElementInfoWidget::infoPartWidgetForKey + @param key + @return the ElementInfoPartWidget with key @key, if not found return nullptr; +*/ ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &key) const { foreach (ElementInfoPartWidget *eipw, m_eipw_list) @@ -203,10 +203,10 @@ ElementInfoPartWidget *ElementInfoWidget::infoPartWidgetForKey(const QString &ke } /** - * @brief ElementInfoWidget::updateUi - * fill information fetch in m_element_info to the - * corresponding line edit - */ + @brief ElementInfoWidget::updateUi + fill information fetch in m_element_info to the + corresponding line edit +*/ void ElementInfoWidget::updateUi() { //We disable live edit to avoid wrong undo when we fill the line edit with new text @@ -224,9 +224,9 @@ void ElementInfoWidget::updateUi() } /** - * @brief ElementInfoWidget::currentInfo - * @return the info currently edited - */ + @brief ElementInfoWidget::currentInfo + @return the info currently edited +*/ DiagramContext ElementInfoWidget::currentInfo() const { DiagramContext info_; @@ -249,18 +249,18 @@ DiagramContext ElementInfoWidget::currentInfo() const } /** - * @brief ElementInfoWidget::firstActivated - * Slot activated when this widget is show. - * Set the focus to the first line edit provided by this widget - */ + @brief ElementInfoWidget::firstActivated + Slot activated when this widget is show. + Set the focus to the first line edit provided by this widget +*/ void ElementInfoWidget::firstActivated() { m_eipw_list.first() -> setFocusTolineEdit(); } /** - * @brief ElementInfoWidget::elementInfoChange - * This slot is called when m_element::elementInformation change. - */ + @brief ElementInfoWidget::elementInfoChange + This slot is called when m_element::elementInformation change. +*/ void ElementInfoWidget::elementInfoChange() { if(currentInfo() != m_element->elementInformations()) diff --git a/sources/ui/elementinfowidget.h b/sources/ui/elementinfowidget.h index 9b4145f66..b0316cde1 100644 --- a/sources/ui/elementinfowidget.h +++ b/sources/ui/elementinfowidget.h @@ -32,9 +32,9 @@ namespace Ui { } /** - * @brief The ElementInfoWidget class - * this class is a widget to edit an element informations. - */ + @brief The ElementInfoWidget class + this class is a widget to edit an element informations. +*/ class ElementInfoWidget : public AbstractElementPropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 08e60806e..1e8dd26af 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -32,11 +32,11 @@ #include /** - * @brief ElementPropertiesWidget::ElementPropertiesWidget - * Default constructor - * @param elmt - * @param parent - */ + @brief ElementPropertiesWidget::ElementPropertiesWidget + Default constructor + @param elmt + @param parent +*/ ElementPropertiesWidget::ElementPropertiesWidget(Element *elmt, QWidget *parent) : AbstractElementPropertiesEditorWidget (parent), m_diagram (elmt->diagram()), @@ -48,13 +48,13 @@ ElementPropertiesWidget::ElementPropertiesWidget(Element *elmt, QWidget *parent) } /** - * @brief ElementPropertiesWidget::ElementPropertiesWidget - * Same as default constructor, the edited element, is the parent element of @text. - * The only difference with default constructor, is that the current tab is the tab for dynamic texts, - * and the item in the tree that represent @text is expanded and selected. - * @param text - * @param parent - */ + @brief ElementPropertiesWidget::ElementPropertiesWidget + Same as default constructor, the edited element, is the parent element of @text. + The only difference with default constructor, is that the current tab is the tab for dynamic texts, + and the item in the tree that represent @text is expanded and selected. + @param text + @param parent +*/ ElementPropertiesWidget::ElementPropertiesWidget(DynamicElementTextItem *text, QWidget *parent) : AbstractElementPropertiesEditorWidget (parent), m_tab (nullptr), @@ -69,13 +69,13 @@ ElementPropertiesWidget::ElementPropertiesWidget(DynamicElementTextItem *text, Q } /** - * @brief ElementPropertiesWidget::ElementPropertiesWidget - * Same as default constructor, the edited element, is the parent element of @group. - * The only difference with default constructor, is that the current tab is the tab for dynamic texts, - * and the item in the tree that represent @group is expanded and selected. - * @param group - * @param parent - */ + @brief ElementPropertiesWidget::ElementPropertiesWidget + Same as default constructor, the edited element, is the parent element of @group. + The only difference with default constructor, is that the current tab is the tab for dynamic texts, + and the item in the tree that represent @group is expanded and selected. + @param group + @param parent +*/ ElementPropertiesWidget::ElementPropertiesWidget(ElementTextItemGroup *group, QWidget *parent) : AbstractElementPropertiesEditorWidget (parent), m_tab (nullptr), @@ -91,10 +91,10 @@ ElementPropertiesWidget::ElementPropertiesWidget(ElementTextItemGroup *group, QW } /** - * @brief ElementPropertiesWidget::setElement - * Set @element to be the edited element - * @param element - */ + @brief ElementPropertiesWidget::setElement + Set @element to be the edited element + @param element +*/ void ElementPropertiesWidget::setElement(Element *element) { if (m_element == element) return; @@ -118,11 +118,11 @@ void ElementPropertiesWidget::setElement(Element *element) } /** - * @brief ElementPropertiesWidget::setDynamicText - * convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @text. - * Set the dynamics text tab as current tab, expand and select the item that represent @text - * @param text - */ + @brief ElementPropertiesWidget::setDynamicText + convenience function: same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @text. + Set the dynamics text tab as current tab, expand and select the item that represent @text + @param text +*/ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text) { if(text->parentElement()) @@ -141,11 +141,11 @@ void ElementPropertiesWidget::setDynamicText(DynamicElementTextItem *text) } /** - * @brief ElementPropertiesWidget::setTextsGroup - * Conveniance function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @group. - * Set the dynamics text tab as current tab, expand and select the item that represent @group - * @param group - */ + @brief ElementPropertiesWidget::setTextsGroup + Conveniance function : same as call : ElementPropertiesWidget::setElement, with parameter the parent element of @group. + Set the dynamics text tab as current tab, expand and select the item that represent @group + @param group +*/ void ElementPropertiesWidget::setTextsGroup(ElementTextItemGroup *group) { if(group->parentItem() && group->parentItem()->type() == Element::Type) @@ -164,10 +164,10 @@ void ElementPropertiesWidget::setTextsGroup(ElementTextItemGroup *group) } /** - * @brief ElementPropertiesWidget::apply - * Apply the new properties by pushing an undo command - * to the parent project's undo stack of element - */ + @brief ElementPropertiesWidget::apply + Apply the new properties by pushing an undo command + to the parent project's undo stack of element +*/ void ElementPropertiesWidget::apply() { QList undo_list; @@ -191,9 +191,9 @@ void ElementPropertiesWidget::apply() } /** - * @brief ElementPropertiesWidget::reset - * Reset the edited properties - */ + @brief ElementPropertiesWidget::reset + Reset the edited properties +*/ void ElementPropertiesWidget::reset() { foreach (PropertiesEditorWidget *pew, m_list_editor) pew->reset(); } @@ -210,9 +210,9 @@ bool ElementPropertiesWidget::setLiveEdit(bool live_edit) } /** - * @brief ElementPropertiesWidget::findInPanel - * If m_element is a custom element, emit findElementRequired - */ + @brief ElementPropertiesWidget::findInPanel + If m_element is a custom element, emit findElementRequired +*/ void ElementPropertiesWidget::findInPanel() { if (m_element && m_diagram) @@ -223,9 +223,9 @@ void ElementPropertiesWidget::findInPanel() } /** - * @brief ElementPropertiesWidget::editElement - * If m_element is a custom element, emit findElementRequired and editElementRequired - */ + @brief ElementPropertiesWidget::editElement + If m_element is a custom element, emit findElementRequired and editElementRequired +*/ void ElementPropertiesWidget::editElement() { if (m_element && m_diagram) @@ -237,9 +237,9 @@ void ElementPropertiesWidget::editElement() } /** - * @brief ElementPropertiesWidget::build - * Build the content of this widget - */ + @brief ElementPropertiesWidget::build + Build the content of this widget +*/ void ElementPropertiesWidget::buildGui() { m_tab = new QTabWidget(this); @@ -249,9 +249,9 @@ void ElementPropertiesWidget::buildGui() } /** - * @brief ElementPropertiesWidget::updateUi - * Update the content of this widget - */ + @brief ElementPropertiesWidget::updateUi + Update the content of this widget +*/ void ElementPropertiesWidget::updateUi() { //We keep the current title of the tab, to return to the same tab @@ -317,9 +317,9 @@ void ElementPropertiesWidget::updateUi() } /** - * @brief ElementPropertiesWidget::addGeneralWidget - * Add or update the general widget on this tab widget - */ + @brief ElementPropertiesWidget::addGeneralWidget + Add or update the general widget on this tab widget +*/ void ElementPropertiesWidget::addGeneralWidget() { int index = m_tab->currentIndex(); @@ -334,9 +334,9 @@ void ElementPropertiesWidget::addGeneralWidget() } /** - * @brief ElementPropertiesWidget::generalWidget - * @return build and return the "general" widget - */ + @brief ElementPropertiesWidget::generalWidget + @return build and return the "general" widget +*/ QWidget *ElementPropertiesWidget::generalWidget() { QString description_string(tr("Élement\n")); diff --git a/sources/ui/imagepropertieswidget.cpp b/sources/ui/imagepropertieswidget.cpp index 8cdfe3d4d..239e1e1f9 100644 --- a/sources/ui/imagepropertieswidget.cpp +++ b/sources/ui/imagepropertieswidget.cpp @@ -22,11 +22,11 @@ #include "QPropertyUndoCommand/qpropertyundocommand.h" /** - * @brief ImagePropertiesWidget::ImagePropertiesWidget - * Constructor - * @param image : image to edit properties - * @param parent : parent widget - */ + @brief ImagePropertiesWidget::ImagePropertiesWidget + Constructor + @param image : image to edit properties + @param parent : parent widget +*/ ImagePropertiesWidget::ImagePropertiesWidget(DiagramImageItem *image, QWidget *parent) : PropertiesEditorWidget(parent), ui(new Ui::ImagePropertiesWidget), @@ -38,18 +38,18 @@ ImagePropertiesWidget::ImagePropertiesWidget(DiagramImageItem *image, QWidget *p } /** - * @brief ImagePropertiesWidget::~ImagePropertiesWidget - * Destructor - */ + @brief ImagePropertiesWidget::~ImagePropertiesWidget + Destructor +*/ ImagePropertiesWidget::~ImagePropertiesWidget() { delete ui; } /** - * @brief ImagePropertiesWidget::setImageItem - * Set the image to edit properties - * @param image : image to edit - */ + @brief ImagePropertiesWidget::setImageItem + Set the image to edit properties + @param image : image to edit +*/ void ImagePropertiesWidget::setImageItem(DiagramImageItem *image) { if(!image) return; @@ -66,9 +66,9 @@ void ImagePropertiesWidget::setImageItem(DiagramImageItem *image) } /** - * @brief ImagePropertiesWidget::apply - * Apply the change - */ + @brief ImagePropertiesWidget::apply + Apply the change +*/ void ImagePropertiesWidget::apply() { if(!m_image) return; @@ -88,9 +88,9 @@ void ImagePropertiesWidget::apply() } /** - * @brief ImagePropertiesWidget::reset - * Reset the change - */ + @brief ImagePropertiesWidget::reset + Reset the change +*/ void ImagePropertiesWidget::reset() { if(!m_image) return; @@ -101,11 +101,11 @@ void ImagePropertiesWidget::reset() } /** - * @brief ImagePropertiesWidget::setLiveEdit - * @param live_edit true -> enable live edit + @brief ImagePropertiesWidget::setLiveEdit + @param live_edit true -> enable live edit * false -> disable live edit - * @return always true - */ + @return always true +*/ bool ImagePropertiesWidget::setLiveEdit(bool live_edit) { if (m_live_edit == live_edit) return true; @@ -126,10 +126,10 @@ bool ImagePropertiesWidget::setLiveEdit(bool live_edit) } /** - * @brief ImagePropertiesWidget::associatedUndo - * @return the change in an undo command (ItemResizerCommand). - * If there is no change return nullptr - */ + @brief ImagePropertiesWidget::associatedUndo + @return the change in an undo command (ItemResizerCommand). + If there is no change return nullptr +*/ QUndoCommand* ImagePropertiesWidget::associatedUndo() const { @@ -143,9 +143,9 @@ QUndoCommand* ImagePropertiesWidget::associatedUndo() const } /** - * @brief ImagePropertiesWidget::updateUi - * Udpdate the ui, notably when the image to edit change - */ + @brief ImagePropertiesWidget::updateUi + Udpdate the ui, notably when the image to edit change +*/ void ImagePropertiesWidget::updateUi() { if (!m_image) return; @@ -154,10 +154,10 @@ void ImagePropertiesWidget::updateUi() } /** - * @brief ImagePropertiesWidget::on_m_scale_slider_valueChanged - * Update the size of image when move slider. - * @param value - */ + @brief ImagePropertiesWidget::on_m_scale_slider_valueChanged + Update the size of image when move slider. + @param value +*/ void ImagePropertiesWidget::on_m_scale_slider_valueChanged(int value) { qreal scale = value; @@ -165,9 +165,9 @@ void ImagePropertiesWidget::on_m_scale_slider_valueChanged(int value) } /** - * @brief ImagePropertiesWidget::on_m_lock_pos_cb_clicked - * Set movable or not the image according to corresponding check box - */ + @brief ImagePropertiesWidget::on_m_lock_pos_cb_clicked + Set movable or not the image according to corresponding check box +*/ void ImagePropertiesWidget::on_m_lock_pos_cb_clicked() { m_image->setMovable(!ui->m_lock_pos_cb->isChecked()); } diff --git a/sources/ui/imagepropertieswidget.h b/sources/ui/imagepropertieswidget.h index 2eb3d9d74..7529fd583 100644 --- a/sources/ui/imagepropertieswidget.h +++ b/sources/ui/imagepropertieswidget.h @@ -27,9 +27,9 @@ namespace Ui { } /** - * @brief The ImagePropertiesWidget class - * This class provide a widget to edit the propertie of a DiagramImageItem - */ + @brief The ImagePropertiesWidget class + This class provide a widget to edit the propertie of a DiagramImageItem +*/ class ImagePropertiesWidget : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/importelementtextpatterndialog.cpp b/sources/ui/importelementtextpatterndialog.cpp index df6ea04d6..95b5049f2 100644 --- a/sources/ui/importelementtextpatterndialog.cpp +++ b/sources/ui/importelementtextpatterndialog.cpp @@ -30,16 +30,16 @@ ImportElementTextPatternDialog::~ImportElementTextPatternDialog() } /** - * @brief ImportElementTextPatternDialog::getItem - * For all arguments see QInputDialog::getItem, except for erase, they store the state of the check box. - * @param parent - * @param title - * @param label - * @param items - * @param ok - * @param erase - * @return - */ + @brief ImportElementTextPatternDialog::getItem + For all arguments see QInputDialog::getItem, except for erase, they store the state of the check box. + @param parent + @param title + @param label + @param items + @param ok + @param erase + @return +*/ QString ImportElementTextPatternDialog::getItem(QWidget *parent, const QString &title, const QString &label, const QStringList &items, bool *ok, bool *erase) { QString text(items.value(0)); diff --git a/sources/ui/importelementtextpatterndialog.h b/sources/ui/importelementtextpatterndialog.h index 9fc769db4..2c1053f4b 100644 --- a/sources/ui/importelementtextpatterndialog.h +++ b/sources/ui/importelementtextpatterndialog.h @@ -25,11 +25,11 @@ namespace Ui { } /** - * @brief The ImportElementTextPatternDialog class - * A dialog use for ask user to select a element text pattern. - * This dialog is highly inspired from QInputDialog::getItem. - * In fact this the same + a check box. - */ + @brief The ImportElementTextPatternDialog class + A dialog use for ask user to select a element text pattern. + This dialog is highly inspired from QInputDialog::getItem. + In fact this the same + a check box. +*/ class ImportElementTextPatternDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/inditextpropertieswidget.cpp b/sources/ui/inditextpropertieswidget.cpp index b87ea3625..8afb321ef 100644 --- a/sources/ui/inditextpropertieswidget.cpp +++ b/sources/ui/inditextpropertieswidget.cpp @@ -25,10 +25,10 @@ #include /** - * @brief IndiTextPropertiesWidget::IndiTextPropertiesWidget - * @param text : the text to edit - * @param parent : the parent widget of this widget - */ + @brief IndiTextPropertiesWidget::IndiTextPropertiesWidget + @param text : the text to edit + @param parent : the parent widget of this widget +*/ IndiTextPropertiesWidget::IndiTextPropertiesWidget(IndependentTextItem *text, QWidget *parent) : PropertiesEditorWidget(parent), ui(new Ui::IndiTextPropertiesWidget) @@ -40,10 +40,10 @@ IndiTextPropertiesWidget::IndiTextPropertiesWidget(IndependentTextItem *text, QW } /** - * @brief IndiTextPropertiesWidget::IndiTextPropertiesWidget - * @param text_list : a list of texts to edit - * @param parent : the parent widget of this widget - */ + @brief IndiTextPropertiesWidget::IndiTextPropertiesWidget + @param text_list : a list of texts to edit + @param parent : the parent widget of this widget +*/ IndiTextPropertiesWidget::IndiTextPropertiesWidget(QList text_list, QWidget *parent) : PropertiesEditorWidget (parent), ui(new Ui::IndiTextPropertiesWidget) @@ -53,16 +53,16 @@ IndiTextPropertiesWidget::IndiTextPropertiesWidget(QList } /** - * @brief IndiTextPropertiesWidget::~IndiTextPropertiesWidget - */ + @brief IndiTextPropertiesWidget::~IndiTextPropertiesWidget +*/ IndiTextPropertiesWidget::~IndiTextPropertiesWidget() { delete ui; } /** - * @brief IndiTextPropertiesWidget::setText - * @param text : set @text as edited text - */ + @brief IndiTextPropertiesWidget::setText + @param text : set @text as edited text +*/ void IndiTextPropertiesWidget::setText(IndependentTextItem *text) { if (m_text) { @@ -109,10 +109,10 @@ void IndiTextPropertiesWidget::setText(QList text_list) } /** - * @brief IndiTextPropertiesWidget::apply - * Apply the current edition through a QUndoCommand pushed - * to the undo stack of text's diagram. - */ + @brief IndiTextPropertiesWidget::apply + Apply the current edition through a QUndoCommand pushed + to the undo stack of text's diagram. +*/ void IndiTextPropertiesWidget::apply() { Diagram *d = nullptr; @@ -138,10 +138,10 @@ void IndiTextPropertiesWidget::apply() } /** - * @brief IndiTextPropertiesWidget::setLiveEdit - * @param live_edit - * @return - */ + @brief IndiTextPropertiesWidget::setLiveEdit + @param live_edit + @return +*/ bool IndiTextPropertiesWidget::setLiveEdit(bool live_edit) { if (m_live_edit == live_edit) { @@ -162,9 +162,9 @@ bool IndiTextPropertiesWidget::setLiveEdit(bool live_edit) } /** - * @brief IndiTextPropertiesWidget::associatedUndo - * @return - */ + @brief IndiTextPropertiesWidget::associatedUndo + @return +*/ QUndoCommand *IndiTextPropertiesWidget::associatedUndo() const { if (m_live_edit) @@ -314,9 +314,9 @@ QUndoCommand *IndiTextPropertiesWidget::associatedUndo() const } /** - * @brief IndiTextPropertiesWidget::setUpEditConnection - * Disconnect the previous connection, and reconnect the connection between the editors widgets and void IndiTextPropertiesWidget::apply function - */ + @brief IndiTextPropertiesWidget::setUpEditConnection + Disconnect the previous connection, and reconnect the connection between the editors widgets and void IndiTextPropertiesWidget::apply function +*/ void IndiTextPropertiesWidget::setUpEditConnection() { for (QMetaObject::Connection c : m_edit_connection) { @@ -339,8 +339,8 @@ void IndiTextPropertiesWidget::setUpEditConnection() } /** - * @brief IndiTextPropertiesWidget::updateUi - */ + @brief IndiTextPropertiesWidget::updateUi +*/ void IndiTextPropertiesWidget::updateUi() { if (!m_text && m_text_list.isEmpty()) { @@ -417,8 +417,8 @@ void IndiTextPropertiesWidget::updateUi() } /** - * @brief IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked - */ + @brief IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked +*/ void IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked() { if (m_text) { m_text->edit(); diff --git a/sources/ui/inditextpropertieswidget.h b/sources/ui/inditextpropertieswidget.h index 1012fafed..ab5a77329 100644 --- a/sources/ui/inditextpropertieswidget.h +++ b/sources/ui/inditextpropertieswidget.h @@ -27,9 +27,9 @@ namespace Ui { } /** - * @brief The IndiTextPropertiesWidget class - * This widget is used to edit the properties of one or several independent text item - */ + @brief The IndiTextPropertiesWidget class + This widget is used to edit the properties of one or several independent text item +*/ class IndiTextPropertiesWidget : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/linksingleelementwidget.cpp b/sources/ui/linksingleelementwidget.cpp index 26b1e1484..f95e52a47 100644 --- a/sources/ui/linksingleelementwidget.cpp +++ b/sources/ui/linksingleelementwidget.cpp @@ -26,13 +26,13 @@ #include /** - * @brief LinkSingleElementWidget::LinkSingleElementWidget - * Default constructor - * @param elmt - * the edited element - * @param parent - * the parent widget - */ + @brief LinkSingleElementWidget::LinkSingleElementWidget + Default constructor + @param elmt + the edited element + @param parent + the parent widget +*/ LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) : AbstractElementPropertiesEditorWidget(parent), ui(new Ui::LinkSingleElementWidget) @@ -75,9 +75,9 @@ LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) } /** - * @brief LinkSingleElementWidget::~LinkSingleElementWidget - * Default destructor - */ + @brief LinkSingleElementWidget::~LinkSingleElementWidget + Default destructor +*/ LinkSingleElementWidget::~LinkSingleElementWidget() { if(m_showed_element) @@ -93,10 +93,10 @@ LinkSingleElementWidget::~LinkSingleElementWidget() } /** - * @brief LinkSingleElementWidget::setElement - * Set element to be the edited element. - * @param element - */ + @brief LinkSingleElementWidget::setElement + Set element to be the edited element. + @param element +*/ void LinkSingleElementWidget::setElement(Element *element) { if (m_element == element) @@ -135,10 +135,10 @@ void LinkSingleElementWidget::setElement(Element *element) } /** - * @brief LinkSingleElementWidget::apply - * Apply the new property of the edited element by pushing - * the associated undo command to parent project undo stack - */ + @brief LinkSingleElementWidget::apply + Apply the new property of the edited element by pushing + the associated undo command to parent project undo stack +*/ void LinkSingleElementWidget::apply() { QUndoCommand *undo = associatedUndo(); @@ -151,10 +151,10 @@ void LinkSingleElementWidget::apply() } /** - * @brief LinkSingleElementWidget::associatedUndo - * @return the undo command associated to the current edition - * if there isn't change, return nulptr - */ + @brief LinkSingleElementWidget::associatedUndo + @return the undo command associated to the current edition + if there isn't change, return nulptr +*/ QUndoCommand *LinkSingleElementWidget::associatedUndo() const { LinkElementCommand *undo = new LinkElementCommand(m_element); @@ -173,9 +173,9 @@ QUndoCommand *LinkSingleElementWidget::associatedUndo() const } /** - * @brief LinkSingleElementWidget::title - * @return the title used for this editor - */ + @brief LinkSingleElementWidget::title + @return the title used for this editor +*/ QString LinkSingleElementWidget::title() const { if (m_element->linkType() & Element::AllReport) @@ -185,9 +185,9 @@ QString LinkSingleElementWidget::title() const } /** - * @brief LinkSingleElementWidget::updateUi - * Update the content of this widget - */ + @brief LinkSingleElementWidget::updateUi + Update the content of this widget +*/ void LinkSingleElementWidget::updateUi() { m_unlink = false; @@ -202,9 +202,9 @@ void LinkSingleElementWidget::updateUi() } /** - * @brief LinkSingleElementWidget::buildTree - * Build the content of the QTreeWidget - */ + @brief LinkSingleElementWidget::buildTree + Build the content of the QTreeWidget +*/ void LinkSingleElementWidget::buildTree() { clearTreeWidget(); @@ -324,10 +324,10 @@ void LinkSingleElementWidget::buildTree() } /** - * @brief LinkSingleElementWidget::setLiveEdit - * @param live_edit - * @return - */ + @brief LinkSingleElementWidget::setLiveEdit + @param live_edit + @return +*/ bool LinkSingleElementWidget::setLiveEdit(bool live_edit) { if (m_live_edit == live_edit) @@ -339,11 +339,11 @@ bool LinkSingleElementWidget::setLiveEdit(bool live_edit) } /** - * @brief LinkSingleElementWidget::availableElements - * @return A QList with all available element - * to be linked with the edited element. - * This methode take care of the combo box "find in diagram" - */ + @brief LinkSingleElementWidget::availableElements + @return A QList with all available element + to be linked with the edited element. + This methode take care of the combo box "find in diagram" +*/ QList LinkSingleElementWidget::availableElements() { QList elmt_list; @@ -366,9 +366,9 @@ QList LinkSingleElementWidget::availableElements() } /** - * @brief LinkSingleElementWidget::setUpCompleter - * Setup the completer of search_field - */ + @brief LinkSingleElementWidget::setUpCompleter + Setup the completer of search_field +*/ void LinkSingleElementWidget::setUpCompleter() { ui->m_search_field->clear(); @@ -385,11 +385,11 @@ void LinkSingleElementWidget::setUpCompleter() } /** - * @brief LinkSingleElementWidget::clearTreeWidget - * Clear the tree widget. - * Delete all QTreeWidget (in the tree widget and in the hash). - * Clear the hash. - */ + @brief LinkSingleElementWidget::clearTreeWidget + Clear the tree widget. + Delete all QTreeWidget (in the tree widget and in the hash). + Clear the hash. +*/ void LinkSingleElementWidget::clearTreeWidget() { while(ui->m_tree_widget->topLevelItemCount()) @@ -439,10 +439,10 @@ void LinkSingleElementWidget::setUpHeaderLabels() } /** - * @brief LinkSingleElementWidget::diagramWasRemovedFromProject - * * This slot is called when a diagram is removed from the parent project of edited element - * to update the content of this widget - */ + @brief LinkSingleElementWidget::diagramWasRemovedFromProject + * This slot is called when a diagram is removed from the parent project of edited element + to update the content of this widget +*/ void LinkSingleElementWidget::diagramWasRemovedFromProject() { //We use a timer because if the removed diagram contain the master element linked to the edited element @@ -456,9 +456,9 @@ void LinkSingleElementWidget::showedElementWasDeleted() } /** - * @brief LinkSingleElementWidget::linkTriggered - * Action linkis triggered - */ + @brief LinkSingleElementWidget::linkTriggered + Action linkis triggered +*/ void LinkSingleElementWidget::linkTriggered() { if(!m_qtwi_at_context_menu) @@ -493,9 +493,9 @@ void LinkSingleElementWidget::linkTriggered() } /** - * @brief LinkSingleElementWidget::hideButtons - * Hide the button displayed when element is already linked - */ + @brief LinkSingleElementWidget::hideButtons + Hide the button displayed when element is already linked +*/ void LinkSingleElementWidget::hideButtons() { ui->m_label->hide(); @@ -506,9 +506,9 @@ void LinkSingleElementWidget::hideButtons() } /** - * @brief LinkSingleElementWidget::showButtons - * Show the button displayed when element is already linked - */ + @brief LinkSingleElementWidget::showButtons + Show the button displayed when element is already linked +*/ void LinkSingleElementWidget::showButtons() { ui->m_label->show(); @@ -539,11 +539,11 @@ void LinkSingleElementWidget::on_m_unlink_pb_clicked() } /** - * @brief LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked - * Highlight the element represented by @item - * @param item - * @param column - */ + @brief LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked + Highlight the element represented by @item + @param item + @param column +*/ void LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column) { Q_UNUSED(column); @@ -599,11 +599,11 @@ void LinkSingleElementWidget::on_m_show_this_pb_clicked() } /** - * @brief LinkSingleElementWidget::on_m_search_field_textEdited - * Search all items which match with @arg1 and shows it, other items is hidden. - * If @arg1 is empty, show all items. - * @param arg1 - */ + @brief LinkSingleElementWidget::on_m_search_field_textEdited + Search all items which match with @arg1 and shows it, other items is hidden. + If @arg1 is empty, show all items. + @param arg1 +*/ void LinkSingleElementWidget::on_m_search_field_textEdited(const QString &arg1) { //Show all items if arg1 is empty, if not hide all items diff --git a/sources/ui/linksingleelementwidget.h b/sources/ui/linksingleelementwidget.h index 6e6e2b70c..d725a84a1 100644 --- a/sources/ui/linksingleelementwidget.h +++ b/sources/ui/linksingleelementwidget.h @@ -29,14 +29,14 @@ namespace Ui { /** * @brief The LinkSingleElementWidget class - * this class provide a widget to select an element to be linked - * to the element given in the constructor. - * The element given in constructor must be linked with only one other element (like report or slave element). - * This widget detect automaticaly the kind of element given in the constructor and - * search all element that can be linked with it. - * If the element is already linked, the widget ask user to unlink. - * This widget embedded the diagram command for undo/redo the action - */ + this class provide a widget to select an element to be linked + to the element given in the constructor. + The element given in constructor must be linked with only one other element (like report or slave element). + This widget detect automaticaly the kind of element given in the constructor and + search all element that can be linked with it. + If the element is already linked, the widget ask user to unlink. + This widget embedded the diagram command for undo/redo the action +*/ class LinkSingleElementWidget : public AbstractElementPropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/marginseditdialog.cpp b/sources/ui/marginseditdialog.cpp index 332f9bbd1..d9e3660b8 100644 --- a/sources/ui/marginseditdialog.cpp +++ b/sources/ui/marginseditdialog.cpp @@ -41,12 +41,12 @@ QMargins MarginsEditDialog::margins() const { } /** - * @brief MarginsEditDialog::getMargins - * @param margins : margins to set by default - * @param accepted : bool to know if dialog is accepted - * @param parent : parent widget. - * @return The a margins with the edited value if dialog is accepted or a default constructed QMargins() if dialog is rejected - */ + @brief MarginsEditDialog::getMargins + @param margins : margins to set by default + @param accepted : bool to know if dialog is accepted + @param parent : parent widget. + @return The a margins with the edited value if dialog is accepted or a default constructed QMargins() if dialog is rejected +*/ QMargins MarginsEditDialog::getMargins(QMargins margins, bool *accepted, QWidget *parent) { QScopedPointer d(new MarginsEditDialog(margins, parent)); diff --git a/sources/ui/marginseditdialog.h b/sources/ui/marginseditdialog.h index 073889746..dc4e82409 100644 --- a/sources/ui/marginseditdialog.h +++ b/sources/ui/marginseditdialog.h @@ -26,9 +26,9 @@ class MarginsEditDialog; } /** - * @brief The MarginsEditDialog class - * A simple dialog to edit QMargins - */ + @brief The MarginsEditDialog class + A simple dialog to edit QMargins +*/ class MarginsEditDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/masterpropertieswidget.cpp b/sources/ui/masterpropertieswidget.cpp index 09f440146..fedadc13c 100644 --- a/sources/ui/masterpropertieswidget.cpp +++ b/sources/ui/masterpropertieswidget.cpp @@ -168,7 +168,7 @@ void MasterPropertiesWidget::setElement(Element *element) pushed to the stack of element project. Return true if link change, else false @note is void no Return ??? - */ +*/ void MasterPropertiesWidget::apply() { if (QUndoCommand *undo = associatedUndo()) m_element -> diagram() -> undoStack().push(undo); diff --git a/sources/ui/masterpropertieswidget.h b/sources/ui/masterpropertieswidget.h index 492c735a9..155019123 100644 --- a/sources/ui/masterpropertieswidget.h +++ b/sources/ui/masterpropertieswidget.h @@ -54,9 +54,9 @@ class MasterPropertiesWidget : public AbstractElementPropertiesEditorWidget void reset() override; QUndoCommand *associatedUndo () const override; /** - * @brief title - * @return QString title - */ + @brief title + @return QString title + */ QString title() const override { return tr("Référence croisée (maître)");} bool setLiveEdit(bool live_edit) override; diff --git a/sources/ui/potentialselectordialog.cpp b/sources/ui/potentialselectordialog.cpp index acabbf4ba..c047477c1 100644 --- a/sources/ui/potentialselectordialog.cpp +++ b/sources/ui/potentialselectordialog.cpp @@ -30,9 +30,9 @@ //### BEGIN PRIVATE CLASS ###// /** - * @brief The NewConductorPotentialSelector class - * Use for get the conductor propertie when two potentials is linked by a conductor - */ + @brief The NewConductorPotentialSelector class + Use for get the conductor propertie when two potentials is linked by a conductor +*/ class NewConductorPotentialSelector : public AbstractPotentialSelector { public: @@ -60,12 +60,12 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector bool isValid() const override {return m_is_valid;} /** - * @brief getPotential - * Get the conductor propertie of the potential at terminal, and the number of wire in this potential. - * @param terminal - * @param properties - * @param number - */ + @brief getPotential + Get the conductor propertie of the potential at terminal, and the number of wire in this potential. + @param terminal + @param properties + @param number + */ void getPotential(Terminal *terminal, autonum::sequentialNumbers &seq_num , int &number, QList &properties_list, QList &c_list) { Conductor *conductor_in_potential = nullptr; @@ -117,9 +117,9 @@ class NewConductorPotentialSelector : public AbstractPotentialSelector }; /** - * @brief The LinkReportPotentialSelector class - * Use for get the conductor propertie when two potentials is linked with a folio report - */ + @brief The LinkReportPotentialSelector class + Use for get the conductor propertie when two potentials is linked with a folio report +*/ class LinkReportPotentialSelector : public AbstractPotentialSelector { public: @@ -215,12 +215,12 @@ ConductorProperties PotentialSelectorDialog::chosenProperties(QListm_conductor_number_1)); @@ -336,9 +336,9 @@ void PotentialSelectorDialog::buildWidget() } /** - * @brief PotentialSelectorDialog::on_buttonBox_accepted - * Action when user click on OK button - */ + @brief PotentialSelectorDialog::on_buttonBox_accepted + Action when user click on OK button +*/ void PotentialSelectorDialog::on_buttonBox_accepted() { if (!m_potential_selector->isValid()) diff --git a/sources/ui/potentialselectordialog.h b/sources/ui/potentialselectordialog.h index e4316a293..9794674d3 100644 --- a/sources/ui/potentialselectordialog.h +++ b/sources/ui/potentialselectordialog.h @@ -43,20 +43,20 @@ namespace Ui { } /** - * @brief The PotentialSelectorDialog class - * This dialog is used when user try to connect two existing potential together. - * The dialog ask to user to make a choice between the properties of the two existing potential, - * to apply it for the new potential. + @brief The PotentialSelectorDialog class + This dialog is used when user try to connect two existing potential together. + The dialog ask to user to make a choice between the properties of the two existing potential, + to apply it for the new potential. * - * Each constructor have a QUndoCommand @parent_undo for parameter - * If @parent_undo isn't null, when user click on OK button, the dialog will use the parent-undo - * as parent of the undo command that describe the changes. - * If @parent_undo is null, the created undo-command is push to the undo stack of the parent diagram of a conductor in potential. - * else we apply the change without a QUndoCommand. - * - * the static function chosenProperties, open a dialog who ask user to make a choice between the given - * properties - */ + Each constructor have a QUndoCommand @parent_undo for parameter + If @parent_undo isn't null, when user click on OK button, the dialog will use the parent-undo + as parent of the undo command that describe the changes. + If @parent_undo is null, the created undo-command is push to the undo stack of the parent diagram of a conductor in potential. + else we apply the change without a QUndoCommand. + + the static function chosenProperties, open a dialog who ask user to make a choice between the given + properties +*/ class PotentialSelectorDialog : public QDialog { Q_OBJECT diff --git a/sources/ui/projectpropertiesdialog.cpp b/sources/ui/projectpropertiesdialog.cpp index 607930850..866f14358 100644 --- a/sources/ui/projectpropertiesdialog.cpp +++ b/sources/ui/projectpropertiesdialog.cpp @@ -22,11 +22,11 @@ #include "configpages.h" /** - * @brief ProjectPropertiesDialog::ProjectPropertiesDialog - * Default constructor - * @param project : project to edit properties - * @param parent : parent widget of this dialog - */ + @brief ProjectPropertiesDialog::ProjectPropertiesDialog + Default constructor + @param project : project to edit properties + @param parent : parent widget of this dialog +*/ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *parent) { NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this); ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project); @@ -43,34 +43,34 @@ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *p } /** - * @brief ProjectPropertiesDialog::~ProjectPropertiesDialog - */ + @brief ProjectPropertiesDialog::~ProjectPropertiesDialog +*/ ProjectPropertiesDialog::~ProjectPropertiesDialog () { delete m_properties_dialog; } /** - * @brief ProjectPropertiesDialog::exec - * execute this dialog. - */ + @brief ProjectPropertiesDialog::exec + execute this dialog. +*/ void ProjectPropertiesDialog::exec() { m_properties_dialog->setWindowModality(Qt::WindowModal); m_properties_dialog -> exec(); } /** - * @brief ProjectPropertiesDialog::setCurrentPage - * Change the current displayed page by p. - * @param p : page to display - */ + @brief ProjectPropertiesDialog::setCurrentPage + Change the current displayed page by p. + @param p : page to display +*/ void ProjectPropertiesDialog::setCurrentPage(ProjectPropertiesDialog::Page p) { m_properties_dialog -> setCurrentPage(static_cast (p)); } /** - * @brief ProjectPropertiesDialog::changeToFolio - * Change the current displayed tab to folio tab. - */ + @brief ProjectPropertiesDialog::changeToFolio + Change the current displayed tab to folio tab. +*/ void ProjectPropertiesDialog::changeToFolio() { ProjectAutoNumConfigPage *autoNumPage = static_cast (m_properties_dialog->pages.at(2)); autoNumPage->changeToTab(3); diff --git a/sources/ui/projectpropertiesdialog.h b/sources/ui/projectpropertiesdialog.h index d38cb5bed..90d7d8e90 100644 --- a/sources/ui/projectpropertiesdialog.h +++ b/sources/ui/projectpropertiesdialog.h @@ -24,9 +24,9 @@ class QWidget; class ConfigDialog; /** - * @brief The ProjectPropertiesDialog class - * this class builds a dialog to edit whole properties of a project - */ + @brief The ProjectPropertiesDialog class + this class builds a dialog to edit whole properties of a project +*/ class ProjectPropertiesDialog : public QObject { public: enum Page { diff --git a/sources/ui/shapegraphicsitempropertieswidget.cpp b/sources/ui/shapegraphicsitempropertieswidget.cpp index 69547d052..e35e2d731 100644 --- a/sources/ui/shapegraphicsitempropertieswidget.cpp +++ b/sources/ui/shapegraphicsitempropertieswidget.cpp @@ -22,11 +22,11 @@ #include "QPropertyUndoCommand/qpropertyundocommand.h" /** - * @brief ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget - * Constructor - * @param item : shape to edit - * @param parent : parent widget - */ + @brief ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget + Constructor + @param item : shape to edit + @param parent : parent widget +*/ ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget(QetShapeItem *item, QWidget *parent) : PropertiesEditorWidget(parent), ui(new Ui::ShapeGraphicsItemPropertiesWidget), @@ -45,19 +45,19 @@ ShapeGraphicsItemPropertiesWidget::ShapeGraphicsItemPropertiesWidget(QList shapes_list) { for (QMetaObject::Connection c : m_connect_list) { @@ -119,10 +119,10 @@ void ShapeGraphicsItemPropertiesWidget::setItems(QList shapes_li } /** - * @brief ShapeGraphicsItemPropertiesWidget::apply - * Apply the current change, by pushing an undo command to the - * undo stack of the shape diagram. - */ + @brief ShapeGraphicsItemPropertiesWidget::apply + Apply the current change, by pushing an undo command to the + undo stack of the shape diagram. +*/ void ShapeGraphicsItemPropertiesWidget::apply() { Diagram *d = nullptr; @@ -151,19 +151,19 @@ void ShapeGraphicsItemPropertiesWidget::apply() } /** - * @brief ShapeGraphicsItemPropertiesWidget::reset - * Reset the change - */ + @brief ShapeGraphicsItemPropertiesWidget::reset + Reset the change +*/ void ShapeGraphicsItemPropertiesWidget::reset() { updateUi(); } /** - * @brief ShapeGraphicsItemPropertiesWidget::associatedUndo - * @return an undo command that represent the change edited by this widget. - * The returned undo command is a QPropertyUndoCommand with the properties "pen". - * If there isn't change, return nullptr - */ + @brief ShapeGraphicsItemPropertiesWidget::associatedUndo + @return an undo command that represent the change edited by this widget. + The returned undo command is a QPropertyUndoCommand with the properties "pen". + If there isn't change, return nullptr +*/ QUndoCommand* ShapeGraphicsItemPropertiesWidget::associatedUndo() const { if (m_live_edit) @@ -357,8 +357,8 @@ QUndoCommand* ShapeGraphicsItemPropertiesWidget::associatedUndo() const } /** - * @brief ShapeGraphicsItemPropertiesWidget::updateUi - */ + @brief ShapeGraphicsItemPropertiesWidget::updateUi +*/ void ShapeGraphicsItemPropertiesWidget::updateUi() { if (!m_shape && m_shapes_list.isEmpty()) { @@ -455,10 +455,10 @@ void ShapeGraphicsItemPropertiesWidget::updateUi() } /** - * @brief ShapeGraphicsItemPropertiesWidget::setLiveEdit - * @param live_edit - * @return always true - */ + @brief ShapeGraphicsItemPropertiesWidget::setLiveEdit + @param live_edit + @return always true +*/ bool ShapeGraphicsItemPropertiesWidget::setLiveEdit(bool live_edit) { if (live_edit == m_live_edit) { @@ -480,9 +480,9 @@ bool ShapeGraphicsItemPropertiesWidget::setLiveEdit(bool live_edit) } /** - * @brief ShapeGraphicsItemPropertiesWidget::setUpEditConnection - * Disconnect the previous connection, and reconnect the connection between the editors widgets and void ShapeGraphicsItemPropertiesWidget::apply function - */ + @brief ShapeGraphicsItemPropertiesWidget::setUpEditConnection + Disconnect the previous connection, and reconnect the connection between the editors widgets and void ShapeGraphicsItemPropertiesWidget::apply function +*/ void ShapeGraphicsItemPropertiesWidget::setUpEditConnection() { for (QMetaObject::Connection c : m_edit_connection) { diff --git a/sources/ui/shapegraphicsitempropertieswidget.h b/sources/ui/shapegraphicsitempropertieswidget.h index f7cedd858..5f7c46617 100644 --- a/sources/ui/shapegraphicsitempropertieswidget.h +++ b/sources/ui/shapegraphicsitempropertieswidget.h @@ -27,9 +27,9 @@ namespace Ui { class QetShapeItem; /** - * @brief The ShapeGraphicsItemPropertiesWidget class - * Provide a widget to edit the properties of a QetShapeItem - */ + @brief The ShapeGraphicsItemPropertiesWidget class + Provide a widget to edit the properties of a QetShapeItem +*/ class ShapeGraphicsItemPropertiesWidget : public PropertiesEditorWidget { Q_OBJECT diff --git a/sources/ui/titleblockpropertieswidget.cpp b/sources/ui/titleblockpropertieswidget.cpp index 0103ace43..da3164c2f 100644 --- a/sources/ui/titleblockpropertieswidget.cpp +++ b/sources/ui/titleblockpropertieswidget.cpp @@ -25,12 +25,12 @@ #include /** - * @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget - * default constructor - * @param titleblock properties to edit - * @param current_date if true, display the radio button "current date" - * @param parent parent widget - */ + @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget + default constructor + @param titleblock properties to edit + @param current_date if true, display the radio button "current date" + @param parent parent widget +*/ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) : QWidget(parent), ui(new Ui::TitleBlockPropertiesWidget) @@ -41,13 +41,13 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockPropertie } /** - * @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget - * default constructor with tempalte list - * @param tbt_collection template list - * @param titleblock properties to edit - * @param current_date if true, display the radio button "current date" - * @param parent parent widget - */ + @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget + default constructor with tempalte list + @param tbt_collection template list + @param titleblock properties to edit + @param current_date if true, display the radio button "current date" + @param parent parent widget +*/ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollection *tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) : QWidget(parent), ui(new Ui::TitleBlockPropertiesWidget) @@ -60,13 +60,13 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollec } /** - * @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget - * Default constructor with several template collection - * @param tbt_collection template list - * @param titleblock properties to edit - * @param current_date if true, display the radio button "current date" - * @param parent parent widget - */ + @brief TitleBlockPropertiesWidget::TitleBlockPropertiesWidget + Default constructor with several template collection + @param tbt_collection template list + @param titleblock properties to edit + @param current_date if true, display the radio button "current date" + @param parent parent widget +*/ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(QList tbt_collection, const TitleBlockProperties &titleblock, bool current_date, QETProject *project, QWidget *parent) : QWidget(parent), ui(new Ui::TitleBlockPropertiesWidget) @@ -80,18 +80,18 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(QList m_title_le -> setText (properties.title); ui -> m_author_le -> setText (properties.author); @@ -146,9 +146,9 @@ void TitleBlockPropertiesWidget::setProperties(const TitleBlockProperties &prope } /** - * @brief TitleBlockPropertiesWidget::properties - * @return the edited properties - */ + @brief TitleBlockPropertiesWidget::properties + @return the edited properties +*/ TitleBlockProperties TitleBlockPropertiesWidget::properties() const { TitleBlockProperties prop; prop.title = ui -> m_title_le -> text(); @@ -187,9 +187,9 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const { } /** - * @brief TitleBlockPropertiesWidget::properties - * @return return properties to enable folio autonum - */ + @brief TitleBlockPropertiesWidget::properties + @return return properties to enable folio autonum +*/ TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(QString autoNum) const { TitleBlockProperties prop; prop.title = ui -> m_title_le -> text(); @@ -242,9 +242,9 @@ TitleBlockTemplateLocation TitleBlockPropertiesWidget::currentTitleBlockLocation } /** - * @brief TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible - * if true, title block template combo box and menu button is visible - */ + @brief TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible + if true, title block template combo box and menu button is visible +*/ void TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible(const bool &visible) { ui -> m_tbt_label -> setVisible(visible); ui -> m_tbt_cb -> setVisible(visible); @@ -252,17 +252,17 @@ void TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible(const bool &visib } /** - * @brief TitleBlockPropertiesWidget::setReadOnly - * if true, this widget is disable - */ + @brief TitleBlockPropertiesWidget::setReadOnly + if true, this widget is disable +*/ void TitleBlockPropertiesWidget::setReadOnly(const bool &ro) { ui->m_tbt_gb->setDisabled(ro); } /** - * @brief TitleBlockPropertiesWidget::currentTitleBlockTemplateName - * @return the current title block name - */ + @brief TitleBlockPropertiesWidget::currentTitleBlockTemplateName + @return the current title block name +*/ QString TitleBlockPropertiesWidget::currentTitleBlockTemplateName() const { int index = ui -> m_tbt_cb -> currentIndex(); if(index != -1) @@ -271,10 +271,10 @@ QString TitleBlockPropertiesWidget::currentTitleBlockTemplateName() const { } /** - * @brief TitleBlockPropertiesWidget::addCollection - * add a collection of title block available in the combo box - * @param tbt_collection - */ + @brief TitleBlockPropertiesWidget::addCollection + add a collection of title block available in the combo box + @param tbt_collection +*/ void TitleBlockPropertiesWidget::addCollection(TitleBlockTemplatesCollection *tbt_collection) { if (!tbt_collection || m_tbt_collection_list.contains(tbt_collection)) return; @@ -282,10 +282,10 @@ void TitleBlockPropertiesWidget::addCollection(TitleBlockTemplatesCollection *tb } /** - * @brief TitleBlockPropertiesWidget::initDialog - * Init this dialog - * @param current_date true for display current date radio button - */ + @brief TitleBlockPropertiesWidget::initDialog + Init this dialog + @param current_date true for display current date radio button +*/ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date, QETProject *project) { m_dcw = new DiagramContextWidget(); ui -> m_tab2_vlayout -> addWidget(m_dcw); @@ -321,12 +321,12 @@ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date, QETProjec } /** - * @brief TitleBlockPropertiesWidget::getIndexFor - * Find the index of the combo box for the title block @tbt_name available on the collection @collection - * @param tbt_name : title block name - * @param collection : title block collection - * @return the index of the title block or -1 if no match - */ + @brief TitleBlockPropertiesWidget::getIndexFor + Find the index of the combo box for the title block @tbt_name available on the collection @collection + @param tbt_name : title block name + @param collection : title block collection + @return the index of the title block or -1 if no match +*/ int TitleBlockPropertiesWidget::getIndexFor(const QString &tbt_name, const QET::QetCollection collection) const { for (int i = 0; im_tbt_cb->count(); i++) { @@ -346,9 +346,9 @@ void TitleBlockPropertiesWidget::duplicateCurrentTitleBlockTemplate() { } /** - * @brief TitleBlockPropertiesWidget::updateTemplateList - * Update the title block template list available in the combo box - */ + @brief TitleBlockPropertiesWidget::updateTemplateList + Update the title block template list available in the combo box +*/ void TitleBlockPropertiesWidget::updateTemplateList() { ui -> m_tbt_cb ->clear(); @@ -386,9 +386,9 @@ void TitleBlockPropertiesWidget::updateTemplateList() } /** - * @brief TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate - * Load the additionnal field of title block "text" - */ + @brief TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate + Load the additionnal field of title block "text" +*/ void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index) { m_dcw -> clear(); @@ -415,17 +415,17 @@ void TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate(int index) } /** - * @brief TitleBlockPropertiesWidget::on_m_date_now_pb_clicked - * Set the date to current date - */ + @brief TitleBlockPropertiesWidget::on_m_date_now_pb_clicked + Set the date to current date +*/ void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() { ui -> m_date_edit -> setDate(QDate::currentDate()); } /** - * @brief TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked - * Open Auto Folio Num dialog - */ + @brief TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked + Open Auto Folio Num dialog +*/ void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() { emit openAutoNumFolioEditor(ui->auto_page_cb->currentText()); if (ui->auto_page_cb->currentText()!=tr("Créer un Folio Numérotation Auto")) diff --git a/sources/ui/xrefpropertieswidget.cpp b/sources/ui/xrefpropertieswidget.cpp index e3f3f6b1f..c0dc80330 100644 --- a/sources/ui/xrefpropertieswidget.cpp +++ b/sources/ui/xrefpropertieswidget.cpp @@ -23,11 +23,11 @@ #include /** - * @brief XRefPropertiesWidget::XRefPropertiesWidget - * Default constructor - * @param properties: properties to use - * @param parent: parent widget - */ + @brief XRefPropertiesWidget::XRefPropertiesWidget + Default constructor + @param properties: properties to use + @param parent: parent widget +*/ XRefPropertiesWidget::XRefPropertiesWidget(QHash properties, QWidget *parent) : QWidget(parent), ui(new Ui::XRefPropertiesWidget), @@ -42,9 +42,9 @@ XRefPropertiesWidget::XRefPropertiesWidget(QHash prope } /** - * @brief XRefPropertiesWidget::~XRefPropertiesWidget - * Default destructor - */ + @brief XRefPropertiesWidget::~XRefPropertiesWidget + Default destructor +*/ XRefPropertiesWidget::~XRefPropertiesWidget() { disconnect(ui->m_display_has_cross_rb, SIGNAL(toggled(bool)), ui->m_cross_properties_gb, SLOT(setEnabled(bool))); @@ -54,10 +54,10 @@ XRefPropertiesWidget::~XRefPropertiesWidget() } /** - * @brief XRefPropertiesWidget::setProperties - * set new properties for this widget - * @param properties - */ + @brief XRefPropertiesWidget::setProperties + set new properties for this widget + @param properties +*/ void XRefPropertiesWidget::setProperties(const QHash &properties) { m_properties = properties; updateDisplay(); @@ -65,19 +65,19 @@ void XRefPropertiesWidget::setProperties(const QHash & } /** - * @brief XRefPropertiesWidget::properties - * @return the properties edited by this widget - */ + @brief XRefPropertiesWidget::properties + @return the properties edited by this widget +*/ QHash XRefPropertiesWidget::properties(){ saveProperties(ui->m_type_cb->currentIndex()); return m_properties; } /** - * @brief XRefPropertiesWidget::setReadOnly - * Set all of this widget disable if true - * @param ro - */ + @brief XRefPropertiesWidget::setReadOnly + Set all of this widget disable if true + @param ro +*/ void XRefPropertiesWidget::setReadOnly(bool ro) { ui->m_type_cb->setDisabled(ro); ui->m_display_gb->setDisabled(ro); @@ -89,9 +89,9 @@ void XRefPropertiesWidget::setReadOnly(bool ro) { } /** - * @brief XRefPropertiesWidget::buildUi - * Build some widget of this ui. - */ + @brief XRefPropertiesWidget::buildUi + Build some widget of this ui. +*/ void XRefPropertiesWidget::buildUi() { ui -> m_type_cb -> addItem(tr("Bobine"), "coil"); @@ -110,10 +110,10 @@ void XRefPropertiesWidget::buildUi() } /** - * @brief XRefPropertiesWidget::saveProperties - * Save the properties of the type define at @index of the combo box m_type_cb - * @param index - */ + @brief XRefPropertiesWidget::saveProperties + Save the properties of the type define at @index of the combo box m_type_cb + @param index +*/ void XRefPropertiesWidget::saveProperties(int index) { QString type = ui->m_type_cb->itemData(index).toString(); XRefProperties xrp = m_properties[type]; @@ -145,9 +145,9 @@ void XRefPropertiesWidget::saveProperties(int index) { } /** - * @brief XRefPropertiesWidget::updateDisplay - * Update display with the curent displayed type. - */ + @brief XRefPropertiesWidget::updateDisplay + Update display with the curent displayed type. +*/ void XRefPropertiesWidget::updateDisplay() { QString type = ui->m_type_cb->itemData(ui->m_type_cb->currentIndex()).toString(); XRefProperties xrp = m_properties[type]; @@ -191,10 +191,10 @@ void XRefPropertiesWidget::updateDisplay() { } /** - * @brief XRefPropertiesWidget::typeChanged - * manage the save of the current properties, - * when the combo box of type change. - */ + @brief XRefPropertiesWidget::typeChanged + manage the save of the current properties, + when the combo box of type change. +*/ void XRefPropertiesWidget::typeChanged() { //save the properties of the previous xref type saveProperties(m_previous_type_index); @@ -206,9 +206,9 @@ void XRefPropertiesWidget::typeChanged() { } /** - * @brief XRefPropertiesWidget::enableOffsetSB - * Enable Offset SB only if Snap to Footer is selected - */ + @brief XRefPropertiesWidget::enableOffsetSB + Enable Offset SB only if Snap to Footer is selected +*/ void XRefPropertiesWidget::enableOffsetSB(int i){ if (i) ui->m_offset_sb->setEnabled(false); diff --git a/sources/ui/xrefpropertieswidget.h b/sources/ui/xrefpropertieswidget.h index 6c33bd9b3..73d33a9e9 100644 --- a/sources/ui/xrefpropertieswidget.h +++ b/sources/ui/xrefpropertieswidget.h @@ -26,9 +26,9 @@ namespace Ui { } /** - * @brief The XRefPropertiesWidget class - * This class provide a widget to edit the XRefProperties - */ + @brief The XRefPropertiesWidget class + This class provide a widget to edit the XRefProperties +*/ class XRefPropertiesWidget : public QWidget { Q_OBJECT diff --git a/sources/undocommand/changeelementinformationcommand.cpp b/sources/undocommand/changeelementinformationcommand.cpp index 930d6cec0..71f890995 100644 --- a/sources/undocommand/changeelementinformationcommand.cpp +++ b/sources/undocommand/changeelementinformationcommand.cpp @@ -21,12 +21,12 @@ #include /** - * @brief ChangeElementInformationCommand::ChangeElementInformationCommand - * Default constructor - * @param elmt : element to change information - * @param old_info : old info of element - * @param new_info : new info of element - */ + @brief ChangeElementInformationCommand::ChangeElementInformationCommand + Default constructor + @param elmt : element to change information + @param old_info : old info of element + @param new_info : new info of element +*/ ChangeElementInformationCommand::ChangeElementInformationCommand(Element *elmt, DiagramContext &old_info, DiagramContext &new_info, QUndoCommand *parent) : QUndoCommand (parent), m_element (elmt), @@ -46,16 +46,16 @@ bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other) } /** - * @brief ChangeElementInformationCommand::undo - */ + @brief ChangeElementInformationCommand::undo +*/ void ChangeElementInformationCommand::undo() { m_element -> setElementInformations(m_old_info); updateProjectDB(); } /** - * @brief ChangeElementInformationCommand::redo - */ + @brief ChangeElementInformationCommand::redo +*/ void ChangeElementInformationCommand::redo() { m_element -> setElementInformations(m_new_info); updateProjectDB(); diff --git a/sources/undocommand/changeelementinformationcommand.h b/sources/undocommand/changeelementinformationcommand.h index 38ef5cdae..654e94bd5 100644 --- a/sources/undocommand/changeelementinformationcommand.h +++ b/sources/undocommand/changeelementinformationcommand.h @@ -24,9 +24,9 @@ class Element; /** - * @brief The ChangeElementInformationCommand class - * This class manage undo/redo to change the element information. - */ + @brief The ChangeElementInformationCommand class + This class manage undo/redo to change the element information. +*/ class ChangeElementInformationCommand : public QUndoCommand { public: diff --git a/sources/undocommand/changetitleblockcommand.cpp b/sources/undocommand/changetitleblockcommand.cpp index ed009032c..5ea323484 100644 --- a/sources/undocommand/changetitleblockcommand.cpp +++ b/sources/undocommand/changetitleblockcommand.cpp @@ -20,12 +20,12 @@ #include "diagram.h" /** - * @brief ChangeTitleBlockCommand::ChangeTitleBlockCommand - * @param d - * @param old_ip - * @param new_ip - * @param parent - */ + @brief ChangeTitleBlockCommand::ChangeTitleBlockCommand + @param d + @param old_ip + @param new_ip + @param parent +*/ ChangeTitleBlockCommand::ChangeTitleBlockCommand( Diagram *d, const TitleBlockProperties &old_ip, diff --git a/sources/undocommand/changetitleblockcommand.h b/sources/undocommand/changetitleblockcommand.h index 6358b78a2..1d33098a6 100644 --- a/sources/undocommand/changetitleblockcommand.h +++ b/sources/undocommand/changetitleblockcommand.h @@ -24,9 +24,9 @@ class Diagram; /** - * @brief The ChangeTitleBlockCommand class - * This command changes the title block properties for a particular diagram. - */ + @brief The ChangeTitleBlockCommand class + This command changes the title block properties for a particular diagram. +*/ class ChangeTitleBlockCommand : public QUndoCommand { public: diff --git a/sources/undocommand/deleteqgraphicsitemcommand.cpp b/sources/undocommand/deleteqgraphicsitemcommand.cpp index aa3173450..17d965fa5 100644 --- a/sources/undocommand/deleteqgraphicsitemcommand.cpp +++ b/sources/undocommand/deleteqgraphicsitemcommand.cpp @@ -29,11 +29,11 @@ #include "qetdiagrameditor.h" /** - * @brief DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand - * @param diagram : deigram where this undo work - * @param content : content to remove - * @param parent : parent undo - */ + @brief DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand + @param diagram : deigram where this undo work + @param content : content to remove + @param parent : parent undo +*/ DeleteQGraphicsItemCommand::DeleteQGraphicsItemCommand(Diagram *diagram, const DiagramContent &content, QUndoCommand *parent) : QUndoCommand(parent), m_removed_contents(content), @@ -107,10 +107,10 @@ DeleteQGraphicsItemCommand::~DeleteQGraphicsItemCommand() { } /** - * @brief DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements - * This function creates new conductors (if needed) for conserve the electrical potentials - * present at the terminals of each removed elements. - */ + @brief DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements + This function creates new conductors (if needed) for conserve the electrical potentials + present at the terminals of each removed elements. +*/ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements() { for (Element *elmt : m_removed_contents.m_elements) @@ -194,14 +194,14 @@ void DeleteQGraphicsItemCommand::setPotentialsOfRemovedElements() } /** - * @brief DeleteQGraphicsItemCommand::terminalInSamePotential - * Return a terminal at the same potential of @terminal, by traveling through the conductors connected to @terminal - * only if the owner element of the terminal is not delete by this undo command. - * Return nullptr if a terminal can't be found. - * @param terminal - terminal from search - * @param conductor_to_exclude - a conductor to exlcude from search. - * @return - */ + @brief DeleteQGraphicsItemCommand::terminalInSamePotential + Return a terminal at the same potential of @terminal, by traveling through the conductors connected to @terminal + only if the owner element of the terminal is not delete by this undo command. + Return nullptr if a terminal can't be found. + @param terminal - terminal from search + @param conductor_to_exclude - a conductor to exlcude from search. + @return +*/ Terminal *DeleteQGraphicsItemCommand::terminalInSamePotential(Terminal *terminal, Conductor *conductor_to_exclude) { QList conductor_list = terminal->conductors(); @@ -227,9 +227,9 @@ Terminal *DeleteQGraphicsItemCommand::terminalInSamePotential(Terminal *terminal } /** - * @brief DeleteQGraphicsItemCommand::undo - * Undo this command - */ + @brief DeleteQGraphicsItemCommand::undo + Undo this command +*/ void DeleteQGraphicsItemCommand::undo() { m_diagram->showMe(); @@ -265,9 +265,9 @@ void DeleteQGraphicsItemCommand::undo() } /** - * @brief DeleteQGraphicsItemCommand::redo - * Redo the delete command - */ + @brief DeleteQGraphicsItemCommand::redo + Redo the delete command +*/ void DeleteQGraphicsItemCommand::redo() { m_diagram -> showMe(); diff --git a/sources/undocommand/itemmodelcommand.cpp b/sources/undocommand/itemmodelcommand.cpp index feb4ec54e..7446d6a9e 100644 --- a/sources/undocommand/itemmodelcommand.cpp +++ b/sources/undocommand/itemmodelcommand.cpp @@ -18,11 +18,11 @@ #include "itemmodelcommand.h" /** - * @brief ModelIndexCommand::ModelIndexCommand - * @param model - * @param index - * @param parent - */ + @brief ModelIndexCommand::ModelIndexCommand + @param model + @param index + @param parent +*/ ModelIndexCommand::ModelIndexCommand(QAbstractItemModel *model, const QModelIndex &index, QUndoCommand *parent): QUndoCommand(parent), m_model(model), @@ -30,10 +30,10 @@ ModelIndexCommand::ModelIndexCommand(QAbstractItemModel *model, const QModelInde {} /** - * @brief ModelIndexCommand::setData - * @param value - * @param role - */ + @brief ModelIndexCommand::setData + @param value + @param role +*/ void ModelIndexCommand::setData(const QVariant &value, int role) { m_new_value = value; @@ -47,9 +47,9 @@ void ModelIndexCommand::setData(const QVariant &value, int role) } /** - * @brief ModelIndexCommand::redo - * Reimplemented from QUndoCommand - */ + @brief ModelIndexCommand::redo + Reimplemented from QUndoCommand +*/ void ModelIndexCommand::redo() { if (m_model && m_index.isValid()) { m_model->setData(m_index, m_new_value, m_role); @@ -57,9 +57,9 @@ void ModelIndexCommand::redo() { } /** - * @brief ModelIndexCommand::undo - * Reimplemented from QUndoCommand - */ + @brief ModelIndexCommand::undo + Reimplemented from QUndoCommand +*/ void ModelIndexCommand::undo() { if (m_model && m_index.isValid()) { m_model->setData(m_index, m_old_value, m_role); @@ -67,23 +67,23 @@ void ModelIndexCommand::undo() { } /** - * @brief ModelHeaderDataCommand::ModelHeaderDataCommand - * @param model - * @param parent - */ + @brief ModelHeaderDataCommand::ModelHeaderDataCommand + @param model + @param parent +*/ ModelHeaderDataCommand::ModelHeaderDataCommand(QAbstractItemModel *model, QUndoCommand *parent) : QUndoCommand(parent), m_model(model) {} /** - * @brief ModelHeaderDataCommand::setData - * See QAbstractItemModel::setHeaderData - * @param section - * @param orientation - * @param value - * @param role - */ + @brief ModelHeaderDataCommand::setData + See QAbstractItemModel::setHeaderData + @param section + @param orientation + @param value + @param role +*/ void ModelHeaderDataCommand::setData(int section, Qt::Orientation orientation, const QVariant &value, int role) { m_section = section; @@ -98,9 +98,9 @@ void ModelHeaderDataCommand::setData(int section, Qt::Orientation orientation, c } /** - * @brief ModelHeaderDataCommand::redo - * Reimplemented from QUndoCommand - */ + @brief ModelHeaderDataCommand::redo + Reimplemented from QUndoCommand +*/ void ModelHeaderDataCommand::redo() { if (m_model) { @@ -109,9 +109,9 @@ void ModelHeaderDataCommand::redo() } /** - * @brief ModelHeaderDataCommand::undo - * Reimplemented from QUndoCommand - */ + @brief ModelHeaderDataCommand::undo + Reimplemented from QUndoCommand +*/ void ModelHeaderDataCommand::undo() { if (m_model) { diff --git a/sources/undocommand/itemmodelcommand.h b/sources/undocommand/itemmodelcommand.h index 4f96c578d..79a92a5cf 100644 --- a/sources/undocommand/itemmodelcommand.h +++ b/sources/undocommand/itemmodelcommand.h @@ -25,9 +25,9 @@ class QAbstractItemModel; /** - * @brief The ModelIndexCommand class - * Change a data of an index of QAbstractItemModel - */ + @brief The ModelIndexCommand class + Change a data of an index of QAbstractItemModel +*/ class ModelIndexCommand : public QUndoCommand { public: @@ -46,9 +46,9 @@ class ModelIndexCommand : public QUndoCommand }; /** - * @brief The ModelHeaderDataCommand class - * Change the data of a header - */ + @brief The ModelHeaderDataCommand class + Change the data of a header +*/ class ModelHeaderDataCommand : public QUndoCommand { public: diff --git a/sources/undocommand/linkelementcommand.cpp b/sources/undocommand/linkelementcommand.cpp index a031f84ad..2cda6265e 100644 --- a/sources/undocommand/linkelementcommand.cpp +++ b/sources/undocommand/linkelementcommand.cpp @@ -23,11 +23,11 @@ #include "potentialselectordialog.h" /** - * @brief LinkElementCommand::LinkElementCommand - * Constructor - * @param element_ : element where we work the link / unlink - * @param parent : parent undo - */ + @brief LinkElementCommand::LinkElementCommand + Constructor + @param element_ : element where we work the link / unlink + @param parent : parent undo +*/ LinkElementCommand::LinkElementCommand(Element *element_, QUndoCommand *parent): QUndoCommand(parent), m_element(element_), @@ -38,10 +38,10 @@ LinkElementCommand::LinkElementCommand(Element *element_, QUndoCommand *parent): } /** - * @brief LinkElementCommand::mergeWith - * @param other try to merge this command with other - * @return true if merge with success else false - */ + @brief LinkElementCommand::mergeWith + @param other try to merge this command with other + @return true if merge with success else false +*/ bool LinkElementCommand::mergeWith(const QUndoCommand *other) { if (id() != other->id() || other->childCount()) return false; @@ -52,17 +52,17 @@ bool LinkElementCommand::mergeWith(const QUndoCommand *other) } /** - * @brief LinkElementCommand::isLinkable - * @param element_a - * @param element_b - * @param already_linked - * @return true if element_a and element_b can be linked between them. - * There is few condition to be linked : - * 1- element_a and element_b must be linkable type. (Ex : A is master and B is slave 'OK', A and B is master 'KO') - * 2- For element type slave and report (no matter if element is 'A' or 'B'), the element must be free (not connected to an element) - * 3- we can override the section 2 by set already_linked to true. In this case, if slave or report is already - * linked to the other element ('A' or 'B') return true, but if linked to another element (not 'A' or 'B') return false - */ + @brief LinkElementCommand::isLinkable + @param element_a + @param element_b + @param already_linked + @return true if element_a and element_b can be linked between them. + There is few condition to be linked : + 1- element_a and element_b must be linkable type. (Ex : A is master and B is slave 'OK', A and B is master 'KO') + 2- For element type slave and report (no matter if element is 'A' or 'B'), the element must be free (not connected to an element) + 3- we can override the section 2 by set already_linked to true. In this case, if slave or report is already + linked to the other element ('A' or 'B') return true, but if linked to another element (not 'A' or 'B') return false +*/ bool LinkElementCommand::isLinkable(Element *element_a, Element *element_b, bool already_linked) { switch(element_a->linkType()) @@ -124,11 +124,11 @@ bool LinkElementCommand::isLinkable(Element *element_a, Element *element_b, bool } /** - * @brief LinkElementCommand::setLink - * Replace all linked elements of edited element by elements stored in @element_list - * This method do several check to know if element can be linked or not. - * @param element_list - */ + @brief LinkElementCommand::setLink + Replace all linked elements of edited element by elements stored in @element_list + This method do several check to know if element can be linked or not. + @param element_list +*/ void LinkElementCommand::setLink(const QList& element_list) { m_linked_after.clear(); @@ -136,10 +136,10 @@ void LinkElementCommand::setLink(const QList& element_list) } /** - * @brief LinkElementCommand::setLink - * This is an overloaded function. - * @param element_ - */ + @brief LinkElementCommand::setLink + This is an overloaded function. + @param element_ +*/ void LinkElementCommand::setLink(Element *element_) { QList list; @@ -148,10 +148,10 @@ void LinkElementCommand::setLink(Element *element_) } /** - * @brief LinkElementCommand::unlink - * Unlink all elements of element_list from the edited element. - * @param element_list - */ + @brief LinkElementCommand::unlink + Unlink all elements of element_list from the edited element. + @param element_list +*/ void LinkElementCommand::unlink(QList element_list) { foreach(Element *elmt, element_list) @@ -159,17 +159,17 @@ void LinkElementCommand::unlink(QList element_list) } /** - * @brief LinkElementCommand::unlinkAll - * Unlink all element of the edited element - */ + @brief LinkElementCommand::unlinkAll + Unlink all element of the edited element +*/ void LinkElementCommand::unlinkAll() { m_linked_after.clear(); } /** - * @brief LinkElementCommand::undo - * Undo this command - */ + @brief LinkElementCommand::undo + Undo this command +*/ void LinkElementCommand::undo() { if(m_element->diagram()) m_element->diagram()->showMe(); @@ -178,9 +178,9 @@ void LinkElementCommand::undo() } /** - * @brief LinkElementCommand::redo - * Redo this command - */ + @brief LinkElementCommand::redo + Redo this command +*/ void LinkElementCommand::redo() { if(m_element->diagram()) m_element->diagram()->showMe(); @@ -221,13 +221,13 @@ void LinkElementCommand::redo() } /** - * @brief LinkElementCommand::setUpNewLink - * Update the content of m_link_after with the content of @element_list. - * Each linkable element (know via the static method isLinkable) is added to m_linked_after - * @already_link is used for the static method isLinkable. - * @param element_list - * @param already_link - */ + @brief LinkElementCommand::setUpNewLink + Update the content of m_link_after with the content of @element_list. + Each linkable element (know via the static method isLinkable) is added to m_linked_after + @already_link is used for the static method isLinkable. + @param element_list + @param already_link +*/ void LinkElementCommand::setUpNewLink(const QList &element_list, bool already_link) { //m_element is a master we can connect several element to it @@ -252,11 +252,11 @@ void LinkElementCommand::setUpNewLink(const QList &element_list, bool } /** - * @brief LinkElementCommand::makeLink - * Make the link between m_element and element_list; - * This method unlink elements if needed. - * @param element_list - */ + @brief LinkElementCommand::makeLink + Make the link between m_element and element_list; + This method unlink elements if needed. + @param element_list +*/ void LinkElementCommand::makeLink(const QList &element_list) { //List is empty, that mean m_element must be free, so we unlink all elements diff --git a/sources/undocommand/linkelementcommand.h b/sources/undocommand/linkelementcommand.h index 67410e826..31b1bd623 100644 --- a/sources/undocommand/linkelementcommand.h +++ b/sources/undocommand/linkelementcommand.h @@ -23,11 +23,11 @@ class Element; /** - * @brief The LinkElementCommand class - * This undo class manage link between elements. - * In the same instance of this class, we can link and unlink elements from an edited element - * This undo class support the merge. - */ + @brief The LinkElementCommand class + This undo class manage link between elements. + In the same instance of this class, we can link and unlink elements from an edited element + This undo class support the merge. +*/ class LinkElementCommand : public QUndoCommand { public: diff --git a/sources/undocommand/rotateselectioncommand.cpp b/sources/undocommand/rotateselectioncommand.cpp index 435553935..2a66cecd9 100644 --- a/sources/undocommand/rotateselectioncommand.cpp +++ b/sources/undocommand/rotateselectioncommand.cpp @@ -80,8 +80,8 @@ m_diagram(diagram) } /** - * @brief RotateSelectionCommand::undo - */ + @brief RotateSelectionCommand::undo +*/ void RotateSelectionCommand::undo() { m_diagram->showMe(); @@ -96,8 +96,8 @@ void RotateSelectionCommand::undo() } /** - * @brief RotateSelectionCommand::redo - */ + @brief RotateSelectionCommand::redo +*/ void RotateSelectionCommand::redo() { m_diagram->showMe(); @@ -111,9 +111,9 @@ void RotateSelectionCommand::redo() } /** - * @brief RotateSelectionCommand::isValid - * @return true if this command rotate a least one item. - */ + @brief RotateSelectionCommand::isValid + @return true if this command rotate a least one item. +*/ bool RotateSelectionCommand::isValid() { if(childCount()) diff --git a/sources/undocommand/rotateselectioncommand.h b/sources/undocommand/rotateselectioncommand.h index a9f0a0e30..bdf1d1b76 100644 --- a/sources/undocommand/rotateselectioncommand.h +++ b/sources/undocommand/rotateselectioncommand.h @@ -26,9 +26,9 @@ class ConductorTextItem; class QPropertyUndoCommand; /** - * @brief The RotateSelectionCommand class - * Rotate the selected items in the given diagram - */ + @brief The RotateSelectionCommand class + Rotate the selected items in the given diagram +*/ class RotateSelectionCommand : public QUndoCommand { public: diff --git a/sources/undocommand/rotatetextscommand.cpp b/sources/undocommand/rotatetextscommand.cpp index abe07a0ec..c0e46909e 100644 --- a/sources/undocommand/rotatetextscommand.cpp +++ b/sources/undocommand/rotatetextscommand.cpp @@ -25,11 +25,11 @@ #include "qtextorientationspinboxwidget.h" /** - * @brief RotateTextsCommand::RotateTextsCommand - * @param diagram : Apply the rotation to the selected texts and group of texts - * of diagram at construction time. - * @param parent : undo parent - */ + @brief RotateTextsCommand::RotateTextsCommand + @param diagram : Apply the rotation to the selected texts and group of texts + of diagram at construction time. + @param parent : undo parent +*/ RotateTextsCommand::RotateTextsCommand(Diagram *diagram, QUndoCommand *parent) : QUndoCommand(parent), m_diagram(diagram) diff --git a/sources/undocommand/rotatetextscommand.h b/sources/undocommand/rotatetextscommand.h index dcdc4798c..8ee37f3d3 100644 --- a/sources/undocommand/rotatetextscommand.h +++ b/sources/undocommand/rotatetextscommand.h @@ -26,10 +26,10 @@ class Diagram; class QParallelAnimationGroup; /** - * @brief The RotateTextsCommand class - * Open a dialog for edit the rotation of the current selected texts and texts group in diagram. - * Just instantiate this undo command and push it in a QUndoStack. - */ + @brief The RotateTextsCommand class + Open a dialog for edit the rotation of the current selected texts and texts group in diagram. + Just instantiate this undo command and push it in a QUndoStack. +*/ class RotateTextsCommand : public QUndoCommand { public: diff --git a/sources/utils/conductorcreator.h b/sources/utils/conductorcreator.h index c8f5c27af..02bc5e56b 100644 --- a/sources/utils/conductorcreator.h +++ b/sources/utils/conductorcreator.h @@ -31,10 +31,10 @@ class Conductor; /** - * @brief The ConductorCreator class - * This class create one or several or several conductors - * in a given context - */ + @brief The ConductorCreator class + This class create one or several or several conductors + in a given context +*/ class ConductorCreator { public: From ea9a230844698b9850c1f4428662d2496a3a1c7b Mon Sep 17 00:00:00 2001 From: David Varley Date: Sun, 16 Aug 2020 15:39:20 +1000 Subject: [PATCH 03/24] Fix dxf export for border --- sources/bordertitleblock.cpp | 24 ++++++++++++------------ sources/exportdialog.cpp | 4 +++- sources/titleblocktemplate.cpp | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/sources/bordertitleblock.cpp b/sources/bordertitleblock.cpp index 1a9f9b207..b1000ff09 100644 --- a/sources/bordertitleblock.cpp +++ b/sources/bordertitleblock.cpp @@ -652,11 +652,11 @@ void BorderTitleBlock::drawDxf( if (display_border_ && display_columns_) { for (int i = 1 ; i <= columns_count_ ; ++ i) { - double xCoord = diagram_rect_.topLeft().x() + + double xCoord = diagram_rect_.topLeft().x() * Createdxf::xScale + (rows_header_width_ + ((i - 1) * columns_width_)); double yCoord = Createdxf::sheetHeight - - diagram_rect_.topLeft().y() + - diagram_rect_.topLeft().y()*Createdxf::yScale - columns_header_height_; double recWidth = columns_width_; double recHeight = columns_header_height_; @@ -665,27 +665,27 @@ void BorderTitleBlock::drawDxf( if (settings.value("border-columns_0", true).toBool()){ Createdxf::drawTextAligned(file_path, QString::number(i - 1), - xCoord, - yCoord + recHeight*0.5, + xCoord+recWidth/4, + yCoord + recHeight*0.2, recHeight*0.7, 0, 0, 1, 2, - xCoord+recWidth/2, + xCoord+recWidth/2, color, 0); }else{ Createdxf::drawTextAligned(file_path, QString::number(i), - xCoord, - yCoord + recHeight*0.5, + xCoord+recWidth/4, + yCoord + recHeight*0.2, recHeight*0.7, 0, 0, 1, 2, - xCoord+recWidth/2, + xCoord+recWidth/2, color, 0); } @@ -699,8 +699,8 @@ void BorderTitleBlock::drawDxf( for (int i = 1 ; i <= rows_count_ ; ++ i) { double xCoord = diagram_rect_.topLeft().x() * Createdxf::xScale; - double yCoord = Createdxf::sheetHeight - - diagram_rect_.topLeft().y() + double yCoord = Createdxf::sheetHeight + - diagram_rect_.topLeft().y() *Createdxf::yScale - ( columns_header_height_ @@ -713,8 +713,8 @@ void BorderTitleBlock::drawDxf( recWidth, recHeight, color); Createdxf::drawTextAligned(file_path, row_string, - xCoord, - yCoord + recHeight*0.5, + xCoord+recWidth*0.1, + yCoord + recHeight*0.4, recWidth*0.7, 0, 0, diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index b5db3ccfa..09cfc997e 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -412,7 +412,9 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee //Add project elements (lines, rectangles, circles, texts) to dxf file if (epw -> exportProperties().draw_border) { - Createdxf::drawRectangle(file_path, 0, 0, double(width)*Createdxf::xScale, double(height)*Createdxf::yScale, 0); + double bx0 = Diagram::margin * Createdxf::xScale; + double by0 = Diagram::margin * Createdxf::yScale; + Createdxf::drawRectangle(file_path, bx0, -by0, double(width)*Createdxf::xScale, double(height)*Createdxf::yScale, 0); } diagram -> border_and_titleblock.drawDxf(width, height, keep_aspect_ratio, file_path, 0); diff --git a/sources/titleblocktemplate.cpp b/sources/titleblocktemplate.cpp index 85e2f8b86..2117c9e0c 100644 --- a/sources/titleblocktemplate.cpp +++ b/sources/titleblocktemplate.cpp @@ -1528,7 +1528,7 @@ void TitleBlockTemplate::renderDxf(QRectF &title_block_rect, QList widths = columnsWidth(titleblock_width); // draw the titleblock border - double xCoord = title_block_rect.topLeft().x(); + double xCoord = title_block_rect.topLeft().x()*Createdxf::xScale; double yCoord = Createdxf::sheetHeight - title_block_rect.bottomLeft().y() From 93929399b6702aac75e5218d2995fdd2070964ba Mon Sep 17 00:00:00 2001 From: Yuki Atoh Date: Sun, 16 Aug 2020 09:37:12 +0900 Subject: [PATCH 04/24] Add Japanese translations of qet_directory --- .../10_electric/10_allpole/100_folio_referencing/qet_directory | 1 + .../10_electric/10_allpole/110_network_supplies/qet_directory | 1 + elements/10_electric/10_allpole/114_connections/qet_directory | 1 + elements/10_electric/10_allpole/120_cables&wiring/qet_directory | 1 + .../10_allpole/130_terminals&terminal_strips/qet_directory | 1 + .../10_electric/10_allpole/140_connectors&plugs/qet_directory | 1 + .../10_allpole/200_fuses&protective_gears/qet_directory | 1 + .../10_allpole/310_relays_contactors&contacts/qet_directory | 1 + .../10_allpole/330_transformers&power_supplies/qet_directory | 1 + .../10_allpole/340_converters&inverters/qet_directory | 1 + .../10_electric/10_allpole/380_signaling&operating/qet_directory | 1 + .../10_electric/10_allpole/390_sensors&instruments/qet_directory | 1 + .../10_electric/10_allpole/391_consumers&actuators/qet_directory | 1 + .../10_electric/10_allpole/392_generators&sources/qet_directory | 1 + .../10_allpole/395_electronics&semiconductors/qet_directory | 1 + elements/10_electric/10_allpole/450_high_voltage/qet_directory | 1 + .../10_electric/10_allpole/500_home_installation/qet_directory | 1 + elements/10_electric/10_allpole/qet_directory | 1 + .../10_electric/11_singlepole/140_connectors&plugs/qet_directory | 1 + .../11_singlepole/200_fuses&protective_gears/qet_directory | 1 + .../11_singlepole/330_transformers&power_supplies/qet_directory | 1 + .../11_singlepole/340_converters&inverters/qet_directory | 1 + .../11_singlepole/392_generators&sources/qet_directory | 1 + .../11_singlepole/395_electronics&semiconductors/qet_directory | 1 + .../11_singlepole/500_home_installation/qet_directory | 1 + elements/10_electric/11_singlepole/qet_directory | 1 + elements/10_electric/20_manufacturers_articles/qet_directory | 1 + .../10_electric/90_american_standards/15_allpole/qet_directory | 1 + .../90_american_standards/16_singlepole/qet_directory | 1 + elements/10_electric/90_american_standards/qet_directory | 1 + elements/10_electric/91_en_60617/qet_directory | 1 + .../10_electric/98_graphics/01_auxiliary_symbols/qet_directory | 1 + elements/10_electric/98_graphics/11_tags&comments/qet_directory | 1 + elements/10_electric/98_graphics/21_forms&tabs/qet_directory | 1 + elements/10_electric/98_graphics/99_assembly_plan/qet_directory | 1 + elements/10_electric/98_graphics/qet_directory | 1 + elements/10_electric/99_miscellaneous&unsorted/qet_directory | 1 + elements/10_electric/qet_directory | 1 + elements/20_logic/10_functions/qet_directory | 1 + elements/20_logic/20_grafcet/qet_directory | 1 + elements/20_logic/30_ladder/qet_directory | 1 + elements/20_logic/40_flowchart/qet_directory | 1 + elements/20_logic/qet_directory | 1 + elements/30_hydraulic/20_manufacturers_articles/qet_directory | 1 + elements/30_hydraulic/21_tanks/qet_directory | 1 + elements/30_hydraulic/31_control_valves/qet_directory | 1 + elements/30_hydraulic/45_valves/qet_directory | 1 + elements/30_hydraulic/51_cylinders/qet_directory | 1 + elements/30_hydraulic/61_pumps/qet_directory | 1 + elements/30_hydraulic/71_exchangers/qet_directory | 1 + elements/30_hydraulic/81_filters/qet_directory | 1 + elements/30_hydraulic/qet_directory | 1 + elements/50_pneumatic/21_tanks/qet_directory | 1 + elements/50_pneumatic/31_control_valves/qet_directory | 1 + elements/50_pneumatic/45_valves/qet_directory | 1 + elements/50_pneumatic/51_cylinders/qet_directory | 1 + elements/50_pneumatic/61_drives/qet_directory | 1 + elements/50_pneumatic/81_air_treatment/qet_directory | 1 + elements/50_pneumatic/91_vacuum/qet_directory | 1 + elements/50_pneumatic/95_lines&connections/qet_directory | 1 + elements/50_pneumatic/qet_directory | 1 + elements/60_energy/11_water/qet_directory | 1 + elements/60_energy/21_refrigeration/qet_directory | 1 + elements/60_energy/31_solar_thermal/qet_directory | 1 + elements/60_energy/41__manufacturers_articles/qet_directory | 1 + elements/60_energy/qet_directory | 1 + 66 files changed, 66 insertions(+) diff --git a/elements/10_electric/10_allpole/100_folio_referencing/qet_directory b/elements/10_electric/10_allpole/100_folio_referencing/qet_directory index 3ed0f3395..e1b451666 100644 --- a/elements/10_electric/10_allpole/100_folio_referencing/qet_directory +++ b/elements/10_electric/10_allpole/100_folio_referencing/qet_directory @@ -12,5 +12,6 @@ Referencias Referenties Ark henvisninger + フォリオ参照 diff --git a/elements/10_electric/10_allpole/110_network_supplies/qet_directory b/elements/10_electric/10_allpole/110_network_supplies/qet_directory index dd41b1901..acbd2e7b2 100644 --- a/elements/10_electric/10_allpole/110_network_supplies/qet_directory +++ b/elements/10_electric/10_allpole/110_network_supplies/qet_directory @@ -11,5 +11,6 @@ Síťové zdroje Fuentes de red Netværkskilder + 電源網 diff --git a/elements/10_electric/10_allpole/114_connections/qet_directory b/elements/10_electric/10_allpole/114_connections/qet_directory index 2b93ba959..3a4852ecf 100644 --- a/elements/10_electric/10_allpole/114_connections/qet_directory +++ b/elements/10_electric/10_allpole/114_connections/qet_directory @@ -11,5 +11,6 @@ Verbindingen Conexiones Forbindelser + 接続 diff --git a/elements/10_electric/10_allpole/120_cables&wiring/qet_directory b/elements/10_electric/10_allpole/120_cables&wiring/qet_directory index 33799af5f..0d85feaea 100644 --- a/elements/10_electric/10_allpole/120_cables&wiring/qet_directory +++ b/elements/10_electric/10_allpole/120_cables&wiring/qet_directory @@ -11,5 +11,6 @@ Kabels en draden Kabely a drátové propojení Kabler og ledninger + ケーブルと配線 diff --git a/elements/10_electric/10_allpole/130_terminals&terminal_strips/qet_directory b/elements/10_electric/10_allpole/130_terminals&terminal_strips/qet_directory index e172a3467..9e56fa9c2 100644 --- a/elements/10_electric/10_allpole/130_terminals&terminal_strips/qet_directory +++ b/elements/10_electric/10_allpole/130_terminals&terminal_strips/qet_directory @@ -13,5 +13,6 @@ Ακροδέκτες και σειρές ακροδεκτών Klemmenlijst Klemmer og klemmerækker + 端子と端子台 diff --git a/elements/10_electric/10_allpole/140_connectors&plugs/qet_directory b/elements/10_electric/10_allpole/140_connectors&plugs/qet_directory index 181e00cf1..22a32a287 100644 --- a/elements/10_electric/10_allpole/140_connectors&plugs/qet_directory +++ b/elements/10_electric/10_allpole/140_connectors&plugs/qet_directory @@ -10,5 +10,6 @@ Σύνδεσμοι και πρίζες Connectoren en stekkers Stik + コネクタとプラグ diff --git a/elements/10_electric/10_allpole/200_fuses&protective_gears/qet_directory b/elements/10_electric/10_allpole/200_fuses&protective_gears/qet_directory index 2edeb819f..9e05d2e94 100644 --- a/elements/10_electric/10_allpole/200_fuses&protective_gears/qet_directory +++ b/elements/10_electric/10_allpole/200_fuses&protective_gears/qet_directory @@ -11,5 +11,6 @@ Zekeringen en beveiligingen Tavné pojistky a ochrany Sikringer og beskyttelsesudstyr + ヒューズと保護装置 diff --git a/elements/10_electric/10_allpole/310_relays_contactors&contacts/qet_directory b/elements/10_electric/10_allpole/310_relays_contactors&contacts/qet_directory index fac4ddc3b..639f007b7 100644 --- a/elements/10_electric/10_allpole/310_relays_contactors&contacts/qet_directory +++ b/elements/10_electric/10_allpole/310_relays_contactors&contacts/qet_directory @@ -11,5 +11,6 @@ Ηλεκτρονόμοι και επαφές Relé, stykače a kontakty Relæer, kontaktorer og kontakter + 継電器、接触器、接点 diff --git a/elements/10_electric/10_allpole/330_transformers&power_supplies/qet_directory b/elements/10_electric/10_allpole/330_transformers&power_supplies/qet_directory index 44b83a28d..8fc5f529a 100644 --- a/elements/10_electric/10_allpole/330_transformers&power_supplies/qet_directory +++ b/elements/10_electric/10_allpole/330_transformers&power_supplies/qet_directory @@ -11,5 +11,6 @@ Transformatoren en Voedingen Trasformátory a proudové zdroje Transformer og strømforsyninger + 変圧器と電源 diff --git a/elements/10_electric/10_allpole/340_converters&inverters/qet_directory b/elements/10_electric/10_allpole/340_converters&inverters/qet_directory index 0dd474601..95b58985e 100644 --- a/elements/10_electric/10_allpole/340_converters&inverters/qet_directory +++ b/elements/10_electric/10_allpole/340_converters&inverters/qet_directory @@ -10,5 +10,6 @@ Omzetters en Omkeerders Μετατροπείς και αντιστροφείς Měniče a plynulé převaděče + 変換器とインバータ diff --git a/elements/10_electric/10_allpole/380_signaling&operating/qet_directory b/elements/10_electric/10_allpole/380_signaling&operating/qet_directory index 21a009af8..e2ddf38cf 100644 --- a/elements/10_electric/10_allpole/380_signaling&operating/qet_directory +++ b/elements/10_electric/10_allpole/380_signaling&operating/qet_directory @@ -10,5 +10,6 @@ Signalering en bediening Σήμανση και χειρισμός Značení a příkazy + 信号と操作 diff --git a/elements/10_electric/10_allpole/390_sensors&instruments/qet_directory b/elements/10_electric/10_allpole/390_sensors&instruments/qet_directory index 3a9763591..bc453fd16 100644 --- a/elements/10_electric/10_allpole/390_sensors&instruments/qet_directory +++ b/elements/10_electric/10_allpole/390_sensors&instruments/qet_directory @@ -10,5 +10,6 @@ Sensoren en instrumenten Αισθητήρες και όργανα Čidla a měřiče + センサと計器 diff --git a/elements/10_electric/10_allpole/391_consumers&actuators/qet_directory b/elements/10_electric/10_allpole/391_consumers&actuators/qet_directory index 47f367b73..3110f79a6 100644 --- a/elements/10_electric/10_allpole/391_consumers&actuators/qet_directory +++ b/elements/10_electric/10_allpole/391_consumers&actuators/qet_directory @@ -10,5 +10,6 @@ Verbruikers en bewegingen Καταναλώσεις και ενεργοποιητές Spotřebitelé a spouštěče + 消費装置と作動装置 diff --git a/elements/10_electric/10_allpole/392_generators&sources/qet_directory b/elements/10_electric/10_allpole/392_generators&sources/qet_directory index d94fee3b9..dea83f5de 100644 --- a/elements/10_electric/10_allpole/392_generators&sources/qet_directory +++ b/elements/10_electric/10_allpole/392_generators&sources/qet_directory @@ -10,5 +10,6 @@ Generators and sources Generadores y fuentes Générateurs et sources + 発電機と電源 diff --git a/elements/10_electric/10_allpole/395_electronics&semiconductors/qet_directory b/elements/10_electric/10_allpole/395_electronics&semiconductors/qet_directory index 8fdf6b2fa..1ce585bac 100644 --- a/elements/10_electric/10_allpole/395_electronics&semiconductors/qet_directory +++ b/elements/10_electric/10_allpole/395_electronics&semiconductors/qet_directory @@ -10,5 +10,6 @@ Electronica en halfgeleiders Ηλεκτρονικά και ημιαγωγοί Elektronika a polovodiče + 電子と半導体 diff --git a/elements/10_electric/10_allpole/450_high_voltage/qet_directory b/elements/10_electric/10_allpole/450_high_voltage/qet_directory index e1595a1b3..5571b04f9 100644 --- a/elements/10_electric/10_allpole/450_high_voltage/qet_directory +++ b/elements/10_electric/10_allpole/450_high_voltage/qet_directory @@ -12,5 +12,6 @@ جهد عالي Υψηλή τάση Hoogspanning + 高圧 diff --git a/elements/10_electric/10_allpole/500_home_installation/qet_directory b/elements/10_electric/10_allpole/500_home_installation/qet_directory index d3d07c226..45c6c9604 100644 --- a/elements/10_electric/10_allpole/500_home_installation/qet_directory +++ b/elements/10_electric/10_allpole/500_home_installation/qet_directory @@ -12,5 +12,6 @@ Impianti civili Οικιακά Huisinstallatie + 住宅設備 diff --git a/elements/10_electric/10_allpole/qet_directory b/elements/10_electric/10_allpole/qet_directory index 77ec475c4..19ed3d024 100644 --- a/elements/10_electric/10_allpole/qet_directory +++ b/elements/10_electric/10_allpole/qet_directory @@ -11,5 +11,6 @@ Многополюсные Flere ledere Multifilar + 複線 diff --git a/elements/10_electric/11_singlepole/140_connectors&plugs/qet_directory b/elements/10_electric/11_singlepole/140_connectors&plugs/qet_directory index 6ad2301b9..86f5bb262 100644 --- a/elements/10_electric/11_singlepole/140_connectors&plugs/qet_directory +++ b/elements/10_electric/11_singlepole/140_connectors&plugs/qet_directory @@ -10,5 +10,6 @@ Connectors and plugs Conectores y Enchufes Connecteurs et prises + コネクタとプラグ diff --git a/elements/10_electric/11_singlepole/200_fuses&protective_gears/qet_directory b/elements/10_electric/11_singlepole/200_fuses&protective_gears/qet_directory index ebaafd907..0ae22e4e0 100644 --- a/elements/10_electric/11_singlepole/200_fuses&protective_gears/qet_directory +++ b/elements/10_electric/11_singlepole/200_fuses&protective_gears/qet_directory @@ -9,5 +9,6 @@ Fusibili e protezioni Fuses and protective gears Fusibles et protections + ヒューズと保護装置 diff --git a/elements/10_electric/11_singlepole/330_transformers&power_supplies/qet_directory b/elements/10_electric/11_singlepole/330_transformers&power_supplies/qet_directory index 1c15a57ac..24b58c971 100644 --- a/elements/10_electric/11_singlepole/330_transformers&power_supplies/qet_directory +++ b/elements/10_electric/11_singlepole/330_transformers&power_supplies/qet_directory @@ -10,5 +10,6 @@ Transformators and power supplies Transformadores y fuentes de poder Transformateurs et alimentations + 変圧器と電源 diff --git a/elements/10_electric/11_singlepole/340_converters&inverters/qet_directory b/elements/10_electric/11_singlepole/340_converters&inverters/qet_directory index f62782a27..a5465b854 100644 --- a/elements/10_electric/11_singlepole/340_converters&inverters/qet_directory +++ b/elements/10_electric/11_singlepole/340_converters&inverters/qet_directory @@ -10,5 +10,6 @@ Converters and inverters Convertidores e inversores Convertisseurs et variateurs + 変換器とインバータ diff --git a/elements/10_electric/11_singlepole/392_generators&sources/qet_directory b/elements/10_electric/11_singlepole/392_generators&sources/qet_directory index d94fee3b9..dea83f5de 100644 --- a/elements/10_electric/11_singlepole/392_generators&sources/qet_directory +++ b/elements/10_electric/11_singlepole/392_generators&sources/qet_directory @@ -10,5 +10,6 @@ Generators and sources Generadores y fuentes Générateurs et sources + 発電機と電源 diff --git a/elements/10_electric/11_singlepole/395_electronics&semiconductors/qet_directory b/elements/10_electric/11_singlepole/395_electronics&semiconductors/qet_directory index 6eddc7e2d..d12cf1b27 100644 --- a/elements/10_electric/11_singlepole/395_electronics&semiconductors/qet_directory +++ b/elements/10_electric/11_singlepole/395_electronics&semiconductors/qet_directory @@ -10,5 +10,6 @@ Electronics and semiconductors Electrónica y semiconductores Electronique et semi-conducteurs + 電子と半導体 diff --git a/elements/10_electric/11_singlepole/500_home_installation/qet_directory b/elements/10_electric/11_singlepole/500_home_installation/qet_directory index d3d07c226..dcfc7de79 100644 --- a/elements/10_electric/11_singlepole/500_home_installation/qet_directory +++ b/elements/10_electric/11_singlepole/500_home_installation/qet_directory @@ -12,5 +12,6 @@ Impianti civili Οικιακά Huisinstallatie + 住宅機器 diff --git a/elements/10_electric/11_singlepole/qet_directory b/elements/10_electric/11_singlepole/qet_directory index 490878780..3a08386b4 100644 --- a/elements/10_electric/11_singlepole/qet_directory +++ b/elements/10_electric/11_singlepole/qet_directory @@ -11,5 +11,6 @@ Enkel pool Однополюсные Enkel leder + 単線 diff --git a/elements/10_electric/20_manufacturers_articles/qet_directory b/elements/10_electric/20_manufacturers_articles/qet_directory index bdf51771e..6b0c54419 100644 --- a/elements/10_electric/20_manufacturers_articles/qet_directory +++ b/elements/10_electric/20_manufacturers_articles/qet_directory @@ -9,5 +9,6 @@ Articulos de fabricantes Articles constructeurs Producent produkter + 製品 diff --git a/elements/10_electric/90_american_standards/15_allpole/qet_directory b/elements/10_electric/90_american_standards/15_allpole/qet_directory index 5d8c82c81..2349e0ac7 100644 --- a/elements/10_electric/90_american_standards/15_allpole/qet_directory +++ b/elements/10_electric/90_american_standards/15_allpole/qet_directory @@ -10,5 +10,6 @@ All-pole Multifilaire Flere ledere + 複線 diff --git a/elements/10_electric/90_american_standards/16_singlepole/qet_directory b/elements/10_electric/90_american_standards/16_singlepole/qet_directory index 723d1fee1..4f2bbda30 100644 --- a/elements/10_electric/90_american_standards/16_singlepole/qet_directory +++ b/elements/10_electric/90_american_standards/16_singlepole/qet_directory @@ -10,5 +10,6 @@ Single pole Unifilaire Enkel leder + 単線 diff --git a/elements/10_electric/90_american_standards/qet_directory b/elements/10_electric/90_american_standards/qet_directory index a43d54c7d..acb9d9c6c 100644 --- a/elements/10_electric/90_american_standards/qet_directory +++ b/elements/10_electric/90_american_standards/qet_directory @@ -10,5 +10,6 @@ Estandares americanos Américain Amerikansk standard + 米国規格 diff --git a/elements/10_electric/91_en_60617/qet_directory b/elements/10_electric/91_en_60617/qet_directory index 0e5f4d220..5e1416b5c 100644 --- a/elements/10_electric/91_en_60617/qet_directory +++ b/elements/10_electric/91_en_60617/qet_directory @@ -3,5 +3,6 @@ EN 60617 IEC 60617 DS/IEC 60617 + 電気用図記号 (JIS C 0617 / IEC 60617) diff --git a/elements/10_electric/98_graphics/01_auxiliary_symbols/qet_directory b/elements/10_electric/98_graphics/01_auxiliary_symbols/qet_directory index 3a930e958..3a72445ab 100644 --- a/elements/10_electric/98_graphics/01_auxiliary_symbols/qet_directory +++ b/elements/10_electric/98_graphics/01_auxiliary_symbols/qet_directory @@ -8,5 +8,6 @@ Symbolen voor tekeningen Βοηθητικά σύμβολα διαγραμμάτων Pomocné symboly pro výkresy + 補助シンボル diff --git a/elements/10_electric/98_graphics/11_tags&comments/qet_directory b/elements/10_electric/98_graphics/11_tags&comments/qet_directory index ecbc91f6e..739969cc0 100644 --- a/elements/10_electric/98_graphics/11_tags&comments/qet_directory +++ b/elements/10_electric/98_graphics/11_tags&comments/qet_directory @@ -7,5 +7,6 @@ Etiketten und Kommentare Labels en commentaren Štítky a poznámky + タグとコメント diff --git a/elements/10_electric/98_graphics/21_forms&tabs/qet_directory b/elements/10_electric/98_graphics/21_forms&tabs/qet_directory index 2005c47f1..f4918c0b9 100644 --- a/elements/10_electric/98_graphics/21_forms&tabs/qet_directory +++ b/elements/10_electric/98_graphics/21_forms&tabs/qet_directory @@ -7,5 +7,6 @@ Formulare und Tabellen Formulieren en tabellen Formuláře a tabulky + フォームと表 diff --git a/elements/10_electric/98_graphics/99_assembly_plan/qet_directory b/elements/10_electric/98_graphics/99_assembly_plan/qet_directory index 2db2d1e49..e45e3bab3 100644 --- a/elements/10_electric/98_graphics/99_assembly_plan/qet_directory +++ b/elements/10_electric/98_graphics/99_assembly_plan/qet_directory @@ -7,5 +7,6 @@ Thumbnails for assembly plan Opbouwtekeningen Náhledy montážního plánu + 組立図用サムネイル diff --git a/elements/10_electric/98_graphics/qet_directory b/elements/10_electric/98_graphics/qet_directory index 37e71e40d..3afa9d384 100644 --- a/elements/10_electric/98_graphics/qet_directory +++ b/elements/10_electric/98_graphics/qet_directory @@ -11,5 +11,6 @@ Graphisme Označení Grafik + グラフィック diff --git a/elements/10_electric/99_miscellaneous&unsorted/qet_directory b/elements/10_electric/99_miscellaneous&unsorted/qet_directory index 61323ff7e..e0a5ffad4 100644 --- a/elements/10_electric/99_miscellaneous&unsorted/qet_directory +++ b/elements/10_electric/99_miscellaneous&unsorted/qet_directory @@ -11,5 +11,6 @@ Miscelánea y desordenados Divers et non classés Diverse og ikke kategoriseret + その他と未分類 diff --git a/elements/10_electric/qet_directory b/elements/10_electric/qet_directory index e75e0bf65..9bb603519 100644 --- a/elements/10_electric/qet_directory +++ b/elements/10_electric/qet_directory @@ -11,5 +11,6 @@ Electrique Elektrisk Eléctrica + 電気 diff --git a/elements/20_logic/10_functions/qet_directory b/elements/20_logic/10_functions/qet_directory index 41d5c8924..820a2d233 100644 --- a/elements/20_logic/10_functions/qet_directory +++ b/elements/20_logic/10_functions/qet_directory @@ -14,5 +14,6 @@ Functie Plan (FUP) Logische poorten Logik funktioner + 論理ゲート diff --git a/elements/20_logic/20_grafcet/qet_directory b/elements/20_logic/20_grafcet/qet_directory index 3ec959680..1602b0f82 100644 --- a/elements/20_logic/20_grafcet/qet_directory +++ b/elements/20_logic/20_grafcet/qet_directory @@ -12,5 +12,6 @@ Grafcet afloopdiagram Functie diagram (Grafcet) Sekvens + Grafcet diff --git a/elements/20_logic/30_ladder/qet_directory b/elements/20_logic/30_ladder/qet_directory index 64cd3d072..965b8e265 100644 --- a/elements/20_logic/30_ladder/qet_directory +++ b/elements/20_logic/30_ladder/qet_directory @@ -14,5 +14,6 @@ Ladder Diagram (KOP) Ladder (KOP) Ladder + ラダー diff --git a/elements/20_logic/40_flowchart/qet_directory b/elements/20_logic/40_flowchart/qet_directory index 4971b725f..2e06f443d 100644 --- a/elements/20_logic/40_flowchart/qet_directory +++ b/elements/20_logic/40_flowchart/qet_directory @@ -11,5 +11,6 @@ Stroomschema Organisatieschema Rutediagram + フローチャート diff --git a/elements/20_logic/qet_directory b/elements/20_logic/qet_directory index 2eea90765..ecfc42c2e 100644 --- a/elements/20_logic/qet_directory +++ b/elements/20_logic/qet_directory @@ -11,5 +11,6 @@ Logica Логика Logik + 論理 diff --git a/elements/30_hydraulic/20_manufacturers_articles/qet_directory b/elements/30_hydraulic/20_manufacturers_articles/qet_directory index 2126d1361..5baaac24e 100644 --- a/elements/30_hydraulic/20_manufacturers_articles/qet_directory +++ b/elements/30_hydraulic/20_manufacturers_articles/qet_directory @@ -1,5 +1,6 @@ Manufacturers Articles + 製品 diff --git a/elements/30_hydraulic/21_tanks/qet_directory b/elements/30_hydraulic/21_tanks/qet_directory index f3ec8b657..250e2b6a1 100644 --- a/elements/30_hydraulic/21_tanks/qet_directory +++ b/elements/30_hydraulic/21_tanks/qet_directory @@ -10,6 +10,7 @@ Tanks hydrauliek Δεξαμενές Tanke + タンク diff --git a/elements/30_hydraulic/31_control_valves/qet_directory b/elements/30_hydraulic/31_control_valves/qet_directory index 7e3a170c0..f2d4e17df 100644 --- a/elements/30_hydraulic/31_control_valves/qet_directory +++ b/elements/30_hydraulic/31_control_valves/qet_directory @@ -11,5 +11,6 @@ Stuurkleppen 2 standen Βαλβίδες ελέγχου Styre ventiler + 制御弁 diff --git a/elements/30_hydraulic/45_valves/qet_directory b/elements/30_hydraulic/45_valves/qet_directory index 2380e9760..d644451f4 100644 --- a/elements/30_hydraulic/45_valves/qet_directory +++ b/elements/30_hydraulic/45_valves/qet_directory @@ -10,5 +10,6 @@ Βαλβίδες Kleppen Ventiler + diff --git a/elements/30_hydraulic/51_cylinders/qet_directory b/elements/30_hydraulic/51_cylinders/qet_directory index e2fc2767a..65ea46d39 100644 --- a/elements/30_hydraulic/51_cylinders/qet_directory +++ b/elements/30_hydraulic/51_cylinders/qet_directory @@ -10,5 +10,6 @@ Έμβολα Cilinders Cylindre + シリンダ diff --git a/elements/30_hydraulic/61_pumps/qet_directory b/elements/30_hydraulic/61_pumps/qet_directory index 279ab6cbf..147db2262 100644 --- a/elements/30_hydraulic/61_pumps/qet_directory +++ b/elements/30_hydraulic/61_pumps/qet_directory @@ -10,5 +10,6 @@ Pompe Pompen, motoren Pumper + ポンプ diff --git a/elements/30_hydraulic/71_exchangers/qet_directory b/elements/30_hydraulic/71_exchangers/qet_directory index 3d50749d1..e719ed1e6 100644 --- a/elements/30_hydraulic/71_exchangers/qet_directory +++ b/elements/30_hydraulic/71_exchangers/qet_directory @@ -10,5 +10,6 @@ Εναλλάκτες θερμότητας Warmtewisselaar Varme veksler + 熱交換器 diff --git a/elements/30_hydraulic/81_filters/qet_directory b/elements/30_hydraulic/81_filters/qet_directory index c4dc6ee2e..2bc36de19 100644 --- a/elements/30_hydraulic/81_filters/qet_directory +++ b/elements/30_hydraulic/81_filters/qet_directory @@ -10,5 +10,6 @@ Filtri Filters Filtre + フィルタ diff --git a/elements/30_hydraulic/qet_directory b/elements/30_hydraulic/qet_directory index 2155b7350..4aac5e4a3 100644 --- a/elements/30_hydraulic/qet_directory +++ b/elements/30_hydraulic/qet_directory @@ -11,5 +11,6 @@ Hydrauliek Гидравлика Hydraulik + 油圧・水圧 diff --git a/elements/50_pneumatic/21_tanks/qet_directory b/elements/50_pneumatic/21_tanks/qet_directory index f9a99fd12..603ffde32 100644 --- a/elements/50_pneumatic/21_tanks/qet_directory +++ b/elements/50_pneumatic/21_tanks/qet_directory @@ -11,5 +11,6 @@ Tanks Δοχεία Tanke + タンク diff --git a/elements/50_pneumatic/31_control_valves/qet_directory b/elements/50_pneumatic/31_control_valves/qet_directory index 7e3a170c0..f2d4e17df 100644 --- a/elements/50_pneumatic/31_control_valves/qet_directory +++ b/elements/50_pneumatic/31_control_valves/qet_directory @@ -11,5 +11,6 @@ Stuurkleppen 2 standen Βαλβίδες ελέγχου Styre ventiler + 制御弁 diff --git a/elements/50_pneumatic/45_valves/qet_directory b/elements/50_pneumatic/45_valves/qet_directory index 2380e9760..d644451f4 100644 --- a/elements/50_pneumatic/45_valves/qet_directory +++ b/elements/50_pneumatic/45_valves/qet_directory @@ -10,5 +10,6 @@ Βαλβίδες Kleppen Ventiler + diff --git a/elements/50_pneumatic/51_cylinders/qet_directory b/elements/50_pneumatic/51_cylinders/qet_directory index af0519985..1200df40c 100644 --- a/elements/50_pneumatic/51_cylinders/qet_directory +++ b/elements/50_pneumatic/51_cylinders/qet_directory @@ -11,5 +11,6 @@ Cilinders Έμβολα Cylindre + シリンダ diff --git a/elements/50_pneumatic/61_drives/qet_directory b/elements/50_pneumatic/61_drives/qet_directory index 7409d60e8..169386a2b 100644 --- a/elements/50_pneumatic/61_drives/qet_directory +++ b/elements/50_pneumatic/61_drives/qet_directory @@ -9,5 +9,6 @@ Aandrijvingen Pohony Drev + 駆動 diff --git a/elements/50_pneumatic/81_air_treatment/qet_directory b/elements/50_pneumatic/81_air_treatment/qet_directory index e76074a34..47fbac94a 100644 --- a/elements/50_pneumatic/81_air_treatment/qet_directory +++ b/elements/50_pneumatic/81_air_treatment/qet_directory @@ -11,5 +11,6 @@ Luchtbehandeling Διαχείριση αέρα Trykluft + 空気処理 diff --git a/elements/50_pneumatic/91_vacuum/qet_directory b/elements/50_pneumatic/91_vacuum/qet_directory index 8a534c96d..31446811e 100644 --- a/elements/50_pneumatic/91_vacuum/qet_directory +++ b/elements/50_pneumatic/91_vacuum/qet_directory @@ -10,5 +10,6 @@ Vacuum Υποπίεση Vakuum + 真空 diff --git a/elements/50_pneumatic/95_lines&connections/qet_directory b/elements/50_pneumatic/95_lines&connections/qet_directory index 2e5541867..84cdabd6c 100644 --- a/elements/50_pneumatic/95_lines&connections/qet_directory +++ b/elements/50_pneumatic/95_lines&connections/qet_directory @@ -11,5 +11,6 @@ Verbindingen Σύνδεσμοι σωλήνων Rør og fittings + 線と接続 diff --git a/elements/50_pneumatic/qet_directory b/elements/50_pneumatic/qet_directory index 9c510ac19..8851f8134 100644 --- a/elements/50_pneumatic/qet_directory +++ b/elements/50_pneumatic/qet_directory @@ -11,5 +11,6 @@ Pneumatiek Пневматика Pneumatik + 空気圧 diff --git a/elements/60_energy/11_water/qet_directory b/elements/60_energy/11_water/qet_directory index 925938d85..d9bfed5f9 100644 --- a/elements/60_energy/11_water/qet_directory +++ b/elements/60_energy/11_water/qet_directory @@ -9,5 +9,6 @@ Acqua Voda VVS teknik + diff --git a/elements/60_energy/21_refrigeration/qet_directory b/elements/60_energy/21_refrigeration/qet_directory index 593b4efd9..5122431ae 100644 --- a/elements/60_energy/21_refrigeration/qet_directory +++ b/elements/60_energy/21_refrigeration/qet_directory @@ -11,5 +11,6 @@ Ψύξη Koelers Køle teknik + 冷凍機 diff --git a/elements/60_energy/31_solar_thermal/qet_directory b/elements/60_energy/31_solar_thermal/qet_directory index ac5097916..0f667779c 100644 --- a/elements/60_energy/31_solar_thermal/qet_directory +++ b/elements/60_energy/31_solar_thermal/qet_directory @@ -11,5 +11,6 @@ Ηλιακή θέρμανση Zon thermisch Sol og varme teknik + 太陽熱 diff --git a/elements/60_energy/41__manufacturers_articles/qet_directory b/elements/60_energy/41__manufacturers_articles/qet_directory index bdf51771e..6b0c54419 100644 --- a/elements/60_energy/41__manufacturers_articles/qet_directory +++ b/elements/60_energy/41__manufacturers_articles/qet_directory @@ -9,5 +9,6 @@ Articulos de fabricantes Articles constructeurs Producent produkter + 製品 diff --git a/elements/60_energy/qet_directory b/elements/60_energy/qet_directory index f07615fbf..4b9e86195 100644 --- a/elements/60_energy/qet_directory +++ b/elements/60_energy/qet_directory @@ -12,5 +12,6 @@ Energie Сантехника Energi teknik + エネルギー From e22c618152026efed9c6dff5014add6b0a440981 Mon Sep 17 00:00:00 2001 From: Yuki Atoh Date: Sun, 16 Aug 2020 13:00:04 +0900 Subject: [PATCH 05/24] Add Japanese translations for IEC 60617 --- .../91_en_60617/en_60617_02/en_60617_02_01/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_02/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_03/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_04/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_05/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_06/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_07/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_08/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_09/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_10/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_11/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_12/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_13/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_14/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_15/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_16/qet_directory | 1 + .../91_en_60617/en_60617_02/en_60617_02_17/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_02/qet_directory | 1 + .../91_en_60617/en_60617_03/en_60617_03_01/qet_directory | 1 + .../91_en_60617/en_60617_03/en_60617_03_02/qet_directory | 1 + .../91_en_60617/en_60617_03/en_60617_03_03/qet_directory | 1 + .../91_en_60617/en_60617_03/en_60617_03_04/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_03/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_01/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_02/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_03/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_04/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_05/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_06/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_07/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_08/qet_directory | 1 + .../91_en_60617/en_60617_04/en_60617_04_09/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_04/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_01/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_02/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_03/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_04/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_05/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_06/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_07/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_08/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_09/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_10/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_11/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_12/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_13/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_14/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_15/qet_directory | 1 + .../91_en_60617/en_60617_05/en_60617_05_16/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_05/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_01/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_02/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_03/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_04/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_05/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_06/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_07/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_08/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_09/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_10/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_11/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_12/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_13/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_14/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_15/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_16/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_17/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_18/qet_directory | 1 + .../91_en_60617/en_60617_06/en_60617_06_19/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_06/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_01/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_02/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_03/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_04/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_05/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_06/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_07/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_08/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_09/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_11/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_12/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_13/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_14/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_15/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_16/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_17/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_18/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_19/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_20/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_21/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_22/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_25/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_26/qet_directory | 1 + .../91_en_60617/en_60617_07/en_60617_07_27/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_07/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_01/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_02/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_03/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_04/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_05/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_06/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_07/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_08/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_09/qet_directory | 1 + .../91_en_60617/en_60617_08/en_60617_08_10/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_08/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_09/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_10/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_01/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_02/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_03/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_04/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_05/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_06/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_07/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_08/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_09/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_10/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_11/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_12/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_13/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_14/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_15/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_16/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_17/qet_directory | 1 + .../91_en_60617/en_60617_11/en_60617_11_18/qet_directory | 1 + elements/10_electric/91_en_60617/en_60617_11/qet_directory | 1 + 127 files changed, 127 insertions(+) diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_01/qet_directory index d18d7c47d..fd1b091a4 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_01/qet_directory @@ -4,5 +4,6 @@ 01- Konturen und Umhüllungen 01- Marcos y sobres 01- konturer og indpakning + 01- 輪郭及び囲い diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_02/qet_directory index d7ceb5111..c13036389 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_02/qet_directory @@ -3,5 +3,6 @@ 02- Nature du courant et de la tension 02- Arten von Strömen und Spannungen 02- Naturaleza de la corriente y el voltaje + 02- 電圧及び電流の種類 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_03/qet_directory index f7048e776..b5373f9c8 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_03/qet_directory @@ -3,5 +3,6 @@ 03- Ajustabilité, variabilité et régulation automatique 03- Ajustabilidad, variabilidad y regulación automática 03- Einstellbarkeit, Veränderbarkeit und Automatische Steuerung + 03- 調整,変換及び自動制御 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_04/qet_directory index 93db8a263..ab1aa239c 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_04/qet_directory @@ -3,5 +3,6 @@ 04- Sens de l'effort ou du mouvement 04- Sentido de esfuerzo o movimiento 04- Richtung von Kraft und Bewegung + 04- 力及び運動方向 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_05/qet_directory index 3a3eca955..ca5f036e5 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_05/qet_directory @@ -3,5 +3,6 @@ 05- Sens de propagation 05- Dirección de propagación 05- Wirkungsrichtung + 05- 流れの方向 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_06/qet_directory index 4000e43db..63ab3455e 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_06/qet_directory @@ -3,5 +3,6 @@ 06- Abhängigkeit von einer Charakteristischen Grösse 06- Fonctionnement dépendant d'une grandeur caractéristique 06- Operación dependiente de una cantidad característica + 06- 特性量への作動依存性 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_07/qet_directory index 36392898b..41da856d7 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_07/qet_directory @@ -3,5 +3,6 @@ 07- Arten von Materie 07- Types de matière 07- Tipos de material + 07- 材料の種類 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_08/qet_directory index 3da472bba..03c171f03 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_08/qet_directory @@ -3,5 +3,6 @@ 08- Effet ou dépendance 08- Efecto o dependencia 08- Arten von Wirkungen oder Abhängikeiten + 08- 効果又は依存性 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_09/qet_directory index 231c9d1e3..e94c104ae 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_09/qet_directory @@ -3,5 +3,6 @@ 09- Rayonnement 09- Radiación 09- Strahlung + 09- 放射 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_10/qet_directory index 1183c3bff..b92239f88 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_10/qet_directory @@ -3,5 +3,6 @@ 10- Forme des signaux 10- Forma de señal 10- Impulsformen + 10- 信号波形 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_11/qet_directory index 3d0cd9ad8..5c608dbe7 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_11/qet_directory @@ -3,5 +3,6 @@ 11- Impression, perforation, télécopie 11- Impresión, perforación, envío de faxes 11- Drucken, Lochen und Fernkopieren + 11- 印刷,さん孔及びファクシミリ diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_12/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_12/qet_directory index 2c5b0bfae..d7a2644b5 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_12/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_12/qet_directory @@ -3,5 +3,6 @@ 12- Commandes Mécaniques et autres 12- Controles mecánicos y otros 12- Mechanische und andere Stellteile + 12- その他の一般用途図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_13/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_13/qet_directory index 76ff66ff0..9b239cbda 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_13/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_13/qet_directory @@ -3,5 +3,6 @@ 13- Actionneurs, Ensemble 1 Actuadores, grupo 1 13- Antriebsarten + 13- 操作機器・操作機構 1 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_14/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_14/qet_directory index db82a1a21..5a7b7898d 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_14/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_14/qet_directory @@ -3,5 +3,6 @@ 14- Actionneurs, Ensemble 2 Actuadores, grupo 2 14- Betätigung durch andere Grössen + 14- 操作機器・操作機構 2 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_15/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_15/qet_directory index b37a1c99a..4c7cf73a1 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_15/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_15/qet_directory @@ -4,5 +4,6 @@ 15- Conexiones a Tierra y chasis 15- Mise à la terre et à la masse, équipotentialité 15- Erde, Masse, Äquipotential + 15- 接地及びフレーム接続又は等電位 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_16/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_16/qet_directory index 00af39967..368356428 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_16/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_16/qet_directory @@ -3,5 +3,6 @@ 16- Eléments idéaux de circuit 16- Elementos ideales de circuitos electricos 16- Elemente für ideale Stromkreise + 16- 理想回路素子 diff --git a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_17/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_17/qet_directory index 9a6313cf6..acae8fab2 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_17/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/en_60617_02_17/qet_directory @@ -3,5 +3,6 @@ 17- Divers 17- Verschiedenes 17- Diverso + 17- その他 diff --git a/elements/10_electric/91_en_60617/en_60617_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_02/qet_directory index 272a7af18..d3c628ad5 100644 --- a/elements/10_electric/91_en_60617/en_60617_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_02/qet_directory @@ -4,5 +4,6 @@ 02- Symbolelemente und Kennzeichen 02- Elementos e identificadores de símbolos 02- Symbolelementer, tillægssymboler og andre symboler, som har almindelig anvendelse + 02- 図記号要素,限定図記号及びその他の一般用途図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_01/qet_directory index 8ce825009..28e58c2b9 100644 --- a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_01/qet_directory @@ -2,5 +2,6 @@ 01- Liaisons 01- Leiter + 01- 接続 diff --git a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_02/qet_directory index aefe16ebe..f4ce271f2 100644 --- a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_02/qet_directory @@ -2,5 +2,6 @@ 02- Dérivations, bomes et branchements 02- Anschlüsse und Leiterverbindungen + 02- 接続点,端子及び分岐 diff --git a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_03/qet_directory index c3d9edad8..5734188ca 100644 --- a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_03/qet_directory @@ -2,5 +2,6 @@ 03- Dispositifs de liaison 03- Verbinder + 03- 接続部品 diff --git a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_04/qet_directory index df075697a..d9c958cab 100644 --- a/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_03/en_60617_03_04/qet_directory @@ -2,5 +2,6 @@ 04- Accessoires pour câbles 04- Kabelverbinder + 04- ケーブル取付部品 diff --git a/elements/10_electric/91_en_60617/en_60617_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_03/qet_directory index 236d365d0..ba5dbd3cb 100644 --- a/elements/10_electric/91_en_60617/en_60617_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_03/qet_directory @@ -3,5 +3,6 @@ 03- Conducteurs et dispositifs de liaison 03- Conductores y dispositivos de enlace 03- Ledere og forbindelsesanordninger + 03- 導体及び接続部品 diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_01/qet_directory index f2118d361..d5cb18551 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_01/qet_directory @@ -2,5 +2,6 @@ 01- Résistances 01- Widerstände + 01- 抵抗器 diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_02/qet_directory index 27ae0a046..4845d5577 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_02/qet_directory @@ -2,5 +2,6 @@ 02- Condensateurs 02- Kondensatoren + 02- コンデンサ(キャパシタ) diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_03/qet_directory index b9b258452..c593b7eef 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_03/qet_directory @@ -2,5 +2,6 @@ 03- Inductances 03- Induktivitäten + 03- インダクタ diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_04/qet_directory index 74c82c129..c4b954880 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_04/qet_directory @@ -2,5 +2,6 @@ 04- Élements de symbole 04- Symbolelemente + 04- 図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_05/qet_directory index ca55407d8..c822b452b 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_05/qet_directory @@ -2,5 +2,6 @@ 05- Tores de ferrite 05- Magnetkerne + 05- フェライト磁心 diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_06/qet_directory index 30d3a36ef..f4f469e09 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_06/qet_directory @@ -2,5 +2,6 @@ 06- Matrices à mémoire magnetique (représentation topographique) 06- Magnetspeicher-Matrixen (lagerichtige Darstellung) + 06- 磁気記憶マトリックス(実体配置的な表現) diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_07/qet_directory index a51297221..d9a27621a 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_07/qet_directory @@ -2,5 +2,6 @@ 07- Cristaux piézoélectriques, electret 07- Piezoelektrische Kristalle, Elektret + 07- 圧電結晶,エレクトレット diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_08/qet_directory index 885dd9455..4d259ee4b 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_08/qet_directory @@ -2,5 +2,6 @@ 08- Lignes à retard 08- Verzögerungsleitungen + 08- 遅延線 diff --git a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_09/qet_directory index c11c8e247..54ecd18f9 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/en_60617_04_09/qet_directory @@ -2,5 +2,6 @@ 09- Symboles fonctionnels pour lignes et éléments à retard 09- Blocksymbole für Verzögerungsleitungen und -elemente + 09- 遅延線及び遅延素子のブロック図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_04/qet_directory index 429a5b164..255ab85aa 100644 --- a/elements/10_electric/91_en_60617/en_60617_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_04/qet_directory @@ -3,5 +3,6 @@ 04- Composants passifs de base 04- Componentes pasivos básicos 04- Grundlæggende passive komponenter + 04- 基礎受動部品 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_01/qet_directory index df6d9a652..691753ce8 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_01/qet_directory @@ -2,5 +2,6 @@ 01- Éléments de symboles 01- Symbolelemente + 01- 図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_02/qet_directory index 420ff1b9f..acf6ea49e 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_02/qet_directory @@ -2,5 +2,6 @@ 02- Symboles distinctifs particuliers aux dispositifs à semiconducteurs 02- Besondere Kennzeichen für Halbleiterelemente + 02- 半導体素子に特有な限定図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_03/qet_directory index 5f3aeb453..c9c29036b 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_03/qet_directory @@ -2,5 +2,6 @@ 03- Exemples de diodes à semiconducteur 03- Beispiele für Halbleiterdioden + 03- 半導体ダイオードの例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_04/qet_directory index ca54a9507..61a7ecaab 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_04/qet_directory @@ -2,5 +2,6 @@ 04- Exemples de thyristors 04- Beispiele für Thyristoren + 04- サイリスタの例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_05/qet_directory index d086907b7..7425f64db 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_05/qet_directory @@ -2,5 +2,6 @@ 05- Exemples de transistors 05- Beispiele für Transistoren + 05- トランジスタの例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_06/qet_directory index 03df9fb01..a43accd40 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_06/qet_directory @@ -2,5 +2,6 @@ 06- Exemples de dispositifs photosensibles et magnétosensibles 06- Beispiele für licht- und magnetfeldempfindliche Elemente + 06- 光電素子及び磁界感応素子の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_07/qet_directory index 9dcb97cf9..b6be0c5cd 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_07/qet_directory @@ -2,5 +2,6 @@ 07- Eléments de symboles généraux 07- Symbolelemente, allgemein + 07- 一般的な図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_08/qet_directory index cae034efd..907c02327 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_08/qet_directory @@ -3,5 +3,6 @@ 08- Eléments de symboles principalement utilisables pour les tubes à rayons cathodiques et les tubes de caméras de télévison 08- Symbolelemente für Kathodenstrahl- und Bildaufnahmeröhren + 08- 主としてブラウン管及びテレビジョン撮像管に適用する図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_09/qet_directory index f7c8b6f1b..3ad5478de 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_09/qet_directory @@ -2,5 +2,6 @@ 09- Eléments de symboles principalement utilisables pour les tubes hyperfréquences 09- Symbolelemente für Mikrowellenröhren + 09- 主としてマイクロ波管に適用する図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_10/qet_directory index 37daa2143..c906d63de 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_10/qet_directory @@ -3,5 +3,6 @@ 10- Eléments de symboles utilisables pour divers types de tubes, y compris les redresseurs à vapeur de mercure 10- Symbolelemente für weiter Röhrenarten, einschliesslich Quecksilberdampfröhren + 10- 水銀整流器を含むその他の電子管に適用する図記号要素 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_11/qet_directory index 4f7401110..e98c2184a 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_11/qet_directory @@ -2,5 +2,6 @@ 11- Exemples de tubes électroniques 11- Beispiele für Elektronenröhren + 11- 電子管の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_12/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_12/qet_directory index 2318579dc..1203f9aa5 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_12/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_12/qet_directory @@ -2,5 +2,6 @@ 12- Exemples de tubes à rayons cathodiques 12- Beispiele für Kathodenstrahlröhren + 12- ブラウン管の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_13/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_13/qet_directory index b068fb3d8..f2985a7c4 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_13/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_13/qet_directory @@ -2,5 +2,6 @@ 13- Exemples de tubes pour hyperfréquences 13- Beispiele für Mikrowellenröhren + 13- マイクロ波管の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_14/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_14/qet_directory index ab0736987..a6becf4da 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_14/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_14/qet_directory @@ -2,5 +2,6 @@ 14- Exemples de divers types de tubes, y compris les redresseurs à vapeur de mercure 14- Beispiele für weitere Rörenarten, einschliesslich Quecksilberdampfröhren + 14- 水銀整流器を含むその他の電子管の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_15/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_15/qet_directory index b97f6ee1e..ebcb6a169 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_15/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_15/qet_directory @@ -2,5 +2,6 @@ 15- Exemples de détecteurs de rayonnements ionisants 15- Beispiele für Detektoren für ionisierende Strahlung + 15- 電離放射線検出器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_16/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_16/qet_directory index 55b6c035b..5676dc3ff 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_16/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/en_60617_05_16/qet_directory @@ -2,5 +2,6 @@ 16- Dispositifs électrochimiques 16- Elektrochemische Geräte + 16- 電気化学デバイス diff --git a/elements/10_electric/91_en_60617/en_60617_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_05/qet_directory index 6d59bef71..1826a6019 100644 --- a/elements/10_electric/91_en_60617/en_60617_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_05/qet_directory @@ -3,5 +3,6 @@ 05- Semiconducteurs et tubes électroniques 05- Semiconductores y tubos electrónicos 05- Halvledere og elektronrør + 05- 半導体及び電子管 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_01/qet_directory index 2b2a4822f..f710be2fd 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_01/qet_directory @@ -2,5 +2,6 @@ 01- Enroulements séparés 01- Getrennte Wicklungen + 01- 分離した巻線 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_02/qet_directory index 9908611d8..25655bfc4 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_02/qet_directory @@ -2,5 +2,6 @@ 02- Enroulements connectés intérieurement 02- Intern verbundene Wicklungen + 02- 内部で接続した巻線 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_03/qet_directory index 096ada73b..3c193cf37 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_03/qet_directory @@ -2,5 +2,6 @@ 03- Eléments de machines 03- Symbolelemente von Maschinen + 03- 回転機の要素 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_04/qet_directory index 248227583..d41afa865 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_04/qet_directory @@ -2,5 +2,6 @@ 04- Types de machines 04- Maschinenarten + 04- 回転機の種類 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_05/qet_directory index a487de01a..5124e3cfb 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_05/qet_directory @@ -2,5 +2,6 @@ 05- Exemples de machines à courant continu 05- Beispiele für Gleichstrommaschinen + 05- 直流機の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_06/qet_directory index eab06ca4c..ff8b7f1d1 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_06/qet_directory @@ -2,5 +2,6 @@ 06- Exemples de machines à courant alternatif à collecteur 06- Beispiele für Wechselstrom-Kommutatormaschinen + 06- 交流整流子機の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_07/qet_directory index 5a742d7df..ff00f33d8 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_07/qet_directory @@ -2,5 +2,6 @@ 07- Exemples de machines synchrones 07- Beispiele für Synchronmaschinen + 07- 同期機の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_08/qet_directory index 0d194eca7..d6902a971 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_08/qet_directory @@ -2,5 +2,6 @@ 08- Exemples de machines à induction (asynchrones) 08- Beispiele für Asynchronmaschinen + 08- 誘導機(非同期機)の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_09/qet_directory index 0a1667bfc..9323bbf02 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_09/qet_directory @@ -2,5 +2,6 @@ 09- Symboles généraux pour transformateurs et reactances 09- Allgemeine Symbole für Transformatoren und Drosseln + 09- 変圧器及びリアクトル(一般図記号) diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_10/qet_directory index d0b7793d8..82c070d0c 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_10/qet_directory @@ -2,5 +2,6 @@ 10- Exemples de transformateurs à enroulements séprés 10- Beispiele für Transformatren mit getrennten Wicklungen + 10- 別個の巻線を用いる変圧器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_11/qet_directory index e85059849..277bc0dd4 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_11/qet_directory @@ -2,5 +2,6 @@ 11- Exemples d'autotransformateurs 11- Beispiele für Spartransformatoren + 11- 単巻変圧器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_12/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_12/qet_directory index 991d804b5..6ea826820 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_12/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_12/qet_directory @@ -2,5 +2,6 @@ 12- Exemples de régulateurs à induction 12- Beispiele für Induktionsteller + 12- 誘導電圧調整器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_13/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_13/qet_directory index ef4091bf2..b9b7dcca1 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_13/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_13/qet_directory @@ -2,5 +2,6 @@ 13- Exemples de transformateurs de mesure et de transformateurs d'impulsion 13- Beispiele für Messwandler und Impulstransformatoren + 13- 計器用変成器及びパルス変成器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_14/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_14/qet_directory index f5495aaea..9b6925808 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_14/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_14/qet_directory @@ -2,5 +2,6 @@ 14- Symboles fonctionnels pour convertiseurs de puissance 14- Blocksymbole für Leistungsumrichter + 14- 電力変換装置に用いるブロック図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_15/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_15/qet_directory index f477edb90..1a5e34ac5 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_15/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_15/qet_directory @@ -2,5 +2,6 @@ 15- Piles et accumulateurs 15- Primärzellen und Akkumulatoren + 15- 一次電池及び二次電池 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_16/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_16/qet_directory index 4927f5ce0..1a38fd054 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_16/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_16/qet_directory @@ -2,5 +2,6 @@ 16- Symbol général de générateurs non-rotatif de puissance 16- Grundsymbol für nicht rotierende Generatoren, Heizquellen + 16- 非回転式発電装置(一般図記号) diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_17/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_17/qet_directory index 368ac915c..ca8ab2446 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_17/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_17/qet_directory @@ -2,5 +2,6 @@ 17- Sources de chaleur 17- Heizquellen + 17- 熱源 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_18/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_18/qet_directory index aba3b3be3..23bb395e8 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_18/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_18/qet_directory @@ -2,5 +2,6 @@ 18- Exemples de générateurs de puissance 18- Beispiele für besondere, rotierende Generatoren + 18- 発電装置の例 diff --git a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_19/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_19/qet_directory index 582d29533..3413a713b 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_19/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/en_60617_06_19/qet_directory @@ -2,5 +2,6 @@ 19- Régulateurs en boucle fremée 19- Regler + 19- 閉ループ制御装置 diff --git a/elements/10_electric/91_en_60617/en_60617_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_06/qet_directory index 5c17b569b..249b6f6e2 100644 --- a/elements/10_electric/91_en_60617/en_60617_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_06/qet_directory @@ -3,5 +3,6 @@ 06- Production, transformation et conversion de l'électricité 06- Producción, transformación y conversión de electricidad 06- Produktion og omformning af elektrisk energi + 06- 電気エネルギーの発生及び変換 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_01/qet_directory index 2515bd261..8f015b6c9 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_01/qet_directory @@ -2,5 +2,6 @@ 01- Symboles distinctifs 01- Kennzeichen + 01- 限定図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_02/qet_directory index c0b1a71ae..6d0fc086d 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_02/qet_directory @@ -2,5 +2,6 @@ 02-Contacts à deux ou trois positions 02- Kontakte mit zwei oder drei Schaltstellungen + 02- 2位置又は3位置接点 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_03/qet_directory index ba2b3ccab..3bf60aa77 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_03/qet_directory @@ -2,5 +2,6 @@ 03- Contacts de passage à deux positions 03- Wischkontakte mit zwei Schaltstellungen + 03- 2位置の瞬時接点 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_04/qet_directory index 22823fbd1..768182477 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_04/qet_directory @@ -2,5 +2,6 @@ 04- Contacts à fonctionnement décalé 04- Voreilende und nacheilende Kontakte + 04- 早期作動及び遅延動作接点 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_05/qet_directory index 219f6b77c..db9283fc2 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_05/qet_directory @@ -2,5 +2,6 @@ 05- Contacts avec opération retardée 05- Verzögerte Kontakte + 05- 限時動作接点 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_06/qet_directory index ba799a3a0..fd499da2a 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_06/qet_directory @@ -2,5 +2,6 @@ 06- Contacts à retour automatique et à position maintenue 06- Kontaktemit selbsttätigen Rückgang und mit nicht selbsttätigen Rückgang + 06- 自動復帰接点及び非自動復帰接点 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_07/qet_directory index ca58f7f61..5e5982da9 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_07/qet_directory @@ -2,5 +2,6 @@ 07-Commutateurs unipolaires 07- Handbetätigte Schalter + 07- 単極スイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_08/qet_directory index 9b58d7457..faae4536c 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_08/qet_directory @@ -2,5 +2,6 @@ 08- Interrupteurs de position 08- Grenzschalter, Endschalter + 08- リミットスイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_09/qet_directory index 1381fad3d..4983f25a4 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_09/qet_directory @@ -2,5 +2,6 @@ 09- Interrupteurs fonctionnement sous l'effet de la température 09- Temperaturabhängige Schalter + 09- 温度感知スイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_11/qet_directory index 48581a1ab..f156d10da 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_11/qet_directory @@ -2,5 +2,6 @@ 11- Exemples de commutateurs à plusiers directions incluant les auxiliaires de commande 11- Beispiele Mehrstellungsschalter + 11- 制御スイッチを含む多段スイッチの例 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_12/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_12/qet_directory index 7fcae7568..3d4a369f7 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_12/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_12/qet_directory @@ -2,5 +2,6 @@ 12- Symboles fonctionnels pour commutateurs complexes 12- Blocksymbole für komplexe Schalter + 12- 複合スイッチに用いるブロック図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_13/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_13/qet_directory index 876412ed8..33c671d7f 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_13/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_13/qet_directory @@ -2,5 +2,6 @@ 13- Dispositifs de commutation de puisance 13- Schaltgeräte und Steuergeräte + 13- 電力用開閉装置 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_14/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_14/qet_directory index 65a13bd48..12654046b 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_14/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_14/qet_directory @@ -2,5 +2,6 @@ 14- Démarreurs de moteurs 14- Blocksymbole für Anlasser + 14- 電動機始動器に用いるブロック図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_15/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_15/qet_directory index 540f5f17e..c8a9399b9 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_15/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_15/qet_directory @@ -2,5 +2,6 @@ 15- Organes de commande 15- Elektromechanische Antriebe + 15- 作動装置 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_16/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_16/qet_directory index 33d76fbc2..936a58f62 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_16/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_16/qet_directory @@ -3,5 +3,6 @@ 16- Symbole fonctionnel et symboles distinctifs pour relais de mesure et dispositifs apparentés 16- Blocksymbole und Kennzeichen für Messrelais und verwandte Einrichtungen + 16- ブロック図記号及び限定図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_17/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_17/qet_directory index 17ed5e142..c60477feb 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_17/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_17/qet_directory @@ -2,5 +2,6 @@ 17- Exemples de relais de mesure 17- Beispiele für Messrelais + 17- 保護継電器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_18/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_18/qet_directory index 0b909374b..94d56721c 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_18/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_18/qet_directory @@ -2,5 +2,6 @@ 18- Autres dispositifs 18- Andere Einrichtungen + 18- その他の装置 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_19/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_19/qet_directory index 9070afa7b..4598bf8b4 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_19/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_19/qet_directory @@ -2,5 +2,6 @@ 19- Capteurs et détecteurs 19- Sensoren und Detektoren + 19- センサ及び検出器 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_20/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_20/qet_directory index 206dcc6dd..bdcf30845 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_20/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_20/qet_directory @@ -2,5 +2,6 @@ 20- Dispositifs à contacts 20- Schalter + 20- スイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_21/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_21/qet_directory index 46e5aa907..2edd5556a 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_21/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_21/qet_directory @@ -2,5 +2,6 @@ 21- Fusibles et interrupteurs à fusibles 21- Sicherungen und Sicherungsschalter + 21- ヒューズ及びヒューズスイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_22/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_22/qet_directory index 6e1e2e7f2..8d0c88845 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_22/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_22/qet_directory @@ -2,5 +2,6 @@ 22- Éclateurs et parafoudres 22- Funkenstrecken und Überspannungsableiter + 22- 放電ギャップ及び避雷器 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_25/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_25/qet_directory index 06592a256..4d09cd7fc 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_25/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_25/qet_directory @@ -2,5 +2,6 @@ 25- Interrupteurs statiques 25- Elektronische Schalter + 25- 静止形スイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_26/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_26/qet_directory index df529d388..d687bb373 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_26/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_26/qet_directory @@ -2,5 +2,6 @@ 26- Dispositifs statiques de connexion 26- Elektronische Schalteinrichtungen + 26- 静止形開閉装置 diff --git a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_27/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_27/qet_directory index 4be932b52..7a7a66b96 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_27/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/en_60617_07_27/qet_directory @@ -2,5 +2,6 @@ 27- Coupleurs et relais statiques, symboles fonctionnels 27- Koppler und Elektronische Relais, Blocksymbole + 27- 結合装置及び静止形継電器のブロック図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_07/qet_directory index c56e13b91..423d5fb52 100644 --- a/elements/10_electric/91_en_60617/en_60617_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_07/qet_directory @@ -3,5 +3,6 @@ 07- Appareillage et dispositifs de commande et de protection 07- Aparatos y dispositivos para control y protección 07- Afbrydere, kontakter og beskyttende udstyr + 07- 開閉装置,制御装置及び保護装置 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_01/qet_directory index b035be2d6..032d6fb60 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_01/qet_directory @@ -2,5 +2,6 @@ 01- Appareils indicateurs, appareils enregistreurs et compteurs, symboles généraux 01- Anzeigende, aufzeichnende und integrierende Messgeräte, allgemeine Schaltzeichen + 01- 指示計器,記録計及び積算計(一般図記号) diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_02/qet_directory index 2850c5726..f66b552f0 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_02/qet_directory @@ -2,5 +2,6 @@ 02- Exemples d'appareils indicateurs 02- Beispiele für anzeigende Messgeräte + 02- 指示計器の例 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_03/qet_directory index 5b9e28b84..0d3eeb9b2 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_03/qet_directory @@ -2,5 +2,6 @@ 03- Exemples d'appareils enregistreurs 03- Beispiele für aufzeichnende Messgeräte + 03- 記録計の例 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_04/qet_directory index 9b12462b8..32748eaea 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_04/qet_directory @@ -2,5 +2,6 @@ 04- Exemples de compteurs 04- Beispiele für integrierende Messgeräte + 04- 積算計の例 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_05/qet_directory index f30cc6300..1e6cbb7d3 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_05/qet_directory @@ -2,5 +2,6 @@ 05- Dispositifs de comptage 05- Zähleinrichtungen + 05- 計数装置 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_06/qet_directory index 91470542e..a64341e33 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_06/qet_directory @@ -2,5 +2,6 @@ 06- Thermocouples 06- Thermoelemente + 06- 熱電対 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_07/qet_directory index 0f4d65ca1..e285e9ad1 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_07/qet_directory @@ -2,5 +2,6 @@ 07- Dispositifs de télémesure 07- Fernmesseinrichtungen + 07- 遠隔測定装置 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_08/qet_directory index e3a20a9f0..8c1b963f7 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_08/qet_directory @@ -2,5 +2,6 @@ 08- Horologes électriques 08- Elektrische Uhren + 08- 電気時計 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_09/qet_directory index 4d6e74a69..8fe889d36 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_09/qet_directory @@ -2,5 +2,6 @@ 09- Appareils de mesure et instruments divers 09- Sonstige Messgeber und Messgeräte + 09- その他の測定素子及び計器 diff --git a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_10/qet_directory index 53d3e3f53..5815f64f3 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/en_60617_08_10/qet_directory @@ -2,5 +2,6 @@ 10- Lampes et dispositifs de signalisation 10- Leuchtmelder und Signaleinrichtungen + 10- ランプ及び信号報知装置 diff --git a/elements/10_electric/91_en_60617/en_60617_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_08/qet_directory index 0ea3fec93..30e02ec03 100644 --- a/elements/10_electric/91_en_60617/en_60617_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_08/qet_directory @@ -3,5 +3,6 @@ 08- Appareils de mesure, lampes et dispositifs de siglalisation 08- Dispositivos de medición, lámparas y dispositivos de señalización 08- Måleinstrumenter, lamper og signaludstyr + 08- 計器,ランプ及び信号装置 diff --git a/elements/10_electric/91_en_60617/en_60617_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_09/qet_directory index 125d3b59f..0434dfa52 100644 --- a/elements/10_electric/91_en_60617/en_60617_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_09/qet_directory @@ -3,5 +3,6 @@ 09- Télécommunications: Commutation et équipements périphériques 09- Telecomunicaciones: Equipo de conmutación y periféricos 09- Telekommunikation: Koblings- og perifert materiel + 09- 電気通信-交換機器及び周辺機器 diff --git a/elements/10_electric/91_en_60617/en_60617_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_10/qet_directory index aaf583be8..e6ffd3e7a 100644 --- a/elements/10_electric/91_en_60617/en_60617_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_10/qet_directory @@ -3,5 +3,6 @@ 10- Télécommunications, Transmission 10- Telecomunicaciones, transmision 10- Telekommunikation: Transmission + 10- 電気通信-伝送 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_01/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_01/qet_directory index 7b242fabf..127e8e097 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_01/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_01/qet_directory @@ -2,5 +2,6 @@ 01- Allgemeine Symbole für Kraftwerke und Stationen 01- Symboles généraux pour Centrales et postes électriques + 01- 一般図記号 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_02/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_02/qet_directory index e570db7d3..1f44b13be 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_02/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_02/qet_directory @@ -2,5 +2,6 @@ 02- Spezielle Kraftwerke und Stationen 02- Types particuliers de centrales et postes électriques + 02- 特定の発電所及び変電所 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_03/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_03/qet_directory index 077beb453..7faa053ec 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_03/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_03/qet_directory @@ -3,5 +3,6 @@ 03- C. Leidingen 03- Lignes 03- Leiter, Leitungen + 03- 線路 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_04/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_04/qet_directory index 9391579ab..e7faeba3d 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_04/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_04/qet_directory @@ -2,5 +2,6 @@ 04- Verschiedenes 04- Éléments divers + 04- その他の要素 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_05/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_05/qet_directory index 507b6c6b3..070609131 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_05/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_05/qet_directory @@ -2,5 +2,6 @@ 05- Kabelköpfe 05- Tétes de réseau + 05- ヘッドエンド diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_06/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_06/qet_directory index 596f9c895..766bec025 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_06/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_06/qet_directory @@ -2,5 +2,6 @@ 06- Verstärker 06- Amplificateurs + 06- 増幅器又はアンプ diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_07/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_07/qet_directory index 50387f18e..00327ba71 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_07/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_07/qet_directory @@ -2,5 +2,6 @@ 07- Verteiler und Richtungskoppler 07- Répartiteurs et coupleurs directifs + 07- 分配器及び分岐器 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_08/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_08/qet_directory index aba7f2d75..56463c425 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_08/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_08/qet_directory @@ -2,5 +2,6 @@ 08- Dosen 08- Dérivations d'usager et prises du réseau + 08- タップオフ及び出力端子 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_09/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_09/qet_directory index f8768aa5e..b2c23cb68 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_09/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_09/qet_directory @@ -2,5 +2,6 @@ 09- Entzerrer und Dämpfungsglied 09- Égaliseurs et affaiblisseurs + 09- 等化器及び減衰器 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_10/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_10/qet_directory index b2dffa147..c58f7fa65 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_10/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_10/qet_directory @@ -2,5 +2,6 @@ 10- Fern-Stromversorgungen 10- Dispositifs d'alimentation + 10- 電源供給装置 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_11/qet_directory index 80b0a226e..2ff2ff231 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_11/qet_directory @@ -2,5 +2,6 @@ 11- Kennzeichnung für besondere Leiter 11- Identification de conducteurs particuliers + 11- 特定の導体の表示 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_12/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_12/qet_directory index 0b1fbe6c9..675aa16d1 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_12/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_12/qet_directory @@ -2,5 +2,6 @@ 12- Einspeisungen 12- Canalisations + 12- 配線 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_13/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_13/qet_directory index 2577477af..733a666e5 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_13/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_13/qet_directory @@ -2,5 +2,6 @@ 13- Steckdosen 13- Socles de prises de courant + 13- コンセント diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_14/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_14/qet_directory index cebeab80c..de560e87d 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_14/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_14/qet_directory @@ -2,5 +2,6 @@ 14- Schalter 14- Interrupteurs + 14- スイッチ diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_15/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_15/qet_directory index 039a6d792..10b3bfe1e 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_15/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_15/qet_directory @@ -3,5 +3,6 @@ 15- Auslässe und Installationen für Leuchten 15- Lighting 15- Installations d'éclairage + 15- 照明用コンセント及び器具 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_16/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_16/qet_directory index 7df439329..fd8ad9867 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_16/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_16/qet_directory @@ -2,5 +2,6 @@ 16- Verschiedene Geräte 16- Appareils divers + 16- その他 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_17/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_17/qet_directory index add19ed42..1f4a9d675 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_17/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_17/qet_directory @@ -2,5 +2,6 @@ 17- Fertigteile für Kabel-Verteilsysteme 17- Canalisations préfabriquées + 17- 屋外設備 diff --git a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_18/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_18/qet_directory index f4d03497b..598e2245b 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_18/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/en_60617_11_18/qet_directory @@ -2,5 +2,6 @@ 18- Flugplatzbefeuerung und Anzeiger 18- Feux et indicateurs de navigation pour aéroports + 18- 航空灯火及び標識 diff --git a/elements/10_electric/91_en_60617/en_60617_11/qet_directory b/elements/10_electric/91_en_60617/en_60617_11/qet_directory index bbeead7ca..9b4c662e1 100644 --- a/elements/10_electric/91_en_60617/en_60617_11/qet_directory +++ b/elements/10_electric/91_en_60617/en_60617_11/qet_directory @@ -3,5 +3,6 @@ 11- Schémas et plans d'installation, architecturaux et topographiques 11- Dibujos y planos arquitectónicos y topográficos 11- Bygningsmæssige og topografiske installationstegninger og -skemaer + 11- 建築設備及び地図上の設備を示す設置平面図及び線図 From 012d969d929653634135009d3c2d40d127a98961 Mon Sep 17 00:00:00 2001 From: Yuki Atoh Date: Sun, 16 Aug 2020 13:01:19 +0900 Subject: [PATCH 06/24] Fix Japanese --- misc/translations_stat.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/translations_stat.pl b/misc/translations_stat.pl index c3971011c..6783f79c4 100755 --- a/misc/translations_stat.pl +++ b/misc/translations_stat.pl @@ -203,7 +203,7 @@ our %languages = ( 'qt' => 1 }, 'ja' => { - 'name' => '日本人', + 'name' => '日本語', 'french_name' => 'Japonais', 'translator_name' => 'Yuki', 'translator_mail_ml' => 'yuki.atoh@gmail.com', From 070cc2e4acba26ca4e4b6e455d0a73ab3a1a6099 Mon Sep 17 00:00:00 2001 From: Laurent Trinques Date: Sun, 16 Aug 2020 12:34:49 +0200 Subject: [PATCH 07/24] Typo --- sources/ui/configpage/generalconfigurationpage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sources/ui/configpage/generalconfigurationpage.cpp b/sources/ui/configpage/generalconfigurationpage.cpp index 1d1f85c10..adbd8294e 100644 --- a/sources/ui/configpage/generalconfigurationpage.cpp +++ b/sources/ui/configpage/generalconfigurationpage.cpp @@ -268,7 +268,7 @@ void GeneralConfigurationPage::fillLang() ui->m_lang_cb->addItem(QET::Icons::fr, tr("Français"), "fr"); ui->m_lang_cb->addItem(QET::Icons::hr, tr("Croate"), "hr"); ui->m_lang_cb->addItem(QET::Icons::it, tr("Italien"), "it"); - ui->m_lang_cb->addItem(QET::Icons::jp, tr("Japonaise"), "ja"); + ui->m_lang_cb->addItem(QET::Icons::jp, tr("Japonais"), "ja"); ui->m_lang_cb->addItem(QET::Icons::pl, tr("Polonais"), "pl"); ui->m_lang_cb->addItem(QET::Icons::pt, tr("Portugais"), "pt"); ui->m_lang_cb->addItem(QET::Icons::ro, tr("Roumains"), "ro"); From 3783a6a54322e51fdc3f5428300eef9ee2fc6212 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:07:46 +0200 Subject: [PATCH 08/24] Fix warning 'setParts' is not marked 'override' --- sources/editor/styleeditor.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/editor/styleeditor.h b/sources/editor/styleeditor.h index eba977076..6aa6abdf9 100644 --- a/sources/editor/styleeditor.h +++ b/sources/editor/styleeditor.h @@ -53,9 +53,9 @@ class StyleEditor : public ElementItemEditor // methods public: bool setPart(CustomElementPart *) override; - bool setParts(QList); + bool setParts(QList) override; CustomElementPart *currentPart() const override; - QList currentParts() const override; + QList currentParts() const override; static bool isStyleEditable (QList cep_list); From a83ee76f393ba6cc191f7be7f3527156be298ab6 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:19:38 +0200 Subject: [PATCH 09/24] Fix Copyright indentation --- .../ViewItem/qetgraphicsheaderitem.cpp | 24 +++++++++---------- .../ViewItem/qetgraphicstableitem.cpp | 24 +++++++++---------- .../ViewItem/qetgraphicstableitem.h | 24 +++++++++---------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp index 2f598c073..d4ffa3074 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetgraphicsheaderitem.h" #include "qabstractitemmodel.h" diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp index b76a9d00f..7978d9052 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.cpp @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #include "qetgraphicstableitem.h" #include "diagram.h" diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h index 35e5e449e..753e36f1a 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicstableitem.h @@ -1,19 +1,19 @@ /* - Copyright 2006-2020 QElectroTech Team - This file is part of QElectroTech. + Copyright 2006-2020 The QElectroTech Team + This file is part of QElectroTech. - QElectroTech is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 2 of the License, or - (at your option) any later version. + QElectroTech is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. - QElectroTech is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + QElectroTech is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with QElectroTech. If not, see . + You should have received a copy of the GNU General Public License + along with QElectroTech. If not, see . */ #ifndef QetGraphicsTableItem_H #define QetGraphicsTableItem_H From 4ed33109f4a3f822afd3e3a3233c9640fed7031c Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:21:55 +0200 Subject: [PATCH 10/24] Improve code style, Wrap code for better readability --- .../elementcollectionhandler.cpp | 3 +- .../elementcollectionhandler.h | 76 ++-- .../elementscollectionwidget.cpp | 327 ++++++++++++------ .../elementscollectionwidget.h | 8 +- .../ElementsCollection/ui/renamedialog.cpp | 16 +- sources/ElementsCollection/ui/renamedialog.h | 18 +- 6 files changed, 293 insertions(+), 155 deletions(-) diff --git a/sources/ElementsCollection/elementcollectionhandler.cpp b/sources/ElementsCollection/elementcollectionhandler.cpp index 4ef945e17..ad35b6a45 100644 --- a/sources/ElementsCollection/elementcollectionhandler.cpp +++ b/sources/ElementsCollection/elementcollectionhandler.cpp @@ -25,7 +25,8 @@ /******************************************************/ -ECHStrategy::ECHStrategy(ElementsLocation &source, ElementsLocation &destination) : +ECHStrategy::ECHStrategy(ElementsLocation &source, + ElementsLocation &destination) : m_source(source), m_destination (destination) {} diff --git a/sources/ElementsCollection/elementcollectionhandler.h b/sources/ElementsCollection/elementcollectionhandler.h index bbfc0568b..14128e7f9 100644 --- a/sources/ElementsCollection/elementcollectionhandler.h +++ b/sources/ElementsCollection/elementcollectionhandler.h @@ -25,13 +25,15 @@ class QWidget; /** @brief The ECHStrategy class - Abstract class for manage copy of directory or element from a collection to another + Abstract class for manage copy of directory + or element from a collection to another */ class ECHStrategy { - public: - ECHStrategy(ElementsLocation &source, ElementsLocation &destination); - virtual ~ECHStrategy(); + public: + ECHStrategy(ElementsLocation &source, + ElementsLocation &destination); + virtual ~ECHStrategy(); virtual ElementsLocation copy() =0; ElementsLocation m_source, m_destination; @@ -39,43 +41,62 @@ class ECHStrategy /** @brief The ECHSFileToFile class - Manage the copy of directory or element from a file system collection to another file system collection + Manage the copy of directory or element from a file system collection + to another file system collection */ class ECHSFileToFile : public ECHStrategy { - public: - ECHSFileToFile (ElementsLocation &source, ElementsLocation &destination); + public: + ECHSFileToFile (ElementsLocation &source, + ElementsLocation &destination); ElementsLocation copy() override; - private: - ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString& rename = QString()); - ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString& rename = QString()); + private: + ElementsLocation copyDirectory( + ElementsLocation &source, + ElementsLocation &destination, + const QString& rename = QString()); + ElementsLocation copyElement( + ElementsLocation &source, + ElementsLocation &destination, + const QString& rename = QString()); }; /** @brief The ECHSXmlToFile class - Manage the copy of a directory or element from an xml collection to a file. + Manage the copy of a directory or element from an xml collection + to a file. */ class ECHSXmlToFile : public ECHStrategy { public: - ECHSXmlToFile (ElementsLocation &source, ElementsLocation &destination); + ECHSXmlToFile (ElementsLocation &source, + ElementsLocation &destination); ElementsLocation copy() override; private: - ElementsLocation copyDirectory(ElementsLocation &source, ElementsLocation &destination, const QString& rename = QString()); - ElementsLocation copyElement(ElementsLocation &source, ElementsLocation &destination, const QString& rename = QString()); + ElementsLocation copyDirectory( + ElementsLocation &source, + ElementsLocation &destination, + const QString& rename = QString()); + ElementsLocation copyElement( + ElementsLocation &source, + ElementsLocation &destination, + const QString& rename = QString()); }; /** @brief The ECHSToXml class - Manage the copy of a directory or element from a collection (no matter if the source is a file system collection or an xml collection) + Manage the copy of a directory or element from a collection + (no matter if the source is a file system collection + or an xml collection) to an xml collection */ class ECHSToXml : public ECHStrategy { public: - ECHSToXml (ElementsLocation &source, ElementsLocation &destination); + ECHSToXml (ElementsLocation &source, + ElementsLocation &destination); ElementsLocation copy() override; }; @@ -86,17 +107,22 @@ class ECHSToXml : public ECHStrategy */ class ElementCollectionHandler { - public: - ElementCollectionHandler(); - ~ElementCollectionHandler(); + public: + ElementCollectionHandler(); + ~ElementCollectionHandler(); - ElementsLocation copy(ElementsLocation &source, ElementsLocation &destination); - ElementsLocation createDir(ElementsLocation &parent, const QString &name, const NamesList &name_list); - bool importFromProject (QETProject *project, ElementsLocation &location); - bool setNames(ElementsLocation &location, const NamesList &name_list); + ElementsLocation copy(ElementsLocation &source, + ElementsLocation &destination); + ElementsLocation createDir(ElementsLocation &parent, + const QString &name, + const NamesList &name_list); + bool importFromProject (QETProject *project, + ElementsLocation &location); + bool setNames(ElementsLocation &location, + const NamesList &name_list); - private: - ECHStrategy *m_strategy = nullptr; + private: + ECHStrategy *m_strategy = nullptr; }; #endif // ELEMENTCOLLECTIONHANDLER_H diff --git a/sources/ElementsCollection/elementscollectionwidget.cpp b/sources/ElementsCollection/elementscollectionwidget.cpp index df750a57f..f3acc4ee4 100644 --- a/sources/ElementsCollection/elementscollectionwidget.cpp +++ b/sources/ElementsCollection/elementscollectionwidget.cpp @@ -118,13 +118,15 @@ void ElementsCollectionWidget::highlightUnusedElement() Set the current item to be the item for @location @param location */ -void ElementsCollectionWidget::setCurrentLocation(const ElementsLocation &location) +void ElementsCollectionWidget::setCurrentLocation( + const ElementsLocation &location) { if (!location.exist()) return; - if (m_model) - m_tree_view->setCurrentIndex(m_model->indexFromLocation(location)); + if (m_model) + m_tree_view->setCurrentIndex( + m_model->indexFromLocation(location)); } void ElementsCollectionWidget::leaveEvent(QEvent *event) @@ -137,17 +139,29 @@ void ElementsCollectionWidget::leaveEvent(QEvent *event) void ElementsCollectionWidget::setUpAction() { - m_open_dir = new QAction(QET::Icons::FolderOpen, tr("Ouvrir le dossier correspondant"), this); - m_edit_element = new QAction(QET::Icons::ElementEdit, tr("Éditer l'élément"), this); - m_delete_element = new QAction(QET::Icons::ElementDelete, tr("Supprimer l'élément"), this); - m_delete_dir = new QAction(QET::Icons::FolderDelete, tr("Supprimer le dossier"), this); - m_reload = new QAction(QET::Icons::ViewRefresh, tr("Recharger les collections"), this); - m_edit_dir = new QAction(QET::Icons::FolderEdit, tr("Éditer le dossier"), this); - m_new_directory = new QAction(QET::Icons::FolderNew, tr("Nouveau dossier"), this); - m_new_element = new QAction(QET::Icons::ElementNew, tr("Nouvel élément"), this); - m_show_this_dir = new QAction(QET::Icons::FolderOnlyThis, tr("Afficher uniquement ce dossier"), this); - m_show_all_dir = new QAction(QET::Icons::FolderShowAll, tr("Afficher tous les dossiers"), this); - m_dir_propertie = new QAction(QET::Icons::FolderProperties, tr("Propriété du dossier"), this); + m_open_dir = new QAction(QET::Icons::FolderOpen, + tr("Ouvrir le dossier correspondant"), this); + m_edit_element = new QAction(QET::Icons::ElementEdit, + tr("Éditer l'élément"), this); + m_delete_element = new QAction(QET::Icons::ElementDelete, + tr("Supprimer l'élément"), this); + m_delete_dir = new QAction(QET::Icons::FolderDelete, + tr("Supprimer le dossier"), this); + m_reload = new QAction(QET::Icons::ViewRefresh, + tr("Recharger les collections"), this); + m_edit_dir = new QAction(QET::Icons::FolderEdit, + tr("Éditer le dossier"), this); + m_new_directory = new QAction(QET::Icons::FolderNew, + tr("Nouveau dossier"), this); + m_new_element = new QAction(QET::Icons::ElementNew, + tr("Nouvel élément"), this); + m_show_this_dir = new QAction(QET::Icons::FolderOnlyThis, + tr("Afficher uniquement ce dossier"), + this); + m_show_all_dir = new QAction(QET::Icons::FolderShowAll, + tr("Afficher tous les dossiers"), this); + m_dir_propertie = new QAction(QET::Icons::FolderProperties, + tr("Propriété du dossier"), this); } /** @@ -156,7 +170,7 @@ void ElementsCollectionWidget::setUpAction() */ void ElementsCollectionWidget::setUpWidget() { - //Setup the main layout + //Setup the main layout m_main_vlayout = new QVBoxLayout(this); this->setLayout(m_main_vlayout); @@ -165,7 +179,7 @@ void ElementsCollectionWidget::setUpWidget() m_search_field->setClearButtonEnabled(true); m_main_vlayout->addWidget(m_search_field); - //Setup the tree view + //Setup the tree view m_tree_view = new ElementsTreeView(this); m_tree_view->setHeaderHidden(true); m_tree_view->setIconSize(QSize(50, 50)); @@ -177,7 +191,7 @@ void ElementsCollectionWidget::setUpWidget() m_tree_view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); m_main_vlayout->addWidget(m_tree_view); - //Setup the progress bar + //Setup the progress bar m_progress_bar = new QProgressBar(this); m_progress_bar->setFormat(QObject::tr("chargement %p% (%v sur %m)")); @@ -193,26 +207,44 @@ void ElementsCollectionWidget::setUpWidget() */ void ElementsCollectionWidget::setUpConnection() { - connect(m_tree_view, &QTreeView::customContextMenuRequested, this, &ElementsCollectionWidget::customContextMenu); - connect(m_search_field, &QLineEdit::textEdited, [this]() {m_search_timer.start();}); - connect(&m_search_timer, &QTimer::timeout, this, &ElementsCollectionWidget::search); - connect(m_open_dir, &QAction::triggered, this, &ElementsCollectionWidget::openDir); - connect(m_edit_element, &QAction::triggered, this, &ElementsCollectionWidget::editElement); - connect(m_delete_element, &QAction::triggered, this, &ElementsCollectionWidget::deleteElement); - connect(m_delete_dir, &QAction::triggered, this, &ElementsCollectionWidget::deleteDirectory); - connect(m_reload, &QAction::triggered, this, &ElementsCollectionWidget::reload); - connect(m_edit_dir, &QAction::triggered, this, &ElementsCollectionWidget::editDirectory); - connect(m_new_directory, &QAction::triggered, this, &ElementsCollectionWidget::newDirectory); - connect(m_new_element, &QAction::triggered, this, &ElementsCollectionWidget::newElement); - connect(m_show_this_dir, &QAction::triggered, this, &ElementsCollectionWidget::showThisDir); - connect(m_show_all_dir, &QAction::triggered, this, &ElementsCollectionWidget::resetShowThisDir); - connect(m_dir_propertie, &QAction::triggered, this, &ElementsCollectionWidget::dirProperties); + connect(m_tree_view, &QTreeView::customContextMenuRequested, + this, &ElementsCollectionWidget::customContextMenu); + connect(m_search_field, &QLineEdit::textEdited, + [this]() {m_search_timer.start();}); + connect(&m_search_timer, &QTimer::timeout, + this, &ElementsCollectionWidget::search); + connect(m_open_dir, &QAction::triggered, + this, &ElementsCollectionWidget::openDir); + connect(m_edit_element, &QAction::triggered, + this, &ElementsCollectionWidget::editElement); + connect(m_delete_element, &QAction::triggered, + this, &ElementsCollectionWidget::deleteElement); + connect(m_delete_dir, &QAction::triggered, + this, &ElementsCollectionWidget::deleteDirectory); + connect(m_reload, &QAction::triggered, + this, &ElementsCollectionWidget::reload); + connect(m_edit_dir, &QAction::triggered, + this, &ElementsCollectionWidget::editDirectory); + connect(m_new_directory, &QAction::triggered, + this, &ElementsCollectionWidget::newDirectory); + connect(m_new_element, &QAction::triggered, + this, &ElementsCollectionWidget::newElement); + connect(m_show_this_dir, &QAction::triggered, + this, &ElementsCollectionWidget::showThisDir); + connect(m_show_all_dir, &QAction::triggered, + this, &ElementsCollectionWidget::resetShowThisDir); + connect(m_dir_propertie, &QAction::triggered, + this, &ElementsCollectionWidget::dirProperties); - connect(m_tree_view, &QTreeView::doubleClicked, [this](const QModelIndex &index) { - this->m_index_at_context_menu = index ; - this->editElement();}); + connect(m_tree_view, &QTreeView::doubleClicked, + [this](const QModelIndex &index) + { + this->m_index_at_context_menu = index ; + this->editElement(); + }); - connect(m_tree_view, &QTreeView::entered, [this] (const QModelIndex &index) { + connect(m_tree_view, &QTreeView::entered, + [this] (const QModelIndex &index) { QETDiagramEditor *qde = QETApp::diagramEditorAncestorOf(this); ElementCollectionItem *eci = elementCollectionItemForIndex(index); if (qde && eci) @@ -222,7 +254,7 @@ void ElementsCollectionWidget::setUpConnection() /** @brief ElementsCollectionWidget::customContextMenu - Display the context menu of this widget at @point + Display the context menu of this widget at point @param point */ void ElementsCollectionWidget::customContextMenu(const QPoint &point) @@ -232,7 +264,8 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) m_context_menu->clear(); - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); bool add_open_dir = false; if (eci->isElement()) @@ -241,7 +274,8 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) if (eci->type() == FileElementCollectionItem::Type) { add_open_dir = true; - FileElementCollectionItem *feci = static_cast(eci); + FileElementCollectionItem *feci = + static_cast(eci); if (!feci->isCommonCollection()) { if (feci->isDir()) @@ -260,7 +294,8 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) } if (eci->type() == XmlProjectElementCollectionItem::Type) { - XmlProjectElementCollectionItem *xpeci = static_cast(eci); + XmlProjectElementCollectionItem *xpeci = + static_cast(eci); if (xpeci->isCollectionRoot()) add_open_dir = true; } @@ -269,7 +304,7 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) if (eci->isDir()) { m_context_menu->addAction(m_show_this_dir); - //there is a current filtered dir, add entry to reset it + //there is a current filtered dir, add entry to reset it if (m_showed_index.isValid()) m_context_menu->addAction(m_show_all_dir); @@ -288,7 +323,8 @@ void ElementsCollectionWidget::customContextMenu(const QPoint &point) */ void ElementsCollectionWidget::openDir() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = + elementCollectionItemForIndex(m_index_at_context_menu); if (!eci) return; if (eci->type() == FileElementCollectionItem::Type) @@ -324,7 +360,10 @@ void ElementsCollectionWidget::editElement() app->openElementLocations(QList() << location); foreach (QETElementEditor *element_editor, app->elementEditors()) - connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved); + connect(element_editor, + &QETElementEditor::saveToLocation, + this, + &ElementsCollectionWidget::locationWasSaved); } /** @@ -333,28 +372,39 @@ void ElementsCollectionWidget::editElement() */ void ElementsCollectionWidget::deleteElement() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (!eci) return; ElementsLocation loc(eci->collectionPath()); - if (! (loc.isElement() && loc.exist() && loc.isFileSystem() && loc.collectionPath().startsWith("custom://")) ) return; + if (! (loc.isElement() + && loc.exist() + && loc.isFileSystem() + && loc.collectionPath().startsWith("custom://")) ) return; - if (QET::QetMessageBox::question(this, - tr("Supprimer l'élément ?", "message box title"), - tr("Êtes-vous sûr de vouloir supprimer cet élément ?\n", "message box content"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) + if (QET::QetMessageBox::question( + this, + tr("Supprimer l'élément ?", "message box title"), + tr("Êtes-vous sûr de vouloir supprimer cet élément ?\n", + "message box content"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QFile file(loc.fileSystemPath()); if (file.remove()) { - m_model->removeRows(m_index_at_context_menu.row(), 1, m_index_at_context_menu.parent()); + m_model->removeRows(m_index_at_context_menu.row(), + 1, + m_index_at_context_menu.parent()); } else { - QET::QetMessageBox::warning(this, - tr("Suppression de l'élément", "message box title"), - tr("La suppression de l'élément a échoué.", "message box content")); + QET::QetMessageBox::warning( + this, + tr("Suppression de l'élément", + "message box title"), + tr("La suppression de l'élément a échoué.", + "message box content")); } } } @@ -365,30 +415,40 @@ void ElementsCollectionWidget::deleteElement() */ void ElementsCollectionWidget::deleteDirectory() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (!eci) return; ElementsLocation loc (eci->collectionPath()); - if (! (loc.isDirectory() && loc.exist() && loc.isFileSystem() && loc.collectionPath().startsWith("custom://")) ) return; + if (! (loc.isDirectory() + && loc.exist() + && loc.isFileSystem() + && loc.collectionPath().startsWith("custom://")) ) return; - if (QET::QetMessageBox::question(this, - tr("Supprimer le dossier?", "message box title"), - tr("Êtes-vous sûr de vouloir supprimer le dossier ?\n" - "Tout les éléments et les dossier contenus dans ce dossier seront supprimés.", - "message box content"), - QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) + if (QET::QetMessageBox::question( + this, + tr("Supprimer le dossier?", "message box title"), + tr("Êtes-vous sûr de vouloir supprimer le dossier ?\n" + "Tout les éléments et les dossier contenus dans ce dossier seront supprimés.", + "message box content"), + QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) { QDir dir (loc.fileSystemPath()); if (dir.removeRecursively()) { - m_model->removeRows(m_index_at_context_menu.row(), 1, m_index_at_context_menu.parent()); + m_model->removeRows(m_index_at_context_menu.row(), + 1, + m_index_at_context_menu.parent()); } else { - QET::QetMessageBox::warning(this, - tr("Suppression du dossier", "message box title"), - tr("La suppression du dossier a échoué.", "message box content")); + QET::QetMessageBox::warning( + this, + tr("Suppression du dossier", + "message box title"), + tr("La suppression du dossier a échoué.", + "message box content")); } } } @@ -399,11 +459,13 @@ void ElementsCollectionWidget::deleteDirectory() */ void ElementsCollectionWidget::editDirectory() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (eci->type() != FileElementCollectionItem::Type) return; - FileElementCollectionItem *feci = static_cast(eci); + FileElementCollectionItem *feci = + static_cast(eci); if(feci->isCommonCollection()) return; ElementsLocation location(feci->collectionPath()); @@ -419,11 +481,13 @@ void ElementsCollectionWidget::editDirectory() */ void ElementsCollectionWidget::newDirectory() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (eci->type() != FileElementCollectionItem::Type) return; - FileElementCollectionItem *feci = static_cast(eci); + FileElementCollectionItem *feci = + static_cast(eci); if(feci->isCommonCollection()) return; ElementsLocation location(feci->collectionPath()); @@ -438,13 +502,15 @@ void ElementsCollectionWidget::newDirectory() */ void ElementsCollectionWidget::newElement() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (eci->type() != FileElementCollectionItem::Type) { return; } - FileElementCollectionItem *feci = static_cast(eci); + FileElementCollectionItem *feci = + static_cast(eci); if(feci->isCommonCollection()) { return; } @@ -454,8 +520,12 @@ void ElementsCollectionWidget::newElement() elmt_wizard.preselectedLocation(loc); elmt_wizard.exec(); - foreach (QETElementEditor *element_editor, QETApp::instance()->elementEditors()) - connect(element_editor, &QETElementEditor::saveToLocation, this, &ElementsCollectionWidget::locationWasSaved); + foreach (QETElementEditor *element_editor, + QETApp::instance()->elementEditors()) + connect(element_editor, + &QETElementEditor::saveToLocation, + this, + &ElementsCollectionWidget::locationWasSaved); } /** @@ -467,7 +537,8 @@ void ElementsCollectionWidget::showThisDir() //Disable the yellow background of the previous index if (m_showed_index.isValid()) { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_showed_index); + ElementCollectionItem *eci = + elementCollectionItemForIndex(m_showed_index); if (eci) eci->setBackground(QBrush()); } @@ -477,9 +548,10 @@ void ElementsCollectionWidget::showThisDir() { hideCollection(true); showAndExpandItem(m_showed_index, true, true); - ElementCollectionItem *eci = elementCollectionItemForIndex(m_showed_index); + ElementCollectionItem *eci = + elementCollectionItemForIndex(m_showed_index); if (eci) - eci->setBackground(QBrush(QColor(255, 204, 0, 255))); + eci->setBackground(QBrush(QColor(255, 204, 0, 255))); search(); } else @@ -495,7 +567,8 @@ void ElementsCollectionWidget::resetShowThisDir() { if (m_showed_index.isValid()) { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_showed_index); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_showed_index); if (eci) eci->setBackground(QBrush()); } @@ -510,19 +583,28 @@ void ElementsCollectionWidget::resetShowThisDir() */ void ElementsCollectionWidget::dirProperties() { - ElementCollectionItem *eci = elementCollectionItemForIndex(m_index_at_context_menu); + ElementCollectionItem *eci = elementCollectionItemForIndex( + m_index_at_context_menu); if (eci && eci->isDir()) { - QString txt1 = tr("Le dossier %1 contient").arg(eci->localName()); - QString txt2 = tr("%n élément(s), répartie(s)", "", eci->elementsChild().size()); - QString txt3 = tr("dans %n dossier(s).", "" , eci->directoriesChild().size()); - QString txt4 = tr("Chemin de la collection : %1").arg(eci->collectionPath()); + QString txt1 = tr("Le dossier %1 contient").arg( + eci->localName()); + QString txt2 = tr("%n élément(s), répartie(s)", + "", + eci->elementsChild().size()); + QString txt3 = tr("dans %n dossier(s).", + "" , + eci->directoriesChild().size()); + QString txt4 = tr("Chemin de la collection : %1").arg( + eci->collectionPath()); QString txt5; if (eci->type() == FileElementCollectionItem::Type) { - txt5 = tr("Chemin dans le système de fichiers : %1").arg(static_cast(eci)->fileSystemPath()); + txt5 = tr("Chemin dans le système de fichiers : %1") + .arg(static_cast(eci)->fileSystemPath()); } - QMessageBox::information(this, - tr("Propriété du dossier %1").arg(eci->localName()), - txt1 + " " + txt2 + " " + txt3 + "\n\n" + txt4 + "\n" + txt5); + QMessageBox::information( + this, + tr("Propriété du dossier %1").arg(eci->localName()), + txt1 + " " + txt2 + " " + txt3 + "\n\n" + txt4 + "\n" + txt5); } } @@ -532,9 +614,13 @@ void ElementsCollectionWidget::dirProperties() void ElementsCollectionWidget::reload() { m_progress_bar->show(); - m_progress_bar->setValue(1); //Force to repaint now, else progress bar will be not displayed immediately + // Force to repaint now, + // else progress bar will be not displayed immediately + m_progress_bar->setValue(1); m_tree_view->setDisabled(true); - m_tree_view->repaint(); //Force to repaint now, else tree view will be not disabled immediately + // Force to repaint now, + // else tree view will be not disabled immediately + m_tree_view->repaint(); QList project_list; project_list.append(m_waiting_project); @@ -546,9 +632,18 @@ void ElementsCollectionWidget::reload() m_new_model->deleteLater(); } m_new_model = new ElementsCollectionModel(m_tree_view); - connect(m_new_model, &ElementsCollectionModel::loadingProgressRangeChanged, m_progress_bar, &QProgressBar::setRange); - connect(m_new_model, &ElementsCollectionModel::loadingProgressValueChanged, m_progress_bar, &QProgressBar::setValue); - connect(m_new_model, &ElementsCollectionModel::loadingFinished, this, &ElementsCollectionWidget::loadingFinished); + connect(m_new_model, + &ElementsCollectionModel::loadingProgressRangeChanged, + m_progress_bar, + &QProgressBar::setRange); + connect(m_new_model, + &ElementsCollectionModel::loadingProgressValueChanged, + m_progress_bar, + &QProgressBar::setValue); + connect(m_new_model, + &ElementsCollectionModel::loadingFinished, + this, + &ElementsCollectionWidget::loadingFinished); m_new_model->loadCollections(true, true, project_list); } @@ -580,14 +675,16 @@ void ElementsCollectionWidget::loadingFinished() /** @brief ElementsCollectionWidget::locationWasSaved - This method is connected with the signal savedToLocation of Element editor (see ElementsCollectionWidget::editElement()) + This method is connected with the signal savedToLocation + of Element editor (see ElementsCollectionWidget::editElement()) Update or add the item represented by location to m_model @param location */ -void ElementsCollectionWidget::locationWasSaved(const ElementsLocation& location) +void ElementsCollectionWidget::locationWasSaved( + const ElementsLocation& location) { - //Because this method update an item in the model, location must - //represente an existing element (in file system of project) + //Because this method update an item in the model, location must + //represente an existing element (in file system of project) if (!location.exist()) return; @@ -607,8 +704,9 @@ void ElementsCollectionWidget::locationWasSaved(const ElementsLocation& location /** @brief ElementsCollectionWidget::search - Search every item (directory or element) that match the text of m_search_field - and display it, other item who does not match @text is hidden + Search every item (directory or element) + that match the text of m_search_field and display it, + other item who does not match text is hidden */ void ElementsCollectionWidget::search() { @@ -627,7 +725,7 @@ void ElementsCollectionWidget::search() else expandFirstItems(); - //Expand the tree and scroll to the last selected index + //Expand the tree and scroll to the last selected index if (current_index.isValid()) { showAndExpandItem(current_index); @@ -646,8 +744,14 @@ void ElementsCollectionWidget::search() #endif QModelIndexList match_index; foreach (QString txt, text_list) { - match_index << m_model->match(m_showed_index.isValid() ? m_model->index(0,0,m_showed_index) : m_model->index(0,0), - Qt::UserRole+1, QVariant(txt), -1, Qt::MatchContains | Qt::MatchRecursive); + match_index << m_model->match(m_showed_index.isValid() + ? m_model->index(0,0,m_showed_index) + : m_model->index(0,0), + Qt::UserRole+1, + QVariant(txt), + -1, + Qt::MatchContains + | Qt::MatchRecursive); } foreach(QModelIndex index, match_index) @@ -667,12 +771,15 @@ void ElementsCollectionWidget::hideCollection(bool hide) /** @brief ElementsCollectionWidget::hideItem - Hide the item @index. If @recursive is true, hide all subchilds of @index + 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 recursive- true = apply to child , false = only for index */ -void ElementsCollectionWidget::hideItem(bool hide, const QModelIndex &index, bool recursive) +void ElementsCollectionWidget::hideItem(bool hide, + const QModelIndex &index, + bool recursive) { m_tree_view->setRowHidden(index.row(), index.parent(), hide); @@ -683,14 +790,16 @@ void ElementsCollectionWidget::hideItem(bool hide, const QModelIndex &index, boo /** @brief ElementsCollectionWidget::showAndExpandItem - Show the item @index and expand it. - If parent is true, ensure parents of @index is show and expanded - If child is true, ensure all childs of @index is show and expended + Show the item index and expand it. + If parent is true, ensure parents of index is show and expanded + If child is true, ensure all childs of index is show and expended @param index- index to show @param parent- Apply to parent @param child- Apply to all childs */ -void ElementsCollectionWidget::showAndExpandItem(const QModelIndex &index, bool parent, bool child) +void ElementsCollectionWidget::showAndExpandItem(const QModelIndex &index, + bool parent, + bool child) { if (index.isValid()) { if (parent) @@ -706,9 +815,11 @@ void ElementsCollectionWidget::showAndExpandItem(const QModelIndex &index, bool @param index @return The internal pointer of index casted to ElementCollectionItem; */ -ElementCollectionItem *ElementsCollectionWidget::elementCollectionItemForIndex(const QModelIndex &index) { +ElementCollectionItem *ElementsCollectionWidget::elementCollectionItemForIndex( + const QModelIndex &index) { if (!index.isValid()) return nullptr; - return static_cast(m_model->itemFromIndex(index)); + return static_cast( + m_model->itemFromIndex(index)); } diff --git a/sources/ElementsCollection/elementscollectionwidget.h b/sources/ElementsCollection/elementscollectionwidget.h index 612981680..4b3bb74a1 100644 --- a/sources/ElementsCollection/elementscollectionwidget.h +++ b/sources/ElementsCollection/elementscollectionwidget.h @@ -41,12 +41,12 @@ class ElementsTreeView; */ class ElementsCollectionWidget : public QWidget { - Q_OBJECT + Q_OBJECT - public: - ElementsCollectionWidget(QWidget *parent = nullptr); + public: + ElementsCollectionWidget(QWidget *parent = nullptr); - void expandFirstItems(); + void expandFirstItems(); void addProject (QETProject *project); void removeProject (QETProject *project); diff --git a/sources/ElementsCollection/ui/renamedialog.cpp b/sources/ElementsCollection/ui/renamedialog.cpp index 9ca1f7bde..09b4feaf1 100644 --- a/sources/ElementsCollection/ui/renamedialog.cpp +++ b/sources/ElementsCollection/ui/renamedialog.cpp @@ -21,12 +21,12 @@ #include "ui_renamedialog.h" RenameDialog::RenameDialog(QString path, QWidget *parent) : - QDialog(parent), - ui(new Ui::RenameDialog), - m_path(std::move(path)) + QDialog(parent), + ui(new Ui::RenameDialog), + m_path(std::move(path)) { - ui->setupUi(this); - m_name = m_path.split("/").last(); + ui->setupUi(this); + m_name = m_path.split("/").last(); if (m_name.endsWith(".elmt")) m_name.remove(".elmt"); ui->m_label->setText(tr("L'élément « %1 » existe déjà. Que souhaitez-vous faire ?").arg(m_path)); ui->lineEdit->setText(m_name + QDate::currentDate().toString("dd-MM-yy")); @@ -34,14 +34,14 @@ RenameDialog::RenameDialog(QString path, QWidget *parent) : RenameDialog::~RenameDialog() { - delete ui; + delete ui; } void RenameDialog::on_lineEdit_textEdited(const QString &arg1) { - if (arg1.isEmpty() || (arg1 == m_name)) + if (arg1.isEmpty() || (arg1 == m_name)) ui->m_rename_pb->setDisabled(true); - else + else ui->m_rename_pb->setEnabled(true); } diff --git a/sources/ElementsCollection/ui/renamedialog.h b/sources/ElementsCollection/ui/renamedialog.h index f2db9ab34..9f22d2ae5 100644 --- a/sources/ElementsCollection/ui/renamedialog.h +++ b/sources/ElementsCollection/ui/renamedialog.h @@ -27,25 +27,25 @@ namespace Ui { class RenameDialog : public QDialog { - Q_OBJECT + Q_OBJECT - public: - explicit RenameDialog(QString path, QWidget *parent = nullptr); - ~RenameDialog() override; + public: + explicit RenameDialog(QString path, QWidget *parent = nullptr); + ~RenameDialog() override; QString newName() const {return m_new_name;} QET::Action selectedAction() const {return m_action;} - private slots: - void on_lineEdit_textEdited(const QString &arg1); + private slots: + void on_lineEdit_textEdited(const QString &arg1); void on_m_erase_pb_clicked(); void on_m_rename_pb_clicked(); void on_m_cancel_pb_clicked(); private: - Ui::RenameDialog *ui; - QString m_path; - QString m_name; + Ui::RenameDialog *ui; + QString m_path; + QString m_name; QString m_new_name; QET::Action m_action; }; From e9fcd385d5616187b02cb12cc0fa8d71a0ac4ce7 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:22:12 +0200 Subject: [PATCH 11/24] Improve code style, Wrap code for better readability --- .../propertieseditordockwidget.cpp | 2 +- .../qetgraphicshandleritem.cpp | 36 +++++++++++-------- .../qetgraphicshandleritem.h | 30 ++++++++++------ 3 files changed, 42 insertions(+), 26 deletions(-) diff --git a/sources/PropertiesEditor/propertieseditordockwidget.cpp b/sources/PropertiesEditor/propertieseditordockwidget.cpp index 497eebefb..5ac7cac25 100644 --- a/sources/PropertiesEditor/propertieseditordockwidget.cpp +++ b/sources/PropertiesEditor/propertieseditordockwidget.cpp @@ -52,7 +52,7 @@ void PropertiesEditorDockWidget::clear() { m_editor_list.removeOne(editor); ui->m_main_vlayout->removeWidget(editor); - delete editor; + delete editor; } m_editor_list.clear(); diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp index 8f1bfe79a..db25f8dab 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.cpp @@ -57,18 +57,24 @@ void QetGraphicsHandlerItem::setColor(QColor color) @param option @param widget */ -void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +void QetGraphicsHandlerItem::paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, + QWidget *widget) { Q_UNUSED(option) Q_UNUSED(widget) - painter->save(); - painter->setBrush(QBrush(m_color)); - QPen pen(QBrush(m_color), 2, Qt::SolidLine, Qt::SquareCap, Qt::MiterJoin); + painter->save(); + painter->setBrush(QBrush(m_color)); + QPen pen(QBrush(m_color), + 2, + Qt::SolidLine, + Qt::SquareCap, + Qt::MiterJoin); pen.setCosmetic(true); - painter->setPen(pen); + painter->setPen(pen); painter->setRenderHint(QPainter::Antialiasing, true); - painter->drawEllipse(m_handler_rect); + painter->drawEllipse(m_handler_rect); painter->restore(); } @@ -77,15 +83,17 @@ void QetGraphicsHandlerItem::paint(QPainter *painter, const QStyleOptionGraphics @param points @return A list of handler with pos at point */ -QVector QetGraphicsHandlerItem::handlerForPoint(const QVector &points, int size) +QVector QetGraphicsHandlerItem::handlerForPoint( + const QVector &points, + int size) { - QVector list_; - for (QPointF point : points) - { - QetGraphicsHandlerItem *qghi = new QetGraphicsHandlerItem(size); - qghi->setPos(point); - list_ << qghi; - } + QVector list_; + for (QPointF point : points) + { + QetGraphicsHandlerItem *qghi = new QetGraphicsHandlerItem(size); + qghi->setPos(point); + list_ << qghi; + } return list_; } diff --git a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h index c1a6c2760..270b30123 100644 --- a/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h +++ b/sources/QetGraphicsItemModeler/qetgraphicshandleritem.h @@ -23,34 +23,42 @@ /** @brief The QetGraphicsHandlerItem class - This graphics item represents a point, destined to be used as an handler, + This graphics item represents a point, + destined to be used as an handler, for modifie the geometrie of a another graphics item (like shapes). - The graphics item to be modified, must call "installSceneEventFilter" of this item with itself for argument,. - The ghraphics item to be modified, need to reimplement "sceneEventFilter" for create the modification behavior. + The graphics item to be modified, + must call "installSceneEventFilter" + of this item with itself for argument,. + The ghraphics item to be modified, + need to reimplement "sceneEventFilter" + for create the modification behavior. */ class QetGraphicsHandlerItem : public QGraphicsItem { - public: - QetGraphicsHandlerItem(qreal size = 10); - QRectF boundingRect() const override; + public: + QetGraphicsHandlerItem(qreal size = 10); + QRectF boundingRect() const override; enum { Type = UserType + 1200}; int type() const override {return Type;} void setColor(QColor color); - protected: - void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; + protected: + void paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, + QWidget *widget) override; - private: + private: QRectF m_handler_rect, m_br; - qreal m_size; + qreal m_size; QColor m_color; QPen m_pen; public: - static QVector handlerForPoint(const QVector &points, int size = 10); + static QVector handlerForPoint( + const QVector &points, int size = 10); }; #endif // QETGRAPHICSHANDLERITEM_H From 60a5a833200f6ab89485dd4a0bc145cd1b672208 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:22:21 +0200 Subject: [PATCH 12/24] Improve code style, Wrap code for better readability --- .../ui/replaceconductordialog.cpp | 111 +++++++++--- .../ui/replacefoliowidget.cpp | 44 +++-- .../ui/searchandreplacewidget.cpp | 159 +++++++++++++----- .../ui/searchandreplacewidget.h | 30 +++- 4 files changed, 251 insertions(+), 93 deletions(-) diff --git a/sources/SearchAndReplace/ui/replaceconductordialog.cpp b/sources/SearchAndReplace/ui/replaceconductordialog.cpp index f0e1e6e7a..9719c7a1e 100644 --- a/sources/SearchAndReplace/ui/replaceconductordialog.cpp +++ b/sources/SearchAndReplace/ui/replaceconductordialog.cpp @@ -45,8 +45,9 @@ ReplaceConductorDialog::~ReplaceConductorDialog() /** @brief ReplaceConductorDialog::updatePreview Update the preview for single line - @param b true: update from the value displayed by this widget - false: update from the properties given at the constructor of this widget + @param b : + true: update from the value displayed by this widget + false: update from the properties given at the constructor of this widget */ void ReplaceConductorDialog::updatePreview(bool b) { @@ -158,37 +159,66 @@ ConductorProperties ReplaceConductorDialog::properties() const } properties_.verti_rotate_text = ui->m_vertical_angle_sb->value(); properties_.horiz_rotate_text = ui->m_horizontal_angle_sb->value(); - properties_.color = ui->m_mod_color_cb->isChecked() ? ui->m_color_pb->palette().color(QPalette::Button) : QColor(); - properties_.style = ui->m_line_style_cb->itemData(ui->m_line_style_cb->currentIndex()).value().style(); + properties_.color = ui->m_mod_color_cb->isChecked() + ? ui->m_color_pb->palette().color(QPalette::Button) + : QColor(); + properties_.style = ui->m_line_style_cb->itemData( + ui->m_line_style_cb->currentIndex()) + .value() + .style(); properties_.cond_size = ui->m_cond_size_sb->value(); properties_.m_bicolor = ui->m_second_color_gb->isChecked(); - properties_.m_color_2 = ui->m_mod_color_2_cb->isChecked() ? ui->m_color_2_pb->palette().color(QPalette::Button) : QColor(); + properties_.m_color_2 = ui->m_mod_color_2_cb->isChecked() + ? ui->m_color_2_pb->palette().color(QPalette::Button) + : QColor(); properties_.m_dash_size = ui->m_color_2_dash_size_sb->value(); - properties_.singleLineProperties.hasGround = ui->m_earth_cb->isChecked(); - properties_.singleLineProperties.hasNeutral = ui->m_neutral_cb->isChecked(); - properties_.singleLineProperties.is_pen = ui->m_pen_cb->isChecked(); - properties_.singleLineProperties.setPhasesCount(ui->m_phase_cb->isChecked() ? ui->m_phase_sb->value() : 0); + properties_.singleLineProperties.hasGround = + ui->m_earth_cb->isChecked(); + properties_.singleLineProperties.hasNeutral = + ui->m_neutral_cb->isChecked(); + properties_.singleLineProperties.is_pen = + ui->m_pen_cb->isChecked(); + properties_.singleLineProperties.setPhasesCount( + ui->m_phase_cb->isChecked() + ? ui->m_phase_sb->value() + : 0); return properties_; } void ReplaceConductorDialog::initWidget() { - connect(ui->m_button_box, &QDialogButtonBox::clicked, [this](QAbstractButton *button_) { + connect(ui->m_button_box, &QDialogButtonBox::clicked, + [this](QAbstractButton *button_) { this->done(ui->m_button_box->buttonRole(button_)); }); ui->m_update_preview_pb->setHidden(true); ui->m_line_style_cb->addItem(tr("Ne pas modifier"), QPen(Qt::NoPen)); - ui->m_line_style_cb->addItem(tr("Trait plein", "conductor style: solid line"), QPen(Qt::SolidLine)); - ui->m_line_style_cb->addItem(tr("Trait en pointillés", "conductor style: dashed line"), QPen(Qt::DashLine)); - ui->m_line_style_cb->addItem(tr("Traits et points", "conductor style: dashed and dotted line"), QPen(Qt::DashDotLine)); + ui->m_line_style_cb->addItem(tr("Trait plein", + "conductor style: solid line"), + QPen(Qt::SolidLine)); + ui->m_line_style_cb->addItem(tr("Trait en pointillés", + "conductor style: dashed line"), + QPen(Qt::DashLine)); + ui->m_line_style_cb->addItem(tr("Traits et points", + "conductor style: dashed and dotted line"), + QPen(Qt::DashDotLine)); - connect(ui->m_multi_gb, &QGroupBox::toggled, [this](bool toggle) {this->ui->m_singlewire_gb->setChecked(!toggle);}); - connect(ui->m_singlewire_gb, &QGroupBox::toggled, [this](bool toggle) {this->ui->m_multi_gb->setChecked(!toggle);}); - connect(ui->m_formula_le, &QLineEdit::textChanged, [this](QString text) {this->ui->m_text_le->setEnabled(text.isEmpty());}); + connect(ui->m_multi_gb, + &QGroupBox::toggled, + [this](bool toggle) + {this->ui->m_singlewire_gb->setChecked(!toggle);}); + connect(ui->m_singlewire_gb, + &QGroupBox::toggled, + [this](bool toggle) + {this->ui->m_multi_gb->setChecked(!toggle);}); + connect(ui->m_formula_le, + &QLineEdit::textChanged, + [this](QString text) + {this->ui->m_text_le->setEnabled(text.isEmpty());}); ui->m_multi_gb->setChecked(true); ui->m_singlewire_gb->setChecked(true); } @@ -197,50 +227,75 @@ void ReplaceConductorDialog::setColorButton(const QColor &color) { QPalette palette; palette.setColor(QPalette::Button, color); - ui->m_color_pb->setStyleSheet(QString("background-color: %1; min-height: 1.5em; border-style: outset; border-width: 2px; border-color: gray; border-radius: 4px;").arg(color.name())); + ui->m_color_pb->setStyleSheet( + QString("background-color: %1; min-height: 1.5em; border-style:" + " outset; border-width: 2px; border-color: gray;" + " border-radius: 4px;").arg(color.name())); } void ReplaceConductorDialog::setColorButton2(const QColor &color) { QPalette palette; palette.setColor(QPalette::Button, color); - ui->m_color_2_pb->setStyleSheet(QString("background-color: %1; min-height: 1.5em; border-style: outset; border-width: 2px; border-color: gray; border-radius: 4px;").arg(color.name())); + ui->m_color_2_pb->setStyleSheet( + QString("background-color: %1;" + " min-height: 1.5em; border-style:" + " outset; border-width: 2px;" + " border-color: gray;" + " border-radius: 4px;").arg( + color.name())); } void ReplaceConductorDialog::on_m_erase_formula_cb_clicked() { - ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_formula_le->setText(ui->m_erase_formula_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_formula_le->setDisabled(ui->m_erase_formula_cb->isChecked()); } void ReplaceConductorDialog::on_m_erase_text_cb_clicked() { - ui->m_text_le->setText(ui->m_erase_text_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_text_le->setText(ui->m_erase_text_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_text_le->setDisabled(ui->m_erase_text_cb->isChecked()); } void ReplaceConductorDialog::on_m_erase_function_cb_clicked() { - ui->m_function_le->setText(ui->m_erase_function_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_function_le->setText(ui->m_erase_function_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_function_le->setDisabled(ui->m_erase_function_cb->isChecked()); } void ReplaceConductorDialog::on_m_erase_tension_protocol_cb_clicked() { - ui->m_tension_protocol_le->setText(ui->m_erase_tension_protocol_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); - ui->m_tension_protocol_le->setDisabled(ui->m_erase_tension_protocol_cb->isChecked()); + ui->m_tension_protocol_le->setText( + ui->m_erase_tension_protocol_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); + ui->m_tension_protocol_le->setDisabled( + ui->m_erase_tension_protocol_cb->isChecked()); } void ReplaceConductorDialog::on_m_erase_m_wire_color_cb_clicked() { - ui->m_wire_color_le->setText(ui->m_erase_wire_color_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); - ui->m_wire_color_le->setDisabled(ui->m_erase_wire_color_cb->isChecked()); + ui->m_wire_color_le->setText(ui->m_erase_wire_color_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); + ui->m_wire_color_le->setDisabled( + ui->m_erase_wire_color_cb->isChecked()); } void ReplaceConductorDialog::on_m_erase_m_wire_section_cb_clicked() { - ui->m_wire_section_le->setText(ui->m_erase_wire_section_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); - ui->m_wire_section_le->setDisabled(ui->m_erase_wire_section_cb->isChecked()); + ui->m_wire_section_le->setText(ui->m_erase_wire_section_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); + ui->m_wire_section_le->setDisabled( + ui->m_erase_wire_section_cb->isChecked()); } void ReplaceConductorDialog::on_m_earth_cb_toggled(bool checked) @@ -262,7 +317,7 @@ void ReplaceConductorDialog::on_m_neutral_cb_toggled(bool checked) } void ReplaceConductorDialog::on_m_update_preview_pb_clicked() { - updatePreview(); + updatePreview(); } void ReplaceConductorDialog::on_m_color_pb_clicked() diff --git a/sources/SearchAndReplace/ui/replacefoliowidget.cpp b/sources/SearchAndReplace/ui/replacefoliowidget.cpp index ba36810f6..40cedbc74 100644 --- a/sources/SearchAndReplace/ui/replacefoliowidget.cpp +++ b/sources/SearchAndReplace/ui/replacefoliowidget.cpp @@ -75,7 +75,8 @@ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const Set the title block properties edited by this widget @param properties */ -void ReplaceFolioWidget::setTitleBlockProperties(const TitleBlockProperties &properties) +void ReplaceFolioWidget::setTitleBlockProperties( + const TitleBlockProperties &properties) { sarw::setupLineEdit(ui->m_title_le, ui->m_title_cb, properties.title); sarw::setupLineEdit(ui->m_author_le, ui->m_author_cb, properties.author); @@ -118,9 +119,15 @@ ReplaceFolioDialog::ReplaceFolioDialog(QWidget *parent) : { QVBoxLayout *layout = new QVBoxLayout(this); layout->addWidget(m_widget = new ReplaceFolioWidget(this)); - layout->addWidget(m_button_box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Reset, this)); + layout->addWidget(m_button_box = new QDialogButtonBox( + QDialogButtonBox::Ok + | QDialogButtonBox::Cancel + | QDialogButtonBox::Reset, + this)); - connect(m_button_box, &QDialogButtonBox::clicked, [this](QAbstractButton *button_) + connect(m_button_box, + &QDialogButtonBox::clicked, + [this](QAbstractButton *button_) { this->done(m_button_box->buttonRole(button_)); }); @@ -141,40 +148,55 @@ TitleBlockProperties ReplaceFolioDialog::titleBlockProperties() const { @brief ReplaceFolioDialog::setTitleBlockProperties @param properties : set the title block properties edited by this dialog */ -void ReplaceFolioDialog::setTitleBlockProperties(const TitleBlockProperties &properties) { +void ReplaceFolioDialog::setTitleBlockProperties( + const TitleBlockProperties &properties) { m_widget->setTitleBlockProperties(properties); } void ReplaceFolioWidget::on_m_title_cb_clicked() { - ui->m_title_le->setText(ui->m_title_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_title_le->setText(ui->m_title_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_title_le->setDisabled(ui->m_title_cb->isChecked()); } void ReplaceFolioWidget::on_m_author_cb_clicked() { - ui->m_author_le->setText(ui->m_author_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_author_le->setText(ui->m_author_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_author_le->setDisabled(ui->m_author_cb->isChecked()); } void ReplaceFolioWidget::on_m_file_cb_clicked() { - ui->m_file_le->setText(ui->m_file_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_file_le->setText(ui->m_file_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_file_le->setDisabled(ui->m_file_cb->isChecked()); } void ReplaceFolioWidget::on_m_folio_cb_clicked() { - ui->m_folio_le->setText(ui->m_folio_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_folio_le->setText(ui->m_folio_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_folio_le->setDisabled(ui->m_folio_cb->isChecked()); } void ReplaceFolioWidget::on_m_plant_cb_clicked() { - ui->m_plant->setText(ui->m_plant_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_plant->setText(ui->m_plant_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_plant->setDisabled(ui->m_plant_cb->isChecked()); } void ReplaceFolioWidget::on_m_loc_cb_clicked() { - ui->m_loc->setText(ui->m_loc_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_loc->setText(ui->m_loc_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_loc->setDisabled(ui->m_loc_cb->isChecked()); } void ReplaceFolioWidget::on_m_indice_cb_clicked() { - ui->m_indice->setText(ui->m_indice_cb->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->m_indice->setText(ui->m_indice_cb->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->m_indice->setDisabled(ui->m_indice_cb->isChecked()); } diff --git a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp index c4405f5ba..51aec37fc 100644 --- a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp +++ b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp @@ -46,8 +46,15 @@ SearchAndReplaceWidget::SearchAndReplaceWidget(QWidget *parent) : { ui->setupUi(this); - m_horizontal_animation = new QWidgetAnimation(ui->m_advanced_button_widget, Qt::Horizontal, QWidgetAnimation::minimumSizeHint, 250); - m_vertical_animation = new QWidgetAnimation(ui->m_advanced_widget, Qt::Vertical, QWidgetAnimation::availableSpace, 250); + m_horizontal_animation = new QWidgetAnimation( + ui->m_advanced_button_widget, + Qt::Horizontal, + QWidgetAnimation::minimumSizeHint, + 250); + m_vertical_animation = new QWidgetAnimation( + ui->m_advanced_widget, + Qt::Vertical, + QWidgetAnimation::availableSpace, 250); QVector v; v << ui->m_header_widget; m_vertical_animation->widgetToSubtract(v); @@ -55,7 +62,8 @@ SearchAndReplaceWidget::SearchAndReplaceWidget(QWidget *parent) : setHideAdvanced(true); setUpTreeItems(); - connect(ui->m_search_le, &QLineEdit::textEdited, this, &SearchAndReplaceWidget::search); + connect(ui->m_search_le, &QLineEdit::textEdited, + this, &SearchAndReplaceWidget::search); } /** @@ -101,7 +109,8 @@ bool SearchAndReplaceWidget::event(QEvent *event) */ void SearchAndReplaceWidget::clear() { - disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, this, &SearchAndReplaceWidget::itemChanged); + disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, + this, &SearchAndReplaceWidget::itemChanged); qDeleteAll(m_diagram_hash.keys()); m_diagram_hash.clear(); @@ -223,7 +232,8 @@ void SearchAndReplaceWidget::setHideAdvanced(bool hide) */ void SearchAndReplaceWidget::fillItemsList() { - disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, this, &SearchAndReplaceWidget::itemChanged); + disconnect(ui->m_tree_widget, &QTreeWidget::itemChanged, + this, &SearchAndReplaceWidget::itemChanged); qDeleteAll(m_element_hash.keys()); m_element_hash.clear(); @@ -235,7 +245,8 @@ void SearchAndReplaceWidget::fillItemsList() return; } ui->m_replace_all_pb->setEnabled(true); - connect(project_, &QETProject::destroyed, this, &SearchAndReplaceWidget::on_m_reload_pb_clicked); + connect(project_, &QETProject::destroyed, this, + &SearchAndReplaceWidget::on_m_reload_pb_clicked); DiagramContent dc; @@ -263,8 +274,8 @@ void SearchAndReplaceWidget::fillItemsList() for (Element *elmt : dc.m_elements) addElement(elmt); - //Sort child of each "element type" tree item. - //we hide, "element type" tree item, if they do not have children + //Sort child of each "element type" tree item. + //we hide, "element type" tree item, if they do not have children for(QTreeWidgetItem *qtwi : m_qtwi_elmts) { qtwi->sortChildren(0, Qt::AscendingOrder); @@ -292,7 +303,8 @@ void SearchAndReplaceWidget::fillItemsList() m_conductor_qtwi->sortChildren(0, Qt::AscendingOrder); updateNextPreviousButtons(); - connect(ui->m_tree_widget, &QTreeWidget::itemChanged, this, &SearchAndReplaceWidget::itemChanged); + connect(ui->m_tree_widget, &QTreeWidget::itemChanged, + this, &SearchAndReplaceWidget::itemChanged); } /** @@ -378,19 +390,25 @@ void SearchAndReplaceWidget::search() qtwi_list.append(m_conductor_hash.keys()); for (QTreeWidgetItem *qtwi : qtwi_list) { - QStringList list = qtwi->data(0, Qt::UserRole).toStringList(); + QStringList list = qtwi->data(0, Qt::UserRole) + .toStringList(); if(ui->m_mode_cb->currentIndex() == 0) { //Contain string - list = list.filter(str, ui->m_case_sensitive_cb->isChecked()? Qt::CaseSensitive : Qt::CaseInsensitive); + list = list.filter( + str, + ui->m_case_sensitive_cb->isChecked() + ? Qt::CaseSensitive + : Qt::CaseInsensitive); } else { //entire word QRegularExpression rx("\\b" + str + "\\b"); if (!ui->m_case_sensitive_cb->isChecked()) { - rx.setPatternOptions(QRegularExpression::CaseInsensitiveOption); + rx.setPatternOptions( + QRegularExpression::CaseInsensitiveOption); } list = list.filter(rx); } @@ -403,7 +421,9 @@ void SearchAndReplaceWidget::search() } QPalette background = ui->m_search_le->palette(); - background.setColor(QPalette::Base, match ? QColor("#E0FFF0") : QColor("#FFE0EF")); + background.setColor(QPalette::Base, match + ? QColor("#E0FFF0") + : QColor("#FFE0EF")); ui->m_search_le->setPalette(background); //Go to the first occurence @@ -418,7 +438,8 @@ void SearchAndReplaceWidget::search() @param item @param expend_parent */ -void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, bool expend_parent) +void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, + bool expend_parent) { if (item->parent()) { @@ -437,7 +458,9 @@ void SearchAndReplaceWidget::setVisibleAllParents(QTreeWidgetItem *item, bool ex @return the next item according to flag or nullptr if there is not a next item */ -QTreeWidgetItem *SearchAndReplaceWidget::nextItem(QTreeWidgetItem *item, QTreeWidgetItemIterator::IteratorFlag flags) const +QTreeWidgetItem *SearchAndReplaceWidget::nextItem( + QTreeWidgetItem *item, + QTreeWidgetItemIterator::IteratorFlag flags) const { QTreeWidgetItem *qtwi = item; if (!item) { @@ -468,7 +491,9 @@ QTreeWidgetItem *SearchAndReplaceWidget::nextItem(QTreeWidgetItem *item, QTreeWi @return the previous item according to flag or nullptr if there is not a previous item */ -QTreeWidgetItem *SearchAndReplaceWidget::previousItem(QTreeWidgetItem *item, QTreeWidgetItemIterator::IteratorFlag flags) const +QTreeWidgetItem *SearchAndReplaceWidget::previousItem( + QTreeWidgetItem *item, + QTreeWidgetItemIterator::IteratorFlag flags) const { QTreeWidgetItem *qtwi = item; if (!item) { @@ -525,7 +550,8 @@ void SearchAndReplaceWidget::updateNextPreviousButtons() QTreeWidgetItem *previous_ = item_; do { - previous_ = previousItem(previous_, QTreeWidgetItemIterator::NotHidden); + previous_ = previousItem(previous_, + QTreeWidgetItemIterator::NotHidden); if (!previous_) { ui->m_previous_pb->setDisabled(true); @@ -563,7 +589,9 @@ void SearchAndReplaceWidget::itemChanged(QTreeWidgetItem *item, int column) @param check : check state @param deep : if true, we evaluate every subchilds. */ -void SearchAndReplaceWidget::setChildCheckState(QTreeWidgetItem *item, Qt::CheckState check, bool deep) +void SearchAndReplaceWidget::setChildCheckState(QTreeWidgetItem *item, + Qt::CheckState check, + bool deep) { for (int i=0 ; ichildCount() ; ++i) { @@ -580,7 +608,8 @@ void SearchAndReplaceWidget::setChildCheckState(QTreeWidgetItem *item, Qt::Check @param all_parents : if true, we evaluate every parents, until the root item. */ -void SearchAndReplaceWidget::updateParentCheckState(QTreeWidgetItem *item, bool all_parents) +void SearchAndReplaceWidget::updateParentCheckState(QTreeWidgetItem *item, + bool all_parents) { QTreeWidgetItem *parent = item->parent(); @@ -632,8 +661,9 @@ void SearchAndReplaceWidget::activateNextChecked() do { on_m_next_pb_clicked(); - } while ((ui->m_tree_widget->currentItem()->checkState(0) != Qt::Checked) && - ui->m_next_pb->isEnabled()); + } while ((ui->m_tree_widget->currentItem()->checkState(0) + != Qt::Checked + ) && ui->m_next_pb->isEnabled()); } /** @@ -715,7 +745,8 @@ QList SearchAndReplaceWidget::selectedText() const { if (!qtwi->isHidden() && qtwi->checkState(0) == Qt::Checked) { - QPointer t = m_text_hash.value(qtwi); + QPointer t = + m_text_hash.value(qtwi); if (t) { text_list.append(t.data()); } @@ -733,7 +764,8 @@ QList SearchAndReplaceWidget::selectedText() const QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) { QStringList list; - TitleBlockProperties prop = diagram->border_and_titleblock.exportTitleBlock(); + TitleBlockProperties prop = + diagram->border_and_titleblock.exportTitleBlock(); list.append(prop.title); list.append(prop.author); list.append(prop.filename); @@ -768,7 +800,10 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) for (DynamicElementTextItem *deti : element->dynamicTextItems()) { - if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) { + if (deti->textFrom() + == DynamicElementTextItem::UserText + || deti->textFrom() + == DynamicElementTextItem::CompositeText) { list.append(deti->toPlainText()); } } @@ -777,7 +812,10 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) list.append(group->name()); for (DynamicElementTextItem *deti : group->texts()) { - if (deti->textFrom() == DynamicElementTextItem::UserText || deti->textFrom() == DynamicElementTextItem::CompositeText) { + if (deti->textFrom() + == DynamicElementTextItem::UserText + || deti->textFrom() + == DynamicElementTextItem::CompositeText) { list.append(deti->toPlainText()); } } @@ -810,7 +848,9 @@ QStringList SearchAndReplaceWidget::searchTerms(Conductor *conductor) */ void SearchAndReplaceWidget::on_m_quit_button_clicked() { - if (auto animator = this->findChild("search and replace animator")) { + if (auto animator = + this->findChild( + "search and replace animator")) { animator->setHidden(!this->isHidden()); } else { this->setHidden(true); @@ -818,10 +858,12 @@ void SearchAndReplaceWidget::on_m_quit_button_clicked() } void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) { - setHideAdvanced(!checked); + setHideAdvanced(!checked); } -void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column) +void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked( + QTreeWidgetItem *item, + int column) { Q_UNUSED(column) @@ -874,7 +916,9 @@ void SearchAndReplaceWidget::on_m_reload_pb_clicked() m_root_qtwi->setExpanded(true); } -void SearchAndReplaceWidget::on_m_tree_widget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous) +void SearchAndReplaceWidget::on_m_tree_widget_currentItemChanged( + QTreeWidgetItem *current, + QTreeWidgetItem *previous) { Q_UNUSED(previous); @@ -918,7 +962,8 @@ void SearchAndReplaceWidget::on_m_tree_widget_currentItemChanged(QTreeWidgetItem return; } - if (current->checkState(0) == Qt::Checked && !m_category_qtwi.contains(current)) { + if (current->checkState(0) == Qt::Checked + && !m_category_qtwi.contains(current)) { ui->m_replace_pb->setEnabled(true); } else { ui->m_replace_pb->setDisabled(true); @@ -950,15 +995,20 @@ void SearchAndReplaceWidget::on_m_previous_pb_clicked() do { - item = previousItem(nullptr, QTreeWidgetItemIterator::NotHidden); + item = previousItem(nullptr, + QTreeWidgetItemIterator::NotHidden); if (item) { ui->m_tree_widget->setCurrentItem(item); } else { - //There is not a previous selected item, so the current item is m_root_qtwi but we know he must not be selected - //we user click on the button 'next item'. - //So we select the first selectable item by calling on_m_next_pb_clicked + /* There is not a previous selected item, + * so the current item is m_root_qtwi + * but we know he must not be selected + * we user click on the button 'next item'. + * So we select the first selectable item + * by calling on_m_next_pb_clicked + */ on_m_next_pb_clicked(); return; } @@ -982,7 +1032,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked() text.append(tr(" [édité]")); } ui->m_folio_pb->setText(text); - m_worker.m_titleblock_properties = dialog->titleBlockProperties(); + m_worker.m_titleblock_properties = + dialog->titleBlockProperties(); } else if (result == QDialogButtonBox::ResetRole) { @@ -1005,7 +1056,8 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() if(!qtwi) { return; } - if (!m_category_qtwi.contains(qtwi) && qtwi->checkState(0) == Qt::Checked) + if (!m_category_qtwi.contains(qtwi) + && qtwi->checkState(0) == Qt::Checked) { if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) && m_diagram_hash.keys().contains(qtwi)) @@ -1027,7 +1079,8 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() m_text_hash.keys().contains(qtwi)) { m_worker.m_indi_text = ui->m_replace_le->text(); - QPointer t = m_text_hash.value(qtwi); + QPointer t = + m_text_hash.value(qtwi); if (t) { m_worker.replaceIndiText(t.data()); } @@ -1052,28 +1105,32 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() if (m_diagram_hash.keys().contains(qtwi)) { - QPointer d = m_diagram_hash.value(qtwi); + QPointer d = + m_diagram_hash.value(qtwi); if (d) { dl.append(d.data()); } } else if (m_element_hash.keys().contains(qtwi)) { - QPointer e = m_element_hash.value(qtwi); + QPointer e = + m_element_hash.value(qtwi); if (e) { el.append(e.data()); } } else if (m_text_hash.keys().contains(qtwi)) { - QPointer t = m_text_hash.value(qtwi); + QPointer t = + m_text_hash.value(qtwi); if (t) { tl.append(t.data()); } } else if (m_conductor_hash.keys().contains(qtwi)) { - QPointer c = m_conductor_hash.value(qtwi); + QPointer c = + m_conductor_hash.value(qtwi); if (c) { cl.append(c.data()); } @@ -1108,7 +1165,10 @@ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked() } if (ui->m_advanced_replace_pb->text().endsWith(tr(" [édité]"))) { - m_worker.replaceAdvanced(selectedDiagram(), selectedElement(), selectedText(), selectedConductor()); + m_worker.replaceAdvanced(selectedDiagram(), + selectedElement(), + selectedText(), + selectedConductor()); } //Change was made, we reload the panel @@ -1122,7 +1182,9 @@ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked() void SearchAndReplaceWidget::on_m_element_pb_clicked() { - ReplaceElementDialog *dialog = new ReplaceElementDialog(m_worker.m_element_context, this); + ReplaceElementDialog *dialog = new ReplaceElementDialog( + m_worker.m_element_context, + this); int result = dialog->exec(); if (result == QDialogButtonBox::AcceptRole) @@ -1173,7 +1235,9 @@ void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1) */ void SearchAndReplaceWidget::on_m_conductor_pb_clicked() { - ReplaceConductorDialog *dialog = new ReplaceConductorDialog(m_worker.m_conductor_properties, this); + ReplaceConductorDialog *dialog = new ReplaceConductorDialog( + m_worker.m_conductor_properties, + this); int result = dialog->exec(); if (result == QDialogButtonBox::AcceptRole) @@ -1192,7 +1256,8 @@ void SearchAndReplaceWidget::on_m_conductor_pb_clicked() text.remove(tr(" [édité]")); } ui->m_conductor_pb->setText(text); - m_worker.m_conductor_properties = m_worker.invalidConductorProperties(); + m_worker.m_conductor_properties = + m_worker.invalidConductorProperties(); } } @@ -1202,7 +1267,9 @@ void SearchAndReplaceWidget::on_m_conductor_pb_clicked() */ void SearchAndReplaceWidget::on_m_advanced_replace_pb_clicked() { - replaceAdvancedDialog *dialog = new replaceAdvancedDialog(m_worker.m_advanced_struct, this); + replaceAdvancedDialog *dialog = new replaceAdvancedDialog( + m_worker.m_advanced_struct, + this); int result = dialog->exec(); if (result == QDialogButtonBox::AcceptRole) diff --git a/sources/SearchAndReplace/ui/searchandreplacewidget.h b/sources/SearchAndReplace/ui/searchandreplacewidget.h index 7a7855c10..8f5448424 100644 --- a/sources/SearchAndReplace/ui/searchandreplacewidget.h +++ b/sources/SearchAndReplace/ui/searchandreplacewidget.h @@ -53,13 +53,23 @@ class SearchAndReplaceWidget : public QWidget void addElement(Element *element); void search(); - void setVisibleAllParents(QTreeWidgetItem *item, bool expend_parent = true); - QTreeWidgetItem *nextItem(QTreeWidgetItem *item=nullptr, QTreeWidgetItemIterator::IteratorFlag flags = QTreeWidgetItemIterator::All) const; - QTreeWidgetItem *previousItem(QTreeWidgetItem *item=nullptr, QTreeWidgetItemIterator::IteratorFlag flags = QTreeWidgetItemIterator::All) const; + void setVisibleAllParents(QTreeWidgetItem *item, + bool expend_parent = true); + QTreeWidgetItem *nextItem( + QTreeWidgetItem *item=nullptr, + QTreeWidgetItemIterator::IteratorFlag flags + = QTreeWidgetItemIterator::All) const; + QTreeWidgetItem *previousItem( + QTreeWidgetItem *item=nullptr, + QTreeWidgetItemIterator::IteratorFlag flags + = QTreeWidgetItemIterator::All) const; void updateNextPreviousButtons(); void itemChanged(QTreeWidgetItem *item, int column); - void setChildCheckState(QTreeWidgetItem *item, Qt::CheckState check, bool deep = true); - void updateParentCheckState(QTreeWidgetItem *item, bool all_parents = true); + void setChildCheckState(QTreeWidgetItem *item, + Qt::CheckState check, + bool deep = true); + void updateParentCheckState(QTreeWidgetItem *item, + bool all_parents = true); void activateNextChecked(); QList selectedDiagram() const; QList selectedElement() const; @@ -74,9 +84,12 @@ class SearchAndReplaceWidget : public QWidget private slots: void on_m_quit_button_clicked(); void on_m_advanced_pb_toggled(bool checked); - void on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column); + void on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, + int column); void on_m_reload_pb_clicked(); - void on_m_tree_widget_currentItemChanged(QTreeWidgetItem *current, QTreeWidgetItem *previous); + void on_m_tree_widget_currentItemChanged( + QTreeWidgetItem *current, + QTreeWidgetItem *previous); void on_m_next_pb_clicked(); void on_m_previous_pb_clicked(); void on_m_folio_pb_clicked(); @@ -104,7 +117,8 @@ class SearchAndReplaceWidget : public QWidget QList m_qtwi_elmts; QList m_category_qtwi; QHash> m_element_hash; - QHash> m_text_hash; + QHash> m_text_hash; QHash> m_conductor_hash; QPointer m_highlighted_element; QPointer m_last_selected; From 76d16ab6001c4a2bbbac933b7e3370057804fd17 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:22:36 +0200 Subject: [PATCH 13/24] Improve code style, Wrap code for better readability --- sources/autoNum/assignvariables.cpp | 95 +++++++++++++++++++------ sources/configdialog.h | 30 ++++---- sources/createdxf.h | 103 +++++++++++++++++++++------- 3 files changed, 167 insertions(+), 61 deletions(-) diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index 09ea034a9..59905dac9 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -46,7 +46,8 @@ namespace autonum sequentialNumbers::~sequentialNumbers() {} - sequentialNumbers &sequentialNumbers::operator=(const sequentialNumbers &other) + sequentialNumbers &sequentialNumbers::operator=( + const sequentialNumbers &other) { if (&other == this || other == *this) return (*this); @@ -90,22 +91,41 @@ namespace autonum @return A QDomElement, if this sequential have no value, the returned QDomELement is empty */ - QDomElement sequentialNumbers::toXml(QDomDocument &document, const QString& tag_name) const + QDomElement sequentialNumbers::toXml(QDomDocument &document, + const QString& tag_name) const { QDomElement element = document.createElement(tag_name); if (!unit.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "unit", unit.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "unit", + unit.join(";"))); if (!unit_folio.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "unitFolio", unit_folio.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "unitFolio", + unit_folio.join(";"))); if(!ten.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "ten", ten.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "ten", + ten.join(";"))); if(!ten_folio.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "tenFolio", ten_folio.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "tenFolio", + ten_folio.join(";"))); if(!hundred.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "hundred", hundred.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "hundred", + hundred.join(";"))); if(!hundred_folio.isEmpty()) - element.appendChild(QETXML::textToDomElement(document, "hundredFolio", hundred_folio.join(";"))); + element.appendChild(QETXML::textToDomElement( + document, + "hundredFolio", + hundred_folio.join(";"))); return element; } @@ -164,9 +184,15 @@ namespace autonum @param elmt - parent element (if any) of the formula @return the string with variable assigned. */ - QString AssignVariables::formulaToLabel(QString formula, sequentialNumbers &seqStruct, Diagram *diagram, const Element *elmt) + QString AssignVariables::formulaToLabel(QString formula, + sequentialNumbers &seqStruct, + Diagram *diagram, + const Element *elmt) { - AssignVariables av(std::move(formula), seqStruct, diagram, elmt); + AssignVariables av(std::move(formula), + seqStruct, + diagram, + elmt); seqStruct = av.m_seq_struct; return av.m_assigned_label; } @@ -174,12 +200,13 @@ namespace autonum /** @brief AssignVariables::replaceVariable Replace the variables in @formula in form %{my-var} - to the corresponding value stored in @dc + to the corresponding value stored in dc @param formula @param dc @return */ - QString AssignVariables::replaceVariable(const QString &formula, const DiagramContext &dc) + QString AssignVariables::replaceVariable(const QString &formula, + const DiagramContext &dc) { QString str = formula; str.replace("%{label}", dc.value("label").toString()); @@ -188,13 +215,15 @@ namespace autonum str.replace("%{description}", dc.value("description").toString()); str.replace("%{designation}", dc.value("designation").toString()); str.replace("%{manufacturer}", dc.value("manufacturer").toString()); - str.replace("%{manufacturer_reference}", dc.value("manufacturer_reference").toString()); + str.replace("%{manufacturer_reference}", + dc.value("manufacturer_reference").toString()); str.replace("%{supplier}", dc.value("supplier").toString()); str.replace("%{quantity}", dc.value("quantity").toString()); str.replace("%{unity}", dc.value("unity").toString()); str.replace("%{auxiliary1}", dc.value("auxiliary1").toString()); str.replace("%{auxiliary2}", dc.value("auxiliary2").toString()); - str.replace("%{machine_manufacturer_reference}", dc.value("machine_manufacturer_reference").toString()); + str.replace("%{machine_manufacturer_reference}", + dc.value("machine_manufacturer_reference").toString()); str.replace("%{location}", dc.value("location").toString()); str.replace("%{function}", dc.value("function").toString()); str.replace("%{void}", QString()); @@ -203,7 +232,10 @@ namespace autonum } - AssignVariables::AssignVariables(const QString& formula, const sequentialNumbers& seqStruct , Diagram *diagram, const Element *elmt): + AssignVariables::AssignVariables(const QString& formula, + const sequentialNumbers& seqStruct, + Diagram *diagram, + const Element *elmt): m_diagram(diagram), m_arg_formula(formula), m_assigned_label(formula), @@ -213,14 +245,33 @@ namespace autonum { if (m_diagram) { - m_assigned_label.replace("%F", m_diagram -> border_and_titleblock.folio()); - m_assigned_label.replace("%f", QString::number(m_diagram->folioIndex()+1)); - m_assigned_label.replace("%id", QString::number(m_diagram->folioIndex()+1)); - m_assigned_label.replace("%total", QString::number(m_diagram->border_and_titleblock.folioTotal())); - m_assigned_label.replace("%M", m_diagram -> border_and_titleblock.plant()); - m_assigned_label.replace("%LM", m_diagram -> border_and_titleblock.locmach()); + m_assigned_label.replace("%F", + m_diagram + -> border_and_titleblock + .folio()); + m_assigned_label.replace("%f", + QString::number( + m_diagram + ->folioIndex()+1)); + m_assigned_label.replace("%id", + QString::number( + m_diagram + ->folioIndex()+1)); + m_assigned_label.replace("%total", + QString::number( + m_diagram + ->border_and_titleblock + .folioTotal())); + m_assigned_label.replace("%M", + m_diagram + -> border_and_titleblock + .plant()); + m_assigned_label.replace("%LM", + m_diagram + -> border_and_titleblock + .locmach()); - QSettings settings; + QSettings settings; if (m_element) { if (settings.value("border-columns_0", true).toBool()){ diff --git a/sources/configdialog.h b/sources/configdialog.h index 6830efeb1..7e004e2fb 100644 --- a/sources/configdialog.h +++ b/sources/configdialog.h @@ -25,37 +25,37 @@ class QStackedWidget; class QDialogButtonBox; /** This class represents the configuration dialog for QElectroTech. - It displays "configuration pages", each page having to provide an icon and - a title. + It displays "configuration pages", + each page having to provide an icon and a title. */ class ConfigDialog : public QDialog { Q_OBJECT // constructors, destructor public: - ConfigDialog(QWidget * = nullptr); - ~ConfigDialog() override; + ConfigDialog(QWidget * = nullptr); + ~ConfigDialog() override; private: - ConfigDialog(const ConfigDialog &); + ConfigDialog(const ConfigDialog &); - public: - QList pages; + public: + QList pages; // methods public slots: - void applyConf(); - void addPage(ConfigPage *); - void setCurrentPage(const int index); + void applyConf(); + void addPage(ConfigPage *); + void setCurrentPage(const int index); private: - void buildPagesList(); - void addPageToList(ConfigPage *); + void buildPagesList(); + void addPageToList(ConfigPage *); // attributes private: - QListWidget *pages_list; - QStackedWidget *pages_widget; - QDialogButtonBox *buttons; + QListWidget *pages_list; + QStackedWidget *pages_widget; + QDialogButtonBox *buttons; diff --git a/sources/createdxf.h b/sources/createdxf.h index 328090035..60530e9d8 100644 --- a/sources/createdxf.h +++ b/sources/createdxf.h @@ -24,38 +24,93 @@ /* This class exports the project to DXF Format */ class Createdxf -{ - public: - Createdxf(); - ~Createdxf(); - static void dxfBegin (const QString&); - static void dxfEnd(const QString&); - // you can add more functions to create more drawings. - static void drawCircle(const QString&,double,double,double,int); - static void drawArc(const QString&,double x,double y,double rad,double startAngle,double endAngle,int color); - static void drawDonut(QString,double,double,double,int); +{ + public: + Createdxf(); + ~Createdxf(); + static void dxfBegin (const QString&); + static void dxfEnd(const QString&); + // you can add more functions to create more drawings. + static void drawCircle(const QString&, + double, + double, + double, + int); + static void drawArc(const QString&, + double x, + double y, + double rad, + double startAngle, + double endAngle, + int color); + static void drawDonut(QString,double,double,double,int); - static void drawArcEllipse (const QString &file_path, qreal x, qreal y, qreal w, qreal h, qreal startAngle, qreal spanAngle, qreal hotspot_x, qreal hotspot_y, qreal rotation_angle, const int &colorcode); + static void drawArcEllipse (const QString &file_path, + qreal x, + qreal y, + qreal w, + qreal h, + qreal startAngle, + qreal spanAngle, + qreal hotspot_x, + qreal hotspot_y, + qreal rotation_angle, + const int &colorcode); - static void drawEllipse (const QString &filepath, const QRectF &rect, const int &colorcode); + static void drawEllipse (const QString &filepath, + const QRectF &rect, + const int &colorcode); - static void drawRectangle(const QString &filepath,double,double,double,double,const int &colorcode); - static void drawRectangle(const QString &filepath, const QRectF &rect, const int &colorcode); + static void drawRectangle(const QString &filepath, + double, + double, + double, + double, + const int &colorcode); + static void drawRectangle(const QString &filepath, + const QRectF &rect, + const int &colorcode); - static void drawLine(const QString &filapath,double,double,double,double, const int &clorcode); - static void drawLine(const QString &filepath, const QLineF &line,const int &colorcode); + static void drawLine(const QString &filapath, + double, + double, + double, + double, + const int &clorcode); + static void drawLine(const QString &filepath, + const QLineF &line, + const int &colorcode); - static void drawText(const QString&,const QString&,double,double,double,double,int); - static void drawTextAligned(const QString& fileName, const QString& text,double x, double y, double height, double rotation, double oblique,int hAlign, int vAlign, double xAlign, int colour, bool leftAlign = false, float scale = 0); + static void drawText(const QString&, + const QString&, + double,double, + double, + double, + int); + static void drawTextAligned(const QString& fileName, + const QString& text, + double x, + double y, + double height, + double rotation, + double oblique, + int hAlign, + int vAlign, + double xAlign, + int colour, + bool leftAlign = false, + float scale = 0); - static int getcolorCode (const long red, const long green, const long blue); - static long RGBcodeTable[]; + static int getcolorCode (const long red, + const long green, + const long blue); + static long RGBcodeTable[]; - static const double sheetWidth; - static const double sheetHeight; - static double xScale; - static double yScale; + static const double sheetWidth; + static const double sheetHeight; + static double xScale; + static double yScale; }; #endif // CREATEDXF_H From 574609abf50450e23b32896a87bef985b68f45f0 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:22:54 +0200 Subject: [PATCH 14/24] Improve code style --- sources/dataBase/ui/elementquerywidget.cpp | 6 +++--- sources/dataBase/ui/elementquerywidget.h | 2 +- sources/dataBase/ui/summaryquerywidget.cpp | 4 ++-- sources/dataBase/ui/summaryquerywidget.h | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sources/dataBase/ui/elementquerywidget.cpp b/sources/dataBase/ui/elementquerywidget.cpp index d23bf8695..d766d9172 100644 --- a/sources/dataBase/ui/elementquerywidget.cpp +++ b/sources/dataBase/ui/elementquerywidget.cpp @@ -26,10 +26,10 @@ @param parent */ ElementQueryWidget::ElementQueryWidget(QWidget *parent) : - QWidget(parent), - ui(new Ui::ElementQueryWidget) + QWidget(parent), + ui(new Ui::ElementQueryWidget) { - ui->setupUi(this); + ui->setupUi(this); m_export_info.insert("position", tr("Position")); m_export_info.insert("title", tr("Titre du folio")); diff --git a/sources/dataBase/ui/elementquerywidget.h b/sources/dataBase/ui/elementquerywidget.h index 5b7effab5..e39c2f8ae 100644 --- a/sources/dataBase/ui/elementquerywidget.h +++ b/sources/dataBase/ui/elementquerywidget.h @@ -34,7 +34,7 @@ class ElementQueryWidget; */ class ElementQueryWidget : public QWidget { - Q_OBJECT + Q_OBJECT public: explicit ElementQueryWidget(QWidget *parent = nullptr); diff --git a/sources/dataBase/ui/summaryquerywidget.cpp b/sources/dataBase/ui/summaryquerywidget.cpp index 5e6a8b4e7..219743318 100644 --- a/sources/dataBase/ui/summaryquerywidget.cpp +++ b/sources/dataBase/ui/summaryquerywidget.cpp @@ -26,10 +26,10 @@ @param parent */ SummaryQueryWidget::SummaryQueryWidget(QWidget *parent) : - QWidget(parent), + QWidget(parent), ui(new Ui::SummaryQueryWidget) { - ui->setupUi(this); + ui->setupUi(this); setUpItems(); fillSavedQuery(); diff --git a/sources/dataBase/ui/summaryquerywidget.h b/sources/dataBase/ui/summaryquerywidget.h index 96430b9b9..2f7614202 100644 --- a/sources/dataBase/ui/summaryquerywidget.h +++ b/sources/dataBase/ui/summaryquerywidget.h @@ -28,7 +28,7 @@ class SummaryQueryWidget; class SummaryQueryWidget : public QWidget { - Q_OBJECT + Q_OBJECT public: explicit SummaryQueryWidget(QWidget *parent = nullptr); From 8a484ef90105b163363ee53942f2f81d932a7c6c Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:23:25 +0200 Subject: [PATCH 15/24] Improve code style --- .../diagramevent/diagrameventaddelement.cpp | 2 +- sources/diagramevent/diagrameventaddimage.cpp | 22 ++++++++-------- sources/diagramevent/diagrameventaddimage.h | 26 +++++++++---------- sources/diagramevent/diagrameventaddtext.cpp | 22 +++++++++------- sources/diagramevent/diagrameventaddtext.h | 10 +++---- 5 files changed, 43 insertions(+), 39 deletions(-) diff --git a/sources/diagramevent/diagrameventaddelement.cpp b/sources/diagramevent/diagrameventaddelement.cpp index eff821ce7..a780ec70e 100644 --- a/sources/diagramevent/diagrameventaddelement.cpp +++ b/sources/diagramevent/diagrameventaddelement.cpp @@ -243,7 +243,7 @@ void DiagramEventAddElement::addElement() if (m_diagram->freezeNewConductors() || m_diagram->project()->isFreezeNewConductors()) { conductor->setFreezeLabel(true); } - } + } m_diagram -> undoStack().push(undo_object); element->setUpFormula(); diff --git a/sources/diagramevent/diagrameventaddimage.cpp b/sources/diagramevent/diagrameventaddimage.cpp index ac61233d5..b17e74628 100644 --- a/sources/diagramevent/diagrameventaddimage.cpp +++ b/sources/diagramevent/diagrameventaddimage.cpp @@ -27,11 +27,11 @@ @param diagram : diagram where operate this event */ DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) : - DiagramEventInterface(diagram), - m_image (nullptr), - m_is_added (false) + DiagramEventInterface(diagram), + m_image (nullptr), + m_is_added (false) { - openDialog(); + openDialog(); } /** @@ -39,14 +39,14 @@ DiagramEventAddImage::DiagramEventAddImage(Diagram *diagram) : */ DiagramEventAddImage::~DiagramEventAddImage() { - if (m_running || m_abort) - { - if (m_is_added) m_diagram->removeItem(m_image); - delete m_image; - } + if (m_running || m_abort) + { + if (m_is_added) m_diagram->removeItem(m_image); + delete m_image; + } - foreach (QGraphicsView *view, m_diagram->views()) - view->setContextMenuPolicy((Qt::DefaultContextMenu)); + foreach (QGraphicsView *view, m_diagram->views()) + view->setContextMenuPolicy((Qt::DefaultContextMenu)); } /** diff --git a/sources/diagramevent/diagrameventaddimage.h b/sources/diagramevent/diagrameventaddimage.h index d6d3ca504..f48b38a66 100644 --- a/sources/diagramevent/diagrameventaddimage.h +++ b/sources/diagramevent/diagrameventaddimage.h @@ -29,23 +29,23 @@ class DiagramImageItem; */ class DiagramEventAddImage : public DiagramEventInterface { - Q_OBJECT + Q_OBJECT - public: - DiagramEventAddImage(Diagram *diagram); - ~DiagramEventAddImage() override; + public: + DiagramEventAddImage(Diagram *diagram); + ~DiagramEventAddImage() override; - void mousePressEvent (QGraphicsSceneMouseEvent *event) override; - void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override; - void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override; - void wheelEvent (QGraphicsSceneWheelEvent *event) override; + void mousePressEvent (QGraphicsSceneMouseEvent *event) override; + void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override; + void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override; + void wheelEvent (QGraphicsSceneWheelEvent *event) override; - bool isNull () const; - private: - void openDialog(); + bool isNull () const; + private: + void openDialog(); - DiagramImageItem *m_image; - bool m_is_added; + DiagramImageItem *m_image; + bool m_is_added; }; #endif // DIAGRAMEVENTADDIMAGE_H diff --git a/sources/diagramevent/diagrameventaddtext.cpp b/sources/diagramevent/diagrameventaddtext.cpp index dd7e1fd7f..0be6ba235 100644 --- a/sources/diagramevent/diagrameventaddtext.cpp +++ b/sources/diagramevent/diagrameventaddtext.cpp @@ -27,7 +27,7 @@ @param diagram : the diagram where this event must operate */ DiagramEventAddText::DiagramEventAddText(Diagram *diagram) : - DiagramEventInterface(diagram) + DiagramEventInterface(diagram) {} /** @@ -42,13 +42,17 @@ DiagramEventAddText::~DiagramEventAddText() */ void DiagramEventAddText::mousePressEvent(QGraphicsSceneMouseEvent *event) { - if (event->button() == Qt::LeftButton) - { - IndependentTextItem *text = new IndependentTextItem(); - m_diagram -> undoStack().push(new AddItemCommand(text, m_diagram, event->scenePos())); - text->setTextInteractionFlags(Qt::TextEditorInteraction); - text->setFocus(Qt::MouseFocusReason); - emit finish(); + if (event->button() == Qt::LeftButton) + { + IndependentTextItem *text = new IndependentTextItem(); + m_diagram -> undoStack().push( + new AddItemCommand( + text, + m_diagram, + event->scenePos())); + text->setTextInteractionFlags(Qt::TextEditorInteraction); + text->setFocus(Qt::MouseFocusReason); + emit finish(); event->setAccepted(true); - } + } } diff --git a/sources/diagramevent/diagrameventaddtext.h b/sources/diagramevent/diagrameventaddtext.h index 8f44d6bd1..58d3abdb9 100644 --- a/sources/diagramevent/diagrameventaddtext.h +++ b/sources/diagramevent/diagrameventaddtext.h @@ -28,13 +28,13 @@ class Diagram; */ class DiagramEventAddText : public DiagramEventInterface { - Q_OBJECT + Q_OBJECT - public: - DiagramEventAddText(Diagram *diagram); - ~DiagramEventAddText() override; + public: + DiagramEventAddText(Diagram *diagram); + ~DiagramEventAddText() override; - void mousePressEvent (QGraphicsSceneMouseEvent *event) override; + void mousePressEvent (QGraphicsSceneMouseEvent *event) override; }; #endif // DIAGRAMEVENTADDTEXT_H From 8144e9b21b5cf68955dc9530d2199b9c16b848ef Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:23:42 +0200 Subject: [PATCH 16/24] Wrap code for better readability --- .../changeelementinformationcommand.cpp | 15 +++++++++++---- .../undocommand/changeelementinformationcommand.h | 6 +++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/sources/undocommand/changeelementinformationcommand.cpp b/sources/undocommand/changeelementinformationcommand.cpp index 71f890995..5810e9a7b 100644 --- a/sources/undocommand/changeelementinformationcommand.cpp +++ b/sources/undocommand/changeelementinformationcommand.cpp @@ -27,19 +27,25 @@ @param old_info : old info of element @param new_info : new info of element */ -ChangeElementInformationCommand::ChangeElementInformationCommand(Element *elmt, DiagramContext &old_info, DiagramContext &new_info, QUndoCommand *parent) : +ChangeElementInformationCommand::ChangeElementInformationCommand( + Element *elmt, + DiagramContext &old_info, + DiagramContext &new_info, + QUndoCommand *parent) : QUndoCommand (parent), m_element (elmt), m_old_info (old_info), m_new_info (new_info) { - setText(QObject::tr("Modifier les informations de l'élément : %1").arg(elmt -> name())); + setText(QObject::tr("Modifier les informations de l'élément : %1") + .arg(elmt -> name())); } bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other) { if (id() != other->id()) return false; - ChangeElementInformationCommand const *undo = static_cast(other); + ChangeElementInformationCommand const *undo = + static_cast(other); if (m_element != undo->m_element) return false; m_new_info = undo->m_new_info; return true; @@ -64,6 +70,7 @@ void ChangeElementInformationCommand::redo() { void ChangeElementInformationCommand::updateProjectDB() { if(m_element->diagram()) { - m_element->diagram()->project()->dataBase()->elementInfoChanged(m_element); + m_element->diagram()->project()->dataBase()->elementInfoChanged( + m_element); } } diff --git a/sources/undocommand/changeelementinformationcommand.h b/sources/undocommand/changeelementinformationcommand.h index 654e94bd5..d70dc8afb 100644 --- a/sources/undocommand/changeelementinformationcommand.h +++ b/sources/undocommand/changeelementinformationcommand.h @@ -30,7 +30,11 @@ class Element; class ChangeElementInformationCommand : public QUndoCommand { public: - ChangeElementInformationCommand(Element *elmt, DiagramContext &old_info, DiagramContext &new_info, QUndoCommand *parent = nullptr); + ChangeElementInformationCommand( + Element *elmt, + DiagramContext &old_info, + DiagramContext &new_info, + QUndoCommand *parent = nullptr); int id() const override {return 1;} bool mergeWith(const QUndoCommand *other) override; From 928b56f2bfca10e1829fc7f7dc954cea1ea843fe Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:23:59 +0200 Subject: [PATCH 17/24] Improve code style, Wrap code for better readability --- sources/ui/bomexportdialog.cpp | 18 +- sources/ui/bomexportdialog.h | 58 +-- sources/ui/configsaveloaderwidget.cpp | 6 +- sources/ui/configsaveloaderwidget.h | 2 +- sources/ui/diagrampropertiesdialog.cpp | 10 +- sources/ui/diagrampropertiesdialog.h | 2 +- sources/ui/diagramselection.cpp | 3 +- sources/ui/dynamicelementtextitemeditor.cpp | 48 +- sources/ui/dynamicelementtextmodel.cpp | 467 +++++++++++++------- sources/ui/elementinfopartwidget.cpp | 4 +- sources/ui/elementpropertieswidget.cpp | 4 +- sources/ui/inditextpropertieswidget.cpp | 2 +- sources/ui/linksingleelementwidget.cpp | 121 +++-- sources/ui/marginseditdialog.cpp | 21 +- sources/ui/marginseditdialog.h | 17 +- sources/ui/multipastedialog.cpp | 2 +- sources/ui/potentialselectordialog.cpp | 135 ++++-- sources/ui/potentialselectordialog.h | 52 ++- sources/ui/projectpropertiesdialog.cpp | 19 +- sources/ui/projectpropertiesdialog.h | 2 +- sources/ui/titleblockpropertieswidget.cpp | 2 +- sources/ui/xrefpropertieswidget.cpp | 24 +- 22 files changed, 656 insertions(+), 363 deletions(-) diff --git a/sources/ui/bomexportdialog.cpp b/sources/ui/bomexportdialog.cpp index 8725d095b..970ae5cab 100644 --- a/sources/ui/bomexportdialog.cpp +++ b/sources/ui/bomexportdialog.cpp @@ -39,11 +39,11 @@ @param parent widget */ BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) : - QDialog(parent), - ui(new Ui::BOMExportDialog), - m_project(project) + QDialog(parent), + ui(new Ui::BOMExportDialog), + m_project(project) { - ui->setupUi(this); + ui->setupUi(this); m_export_info.insert("pos", tr("Position")); m_export_info.insert("folio_title", tr("Titre du folio")); @@ -59,10 +59,14 @@ BOMExportDialog::BOMExportDialog(QETProject *project, QWidget *parent) : m_button_group.addButton(ui->m_coil_cb, 4); m_button_group.addButton(ui->m_protection_cb, 5); #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove - connect(&m_button_group, static_cast(&QButtonGroup::buttonClicked), [this](int id) + connect(&m_button_group, + static_cast(&QButtonGroup::buttonClicked), + [this](int id) #else #pragma message("@TODO remove code for QT 5.15 or later") - connect(&m_button_group, static_cast(&QButtonGroup::idClicked), [this](int id) + connect(&m_button_group, + static_cast(&QButtonGroup::idClicked), + [this](int id) #endif { auto check_box = static_cast(m_button_group.button(0)); @@ -352,7 +356,7 @@ QString BOMExportDialog::headers() const header_string += "\n"; } - else if (!queryStr().isEmpty()) //Try to retreive the header according to the sql query + else if (!queryStr().isEmpty())//Try to retreive the header according to the sql query { if (queryStr().startsWith("SELECT ") && queryStr().contains("FROM")) { diff --git a/sources/ui/bomexportdialog.h b/sources/ui/bomexportdialog.h index 92dabe42d..830bd9258 100644 --- a/sources/ui/bomexportdialog.h +++ b/sources/ui/bomexportdialog.h @@ -33,44 +33,46 @@ class BOMExportDialog; class BOMExportDialog : public QDialog { - Q_OBJECT + Q_OBJECT - public: - explicit BOMExportDialog(QETProject *project, QWidget *parent = nullptr); - ~BOMExportDialog() override; + public: + explicit BOMExportDialog(QETProject *project, + QWidget *parent = nullptr); + ~BOMExportDialog() override; virtual int exec() override; QStringList selectedKeys() const; QString translatedKeys(const QString &key) const; - private slots: - void on_m_add_pb_clicked(); - void on_m_remove_pb_clicked(); - void on_m_up_pb_clicked(); - void on_m_down_pb_clicked(); - void on_m_save_name_le_textChanged(const QString &arg1); - void on_m_format_as_nomenclature_rb_toggled(bool checked); - void on_m_edit_sql_query_cb_clicked(); - void on_m_save_current_conf_pb_clicked(); - void on_m_load_pb_clicked(); + private slots: + void on_m_add_pb_clicked(); + void on_m_remove_pb_clicked(); + void on_m_up_pb_clicked(); + void on_m_down_pb_clicked(); + void on_m_save_name_le_textChanged(const QString &arg1); + void on_m_format_as_nomenclature_rb_toggled(bool checked); + void on_m_edit_sql_query_cb_clicked(); + void on_m_save_current_conf_pb_clicked(); + void on_m_load_pb_clicked(); private: - void setUpItems(); - QString getBom(); - QString headers() const; - bool createDataBase(); - void populateDataBase(); - QHash elementInfoToString(Element *elmt) const; - QString queryStr() const; - void updateQueryLine(); - void fillSavedQuery(); + void setUpItems(); + QString getBom(); + QString headers() const; + bool createDataBase(); + void populateDataBase(); + QHash elementInfoToString( + Element *elmt) const; + QString queryStr() const; + void updateQueryLine(); + void fillSavedQuery(); - private: - Ui::BOMExportDialog *ui; - QETProject *m_project = nullptr; - QSqlDatabase m_data_base; + private: + Ui::BOMExportDialog *ui; + QETProject *m_project = nullptr; + QSqlDatabase m_data_base; QSqlQuery m_insert_query; - QString m_custom_query; + QString m_custom_query; QHash m_export_info; QButtonGroup m_button_group; QList m_items_list; diff --git a/sources/ui/configsaveloaderwidget.cpp b/sources/ui/configsaveloaderwidget.cpp index 9621d8644..cb9631eb6 100644 --- a/sources/ui/configsaveloaderwidget.cpp +++ b/sources/ui/configsaveloaderwidget.cpp @@ -19,10 +19,10 @@ #include "ui_configsaveloaderwidget.h" ConfigSaveLoaderWidget::ConfigSaveLoaderWidget(QWidget *parent) : - QGroupBox(parent), - ui(new Ui::ConfigSaveLoaderWidget) + QGroupBox(parent), + ui(new Ui::ConfigSaveLoaderWidget) { - ui->setupUi(this); + ui->setupUi(this); } ConfigSaveLoaderWidget::~ConfigSaveLoaderWidget() diff --git a/sources/ui/configsaveloaderwidget.h b/sources/ui/configsaveloaderwidget.h index 7209d9db5..a9926b2ad 100644 --- a/sources/ui/configsaveloaderwidget.h +++ b/sources/ui/configsaveloaderwidget.h @@ -34,7 +34,7 @@ class ConfigSaveLoaderWidget; */ class ConfigSaveLoaderWidget : public QGroupBox { - Q_OBJECT + Q_OBJECT public: explicit ConfigSaveLoaderWidget(QWidget *parent = nullptr); diff --git a/sources/ui/diagrampropertiesdialog.cpp b/sources/ui/diagrampropertiesdialog.cpp index 5b1f4cbb6..0b1ab5257 100644 --- a/sources/ui/diagrampropertiesdialog.cpp +++ b/sources/ui/diagrampropertiesdialog.cpp @@ -46,7 +46,7 @@ DiagramPropertiesDialog::DiagramPropertiesDialog(Diagram *diagram, QWidget *pare setWindowFlags(Qt::Sheet); #endif - setWindowTitle(tr("Propriétés du folio", "window title")); + setWindowTitle(tr("Propriétés du folio", "window title")); //Border widget BorderPropertiesWidget *border_infos = new BorderPropertiesWidget(border, this); @@ -148,8 +148,8 @@ void DiagramPropertiesDialog::editAutonum() Open folio autonum editor */ void DiagramPropertiesDialog::editAutoFolioNum () { - ProjectPropertiesDialog ppd (m_diagram->project(), this); - ppd.setCurrentPage(ProjectPropertiesDialog::Autonum); - ppd.changeToFolio(); - ppd.exec(); + ProjectPropertiesDialog ppd (m_diagram->project(), this); + ppd.setCurrentPage(ProjectPropertiesDialog::Autonum); + ppd.changeToFolio(); + ppd.exec(); } diff --git a/sources/ui/diagrampropertiesdialog.h b/sources/ui/diagrampropertiesdialog.h index 85dab08d4..612bb474c 100644 --- a/sources/ui/diagrampropertiesdialog.h +++ b/sources/ui/diagrampropertiesdialog.h @@ -37,7 +37,7 @@ class DiagramPropertiesDialog : public QDialog { public slots: void editAutonum (); - void editAutoFolioNum (); + void editAutoFolioNum (); private: Diagram *m_diagram; diff --git a/sources/ui/diagramselection.cpp b/sources/ui/diagramselection.cpp index 72be98369..42b3a5d15 100644 --- a/sources/ui/diagramselection.cpp +++ b/sources/ui/diagramselection.cpp @@ -66,7 +66,8 @@ void diagramselection::load_TableDiagram() { QTableWidgetItem *item_State = new QTableWidgetItem(); QString diagram_title = list_diagram_.at(i) -> title(); - if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre"); + if (diagram_title.isEmpty()) + diagram_title = tr("Folio sans titre"); item_Name -> setData(Qt::DisplayRole, diagram_title); item_State -> setData(Qt::CheckStateRole, Qt::Checked); diff --git a/sources/ui/dynamicelementtextitemeditor.cpp b/sources/ui/dynamicelementtextitemeditor.cpp index b61df0243..8145ee5a6 100644 --- a/sources/ui/dynamicelementtextitemeditor.cpp +++ b/sources/ui/dynamicelementtextitemeditor.cpp @@ -32,15 +32,15 @@ #include DynamicElementTextItemEditor::DynamicElementTextItemEditor(Element *element, QWidget *parent) : - AbstractElementPropertiesEditorWidget(parent), - ui(new Ui::DynamicElementTextItemEditor) + AbstractElementPropertiesEditorWidget(parent), + ui(new Ui::DynamicElementTextItemEditor) { - ui->setupUi(this); + ui->setupUi(this); - ui->m_tree_view->setItemDelegate(new DynamicTextItemDelegate(ui->m_tree_view)); + ui->m_tree_view->setItemDelegate(new DynamicTextItemDelegate(ui->m_tree_view)); ui->m_remove_selection->setDisabled(true); - setElement(element); + setElement(element); } DynamicElementTextItemEditor::~DynamicElementTextItemEditor() @@ -50,17 +50,17 @@ DynamicElementTextItemEditor::~DynamicElementTextItemEditor() void DynamicElementTextItemEditor::setElement(Element *element) { - if (m_element == element) - return; - - m_element = element; - - DynamicElementTextModel *old_model = m_model; - m_model = new DynamicElementTextModel(element, ui->m_tree_view); + if (m_element == element) + return; + + m_element = element; + + DynamicElementTextModel *old_model = m_model; + m_model = new DynamicElementTextModel(element, ui->m_tree_view); connect(m_model, &DynamicElementTextModel::dataChanged, this, &DynamicElementTextItemEditor::dataEdited); - ui->m_tree_view->setModel(m_model); - - if(old_model) + ui->m_tree_view->setModel(m_model); + + if(old_model) delete old_model; } @@ -198,10 +198,10 @@ void DynamicElementTextItemEditor::dataEdited() */ void DynamicElementTextItemEditor::on_m_add_text_clicked() { - if (!m_element) - return; + if (!m_element) + return; - DynamicElementTextItem *deti = new DynamicElementTextItem(m_element); + DynamicElementTextItem *deti = new DynamicElementTextItem(m_element); if (m_element->diagram()) { m_element->diagram()->undoStack().push(new AddElementTextCommand(m_element, deti)); @@ -219,9 +219,9 @@ void DynamicElementTextItemEditor::on_m_add_text_clicked() */ void DynamicElementTextItemEditor::on_m_remove_selection_clicked() { - DynamicElementTextItem *deti = m_model->textFromIndex(ui->m_tree_view->currentIndex()); - if(deti) - { + DynamicElementTextItem *deti = m_model->textFromIndex(ui->m_tree_view->currentIndex()); + if(deti) + { if(m_element->diagram()) { DiagramContent dc; @@ -229,7 +229,7 @@ void DynamicElementTextItemEditor::on_m_remove_selection_clicked() m_element->diagram()->undoStack().push(new DeleteQGraphicsItemCommand(m_element->diagram(), dc)); } return; - } + } ElementTextItemGroup *group = m_model->groupFromIndex(ui->m_tree_view->currentIndex()); if(group && m_element.data()->diagram()) m_element.data()->diagram()->undoStack().push(new RemoveTextsGroupCommand(m_element.data(), group)); @@ -259,10 +259,10 @@ void DynamicElementTextItemEditor::on_m_tree_view_clicked(const QModelIndex &ind void DynamicElementTextItemEditor::on_m_export_pb_clicked() { - ExportElementTextPattern eetp(m_element); + ExportElementTextPattern eetp(m_element); } void DynamicElementTextItemEditor::on_m_import_pb_clicked() { - ImportElementTextPattern ietp(m_element); + ImportElementTextPattern ietp(m_element); } diff --git a/sources/ui/dynamicelementtextmodel.cpp b/sources/ui/dynamicelementtextmodel.cpp index 935a33560..020aebac8 100644 --- a/sources/ui/dynamicelementtextmodel.cpp +++ b/sources/ui/dynamicelementtextmodel.cpp @@ -61,12 +61,12 @@ DynamicElementTextModel::DynamicElementTextModel(Element *element, QObject *pare QStandardItemModel(parent), m_element(element) { - setColumnCount(2); - setHeaderData(0, Qt::Horizontal, tr("Propriété"), Qt::DisplayRole); - setHeaderData(1, Qt::Horizontal, tr("Valeur"), Qt::DisplayRole); - + setColumnCount(2); + setHeaderData(0, Qt::Horizontal, tr("Propriété"), Qt::DisplayRole); + setHeaderData(1, Qt::Horizontal, tr("Valeur"), Qt::DisplayRole); + connect(this, &DynamicElementTextModel::itemChanged, this, &DynamicElementTextModel::itemDataChanged); - + connect(m_element.data(), &Element::textsGroupAdded, this, &DynamicElementTextModel::addGroup, Qt::DirectConnection); connect(m_element.data(), &Element::textsGroupAboutToBeRemoved, this, &DynamicElementTextModel::removeGroup, Qt::DirectConnection); connect(m_element.data(), &Element::textRemoved, this, &DynamicElementTextModel::removeText, Qt::DirectConnection); @@ -77,7 +77,7 @@ DynamicElementTextModel::DynamicElementTextModel(Element *element, QObject *pare for (ElementTextItemGroup *grp : m_element.data()->textGroups()) addGroup(grp); - for (DynamicElementTextItem *deti : m_element.data()->dynamicTextItems()) + for (DynamicElementTextItem *deti : m_element.data()->dynamicTextItems()) this->appendRow(itemsForText(deti)); } @@ -115,61 +115,79 @@ bool DynamicElementTextModel::indexIsInGroup(const QModelIndex &index) const /** @brief DynamicElementTextModel::itemsForText @param deti - @return The items for the text @deti, if the text @deti is already managed by this model + @return The items for the text deti, + if the text deti is already managed by this model the returned list is empty - The returned items haven't got the same number of childs if the text is in a group or not. + The returned items haven't got the same number + of childs if the text is in a group or not. */ -QList DynamicElementTextModel::itemsForText(DynamicElementTextItem *deti) +QList DynamicElementTextModel::itemsForText( + DynamicElementTextItem *deti) { QList qsi_list; if(m_texts_list.keys().contains(deti)) - return qsi_list; - + return qsi_list; + QStandardItem *qsi = new QStandardItem(deti->toPlainText()); - qsi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled |Qt::ItemIsDragEnabled); + qsi->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + |Qt::ItemIsDragEnabled); qsi->setIcon(QET::Icons::PartText); - //Source of text - QStandardItem *src = new QStandardItem(tr("Source du texte")); - src->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - + //Source of text + QStandardItem *src = new QStandardItem(tr("Source du texte")); + src->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + QString title; - if (deti->textFrom() == DynamicElementTextItem::UserText) title = tr("Texte utilisateur"); - else if (deti->textFrom() == DynamicElementTextItem::ElementInfo) title = tr("Information de l'élément"); + if (deti->textFrom() == DynamicElementTextItem::UserText) + title = tr("Texte utilisateur"); + else if (deti->textFrom() == DynamicElementTextItem::ElementInfo) + title = tr("Information de l'élément"); else title = tr("Texte composé"); - QStandardItem *srca = new QStandardItem(title); - srca->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - srca->setData(textFrom, Qt::UserRole+1); - - qsi_list << src << srca; - qsi->appendRow(qsi_list); - - //User text + QStandardItem *srca = new QStandardItem(title); + srca->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + srca->setData(textFrom, Qt::UserRole+1); + + qsi_list << src << srca; + qsi->appendRow(qsi_list); + + //User text QStandardItem *usr = new QStandardItem(tr("Texte")); - usr->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - QStandardItem *usra = new QStandardItem(deti->toPlainText()); - usra->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - usra->setData(DynamicElementTextModel::userText, Qt::UserRole+1); - + usr->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QStandardItem *usra = new QStandardItem(deti->toPlainText()); + usra->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + usra->setData(DynamicElementTextModel::userText, Qt::UserRole+1); + qsi_list.clear(); - qsi_list << usr << usra; - qsi->appendRow(qsi_list); - + qsi_list << usr << usra; + qsi->appendRow(qsi_list); + //Info text QStandardItem *info = new QStandardItem(tr("Information")); - info->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - QStandardItem *infoa = new QStandardItem(QETApp::elementTranslatedInfoKey(deti->infoName())); - infoa->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - infoa->setData(DynamicElementTextModel::infoText, Qt::UserRole+1); //Use to know the edited thing - infoa->setData(deti->infoName(), Qt::UserRole+2); //Use to know to element info name - + info->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QStandardItem *infoa = + new QStandardItem( + QETApp::elementTranslatedInfoKey( + deti->infoName())); + infoa->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + //Use to know the edited thing + infoa->setData(DynamicElementTextModel::infoText, Qt::UserRole+1); + //Use to know to element info name + infoa->setData(deti->infoName(), Qt::UserRole+2); + qsi_list.clear(); - qsi_list << info << infoa; - qsi->appendRow(qsi_list); + qsi_list << info << infoa; + qsi->appendRow(qsi_list); //Composite text QStandardItem *composite = new QStandardItem(tr("Texte composé")); @@ -178,28 +196,36 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI DiagramContext dc; if(deti->elementUseForInfo()) dc = deti->elementUseForInfo()->elementInformations(); - QStandardItem *compositea = new QStandardItem(deti->compositeText().isEmpty() ? - tr("Mon texte composé") : - autonum::AssignVariables::replaceVariable(deti->compositeText(), dc)); - compositea->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - compositea->setData(DynamicElementTextModel::compositeText, Qt::UserRole+1); //Use to know the edited thing - compositea->setData(deti->compositeText(), Qt::UserRole+2); //Use to know to element composite formula + QStandardItem *compositea = new QStandardItem(deti->compositeText().isEmpty() + ? tr("Mon texte composé") + : autonum::AssignVariables::replaceVariable( + deti->compositeText(), dc)); + compositea->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + //Use to know the edited thing + compositea->setData(DynamicElementTextModel::compositeText, + Qt::UserRole+1); + //Use to know to element composite formula + compositea->setData(deti->compositeText(), Qt::UserRole+2); qsi_list.clear(); qsi_list << composite << compositea; qsi->appendRow(qsi_list); - - //Size + + //Size QStandardItem *size = new QStandardItem(tr("Taille")); - size->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - QStandardItem *siza = new QStandardItem(); + size->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QStandardItem *siza = new QStandardItem(); siza->setData(deti->font().pointSize(), Qt::EditRole); - siza->setData(DynamicElementTextModel::size, Qt::UserRole+1); - siza->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - - qsi_list.clear(); - qsi_list << size << siza; + siza->setData(DynamicElementTextModel::size, Qt::UserRole+1); + siza->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + + qsi_list.clear(); + qsi_list << size << siza; qsi->appendRow(qsi_list); //Font @@ -216,18 +242,20 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI qsi_list << font << fonta; qsi->appendRow(qsi_list); - //Color - QStandardItem *color = new QStandardItem(tr("Couleur")); - color->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - - QStandardItem *colora = new QStandardItem; - colora->setData(deti->color(), Qt::ForegroundRole); - colora->setData(deti->color(), Qt::EditRole); - colora->setData(DynamicElementTextModel::color, Qt::UserRole+1); - colora->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - - qsi_list.clear(); - qsi_list << color << colora; + //Color + QStandardItem *color = new QStandardItem(tr("Couleur")); + color->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); + + QStandardItem *colora = new QStandardItem; + colora->setData(deti->color(), Qt::ForegroundRole); + colora->setData(deti->color(), Qt::EditRole); + colora->setData(DynamicElementTextModel::color, Qt::UserRole+1); + colora->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + + qsi_list.clear(); + qsi_list << color << colora; qsi->appendRow(qsi_list); //Frame @@ -238,7 +266,9 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI frame_a->setCheckable(true); frame_a->setCheckState(deti->frame()? Qt::Checked : Qt::Unchecked); frame_a->setData(DynamicElementTextModel::frame, Qt::UserRole+1); - frame_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable); + frame_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsUserCheckable); qsi_list.clear(); qsi_list << frame << frame_a; @@ -251,7 +281,9 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI QStandardItem *width_a = new QStandardItem; width_a->setData(deti->textWidth(), Qt::EditRole); width_a->setData(DynamicElementTextModel::textWidth, Qt::UserRole+1); - width_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + width_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << width << width_a; @@ -266,7 +298,9 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI QStandardItem *x_pos_a = new QStandardItem; x_pos_a->setData(deti->pos().x(), Qt::EditRole); x_pos_a->setData(DynamicElementTextModel::pos, Qt::UserRole+1); - x_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + x_pos_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << x_pos << x_pos_a; @@ -279,7 +313,9 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI QStandardItem *y_pos_a = new QStandardItem; y_pos_a->setData(deti->pos().y(), Qt::EditRole); y_pos_a->setData(DynamicElementTextModel::pos, Qt::UserRole+1); - y_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + y_pos_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << y_pos << y_pos_a; @@ -291,8 +327,11 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI QStandardItem *rot_a = new QStandardItem; rot_a->setData(deti->rotation(), Qt::EditRole); - rot_a->setData(DynamicElementTextModel::rotation, Qt::UserRole+1); - rot_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + rot_a->setData(DynamicElementTextModel::rotation, + Qt::UserRole+1); + rot_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear();; qsi_list << rot << rot_a; @@ -303,9 +342,13 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI alignment->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); QStandardItem *alignmenta = new QStandardItem(tr("Éditer")); - alignmenta->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - alignmenta->setData(DynamicElementTextModel::txtAlignment, Qt::UserRole+1); - alignmenta->setData(QVariant::fromValue(deti->alignment()), Qt::UserRole+2); + alignmenta->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + alignmenta->setData(DynamicElementTextModel::txtAlignment, + Qt::UserRole+1); + alignmenta->setData(QVariant::fromValue(deti->alignment()), + Qt::UserRole+2); qsi_list.clear(); qsi_list << alignment << alignmenta; @@ -318,7 +361,7 @@ QList DynamicElementTextModel::itemsForText(DynamicElementTextI empty_qsi->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); qsi_list << qsi << empty_qsi; - m_texts_list.insert(deti, qsi); + m_texts_list.insert(deti, qsi); blockSignals(true); enableSourceText(deti, deti->textFrom()); blockSignals(false); @@ -343,41 +386,45 @@ void DynamicElementTextModel::addText(DynamicElementTextItem *deti) void DynamicElementTextModel::removeText(DynamicElementTextItem *deti) { if (!m_texts_list.contains(deti)) - return; - - QModelIndex text_index = m_texts_list.value(deti)->index(); - this->removeRow(text_index.row(), text_index.parent()); - m_texts_list.remove(deti); + return; + + QModelIndex text_index = m_texts_list.value(deti)->index(); + this->removeRow(text_index.row(), text_index.parent()); + m_texts_list.remove(deti); setConnection(deti, false); } /** @brief DynamicElementTextModel::textFromIndex @param index - @return the text associated with @index. Returned value can be nullptr - @Index can be a child of an index associated with a text and can be the column 0 or 1. + @return the text associated with index. Returned value can be nullptr + Index can be a child of an index associated with a text + and can be the column 0 or 1. */ -DynamicElementTextItem *DynamicElementTextModel::textFromIndex(const QModelIndex &index) const +DynamicElementTextItem *DynamicElementTextModel::textFromIndex( + const QModelIndex &index) const { - if(!index.isValid()) - return nullptr; - - if (QStandardItem *item = itemFromIndex(index)) - return textFromItem(item); - else - return nullptr; + if(!index.isValid()) + return nullptr; + + if (QStandardItem *item = itemFromIndex(index)) + return textFromItem(item); + else + return nullptr; } /** @brief DynamicElementTextModel::textFromItem @param item - @return the text associated with @item. Return value can be nullptr - @item can be a child of an item associated with a text and can be the column 0 or 1. + @return the text associated with item. Return value can be nullptr + item can be a child of an item associated with a text + and can be the column 0 or 1. Note can return nullptr */ -DynamicElementTextItem *DynamicElementTextModel::textFromItem(QStandardItem *item) const +DynamicElementTextItem *DynamicElementTextModel::textFromItem( + QStandardItem *item) const { - //Get the item of the column 0 + //Get the item of the column 0 if(item->column() == 1) { if(item->parent()) @@ -385,7 +432,7 @@ DynamicElementTextItem *DynamicElementTextModel::textFromItem(QStandardItem *ite else item = itemFromIndex(index(item->row(),0)); } - //Item haven't got parent, so they can be only a text or a group + //Item haven't got parent, so they can be only a text or a group if(!item->parent()) { if(m_texts_list.values().contains(item)) @@ -426,9 +473,10 @@ DynamicElementTextItem *DynamicElementTextModel::textFromItem(QStandardItem *ite /** @brief DynamicElementTextModel::indexFromText @param text - @return the QModelIndex for @text, or a default QModelIndex if not match + @return the QModelIndex for text, or a default QModelIndex if not match */ -QModelIndex DynamicElementTextModel::indexFromText(DynamicElementTextItem *text) const +QModelIndex DynamicElementTextModel::indexFromText( + DynamicElementTextItem *text) const { if(m_texts_list.contains(text)) return m_texts_list.value(text)->index(); @@ -439,11 +487,14 @@ QModelIndex DynamicElementTextModel::indexFromText(DynamicElementTextItem *text) /** @brief DynamicElementTextModel::undoForEditedText @param deti - @return A QUndoCommand that describe all changes made for @deti. - Each change made for @deti is append as a child of the returned QUndoCommand. - In other word, if the returned QUndoCommand have no child, that mean there is no change. + @return A QUndoCommand that describe all changes made for deti. + Each change made for deti is append as a child of the returned QUndoCommand. + In other word, if the returned QUndoCommand have no child, + that mean there is no change. */ -QUndoCommand *DynamicElementTextModel::undoForEditedText(DynamicElementTextItem *deti, QUndoCommand *parent_undo) const +QUndoCommand *DynamicElementTextModel::undoForEditedText( + DynamicElementTextItem *deti, + QUndoCommand *parent_undo) const { QUndoCommand *undo = nullptr; @@ -565,11 +616,14 @@ QUndoCommand *DynamicElementTextModel::undoForEditedText(DynamicElementTextItem @brief DynamicElementTextModel::undoForEditedGroup @param group @param parent_undo - @return A QUndoCommand that describe all changes made for @group. - Each change made for @group is append as a child of the returned QUndoCommand. - In other word, if the returned QUndoCommand have no child, that mean there is no change. + @return A QUndoCommand that describe all changes made for group. + Each change made for group is append as a child of the returned QUndoCommand. + In other word, if the returned QUndoCommand have no child, + that mean there is no change. */ -QUndoCommand *DynamicElementTextModel::undoForEditedGroup(ElementTextItemGroup *group, QUndoCommand *parent_undo) const +QUndoCommand *DynamicElementTextModel::undoForEditedGroup( + ElementTextItemGroup *group, + QUndoCommand *parent_undo) const { QUndoCommand *undo = nullptr; if(parent_undo) @@ -640,7 +694,10 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) //Group QStandardItem *grp = new QStandardItem(group->name()); - grp->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsDropEnabled | Qt::ItemIsEditable); + grp->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsDropEnabled + | Qt::ItemIsEditable); grp->setIcon(QET::Icons::textGroup); QStandardItem *empty_qsi = new QStandardItem(0); @@ -664,8 +721,11 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) default: break;} QStandardItem *alignment_a = new QStandardItem(text); - alignment_a->setData(DynamicElementTextModel::grpAlignment, Qt::UserRole+1); - alignment_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + alignment_a->setData(DynamicElementTextModel::grpAlignment, + Qt::UserRole+1); + alignment_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << alignment << alignment_a; grp->appendRow(qsi_list); @@ -677,7 +737,9 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) QStandardItem *x_pos_a = new QStandardItem; x_pos_a->setData(group->pos().x(), Qt::EditRole); x_pos_a->setData(DynamicElementTextModel::grpPos, Qt::UserRole+1); - x_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + x_pos_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << x_pos << x_pos_a; @@ -690,7 +752,9 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) QStandardItem *y_pos_a = new QStandardItem; y_pos_a->setData(group->pos().y(), Qt::EditRole); y_pos_a->setData(DynamicElementTextModel::grpPos, Qt::UserRole+1); - y_pos_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + y_pos_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << y_pos << y_pos_a; @@ -703,7 +767,9 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) QStandardItem *rot_a = new QStandardItem; rot_a->setData(group->rotation(), Qt::EditRole); rot_a->setData(DynamicElementTextModel::grpRotation, Qt::UserRole+1); - rot_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + rot_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << rot << rot_a; grp->appendRow(qsi_list); @@ -715,7 +781,9 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) QStandardItem *v_adj_a = new QStandardItem; v_adj_a->setData(group->verticalAdjustment(), Qt::EditRole); v_adj_a->setData(DynamicElementTextModel::grpVAdjust, Qt::UserRole+1); - v_adj_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + v_adj_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); qsi_list.clear(); qsi_list << v_adj << v_adj_a; grp->appendRow(qsi_list); @@ -728,7 +796,9 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) frame_a->setCheckable(true); frame_a->setCheckState(group->frame()? Qt::Checked : Qt::Unchecked); frame_a->setData(DynamicElementTextModel::grpFrame, Qt::UserRole+1); - frame_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable); + frame_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsUserCheckable); qsi_list.clear(); qsi_list << frame_ << frame_a; grp->appendRow(qsi_list); @@ -740,9 +810,14 @@ void DynamicElementTextModel::addGroup(ElementTextItemGroup *group) QStandardItem *hold_bottom_a = new QStandardItem(); hold_bottom_a->setCheckable(true); - hold_bottom_a->setCheckState(group->holdToBottomPage() ? Qt::Checked : Qt::Unchecked); - hold_bottom_a->setData(DynamicElementTextModel::grpHoldBottom, Qt::UserRole+1); - hold_bottom_a->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsUserCheckable); + hold_bottom_a->setCheckState(group->holdToBottomPage() + ? Qt::Checked + : Qt::Unchecked); + hold_bottom_a->setData(DynamicElementTextModel::grpHoldBottom, + Qt::UserRole+1); + hold_bottom_a->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsUserCheckable); qsi_list.clear(); qsi_list << hold_bottom << hold_bottom_a; grp->appendRow(qsi_list); @@ -780,13 +855,15 @@ void DynamicElementTextModel::removeGroup(ElementTextItemGroup *group) @param deti @param group */ -void DynamicElementTextModel::addTextToGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group) +void DynamicElementTextModel::addTextToGroup(DynamicElementTextItem *deti, + ElementTextItemGroup *group) { QStandardItem *group_item = m_groups_list.value(group); group_item->appendRow(itemsForText(deti)); } -void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti, ElementTextItemGroup *group) +void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti, + ElementTextItemGroup *group) { Q_UNUSED(group) @@ -802,29 +879,33 @@ void DynamicElementTextModel::removeTextFromGroup(DynamicElementTextItem *deti, /** @brief DynamicElementTextModel::groupFromIndex @param index - @return the group associated with @index. Return value can be nullptr - @Index can be a child of an index associated with a group and can be the column 0 or 1. + @return the group associated with index. Return value can be nullptr + @Index can be a child of an index associated with a group + and can be the column 0 or 1. */ -ElementTextItemGroup *DynamicElementTextModel::groupFromIndex(const QModelIndex &index) const +ElementTextItemGroup *DynamicElementTextModel::groupFromIndex( + const QModelIndex &index) const { if(!index.isValid()) - return nullptr; - - if (QStandardItem *item = itemFromIndex(index)) - return groupFromItem(item); - else - return nullptr; + return nullptr; + + if (QStandardItem *item = itemFromIndex(index)) + return groupFromItem(item); + else + return nullptr; } /** @brief DynamicElementTextModel::groupFromItem @param item - @return the group associated with @item. Return value can be nullptr - @item can be a child of an item associated with a group and can be the column 0 or 1. + @return the group associated with item. Return value can be nullptr + item can be a child of an item associated with a group + and can be the column 0 or 1. */ -ElementTextItemGroup *DynamicElementTextModel::groupFromItem(QStandardItem *item) const +ElementTextItemGroup *DynamicElementTextModel::groupFromItem( + QStandardItem *item) const { - //Get the item of the column 0 + //Get the item of the column 0 if(item->column() == 1) { if(item->parent()) @@ -845,10 +926,11 @@ ElementTextItemGroup *DynamicElementTextModel::groupFromItem(QStandardItem *item /** @brief DynamicElementTextModel::indexFromGroup @param group - @return The index associated to the group @group + @return The index associated to the group group or a default QModelIndex if not match */ -QModelIndex DynamicElementTextModel::indexFromGroup(ElementTextItemGroup *group) const +QModelIndex DynamicElementTextModel::indexFromGroup( + ElementTextItemGroup *group) const { if(m_groups_list.keys().contains(group)) return m_groups_list.value(group)->index(); @@ -870,7 +952,10 @@ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const if(index.column() == 1) { if(index.parent().isValid()) - item = itemFromIndex(index.parent().QModelIndex::model()->index(index.row(),0)); + item = itemFromIndex(index.parent() + .QModelIndex::model()->index( + index.row(), + 0)); else item = itemFromIndex(this->index(index.row(),0)); } @@ -886,8 +971,8 @@ bool DynamicElementTextModel::indexIsText(const QModelIndex &index) const /** @brief DynamicElementTextModel::indexIsGroup @param index - @return True if @index represente a group, both for the column 0 and 1. - Return false if @index is a child of an index associated to a group. + @return True if index represente a group, both for the column 0 and 1. + Return false if index is a child of an index associated to a group. */ bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const { @@ -897,7 +982,9 @@ bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const if(index.column() == 1) { if(index.parent().isValid()) - item = itemFromIndex(index.parent().QModelIndex::model()->index(index.row(),0)); + item = itemFromIndex(index.parent() + .QModelIndex::model()->index( + index.row(),0)); else item = itemFromIndex(this->index(index.row(),0)); } @@ -910,7 +997,12 @@ bool DynamicElementTextModel::indexIsGroup(const QModelIndex &index) const return false; } -bool DynamicElementTextModel::canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const +bool DynamicElementTextModel::canDropMimeData( + const QMimeData *data, + Qt::DropAction action, + int row, + int column, + const QModelIndex &parent) const { Q_UNUSED(action); @@ -963,9 +1055,14 @@ bool DynamicElementTextModel::canDropMimeData(const QMimeData *data, Qt::DropAct @param row @param column @param parent - @return In any case return false, for overwrite the default behavior of model. + @return In any case return false, + for overwrite the default behavior of model. */ -bool DynamicElementTextModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) +bool DynamicElementTextModel::dropMimeData(const QMimeData *data, + Qt::DropAction action, + int row, + int column, + const QModelIndex &parent) { Q_UNUSED(action) @@ -1093,11 +1190,14 @@ QStringList DynamicElementTextModel::mimeTypes() const /** @brief DynamicElementTextModel::enableSourceText - Enable the good field, according to the current source of text, for the edited text @deti + Enable the good field, according to the current source of text, + for the edited text @deti @param deti @param tf */ -void DynamicElementTextModel::enableSourceText(DynamicElementTextItem *deti, DynamicElementTextItem::TextFrom tf) +void DynamicElementTextModel::enableSourceText( + DynamicElementTextItem *deti, + DynamicElementTextItem::TextFrom tf) { if (!m_texts_list.contains(deti)) return; @@ -1128,7 +1228,8 @@ void DynamicElementTextModel::enableSourceText(DynamicElementTextItem *deti, Dyn Enable/disable the item "group rotation" according the option hold to bottom @param group */ -void DynamicElementTextModel::enableGroupRotationAndPos(ElementTextItemGroup *group) +void DynamicElementTextModel::enableGroupRotationAndPos( + ElementTextItemGroup *group) { if(!m_groups_list.contains(group)) return; @@ -1146,12 +1247,21 @@ void DynamicElementTextModel::enableGroupRotationAndPos(ElementTextItemGroup *gr } else { - qsi->child(x_grp_row, 0)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - qsi->child(x_grp_row, 1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - qsi->child(y_grp_row, 0)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - qsi->child(y_grp_row, 1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); - qsi->child(rot_grp_row, 0)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled); - qsi->child(rot_grp_row, 1)->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable); + qsi->child(x_grp_row, 0)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled); + qsi->child(x_grp_row, 1)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + qsi->child(y_grp_row, 0)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled); + qsi->child(y_grp_row, 1)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); + qsi->child(rot_grp_row, 0)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled); + qsi->child(rot_grp_row, 1)->setFlags(Qt::ItemIsSelectable + | Qt::ItemIsEnabled + | Qt::ItemIsEditable); } } @@ -1210,11 +1320,14 @@ void DynamicElementTextModel::itemDataChanged(QStandardItem *qsi) } } - //We emit the signal only if @qsi is in the second column, because the data are stored on this column - //the first column is use only for display the title of the property, except for the name of texts group - if((m_groups_list.values().contains(qsi) || qsi->column() == 1) && !m_block_dataChanged) + //We emit the signal only if @qsi is in the second column, + //because the data are stored on this column + //the first column is use only for display the title of the property, + //except for the name of texts group + if((m_groups_list.values().contains(qsi) || qsi->column() == 1) + && !m_block_dataChanged) emit dataChanged(); - if(deti) deti->updateXref(); + if(deti) deti->updateXref(); } /** @@ -1295,7 +1408,8 @@ void DynamicElementTextModel::setConnection(ElementTextItemGroup *group, bool se } } -void DynamicElementTextModel::updateDataFromText(DynamicElementTextItem *deti, ValueType type) +void DynamicElementTextModel::updateDataFromText(DynamicElementTextItem *deti, + ValueType type) { QStandardItem *qsi = m_texts_list.value(deti); if (!qsi) @@ -1387,7 +1501,9 @@ void DynamicElementTextModel::updateDataFromText(DynamicElementTextItem *deti, V m_block_dataChanged = false; } -void DynamicElementTextModel::updateDataFromGroup(ElementTextItemGroup *group, DynamicElementTextModel::ValueType type) +void DynamicElementTextModel::updateDataFromGroup( + ElementTextItemGroup *group, + DynamicElementTextModel::ValueType type) { QStandardItem *qsi = m_groups_list.value(group); if (!qsi) @@ -1445,10 +1561,13 @@ void DynamicElementTextModel::updateDataFromGroup(ElementTextItemGroup *group, D ***************************************************/ DynamicTextItemDelegate::DynamicTextItemDelegate(QObject *parent) : - QStyledItemDelegate(parent) + QStyledItemDelegate(parent) {} -QWidget *DynamicTextItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const +QWidget *DynamicTextItemDelegate::createEditor( + QWidget *parent, + const QStyleOptionViewItem &option, + const QModelIndex &index) const { switch (index.data(Qt::UserRole+1).toInt()) { @@ -1615,7 +1734,10 @@ QWidget *DynamicTextItemDelegate::createEditor(QWidget *parent, const QStyleOpti return QStyledItemDelegate::createEditor(parent, option, index); } -void DynamicTextItemDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const +void DynamicTextItemDelegate::setModelData( + QWidget *editor, + QAbstractItemModel *model, + const QModelIndex &index) const { if (index.isValid()) { @@ -1725,10 +1847,11 @@ void DynamicTextItemDelegate::setModelData(QWidget *editor, QAbstractItemModel * bool DynamicTextItemDelegate::eventFilter(QObject *object, QEvent *event) { - //This is a bad hack, for change the normal behavior : - //in normal behavior, the value is commited 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. - //then the change is apply in live + //This is a bad hack, for change the normal behavior : + //in normal behavior, + //the value is commited 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. + //then the change is apply in live 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_pos") @@ -1752,7 +1875,8 @@ bool DynamicTextItemDelegate::eventFilter(QObject *object, QEvent *event) return true; } - //Like the hack above, change the current index of the combobox, apply the change immediately, no need to lose focus or press enter. + //Like the hack above, change the current index of the combobox, + // apply the change immediately, no need to lose focus or press enter. if((object->objectName() == "text_from" || object->objectName() == "info_text" || object->objectName() == "group_alignment") && event->type() == QEvent::FocusIn) { QComboBox *qcb = static_cast(object); @@ -1767,7 +1891,8 @@ bool DynamicTextItemDelegate::eventFilter(QObject *object, QEvent *event) @param deti @return A list of available info of element */ -QStringList DynamicTextItemDelegate::availableInfo(DynamicElementTextItem *deti) const +QStringList DynamicTextItemDelegate::availableInfo( + DynamicElementTextItem *deti) const { QStringList qstrl; diff --git a/sources/ui/elementinfopartwidget.cpp b/sources/ui/elementinfopartwidget.cpp index f2b3c1a20..7d905c368 100644 --- a/sources/ui/elementinfopartwidget.cpp +++ b/sources/ui/elementinfopartwidget.cpp @@ -135,6 +135,8 @@ Qt::CheckState ElementInfoPartWidget::EraseTextCheckState() const { void ElementInfoPartWidget::on_m_erase_text_clicked() { - ui->line_edit->setText(ui->m_erase_text->isChecked() ? SearchAndReplaceWorker::eraseText() : QString()); + ui->line_edit->setText(ui->m_erase_text->isChecked() + ? SearchAndReplaceWorker::eraseText() + : QString()); ui->line_edit->setDisabled(ui->m_erase_text->isChecked()); } diff --git a/sources/ui/elementpropertieswidget.cpp b/sources/ui/elementpropertieswidget.cpp index 1e8dd26af..8acc93de2 100644 --- a/sources/ui/elementpropertieswidget.cpp +++ b/sources/ui/elementpropertieswidget.cpp @@ -292,7 +292,7 @@ void ElementPropertiesWidget::updateUi() default: break; } - m_list_editor << new DynamicElementTextItemEditor(m_element, this); + m_list_editor << new DynamicElementTextItemEditor(m_element, this); //Add each editors in tab widget for (AbstractElementPropertiesEditorWidget *aepew : m_list_editor) @@ -376,7 +376,7 @@ QWidget *ElementPropertiesWidget::generalWidget() connect(find_in_panel, SIGNAL(clicked()), this, SLOT(findInPanel())); QPushButton *edit_element = new QPushButton(QET::Icons::ElementEdit, tr("Éditer l'élément"), general_widget); connect(edit_element, SIGNAL(clicked()), this, SLOT(editElement())); - QHBoxLayout *hlayout_ = new QHBoxLayout; + QHBoxLayout *hlayout_ = new QHBoxLayout; hlayout_->addWidget(find_in_panel); hlayout_->addWidget(edit_element); vlayout_->addLayout(hlayout_); diff --git a/sources/ui/inditextpropertieswidget.cpp b/sources/ui/inditextpropertieswidget.cpp index 8afb321ef..cc2213c56 100644 --- a/sources/ui/inditextpropertieswidget.cpp +++ b/sources/ui/inditextpropertieswidget.cpp @@ -427,7 +427,7 @@ void IndiTextPropertiesWidget::on_m_advanced_editor_pb_clicked() { void IndiTextPropertiesWidget::on_m_break_html_pb_clicked() { - if (m_text) { + if (m_text) { m_text->setPlainText(m_text->toPlainText()); } for (QPointer piti : m_text_list) { diff --git a/sources/ui/linksingleelementwidget.cpp b/sources/ui/linksingleelementwidget.cpp index f95e52a47..b70ae1189 100644 --- a/sources/ui/linksingleelementwidget.cpp +++ b/sources/ui/linksingleelementwidget.cpp @@ -33,7 +33,8 @@ @param parent the parent widget */ -LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) : +LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, + QWidget *parent) : AbstractElementPropertiesEditorWidget(parent), ui(new Ui::LinkSingleElementWidget) { @@ -46,8 +47,14 @@ LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) m_show_element = new QAction(tr("Montrer l'élément esclave"), this); m_save_header_state = new QAction(tr("Enregistrer la disposition"), this); - connect(m_show_qtwi, &QAction::triggered, [this]() {this->on_m_tree_widget_itemDoubleClicked(this->m_qtwi_at_context_menu, 0);}); - connect(m_link_action, &QAction::triggered, this, &LinkSingleElementWidget::linkTriggered); + connect(m_show_qtwi, + &QAction::triggered, + [this]() + {this->on_m_tree_widget_itemDoubleClicked(this->m_qtwi_at_context_menu, 0);}); + connect(m_link_action, + &QAction::triggered, + this, + &LinkSingleElementWidget::linkTriggered); connect(m_show_element, &QAction::triggered, [this]() { @@ -59,7 +66,10 @@ LinkSingleElementWidget::LinkSingleElementWidget(Element *elmt, QWidget *parent) QHeaderView *qhv = ui->m_tree_widget->header(); qhv->setContextMenuPolicy(Qt::CustomContextMenu); - connect(qhv, &QHeaderView::customContextMenuRequested, this, &LinkSingleElementWidget::headerCustomContextMenuRequested); + connect(qhv, + &QHeaderView::customContextMenuRequested, + this, + &LinkSingleElementWidget::headerCustomContextMenuRequested); connect(m_save_header_state, &QAction::triggered, [this, qhv]() { QByteArray qba = qhv->saveState(); @@ -105,8 +115,14 @@ void LinkSingleElementWidget::setElement(Element *element) //Remove connection of previous edited element if (m_element) { - disconnect(m_element->diagram()->project(), &QETProject::diagramRemoved, this, &LinkSingleElementWidget::diagramWasRemovedFromProject); - disconnect(m_element.data(), &Element::linkedElementChanged, this, &LinkSingleElementWidget::updateUi); + disconnect(m_element->diagram()->project(), + &QETProject::diagramRemoved, + this, + &LinkSingleElementWidget::diagramWasRemovedFromProject); + disconnect(m_element.data(), + &Element::linkedElementChanged, + this, + &LinkSingleElementWidget::updateUi); m_element->setHighlighted(false); } @@ -124,12 +140,16 @@ void LinkSingleElementWidget::setElement(Element *element) if (m_element->linkType() & Element::Slave) m_filter = Element::Master; else if (m_element->linkType() & Element::AllReport) - m_filter = m_element->linkType() == Element::NextReport? Element::PreviousReport : Element::NextReport; + m_filter = m_element->linkType() == Element::NextReport + ? Element::PreviousReport + : Element::NextReport; else m_filter = Element::Simple; - connect(m_element->diagram()->project(), &QETProject::diagramRemoved, this, &LinkSingleElementWidget::diagramWasRemovedFromProject); - connect(m_element.data(), &Element::linkedElementChanged, this, &LinkSingleElementWidget::updateUi, Qt::QueuedConnection); + connect(m_element->diagram()->project(), &QETProject::diagramRemoved, + this, &LinkSingleElementWidget::diagramWasRemovedFromProject); + connect(m_element.data(), &Element::linkedElementChanged, + this, &LinkSingleElementWidget::updateUi, Qt::QueuedConnection); updateUi(); } @@ -234,7 +254,8 @@ void LinkSingleElementWidget::buildTree() if (settings.value("genericpanel/folio", false).toBool()) { autonum::sequentialNumbers seq; - QString F =autonum::AssignVariables::formulaToLabel(diag->border_and_titleblock.folio(), seq, diag, elmt); + QString F =autonum::AssignVariables::formulaToLabel( + diag->border_and_titleblock.folio(), seq, diag, elmt); str_list << F; } else @@ -415,11 +436,19 @@ void LinkSingleElementWidget::setUpHeaderLabels() { if (settings.value("genericpanel/folio", false).toBool()) { - list << tr("Label") << tr("Commentaire") << tr("Label de folio") << tr("Position") << tr("Titre de folio"); + list << tr("Label") + << tr("Commentaire") + << tr("Label de folio") + << tr("Position") + << tr("Titre de folio"); } else { - list << tr("Label") << tr("Commentaire") << tr("N° de folio") << tr("Position") << tr("Titre de folio"); + list << tr("Label") + << tr("Commentaire") + << tr("N° de folio") + << tr("Position") + << tr("Titre de folio"); } } @@ -427,11 +456,25 @@ void LinkSingleElementWidget::setUpHeaderLabels() { if (settings.value("genericpanel/folio", false).toBool()) { - list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("Couleur du conducteur") << tr("Section du conducteur") << tr("Label de folio") << tr("Position") << tr("Titre de folio"); + list << tr("N° de fil") + << tr("Fonction") + << tr("Tension / Protocole") + << tr("Couleur du conducteur") + << tr("Section du conducteur") + << tr("Label de folio") + << tr("Position") + << tr("Titre de folio"); } else { - list << tr("N° de fil") << tr("Fonction") << tr("Tension / Protocole") << tr("Couleur du conducteur") << tr("Section du conducteur") << tr("N° de folio") << tr("Position") << tr("Titre de folio"); + list << tr("N° de fil") + << tr("Fonction") + << tr("Tension / Protocole") + << tr("Couleur du conducteur") + << tr("Section du conducteur") + << tr("N° de folio") + << tr("Position") + << tr("Titre de folio"); } } @@ -440,13 +483,16 @@ void LinkSingleElementWidget::setUpHeaderLabels() /** @brief LinkSingleElementWidget::diagramWasRemovedFromProject - * This slot is called when a diagram is removed from the parent project of edited element + This slot is called when a diagram + is removed from the parent project of edited element to update the content of this widget */ void LinkSingleElementWidget::diagramWasRemovedFromProject() { - //We use a timer because if the removed diagram contain the master element linked to the edited element - //we must to wait for this elements be unlinked, else the list of available master isn't up to date + // We use a timer because if the removed diagram + // contain the master element linked to the edited element + // we must to wait for this elements be unlinked, + // else the list of available master isn't up to date QTimer::singleShot(10, this, SLOT(updateUi())); } @@ -473,19 +519,25 @@ void LinkSingleElementWidget::linkTriggered() } else { - //In no live edit mode, we set the background of the qtwi green, to inform the user - //which element will be linked when he press the apply button + //In no live edit mode, we set the background of the qtwi green, + // to inform the user + // which element will be linked when he press the apply button if (m_pending_qtwi) { for(int i=0 ; i<6 ; i++) { - m_pending_qtwi->setBackground(i,QBrush(Qt::white, Qt::NoBrush)); + m_pending_qtwi->setBackground(i, + QBrush( + Qt::white, + Qt::NoBrush)); } } for (int i=0 ; i<6 ; i++) { - m_qtwi_at_context_menu->setBackground(i,QBrush(Qt::green,Qt::SolidPattern)); + m_qtwi_at_context_menu->setBackground(i, + QBrush(Qt::green, + Qt::SolidPattern)); } m_pending_qtwi = m_qtwi_at_context_menu; } @@ -518,7 +570,8 @@ void LinkSingleElementWidget::showButtons() ui->m_search_field->hide(); } -void LinkSingleElementWidget::headerCustomContextMenuRequested(const QPoint &pos) +void LinkSingleElementWidget::headerCustomContextMenuRequested( + const QPoint &pos) { m_context_menu->clear(); m_context_menu->addAction(m_save_header_state); @@ -544,13 +597,16 @@ void LinkSingleElementWidget::on_m_unlink_pb_clicked() @param item @param column */ -void LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column) +void LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked( + QTreeWidgetItem *item, + int column) { Q_UNUSED(column); if (m_showed_element) { - disconnect(m_showed_element, SIGNAL(destroyed()), this, SLOT(showedElementWasDeleted())); + disconnect(m_showed_element, SIGNAL(destroyed()), + this, SLOT(showedElementWasDeleted())); m_showed_element->setHighlighted(false); } @@ -558,14 +614,18 @@ void LinkSingleElementWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem elmt->diagram()->showMe(); elmt->setHighlighted(true); m_showed_element = elmt; - connect(m_showed_element, SIGNAL(destroyed()), this, SLOT(showedElementWasDeleted())); + connect(m_showed_element, SIGNAL(destroyed()), + this, SLOT(showedElementWasDeleted())); } -void LinkSingleElementWidget::on_m_tree_widget_customContextMenuRequested(const QPoint &pos) +void LinkSingleElementWidget::on_m_tree_widget_customContextMenuRequested( + const QPoint &pos) { - //add the size of the header to display the topleft of the QMenu at the position of the mouse. - //See doc about QWidget::customContextMenuRequested section related to QAbstractScrollArea + //add the size of the header to display the topleft of the QMenu + //at the position of the mouse. + //See doc about QWidget::customContextMenuRequested + //section related to QAbstractScrollArea QPoint point = pos; point.ry()+=ui->m_tree_widget->header()->height(); point = ui->m_tree_widget->mapToGlobal(point); @@ -600,8 +660,9 @@ void LinkSingleElementWidget::on_m_show_this_pb_clicked() /** @brief LinkSingleElementWidget::on_m_search_field_textEdited - Search all items which match with @arg1 and shows it, other items is hidden. - If @arg1 is empty, show all items. + Search all items which match with arg1 and shows it, + other items is hidden. + If arg1 is empty, show all items. @param arg1 */ void LinkSingleElementWidget::on_m_search_field_textEdited(const QString &arg1) diff --git a/sources/ui/marginseditdialog.cpp b/sources/ui/marginseditdialog.cpp index d9e3660b8..ab64241ef 100644 --- a/sources/ui/marginseditdialog.cpp +++ b/sources/ui/marginseditdialog.cpp @@ -21,10 +21,10 @@ #include MarginsEditDialog::MarginsEditDialog(QMargins margins, QWidget *parent) : - QDialog(parent), - ui(new Ui::MarginsEditDialog) + QDialog(parent), + ui(new Ui::MarginsEditDialog) { - ui->setupUi(this); + ui->setupUi(this); ui->m_top_sb->setValue(margins.top()); ui->m_left_sb->setValue(margins.left()); ui->m_right_sb->setValue(margins.right()); @@ -37,7 +37,10 @@ MarginsEditDialog::~MarginsEditDialog() } QMargins MarginsEditDialog::margins() const { - return QMargins(ui->m_left_sb->value(), ui->m_top_sb->value(), ui->m_right_sb->value(), ui->m_bottom_sb->value()); + return QMargins(ui->m_left_sb->value(), + ui->m_top_sb->value(), + ui->m_right_sb->value(), + ui->m_bottom_sb->value()); } /** @@ -45,11 +48,15 @@ QMargins MarginsEditDialog::margins() const { @param margins : margins to set by default @param accepted : bool to know if dialog is accepted @param parent : parent widget. - @return The a margins with the edited value if dialog is accepted or a default constructed QMargins() if dialog is rejected + @return The a margins with the edited value if dialog is accepted + or a default constructed QMargins() if dialog is rejected */ -QMargins MarginsEditDialog::getMargins(QMargins margins, bool *accepted, QWidget *parent) +QMargins MarginsEditDialog::getMargins(QMargins margins, + bool *accepted, + QWidget *parent) { - QScopedPointer d(new MarginsEditDialog(margins, parent)); + QScopedPointer d( + new MarginsEditDialog(margins, parent)); if (d->exec()) { if (accepted) { diff --git a/sources/ui/marginseditdialog.h b/sources/ui/marginseditdialog.h index dc4e82409..31bc27fa3 100644 --- a/sources/ui/marginseditdialog.h +++ b/sources/ui/marginseditdialog.h @@ -31,18 +31,21 @@ class MarginsEditDialog; */ class MarginsEditDialog : public QDialog { - Q_OBJECT + Q_OBJECT - public: - explicit MarginsEditDialog(QMargins margins = QMargins(), QWidget *parent = nullptr); - ~MarginsEditDialog(); + public: + explicit MarginsEditDialog(QMargins margins = QMargins(), + QWidget *parent = nullptr); + ~MarginsEditDialog(); QMargins margins() const; - static QMargins getMargins(QMargins margins = QMargins(), bool *accepted = nullptr, QWidget *parent = nullptr); + static QMargins getMargins(QMargins margins = QMargins(), + bool *accepted = nullptr, + QWidget *parent = nullptr); - private: - Ui::MarginsEditDialog *ui; + private: + Ui::MarginsEditDialog *ui; }; #endif // MARGINSEDITDIALOG_H diff --git a/sources/ui/multipastedialog.cpp b/sources/ui/multipastedialog.cpp index 7370f40d7..9f66a0519 100644 --- a/sources/ui/multipastedialog.cpp +++ b/sources/ui/multipastedialog.cpp @@ -93,7 +93,7 @@ void MultiPasteDialog::updatePreview() void MultiPasteDialog::on_m_button_box_accepted() { - if(m_pasted_content.count()) + if(m_pasted_content.count()) { m_diagram->undoStack().beginMacro(tr("Multi-collage")); diff --git a/sources/ui/potentialselectordialog.cpp b/sources/ui/potentialselectordialog.cpp index c047477c1..b3263e9cd 100644 --- a/sources/ui/potentialselectordialog.cpp +++ b/sources/ui/potentialselectordialog.cpp @@ -221,7 +221,9 @@ ConductorProperties PotentialSelectorDialog::chosenProperties(QListm_conductor_number_1)); + QString text1(tr("%n conducteurs composent le potentiel suivant :", + "", + m_potential_selector->m_conductor_number_1)); ConductorProperties cp1; if(!m_potential_selector->m_properties_list_1.isEmpty()) @@ -275,13 +282,18 @@ void PotentialSelectorDialog::buildWidget() if(!cp1.m_function.isEmpty()) text1.append(tr("\nFonction : %1").arg(cp1.m_function)); if(!cp1.m_tension_protocol.isEmpty()) - text1.append(tr("\nTension/protocole : %1").arg(cp1.m_tension_protocol)); + text1.append(tr("\nTension/protocole : %1") + .arg(cp1.m_tension_protocol)); if(!cp1.m_wire_color.isEmpty()) - text1.append(tr("\nCouleur du conducteur : %1").arg(cp1.m_wire_color)); + text1.append(tr("\nCouleur du conducteur : %1") + .arg(cp1.m_wire_color)); if(!cp1.m_wire_section.isEmpty()) - text1.append(tr("\nSection du conducteur : %1").arg(cp1.m_wire_section)); + text1.append(tr("\nSection du conducteur : %1") + .arg(cp1.m_wire_section)); - QString text2(tr("%n conducteurs composent le potentiel suivant :", "", m_potential_selector->m_conductor_number_2)); + QString text2(tr("%n conducteurs composent le potentiel suivant :", + "", + m_potential_selector->m_conductor_number_2)); ConductorProperties cp2; if(!m_potential_selector->m_properties_list_2.isEmpty()) cp2 = m_potential_selector->m_properties_list_2.first(); @@ -291,11 +303,14 @@ void PotentialSelectorDialog::buildWidget() if(!cp2.m_function.isEmpty()) text2.append(tr("\nFonction : %1").arg(cp2.m_function)); if(!cp2.m_tension_protocol.isEmpty()) - text2.append(tr("\nTension/protocole : %1").arg(cp2.m_tension_protocol)); + text2.append(tr("\nTension/protocole : %1") + .arg(cp2.m_tension_protocol)); if(!cp2.m_wire_color.isEmpty()) - text2.append(tr("\nCouleur du conducteur : %1").arg(cp2.m_wire_color)); + text2.append(tr("\nCouleur du conducteur : %1") + .arg(cp2.m_wire_color)); if(!cp2.m_wire_section.isEmpty()) - text2.append(tr("\nSection du conducteur : %1").arg(cp2.m_wire_section)); + text2.append(tr("\nSection du conducteur : %1") + .arg(cp2.m_wire_section)); QRadioButton *rb1 = new QRadioButton(text1, this); QRadioButton *rb2 = new QRadioButton(text2, this); @@ -304,24 +319,35 @@ void PotentialSelectorDialog::buildWidget() { if(t) { - this->m_sequential_num = this->m_potential_selector->m_seq_num_1; - this->m_properties_list = this->m_potential_selector->m_properties_list_1; - this->m_conductors_to_change = this->m_potential_selector->m_conductors_list_2; + this->m_sequential_num = + this->m_potential_selector->m_seq_num_1; + this->m_properties_list = + this->m_potential_selector + ->m_properties_list_1; + this->m_conductors_to_change = + this->m_potential_selector + ->m_conductors_list_2; } }); connect(rb2, &QRadioButton::toggled, [this](bool t) { if(t) { - this->m_sequential_num = this->m_potential_selector->m_seq_num_2; - this->m_properties_list = this->m_potential_selector->m_properties_list_2; - this->m_conductors_to_change = this->m_potential_selector->m_conductors_list_1; + this->m_sequential_num = + this->m_potential_selector->m_seq_num_2; + this->m_properties_list = + this->m_potential_selector + ->m_properties_list_2; + this->m_conductors_to_change = + this->m_potential_selector + ->m_conductors_list_1; } }); - //Set the radio button of potential with the bigger number of conductors, - //at first position, and check it - if (m_potential_selector->m_conductor_number_1 >= m_potential_selector->m_conductor_number_2) + //Set the radio button of potential with the bigger number of conductors, + //at first position, and check it + if (m_potential_selector->m_conductor_number_1 >= + m_potential_selector->m_conductor_number_2) { ui->verticalLayout->insertWidget(1, rb1); ui->verticalLayout->insertWidget(2, rb2); @@ -348,13 +374,16 @@ void PotentialSelectorDialog::on_buttonBox_accepted() if (m_parent_undo) undo = m_parent_undo; else - undo = new QUndoCommand(tr("Modifier les propriétés de plusieurs conducteurs", "undo caption")); + undo = new QUndoCommand( + tr("Modifier les propriétés de plusieurs conducteurs", + "undo caption")); Diagram * diagram = nullptr; if (m_report) { - if ((m_report->linkType() & Element::AllReport) && !m_report->isFree()) + if ((m_report->linkType() & Element::AllReport) + && !m_report->isFree()) { if (m_report->diagram()) diagram = m_report->diagram(); @@ -363,7 +392,7 @@ void PotentialSelectorDialog::on_buttonBox_accepted() QVariant old_seq, new_seq; new_seq.setValue(m_sequential_num); - //Set the new properties for each conductors of the new potential + //Set the new properties for each conductors of the new potential foreach(Conductor *cond, m_conductors_to_change) { ConductorProperties new_properties = cond->properties(); @@ -371,18 +400,33 @@ void PotentialSelectorDialog::on_buttonBox_accepted() old_value.setValue(cond->properties()); new_value.setValue(new_properties); old_seq.setValue(cond->sequenceNum()); - new QPropertyUndoCommand(cond, "sequenceNum", old_seq, new_seq, undo); - new QPropertyUndoCommand(cond, "properties", old_value, new_value, undo); + new QPropertyUndoCommand(cond, + "sequenceNum", + old_seq, + new_seq, + undo); + new QPropertyUndoCommand(cond, + "properties", + old_value, + new_value, + undo); } - //Check if formula of the new potential have incompatible variable with folio report + //Check if formula of the new potential + // have incompatible variable with folio report QRegularExpression rx ("%sequf_|%seqtf_|%seqhf_|%id|%F|%M|%LM"); foreach(ConductorProperties cp, m_properties_list) { if (cp.m_formula.contains(rx)) { QStringList forbidden_str; - forbidden_str << "%sequf_" << "%seqtf_" << "%seqhf_" << "%id" << "%F" << "%M" << "%LM"; + forbidden_str << "%sequf_" + << "%seqtf_" + << "%seqhf_" + << "%id" + << "%F" + << "%M" + << "%LM"; QString text(tr("La formule du nouveau potentiel contient des variables incompatibles avec les reports de folio.\n" "Veuillez saisir une formule compatible pour ce potentiel.\n" @@ -403,7 +447,11 @@ void PotentialSelectorDialog::on_buttonBox_accepted() ConductorProperties new_properties = cond->properties(); new_properties.m_formula = new_formula; new_value.setValue(new_properties); - new QPropertyUndoCommand(cond, "properties", old_value, new_value, undo); + new QPropertyUndoCommand(cond, + "properties", + old_value, + new_value, + undo); } break; @@ -428,8 +476,16 @@ void PotentialSelectorDialog::on_buttonBox_accepted() old_seq.setValue(m_conductor->sequenceNum()); new_seq.setValue(m_sequential_num); - new QPropertyUndoCommand(m_conductor, "sequenceNum", old_seq, new_seq, undo); - new QPropertyUndoCommand(m_conductor, "properties", old_value, new_value, undo); + new QPropertyUndoCommand(m_conductor, + "sequenceNum", + old_seq, + new_seq, + undo); + new QPropertyUndoCommand(m_conductor, + "properties", + old_value, + new_value, + undo); //Set the new properties for each conductors of the new potential foreach(Conductor *cond, m_conductor->relatedPotentialConductors()) @@ -439,15 +495,24 @@ void PotentialSelectorDialog::on_buttonBox_accepted() old_value.setValue(cond->properties()); new_value.setValue(new_properties); old_seq.setValue(cond->sequenceNum()); - new QPropertyUndoCommand(cond, "sequenceNum", old_seq, new_seq, undo); - new QPropertyUndoCommand(cond, "properties", old_value, new_value, undo); + new QPropertyUndoCommand(cond, + "sequenceNum", + old_seq, + new_seq, + undo); + new QPropertyUndoCommand(cond, + "properties", + old_value, + new_value, + undo); } } - //There is an undo parent, we stop here, the owner of m_parent_undo will push it to an undo stack + //There is an undo parent, we stop here, + //the owner of m_parent_undo will push it to an undo stack if (m_parent_undo) return; - //There isn't a parent, we push the undo command to diagram undo stack. + //There isn't a parent, we push the undo command to diagram undo stack. if (diagram) diagram->undoStack().push(undo); } diff --git a/sources/ui/potentialselectordialog.h b/sources/ui/potentialselectordialog.h index 9794674d3..2638d625d 100644 --- a/sources/ui/potentialselectordialog.h +++ b/sources/ui/potentialselectordialog.h @@ -28,13 +28,16 @@ class Element; class AbstractPotentialSelector { public: - AbstractPotentialSelector() : m_conductor_number_1(0), m_conductor_number_2(0) {} + AbstractPotentialSelector() + : m_conductor_number_1(0) + , m_conductor_number_2(0) {} virtual ~AbstractPotentialSelector() {} virtual bool isValid() const = 0; autonum::sequentialNumbers m_seq_num_1, m_seq_num_2; int m_conductor_number_1, m_conductor_number_2; - QList m_properties_list_1, m_properties_list_2; + QList m_properties_list_1, + m_properties_list_2; QList m_conductors_list_1, m_conductors_list_2; }; @@ -44,41 +47,54 @@ namespace Ui { /** @brief The PotentialSelectorDialog class - This dialog is used when user try to connect two existing potential together. - The dialog ask to user to make a choice between the properties of the two existing potential, + This dialog is used when user try to connect + two existing potential together. + The dialog ask to user to make a choice between + the properties of the two existing potential, to apply it for the new potential. - * + Each constructor have a QUndoCommand @parent_undo for parameter - If @parent_undo isn't null, when user click on OK button, the dialog will use the parent-undo + If @parent_undo isn't null, when user click on OK button, + the dialog will use the parent-undo as parent of the undo command that describe the changes. - If @parent_undo is null, the created undo-command is push to the undo stack of the parent diagram of a conductor in potential. + If parent_undo is null, the created undo-command is push + to the undo stack of the parent diagram of a conductor in potential. else we apply the change without a QUndoCommand. - the static function chosenProperties, open a dialog who ask user to make a choice between the given + the static function chosenProperties, + open a dialog who ask user to make a choice between the given properties */ class PotentialSelectorDialog : public QDialog { - Q_OBJECT + Q_OBJECT public: - static ConductorProperties chosenProperties(QList list, QWidget *parent = nullptr); + static ConductorProperties chosenProperties( + QList list, + QWidget *parent = nullptr); - public: - explicit PotentialSelectorDialog(Conductor *conductor, QUndoCommand *parent_undo = nullptr, QWidget *parent = nullptr); - explicit PotentialSelectorDialog(Element *report, QUndoCommand *parent_undo = nullptr, QWidget *parent = nullptr); - ~PotentialSelectorDialog() override; + public: + explicit PotentialSelectorDialog( + Conductor *conductor, + QUndoCommand *parent_undo = nullptr, + QWidget *parent = nullptr); + explicit PotentialSelectorDialog( + Element *report, + QUndoCommand *parent_undo = nullptr, + QWidget *parent = nullptr); + ~PotentialSelectorDialog() override; private slots: void on_buttonBox_accepted(); private: - void buildWidget(); + void buildWidget(); - private: - Ui::PotentialSelectorDialog *ui; - Conductor *m_conductor; + private: + Ui::PotentialSelectorDialog *ui; + Conductor *m_conductor; Element *m_report; QUndoCommand *m_parent_undo; autonum::sequentialNumbers m_sequential_num; diff --git a/sources/ui/projectpropertiesdialog.cpp b/sources/ui/projectpropertiesdialog.cpp index 866f14358..fd9fa7c45 100644 --- a/sources/ui/projectpropertiesdialog.cpp +++ b/sources/ui/projectpropertiesdialog.cpp @@ -28,18 +28,17 @@ @param parent : parent widget of this dialog */ ProjectPropertiesDialog::ProjectPropertiesDialog(QETProject *project, QWidget *parent) { - NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this); - ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project); + NewDiagramPage *newDiagramPage = new NewDiagramPage(project,parent,this); + ProjectAutoNumConfigPage *projectAutoNumConfigPage = new ProjectAutoNumConfigPage (project); m_properties_dialog = new ConfigDialog (parent); m_properties_dialog -> setWindowTitle(QObject::tr("Propriétés du projet", "window title")); m_properties_dialog -> addPage(new ProjectMainConfigPage (project)); - m_properties_dialog -> addPage(newDiagramPage); - m_properties_dialog -> addPage(projectAutoNumConfigPage); - connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString))); - connect(projectAutoNumConfigPage,SIGNAL(saveCurrentTbp()),newDiagramPage,SLOT(saveCurrentTbp())); - connect(projectAutoNumConfigPage,SIGNAL(loadSavedTbp()),newDiagramPage,SLOT(loadSavedTbp())); + m_properties_dialog -> addPage(newDiagramPage); + m_properties_dialog -> addPage(projectAutoNumConfigPage); + connect(projectAutoNumConfigPage,SIGNAL(setAutoNum(QString)),newDiagramPage,SLOT(setFolioAutonum(QString))); + connect(projectAutoNumConfigPage,SIGNAL(saveCurrentTbp()),newDiagramPage,SLOT(saveCurrentTbp())); + connect(projectAutoNumConfigPage,SIGNAL(loadSavedTbp()),newDiagramPage,SLOT(loadSavedTbp())); m_properties_dialog->setMinimumHeight(690); - } /** @@ -72,6 +71,8 @@ void ProjectPropertiesDialog::setCurrentPage(ProjectPropertiesDialog::Page p) { Change the current displayed tab to folio tab. */ void ProjectPropertiesDialog::changeToFolio() { - ProjectAutoNumConfigPage *autoNumPage = static_cast (m_properties_dialog->pages.at(2)); + ProjectAutoNumConfigPage *autoNumPage = + static_cast ( + m_properties_dialog->pages.at(2)); autoNumPage->changeToTab(3); } diff --git a/sources/ui/projectpropertiesdialog.h b/sources/ui/projectpropertiesdialog.h index 90d7d8e90..14ee66f98 100644 --- a/sources/ui/projectpropertiesdialog.h +++ b/sources/ui/projectpropertiesdialog.h @@ -39,7 +39,7 @@ class ProjectPropertiesDialog : public QObject { ~ProjectPropertiesDialog() override; void exec(); void setCurrentPage(ProjectPropertiesDialog::Page); - void changeToFolio(); + void changeToFolio(); private: ConfigDialog *m_properties_dialog; diff --git a/sources/ui/titleblockpropertieswidget.cpp b/sources/ui/titleblockpropertieswidget.cpp index da3164c2f..2e0159d91 100644 --- a/sources/ui/titleblockpropertieswidget.cpp +++ b/sources/ui/titleblockpropertieswidget.cpp @@ -427,7 +427,7 @@ void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() { Open Auto Folio Num dialog */ void TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked() { - emit openAutoNumFolioEditor(ui->auto_page_cb->currentText()); + emit openAutoNumFolioEditor(ui->auto_page_cb->currentText()); if (ui->auto_page_cb->currentText()!=tr("Créer un Folio Numérotation Auto")) { //still to implement: load current auto folio num settings diff --git a/sources/ui/xrefpropertieswidget.cpp b/sources/ui/xrefpropertieswidget.cpp index c0dc80330..1d6dd434a 100644 --- a/sources/ui/xrefpropertieswidget.cpp +++ b/sources/ui/xrefpropertieswidget.cpp @@ -58,7 +58,8 @@ XRefPropertiesWidget::~XRefPropertiesWidget() set new properties for this widget @param properties */ -void XRefPropertiesWidget::setProperties(const QHash &properties) { +void XRefPropertiesWidget::setProperties(const QHash &properties) { m_properties = properties; updateDisplay(); m_previous_type_index = ui->m_type_cb->currentIndex(); @@ -94,18 +95,18 @@ void XRefPropertiesWidget::setReadOnly(bool ro) { */ void XRefPropertiesWidget::buildUi() { - ui -> m_type_cb -> addItem(tr("Bobine"), "coil"); + ui -> m_type_cb -> addItem(tr("Bobine"), "coil"); ui -> m_type_cb -> addItem(tr("Organe de protection"), "protection"); ui -> m_type_cb -> addItem(tr("Commutateur / bouton"), "commutator"); - ui -> m_snap_to_cb -> addItem(tr("En bas de page"), "bottom"); + ui -> m_snap_to_cb -> addItem(tr("En bas de page"), "bottom"); ui -> m_snap_to_cb -> addItem(tr("Sous le label de l'élément"), "label"); ui -> m_xrefpos_cb -> addItem(tr("Top"),"top"); ui -> m_xrefpos_cb -> addItem(tr("Bottom"),"bottom"); ui -> m_xrefpos_cb -> addItem(tr("Left"),"left"); ui -> m_xrefpos_cb -> addItem(tr("Rigth"),"right"); - ui -> m_xrefpos_cb -> addItem(tr("Text alignment"),"alignment"); + ui -> m_xrefpos_cb -> addItem(tr("Text alignment"),"alignment"); m_previous_type_index = ui -> m_type_cb -> currentIndex(); } @@ -118,11 +119,16 @@ void XRefPropertiesWidget::saveProperties(int index) { QString type = ui->m_type_cb->itemData(index).toString(); XRefProperties xrp = m_properties[type]; - if (ui->m_display_has_cross_rb->isChecked()) xrp.setDisplayHas(XRefProperties::Cross); - else if (ui->m_display_has_contacts_rb->isChecked()) xrp.setDisplayHas(XRefProperties::Contacts); - if (ui->m_snap_to_cb->itemData(ui->m_snap_to_cb->currentIndex()).toString() == "bottom") - xrp.setSnapTo(XRefProperties::Bottom); - else xrp.setSnapTo(XRefProperties::Label); + if (ui->m_display_has_cross_rb->isChecked()) + xrp.setDisplayHas(XRefProperties::Cross); + else if (ui->m_display_has_contacts_rb->isChecked()) + xrp.setDisplayHas(XRefProperties::Contacts); + if (ui->m_snap_to_cb->itemData( + ui->m_snap_to_cb->currentIndex()).toString() + == "bottom") + xrp.setSnapTo(XRefProperties::Bottom); + else + xrp.setSnapTo(XRefProperties::Label); From 3b3ce2cb7cf4020d15936e1641a9ab0ee0cb73ea Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:24:12 +0200 Subject: [PATCH 18/24] Improve code style, Wrap code for better readability --- sources/titleblock/templatecellwidget.cpp | 2 +- sources/titleblock/templatecellwidget.h | 130 +++++++++++----------- sources/titleblock/templateview.cpp | 2 +- 3 files changed, 70 insertions(+), 64 deletions(-) diff --git a/sources/titleblock/templatecellwidget.cpp b/sources/titleblock/templatecellwidget.cpp index a5147444c..e8a02683f 100644 --- a/sources/titleblock/templatecellwidget.cpp +++ b/sources/titleblock/templatecellwidget.cpp @@ -59,7 +59,7 @@ void TitleBlockTemplateCellWidget::initWidgets() { name_input_ = new QLineEdit(); // widgets specific to empty cells - empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le folio.")); + empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le folio.")); // widgets specific to logo cells logo_label_ = new QLabel(tr("Logo")); diff --git a/sources/titleblock/templatecellwidget.h b/sources/titleblock/templatecellwidget.h index 18d40de2f..5a1f7762e 100644 --- a/sources/titleblock/templatecellwidget.h +++ b/sources/titleblock/templatecellwidget.h @@ -25,6 +25,7 @@ class TitleBlockCell; class NamesList; /** + @brief The TitleBlockTemplateCellWidget class This class implements an edition widget for cells that compose a title block template. */ @@ -33,86 +34,91 @@ class TitleBlockTemplateCellWidget : public QWidget { // constructor, destructor public: - TitleBlockTemplateCellWidget(TitleBlockTemplate * = nullptr, QWidget * = nullptr); - ~TitleBlockTemplateCellWidget() override; + TitleBlockTemplateCellWidget(TitleBlockTemplate * = nullptr, + QWidget * = nullptr); + ~TitleBlockTemplateCellWidget() override; private: - TitleBlockTemplateCellWidget(const TitleBlockTemplateCellWidget &); + TitleBlockTemplateCellWidget( + const TitleBlockTemplateCellWidget &); // attributes private: - /// is the template read-only? - bool read_only_; - QLabel *cell_type_label_; - QComboBox *cell_type_input_; - - QLabel *empty_label_; - - QLabel *logo_label_; - QComboBox *logo_input_; - QPushButton *add_logo_input_; - - QLabel *name_label_; - QLineEdit *name_input_; - QCheckBox *label_checkbox_; - QLineEdit *label_input_; - QPushButton *label_edit_; - QLabel *value_label_; - QLineEdit *value_input_; - QPushButton *value_edit_; - QLabel *align_label_; - QLabel *horiz_align_label_; - QComboBox *horiz_align_input_; - QHash horiz_align_indexes_; - QLabel *vert_align_label_; - QComboBox *vert_align_input_; - QHash vert_align_indexes_; - QLabel *font_size_label_; - QSpinBox *font_size_input_; - QCheckBox *font_adjust_input_; - QVBoxLayout *cell_editor_layout_; - QHBoxLayout *cell_editor_type_and_name_layout_; - QGridLayout *cell_editor_text_layout_; - QHBoxLayout *cell_editor_image_layout_; - - TitleBlockCell *edited_cell_; + /// is the template read-only? + bool read_only_; + QLabel *cell_type_label_; + QComboBox *cell_type_input_; + + QLabel *empty_label_; + + QLabel *logo_label_; + QComboBox *logo_input_; + QPushButton *add_logo_input_; + + QLabel *name_label_; + QLineEdit *name_input_; + QCheckBox *label_checkbox_; + QLineEdit *label_input_; + QPushButton *label_edit_; + QLabel *value_label_; + QLineEdit *value_input_; + QPushButton *value_edit_; + QLabel *align_label_; + QLabel *horiz_align_label_; + QComboBox *horiz_align_input_; + QHash horiz_align_indexes_; + QLabel *vert_align_label_; + QComboBox *vert_align_input_; + QHash vert_align_indexes_; + QLabel *font_size_label_; + QSpinBox *font_size_input_; + QCheckBox *font_adjust_input_; + QVBoxLayout *cell_editor_layout_; + QHBoxLayout *cell_editor_type_and_name_layout_; + QGridLayout *cell_editor_text_layout_; + QHBoxLayout *cell_editor_image_layout_; + + TitleBlockCell *edited_cell_; // methods public: - int horizontalAlignment() const; - int verticalAlignment() const; - int alignment() const; - bool isReadOnly() const; + int horizontalAlignment() const; + int verticalAlignment() const; + int alignment() const; + bool isReadOnly() const; protected: - void editTranslatableValue(NamesList &, const QString &, const QString &) const; - void emitModification(const QString &, const QVariant &) const; - QString defaultVariablesString() const; - QString labelValueInformationString() const; + void editTranslatableValue(NamesList &, + const QString &, + const QString &) const; + void emitModification(const QString &, + const QVariant &) const; + QString defaultVariablesString() const; + QString labelValueInformationString() const; private: - void initWidgets(); + void initWidgets(); public slots: - void updateFormType(int); - void edit(TitleBlockCell *); - void editType(); - void editName(); - void editLabelDisplayed(); - void editLabel(); - void editValue(); - void editAlignment(); - void editFontSize(); - void editAdjust(); - void editLogo(); - void updateLogosComboBox(const TitleBlockTemplate *); - void setReadOnly(bool); + void updateFormType(int); + void edit(TitleBlockCell *); + void editType(); + void editName(); + void editLabelDisplayed(); + void editLabel(); + void editValue(); + void editAlignment(); + void editFontSize(); + void editAdjust(); + void editLogo(); + void updateLogosComboBox(const TitleBlockTemplate *); + void setReadOnly(bool); private slots: signals: - void logoEditionRequested(); - void cellModified(ModifyTitleBlockCellCommand *) const; + void logoEditionRequested(); + void cellModified(ModifyTitleBlockCellCommand *) const; }; #endif diff --git a/sources/titleblock/templateview.cpp b/sources/titleblock/templateview.cpp index 773a6c0d7..dc5d6cf94 100644 --- a/sources/titleblock/templateview.cpp +++ b/sources/titleblock/templateview.cpp @@ -422,7 +422,7 @@ void TitleBlockTemplateView::drawBackground(QPainter *painter, const QRectF &rec @return the selected logical cells, not including the spanned ones. */ QList TitleBlockTemplateView::selectedCells() const { - return(selectedCellsSet().cells(false).values()); + return(selectedCellsSet().cells(false).values()); } /** From 5e3e3aa4bd7e08b389886b939812548269957333 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:24:51 +0200 Subject: [PATCH 19/24] Improve code style, Wrap code for better readability, Mod doc --- .../qetgraphicsitem/ViewItem/projectdbmodel.h | 72 +++++++++++-------- .../ViewItem/qetgraphicsheaderitem.h | 16 ++--- .../ui/graphicstablepropertieseditor.h | 2 +- .../ui/projectdbmodelpropertieswidget.h | 4 +- sources/qetgraphicsitem/conductor.cpp | 35 ++++----- sources/qetgraphicsitem/conductor.h | 2 +- sources/qetgraphicsitem/conductortextitem.cpp | 4 +- sources/qetgraphicsitem/conductortextitem.h | 56 +++++++-------- sources/qetgraphicsitem/diagramimageitem.cpp | 2 +- sources/qetgraphicsitem/diagramtextitem.cpp | 2 +- sources/qetgraphicsitem/diagramtextitem.h | 30 ++++---- .../qetgraphicsitem/dynamicelementtextitem.h | 49 +++++++------ sources/qetgraphicsitem/qetshapeitem.cpp | 63 +++++++++++----- sources/qetgraphicsitem/qetshapeitem.h | 6 +- 14 files changed, 198 insertions(+), 145 deletions(-) diff --git a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h index 7d351f89b..0021d4383 100644 --- a/sources/qetgraphicsitem/ViewItem/projectdbmodel.h +++ b/sources/qetgraphicsitem/ViewItem/projectdbmodel.h @@ -26,10 +26,15 @@ class QETProject; /** @brief The ProjectDBModel class - This model is intended to be use with the @class projectDataBase - and is designed to be displayed by the @class QetGraphicsTableItem (but can be use by other view class since it inherit from QAbstractTableModel). - This class should be sufficient to display the content of the project data base from a query set by the method void ProjectDBModel::setQuery(const QString &query). - The indentifier method is used by widget editor to retrieve the good widget for edit the query. By defaut identifer return the string 'unknow'. + This model is intended to be use with the class projectDataBase + and is designed to be displayed by the class QetGraphicsTableItem + (but can be use by other view class since it inherit from QAbstractTableModel). + This class should be sufficient to display the content of + the project data base from a query set by the method + void ProjectDBModel::setQuery(const QString &query). + The indentifier method is used by widget editor to retrieve + the good widget for edit the query. + By defaut identifer return the string 'unknow'. You should use setIdentfier method to set your custom identifier. At the time this sentence is written, there is two identifier : nomenclature @@ -37,39 +42,48 @@ class QETProject; */ class ProjectDBModel : public QAbstractTableModel { - Q_OBJECT + Q_OBJECT - public: - explicit ProjectDBModel(QETProject *project, QObject *parent = nullptr); - explicit ProjectDBModel (const ProjectDBModel &other_model); + public: + explicit ProjectDBModel(QETProject *project, QObject *parent = nullptr); + explicit ProjectDBModel (const ProjectDBModel &other_model); - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - int columnCount(const QModelIndex &parent = QModelIndex()) const override; - bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole) override; - QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; - bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override; - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - void setQuery(const QString &setQuery); - QString queryString() const; - QETProject *project() const; + int rowCount(const QModelIndex &parent = QModelIndex()) const override; + int columnCount(const QModelIndex &parent = QModelIndex()) const override; + bool setHeaderData(int section, + Qt::Orientation orientation, + const QVariant &value, + int role = Qt::EditRole) override; + QVariant headerData(int section, + Qt::Orientation orientation, + int role = Qt::DisplayRole) const override; + bool setData(const QModelIndex &index, + const QVariant &value, + int role = Qt::EditRole) override; + QVariant data(const QModelIndex &index, + int role = Qt::DisplayRole) const override; + void setQuery(const QString &setQuery); + QString queryString() const; + QETProject *project() const; - QDomElement toXml(QDomDocument &document) const; - void fromXml(const QDomElement &element); + QDomElement toXml(QDomDocument &document) const; + void fromXml(const QDomElement &element); void setIdentifier(const QString &identifier); QString identifier() const {return m_identifier;} static QString xmlTagName() {return QString("project_data_base_model");} - private: - void dataBaseUpdated(); - void setHeaderString(); - void fillValue(); + private: + void dataBaseUpdated(); + void setHeaderString(); + void fillValue(); - private: - QPointer m_project; - QString m_query; - QVector m_record; - QHash> m_header_data; //First int = section, second int = Qt::role, QVariant = value - QHash m_index_0_0_data; + private: + QPointer m_project; + QString m_query; + QVector m_record; + //First int = section, second int = Qt::role, QVariant = value + QHash> m_header_data; + QHash m_index_0_0_data; QString m_identifier = "unknow"; }; diff --git a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h index cf1e95eb4..2391c6b92 100644 --- a/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h +++ b/sources/qetgraphicsitem/ViewItem/qetgraphicsheaderitem.h @@ -41,17 +41,17 @@ class QetGraphicsHeaderItem : public QGraphicsObject { Q_OBJECT - public: - QetGraphicsHeaderItem(QGraphicsItem *parent = nullptr); + public: + QetGraphicsHeaderItem(QGraphicsItem *parent = nullptr); enum { Type = UserType + 1301 }; int type() const override { return Type; } void setModel(QAbstractItemModel *model = nullptr); - QAbstractItemModel *model() const; + QAbstractItemModel *model() const; - virtual QRectF boundingRect() const override; - virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; + virtual QRectF boundingRect() const override; + virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; QRect rect() const; void resizeSection(int logicalIndex, int size); int sectionSize(int logical_index) const; @@ -73,9 +73,9 @@ class QetGraphicsHeaderItem : public QGraphicsObject void adjustSize(); void modelReseted(); - private: - QRectF m_bounding_rect; - QAbstractItemModel *m_model = nullptr; + private: + QRectF m_bounding_rect; + QAbstractItemModel *m_model = nullptr; QVector m_sections_minimum_width, m_current_sections_width; int m_section_height=1, diff --git a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h index 449fb2a42..5f1c452e1 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h +++ b/sources/qetgraphicsitem/ViewItem/ui/graphicstablepropertieseditor.h @@ -37,7 +37,7 @@ class QButtonGroup; */ class GraphicsTablePropertiesEditor : public PropertiesEditorWidget { - Q_OBJECT + Q_OBJECT public: explicit GraphicsTablePropertiesEditor(QetGraphicsTableItem *table = nullptr, QWidget *parent = nullptr); diff --git a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h index ca36ae6dc..067129485 100644 --- a/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h +++ b/sources/qetgraphicsitem/ViewItem/ui/projectdbmodelpropertieswidget.h @@ -32,9 +32,9 @@ class ProjectDBModelPropertiesWidget; */ class ProjectDBModelPropertiesWidget : public PropertiesEditorWidget { - Q_OBJECT + Q_OBJECT - public: + public: explicit ProjectDBModelPropertiesWidget(ProjectDBModel *model = nullptr, QWidget *parent = nullptr); ~ProjectDBModelPropertiesWidget(); diff --git a/sources/qetgraphicsitem/conductor.cpp b/sources/qetgraphicsitem/conductor.cpp index 618ab9d10..e635e6d99 100644 --- a/sources/qetgraphicsitem/conductor.cpp +++ b/sources/qetgraphicsitem/conductor.cpp @@ -1011,22 +1011,22 @@ QDomElement Conductor::toXml(QDomDocument &dom_document, QHash dom_element.setAttribute("x", QString::number(pos().x())); dom_element.setAttribute("y", QString::number(pos().y())); - // Terminal is uniquely identified by the uuid of the terminal and the element - if (terminal1->uuid().isNull()) { - // legacy method to identify the terminal - dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compability - } else { - dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString()); - dom_element.setAttribute("terminal1", terminal1->uuid().toString()); - } + // Terminal is uniquely identified by the uuid of the terminal and the element + if (terminal1->uuid().isNull()) { + // legacy method to identify the terminal + dom_element.setAttribute("terminal1", table_adr_id.value(terminal1)); // for backward compability + } else { + dom_element.setAttribute("element1", terminal1->parentElement()->uuid().toString()); + dom_element.setAttribute("terminal1", terminal1->uuid().toString()); + } - if (terminal2->uuid().isNull()) { - // legacy method to identify the terminal - dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compability - } else { - dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString()); - dom_element.setAttribute("terminal2", terminal2->uuid().toString()); - } + if (terminal2->uuid().isNull()) { + // legacy method to identify the terminal + dom_element.setAttribute("terminal2", table_adr_id.value(terminal2)); // for backward compability + } else { + dom_element.setAttribute("element2", terminal2->parentElement()->uuid().toString()); + dom_element.setAttribute("terminal2", terminal2->uuid().toString()); + } dom_element.setAttribute("freezeLabel", m_freeze_label? "true" : "false"); // on n'exporte les segments du conducteur que si ceux-ci ont @@ -2006,8 +2006,9 @@ Conductor * longuestConductorInPotential(Conductor *conductor, bool all_diagram) /** @brief relatedConductors @param conductor - @return return all conductors who share the same terminals of @conductor given as parametre, - except @conductor himself. + @return return all conductors who share the same terminals + of conductor given as parametre, + except conductor himself. */ QList relatedConductors(const Conductor *conductor) { QList other_conductors_list = conductor -> terminal1 -> conductors(); diff --git a/sources/qetgraphicsitem/conductor.h b/sources/qetgraphicsitem/conductor.h index 949569de1..f4b433eaf 100644 --- a/sources/qetgraphicsitem/conductor.h +++ b/sources/qetgraphicsitem/conductor.h @@ -142,7 +142,7 @@ class Conductor : public QGraphicsObject void hoverEnterEvent(QGraphicsSceneHoverEvent *event) override; void hoverLeaveEvent(QGraphicsSceneHoverEvent *event) override; QVariant itemChange(GraphicsItemChange, const QVariant &) override; - bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override; + bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override; private: void adjusteHandlerPos(); diff --git a/sources/qetgraphicsitem/conductortextitem.cpp b/sources/qetgraphicsitem/conductortextitem.cpp index 2812c85d9..edf497def 100644 --- a/sources/qetgraphicsitem/conductortextitem.cpp +++ b/sources/qetgraphicsitem/conductortextitem.cpp @@ -38,9 +38,9 @@ ConductorTextItem::ConductorTextItem(Conductor *parent_conductor) : Constructeur @param text Le texte affiche par le champ de texte @param parent_conductor Conducteur auquel ce texte est rattache - @param parent_diagram Schema auquel ce texte et son conducteur parent sont rattaches */ -ConductorTextItem::ConductorTextItem(const QString &text, Conductor *parent_conductor) : +ConductorTextItem::ConductorTextItem(const QString &text, + Conductor *parent_conductor) : DiagramTextItem(text, parent_conductor), parent_conductor_(parent_conductor), moved_by_user_(false), diff --git a/sources/qetgraphicsitem/conductortextitem.h b/sources/qetgraphicsitem/conductortextitem.h index 74fe2550f..a183c2be9 100644 --- a/sources/qetgraphicsitem/conductortextitem.h +++ b/sources/qetgraphicsitem/conductortextitem.h @@ -29,40 +29,40 @@ class Conductor; class ConductorTextItem : public DiagramTextItem { Q_OBJECT - - // constructors, destructor + + // constructors, destructor public: - ConductorTextItem(Conductor * = nullptr); - ConductorTextItem(const QString &, Conductor * = nullptr); - ~ConductorTextItem() override; + ConductorTextItem(Conductor * = nullptr); + ConductorTextItem(const QString &, Conductor * = nullptr); + ~ConductorTextItem() override; private: - ConductorTextItem(const ConductorTextItem &); + ConductorTextItem(const ConductorTextItem &); public: - enum { Type = UserType + 1006 }; - Conductor *parentConductor() const; - void fromXml(const QDomElement &) override; - int type() const override { return Type; } - virtual bool wasMovedByUser() const; - virtual bool wasRotateByUser() const; - virtual void forceMovedByUser(bool); - virtual void forceRotateByUser(bool); - virtual void setPos(const QPointF &pos); - virtual void setPos(qreal x, qreal y); - + enum { Type = UserType + 1006 }; + Conductor *parentConductor() const; + void fromXml(const QDomElement &) override; + int type() const override { return Type; } + virtual bool wasMovedByUser() const; + virtual bool wasRotateByUser() const; + virtual void forceMovedByUser(bool); + virtual void forceRotateByUser(bool); + virtual void setPos(const QPointF &pos); + virtual void setPos(qreal x, qreal y); + protected: - void mousePressEvent (QGraphicsSceneMouseEvent *event) override; - void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override; - void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override; - void hoverEnterEvent(QGraphicsSceneHoverEvent *) override; - void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override; - void hoverMoveEvent(QGraphicsSceneHoverEvent *) override; + void mousePressEvent (QGraphicsSceneMouseEvent *event) override; + void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override; + void mouseReleaseEvent (QGraphicsSceneMouseEvent *event) override; + void hoverEnterEvent(QGraphicsSceneHoverEvent *) override; + void hoverLeaveEvent(QGraphicsSceneHoverEvent *) override; + void hoverMoveEvent(QGraphicsSceneHoverEvent *) override; - // attributes + // attributes private: - Conductor *parent_conductor_; - bool moved_by_user_; - bool rotate_by_user_; - QPointF before_mov_pos_; + Conductor *parent_conductor_; + bool moved_by_user_; + bool rotate_by_user_; + QPointF before_mov_pos_; }; #endif diff --git a/sources/qetgraphicsitem/diagramimageitem.cpp b/sources/qetgraphicsitem/diagramimageitem.cpp index 812dadf99..f02905f97 100644 --- a/sources/qetgraphicsitem/diagramimageitem.cpp +++ b/sources/qetgraphicsitem/diagramimageitem.cpp @@ -70,7 +70,7 @@ void DiagramImageItem::paint(QPainter *painter, const QStyleOptionGraphicsItem * painter -> setRenderHint(QPainter::Antialiasing, false); painter -> setRenderHint(QPainter::TextAntialiasing, false); painter -> setRenderHint(QPainter::SmoothPixmapTransform, false); - // Dessin du cadre de selection en noir à partir du boundingrect + // Dessin du cadre de selection en noir à partir du boundingrect QPen t(Qt::black); t.setStyle(Qt::DashLine); painter -> setPen(t); diff --git a/sources/qetgraphicsitem/diagramtextitem.cpp b/sources/qetgraphicsitem/diagramtextitem.cpp index c2687fa06..3884a7519 100644 --- a/sources/qetgraphicsitem/diagramtextitem.cpp +++ b/sources/qetgraphicsitem/diagramtextitem.cpp @@ -166,7 +166,7 @@ void DiagramTextItem::setFont(const QFont &font) void DiagramTextItem::setColor(const QColor& color) { - setDefaultTextColor(color); + setDefaultTextColor(color); emit colorChanged(color); } diff --git a/sources/qetgraphicsitem/diagramtextitem.h b/sources/qetgraphicsitem/diagramtextitem.h index 8c0a5c5ac..4320d7ae0 100644 --- a/sources/qetgraphicsitem/diagramtextitem.h +++ b/sources/qetgraphicsitem/diagramtextitem.h @@ -33,8 +33,8 @@ class QDomDocument; class DiagramTextItem : public QGraphicsTextItem { Q_OBJECT - - Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) + + Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) Q_PROPERTY(Qt::Alignment alignment READ alignment WRITE setAlignment NOTIFY alignmentChanged) Q_PROPERTY(QString plainText READ toPlainText WRITE setPlainText) Q_PROPERTY(QFont font READ font WRITE setFont NOTIFY fontChanged) @@ -68,10 +68,10 @@ class DiagramTextItem : public QGraphicsTextItem QPointF mapMovementFromParent (const QPointF &) const; void setFont(const QFont &font); - - void setColor(const QColor& color); - QColor color() const; - + + void setColor(const QColor& color); + QColor color() const; + void setNoEditable(bool e = true) {m_no_editable = e;} void setAlignment(const Qt::Alignment &alignment); @@ -85,7 +85,9 @@ class DiagramTextItem : public QGraphicsTextItem bool isHtml() const; protected: - void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override; + void paint(QPainter *, + const QStyleOptionGraphicsItem *, + QWidget *) override; void focusInEvent(QFocusEvent *) override; void focusOutEvent(QFocusEvent *) override; @@ -104,13 +106,15 @@ class DiagramTextItem : public QGraphicsTextItem protected: - bool m_mouse_hover = false, - m_first_move = true, - m_no_editable, - m_is_html = false; + bool + m_mouse_hover = false, + m_first_move = true, + m_no_editable, + m_is_html = false; - QString m_previous_html_text, - m_previous_text; + QString + m_previous_html_text, + m_previous_text; QPointF m_mouse_to_origin_movement; diff --git a/sources/qetgraphicsitem/dynamicelementtextitem.h b/sources/qetgraphicsitem/dynamicelementtextitem.h index a83eaeffe..60c6a45c8 100644 --- a/sources/qetgraphicsitem/dynamicelementtextitem.h +++ b/sources/qetgraphicsitem/dynamicelementtextitem.h @@ -40,16 +40,16 @@ class DynamicElementTextItem : public DiagramTextItem friend class DynamicTextItemDelegate; friend class CompositeTextEditDialog; friend class Element; - - Q_OBJECT - + + Q_OBJECT + Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY(TextFrom textFrom READ textFrom WRITE setTextFrom NOTIFY textFromChanged) Q_PROPERTY(QString infoName READ infoName WRITE setInfoName NOTIFY infoNameChanged) Q_PROPERTY(QString compositeText READ compositeText WRITE setCompositeText NOTIFY compositeTextChanged) Q_PROPERTY(bool frame READ frame WRITE setFrame NOTIFY frameChanged) Q_PROPERTY(qreal textWidth READ textWidth WRITE setTextWidth NOTIFY textWidthChanged) - + public: enum TextFrom { @@ -60,7 +60,7 @@ class DynamicElementTextItem : public DiagramTextItem Q_ENUM (TextFrom) enum {Type = UserType + 1010}; int type() const override {return Type;} - + signals: void textChanged(QString text); void textFromChanged(DynamicElementTextItem::TextFrom text_from); @@ -69,7 +69,7 @@ class DynamicElementTextItem : public DiagramTextItem void frameChanged(bool frame); void plainTextChanged(); void textWidthChanged(qreal width); - + public: DynamicElementTextItem(Element *parent_element); ~DynamicElementTextItem() override; @@ -81,12 +81,12 @@ class DynamicElementTextItem : public DiagramTextItem public: QDomElement toXml(QDomDocument &dom_doc) const override; void fromXml(const QDomElement &dom_elmt) override; - + Element *parentElement() const; ElementTextItemGroup *parentGroup() const; Element *elementUseForInfo() const; void refreshLabelConnection(); - + DynamicElementTextItem::TextFrom textFrom() const; void setTextFrom (DynamicElementTextItem::TextFrom text_from); QString text() const; @@ -103,7 +103,7 @@ class DynamicElementTextItem : public DiagramTextItem void setPlainText(const QString &text); void setTextWidth(qreal width); void setXref_item(Qt::AlignmentFlag m_exHrefPos); - + protected: void mousePressEvent(QGraphicsSceneMouseEvent *event) override; void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override; @@ -114,7 +114,7 @@ class DynamicElementTextItem : public DiagramTextItem void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override; QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override; - + private: void elementInfoChanged(); void masterChanged(); @@ -134,25 +134,28 @@ class DynamicElementTextItem : public DiagramTextItem QString reportReplacedCompositeText() const; void zoomToLinkedElement(); - private: - QPointer m_parent_element, - m_master_element, - m_other_report; + QPointer + m_parent_element, + m_master_element, + m_other_report; QPointer m_watched_conductor; - QString m_text, - m_info_name, - m_composite_text, - m_report_formula, - m_F_str; + QString + m_text, + m_info_name, + m_composite_text, + m_report_formula, + m_F_str; DynamicElementTextItem::TextFrom m_text_from = UserText; QUuid m_uuid; QMetaObject::Connection m_report_formula_con; - QList m_formula_connection, - m_update_slave_Xref_connection; + QList + m_formula_connection, + m_update_slave_Xref_connection; QColor m_user_color; - bool m_frame = false, - m_first_scene_change = true; + bool + m_frame = false, + m_first_scene_change = true; CrossRefItem *m_Xref_item = nullptr; QGraphicsTextItem *m_slave_Xref_item = nullptr; qreal m_text_width = -1; diff --git a/sources/qetgraphicsitem/qetshapeitem.cpp b/sources/qetgraphicsitem/qetshapeitem.cpp index a00203906..38d2f24e2 100644 --- a/sources/qetgraphicsitem/qetshapeitem.cpp +++ b/sources/qetgraphicsitem/qetshapeitem.cpp @@ -64,8 +64,8 @@ QetShapeItem::QetShapeItem(QPointF p1, QPointF p2, ShapeType type, QGraphicsItem QetShapeItem::~QetShapeItem() { - if(!m_handler_vector.isEmpty()) - qDeleteAll(m_handler_vector); + if(!m_handler_vector.isEmpty()) + qDeleteAll(m_handler_vector); } /** @@ -221,8 +221,9 @@ void QetShapeItem::setNextPoint(QPointF P) /** @brief QetShapeItem::removePoints Number of point to remove on the polygon - If @number is superior to number of polygon points-2, - all points of polygon will be removed except the first two (minimum point for the polygon); + If number is superior to number of polygon points-2, + all points of polygon will be removed except + the first two (minimum point for the polygon); */ void QetShapeItem::removePoints(int number) { @@ -259,12 +260,14 @@ QPainterPath QetShapeItem::shape() const switch (m_shapeType) { - case Line: + case Line: path.moveTo(m_P1); - path.lineTo(m_P2); + path.lineTo(m_P2); break; case Rectangle: - path.addRoundedRect(QRectF(m_P1, m_P2), m_xRadius, m_yRadius); + path.addRoundedRect(QRectF(m_P1, m_P2), + m_xRadius, + m_yRadius); break; case Ellipse: path.addEllipse(QRectF(m_P1, m_P2)); @@ -292,7 +295,9 @@ QPainterPath QetShapeItem::shape() const @param option @param widget */ -void QetShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) +void QetShapeItem::paint(QPainter *painter, + const QStyleOptionGraphicsItem *option, + QWidget *widget) { Q_UNUSED(option) Q_UNUSED(widget) @@ -317,9 +322,12 @@ void QetShapeItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti switch (m_shapeType) { case Line: painter->drawLine(QLineF(m_P1, m_P2)); break; - case Rectangle: painter->drawRoundedRect(QRectF(m_P1, m_P2), m_xRadius, m_yRadius); break; + case Rectangle: painter->drawRoundedRect(QRectF(m_P1, m_P2), + m_xRadius, + m_yRadius); break; case Ellipse: painter->drawEllipse(QRectF(m_P1, m_P2)); break; - case Polygon: m_closed ? painter->drawPolygon(m_polygon) : painter->drawPolyline(m_polygon); break; + case Polygon: m_closed ? painter->drawPolygon(m_polygon) + : painter->drawPolyline(m_polygon); break; } painter->restore(); @@ -364,11 +372,13 @@ void QetShapeItem::mousePressEvent(QGraphicsSceneMouseEvent *event) @param value @return */ -QVariant QetShapeItem::itemChange(QGraphicsItem::GraphicsItemChange change, const QVariant &value) +QVariant QetShapeItem::itemChange(QGraphicsItem::GraphicsItemChange change, + const QVariant &value) { if (change == ItemSelectedHasChanged) { - if (value.toBool() == true) { //If this is selected, wa add handlers. + if (value.toBool() == true) { + //If this is selected, wa add handlers. addHandler(); } else //Else this is deselected, we remove handlers @@ -956,11 +966,32 @@ QDomElement QetShapeItem::toXml(QDomDocument &document) const bool QetShapeItem::toDXF(const QString &filepath,const QPen &pen) { - switch (m_shapeType) + switch (m_shapeType) { - case Line: Createdxf::drawLine (filepath, QLineF(mapToScene(m_P1), mapToScene(m_P2)), Createdxf::getcolorCode(pen.color().red(),pen.color().green(),pen.color().blue())); return true; - case Rectangle: Createdxf::drawRectangle(filepath, QRectF(mapToScene(m_P1), mapToScene(m_P2)).normalized(), Createdxf::getcolorCode(pen.color().red(),pen.color().green(),pen.color().blue())); return true; - case Ellipse: Createdxf::drawEllipse (filepath, QRectF(mapToScene(m_P1), mapToScene(m_P2)).normalized(), Createdxf::getcolorCode(pen.color().red(),pen.color().green(),pen.color().blue())); return true; + case Line: + Createdxf::drawLine(filepath, + QLineF(mapToScene(m_P1), + mapToScene(m_P2)), + Createdxf::getcolorCode(pen.color().red(), + pen.color().green(), + pen.color().blue())); + return true; + case Rectangle: + Createdxf::drawRectangle(filepath, + QRectF(mapToScene(m_P1), + mapToScene(m_P2)).normalized(), + Createdxf::getcolorCode(pen.color().red(), + pen.color().green(), + pen.color().blue())); + return true; + case Ellipse: + Createdxf::drawEllipse (filepath, + QRectF(mapToScene(m_P1), + mapToScene(m_P2)).normalized(), + Createdxf::getcolorCode(pen.color().red(), + pen.color().green(), + pen.color().blue())); + return true; default: return false; } } diff --git a/sources/qetgraphicsitem/qetshapeitem.h b/sources/qetgraphicsitem/qetshapeitem.h index 565d6a56c..da8b12380 100644 --- a/sources/qetgraphicsitem/qetshapeitem.h +++ b/sources/qetgraphicsitem/qetshapeitem.h @@ -109,8 +109,8 @@ class QetShapeItem : public QetGraphicsItem void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override; void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override; void mousePressEvent (QGraphicsSceneMouseEvent *event) override; - QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; - bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override; + QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; + bool sceneEventFilter(QGraphicsItem *watched, QEvent *event) override; void contextMenuEvent(QGraphicsSceneContextMenuEvent *event) override; private: @@ -140,7 +140,7 @@ class QetShapeItem : public QetGraphicsItem bool m_closed = false, m_modifie_radius_equaly = false; int m_resize_mode = 1; - QVector m_handler_vector; + QVector m_handler_vector; QAction *m_insert_point, *m_remove_point; qreal m_xRadius = 0, From 6c806d151d7a98c4047acd59363922d203dad819 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:25:14 +0200 Subject: [PATCH 20/24] Improve code style --- sources/properties/xrefproperties.cpp | 10 +++++----- sources/properties/xrefproperties.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sources/properties/xrefproperties.cpp b/sources/properties/xrefproperties.cpp index f4116abe7..c92628bed 100644 --- a/sources/properties/xrefproperties.cpp +++ b/sources/properties/xrefproperties.cpp @@ -95,10 +95,10 @@ void XRefProperties::fromSettings(const QSettings &settings, const QString prefi */ QDomElement XRefProperties::toXml(QDomDocument &xml_document) const { - QDomElement xml_element = xml_document.createElement("xref"); - xml_element.setAttribute("type", m_key); + QDomElement xml_element = xml_document.createElement("xref"); + xml_element.setAttribute("type", m_key); - xml_element.setAttribute("showpowerctc", m_show_power_ctc? "true" : "false"); + xml_element.setAttribute("showpowerctc", m_show_power_ctc? "true" : "false"); QString display = m_display == Cross? "cross" : "contacts"; xml_element.setAttribute("displayhas", display); QString snap = m_snap_to == Bottom? "bottom" : "label"; @@ -119,7 +119,7 @@ QDomElement XRefProperties::toXml(QDomDocument &xml_document) const { xml_element.setAttribute(key + "prefix", m_prefix.value(key)); } - return xml_element; + return xml_element; } /** @@ -149,7 +149,7 @@ bool XRefProperties::fromXml(const QDomElement &xml_element) { foreach (QString key, m_prefix_keys) { m_prefix.insert(key, xml_element.attribute(key + "prefix")); } - return true; + return true; } /** diff --git a/sources/properties/xrefproperties.h b/sources/properties/xrefproperties.h index 9a292c3ec..7762d8f45 100644 --- a/sources/properties/xrefproperties.h +++ b/sources/properties/xrefproperties.h @@ -42,8 +42,8 @@ class XRefProperties : public PropertiesInterface void toSettings (QSettings &settings, const QString = QString()) const override; void fromSettings (const QSettings &settings, const QString = QString()) override; - QDomElement toXml (QDomDocument &xml_document) const override; - bool fromXml(const QDomElement &xml_element) override; + QDomElement toXml (QDomDocument &xml_document) const override; + bool fromXml(const QDomElement &xml_element) override; static QHash defaultProperties(); @@ -73,7 +73,7 @@ class XRefProperties : public PropertiesInterface void setOffset(const int offset) {m_offset = offset;} int offset() const {return m_offset;} - void setKey(QString& key) {m_key = key;} + void setKey(QString& key) {m_key = key;} private: bool m_show_power_ctc; @@ -85,7 +85,7 @@ class XRefProperties : public PropertiesInterface QString m_master_label; QString m_slave_label; int m_offset; - QString m_key; + QString m_key; }; #endif // XREFPROPERTIES_H From e55d336dc1da646324c470e5db849f7c062de3c9 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:25:31 +0200 Subject: [PATCH 21/24] Improve code style --- sources/editor/elementitemeditor.h | 2 +- sources/editor/elementview.cpp | 4 +- .../graphicspart/customelementgraphicpart.h | 6 +- sources/editor/graphicspart/partpolygon.cpp | 4 +- sources/editor/graphicspart/partpolygon.h | 4 +- sources/editor/graphicspart/partterminal.cpp | 2 +- sources/editor/styleeditor.cpp | 7 +- sources/editor/ui/polygoneditor.cpp | 110 +++++++++++------- sources/editor/ui/polygoneditor.h | 2 +- 9 files changed, 85 insertions(+), 56 deletions(-) diff --git a/sources/editor/elementitemeditor.h b/sources/editor/elementitemeditor.h index d23ed76ee..ca5892d75 100644 --- a/sources/editor/elementitemeditor.h +++ b/sources/editor/elementitemeditor.h @@ -54,7 +54,7 @@ class ElementItemEditor : public QWidget virtual bool setParts(QList ) {return false;} virtual CustomElementPart *currentPart() const = 0; - virtual QList currentParts() const = 0; + virtual QList currentParts() const = 0; virtual void updateForm() = 0; // attributes diff --git a/sources/editor/elementview.cpp b/sources/editor/elementview.cpp index 3d92e3d5d..edae5ae29 100644 --- a/sources/editor/elementview.cpp +++ b/sources/editor/elementview.cpp @@ -114,14 +114,14 @@ void ElementView::zoomOut() { Agrandit le schema avec le trackpad */ void ElementView::zoomInSlowly() { - scale(1.02, 1.02); + scale(1.02, 1.02); } /** Retrecit le schema avec le trackpad */ void ElementView::zoomOutSlowly() { - scale(0.98, 0.98); + scale(0.98, 0.98); } /** diff --git a/sources/editor/graphicspart/customelementgraphicpart.h b/sources/editor/graphicspart/customelementgraphicpart.h index e4500a606..3d683504b 100644 --- a/sources/editor/graphicspart/customelementgraphicpart.h +++ b/sources/editor/graphicspart/customelementgraphicpart.h @@ -93,8 +93,8 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar QVariant property (const char *name) const override {return QObject::property(name);} virtual QPainterPath shadowShape ()const = 0; - virtual void setHandlerColor(QPointF /*pos*/, const QColor &/*color*/) {} - virtual void resetAllHandlerColor() {} + virtual void setHandlerColor(QPointF /*pos*/, const QColor &/*color*/) {} + virtual void resetAllHandlerColor() {} protected: void stylesToXml (QDomElement &) const; @@ -119,7 +119,7 @@ class CustomElementGraphicPart : public QGraphicsObject, public CustomElementPar Filling _filling ; Color _color; bool _antialiased; - QPointF m_origin_pos; + QPointF m_origin_pos; }; typedef CustomElementGraphicPart CEGP; diff --git a/sources/editor/graphicspart/partpolygon.cpp b/sources/editor/graphicspart/partpolygon.cpp index 70afc569a..86c487532 100644 --- a/sources/editor/graphicspart/partpolygon.cpp +++ b/sources/editor/graphicspart/partpolygon.cpp @@ -254,7 +254,7 @@ void PartPolygon::setClosed(bool close) if (m_closed == close) return; prepareGeometryChange(); m_closed = close; - emit closedChange(); + emit closedChange(); } /** @@ -544,7 +544,7 @@ void PartPolygon::removePoint() if (index > -1 && indexpolygon(); - qDebug() << index; + qDebug() << index; polygon.removeAt(index); //Wrap the undo for avoid to merge the undo commands when user add several points. diff --git a/sources/editor/graphicspart/partpolygon.h b/sources/editor/graphicspart/partpolygon.h index 4a7891459..4922dc48a 100644 --- a/sources/editor/graphicspart/partpolygon.h +++ b/sources/editor/graphicspart/partpolygon.h @@ -84,8 +84,8 @@ class PartPolygon : public CustomElementGraphicPart bool isClosed () const {return m_closed;} void setClosed (bool close); - void setHandlerColor(QPointF pos, const QColor &color) final; - void resetAllHandlerColor() final; + void setHandlerColor(QPointF pos, const QColor &color) final; + void resetAllHandlerColor() final; protected: QVariant itemChange(GraphicsItemChange change, const QVariant &value) override; diff --git a/sources/editor/graphicspart/partterminal.cpp b/sources/editor/graphicspart/partterminal.cpp index a3d55b8b4..90bd6ec7b 100644 --- a/sources/editor/graphicspart/partterminal.cpp +++ b/sources/editor/graphicspart/partterminal.cpp @@ -25,7 +25,7 @@ @param scene La scene sur laquelle figure cette borne */ PartTerminal::PartTerminal(QETElementEditor *editor, QGraphicsItem *parent) : - CustomElementGraphicPart(editor, parent) + CustomElementGraphicPart(editor, parent) { d = new TerminalData(this); d -> m_orientation = Qet::North; diff --git a/sources/editor/styleeditor.cpp b/sources/editor/styleeditor.cpp index 09cb543fd..631179fa6 100644 --- a/sources/editor/styleeditor.cpp +++ b/sources/editor/styleeditor.cpp @@ -490,7 +490,7 @@ bool StyleEditor::setPart(CustomElementPart *new_part) { if (CustomElementGraphicPart *part_graphic = dynamic_cast(new_part)) { part = part_graphic; - m_cep_list.append(part_graphic); + m_cep_list.append(part_graphic); updateForm(); return(true); } @@ -541,13 +541,14 @@ CustomElementPart *StyleEditor::currentPart() const { } QList StyleEditor::currentParts() const { - return m_cep_list; + return m_cep_list; } /** @brief StyleEditor::isStyleEditable @param cep_list - @return true if all of the content of cep_list can be edited by style editor, else return false. + @return true if all of the content of cep_list + can be edited by style editor, else return false. */ bool StyleEditor::isStyleEditable(QList cep_list) { diff --git a/sources/editor/ui/polygoneditor.cpp b/sources/editor/ui/polygoneditor.cpp index 4658d00db..ed60e5c14 100644 --- a/sources/editor/ui/polygoneditor.cpp +++ b/sources/editor/ui/polygoneditor.cpp @@ -29,41 +29,55 @@ @param part @param parent */ -PolygonEditor::PolygonEditor(QETElementEditor *editor, PartPolygon *part, QWidget *parent) : - ElementItemEditor(editor, parent), - ui(new Ui::PolygonEditor), - m_part(part) +PolygonEditor::PolygonEditor(QETElementEditor *editor, + PartPolygon *part, + QWidget *parent) : + ElementItemEditor(editor, parent), + ui(new Ui::PolygonEditor), + m_part(part) { - ui->setupUi(this); - m_style = new StyleEditor(editor); - ui->m_main_layout->insertWidget(0, m_style); - updateForm(); - ui->m_points_list_tree->installEventFilter(this); - ui->m_points_list_tree->addAction(ui->m_add_point_action); - ui->m_points_list_tree->addAction(ui->m_remove_point_action); + ui->setupUi(this); + m_style = new StyleEditor(editor); + ui->m_main_layout->insertWidget(0, m_style); + updateForm(); + ui->m_points_list_tree->installEventFilter(this); + ui->m_points_list_tree->addAction(ui->m_add_point_action); + ui->m_points_list_tree->addAction(ui->m_remove_point_action); } /** @brief PolygonEditor::~PolygonEditor */ PolygonEditor::~PolygonEditor() { - delete ui; + delete ui; } void PolygonEditor::setUpChangeConnections() { - m_change_connections << connect(m_part, &PartPolygon::polygonChanged, this, &PolygonEditor::updateForm); - m_change_connections << connect(m_part, &PartPolygon::closedChange, this, &PolygonEditor::updateForm); - m_change_connections << connect(m_part, &PartPolygon::xChanged, this, &PolygonEditor::updateForm); - m_change_connections << connect(m_part, &PartPolygon::yChanged, this, &PolygonEditor::updateForm); + m_change_connections << connect(m_part, + &PartPolygon::polygonChanged, + this, + &PolygonEditor::updateForm); + m_change_connections << connect(m_part, + &PartPolygon::closedChange, + this, + &PolygonEditor::updateForm); + m_change_connections << connect(m_part, + &PartPolygon::xChanged, + this, + &PolygonEditor::updateForm); + m_change_connections << connect(m_part, + &PartPolygon::yChanged, + this, + &PolygonEditor::updateForm); } void PolygonEditor::disconnectChangeConnections() { - for (QMetaObject::Connection c : m_change_connections) { - disconnect(c); - } - m_change_connections.clear(); + for (QMetaObject::Connection c : m_change_connections) { + disconnect(c); + } + m_change_connections.clear(); } /** @@ -102,11 +116,11 @@ bool PolygonEditor::setPart(CustomElementPart *new_part) @return the curent edited part */ CustomElementPart *PolygonEditor::currentPart() const { - return m_part; + return m_part; } QList PolygonEditor::currentParts() const { - return m_style->currentParts(); + return m_style->currentParts(); } /** @@ -115,23 +129,24 @@ QList PolygonEditor::currentParts() const { */ void PolygonEditor::updateForm() { - if (!m_part) { - return; - } + if (!m_part) { + return; + } - ui->m_points_list_tree->clear(); + ui->m_points_list_tree->clear(); - for(QPointF point : m_part->polygon()) - { - point = m_part->mapToScene(point); - QTreeWidgetItem *qtwi = new QTreeWidgetItem(); - qtwi->setData(0, Qt::EditRole, point.x()); - qtwi->setData(1, Qt::EditRole, point.y()); - qtwi -> setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled); - ui->m_points_list_tree->addTopLevelItem(qtwi); - } - ui->m_close_polygon_cb->setChecked(m_part->isClosed()); - ui->m_remove_point_action->setEnabled(m_part->polygon().size() > 2 ? true : false); + for(QPointF point : m_part->polygon()) + { + point = m_part->mapToScene(point); + QTreeWidgetItem *qtwi = new QTreeWidgetItem(); + qtwi->setData(0, Qt::EditRole, point.x()); + qtwi->setData(1, Qt::EditRole, point.y()); + qtwi -> setFlags(Qt::ItemIsEditable | Qt::ItemIsEnabled); + ui->m_points_list_tree->addTopLevelItem(qtwi); + } + ui->m_close_polygon_cb->setChecked(m_part->isClosed()); + ui->m_remove_point_action->setEnabled(m_part->polygon().size() + > 2 ? true : false); } /** @@ -185,7 +200,11 @@ void PolygonEditor::on_m_close_polygon_cb_stateChanged(int arg1) bool close = ui->m_close_polygon_cb->isChecked(); if (close != m_part->isClosed()) { - QPropertyUndoCommand *undo = new QPropertyUndoCommand(m_part, "closed", m_part->property("closed"), close); + QPropertyUndoCommand *undo = + new QPropertyUndoCommand(m_part, + "closed", + m_part->property("closed"), + close); undo->setText(tr("Modifier un polygone")); undoStack().push(undo); } @@ -195,7 +214,8 @@ void PolygonEditor::on_m_close_polygon_cb_stateChanged(int arg1) @brief PolygonEditor::on_m_points_list_tree_itemChanged Update the polygon according to the current value of the tree editor */ -void PolygonEditor::on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int column) +void PolygonEditor::on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, + int column) { Q_UNUSED(item); Q_UNUSED(column); @@ -207,13 +227,21 @@ void PolygonEditor::on_m_points_list_tree_itemChanged(QTreeWidgetItem *item, int QPolygonF points = pointsFromTree(); if (points.count() < 2) { - QET::QetMessageBox::warning(this, tr("Erreur", "message box title"), tr("Le polygone doit comporter au moins deux points.", "message box content")); + QET::QetMessageBox::warning(this, + tr("Erreur", + "message box title"), + tr("Le polygone doit comporter au moins deux points.", + "message box content")); return; } if (points != m_part->polygon()) { - QPropertyUndoCommand *undo = new QPropertyUndoCommand(m_part, "polygon", m_part->property("polygon"), points); + QPropertyUndoCommand *undo = new QPropertyUndoCommand( + m_part, + "polygon", + m_part->property("polygon"), + points); undo->setText(tr("Modifier un polygone")); undoStack().push(undo); } diff --git a/sources/editor/ui/polygoneditor.h b/sources/editor/ui/polygoneditor.h index f8ccbefba..d99125cd9 100644 --- a/sources/editor/ui/polygoneditor.h +++ b/sources/editor/ui/polygoneditor.h @@ -25,7 +25,7 @@ class PartPolygon; class QTreeWidgetItem; namespace Ui { - class PolygonEditor; + class PolygonEditor; } class PolygonEditor : public ElementItemEditor From bc176da88d619fc834bb2ad52c513ff57db21451 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:25:48 +0200 Subject: [PATCH 22/24] Improve code style, Wrap code for better readability --- sources/factory/qetgraphicstablefactory.h | 11 +++++++---- sources/factory/ui/addtabledialog.cpp | 4 ++-- sources/factory/ui/addtabledialog.h | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/sources/factory/qetgraphicstablefactory.h b/sources/factory/qetgraphicstablefactory.h index c245d26c2..d39414cc0 100644 --- a/sources/factory/qetgraphicstablefactory.h +++ b/sources/factory/qetgraphicstablefactory.h @@ -27,14 +27,17 @@ class AddTableDialog; */ class QetGraphicsTableFactory { - public: - QetGraphicsTableFactory(); + public: + QetGraphicsTableFactory(); - static void createAndAddNomenclature(Diagram *diagram); + static void createAndAddNomenclature(Diagram *diagram); static void createAndAddSummary(Diagram *diagram); private: static void create(Diagram *diagram, AddTableDialog *dialog); - static QetGraphicsTableItem *newTable(Diagram *diagram, AddTableDialog *dialog, QetGraphicsTableItem *previous_table = nullptr); + static QetGraphicsTableItem *newTable( + Diagram *diagram, + AddTableDialog *dialog, + QetGraphicsTableItem *previous_table = nullptr); }; #endif // QETGRAPHICSTABLEFACTORY_H diff --git a/sources/factory/ui/addtabledialog.cpp b/sources/factory/ui/addtabledialog.cpp index 3201471f2..b8296540f 100644 --- a/sources/factory/ui/addtabledialog.cpp +++ b/sources/factory/ui/addtabledialog.cpp @@ -30,10 +30,10 @@ @param parent : parent widget. */ AddTableDialog::AddTableDialog(QWidget *content_widget, QWidget *parent) : - QDialog(parent), + QDialog(parent), ui(new Ui::AddTableDialog) { - ui->setupUi(this); + ui->setupUi(this); ui->m_header_font_pb->setText(m_header_font.family()); ui->m_table_font_pb->setText(m_table_font.family()); m_content_widget = content_widget; diff --git a/sources/factory/ui/addtabledialog.h b/sources/factory/ui/addtabledialog.h index 0aca20e8e..4d16795ec 100644 --- a/sources/factory/ui/addtabledialog.h +++ b/sources/factory/ui/addtabledialog.h @@ -36,7 +36,7 @@ class AddTableDialog; */ class AddTableDialog : public QDialog { - Q_OBJECT + Q_OBJECT public: explicit AddTableDialog(QWidget *content_widget, QWidget *parent = nullptr); From c4bf4926166963a87328052ac0c519a1b40a3231 Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:26:04 +0200 Subject: [PATCH 23/24] Improve code style --- sources/richtext/richtexteditor_p.h | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/sources/richtext/richtexteditor_p.h b/sources/richtext/richtexteditor_p.h index fd801f57e..f030ec64e 100644 --- a/sources/richtext/richtexteditor_p.h +++ b/sources/richtext/richtexteditor_p.h @@ -69,33 +69,33 @@ class RichTextEditor; class RichTextEditorDialog : public QDialog { - Q_OBJECT -public: - explicit RichTextEditorDialog(QWidget *parent = nullptr); - ~RichTextEditorDialog() override; + Q_OBJECT + public: + explicit RichTextEditorDialog(QWidget *parent = nullptr); + ~RichTextEditorDialog() override; - int showDialog(); - void setDefaultFont(const QFont &font); - void setText(const QString &text); - QString text(Qt::TextFormat format = Qt::AutoText) const; + int showDialog(); + void setDefaultFont(const QFont &font); + void setText(const QString &text); + QString text(Qt::TextFormat format = Qt::AutoText) const; -signals: - void applyEditText(const QString &); + signals: + void applyEditText(const QString &); -private slots: - void tabIndexChanged(int newIndex); - void richTextChanged(); - void sourceChanged(); - void on_buttonBox_accepted(); - -private: - enum TabIndex { RichTextIndex, SourceIndex }; - enum State { Clean, RichTextChanged, SourceChanged }; - RichTextEditor *m_editor; - QTextEdit *m_text_edit; - QTabWidget *m_tab_widget; - State m_state; - }; + private slots: + void tabIndexChanged(int newIndex); + void richTextChanged(); + void sourceChanged(); + void on_buttonBox_accepted(); + + private: + enum TabIndex { RichTextIndex, SourceIndex }; + enum State { Clean, RichTextChanged, SourceChanged }; + RichTextEditor *m_editor; + QTextEdit *m_text_edit; + QTabWidget *m_tab_widget; + State m_state; +}; } // namespace qdesigner_internal From 41cef494538d5e023c7cae50fb191b5d0676623b Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Sun, 16 Aug 2020 14:26:40 +0200 Subject: [PATCH 24/24] Improve code style, Wrap code for better readability --- sources/diagramprintdialog.cpp | 40 ++++++++++++++++++------------- sources/diagramschooser.cpp | 2 +- sources/elementsmover.cpp | 2 +- sources/elementspanelwidget.cpp | 26 ++++++++++---------- sources/exportdialog.cpp | 36 +++++++++++++++++++++------- sources/genericpanel.cpp | 2 +- sources/nomenclature.h | 4 ++-- sources/projectconfigpages.cpp | 10 ++++---- sources/projectview.cpp | 26 ++++++++++---------- sources/pugixml/pugixml.hpp | 22 ++++++++--------- sources/qetapp.h | 2 +- sources/qetdiagrameditor.cpp | 8 +++---- sources/qetdiagrameditor.h | 3 ++- sources/qeticons.cpp | 24 +++++++++---------- sources/qetprintpreviewdialog.cpp | 12 +++++----- sources/qetproject.cpp | 10 ++++---- 16 files changed, 128 insertions(+), 101 deletions(-) diff --git a/sources/diagramprintdialog.cpp b/sources/diagramprintdialog.cpp index 33cd0d3e8..9cfa76118 100644 --- a/sources/diagramprintdialog.cpp +++ b/sources/diagramprintdialog.cpp @@ -352,26 +352,28 @@ void DiagramPrintDialog::browseFilePrintTypeDialog() { ou non @param options Options de rendu */ -void DiagramPrintDialog::print(const QList &diagrams, bool fit_page, const ExportProperties& options) { +void DiagramPrintDialog::print(const QList &diagrams, + bool fit_page, + const ExportProperties& options) { //qDebug() << "Demande d'impression de " << diagrams.count() << "schemas."; #if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) - #ifdef Q_OS_WIN - #ifdef QT_DEBUG - qDebug() << "--"; - qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << printer_->resolution(); - qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber(); - #endif + #ifdef Q_OS_WIN + #ifdef QT_DEBUG + qDebug() << "--"; + qDebug() << "DiagramPrintDialog::print printer_->resolution() before " << printer_->resolution(); + qDebug() << "DiagramPrintDialog::print screennumber " << QApplication::desktop()->screenNumber(); + #endif - QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber()); - qreal dotsPerInch = (qreal)srn->logicalDotsPerInch(); - printer_->setResolution(dotsPerInch); + QScreen *srn = QApplication::screens().at(QApplication::desktop()->screenNumber()); + qreal dotsPerInch = (qreal)srn->logicalDotsPerInch(); + printer_->setResolution(dotsPerInch); - #ifdef QT_DEBUG - qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch; - qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << printer_->resolution(); - qDebug() << "--"; - #endif - #endif + #ifdef QT_DEBUG + qDebug() << "DiagramPrintDialog::print dotsPerInch " << dotsPerInch; + qDebug() << "DiagramPrintDialog::print printer_->resolution() after" << printer_->resolution(); + qDebug() << "--"; + #endif + #endif #endif // QPainter utiliser pour effectuer le rendu QPainter qp(printer_); @@ -399,7 +401,11 @@ void DiagramPrintDialog::print(const QList &diagrams, bool fit_page, @param qp QPainter a utiliser (deja initialise sur printer) @param printer Imprimante a utiliser */ -void DiagramPrintDialog::printDiagram(Diagram *diagram, bool fit_page, const ExportProperties &options, QPainter *qp, QPrinter *printer) { +void DiagramPrintDialog::printDiagram(Diagram *diagram, + bool fit_page, + const ExportProperties &options, + QPainter *qp, + QPrinter *printer) { //qDebug() << printer -> paperSize() << printer -> paperRect() << diagram -> title(); // l'imprimante utilise-t-elle toute la feuille ? bool full_page = printer -> fullPage(); diff --git a/sources/diagramschooser.cpp b/sources/diagramschooser.cpp index 664e0fd1d..66701fe39 100644 --- a/sources/diagramschooser.cpp +++ b/sources/diagramschooser.cpp @@ -162,7 +162,7 @@ void DiagramsChooser::updateList() { foreach(Diagram *diagram, project_ -> diagrams()) { // titre du schema QString diagram_title = diagram -> title(); - if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre"); + if (diagram_title.isEmpty()) diagram_title = tr("Folio sans titre"); QCheckBox *checkbox = new QCheckBox(diagram_title); checkbox -> setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum)); diff --git a/sources/elementsmover.cpp b/sources/elementsmover.cpp index 0ddd63ff1..a1a144e06 100644 --- a/sources/elementsmover.cpp +++ b/sources/elementsmover.cpp @@ -88,7 +88,7 @@ int ElementsMover::beginMovement(Diagram *diagram, QGraphicsItem *driver_item) } } - QList etig_list = m_moved_content.m_texts_groups.values(); + QList etig_list = m_moved_content.m_texts_groups.values(); for(ElementTextItemGroup *etig : etig_list) { if (m_moved_content.m_elements.contains(etig->parentElement())) { m_moved_content.m_texts_groups.remove(etig); diff --git a/sources/elementspanelwidget.cpp b/sources/elementspanelwidget.cpp index 8282be4f0..b93fc00db 100644 --- a/sources/elementspanelwidget.cpp +++ b/sources/elementspanelwidget.cpp @@ -43,19 +43,19 @@ ElementsPanelWidget::ElementsPanelWidget(QWidget *parent) : QWidget(parent) { elements_panel = new ElementsPanel(this); // initialise les actions - open_directory = new QAction(QET::Icons::FolderOpen, tr("Ouvrir le dossier correspondant"), this); - copy_path = new QAction(QET::Icons::IC_CopyFile, tr("Copier le chemin"), this); - prj_activate = new QAction(QET::Icons::ProjectFile, tr("Basculer vers ce projet"), this); - prj_close = new QAction(QET::Icons::DocumentClose, tr("Fermer ce projet"), this); - prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propriétés du projet"), this); - prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du folio"), this); - prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un folio"), this); - prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce folio"), this); - prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce folio"), this); - prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio"), this); - prj_move_diagram_upx10 = new QAction(QET::Icons::GoUpDouble, tr("Remonter ce folio x10"), this); - prj_move_diagram_top = new QAction(QET::Icons::GoTop, tr("Remonter ce folio au debut"), this); - prj_move_diagram_downx10 = new QAction(QET::Icons::GoDownDouble, tr("Abaisser ce folio x10"), this); + open_directory = new QAction(QET::Icons::FolderOpen, tr("Ouvrir le dossier correspondant"), this); + copy_path = new QAction(QET::Icons::IC_CopyFile, tr("Copier le chemin"), this); + prj_activate = new QAction(QET::Icons::ProjectFile, tr("Basculer vers ce projet"), this); + prj_close = new QAction(QET::Icons::DocumentClose, tr("Fermer ce projet"), this); + prj_edit_prop = new QAction(QET::Icons::DialogInformation, tr("Propriétés du projet"), this); + prj_prop_diagram = new QAction(QET::Icons::DialogInformation, tr("Propriétés du folio"), this); + prj_add_diagram = new QAction(QET::Icons::DiagramAdd, tr("Ajouter un folio"), this); + prj_del_diagram = new QAction(QET::Icons::DiagramDelete, tr("Supprimer ce folio"), this); + prj_move_diagram_up = new QAction(QET::Icons::GoUp, tr("Remonter ce folio"), this); + prj_move_diagram_down = new QAction(QET::Icons::GoDown, tr("Abaisser ce folio"), this); + prj_move_diagram_upx10 = new QAction(QET::Icons::GoUpDouble, tr("Remonter ce folio x10"), this); + prj_move_diagram_top = new QAction(QET::Icons::GoTop, tr("Remonter ce folio au debut"), this); + prj_move_diagram_downx10 = new QAction(QET::Icons::GoDownDouble, tr("Abaisser ce folio x10"), this); tbt_add = new QAction(QET::Icons::TitleBlock, tr("Nouveau modèle"), this); tbt_edit = new QAction(QET::Icons::TitleBlock, tr("Éditer ce modèle"), this); tbt_remove = new QAction(QET::Icons::TitleBlock, tr("Supprimer ce modèle"), this); diff --git a/sources/exportdialog.cpp b/sources/exportdialog.cpp index 09cfc997e..5698a3f1e 100644 --- a/sources/exportdialog.cpp +++ b/sources/exportdialog.cpp @@ -399,8 +399,12 @@ void ExportDialog::generateSvg(Diagram *diagram, int width, int height, bool kee @param keep_aspect_ratio True pour conserver le ratio, false sinon @param io_device Peripherique de sortie pour le code DXF (souvent : un fichier) */ -void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool keep_aspect_ratio, QString &file_path) { - saveReloadDiagramParameters(diagram, true); +void ExportDialog::generateDxf(Diagram *diagram, + int width, + int height, + bool keep_aspect_ratio, + QString &file_path) { + saveReloadDiagramParameters(diagram, true); width -= 2*Diagram::margin; height -= 2*Diagram::margin; @@ -411,12 +415,22 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee Createdxf::dxfBegin(file_path); //Add project elements (lines, rectangles, circles, texts) to dxf file - if (epw -> exportProperties().draw_border) { - double bx0 = Diagram::margin * Createdxf::xScale; - double by0 = Diagram::margin * Createdxf::yScale; - Createdxf::drawRectangle(file_path, bx0, -by0, double(width)*Createdxf::xScale, double(height)*Createdxf::yScale, 0); - } - diagram -> border_and_titleblock.drawDxf(width, height, keep_aspect_ratio, file_path, 0); + if (epw -> exportProperties().draw_border) { + double bx0 = Diagram::margin * Createdxf::xScale; + double by0 = Diagram::margin * Createdxf::yScale; + Createdxf::drawRectangle( + file_path, + bx0, + -by0, + double(width)*Createdxf::xScale, + double(height)*Createdxf::yScale, + 0); + } + diagram -> border_and_titleblock.drawDxf(width, + height, + keep_aspect_ratio, + file_path, + 0); // Build the lists of elements. QList list_elements; @@ -651,7 +665,11 @@ void ExportDialog::generateDxf(Diagram *diagram, int width, int height, bool kee saveReloadDiagramParameters(diagram, false); } -QPointF ExportDialog::rotation_transformed(qreal px, qreal py , qreal origin_x, qreal origin_y, qreal angle) { +QPointF ExportDialog::rotation_transformed(qreal px, + qreal py, + qreal origin_x, + qreal origin_y, + qreal angle) { angle *= -3.14159265 / 180; diff --git a/sources/genericpanel.cpp b/sources/genericpanel.cpp index 54f41d628..d48d63b79 100644 --- a/sources/genericpanel.cpp +++ b/sources/genericpanel.cpp @@ -628,7 +628,7 @@ QTreeWidgetItem *GenericPanel::updateTemplateItem( "used to display a title block template").arg( tb_template.name())); QString tbt_whatsthis = tr( - "Ceci est un modèle de cartouche, qui peut être appliqué à un folio.", + "Ceci est un modèle de cartouche, qui peut être appliqué à un folio.", "\"What's this\" tip" ); tb_template_qtwi -> setWhatsThis(0, tbt_whatsthis); diff --git a/sources/nomenclature.h b/sources/nomenclature.h index 179620330..1fccbef2e 100644 --- a/sources/nomenclature.h +++ b/sources/nomenclature.h @@ -31,11 +31,11 @@ class Diagram; class Element; /** - This class represents a nomenclature... + This class represents a nomenclature... */ class nomenclature { - private: + private: QETProject *m_project; QList m_list_diagram; QWidget *m_parent; diff --git a/sources/projectconfigpages.cpp b/sources/projectconfigpages.cpp index 0c769ff20..77a3cc86a 100644 --- a/sources/projectconfigpages.cpp +++ b/sources/projectconfigpages.cpp @@ -232,7 +232,7 @@ ProjectAutoNumConfigPage::ProjectAutoNumConfigPage (QETProject *project, QWidget @return */ QString ProjectAutoNumConfigPage::title() const { - return tr("Numérotation auto"); + return tr("Numérotation auto"); } /** @@ -263,19 +263,19 @@ void ProjectAutoNumConfigPage::initWidgets() //Conductor tab m_saw_conductor = new SelectAutonumW(1); - tab_widget->addTab(m_saw_conductor, tr("Conducteurs")); + tab_widget->addTab(m_saw_conductor, tr("Conducteurs")); //Element tab m_saw_element = new SelectAutonumW(0); - tab_widget->addTab(m_saw_element, tr("Eléments")); + tab_widget->addTab(m_saw_element, tr("Eléments")); //Folio Tab m_saw_folio = new SelectAutonumW(2); - tab_widget->addTab(m_saw_folio, tr("Folios")); + tab_widget->addTab(m_saw_folio, tr("Folios")); //AutoNumbering Tab m_faw = new FolioAutonumberingW(project()); - tab_widget->addTab(m_faw, tr("Numérotation auto des folios")); + tab_widget->addTab(m_faw, tr("Numérotation auto des folios")); QHBoxLayout *main_layout = new QHBoxLayout(); main_layout->addWidget(tab_widget); diff --git a/sources/projectview.cpp b/sources/projectview.cpp index 7b54ddc1b..ef33170a7 100644 --- a/sources/projectview.cpp +++ b/sources/projectview.cpp @@ -352,14 +352,14 @@ QETResult ProjectView::noProjectResult() const { void ProjectView::removeDiagram(DiagramView *diagram_view) { if (!diagram_view) - return; + return; if (m_project -> isReadOnly()) - return; + return; if (!m_diagram_ids.values().contains(diagram_view)) - return; + return; - //Ask confirmation to user. + //Ask confirmation to user. int answer = QET::QetMessageBox::question( this, tr("Supprimer le folio ?", "message box title"), @@ -371,18 +371,18 @@ void ProjectView::removeDiagram(DiagramView *diagram_view) return; } - //Remove the diagram view of the tabs widget + //Remove the diagram view of the tabs widget int index_to_remove = m_diagram_ids.key(diagram_view); m_tab->removeTab(index_to_remove); m_diagram_view_list.removeAll(diagram_view); rebuildDiagramsMap(); - + m_project -> removeDiagram(diagram_view -> diagram()); delete diagram_view; emit(diagramRemoved(diagram_view)); - updateAllTabsTitle(); - m_project -> setModified(true); + updateAllTabsTitle(); + m_project -> setModified(true); } /** @@ -812,11 +812,11 @@ void ProjectView::loadDiagrams() diagramAdded(diagram); } - if (DiagramView *dv = currentDiagram()) - { - dv->diagram()->loadElmtFolioSeq(); - dv->diagram()->loadCndFolioSeq(); - } + if (DiagramView *dv = currentDiagram()) + { + dv->diagram()->loadElmtFolioSeq(); + dv->diagram()->loadCndFolioSeq(); + } QSettings settings; } diff --git a/sources/pugixml/pugixml.hpp b/sources/pugixml/pugixml.hpp index dc26615d8..9b97f1688 100644 --- a/sources/pugixml/pugixml.hpp +++ b/sources/pugixml/pugixml.hpp @@ -1279,13 +1279,13 @@ namespace pugi bool operator!() const; }; - #ifndef PUGIXML_NO_EXCEPTIONS - #if defined(_MSC_VER) - // C4275 can be ignored in Visual C++ if you are deriving - // from a type in the Standard C++ Library - #pragma warning(push) - #pragma warning(disable: 4275) - #endif +#ifndef PUGIXML_NO_EXCEPTIONS +#if defined(_MSC_VER) +// C4275 can be ignored in Visual C++ if you are deriving +// from a type in the Standard C++ Library +#pragma warning(push) +#pragma warning(disable: 4275) +#endif // XPath exception class class PUGIXML_CLASS xpath_exception: public std::exception { @@ -1302,10 +1302,10 @@ namespace pugi // Get parse result const xpath_parse_result& result() const; }; - #if defined(_MSC_VER) - #pragma warning(pop) - #endif - #endif +#if defined(_MSC_VER) +#pragma warning(pop) +#endif +#endif // XPath node class (either xml_node or xml_attribute) class PUGIXML_CLASS xpath_node diff --git a/sources/qetapp.h b/sources/qetapp.h index ba1788d0f..63d079dd7 100644 --- a/sources/qetapp.h +++ b/sources/qetapp.h @@ -168,7 +168,7 @@ class QETApp : public QObject protected: #ifdef Q_OS_DARWIN - bool eventFiltrer(QObject *object, QEvent *); + bool eventFiltrer(QObject *object, QEvent *); #endif // attributes diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 4cc1ab2d9..4b42ae806 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -46,8 +46,8 @@ /** @brief QETDiagramEditor::QETDiagramEditor Constructor - @param files, list of files to open - @param parent, parent widget + @param files : list of files to open + @param parent : parent widget */ QETDiagramEditor::QETDiagramEditor(const QStringList &files, QWidget *parent) : QETMainWindow(parent), @@ -382,8 +382,8 @@ void QETDiagramEditor::setUpActions() //Export nomenclature to CSV m_csv_export = new QAction(QET::Icons::DocumentSpreadsheet, tr("Exporter au format CSV"), this); connect(m_csv_export, &QAction::triggered, [this]() { - BOMExportDialog bom(currentProjectView()->project(), this); - bom.exec(); + BOMExportDialog bom(currentProjectView()->project(), this); + bom.exec(); }); //Add a nomenclature item diff --git a/sources/qetdiagrameditor.h b/sources/qetdiagrameditor.h index 0cc5099c7..73e28c0d8 100644 --- a/sources/qetdiagrameditor.h +++ b/sources/qetdiagrameditor.h @@ -52,7 +52,8 @@ class QETDiagramEditor : public QETMainWindow Q_OBJECT public: - QETDiagramEditor(const QStringList & = QStringList(), QWidget * = nullptr); + QETDiagramEditor(const QStringList & = QStringList(), + QWidget * = nullptr); ~QETDiagramEditor() override; private: diff --git a/sources/qeticons.cpp b/sources/qeticons.cpp index f3fbfe90c..1457a77ea 100644 --- a/sources/qeticons.cpp +++ b/sources/qeticons.cpp @@ -390,26 +390,26 @@ void QET::Icons::initIcons() { ArrowRightDouble .addFile(":/ico/22x22/arrow-right-double.png"); Autoconnect .addFile(":/ico/22x22/autoconnect.png"); BringForward .addFile(":/ico/22x22/bring_forward.png"); - Cancel .addFile(":/ico/16x16/item-cancel.png"); + Cancel .addFile(":/ico/16x16/item-cancel.png"); Conductor .addFile(":/ico/16x16/conductor.png"); - ConductorEdit .addFile(":/ico/16x16/conductor-edit.png"); - ConductorSettings .addFile(":/ico/16x16/conductor-reset.png"); - ConductorSettings .addFile(":/ico/22x22/conductor2.png"); + ConductorEdit .addFile(":/ico/16x16/conductor-edit.png"); + ConductorSettings .addFile(":/ico/16x16/conductor-reset.png"); + ConductorSettings .addFile(":/ico/22x22/conductor2.png"); Configure .addFile(":/ico/16x16/configure.png"); Configure .addFile(":/ico/22x22/configure.png"); ConfigureToolbars .addFile(":/ico/16x16/configure-toolbars.png"); ConfigureToolbars .addFile(":/ico/22x22/configure-toolbars.png"); - IC_CopyFile .addFile(":/ico/16x16/item-copy.png"); - DiagramAdd .addFile(":/ico/16x16/folio-new.png"); - DiagramAdd .addFile(":/ico/22x22/diagram_add.png"); - Diagram .addFile(":/ico/16x16/diagram.png"); + IC_CopyFile .addFile(":/ico/16x16/item-copy.png"); + DiagramAdd .addFile(":/ico/16x16/folio-new.png"); + DiagramAdd .addFile(":/ico/22x22/diagram_add.png"); + Diagram .addFile(":/ico/16x16/diagram.png"); Diagram .addFile(":/ico/diagram.png"); DiagramBg .addFile(":/ico/22x22/diagram_bg.png"); - DiagramDelete .addFile(":/ico/16x16/folio-delete.png"); - DiagramDelete .addFile(":/ico/22x22/diagram_del.png"); + DiagramDelete .addFile(":/ico/16x16/folio-delete.png"); + DiagramDelete .addFile(":/ico/22x22/diagram_del.png"); DialogCancel .addFile(":/ico/16x16/dialog-cancel.png"); DialogCancel .addFile(":/ico/22x22/dialog-cancel.png"); - DialogInformation .addFile(":/ico/16x16/folio-properties.png"); + DialogInformation .addFile(":/ico/16x16/folio-properties.png"); DialogInformation .addFile(":/ico/22x22/dialog-information.png"); DialogOk .addFile(":/ico/16x16/dialog-ok.png"); DialogOk .addFile(":/ico/22x22/dialog-ok.png"); @@ -417,7 +417,7 @@ void QET::Icons::initIcons() { DocumentClose .addFile(":/ico/22x22/document-close.png"); DocumentExport .addFile(":/ico/16x16/document-export.png"); DocumentExport .addFile(":/ico/22x22/document-export.png"); - DocumentSpreadsheet .addFile(":/ico/16x16/export-csv.png"); + DocumentSpreadsheet .addFile(":/ico/16x16/export-csv.png"); DocumentExport .addFile(":/ico/128x128/document-export.png"); DocumentImport .addFile(":/ico/16x16/document-import.png"); DocumentImport .addFile(":/ico/22x22/document-import.png"); diff --git a/sources/qetprintpreviewdialog.cpp b/sources/qetprintpreviewdialog.cpp index 09a6236db..102d522a6 100644 --- a/sources/qetprintpreviewdialog.cpp +++ b/sources/qetprintpreviewdialog.cpp @@ -170,11 +170,11 @@ void QETPrintPreviewDialog::selectNoDiagram() { */ void QETPrintPreviewDialog::build() { preview_ = new QPrintPreviewWidget(printer_); - diagrams_label_ = new QLabel(tr("Folios à imprimer :")); + diagrams_label_ = new QLabel(tr("Folios à imprimer :")); diagrams_list_ = new DiagramsChooser(project_); diagrams_select_all_ = new QPushButton(tr("Tout cocher")); diagrams_select_none_ = new QPushButton(tr("Tout décocher")); - toggle_diagrams_list_ = new QAction(QET::Icons::Diagram, tr("Cacher la liste des folios"), this); + toggle_diagrams_list_ = new QAction(QET::Icons::Diagram, tr("Cacher la liste des folios"), this); toggle_print_options_ = new QAction(QET::Icons::Configure, tr("Cacher les options d'impression"), this); adjust_width_ = new QAction(QET::Icons::ViewFitWidth, tr("Ajuster la largeur"), this); adjust_page_ = new QAction(QET::Icons::ViewFitWindow, tr("Ajuster la page"), this); @@ -245,9 +245,9 @@ void QETPrintPreviewDialog::build() { )); use_full_page_label_ -> setWordWrap(true); use_full_page_label_ -> setContentsMargins(20, 0, 0, 0); - fit_diagram_to_page_ = new QCheckBox(tr("Adapter le folio à la page")); + fit_diagram_to_page_ = new QCheckBox(tr("Adapter le folio à la page")); fit_diagram_to_page_label_ = new QLabel(tr( - "Si cette option est cochée, le folio sera agrandi ou " + "Si cette option est cochée, le folio sera agrandi ou " "rétréci de façon à remplir toute la surface imprimable " "d'une et une seule page." )); @@ -364,9 +364,9 @@ void QETPrintPreviewDialog::setDiagramsListVisible(bool display) { diagrams_select_none_ -> setVisible(display); if (display) { - toggle_diagrams_list_ -> setText(tr("Cacher la liste des folios")); + toggle_diagrams_list_ -> setText(tr("Cacher la liste des folios")); } else { - toggle_diagrams_list_ -> setText(tr("Afficher la liste des folios")); + toggle_diagrams_list_ -> setText(tr("Afficher la liste des folios")); } } diff --git a/sources/qetproject.cpp b/sources/qetproject.cpp index baba579c7..fba5a752f 100644 --- a/sources/qetproject.cpp +++ b/sources/qetproject.cpp @@ -870,17 +870,19 @@ bool QETProject::close() { */ QETResult QETProject::write() { - // this operation requires a filepath + // this operation requires a filepath if (m_file_path.isEmpty()) return(QString("unable to save project to file: no filepath was specified")); - // if the project was opened read-only and the file is still non-writable, do not save the project + // if the project was opened read-only + // and the file is still non-writable, do not save the project if (isReadOnly() && !QFileInfo(m_file_path).isWritable()) return(QString("the file %1 was opened read-only and thus will not be written").arg(m_file_path)); - QDomDocument xml_project(toXml()); + QDomDocument xml_project(toXml()); QString error_message; - if (!QET::writeXmlFile(xml_project, m_file_path, &error_message)) return(error_message); + if (!QET::writeXmlFile(xml_project, m_file_path, &error_message)) + return(error_message); //title block variables should be updated after file save dialog is confirmed, before file is saved. m_project_properties.addValue("saveddate", QDate::currentDate().toString(Qt::SystemLocaleShortDate));