diff --git a/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp b/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp index 45fac0ba1537..b8d561459051 100644 --- a/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp +++ b/src/libs/vtools/dialogs/support/edit_formula_dialog.cpp @@ -1,57 +1,54 @@ -/****************************************************************************** -* @file edit_formula_dialog.cpp -** @author DSCaskey -** @date 10 Jun, 2023 -** -** @brief -** @copyright -** This source code is part of the Seamly2D project, a pattern making -** program to create and model patterns of clothing. -** Copyright (C) 2017-2023 Seamly2D project -** All Rights Reserved. -** -** Seamly2D 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 3 of the License, or -** (at your option) any later version. -** -** Seamly2D 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 Seamly2D. If not, see . -** -*************************************************************************/ - -/************************************************************************ - ** - ** @file dialogeditwrongformula.cpp - ** @author Roman Telezhynskyi - ** @date 29 5, 2014 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2013-2015 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ +//--------------------------------------------------------------------------------------------------------------------- +// @file edit_formula_dialog.cpp +// @author DSCaskey +// @date 10 Jun, 2023 +// +// @brief +// @copyright +// This source code is part of the Seamly2D project, a pattern making +// program to create and model patterns of clothing. +// Copyright (C) 2017-2023 Seamly2D project +// All Rights Reserved. +// +// Seamly2D 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 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 Seamly2D. If not, see . +//--------------------------------------------------------------------------------------------------------------------- + +//--------------------------------------------------------------------------------------------------------------------- +// @file dialogeditwrongformula.cpp +// @author Roman Telezhynskyi +// @date 29 5, 2014 +// +// @brief +// @copyright +// This source code is part of the Valentina project, a pattern making +// program, whose allow create and modeling patterns of clothing. +// Copyright (C) 2013-2015 Valentina project +// All Rights Reserved. +// +// Valentina 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 3 of the License, or +// (at your option) any later version. +// +// Valentina 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 Valentina. If not, see . +//--------------------------------------------------------------------------------------------------------------------- #include "edit_formula_dialog.h" #include "ui_edit_formula_dialog.h" @@ -196,10 +193,9 @@ void EditFormulaDialog::EvalFormula() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief valueChanged show description when current variable changed - * @param row number of row - */ +/// @brief valueChanged show description when current variable changed +/// @param row number of row +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::valueChanged(int row) { if (ui->tableWidget->rowCount() == 0) @@ -273,10 +269,9 @@ void EditFormulaDialog::valueChanged(int row) } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief menu tabChanged - * @param row number of row - */ +/// @brief menu tabChanged +/// @param row number of row +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::tabChanged(int row) { switch (row) @@ -331,19 +326,17 @@ void EditFormulaDialog::tabChanged(int row) } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief insertVariable insert variable into line edit - */ +/// @brief insertVariable insert variable into line edit +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::insertVariable() { insertValue(ui->tableWidget->currentItem()); } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief insertValue insert variable into line edit - * @param item chosen item of table widget - */ +/// @brief insertValue insert variable into line edit +/// @param item chosen item of table widget +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::insertValue(QTableWidgetItem *item) { if (item != nullptr) @@ -375,9 +368,8 @@ void EditFormulaDialog::insertValue(QTableWidgetItem *item) } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief measurements show measurements in list - */ +/// @brief measurements show measurements in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::measurements() { ui->checkBoxHideEmpty->setEnabled(true); @@ -385,9 +377,8 @@ void EditFormulaDialog::measurements() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief lineLengths show lengths of line variables in list - */ +/// @brief lineLengths show lengths of line variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::lineLengths() { ui->checkBoxHideEmpty->setEnabled(false); @@ -395,9 +386,8 @@ void EditFormulaDialog::lineLengths() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief arcRadii show radii of arc variables in list - */ +/// @brief arcRadii show radii of arc variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::arcRadii() { ui->checkBoxHideEmpty->setEnabled(false); @@ -405,9 +395,8 @@ void EditFormulaDialog::arcRadii() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief curveAngles show angles of curve variables in list - */ +/// @brief curveAngles show angles of curve variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::curveAngles() { ui->checkBoxHideEmpty->setEnabled(false); @@ -415,9 +404,8 @@ void EditFormulaDialog::arcRadii() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief curveLengths show lengths of curve variables in list - */ +/// @brief curveLengths show lengths of curve variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::curveLengths() { ui->checkBoxHideEmpty->setEnabled(false); @@ -425,9 +413,8 @@ void EditFormulaDialog::curveLengths() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief controlPointLengths show lengths of control point variables in list - */ +/// @brief controlPointLengths show lengths of control point variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::controlPointLengths() { ui->checkBoxHideEmpty->setEnabled(false); @@ -435,9 +422,8 @@ void EditFormulaDialog::curveLengths() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief lineAngles show angles of line variables in list - */ +/// @brief lineAngles show angles of line variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::lineAngles() { ui->checkBoxHideEmpty->setEnabled(false); @@ -445,9 +431,8 @@ void EditFormulaDialog::curveLengths() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief customVariables show custom variables in list - */ +/// @brief customVariables show custom variables in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::customVariables() { ui->checkBoxHideEmpty->setEnabled(false); @@ -455,9 +440,8 @@ void EditFormulaDialog::customVariables() } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief functions show functions in list - */ +/// @brief functions show functions in list +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::functions() { ui->checkBoxHideEmpty->setEnabled(false); @@ -499,10 +483,8 @@ void EditFormulaDialog::showEvent(QShowEvent *event) resize(size); } - QScreen *screen = QGuiApplication::primaryScreen(); - QRect position = frameGeometry(); - position.moveCenter(screen->availableGeometry().center()); - move(position.topLeft()); + // Set the position that the dialog opens based on user preference. + setDialogPosition(); isInitialized = true;//first show windows are held } @@ -586,10 +568,9 @@ void EditFormulaDialog::setDescription(const QString &name, qreal value, const Q } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief showVariable show variables in list - * @param var container with variables - */ +/// @brief showVariable show variables in list +/// @param var container with variables +//--------------------------------------------------------------------------------------------------------------------- template void EditFormulaDialog::showVariable(const QMap &var) { @@ -620,10 +601,9 @@ void EditFormulaDialog::showVariable(const QMap &var) } //--------------------------------------------------------------------------------------------------------------------- -/** - * @brief showMeasurements show measurements in table - * @param var container with measurements - */ +/// @brief showMeasurements show measurements in table +/// @param var container with measurements +//--------------------------------------------------------------------------------------------------------------------- void EditFormulaDialog::showMeasurements(const QMap > &var) { ui->tableWidget->blockSignals(true); @@ -667,9 +647,8 @@ void EditFormulaDialog::showMeasurements(const QMaptableWidget->blockSignals(true); diff --git a/src/libs/vtools/dialogs/support/edit_formula_dialog.h b/src/libs/vtools/dialogs/support/edit_formula_dialog.h index 9c832578f292..f49d257d0ebf 100644 --- a/src/libs/vtools/dialogs/support/edit_formula_dialog.h +++ b/src/libs/vtools/dialogs/support/edit_formula_dialog.h @@ -1,57 +1,54 @@ -/****************************************************************************** -* @file edit_formula_dialog.h -** @author DSCaskey -** @date 10 Jun, 2023 -** -** @brief -** @copyright -** This source code is part of the Seamly2D project, a pattern making -** program to create and model patterns of clothing. -** Copyright (C) 2017-2023 Seamly2D project -** All Rights Reserved. -** -** Seamly2D 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 3 of the License, or -** (at your option) any later version. -** -** Seamly2D 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 Seamly2D. If not, see . -** -*************************************************************************/ - -/************************************************************************ - ** - ** @file dialogeditwrongformula.h - ** @author Roman Telezhynskyi - ** @date 29 5, 2014 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2013-2015 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ +//--------------------------------------------------------------------------------------------------------------------- +// @file edit_formula_dialog.h +// @author DSCaskey +// @date 10 Jun, 2023 +// +// @brief +// @copyright +// This source code is part of the Seamly2D project, a pattern making +// program to create and model patterns of clothing. +// Copyright (C) 2017-2023 Seamly2D project +// All Rights Reserved. +// +// Seamly2D 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 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 Seamly2D. If not, see . +//--------------------------------------------------------------------------------------------------------------------- + +//--------------------------------------------------------------------------------------------------------------------- +// @file dialogeditwrongformula.h +// @author Roman Telezhynskyi +// @date 29 5, 2014 +// +// @brief +// @copyright +// This source code is part of the Valentina project, a pattern making +// program, whose allow create and modeling patterns of clothing. +// Copyright (C) 2013-2015 Valentina project +// All Rights Reserved. +// +// Valentina 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 3 of the License, or +// (at your option) any later version. +// +// Valentina 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 Valentina. If not, see . +//--------------------------------------------------------------------------------------------------------------------- #ifndef EDIT_FORMULA_DIALOG_H #define EDIT_FORMULA_DIALOG_H @@ -77,14 +74,14 @@ namespace Ui class EditFormulaDialog; } -/** - * @brief The EditFormulaDialog class dialog for editing wrong formula. - * - * When math parser find in formula error user can try fix issue. Dialog will show all variables that user can use in - * this formula. Dialog check fixed variant of formula. - * - * Don't implemant button "Apply" for this dialog!! - */ +//--------------------------------------------------------------------------------------------------------------------- +/// @brief The EditFormulaDialog class dialog for editing wrong formula. +/// +/// When math parser find in formula error user can try fix issue. Dialog will show all variables that user can use in +/// this formula. Dialog check fixed variant of formula. +/// +/// Don't implemant button "Apply" for this dialog!! +//--------------------------------------------------------------------------------------------------------------------- class EditFormulaDialog : public DialogTool { Q_OBJECT @@ -106,7 +103,7 @@ public slots: void valueChanged(int row); void tabChanged(int row); void insertVariable(); - void insertValue(QTableWidgetItem * item); + void insertValue(QTableWidgetItem *item); void measurements(); void lineLengths(); void arcRadii(); diff --git a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp index 7cfd61e0fd31..240fa50065c1 100644 --- a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp +++ b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.cpp @@ -1,55 +1,52 @@ -/*************************************************************************** - ** @file editlabeltemplate_dialog.cpp - ** @author Douglas S Caskey - ** @date 17 Sep, 2023 - ** - ** @copyright - ** Copyright (C) 2017 - 2022 Seamly, LLC - ** https://github.com/fashionfreedom/seamly2d - ** - ** @brief - ** Seamly2D 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 3 of the License, or - ** (at your option) any later version. - ** - ** Seamly2D 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 Seamly2D. if not, see . - **************************************************************************/ - - -/************************************************************************ - ** - ** @file dialogeditlabel.cpp - ** @author Roman Telezhynskyi - ** @date 11 8, 2017 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2017 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ +//--------------------------------------------------------------------------------------------------------------------- +// @file editlabeltemplate_dialog.cpp +// @author Douglas S Caskey +// @date 17 Sep, 2023 +// +// @copyright +// Copyright (C) 2017 - 2022 Seamly, LLC +// https://github.com/fashionfreedom/seamly2d +// +// @brief +// Seamly2D 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 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 Seamly2D. if not, see . +//--------------------------------------------------------------------------------------------------------------------- + +//--------------------------------------------------------------------------------------------------------------------- +// @file dialogeditlabel.cpp +// @author Roman Telezhynskyi +// @date 11 8, 2017 +// +// @brief +// @copyright +// This source code is part of the Valentina project, a pattern making +// program, whose allow create and modeling patterns of clothing. +// Copyright (C) 2017 Valentina project +// All Rights Reserved. +// +// Valentina 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 3 of the License, or +// (at your option) any later version. +// +// Valentina 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 Valentina. If not, see . +//--------------------------------------------------------------------------------------------------------------------- #include "editlabeltemplate_dialog.h" #include "ui_editlabeltemplate_dialog.h" diff --git a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.h b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.h index 144704c14824..88616c1e8889 100644 --- a/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.h +++ b/src/libs/vtools/dialogs/support/editlabeltemplate_dialog.h @@ -1,55 +1,54 @@ -/*************************************************************************** - ** @file editlabeltemplate_dialog.h - ** @author Douglas S Caskey - ** @date Dec 26, 2022 - ** - ** @copyright - ** Copyright (C) 2017 - 2022 Seamly, LLC - ** https://github.com/fashionfreedom/seamly2d - ** - ** @brief - ** Seamly2D 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 3 of the License, or - ** (at your option) any later version. - ** - ** Seamly2D 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 Seamly2D. if not, see . - **************************************************************************/ - - -/************************************************************************ - ** - ** @file dialogeditlabel.h - ** @author Roman Telezhynskyi - ** @date 11 8, 2017 - ** - ** @brief - ** @copyright - ** This source code is part of the Valentina project, a pattern making - ** program, whose allow create and modeling patterns of clothing. - ** Copyright (C) 2017 Valentina project - ** All Rights Reserved. - ** - ** Valentina 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 3 of the License, or - ** (at your option) any later version. - ** - ** Valentina 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 Valentina. If not, see . - ** - *************************************************************************/ +//--------------------------------------------------------------------------------------------------------------------- +// @file editlabeltemplate_dialog.h +// @author Douglas S Caskey +// @date 17 Sep, 2023 +// +// @copyright +// Copyright (C) 2017 - 2022 Seamly, LLC +// https://github.com/fashionfreedom/seamly2d +// +// @brief +// Seamly2D 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 3 of the License, or +// (at your option) any later version. +// +// Seamly2D 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 Seamly2D. if not, see . +//--------------------------------------------------------------------------------------------------------------------- + + +//--------------------------------------------------------------------------------------------------------------------- +// @file dialogeditlabel.h +// @author Roman Telezhynskyi +// @date 11 8, 2017 +// +// @brief +// @copyright +// This source code is part of the Valentina project, a pattern making +// program, whose allow create and modeling patterns of clothing. +// Copyright (C) 2017 Valentina project +// All Rights Reserved. +// +// Valentina 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 3 of the License, or +// (at your option) any later version. +// +// Valentina 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 Valentina. If not, see . +//--------------------------------------------------------------------------------------------------------------------- + #ifndef EDITLABELTEMPLATE_DIALOG_H #define EDITLABELTEMPLATE_DIALOG_H