First steps.

This commit is contained in:
Christoph Holzheuer
2025-09-12 15:38:06 +02:00
parent cc441d094c
commit d07ef3fbf9
7 changed files with 33 additions and 58 deletions

View File

@@ -105,7 +105,7 @@ XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
XQItemType* XQItemFactory::findItemTypeTemplate(const QString& key ) const
{
if( !key.isEmpty() && s_ItemTypeTemplates.contains(key))
return s_ItemTypeTemplates[key];
return s_ItemTypeTemplates[key];
throw XQException( "itemfactory: findItemTypeTemplate: not found:", key );
}
@@ -136,54 +136,6 @@ void XQItemFactory::setItemTypeDataFromString( XQItem& item, const QString& role
}
///
/// ------------------------------------------------
///
/*
XQItemList XQItemFactory::makeEmptyRow( const XQNodePtr& contentNode, const XQNodePtr& sheetNode )
{
Q_UNUSED(contentNode)
XQItemList list;
// create a data node for each sheet entry
size_t max = sheetNode->children().size();
for( size_t i=0; i<max; ++i )
{
// __fix
//list.append( new XQItem( "", XQItemType::EmptyStyle ) );
}
return list;
}
*/
/*
XQItemList XQItemFactory::createGenericRow( const XQNodePtr& contentNode, const XQNodePtr& sheetNode )
{
// we have a new empty contentNode, so we add attributes first.
for( const auto& sheetEntry : sheetNode->children() )
{
QString value = "[" + sheetEntry->tag_name() + "]";
if( sheetEntry->has_attribute("Unit") )
value = "0";
contentNode->set_attribute( sheetEntry->tag_name(), value );
}
if( sheetNode->has_attribute( c_FriendlyName ) )
contentNode->set_attribute( c_FriendlyName, sheetNode->friendly_name() );
// now, we can create a normal entry row
return makeContentRow(contentNode, sheetNode );
}
*/
//! erzeugt eine item-row.
XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
@@ -213,6 +165,14 @@ XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& c
return list;
}
XQItemList XQItemFactory::makeChildRow( XQItem* parent, const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
{
Q_UNUSED(parent);
Q_UNUSED(sheetNode);
Q_UNUSED(contentNode);
return XQItemList();
}
//! Erzeugt ein XQItem aus einer typ-beschreibung ('sheetNode') und einem daten-knoten ('contentNode').
//! Wenn der content node nicht gesetzt ist, wird stattdess das attribut 'Caption' aus der typ-beschreibung