some renamings.

This commit is contained in:
2025-09-27 17:21:36 +02:00
parent 6b675cb85e
commit 4996c03b39
10 changed files with 76 additions and 46 deletions

View File

@@ -31,6 +31,22 @@ XQChildModel::XQChildModel( QObject *parent )
}
//! Erzeugt eine model-section und fügt den zugehörigen header ein.
void XQChildModel::addSectionEntry( const QString& key, const XQNodePtr& contentEntry )
{
const XQModelSection& section = _sections.sectionByKey( key );
if(section.isValid() )
{
section.setContentRootNode( contentEntry->parent() );
int newRow =_sections.lastRow(section);
XQNodePtr sheetNode = section.sheetRootNode();
XQItemList list = _itemFactory.makeRow( sheetNode, nullptr );
insertRow( newRow, list);
}
}
//! erzegt den sichtbaren inhalt des models aus einem root-datenknoten.
void XQChildModel::addModelData( const XQNodePtr& contentRoot )
@@ -46,7 +62,6 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
// Das ist hier der Typ des Eintrags: Panel, Battery ...
QString key = contentEntry->tag_name();
// 'silent failure' hier der Datenbaum kann auch Knoten enthalten
// die nicht für uns gedacht sind.
if (!_sections.hasValidSection(key))
@@ -69,28 +84,28 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
{
qDebug() << " --- AddModelData: CHILD Found for: :" << contentEntry->tag_name() << " sheet parent: " << sheetNode->tag_name();
if( !sheetNode->has_children() )
qDebug() << " --- AUA";
//else
{
qDebug() << " --- no sheet node for children";
continue;
}Sehr geehrte Frau Hollerbaum,
Derzeit in Festanstellung, kann mir aber bin aber offen
Mein Fachgebiet ist Qt ma
addSectionChildren( list.front(), sheetNode, contentEntry );
}
} // for
}
//! Erzeugt eine model-section und fügt den zugehörigen header ein.
void XQChildModel::addSectionEntry( const QString& key, const XQNodePtr& contentEntry )
void XQChildModel::addSectionChildren( QStandardItem* parent, const XQNodePtr& sheetEntry, const XQNodePtr& contentRoot )
{
const XQModelSection& section = _sections.sectionByKey( key );
if(section.isValid() )
for (const auto& contentEntry : contentRoot->children())
{
section.setContentRootNode( contentEntry->parent() );
int newRow =_sections.lastRow(section);
XQNodePtr sheetNode = section.sheetRootNode();
XQItemList list = _itemFactory.makeRow( sheetNode, nullptr );
insertRow( newRow, list);
}
}