diff --git a/share/resources/icon.qrc b/share/resources/icon.qrc index 504b28697..64d48ee8e 100644 --- a/share/resources/icon.qrc +++ b/share/resources/icon.qrc @@ -50,5 +50,7 @@ icon/flags/he_IL.png icon/flags/ru.png icon/flags/uk.png + icon/Graduation.png + icon/individual.png diff --git a/share/resources/icon/Graduation.png b/share/resources/icon/Graduation.png new file mode 100644 index 000000000..461bc95d1 Binary files /dev/null and b/share/resources/icon/Graduation.png differ diff --git a/share/resources/icon/individual.png b/share/resources/icon/individual.png new file mode 100644 index 000000000..9081d75c2 Binary files /dev/null and b/share/resources/icon/individual.png differ diff --git a/src/dialogs/dialogmeasurements.cpp b/src/dialogs/dialogmeasurements.cpp new file mode 100644 index 000000000..55e2e954b --- /dev/null +++ b/src/dialogs/dialogmeasurements.cpp @@ -0,0 +1,60 @@ +/************************************************************************ + ** + ** @file dialogpatterntype.cpp + ** @author Roman Telezhinsky + ** @date 21 2, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 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 "dialogmeasurements.h" +#include "ui_dialogmeasurements.h" + +DialogMeasurements::DialogMeasurements(QWidget *parent) : + QDialog(parent), ui(new Ui::DialogMeasurements), result(Measurements::Individual) +{ + ui->setupUi(this); + connect(ui->toolButtonStandard, &QToolButton::clicked, this, &DialogMeasurements::StandardMeasurements); + connect(ui->toolButtonIndividual, &QToolButton::clicked, this, &DialogMeasurements::IndividualMeasurements); +} + +DialogMeasurements::~DialogMeasurements() +{ + delete ui; +} + +Measurements::Type DialogMeasurements::type() const +{ + return result; +} + +void DialogMeasurements::StandardMeasurements() +{ + result = Measurements::Standard; + accept(); +} + +void DialogMeasurements::IndividualMeasurements() +{ + result = Measurements::Individual; + accept(); +} diff --git a/src/dialogs/dialogmeasurements.h b/src/dialogs/dialogmeasurements.h new file mode 100644 index 000000000..73945dda9 --- /dev/null +++ b/src/dialogs/dialogmeasurements.h @@ -0,0 +1,63 @@ +/************************************************************************ + ** + ** @file dialogpatterntype.h + ** @author Roman Telezhinsky + ** @date 21 2, 2014 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentine project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2013 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 DIALOGMEASUREMENTS_H +#define DIALOGMEASUREMENTS_H + +#include + +namespace Ui { +class DialogMeasurements; +} + +namespace Measurements +{ + /** + * @brief The Type enum pattern measurements. + */ + enum Type { Standard, Individual }; + Q_DECLARE_FLAGS(Types, Type) +} +Q_DECLARE_OPERATORS_FOR_FLAGS( Measurements::Types ) + +class DialogMeasurements : public QDialog +{ + Q_OBJECT +public: + explicit DialogMeasurements(QWidget *parent = 0); + ~DialogMeasurements(); + Measurements::Type type() const; +private: + Q_DISABLE_COPY(DialogMeasurements) + Ui::DialogMeasurements *ui; + Measurements::Type result; + void StandardMeasurements(); + void IndividualMeasurements(); +}; + +#endif // DIALOGMEASUREMENTS_H diff --git a/src/dialogs/dialogmeasurements.ui b/src/dialogs/dialogmeasurements.ui new file mode 100644 index 000000000..bf5a53bab --- /dev/null +++ b/src/dialogs/dialogmeasurements.ui @@ -0,0 +1,135 @@ + + + DialogMeasurements + + + + 0 + 0 + 385 + 244 + + + + Measurements + + + + + + + 0 + 0 + + + + <html><head/><body><p><span style=" font-size:18pt;">Please, choose pattern type.</span></p></body></html> + + + Qt::AlignCenter + + + + + + + 13 + + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Graduation + + + + :/icon/Graduation.png:/icon/Graduation.png + + + + 160 + 120 + + + + + + + + Use for creation pattern standard measurement table + + + true + + + + + + + + + 6 + + + 5 + + + 5 + + + 5 + + + 5 + + + + + Individual + + + + :/icon/individual.png:/icon/individual.png + + + + 160 + 120 + + + + + + + + Use for creation pattern individual measurements + + + true + + + + + + + + + + + + + + diff --git a/src/dialogs/dialogs.pri b/src/dialogs/dialogs.pri index 8796a0c47..58829f139 100644 --- a/src/dialogs/dialogs.pri +++ b/src/dialogs/dialogs.pri @@ -25,7 +25,8 @@ HEADERS += \ src/dialogs/dialogcutarc.h \ src/dialogs/configdialog.h \ src/dialogs/pages.h \ - src/dialogs/dialogpatternproperties.h + src/dialogs/dialogpatternproperties.h \ + src/dialogs/dialogmeasurements.h SOURCES += \ src/dialogs/dialogtriangle.cpp \ @@ -53,7 +54,8 @@ SOURCES += \ src/dialogs/dialogcutarc.cpp \ src/dialogs/configdialog.cpp \ src/dialogs/pages.cpp \ - src/dialogs/dialogpatternproperties.cpp + src/dialogs/dialogpatternproperties.cpp \ + src/dialogs/dialogmeasurements.cpp FORMS += \ src/dialogs/dialogtriangle.ui \ @@ -78,4 +80,5 @@ FORMS += \ src/dialogs/dialogcutsplinepath.ui \ src/dialogs/dialoguniondetails.ui \ src/dialogs/dialogcutarc.ui \ - src/dialogs/dialogpatternproperties.ui + src/dialogs/dialogpatternproperties.ui \ + src/dialogs/dialogmeasurements.ui