diff --git a/sources/SearchAndReplace/searchandreplaceworker.cpp b/sources/SearchAndReplace/searchandreplaceworker.cpp index 166ac660a..cd0e36c13 100644 --- a/sources/SearchAndReplace/searchandreplaceworker.cpp +++ b/sources/SearchAndReplace/searchandreplaceworker.cpp @@ -57,7 +57,7 @@ void SearchAndReplaceWorker::replaceDiagram(QList diagram_list) } QUndoStack *us = project->undoStack(); - us->beginMacro(QObject::tr("Chercher/remplacer les propriétés de folio")); + us->beginMacro(QObject::tr("Chercher/remplacer les propriétés de folio")); for (Diagram *d : diagram_list) { TitleBlockProperties old_propertie = d->border_and_titleblock.exportTitleBlock(); @@ -87,12 +87,12 @@ void SearchAndReplaceWorker::replaceDiagram(QList diagram_list) new_properties.filename = m_titleblock_properties.filename; } } - if (!m_titleblock_properties.plant.isEmpty()) + if (!m_titleblock_properties.plant.isEmpty()) { - if (m_titleblock_properties.plant == eraseText()) { - new_properties.plant.clear(); + if (m_titleblock_properties.plant == eraseText()) { + new_properties.plant.clear(); } else { - new_properties.plant = m_titleblock_properties.plant; + new_properties.plant = m_titleblock_properties.plant; } } if (!m_titleblock_properties.locmach.isEmpty()) @@ -168,7 +168,7 @@ void SearchAndReplaceWorker::replaceElement(QList list) } } - project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer les propriétés d'éléments")); + project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer les propriétés d'éléments")); for (Element *elmt : list) { //We apply change only for master, slave, and terminal element. @@ -228,7 +228,7 @@ void SearchAndReplaceWorker::replaceIndiText(QList list) } } - project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer des textes independants")); + project_->undoStack()->beginMacro(QObject::tr("Chercher/remplacer des textes independants")); for (IndependentTextItem *text : list) { QString before = text->toPlainText(); diff --git a/sources/SearchAndReplace/ui/replaceelementdialog.cpp b/sources/SearchAndReplace/ui/replaceelementdialog.cpp index 2c6c4b43a..3a96aff2a 100644 --- a/sources/SearchAndReplace/ui/replaceelementdialog.cpp +++ b/sources/SearchAndReplace/ui/replaceelementdialog.cpp @@ -61,7 +61,7 @@ void ReplaceElementDialog::setContext(DiagramContext context) DiagramContext ReplaceElementDialog::context() const { DiagramContext context; - for (ElementInfoPartWidget *eipw : m_eipw_list) { + for (ElementInfoPartWidget *eipw : m_eipw_list) { context.addValue(eipw->key(), eipw->text()); } @@ -80,7 +80,7 @@ void ReplaceElementDialog::buildWidget() { ElementInfoPartWidget *eipw = new ElementInfoPartWidget(str, QETApp::elementTranslatedInfoKey(str), this); eipw->setEraseTextVisible(true); - eipw->setPlaceHolderText(tr("Ne pas modifier")); + eipw->setPlaceHolderText(tr("Ne pas modifier")); ui->m_scroll_layout->addWidget(eipw); m_eipw_list << eipw; } diff --git a/sources/SearchAndReplace/ui/replacefoliowidget.cpp b/sources/SearchAndReplace/ui/replacefoliowidget.cpp index 4e9156d43..32f440ba1 100644 --- a/sources/SearchAndReplace/ui/replacefoliowidget.cpp +++ b/sources/SearchAndReplace/ui/replacefoliowidget.cpp @@ -46,7 +46,7 @@ TitleBlockProperties ReplaceFolioWidget::titleBlockProperties() const prop.title = ui->m_title_le ->text(); prop.author = ui->m_author_le->text(); prop.filename = ui->m_file_le ->text(); - prop.plant = ui->m_plant ->text(); + prop.plant = ui->m_plant ->text(); prop.locmach = ui->m_loc ->text(); prop.indexrev = ui->m_indice ->text(); prop.folio = ui->m_folio_le ->text(); @@ -78,7 +78,7 @@ void ReplaceFolioWidget::setTitleBlockProperties(const TitleBlockProperties &pro ui->m_title_le ->setText (properties.title); ui->m_author_le->setText (properties.author); ui->m_file_le ->setText (properties.filename); - ui->m_plant ->setText (properties.plant); + ui->m_plant ->setText (properties.plant); ui->m_loc ->setText (properties.locmach); ui->m_indice ->setText (properties.indexrev); ui->m_folio_le ->setText (properties.folio); @@ -148,31 +148,31 @@ void ReplaceFolioWidget::on_m_title_cb_clicked() { } 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->setDisabled(ui->m_plant_cb->isChecked()); + 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/replacefoliowidget.h b/sources/SearchAndReplace/ui/replacefoliowidget.h index 650690ce9..469ad54d0 100644 --- a/sources/SearchAndReplace/ui/replacefoliowidget.h +++ b/sources/SearchAndReplace/ui/replacefoliowidget.h @@ -47,7 +47,7 @@ class ReplaceFolioWidget : public QWidget void on_m_author_cb_clicked(); void on_m_file_cb_clicked(); void on_m_folio_cb_clicked(); - void on_m_plant_cb_clicked(); + void on_m_plant_cb_clicked(); void on_m_loc_cb_clicked(); void on_m_indice_cb_clicked(); diff --git a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp index 5d6269d1d..9eb5605bb 100644 --- a/sources/SearchAndReplace/ui/searchandreplacewidget.cpp +++ b/sources/SearchAndReplace/ui/searchandreplacewidget.cpp @@ -151,36 +151,36 @@ void SearchAndReplaceWidget::setUpTreeItems() m_elements_qtwi = new QTreeWidgetItem(m_root_qtwi); m_elements_qtwi->setIcon(0, QET::Icons::Element); - m_elements_qtwi->setText(0, tr("Eléments")); + m_elements_qtwi->setText(0, tr("Eléments")); m_elements_qtwi->setCheckState(0, Qt::Checked); m_category_qtwi.append(m_elements_qtwi); m_simple_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi); - m_simple_elmt_qtwi->setText(0, tr("Eléments simple")); + m_simple_elmt_qtwi->setText(0, tr("Eléments simple")); m_simple_elmt_qtwi->setIcon(0, QET::Icons::Element); m_simple_elmt_qtwi->setCheckState(0, Qt::Checked); m_qtwi_elmts.append(m_simple_elmt_qtwi); m_master_elmt_qtwi= new QTreeWidgetItem(m_elements_qtwi); - m_master_elmt_qtwi->setText(0, tr("Eléments maître")); + m_master_elmt_qtwi->setText(0, tr("Eléments maître")); m_master_elmt_qtwi->setIcon(0, QET::Icons::ElementMaster); m_master_elmt_qtwi->setCheckState(0, Qt::Checked); m_qtwi_elmts.append(m_master_elmt_qtwi); m_slave_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi); - m_slave_elmt_qtwi->setText(0, tr("Eléments esclave")); + m_slave_elmt_qtwi->setText(0, tr("Eléments esclave")); m_slave_elmt_qtwi->setIcon(0, QET::Icons::ElementSlave); m_slave_elmt_qtwi->setCheckState(0, Qt::Checked); m_qtwi_elmts.append(m_slave_elmt_qtwi); m_report_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi); - m_report_elmt_qtwi->setText(0, tr("Eléments report de folio")); + m_report_elmt_qtwi->setText(0, tr("Eléments report de folio")); m_report_elmt_qtwi->setIcon(0, QET::Icons::FolioXrefComing); m_report_elmt_qtwi->setCheckState(0, Qt::Checked); m_qtwi_elmts.append(m_report_elmt_qtwi); m_terminal_elmt_qtwi = new QTreeWidgetItem(m_elements_qtwi); - m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier")); + m_terminal_elmt_qtwi->setText(0, tr("Eléments bornier")); m_terminal_elmt_qtwi->setIcon(0, QET::Icons::ElementTerminal); m_terminal_elmt_qtwi->setCheckState(0, Qt::Checked); m_qtwi_elmts.append(m_terminal_elmt_qtwi); @@ -659,7 +659,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Diagram *diagram) const list.append(prop.title); list.append(prop.author); list.append(prop.filename); - list.append(prop.plant); + list.append(prop.plant); list.append(prop.locmach); list.append(prop.indexrev); list.append(prop.folio); @@ -692,7 +692,7 @@ QStringList SearchAndReplaceWidget::searchTerms(Element *element) const } void SearchAndReplaceWidget::on_m_quit_button_clicked() { - this->setHidden(true); + this->setHidden(true); } void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) { @@ -701,7 +701,7 @@ void SearchAndReplaceWidget::on_m_advanced_pb_toggled(bool checked) { void SearchAndReplaceWidget::on_m_tree_widget_itemDoubleClicked(QTreeWidgetItem *item, int column) { - Q_UNUSED(column); + Q_UNUSED(column); if (m_diagram_hash.keys().contains(item)) { @@ -856,8 +856,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked() if (result == QDialogButtonBox::AcceptRole) { QString text = ui->m_folio_pb->text(); - if (!text.endsWith(tr(" [édité]"))) { - text.append(tr(" [édité]")); + if (!text.endsWith(tr(" [édité]"))) { + text.append(tr(" [édité]")); } ui->m_folio_pb->setText(text); m_worker.m_titleblock_properties = dialog->titleBlockProperties(); @@ -865,8 +865,8 @@ void SearchAndReplaceWidget::on_m_folio_pb_clicked() else if (result == QDialogButtonBox::ResetRole) { QString text = ui->m_folio_pb->text(); - if (text.endsWith(tr(" [édité]"))) { - text.remove(tr(" [édité]")); + if (text.endsWith(tr(" [édité]"))) { + text.remove(tr(" [édité]")); } ui->m_folio_pb->setText(text); m_worker.m_titleblock_properties = TitleBlockProperties(); @@ -885,7 +885,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() } if (!m_category_qtwi.contains(qtwi) && qtwi->checkState(0) == Qt::Checked) { - if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) && + if (ui->m_folio_pb->text().endsWith(tr(" [édité]")) && m_diagram_hash.keys().contains(qtwi)) { QPointer d = m_diagram_hash.value(qtwi); @@ -893,7 +893,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() m_worker.replaceDiagram(d.data()); } } - else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) && + else if (ui->m_element_pb->text().endsWith(tr(" [édité]")) && m_element_hash.keys().contains(qtwi)) { QPointer e = m_element_hash.value(qtwi); @@ -923,7 +923,7 @@ void SearchAndReplaceWidget::on_m_replace_pb_clicked() void SearchAndReplaceWidget::on_m_replace_all_pb_clicked() { //Replace folio - if (ui->m_folio_pb->text().endsWith(tr(" [édité]"))) + if (ui->m_folio_pb->text().endsWith(tr(" [édité]"))) { QList diagram_list; for (QTreeWidgetItem *qtwi : m_diagram_hash.keys()) @@ -939,7 +939,7 @@ void SearchAndReplaceWidget::on_m_replace_all_pb_clicked() m_worker.replaceDiagram(diagram_list); } //Replace text - if (ui->m_element_pb->text().endsWith(tr(" [édité]"))) + if (ui->m_element_pb->text().endsWith(tr(" [édité]"))) { QList element_list; for (QTreeWidgetItem *qtwi : m_element_hash.keys()) @@ -989,8 +989,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked() if (result == QDialogButtonBox::AcceptRole) { QString text = ui->m_element_pb->text(); - if (!text.endsWith(tr(" [édité]"))) { - text.append(tr(" [édité]")); + if (!text.endsWith(tr(" [édité]"))) { + text.append(tr(" [édité]")); } ui->m_element_pb->setText(text); m_worker.m_element_context = dialog->context(); @@ -998,8 +998,8 @@ void SearchAndReplaceWidget::on_m_element_pb_clicked() else if (result == QDialogButtonBox::ResetRole) { QString text = ui->m_element_pb->text(); - if (text.endsWith(tr(" [édité]"))) { - text.remove(tr(" [édité]")); + if (text.endsWith(tr(" [édité]"))) { + text.remove(tr(" [édité]")); } ui->m_element_pb->setText(text); m_worker.m_element_context = DiagramContext(); @@ -1024,6 +1024,6 @@ void SearchAndReplaceWidget::on_m_mode_cb_currentIndexChanged(int index) */ void SearchAndReplaceWidget::on_m_case_sensitive_cb_stateChanged(int arg1) { - Q_UNUSED(arg1); + Q_UNUSED(arg1); search(); } diff --git a/sources/autoNum/assignvariables.cpp b/sources/autoNum/assignvariables.cpp index e8d22d337..755424a90 100644 --- a/sources/autoNum/assignvariables.cpp +++ b/sources/autoNum/assignvariables.cpp @@ -178,13 +178,13 @@ namespace autonum { QString str = formula; str.replace("%{label}", dc.value("label").toString()); - str.replace("%{plant}", dc.value("plant").toString()); + str.replace("%{plant}", dc.value("plant").toString()); str.replace("%{comment}", dc.value("comment").toString()); 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("%{supplier}", dc.value("supplier").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()); @@ -212,7 +212,7 @@ namespace autonum 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("%M", m_diagram -> border_and_titleblock.plant()); m_assigned_label.replace("%LM", m_diagram -> border_and_titleblock.locmach()); QSettings settings; @@ -426,7 +426,7 @@ namespace autonum else if (type == "folio") { formula.append("%F"); } - else if (type == "plant") { + else if (type == "plant") { formula.append("%M"); } else if (type == "locmach") { diff --git a/sources/autoNum/numerotationcontext.cpp b/sources/autoNum/numerotationcontext.cpp index 9ffb49b2a..f9afa4ffa 100644 --- a/sources/autoNum/numerotationcontext.cpp +++ b/sources/autoNum/numerotationcontext.cpp @@ -101,7 +101,7 @@ QStringList NumerotationContext::itemAt(const int i) const { * @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"); + return ("unit|unitfolio|ten|tenfolio|hundred|hundredfolio|string|idfolio|folio|plant|locmach|elementline|elementcolumn|elementprefix"); } /** diff --git a/sources/autoNum/numerotationcontextcommands.cpp b/sources/autoNum/numerotationcontextcommands.cpp index 73d67bf62..019d34090 100644 --- a/sources/autoNum/numerotationcontextcommands.cpp +++ b/sources/autoNum/numerotationcontextcommands.cpp @@ -124,8 +124,8 @@ void NumerotationContextCommands::setNumStrategy(const QString &str) { strategy_ = new FolioNum (diagram_); return; } - else if (str=="plant"){ - strategy_ = new PlantNum (diagram_); + else if (str=="plant"){ + strategy_ = new PlantNum (diagram_); return; } else if (str=="locmach"){ diff --git a/sources/autoNum/numerotationcontextcommands.h b/sources/autoNum/numerotationcontextcommands.h index f776fdc56..01c9fc2fd 100644 --- a/sources/autoNum/numerotationcontextcommands.h +++ b/sources/autoNum/numerotationcontextcommands.h @@ -144,7 +144,7 @@ class FolioNum: public NumStrategy class PlantNum: public NumStrategy { public: - PlantNum (Diagram *); + PlantNum (Diagram *); QString toRepresentedString(const QString) const override; NumerotationContext next (const NumerotationContext &, const int) const override; NumerotationContext previous (const NumerotationContext &, const int) const override; diff --git a/sources/autoNum/ui/numparteditorw.cpp b/sources/autoNum/ui/numparteditorw.cpp index ae126b4ef..73c1049cf 100644 --- a/sources/autoNum/ui/numparteditorw.cpp +++ b/sources/autoNum/ui/numparteditorw.cpp @@ -58,7 +58,7 @@ NumPartEditorW::NumPartEditorW (NumerotationContext &context, int i, int type, Q else if (strl.at(0)=="string") setType(NumPartEditorW::string); else if (strl.at(0)=="idfolio") setType(NumPartEditorW::idfolio); else if (strl.at(0)=="folio") setType(NumPartEditorW::folio); - else if (strl.at(0)=="plant") setType(NumPartEditorW::plant); + else if (strl.at(0)=="plant") setType(NumPartEditorW::plant); else if (strl.at(0)=="locmach") setType(NumPartEditorW::locmach); else if (strl.at(0)=="elementline") setType(NumPartEditorW::elementline); else if (strl.at(0)=="elementcolumn") setType(NumPartEditorW::elementcolumn); @@ -91,12 +91,12 @@ void NumPartEditorW::setVisibleItems() { items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01") << tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio") - << tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach"); + << tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach"); } else items << tr("Chiffre 1") << tr("Chiffre 1 - Folio") << tr("Chiffre 01") << tr("Chiffre 01 - Folio") << tr("Chiffre 001") << tr("Chiffre 001 - Folio") - << tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach") + << tr("Texte") << tr("N° folio") << tr("Folio") << tr("Installation") << tr("Locmach") << tr("Element Line") << tr("Element Column") << tr("Element Prefix"); ui->type_cb->insertItems(0,items); } @@ -136,8 +136,8 @@ NumerotationContext NumPartEditorW::toNumContext() { case folio: type_str = "folio"; break; - case plant: - type_str = "plant"; + case plant: + type_str = "plant"; break; case locmach: type_str = "locmach"; @@ -164,7 +164,7 @@ NumerotationContext NumPartEditorW::toNumContext() { * @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 || + if (type_ == folio || type_ == idfolio || type_ == elementline || type_ == plant || type_ == locmach || type_ == elementcolumn || type_ == elementprefix) {return true;} else if(ui -> value_field -> text().isEmpty()) {return false;} else return true; @@ -193,8 +193,8 @@ void NumPartEditorW::on_type_cb_activated(int) { setType(idfolio); else if (ui->type_cb->currentText() == tr("Folio")) setType(folio); - else if (ui->type_cb->currentText() == tr("Installation")) - setType(plant); + else if (ui->type_cb->currentText() == tr("Installation")) + setType(plant); else if (ui->type_cb->currentText() == tr("Locmach")) setType(locmach); else if (ui->type_cb->currentText() == tr("Element Line")) @@ -234,7 +234,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) { //if @t is a numeric type and preview type @type_ isn't a numeric type //or @fnum is true, we set numeric behavior if ( ((t==unit || t==unitfolio || t==ten || t==tenfolio || t==hundred || t==hundredfolio) && - (type_==string || type_==folio || type_==plant || type_==locmach ||type_==idfolio || + (type_==string || type_==folio || type_==plant || type_==locmach ||type_==idfolio || type_==elementcolumn || type_==elementline || type_==elementprefix)) || fnum) { ui -> value_field -> clear(); @@ -244,7 +244,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) { ui -> increase_spinBox -> setValue(1); } //@t isn't a numeric type - else if (t == string || t == folio || t == idfolio || t == elementline || t == plant || t == locmach || + else if (t == string || t == folio || t == idfolio || t == elementline || t == plant || t == locmach || t == elementcolumn || t == elementprefix) { ui -> value_field -> clear(); ui -> increase_spinBox -> setDisabled(true); @@ -256,7 +256,7 @@ void NumPartEditorW::setType(NumPartEditorW::type t, bool fnum) { ui -> value_field -> setDisabled(true); ui -> increase_spinBox -> setDisabled(true); } - else if (t==plant) { + else if (t==plant) { ui -> value_field -> setDisabled(true); ui -> increase_spinBox -> setDisabled(true); } @@ -309,8 +309,8 @@ void NumPartEditorW::setCurrentIndex(NumPartEditorW::type t) { i = ui->type_cb->findText(tr("N° folio")); else if (t == folio) i = ui->type_cb->findText(tr("Folio")); - else if (t == plant) - i = ui->type_cb->findText(tr("Installation")); + else if (t == plant) + i = ui->type_cb->findText(tr("Installation")); else if (t == locmach) i = ui->type_cb->findText(tr("Locmach")); else if (t == elementline) diff --git a/sources/autoNum/ui/numparteditorw.h b/sources/autoNum/ui/numparteditorw.h index 0e28abea6..a036499dd 100644 --- a/sources/autoNum/ui/numparteditorw.h +++ b/sources/autoNum/ui/numparteditorw.h @@ -42,7 +42,7 @@ class NumPartEditorW : public QWidget ~NumPartEditorW() override; enum type {unit,unitfolio,ten,tenfolio, hundred, hundredfolio, - string,idfolio,folio,plant,locmach, + string,idfolio,folio,plant,locmach, elementline,elementcolumn,elementprefix, }; NumerotationContext toNumContext(); diff --git a/sources/bordertitleblock.cpp b/sources/bordertitleblock.cpp index 1d57adb96..5cc110866 100644 --- a/sources/bordertitleblock.cpp +++ b/sources/bordertitleblock.cpp @@ -241,7 +241,7 @@ TitleBlockProperties BorderTitleBlock::exportTitleBlock() { ip.date = date(); ip.title = title(); ip.filename = fileName(); - ip.plant = plant(); + ip.plant = plant(); ip.locmach = locmach(); ip.indexrev = indexrev(); ip.version = version(); @@ -264,7 +264,7 @@ void BorderTitleBlock::importTitleBlock(const TitleBlockProperties &ip) { setDate(ip.date); setTitle(ip.title); setFileName(ip.filename); - setPlant(ip.plant); + setPlant(ip.plant); setLocMach(ip.locmach); setIndicerev(ip.indexrev); setVersion(QET::displayedVersion); @@ -715,7 +715,7 @@ void BorderTitleBlock::updateDiagramContextForTitleBlock(const DiagramContext &i context.addValue("date", btb_date_.toString(Qt::SystemLocaleShortDate)); context.addValue("title", btb_title_); context.addValue("filename", btb_filename_); - context.addValue("plant", btb_plant_); + context.addValue("plant", btb_plant_); context.addValue("locmach", btb_locmach_); context.addValue("indexrev", btb_indexrev_); context.addValue("version", btb_version_); diff --git a/sources/bordertitleblock.h b/sources/bordertitleblock.h index aed2c8f56..71a4130f1 100644 --- a/sources/bordertitleblock.h +++ b/sources/bordertitleblock.h @@ -97,8 +97,8 @@ class BorderTitleBlock : public QObject QString folio() const { return(btb_folio_); } /// @return the value of the title block "Folio" field as displayed QString finalfolio() const { return(btb_final_folio_); } - /// @return the value of the title block "Plant" field - QString plant() const { return(btb_plant_); } + /// @return the value of the title block "Plant" field + QString plant() const { return(btb_plant_); } /// @return the value of the title block "Locmach" field QString locmach() const { return(btb_locmach_); } /// @return the value of the revision index block "Folio" field @@ -155,7 +155,7 @@ class BorderTitleBlock : public QObject } void setFolioData(int, int, const QString& = nullptr, const DiagramContext & = DiagramContext()); /// @param author the new value of the "File" field - void setPlant(const QString &plant) { btb_plant_ = plant; } + void setPlant(const QString &plant) { btb_plant_ = plant; } void setLocMach(const QString &locmach) { btb_locmach_ = locmach; } void setIndicerev(const QString &indexrev){ btb_indexrev_ = indexrev; } void setFileName(const QString &filename) { btb_filename_ = filename; } @@ -237,7 +237,7 @@ class BorderTitleBlock : public QObject QDate btb_date_; QString btb_title_; QString btb_folio_; - QString btb_plant_; + QString btb_plant_; QString btb_locmach_; QString btb_indexrev_; QString btb_final_folio_; diff --git a/sources/diagramfoliolist.cpp b/sources/diagramfoliolist.cpp index 63be82ea8..b6d963f77 100644 --- a/sources/diagramfoliolist.cpp +++ b/sources/diagramfoliolist.cpp @@ -93,7 +93,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r) fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(), diagram_list[i] -> title(), diagram_list[i] -> border_and_titleblock.finalfolio(), - diagram_list[i] -> border_and_titleblock.plant(), + diagram_list[i] -> border_and_titleblock.plant(), diagram_list[i] -> border_and_titleblock.locmach(), diagram_list[i] -> border_and_titleblock.indexrev(), diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate)); @@ -101,7 +101,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r) fillRow(p, row_rect, diagram_list[i] -> border_and_titleblock.author(), diagram_list[i] -> title(), QString::number(diagram_list[i] ->folioIndex()+1), - diagram_list[i] -> border_and_titleblock.plant(), + diagram_list[i] -> border_and_titleblock.plant(), diagram_list[i] -> border_and_titleblock.locmach(), diagram_list[i] -> border_and_titleblock.indexrev(), diagram_list[i] -> border_and_titleblock.date().toString(Qt::SystemLocaleShortDate)); @@ -120,7 +120,7 @@ void DiagramFolioList::drawBackground(QPainter *p, const QRectF &r) * @param row_rect rectangle where we must draw the new row */ void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QString& author, const QString& title, - const QString& folio, const QString& plant, const QString& loc, const QString& indexrev, const QString& date) + const QString& folio, const QString& plant, const QString& loc, const QString& indexrev, const QString& date) { qreal x = row_rect.topLeft().x(); qreal y = row_rect.topLeft().y(); @@ -166,12 +166,12 @@ void DiagramFolioList::fillRow(QPainter *qp, const QRectF &row_rect, const QStri x += colWidths[1]*row_rect.width(); - if (origFontMetrics.width(plant) > 0.95*colWidths[2]*row_rect.width()) - workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(plant)); + if (origFontMetrics.width(plant) > 0.95*colWidths[2]*row_rect.width()) + workingFont.setPointSizeF(origFontSize * 0.95*colWidths[2]*row_rect.width() / origFontMetrics.width(plant)); else workingFont.setPointSizeF(origFontSize); qp -> setFont(workingFont); - qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, plant); + qp -> drawText(QRectF(x, y, colWidths[3]*row_rect.width(), row_rect.height()), Qt::AlignCenter, plant); x += colWidths[2]*row_rect.width(); @@ -219,15 +219,15 @@ void DiagramFolioList::buildGrid(QPainter *qp, const QRectF &rect, int rows, int qDeleteAll (list_rectangles_); list_rectangles_.clear(); - qreal sum = 0; - for (int i = 0; i < 7; i++ ) - sum += colWidths[i]; - if ( sum < 0.99 || sum > 1.01 ) { - qDebug() << "Invalid input: Column widths do not sum to 1"; - return; - } + qreal sum = 0; + for (int i = 0; i < 7; i++ ) + sum += colWidths[i]; + if ( sum < 0.99 || sum > 1.01 ) { + qDebug() << "Invalid input: Column widths do not sum to 1"; + return; + } - qreal tablesSpacing = rect.height() * 0.02; + qreal tablesSpacing = rect.height() * 0.02; qreal tableWidth = (rect.width() - tablesSpacing*(tables+1) ) / tables; qreal rowHeight = (rect.height() - 2*tablesSpacing) / rows; int cols = 7;//colWidths.size(); @@ -264,13 +264,13 @@ void DiagramFolioList::fillHeader(QPainter *qp, const QRectF &row_RectF) { QString authorTranslatable(QObject::tr("Auteur")); QString titleTranslatable(QObject::tr("Titre")); QString folioTranslatable(QObject::tr("Folio")); - QString plantTranslatable(QObject::tr("Installation")); + QString plantTranslatable(QObject::tr("Installation")); QString locTranslatable(QObject::tr("Localisation")); QString indexrevTranslatable(QObject::tr("Rev")); QString dateTranslatable(QObject::tr("Date")); qp->save(); qp->setFont(QETApp::diagramTextsFont(13)); - fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, plantTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable); + fillRow(qp, row_RectF, authorTranslatable, titleTranslatable, folioTranslatable, plantTranslatable, locTranslatable, indexrevTranslatable, dateTranslatable); qp->restore(); } diff --git a/sources/editor/qetelementeditor.cpp b/sources/editor/qetelementeditor.cpp index cb1f38ed7..b07b96058 100644 --- a/sources/editor/qetelementeditor.cpp +++ b/sources/editor/qetelementeditor.cpp @@ -741,7 +741,7 @@ bool QETElementEditor::checkElement() if (errors.size()) dialog_message += QString (tr(" et")); - dialog_message += QString (tr(" %n avertissement(s)", "warnings", warnings.size())); + dialog_message += QString (tr(" %n avertissement(s)", "warnings", warnings.size())); } dialog_message += " :"; diff --git a/sources/editor/ui/elementpropertieseditorwidget.cpp b/sources/editor/ui/elementpropertieseditorwidget.cpp index dc4f99006..0ca0674b2 100644 --- a/sources/editor/ui/elementpropertieseditorwidget.cpp +++ b/sources/editor/ui/elementpropertieseditorwidget.cpp @@ -152,7 +152,7 @@ void ElementPropertiesEditorWidget::updateTree() */ void ElementPropertiesEditorWidget::populateTree() { - QStringList keys{"label", "plant", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "supplier", "quantity", "unity", "machine-manufacturer-reference"}; + QStringList keys{"label", "plant", "comment", "description", "designation", "manufacturer", "manufacturer-reference", "supplier", "quantity", "unity", "machine-manufacturer-reference"}; for(const QString& key : keys) { diff --git a/sources/elementtextpattern.cpp b/sources/elementtextpattern.cpp index c139ba4d4..64bccca96 100644 --- a/sources/elementtextpattern.cpp +++ b/sources/elementtextpattern.cpp @@ -62,7 +62,7 @@ ExportElementTextPattern::ExportElementTextPattern(Element *elmt) : { bool r = QMessageBox::question(parentWidget(), QObject::tr("Configuration de textes"), - QObject::tr("Une configuration de textes nommée << %1 >> existe déjà.\n" + QObject::tr("Une configuration de textes nommée << %1 >> existe déjà.\n" "Voulez-vous la remplacer ?").arg(m_name)); if(r == false) diff --git a/sources/nomenclature.cpp b/sources/nomenclature.cpp index 0b6fca7c4..7a3543781 100644 --- a/sources/nomenclature.cpp +++ b/sources/nomenclature.cpp @@ -107,14 +107,14 @@ QString nomenclature::getNomenclature() ""+ QObject::tr("P001") +"\n"; //:Don't translate this text! //ID for function data += QObject::tr("Position du folio") +";" ""+ QObject::tr("Titre de folio") +";" - ""+ QObject::tr("Numéro de folio") +";" + ""+ QObject::tr("Numéro de folio") +";" ""+ QObject::tr("Désignation qet") +";" ""+ QObject::tr("Position") +";" ""+ QObject::tr("Label") +";" ""+ QObject::tr("Formule du label") +";" ""+ QObject::tr("Désignation") +";" ""+ QObject::tr("Description") +";" - ""+ QObject::tr("Installation") +";" + ""+ QObject::tr("Installation") +";" ""+ QObject::tr("Commentaire") +";" ""+ QObject::tr("Fabricant") +";" ""+ QObject::tr("Numéro de commande") +";" @@ -176,11 +176,11 @@ QString nomenclature::getElementInfo(Element *elmt) { info += autonum::AssignVariables::formulaToLabel(elmt_info["formula"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["designation"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["description"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; - info += autonum::AssignVariables::formulaToLabel(elmt_info["plant"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; + info += autonum::AssignVariables::formulaToLabel(elmt_info["plant"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["comment"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["manufacturer-reference"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; - info += autonum::AssignVariables::formulaToLabel(elmt_info["supplier"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; + info += autonum::AssignVariables::formulaToLabel(elmt_info["supplier"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["quantity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["unity"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; info += autonum::AssignVariables::formulaToLabel(elmt_info["auxiliary1"].toString(), elmt->rSequenceStruct(), elmt->diagram(), elmt) + ";"; diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index 8d32e9760..7c1ed7dfa 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -294,7 +294,7 @@ QStringList QETApp::elementInfoKeys() QStringList info_list; info_list << "formula" << "label" - << "plant" + << "plant" << "location" << "comment" @@ -308,7 +308,7 @@ QStringList QETApp::elementInfoKeys() << "manufacturer" << "manufacturer-reference" << "machine-manufacturer-reference" - << "supplier" + << "supplier" << "quantity" << "unity"; return info_list; @@ -323,9 +323,9 @@ QStringList QETApp::elementInfoKeys() */ QString QETApp::elementTranslatedInfoKey(const QString &info) { - if (info == "formula") return tr("Formule du label"); + if (info == "formula") return tr("Formule du label"); else if (info == "label") return tr("Label"); - else if (info == "plant") return tr("Installation"); + else if (info == "plant") return tr("Installation"); else if (info == "location") return tr("Localisation"); else if (info == "comment") return tr("Commentaire"); @@ -339,7 +339,7 @@ QString QETApp::elementTranslatedInfoKey(const QString &info) else if (info == "manufacturer") return tr("Fabricant"); else if (info == "manufacturer-reference") return tr("Numéro de commande"); else if (info == "machine-manufacturer-reference") return tr("Numéro interne"); - else if (info == "supplier") return tr("Fournisseur"); + else if (info == "supplier") return tr("Fournisseur"); else if (info == "quantity") return tr("Quantité"); else if (info == "unity") return tr("Unité"); @@ -359,13 +359,13 @@ QString QETApp::elementInfoToVar(const QString &info) { if (info == "formula") return QString("%{formula}"); else if (info == "label") return QString("%{label}"); - else if (info == "plant") return QString("%{plant}"); + else if (info == "plant") return QString("%{plant}"); else if (info == "comment") return QString("%{comment}"); else if (info == "description") return QString("%{description}"); else if (info == "designation") return QString("%{designation}"); else if (info == "manufacturer") return QString("%{manufacturer}"); else if (info == "manufacturer-reference") return QString("%{manufacturer-reference}"); - else if (info == "supplier") return QString("%{supplier}"); + else if (info == "supplier") return QString("%{supplier}"); else if (info == "quantity") return QString("%{quantity}"); else if (info == "unity") return QString("%{unity}"); else if (info == "auxiliary1") return QString("%{auxiliary1}"); @@ -493,17 +493,17 @@ QString QETApp::customElementsDir() { if (m_user_custom_elements_dir.isEmpty()) { - QSettings settings; - QString path = settings.value("elements-collections/custom-collection-path", "default").toString(); - if (path != "default" && !path.isEmpty()) - { - QDir dir(path); - if (dir.exists()) + QSettings settings; + QString path = settings.value("elements-collections/custom-collection-path", "default").toString(); + if (path != "default" && !path.isEmpty()) + { + QDir dir(path); + if (dir.exists()) { m_user_custom_elements_dir = path; return m_user_custom_elements_dir; - } - } + } + } else { m_user_custom_elements_dir = "default"; } diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index ef43e4a9a..644915e86 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -355,7 +355,7 @@ void QETDiagramEditor::setUpActions() }); //Edit current project properties - m_project_edit_properties = new QAction(QET::Icons::ProjectProperties, tr("Propriétés du projet"), this); + m_project_edit_properties = new QAction(QET::Icons::ProjectProperties, tr("Propriétés du projet"), this); connect(m_project_edit_properties, &QAction::triggered, [this]() { editProjectProperties(currentProjectView()); }); @@ -384,7 +384,7 @@ void QETDiagramEditor::setUpActions() }); //Add folio list to current project - m_project_folio_list = new QAction(QET::Icons::TableOfContent, tr("Ajouter un sommaire"), this); + m_project_folio_list = new QAction(QET::Icons::TableOfContent, tr("Ajouter un sommaire"), this); connect(m_project_folio_list, &QAction::triggered, [this]() { if (ProjectView *current_project = currentProjectView()) { current_project->addNewDiagramFolioList(); @@ -399,7 +399,7 @@ void QETDiagramEditor::setUpActions() }); //Lauch the plugin of terminal generator - m_project_terminalBloc = new QAction(QET::Icons::TerminalStrip, tr("Lancer le plugin de création de borniers"), this); + m_project_terminalBloc = new QAction(QET::Icons::TerminalStrip, tr("Lancer le plugin de création de borniers"), this); connect(m_project_terminalBloc, &QAction::triggered, this, &QETDiagramEditor::generateTerminalBlock); //MDI view style @@ -513,12 +513,12 @@ void QETDiagramEditor::setUpActions() connect(&m_row_column_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::rowColumnGroupTriggered); //Selections Actions (related to a selected item) - m_delete_selection = m_selection_actions_group.addAction( QET::Icons::EditDelete, tr("Supprimer") ); - m_rotate_selection = m_selection_actions_group.addAction( QET::Icons::TransformRotate, tr("Pivoter") ); - m_rotate_texts = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes") ); - m_find_element = m_selection_actions_group.addAction( QET::Icons::ZoomDraw, tr("Retrouver dans le panel") ); - m_edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("Éditer l'item sélectionné") ); - m_group_selected_texts = m_selection_actions_group.addAction(QET::Icons::textGroup, tr("Grouper les textes sélectionnés")); + m_delete_selection = m_selection_actions_group.addAction( QET::Icons::EditDelete, tr("Supprimer") ); + m_rotate_selection = m_selection_actions_group.addAction( QET::Icons::TransformRotate, tr("Pivoter") ); + m_rotate_texts = m_selection_actions_group.addAction( QET::Icons::ObjectRotateRight, tr("Orienter les textes") ); + m_find_element = m_selection_actions_group.addAction( QET::Icons::ZoomDraw, tr("Retrouver dans le panel") ); + m_edit_selection = m_selection_actions_group.addAction( QET::Icons::ElementEdit, tr("Éditer l'item sélectionné") ); + m_group_selected_texts = m_selection_actions_group.addAction(QET::Icons::textGroup, tr("Grouper les textes sélectionnés")); m_delete_selection->setShortcut(QKeySequence::Delete); m_rotate_selection->setShortcut(QKeySequence( tr("Space"))); @@ -540,9 +540,9 @@ void QETDiagramEditor::setUpActions() connect(&m_selection_actions_group, &QActionGroup::triggered, this, &QETDiagramEditor::selectionGroupTriggered); //Select Action - QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout sélectionner") ); - QAction *select_nothing = m_select_actions_group.addAction( QET::Icons::EditSelectNone, tr("Désélectionner tout") ); - QAction *select_invert = m_select_actions_group.addAction( QET::Icons::EditSelectInvert, tr("Inverser la sélection") ); + QAction *select_all = m_select_actions_group.addAction( QET::Icons::EditSelectAll, tr("Tout sélectionner") ); + QAction *select_nothing = m_select_actions_group.addAction( QET::Icons::EditSelectNone, tr("Désélectionner tout") ); + QAction *select_invert = m_select_actions_group.addAction( QET::Icons::EditSelectInvert, tr("Inverser la sélection") ); select_all ->setShortcut(QKeySequence::SelectAll); select_nothing->setShortcut(QKeySequence::Deselect); @@ -614,7 +614,7 @@ void QETDiagramEditor::setUpActions() this->currentDiagramView()->diagram()->changeZValue(action->data().value()); }); - m_find = new QAction(tr("Chercher/remplacer"), this); + m_find = new QAction(tr("Chercher/remplacer"), this); m_find->setShortcut(QKeySequence::Find); connect(m_find, &QAction::triggered, [this]() { this->m_search_and_replace_widget.setHidden(!m_search_and_replace_widget.isHidden()); @@ -746,7 +746,7 @@ void QETDiagramEditor::setUpMenu() { // menu Affichage - QMenu *projects_view_mode = menu_affichage -> addMenu(QET::Icons::ConfigureToolbars, tr("Afficher les projets")); + QMenu *projects_view_mode = menu_affichage -> addMenu(QET::Icons::ConfigureToolbars, tr("Afficher les projets")); projects_view_mode -> setTearOffEnabled(true); projects_view_mode -> addAction(m_windowed_view_mode); projects_view_mode -> addAction(m_tabbed_view_mode); diff --git a/sources/titleblock/templatecellwidget.cpp b/sources/titleblock/templatecellwidget.cpp index b8af3a572..26a7b45ed 100644 --- a/sources/titleblock/templatecellwidget.cpp +++ b/sources/titleblock/templatecellwidget.cpp @@ -437,11 +437,11 @@ QString TitleBlockTemplateCellWidget::defaultVariablesString() const { "
  • %{date} : date du folio
  • " "
  • %{title} : titre du folio
  • " "
  • %{filename} : nom de fichier du projet
  • " - "
  • %{plant} : nom de l'installation (=) dans laquelle se trouve le folio
  • " - "
  • %{locmach} : nom de la localisation (+) dans laquelle se trouve le folio
  • " + "
  • %{plant} : nom de l'installation (=) dans laquelle se trouve le folio
  • " + "
  • %{locmach} : nom de la localisation (+) dans laquelle se trouve le folio
  • " "
  • %{indexrev} : indice de révision du folio
  • " "
  • %{version} : version du logiciel
  • " - "
  • %{folio} : numéro du folio
  • " + "
  • %{folio} : numéro du folio
  • " "
  • %{folio-id} : position du folio dans le projet
  • " "
  • %{folio-total} : nombre total de folios dans le projet
  • " "
  • %{projecttitle} : titre du projet
  • " diff --git a/sources/titleblockproperties.cpp b/sources/titleblockproperties.cpp index f3abb6e65..b2d49fcb0 100644 --- a/sources/titleblockproperties.cpp +++ b/sources/titleblockproperties.cpp @@ -47,7 +47,7 @@ bool TitleBlockProperties::operator==(const TitleBlockProperties &ip) { ip.author == author &&\ ip.date == date &&\ ip.filename == filename &&\ - ip.plant == plant &&\ + ip.plant == plant &&\ ip.locmach == locmach &&\ ip.indexrev == indexrev &&\ ip.version == version &&\ @@ -77,7 +77,7 @@ void TitleBlockProperties::toXml(QDomElement &e) const { e.setAttribute("author", author); e.setAttribute("title", title); e.setAttribute("filename", filename); - e.setAttribute("plant", plant); + e.setAttribute("plant", plant); e.setAttribute("locmach", locmach); e.setAttribute("indexrev",indexrev); e.setAttribute("version", version); @@ -107,10 +107,10 @@ void TitleBlockProperties::fromXml(const QDomElement &e) { if (e.hasAttribute("author")) author = e.attribute("author"); if (e.hasAttribute("title")) title = e.attribute("title"); if (e.hasAttribute("filename")) filename = e.attribute("filename"); - if (e.hasAttribute("plant")) plant = e.attribute("plant"); + if (e.hasAttribute("plant")) plant = e.attribute("plant"); if (e.hasAttribute("locmach")) locmach = e.attribute("locmach"); - if (e.hasAttribute("indexrev")) indexrev = e.attribute("indexrev"); - if (e.hasAttribute("version")) version = e.attribute("version"); + if (e.hasAttribute("indexrev")) indexrev = e.attribute("indexrev"); + if (e.hasAttribute("version")) version = e.attribute("version"); if (e.hasAttribute("folio")) folio = e.attribute("folio"); if (e.hasAttribute("auto_page_num")) auto_page_num = e.attribute("auto_page_num"); if (e.hasAttribute("date")) setDateFromString(e.attribute("date")); @@ -140,7 +140,7 @@ void TitleBlockProperties::toSettings(QSettings &settings, const QString &prefix settings.setValue(prefix + "title", title); settings.setValue(prefix + "author", author); settings.setValue(prefix + "filename", filename); - settings.setValue(prefix + "plant", plant); + settings.setValue(prefix + "plant", plant); settings.setValue(prefix + "locmach", locmach); settings.setValue(prefix + "indexrev", indexrev); settings.setValue(prefix + "version", version); @@ -162,7 +162,7 @@ void TitleBlockProperties::fromSettings(QSettings &settings, const QString &pref title = settings.value(prefix + "title").toString(); author = settings.value(prefix + "author").toString(); filename = settings.value(prefix + "filename").toString(); - plant = settings.value(prefix + "plant").toString(); + plant = settings.value(prefix + "plant").toString(); locmach = settings.value(prefix + "locmach").toString(); indexrev = settings.value(prefix + "indexrev").toString(); version = settings.value(prefix + "version").toString(); diff --git a/sources/titleblockproperties.h b/sources/titleblockproperties.h index 73c4d1e85..8e5398934 100644 --- a/sources/titleblockproperties.h +++ b/sources/titleblockproperties.h @@ -54,7 +54,7 @@ class TitleBlockProperties { QString author; ///< Author of the diagram/folio (displayed by the default template) QDate date; ///< Date (displayed by the default template) QString filename; ///< Filename (displayed by the default template) - QString plant; ///< Plant (displayed by the default template) + QString plant; ///< Plant (displayed by the default template) QString locmach; ///< Location(displayed by the default template) QString indexrev; ///< Revision Index (displayed by the default template) QString version; ///< Version (displayed by the default template) diff --git a/sources/ui/titleblockpropertieswidget.cpp b/sources/ui/titleblockpropertieswidget.cpp index d0ed171ba..9731b04c6 100644 --- a/sources/ui/titleblockpropertieswidget.cpp +++ b/sources/ui/titleblockpropertieswidget.cpp @@ -36,8 +36,8 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(const TitleBlockPropertie ui(new Ui::TitleBlockPropertiesWidget) { ui->setupUi(this); - initDialog(current_date, project); - setProperties(titleblock); + initDialog(current_date, project); + setProperties(titleblock); } /** @@ -53,7 +53,7 @@ TitleBlockPropertiesWidget::TitleBlockPropertiesWidget(TitleBlockTemplatesCollec ui(new Ui::TitleBlockPropertiesWidget) { ui->setupUi(this); - initDialog(current_date,project); + initDialog(current_date,project); addCollection(tbt_collection); updateTemplateList(); setProperties(titleblock); @@ -96,7 +96,7 @@ void TitleBlockPropertiesWidget::setProperties(const TitleBlockProperties &prope ui -> m_title_le -> setText (properties.title); ui -> m_author_le -> setText (properties.author); ui -> m_file_le -> setText (properties.filename); - ui -> m_plant -> setText (properties.plant); + ui -> m_plant -> setText (properties.plant); ui -> m_loc -> setText (properties.locmach); ui -> m_indice -> setText (properties.indexrev); ui -> m_folio_le -> setText (properties.folio); @@ -154,7 +154,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const { prop.title = ui -> m_title_le -> text(); prop.author = ui -> m_author_le -> text(); prop.filename = ui -> m_file_le -> text(); - prop.plant = ui -> m_plant -> text(); + prop.plant = ui -> m_plant -> text(); prop.locmach = ui -> m_loc -> text(); prop.indexrev = ui -> m_indice -> text(); prop.folio = ui -> m_folio_le -> text(); @@ -181,7 +181,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::properties() const { prop.context = m_dcw -> context(); - prop.auto_page_num = ui->auto_page_cb->currentText(); + prop.auto_page_num = ui->auto_page_cb->currentText(); return prop; } @@ -195,7 +195,7 @@ TitleBlockProperties TitleBlockPropertiesWidget::propertiesAutoNum(QString autoN prop.title = ui -> m_title_le -> text(); prop.author = ui -> m_author_le -> text(); prop.filename = ui -> m_file_le -> text(); - prop.plant = ui -> m_plant -> text(); + prop.plant = ui -> m_plant -> text(); prop.locmach = ui -> m_loc -> text(); prop.indexrev = ui -> m_indice -> text(); prop.folio = "%autonum"; @@ -294,7 +294,7 @@ void TitleBlockPropertiesWidget::initDialog(const bool ¤t_date, QETProjec ui -> m_current_date_rb -> setVisible(current_date); m_tbt_edit = new QAction(tr("Éditer ce modèle", "menu entry"), this); - m_tbt_duplicate = new QAction(tr("Dupliquer et éditer ce modèle", "menu entry"), this); + m_tbt_duplicate = new QAction(tr("Dupliquer et éditer ce modèle", "menu entry"), this); connect(m_tbt_edit, SIGNAL(triggered()), this, SLOT(editCurrentTitleBlockTemplate())); connect(m_tbt_duplicate, SIGNAL(triggered()), this, SLOT(duplicateCurrentTitleBlockTemplate())); @@ -429,7 +429,7 @@ void TitleBlockPropertiesWidget::on_m_date_now_pb_clicked() { 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")) - { + { //still to implement: load current auto folio num settings - } + } }