From 2885d95a43ce61276985b63cd2cf38a44d0f8d41 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Wed, 30 Aug 2017 07:26:18 +0300 Subject: [PATCH] Added dialog Pattern materials. --HG-- branch : feature --- .../configpages/preferencespatternpage.cpp | 39 +++- .../configpages/preferencespatternpage.h | 2 + .../configpages/preferencespatternpage.ui | 64 +++++- .../dialogs/dialogpatternmaterials.cpp | 196 ++++++++++++++++++ .../dialogs/dialogpatternmaterials.h | 61 ++++++ .../dialogs/dialogpatternmaterials.ui | 105 ++++++++++ .../dialogs/dialogpatternproperties.cpp | 18 +- .../dialogs/dialogpatternproperties.h | 1 - .../dialogs/dialogpatternproperties.ui | 21 +- src/app/valentina/dialogs/dialogs.pri | 9 +- src/libs/vmisc/def.cpp | 2 + src/libs/vmisc/def.h | 1 + src/libs/vmisc/vsettings.cpp | 17 +- src/libs/vmisc/vsettings.h | 3 + src/libs/vpatterndb/vtranslatevars.cpp | 1 + 15 files changed, 496 insertions(+), 44 deletions(-) create mode 100644 src/app/valentina/dialogs/dialogpatternmaterials.cpp create mode 100644 src/app/valentina/dialogs/dialogpatternmaterials.h create mode 100644 src/app/valentina/dialogs/dialogpatternmaterials.ui diff --git a/src/app/valentina/dialogs/configpages/preferencespatternpage.cpp b/src/app/valentina/dialogs/configpages/preferencespatternpage.cpp index fcfc633cc..745c9e7c6 100644 --- a/src/app/valentina/dialogs/configpages/preferencespatternpage.cpp +++ b/src/app/valentina/dialogs/configpages/preferencespatternpage.cpp @@ -31,6 +31,7 @@ #include "../../core/vapplication.h" #include "../ifc/xml/vabstractpattern.h" #include "../dialogdatetimeformats.h" +#include "../dialogknownmaterials.h" #include #include @@ -55,19 +56,28 @@ QStringList ComboBoxAllStrings(QComboBox *combo) //--------------------------------------------------------------------------------------------------------------------- PreferencesPatternPage::PreferencesPatternPage(QWidget *parent) : QWidget(parent), - ui(new Ui::PreferencesPatternPage) + ui(new Ui::PreferencesPatternPage), + m_knownMaterials() { ui->setupUi(this); - ui->graphOutputCheck->setChecked(qApp->ValentinaSettings()->GetGraphicalOutput()); - ui->undoCount->setValue(qApp->ValentinaSettings()->GetUndoCount()); + + VSettings *settings = qApp->ValentinaSettings(); + + ui->graphOutputCheck->setChecked(settings->GetGraphicalOutput()); + ui->undoCount->setValue(settings->GetUndoCount()); InitDefaultSeamAllowance(); InitLabelDateTimeFormats(); - ui->forbidFlippingCheck->setChecked(qApp->ValentinaSettings()->GetForbidWorkpieceFlipping()); - ui->doublePassmarkCheck->setChecked(qApp->ValentinaSettings()->IsDoublePassmark()); - ui->checkBoxHideMainPath->setChecked(qApp->ValentinaSettings()->IsHideMainPath()); - ui->fontComboBoxLabelFont->setCurrentFont(qApp->ValentinaSettings()->GetLabelFont()); + ui->forbidFlippingCheck->setChecked(settings->GetForbidWorkpieceFlipping()); + ui->doublePassmarkCheck->setChecked(settings->IsDoublePassmark()); + ui->checkBoxHideMainPath->setChecked(settings->IsHideMainPath()); + ui->fontComboBoxLabelFont->setCurrentFont(settings->GetLabelFont()); + + ui->checkBoxRemeberPatternMaterials->setChecked(settings->IsRememberPatternMaterials()); + m_knownMaterials = settings->GetKnownMaterials(); + + connect(ui->pushButtonKnownMaterials, &QPushButton::clicked, this, &PreferencesPatternPage::ManageKnownMaterials); } //--------------------------------------------------------------------------------------------------------------------- @@ -108,6 +118,9 @@ void PreferencesPatternPage::Apply() settings->SetUserDefinedDateFormats(ComboBoxAllStrings(ui->comboBoxDateFormats)); settings->SetUserDefinedTimeFormats(ComboBoxAllStrings(ui->comboBoxTimeFormats)); + + settings->SetKnownMaterials(m_knownMaterials); + settings->SetRememberPatternMaterials(ui->checkBoxRemeberPatternMaterials->isChecked()); } //--------------------------------------------------------------------------------------------------------------------- @@ -135,6 +148,18 @@ void PreferencesPatternPage::EditDateTimeFormats() } } +//--------------------------------------------------------------------------------------------------------------------- +void PreferencesPatternPage::ManageKnownMaterials() +{ + DialogKnownMaterials editor; + editor.SetList(m_knownMaterials); + + if (QDialog::Accepted == editor.exec()) + { + m_knownMaterials = editor.GetList(); + } +} + //--------------------------------------------------------------------------------------------------------------------- void PreferencesPatternPage::InitLabelDateTimeFormats() { diff --git a/src/app/valentina/dialogs/configpages/preferencespatternpage.h b/src/app/valentina/dialogs/configpages/preferencespatternpage.h index c13ec1baa..6fd263b27 100644 --- a/src/app/valentina/dialogs/configpages/preferencespatternpage.h +++ b/src/app/valentina/dialogs/configpages/preferencespatternpage.h @@ -51,10 +51,12 @@ public: private slots: void EditDateTimeFormats(); + void ManageKnownMaterials(); private: Q_DISABLE_COPY(PreferencesPatternPage) Ui::PreferencesPatternPage *ui; + QStringList m_knownMaterials; void InitLabelDateTimeFormats(); void InitComboBoxFormats(QComboBox *box, const QStringList &items, const QString ¤tFormat); diff --git a/src/app/valentina/dialogs/configpages/preferencespatternpage.ui b/src/app/valentina/dialogs/configpages/preferencespatternpage.ui index 957a4ce9e..b106abc43 100644 --- a/src/app/valentina/dialogs/configpages/preferencespatternpage.ui +++ b/src/app/valentina/dialogs/configpages/preferencespatternpage.ui @@ -13,7 +13,7 @@ Pattern - + @@ -191,6 +191,68 @@ + + + + Materials + + + + + + + + Known materials: + + + + + + + + 0 + 0 + + + + Manage list of known materials + + + Manage + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + When manage pattern materials save them to known materials list + + + Remeber pattern materials + + + true + + + + + + diff --git a/src/app/valentina/dialogs/dialogpatternmaterials.cpp b/src/app/valentina/dialogs/dialogpatternmaterials.cpp new file mode 100644 index 000000000..e8e766128 --- /dev/null +++ b/src/app/valentina/dialogs/dialogpatternmaterials.cpp @@ -0,0 +1,196 @@ +/************************************************************************ + ** + ** @file dialogpatternmaterials.cpp + ** @author Roman Telezhynskyi + ** @date 28 8, 2017 + ** + ** @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) 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 "dialogpatternmaterials.h" +#include "ui_dialogpatternmaterials.h" + +#include "../vmisc/def.h" +#include "../core/vapplication.h" + +#include +#include + +namespace +{ +//--------------------------------------------------------------------------------------------------------------------- +QStringList PrepareKnowMaterials(const QStringList &patternMaterials, bool rememberPM) +{ + QStringList knownMaterials = qApp->ValentinaSettings()->GetKnownMaterials(); + + if (rememberPM) + { + for(int i=0; i < patternMaterials.size(); ++i) + { + if (not patternMaterials.at(i).isEmpty() && not knownMaterials.contains(patternMaterials.at(i))) + { + knownMaterials.append(patternMaterials.at(i)); + } + } + } + return knownMaterials; +} +} + +class VComboBoxDelegate : public QItemDelegate +{ +public: + VComboBoxDelegate(const QStringList &items, QObject *parent = nullptr) + : QItemDelegate(parent), + m_items(items) + { + m_items.prepend(QLatin1String("--") + tr("Select material") + QLatin1String("--")); + } + + virtual QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, + const QModelIndex &index) const Q_DECL_OVERRIDE + { + Q_UNUSED(option) + Q_UNUSED(index) + + QComboBox *editor = new QComboBox(parent); + editor->addItems(m_items); + + return editor; + } + + virtual void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE + { + const QString value = index.model()->data(index, Qt::EditRole).toString(); + + QComboBox *comboBox = static_cast(editor); + const int cIndex = comboBox->findText(value); + + if (cIndex != -1) + { + comboBox->setCurrentIndex(cIndex); + } + } + + virtual void setModelData(QWidget *editor, QAbstractItemModel *model, + const QModelIndex &index) const Q_DECL_OVERRIDE + { + QComboBox *comboBox = static_cast(editor); + QString value; + const int cIndex = comboBox->currentIndex(); + + if (cIndex > 0) + { + value = comboBox->currentText(); + } + + model->setData(index, value, Qt::EditRole); + } + + virtual void updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem &option, + const QModelIndex &index) const Q_DECL_OVERRIDE + { + Q_UNUSED(index) + editor->setGeometry(option.rect); + } +private: + Q_DISABLE_COPY(VComboBoxDelegate) + QStringList m_items; +}; + +//--------------------------------------------------------------------------------------------------------------------- +DialogPatternMaterials::DialogPatternMaterials(const QMap &list, bool rememberPM, QWidget *parent) + : QDialog(parent), + ui(new Ui::DialogPatternMaterials), + m_knownMaterials() +{ + ui->setupUi(this); + + m_knownMaterials = PrepareKnowMaterials(list.values(), rememberPM); + SetPatternMaterials(list); + + ui->tableWidget->setItemDelegateForColumn(1, new VComboBoxDelegate(m_knownMaterials, this)); +} + +//--------------------------------------------------------------------------------------------------------------------- +DialogPatternMaterials::~DialogPatternMaterials() +{ + delete ui; +} + +//--------------------------------------------------------------------------------------------------------------------- +void DialogPatternMaterials::SetPatternMaterials(const QMap &list) +{ + ui->tableWidget->setRowCount(9); + QLatin1String per("%"); + + for (int i = 0; i < 9; ++i) + { + QTableWidgetItem *item = new QTableWidgetItem(per + qApp->TrVars()->PlaceholderToUser(pl_userMaterial) + + QString::number(i + 1) + per); + item->setFlags(item->flags() ^ Qt::ItemIsEditable); + item->setTextAlignment(Qt::AlignLeft); + + QFont font = item->font(); + font.setBold(true); + item->setFont(font); + + ui->tableWidget->setItem(i, 0, item); + + QString value; + if (list.contains(i + 1)) + { + value = list.value(i + 1); + } + + item = new QTableWidgetItem(value); + item->setTextAlignment(Qt::AlignHCenter); + ui->tableWidget->setItem(i, 1, item); + } + + ui->tableWidget->resizeColumnsToContents(); + ui->tableWidget->resizeRowsToContents(); + ui->tableWidget->verticalHeader()->setDefaultSectionSize(20); +} + +//--------------------------------------------------------------------------------------------------------------------- +QMap DialogPatternMaterials::GetPatternMaterials() const +{ + QMap materials; + + for (int i = 0; i < ui->tableWidget->rowCount(); ++i) + { + const QTableWidgetItem *item = ui->tableWidget->item(i, 1); + if (not item->text().isEmpty()) + { + materials.insert(i + 1, item->text()); + } + } + + return materials; +} + +//--------------------------------------------------------------------------------------------------------------------- +QStringList DialogPatternMaterials::GetKnownMaterials() const +{ + return m_knownMaterials; +} diff --git a/src/app/valentina/dialogs/dialogpatternmaterials.h b/src/app/valentina/dialogs/dialogpatternmaterials.h new file mode 100644 index 000000000..9fb814542 --- /dev/null +++ b/src/app/valentina/dialogs/dialogpatternmaterials.h @@ -0,0 +1,61 @@ +/************************************************************************ + ** + ** @file dialogpatternmaterials.h + ** @author Roman Telezhynskyi + ** @date 28 8, 2017 + ** + ** @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) 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 DIALOGPATTERNMATERIALS_H +#define DIALOGPATTERNMATERIALS_H + +#include + +namespace Ui +{ + class DialogPatternMaterials; +} + +class VComboBoxDelegate; + +class DialogPatternMaterials : public QDialog +{ + Q_OBJECT + +public: + explicit DialogPatternMaterials(const QMap &list, bool rememberPM, QWidget *parent = nullptr); + virtual ~DialogPatternMaterials(); + + + QMap GetPatternMaterials() const; + QStringList GetKnownMaterials() const; + +private: + Q_DISABLE_COPY(DialogPatternMaterials) + Ui::DialogPatternMaterials *ui; + QStringList m_knownMaterials; + + void SetPatternMaterials(const QMap &list); +}; + +#endif // DIALOGPATTERNMATERIALS_H diff --git a/src/app/valentina/dialogs/dialogpatternmaterials.ui b/src/app/valentina/dialogs/dialogpatternmaterials.ui new file mode 100644 index 000000000..d52eee2d7 --- /dev/null +++ b/src/app/valentina/dialogs/dialogpatternmaterials.ui @@ -0,0 +1,105 @@ + + + DialogPatternMaterials + + + + 0 + 0 + 419 + 472 + + + + Dialog + + + + + + QAbstractItemView::AllEditTriggers + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + false + + + Qt::NoPen + + + true + + + true + + + false + + + + Placeholder + + + + + Value + + + + + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + + + + buttonBox + accepted() + DialogPatternMaterials + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + DialogPatternMaterials + reject() + + + 316 + 260 + + + 286 + 274 + + + + + diff --git a/src/app/valentina/dialogs/dialogpatternproperties.cpp b/src/app/valentina/dialogs/dialogpatternproperties.cpp index d0e10e8ca..716059d51 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.cpp +++ b/src/app/valentina/dialogs/dialogpatternproperties.cpp @@ -40,6 +40,7 @@ #include "../core/vapplication.h" #include "../vtools/dialogs/support/dialogeditlabel.h" #include "dialogknownmaterials.h" +#include "dialogpatternmaterials.h" // calc how many combinations we have static const int heightsCount = (static_cast(GHeights::H200) - @@ -182,7 +183,6 @@ DialogPatternProperties::DialogPatternProperties(VPattern *doc, VContainer *pat connect(ui->lineEditCompanyName, &QLineEdit::editingFinished, this, &DialogPatternProperties::LabelDataChanged); connect(ui->lineEditCustomerName, &QLineEdit::editingFinished, this, &DialogPatternProperties::LabelDataChanged); connect(ui->pushButtonEditPatternLabel, &QPushButton::clicked, this, &DialogPatternProperties::EditLabel); - connect(ui->pushButtonKnownMaterials, &QPushButton::clicked, this, &DialogPatternProperties::ManageKnownMaterials); connect(ui->pushButtonPatternMaterials, &QPushButton::clicked, this, &DialogPatternProperties::ManagePatternMaterials); @@ -906,21 +906,17 @@ void DialogPatternProperties::EditLabel() } //--------------------------------------------------------------------------------------------------------------------- -void DialogPatternProperties::ManageKnownMaterials() +void DialogPatternProperties::ManagePatternMaterials() { VSettings *settings = qApp->ValentinaSettings(); - DialogKnownMaterials editor; - editor.SetList(settings->GetKnownMaterials()); + DialogPatternMaterials editor(QMap(), settings->IsRememberPatternMaterials()); if (QDialog::Accepted == editor.exec()) { - settings->SetKnownMaterials(editor.GetList()); + if (settings->IsRememberPatternMaterials()) + { + settings->SetKnownMaterials(editor.GetKnownMaterials()); + } } } - -//--------------------------------------------------------------------------------------------------------------------- -void DialogPatternProperties::ManagePatternMaterials() -{ - -} diff --git a/src/app/valentina/dialogs/dialogpatternproperties.h b/src/app/valentina/dialogs/dialogpatternproperties.h index 3fdfeffd2..fc2c4cdfb 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.h +++ b/src/app/valentina/dialogs/dialogpatternproperties.h @@ -62,7 +62,6 @@ private slots: void ChangeImage(); void SaveImage(); void EditLabel(); - void ManageKnownMaterials(); void ManagePatternMaterials(); private: Q_DISABLE_COPY(DialogPatternProperties) diff --git a/src/app/valentina/dialogs/dialogpatternproperties.ui b/src/app/valentina/dialogs/dialogpatternproperties.ui index 2ced74b87..ce48451ae 100644 --- a/src/app/valentina/dialogs/dialogpatternproperties.ui +++ b/src/app/valentina/dialogs/dialogpatternproperties.ui @@ -1332,30 +1332,13 @@ QFormLayout::ExpandingFieldsGrow - - - Known materials: - - - - - - - Manage list of known materials - - - Manage - - - - Pattern materials: - + Manage list of pattern materials @@ -1376,7 +1359,7 @@ 20 - 40 + 90 diff --git a/src/app/valentina/dialogs/dialogs.pri b/src/app/valentina/dialogs/dialogs.pri index 601d138d7..7962f91dc 100644 --- a/src/app/valentina/dialogs/dialogs.pri +++ b/src/app/valentina/dialogs/dialogs.pri @@ -18,7 +18,8 @@ HEADERS += \ $$PWD/configpages/preferencespatternpage.h \ $$PWD/configpages/preferencespathpage.h \ $$PWD/dialogdatetimeformats.h \ - $$PWD/dialogknownmaterials.h + $$PWD/dialogknownmaterials.h \ + $$PWD/dialogpatternmaterials.h SOURCES += \ $$PWD/dialogincrements.cpp \ @@ -36,7 +37,8 @@ SOURCES += \ $$PWD/configpages/preferencespatternpage.cpp \ $$PWD/configpages/preferencespathpage.cpp \ $$PWD/dialogdatetimeformats.cpp \ - $$PWD/dialogknownmaterials.cpp + $$PWD/dialogknownmaterials.cpp \ + $$PWD/dialogpatternmaterials.cpp FORMS += \ $$PWD/dialogincrements.ui \ @@ -54,4 +56,5 @@ FORMS += \ $$PWD/configpages/preferencespatternpage.ui \ $$PWD/configpages/preferencespathpage.ui \ $$PWD/dialogdatetimeformats.ui \ - $$PWD/dialogknownmaterials.ui + $$PWD/dialogknownmaterials.ui \ + $$PWD/dialogpatternmaterials.ui diff --git a/src/libs/vmisc/def.cpp b/src/libs/vmisc/def.cpp index e8f06e69e..da4838b46 100644 --- a/src/libs/vmisc/def.cpp +++ b/src/libs/vmisc/def.cpp @@ -117,6 +117,7 @@ const QString pl_patternName = QStringLiteral("patternName"); const QString pl_patternNumber = QStringLiteral("patternNumber"); const QString pl_author = QStringLiteral("author"); const QString pl_customer = QStringLiteral("customer"); +const QString pl_userMaterial = QStringLiteral("userMaterial"); const QString pl_pExt = QStringLiteral("pExt"); const QString pl_pFileName = QStringLiteral("pFileName"); const QString pl_mFileName = QStringLiteral("mFileName"); @@ -144,6 +145,7 @@ const QStringList labelTemplatePlaceholders = QStringList() << pl_size << pl_patternNumber << pl_author << pl_customer + << pl_userMaterial << pl_pExt << pl_pFileName << pl_mFileName diff --git a/src/libs/vmisc/def.h b/src/libs/vmisc/def.h index e39b6dcca..caf6969f2 100644 --- a/src/libs/vmisc/def.h +++ b/src/libs/vmisc/def.h @@ -359,6 +359,7 @@ extern const QString pl_patternName; extern const QString pl_patternNumber; extern const QString pl_author; extern const QString pl_customer; +extern const QString pl_userMaterial; extern const QString pl_pExt; extern const QString pl_pFileName; extern const QString pl_mFileName; diff --git a/src/libs/vmisc/vsettings.cpp b/src/libs/vmisc/vsettings.cpp index 7a87f840a..131f8e097 100644 --- a/src/libs/vmisc/vsettings.cpp +++ b/src/libs/vmisc/vsettings.cpp @@ -51,8 +51,9 @@ const QString settingConfigurationLabelLanguage = QStringLiteral("configuration/ const QString settingPathsPattern = QStringLiteral("paths/pattern"); const QString settingPathsLayout = QStringLiteral("paths/layout"); -const QString settingPatternGraphicalOutput = QStringLiteral("pattern/graphicalOutput"); -const QString settingPatternKnownMaterials = QStringLiteral("pattern/knownMaterials"); +const QString settingPatternGraphicalOutput = QStringLiteral("pattern/graphicalOutput"); +const QString settingPatternKnownMaterials = QStringLiteral("pattern/knownMaterials"); +const QString settingPatternRememberMaterials = QStringLiteral("pattern/rememberMaterials"); const QString settingCommunityServer = QStringLiteral("community/server"); const QString settingCommunityServerSecure = QStringLiteral("community/serverSecure"); @@ -618,3 +619,15 @@ void VSettings::SetKnownMaterials(const QStringList &list) { setValue(settingPatternKnownMaterials, list); } + +//--------------------------------------------------------------------------------------------------------------------- +bool VSettings::IsRememberPatternMaterials() const +{ + return value(settingPatternRememberMaterials, true).toBool(); +} + +//--------------------------------------------------------------------------------------------------------------------- +void VSettings::SetRememberPatternMaterials(bool value) +{ + setValue(settingPatternRememberMaterials, value); +} diff --git a/src/libs/vmisc/vsettings.h b/src/libs/vmisc/vsettings.h index 7c0bae8da..1c7530ab0 100644 --- a/src/libs/vmisc/vsettings.h +++ b/src/libs/vmisc/vsettings.h @@ -158,6 +158,9 @@ public: QStringList GetKnownMaterials() const; void SetKnownMaterials(const QStringList &list); + bool IsRememberPatternMaterials() const; + void SetRememberPatternMaterials(bool value); + private: Q_DISABLE_COPY(VSettings) }; diff --git a/src/libs/vpatterndb/vtranslatevars.cpp b/src/libs/vpatterndb/vtranslatevars.cpp index a672e7e18..ba9bf0814 100644 --- a/src/libs/vpatterndb/vtranslatevars.cpp +++ b/src/libs/vpatterndb/vtranslatevars.cpp @@ -465,6 +465,7 @@ void VTranslateVars::InitPlaceholder() placeholders.insert(pl_patternNumber, translate("VTranslateVars", "patternNumber", "placeholder")); placeholders.insert(pl_author, translate("VTranslateVars", "author", "placeholder")); placeholders.insert(pl_customer, translate("VTranslateVars", "customer", "placeholder")); + placeholders.insert(pl_userMaterial, translate("VTranslateVars", "userMaterial", "placeholder")); placeholders.insert(pl_pExt, translate("VTranslateVars", "pExt", "placeholder")); placeholders.insert(pl_pFileName, translate("VTranslateVars", "pFileName", "placeholder")); placeholders.insert(pl_mFileName, translate("VTranslateVars", "mFileName", "placeholder"));