mini sucess

This commit is contained in:
2025-08-12 23:41:36 +02:00
parent 756ec3f1fc
commit 7c267bcb33
8 changed files with 109 additions and 48 deletions

View File

@@ -38,17 +38,22 @@ XQMainModel::XQMainModel(QObject *parent )
void XQMainModel::initModel(const QString& modelName)
{
XQNodePtr modelSheet = _itemFactory.findModelSheet( modelName );
// #1: create structure: create static sections for this model
for( auto& sheetNode : modelSheet->children() )
// model rootnode finden -> <ModelX>
XQNodePtr modelSheet = _itemFactory.findModelSheet( modelName ); // throws
// #1: über alle sections
for( auto& section : modelSheet->children() )
{
qDebug() << " create main model: " << sheetNode->tag_name();
// #2: (optionalen) header erzeugen
const XQNodePtr header = section->find_child_by_tag_name( "Header");
if( header )
{
XQItemList list = _itemFactory.makeHeader( header );
Q_ASSERT(!list.isEmpty());
addSection(list, section );
}
XQItemList list = { _itemFactory.makeHeaderItem( sheetNode ) };
Q_ASSERT(!list.isEmpty());
addSection(list, sheetNode );
//appendRow( list );
}
}