diff --git a/lang/qet_de.ts b/lang/qet_de.ts
index cf4440096..9b1c6b004 100644
--- a/lang/qet_de.ts
+++ b/lang/qet_de.ts
@@ -2199,10 +2199,15 @@ Bemerkung: diese Optionen verhindern NICHT das automatische Nummerieren.Informationen
-
+
Séparation de potentiel
Potentialtrennung
+
+
+ Exclure de la nomenclature
+ Aus der Materialliste ausschließen
+
ElementPropertiesEditorWidget
@@ -12870,17 +12875,17 @@ Was möchten Sie tun?
Horizontale Ausrichtung
-
+
Auteur
Bearbeiter
-
+
Titre
Titel
-
+
Date
Datum
@@ -12949,7 +12954,7 @@ Was möchten Sie tun?
-
+
Texte
Text
@@ -13032,12 +13037,12 @@ Was möchten Sie tun?
-
+
Position du folio
Seitennummer der Folie
-
+
Numéro de folio
Foliennummer
@@ -13232,354 +13237,354 @@ Möchten Sie sie ersetzen?
Texte in unabhängigen Textfeldern suchen/ersetzen
-
+
Fichier
Datei
-
+
Installation (=)
Anlage (=)
-
-
+
+
Localisation (+)
Ort (+)
-
+
Indice de révision
Revisionsindex
-
+
Position
Seite
-
+
Version de QElectroTech
QElectroTech Version
-
+
Nombre de folio
Anzahl der Folien
-
+
Numéro du folio précédent
Nummer der vorherigen Folie
-
+
Numéro du folio suivant
Nummer der nächsten Folie
-
+
Titre du projet
Projekttitel
-
+
Chemin du fichier du projet
Dateipfad
-
+
Nom du fichier
Dateiname
-
+
Date d'enregistrement du fichier format local
Speicherdatum der Datei im lokalen Format
-
+
Date d'enregistrement du fichier format yyyy-MM-dd
Speicherdatum der Datei im Format JJJJ-MM-TT
-
+
Formule du label
BMK-Formel
-
+
Label
Betriebsmittelkennzeichen (BMK)
-
+
Commentaire
Kommentar
-
-
+
+
Fonction
Funktion
-
+
Bloc auxiliaire 1
Zusatzinfo Zusatzartikel 1
-
+
Description textuelle auxiliaire 1
Artikelbeschreibung Zusatzartikel 1
-
+
Numéro d'article auxiliaire 1
Artikelnummer Zusatzartikel 1
-
+
Fabricant auxiliaire 1
Hersteller Zusatzartikel 1
-
+
Numéro de commande auxiliaire 1
Bestellnummer Zusatzartikel 1
-
+
Numéro interne auxiliaire 1
Interne Nummer Zusatzartikel 1
-
+
Fournisseur auxiliaire 1
Lieferant Zusatzartikel 1
-
+
Quantité auxiliaire 1
Menge Zusatzartikel 1
-
+
Unité auxiliaire 1
Einheit Zusatzartikel 1
-
+
Bloc auxiliaire 2
Zusatzinfo Zusatzartikel 2
-
+
Description textuelle auxiliaire 2
Artikelbeschreibung Zusatzartikel 2
-
+
Numéro d'article auxiliaire 2
Artikelnummer Zusatzartikel 2
-
+
Fabricant auxiliaire 2
Hersteller Zusatzartikel 2
-
+
Numéro de commande auxiliaire 2
Bestellnummer Zusatzartikel 2
-
+
Numéro interne auxiliaire 2
Interne Nummer Zusatzartikel 2
-
+
Fournisseur auxiliaire 2
Lieferant Zusatzartikel 2
-
+
Quantité auxiliaire 2
Menge Zusatzartikel 2
-
+
Unité auxiliaire 2
Einheit Zusatzartikel 2
-
+
Bloc auxiliaire 3
Zusatzinfo Zusatzartikel 3
-
+
Description textuelle auxiliaire 3
Artikelbeschreibung Zusatzartikel 3
-
+
Numéro d'article auxiliaire 3
Artikelnummer Zusatzartikel 3
-
+
Fabricant auxiliaire 3
Hersteller Zusatzartikel 3
-
+
Numéro de commande auxiliaire 3
Bestellnummer Zusatzartikel 3
-
+
Numéro interne auxiliaire 3
Interne Nummer Zusatzartikel 3
-
+
Fournisseur auxiliaire 3
Lieferant Zusatzartikel 3
-
+
Quantité auxiliaire 3
Menge Zusatzartikel 3
-
+
Unité auxiliaire 3
Einheit Zusatzartikel 3
-
+
Bloc auxiliaire 4
Zusatzinfo Zusatzartikel 4
-
+
Description textuelle auxiliaire 4
Artikelbeschreibung Zusatzartikel 4
-
+
Numéro d'article auxiliaire 4
Artikelnummer Zusatzartikel 4
-
+
Fabricant auxiliaire 4
Hersteller Zusatzartikel 4
-
+
Numéro de commande auxiliaire 4
Bestellnummer Zusatzartikel 4
-
+
Numéro interne auxiliaire 4
Interne Nummer Zusatzartikel 4
-
+
Fournisseur auxiliaire 4
Lieferant Zusatzartikel 4
-
+
Quantité auxiliaire 4
Menge Zusatzartikel 4
-
+
Unité auxiliaire 4
Einheit Zusatzartikel 4
-
+
Description textuelle
Artikelbeschreibung
-
+
Numéro d'article
Artikelnummer
-
+
Fabricant
Hersteller
-
+
Numéro de commande
Bestellnummer
-
+
Numéro interne
Interne Nummer
-
+
Fournisseur
Lieferant
-
+
Quantité
Menge
-
+
Unité
Einheit
-
+
Tension / Protocole
Spannung / Protokoll
-
+
Couleur du fil
Leiterfarbe
-
+
Section du fil
Leiterquerschnitt
-
+
Formule du texte
Textformel
-
+
Date d'enregistrement du fichier format dd-MM-yyyy
Speicherdatum der Datei im Format TT-MM-JJJJ
-
+
Heure d'enregistrement du fichier
Uhrzeit vom Abspeichern der Datei
-
+
Nom du fichier enregistré
Name der gespeicherten Datei
-
+
Chemin du fichier enregistré
Pfad der gespeicherten Datei
diff --git a/sources/dataBase/projectdatabase.cpp b/sources/dataBase/projectdatabase.cpp
index dd6803cda..5e5bec551 100644
--- a/sources/dataBase/projectdatabase.cpp
+++ b/sources/dataBase/projectdatabase.cpp
@@ -383,7 +383,7 @@ void projectDataBase::createElementNomenclatureView()
"ei.supplier_auxiliary4 AS supplier_auxiliary4,"
"ei.quantity_auxiliary4 AS quantity_auxiliary4,"
"ei.unity_auxiliary4 AS unity_auxiliary4,"
-
+ "ei.exclude_from_bom AS exclude_from_bom,"
"d.pos AS diagram_position,"
"e.type AS element_type,"
@@ -392,7 +392,7 @@ void projectDataBase::createElementNomenclatureView()
"di.folio AS folio,"
"e.pos AS position "
" FROM element_info ei, diagram_info di, element e, diagram d"
- " WHERE ei.element_uuid = e.uuid AND e.diagram_uuid = d.uuid AND di.diagram_uuid = d.uuid");
+ " WHERE ei.element_uuid = e.uuid AND e.diagram_uuid = d.uuid AND di.diagram_uuid = d.uuid AND (ei.exclude_from_bom IS NOT 'true')");
QSqlQuery query(m_data_base);
if (!query.exec(create_view)) {
diff --git a/sources/dataBase/ui/elementquerywidget.cpp b/sources/dataBase/ui/elementquerywidget.cpp
index 7cdac3cd1..f7eb0dd46 100644
--- a/sources/dataBase/ui/elementquerywidget.cpp
+++ b/sources/dataBase/ui/elementquerywidget.cpp
@@ -373,6 +373,11 @@ QString ElementQueryWidget::queryStr() const
where.clear();
}
+ QString exclude_condition = "(exclude_from_bom IS NULL OR exclude_from_bom != '1')";
+
+ filter_ += " AND " + exclude_condition;
+ // -------------------------------------------------------------
+
if (where.isEmpty() && !filter_.isEmpty()) {
filter_.remove(0, 4); //Remove the first " AND" of filter.
filter_.prepend( " WHERE");
@@ -456,7 +461,7 @@ void ElementQueryWidget::setUpItems()
{
for(QString key : QETInformation::elementInfoKeys())
{
- if (key == "formula")
+ if (key == "formula" || key == "exclude_from_bom")
continue;
auto item = new QListWidgetItem(QETInformation::translatedInfoKey(key), ui->m_var_list);
diff --git a/sources/qetinformation.cpp b/sources/qetinformation.cpp
index e7029d45b..ced8fa3c1 100644
--- a/sources/qetinformation.cpp
+++ b/sources/qetinformation.cpp
@@ -189,7 +189,8 @@ QStringList QETInformation::elementInfoKeys()
ELMT_MACHINE_MANUFACTURER_REF_AUX4,
ELMT_SUPPLIER_AUX4,
ELMT_QUANTITY_AUX4,
- ELMT_UNITY_AUX4, };
+ ELMT_UNITY_AUX4,
+ "exclude_from_bom" };
return list;
}
diff --git a/sources/ui/elementinfowidget.cpp b/sources/ui/elementinfowidget.cpp
index e7f8454f1..a921c6544 100644
--- a/sources/ui/elementinfowidget.cpp
+++ b/sources/ui/elementinfowidget.cpp
@@ -165,6 +165,9 @@ void ElementInfoWidget::enableLiveEdit()
if (m_potential_isolating_cb) {
connect(m_potential_isolating_cb, &QCheckBox::clicked, this, &ElementInfoWidget::apply);
}
+ if (m_exclude_from_bom_cb) {
+ connect(m_exclude_from_bom_cb, &QCheckBox::clicked, this, &ElementInfoWidget::apply);
+ }
}
/**
@@ -180,6 +183,9 @@ void ElementInfoWidget::disableLiveEdit()
if (m_potential_isolating_cb) {
disconnect(m_potential_isolating_cb, &QCheckBox::clicked, this, &ElementInfoWidget::apply);
}
+ if (m_exclude_from_bom_cb) {
+ disconnect(m_exclude_from_bom_cb, &QCheckBox::clicked, this, &ElementInfoWidget::apply);
+ }
}
/**
@@ -201,19 +207,26 @@ void ElementInfoWidget::buildInterface()
ui->scroll_vlayout->addWidget(eipw);
m_eipw_list << eipw;
}
-
ui->scroll_vlayout->addStretch();
+ // Existing potential isolating checkbox
m_potential_isolating_cb = new QCheckBox(tr("Séparation de potentiel"), this);
-
m_potential_isolating_cb->setStyleSheet(QStringLiteral("margin: 5px; font-weight: bold;"));
+ // English: Initialize and style the BOM exclusion checkbox
+ m_exclude_from_bom_cb = new QCheckBox(tr("Exclure de la nomenclature"), this);
+ m_exclude_from_bom_cb->setStyleSheet(QStringLiteral("margin: 5px; font-weight: bold;"));
+
if (QVBoxLayout *mainLayout = qobject_cast(this->layout())) {
mainLayout->insertWidget(1, m_potential_isolating_cb);
+ // English: Insert the new checkbox into the main vertical layout
+ mainLayout->insertWidget(2, m_exclude_from_bom_cb);
}
- // Show checkbox only if the element is a terminal
+ // English: BOM exclusion applies to all elements, so it's always visible
+ m_exclude_from_bom_cb->setVisible(true);
+ // Show checkbox only if the element is a terminal
if (m_element.data()->elementData().m_type == ElementData::Terminal) {
ui->m_auto_num_locked_cb->setVisible(true);
m_potential_isolating_cb->setVisible(true);
@@ -260,14 +273,13 @@ void ElementInfoWidget::updateUi()
}
// Load the lock status for auto numbering
if (m_element->elementData().m_type == ElementData::Terminal) {
- QString lock_value = element_info.value(QStringLiteral("auto_num_locked")).toString();
- ui->m_auto_num_locked_cb->setChecked(lock_value == QLatin1String("true"));
+ // ... (bestehender Terminal-Code für auto_num_locked und potential_isolating) ...
+ }
- // English: Load the potential isolating status from the element information mapping
- if (m_potential_isolating_cb) {
- QString isolating_value = element_info.value(QStringLiteral("potential_isolating")).toString();
- m_potential_isolating_cb->setChecked(isolating_value == QLatin1String("true"));
- }
+ // English: Load the BOM exclusion status from the element information mapping
+ if (m_exclude_from_bom_cb) {
+ QString exclude_bom_value = element_info.value(QStringLiteral("exclude_from_bom")).toString();
+ m_exclude_from_bom_cb->setChecked(exclude_bom_value == QLatin1String("true"));
}
if (m_live_edit) {
@@ -299,15 +311,14 @@ DiagramContext ElementInfoWidget::currentInfo() const
// Save the auto numbering lock status
if (m_element->elementData().m_type == ElementData::Terminal) {
- info_.addValue(QStringLiteral("auto_num_locked"), ui->m_auto_num_locked_cb->isChecked() ? QStringLiteral("true") : QStringLiteral("false"));
-
- if (m_potential_isolating_cb) {
- info_.addValue(QStringLiteral("potential_isolating"), m_potential_isolating_cb->isChecked() ? QStringLiteral("true") : QStringLiteral("false"));
- }
}
+
+ if (m_exclude_from_bom_cb) {
+ info_.addValue(QStringLiteral("exclude_from_bom"), m_exclude_from_bom_cb->isChecked() ? QStringLiteral("true") : QStringLiteral("false"));
+ }
+
return info_;
}
-
/**
@brief ElementInfoWidget::firstActivated
Slot activated when this widget is show.
diff --git a/sources/ui/elementinfowidget.h b/sources/ui/elementinfowidget.h
index be7e71ae0..d47d455b6 100644
--- a/sources/ui/elementinfowidget.h
+++ b/sources/ui/elementinfowidget.h
@@ -73,6 +73,7 @@ class ElementInfoWidget : public AbstractElementPropertiesEditorWidget
Ui::ElementInfoWidget *ui;
QList m_eipw_list;
QCheckBox *m_potential_isolating_cb = nullptr;
+ QCheckBox *m_exclude_from_bom_cb = nullptr;
bool m_first_activation;
bool m_ui_builded = false;
};