diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index 11078857d..c087bf8a2 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -36,6 +36,7 @@ #include "../xml/vpattern.h" #include "../vpatterndb/vcontainer.h" #include "../core/vapplication.h" +#include "../vtools/dialogs/support/dialogeditlabel.h" // calc how many combinations we have static const int heightsCount = (static_cast(GHeights::H200) - @@ -201,6 +202,7 @@ DialogPatternProperties::DialogPatternProperties(const QString &filePath, VPatte connect(ui->lineEditSize, &QLineEdit::editingFinished, this, &DialogPatternProperties::GeneralInfoChanged); connect(ui->checkBoxShowDate, &QCheckBox::stateChanged, this, &DialogPatternProperties::GeneralInfoChanged); connect(ui->checkBoxShowMeasurements, &QCheckBox::stateChanged, this, &DialogPatternProperties::GeneralInfoChanged); + connect(ui->pushButtonEditPatternLabel, &QPushButton::clicked, this, &DialogPatternProperties::EditLabel); } //--------------------------------------------------------------------------------------------------------------------- @@ -849,3 +851,10 @@ void DialogPatternProperties::SaveImage() } } } + +//--------------------------------------------------------------------------------------------------------------------- +void DialogPatternProperties::EditLabel() +{ + DialogEditLabel editor; + editor.exec(); +} diff --git a/src/app/valentina/dialogs/dialogpatternproperties.h b/src/app/valentina/dialogs/dialogpatternproperties.h index ecdfae10d..21b186455 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.h +++ b/src/app/valentina/dialogs/dialogpatternproperties.h @@ -62,6 +62,7 @@ private slots: void DescEdited(); void ChangeImage(); void SaveImage(); + void EditLabel(); private: Q_DISABLE_COPY(DialogPatternProperties) Ui::DialogPatternProperties *ui; diff --git a/src/app/valentina/dialogs/dialogpatternproperties.ui b/src/app/valentina/dialogs/dialogpatternproperties.ui index 93b8fa22f..bbb31adcb 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.ui +++ b/src/app/valentina/dialogs/dialogpatternproperties.ui @@ -14,14 +14,14 @@ Pattern properties - + :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png - 0 + 3 @@ -1213,7 +1213,7 @@ - Label: + Label template: @@ -1223,7 +1223,7 @@ Edit pattern label - Edit label + Edit template @@ -1360,7 +1360,9 @@ - + + + buttonBox diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.h b/src/libs/vtools/dialogs/support/dialogeditlabel.h index 27222cd3b..c046e931f 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.h +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.h @@ -3,8 +3,9 @@ #include -namespace Ui { -class DialogEditLabel; +namespace Ui +{ + class DialogEditLabel; } class DialogEditLabel : public QDialog @@ -12,10 +13,11 @@ class DialogEditLabel : public QDialog Q_OBJECT public: - explicit DialogEditLabel(QWidget *parent = 0); - ~DialogEditLabel(); + explicit DialogEditLabel(QWidget *parent = nullptr); + virtual ~DialogEditLabel(); private: + Q_DISABLE_COPY(DialogEditLabel) Ui::DialogEditLabel *ui; }; diff --git a/src/libs/vtools/dialogs/support/dialogeditlabel.ui b/src/libs/vtools/dialogs/support/dialogeditlabel.ui index f03651427..f39f918d1 100644 --- a/src/libs/vtools/dialogs/support/dialogeditlabel.ui +++ b/src/libs/vtools/dialogs/support/dialogeditlabel.ui @@ -2,6 +2,9 @@ DialogEditLabel + + Qt::ApplicationModal + 0 @@ -11,7 +14,14 @@ - Dialog + Edit label template + + + + :/icon/64x64/icon64x64.png:/icon/64x64/icon64x64.png + + + true @@ -314,7 +324,9 @@ - + + + buttonBox