reworked model sections.
This commit is contained in:
@@ -40,6 +40,7 @@ XQMainModel::XQMainModel(QObject *parent )
|
||||
XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
{
|
||||
|
||||
/*
|
||||
for(const auto& section : _sections )
|
||||
{
|
||||
qDebug() << " --- wtf1: " << contentNode->to_string();
|
||||
@@ -47,7 +48,20 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
|
||||
if( contentNode->attribute("State") == section.sheetRootNode->attribute("State") )
|
||||
{
|
||||
XQItem* newTreeentry = _itemFactory.makeTreeChildItem( contentNode, section.sheetRootNode );
|
||||
//XQItem* newTreeentry = _itemFactory.makeTreeChildItem( contentNode, section.sheetRootNode );
|
||||
|
||||
makeTreeChildItem:
|
||||
// den itemtype des neuen items rausfinden
|
||||
QString typeKey = sheetEntry->attribute("ItemType");
|
||||
XQItemType* itemType = findItemTypeTemplate(typeKey); // throws
|
||||
//XQItemType* itemType = makeItemType(sheetEntry); // throws
|
||||
|
||||
const QString* contentPtr = contentNode->attribute_ptr( "ProjectName" );
|
||||
|
||||
XQItem* newItem = new XQItem( itemType, contentPtr );
|
||||
|
||||
return newItem;
|
||||
|
||||
section.headerItem().appendRow( newTreeentry );
|
||||
_treeTable->expand( section.modelIndex );
|
||||
// ??
|
||||
@@ -57,6 +71,7 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
return newTreeentry;
|
||||
}
|
||||
}
|
||||
*/
|
||||
throw XQException( "createTreeEntry: main model should not be empty!" );
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user