First steps.
This commit is contained in:
@@ -49,6 +49,7 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
|
|||||||
// Das ist hier der Typ des Eintrags: Panel, Battery ...
|
// Das ist hier der Typ des Eintrags: Panel, Battery ...
|
||||||
QString key = contentEntry->tag_name();
|
QString key = contentEntry->tag_name();
|
||||||
|
|
||||||
|
|
||||||
// 'silent failure' hier der Datenbaum kann auch Knoten enthalten
|
// 'silent failure' hier der Datenbaum kann auch Knoten enthalten
|
||||||
// die nicht für uns gedacht sind.
|
// die nicht für uns gedacht sind.
|
||||||
if (!_sections.hasValidSection(key))
|
if (!_sections.hasValidSection(key))
|
||||||
@@ -67,6 +68,14 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
|
|||||||
// _hinter_ der letzen zeile einfügen
|
// _hinter_ der letzen zeile einfügen
|
||||||
insertRow( newRow+1, list);
|
insertRow( newRow+1, list);
|
||||||
|
|
||||||
|
if( contentEntry->has_children())
|
||||||
|
{
|
||||||
|
qDebug() << " --- AddModelData: CHILD Found for: :" << contentEntry->tag_name() << " sheet parent: " << sheetNode->tag_name();
|
||||||
|
if( !sheetNode->has_children() )
|
||||||
|
qDebug() << " --- AUA";
|
||||||
|
//else
|
||||||
|
}
|
||||||
|
|
||||||
} // for
|
} // for
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -112,7 +112,7 @@ void XQMainWindow::initMainWindow()
|
|||||||
|
|
||||||
// #2. load demo data
|
// #2. load demo data
|
||||||
loadDocument( c_DocumentFileName1 );
|
loadDocument( c_DocumentFileName1 );
|
||||||
loadDocumentQML( c_DocumentFileName2 );
|
//loadDocumentQML( c_DocumentFileName2 );
|
||||||
//loadDocument( c_DocumentFileName2 );
|
//loadDocument( c_DocumentFileName2 );
|
||||||
//loadDocument( c_DocumentFileName3 );
|
//loadDocument( c_DocumentFileName3 );
|
||||||
|
|
||||||
|
@@ -105,7 +105,7 @@ XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
|
|||||||
XQItemType* XQItemFactory::findItemTypeTemplate(const QString& key ) const
|
XQItemType* XQItemFactory::findItemTypeTemplate(const QString& key ) const
|
||||||
{
|
{
|
||||||
if( !key.isEmpty() && s_ItemTypeTemplates.contains(key))
|
if( !key.isEmpty() && s_ItemTypeTemplates.contains(key))
|
||||||
return s_ItemTypeTemplates[key];
|
return s_ItemTypeTemplates[key];
|
||||||
throw XQException( "itemfactory: findItemTypeTemplate: not found:", 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.
|
//! erzeugt eine item-row.
|
||||||
|
|
||||||
XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
|
XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
|
||||||
@@ -213,6 +165,14 @@ XQItemList XQItemFactory::makeRow(const XQNodePtr& sheetNode, const XQNodePtr& c
|
|||||||
return list;
|
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').
|
//! 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
|
//! Wenn der content node nicht gesetzt ist, wird stattdess das attribut 'Caption' aus der typ-beschreibung
|
||||||
|
@@ -33,6 +33,7 @@ public:
|
|||||||
XQNodePtr findModelSheet( const QString& modelName ) const;
|
XQNodePtr findModelSheet( const QString& modelName ) const;
|
||||||
|
|
||||||
XQItemList makeRow( const XQNodePtr& sheetNode, const XQNodePtr& contentNode );
|
XQItemList makeRow( const XQNodePtr& sheetNode, const XQNodePtr& contentNode );
|
||||||
|
XQItemList makeChildRow( XQItem* parent, const XQNodePtr& sheetNode, const XQNodePtr& contentNode );
|
||||||
XQItem* makeSingleItem( const XQNodePtr& sheetNode, const QString& caption );
|
XQItem* makeSingleItem( const XQNodePtr& sheetNode, const QString& caption );
|
||||||
|
|
||||||
void setItemTypeDataFromString( XQItem& item, const QString& roleKey, const QString& source ) const;
|
void setItemTypeDataFromString( XQItem& item, const QString& roleKey, const QString& source ) const;
|
||||||
|
@@ -15,9 +15,9 @@
|
|||||||
<Inverter InverterID="#3 HM1600 03" FriendlyName="@InverterName" InverterName="03 HM1600 S4 TMax" Manufacturer="HoyMiles" MaxPowerInput="9000,00" MaxPowerInputChoice="6000;8000;10000" MaxPowerOutput="1600" NumStrings="4" Weight="32"/>
|
<Inverter InverterID="#3 HM1600 03" FriendlyName="@InverterName" InverterName="03 HM1600 S4 TMax" Manufacturer="HoyMiles" MaxPowerInput="9000,00" MaxPowerInputChoice="6000;8000;10000" MaxPowerOutput="1600" NumStrings="4" Weight="32"/>
|
||||||
<Inverter InverterID="#4 D12K 04" FriendlyName="@InverterName" InverterName="04 HM600 S2 TMax" Manufacturer="Deye" MaxPowerInput="8000" MaxPowerInputChoice="6000;8000;12000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
<Inverter InverterID="#4 D12K 04" FriendlyName="@InverterName" InverterName="04 HM600 S2 TMax" Manufacturer="Deye" MaxPowerInput="8000" MaxPowerInputChoice="6000;8000;12000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
||||||
<Battery BatteryID="#1 BYD 01" FriendlyName="@BatteryName" BatteryName="01 BYD T01 Stackable" Manufacturer="BYD" Capacity="4500" Yield="90" MaxCurrent="120" MaxVolt="48">
|
<Battery BatteryID="#1 BYD 01" FriendlyName="@BatteryName" BatteryName="01 BYD T01 Stackable" Manufacturer="BYD" Capacity="4500" Yield="90" MaxCurrent="120" MaxVolt="48">
|
||||||
<AdditionalData DataItem="Image" DataValue="image.png"/>
|
<Image DataItem="Image" DataValue="image.png"/>
|
||||||
<AdditionalData DataItem="Manual" DataValue="manual.docx"/>
|
<Manual DataItem="Manual" DataValue="manual.docx"/>
|
||||||
<AdditionalData DataItem="Certificate" DataValue="certificate.pdf"/>
|
<Certificate DataItem="Certificate" DataValue="certificate.pdf"/>
|
||||||
</Battery>
|
</Battery>
|
||||||
<Battery BatteryID="#2 BYD 02" FriendlyName="@BatteryName" BatteryName="02 BYD T02 Stackable" Manufacturer="BYD" Capacity="9000" Yield="94" MaxCurrent="120" MaxVolt="48"/>
|
<Battery BatteryID="#2 BYD 02" FriendlyName="@BatteryName" BatteryName="02 BYD T02 Stackable" Manufacturer="BYD" Capacity="9000" Yield="94" MaxCurrent="120" MaxVolt="48"/>
|
||||||
<Battery BatteryID="#3 BYD 03" FriendlyName="@BatteryName" BatteryName="03 BYD T01 Stackable" Manufacturer="BYD" Capacity="4500" Yield="86" MaxCurrent="120" MaxVolt="48"/>
|
<Battery BatteryID="#3 BYD 03" FriendlyName="@BatteryName" BatteryName="03 BYD T01 Stackable" Manufacturer="BYD" Capacity="4500" Yield="86" MaxCurrent="120" MaxVolt="48"/>
|
||||||
|
@@ -124,8 +124,13 @@
|
|||||||
<Manufacturer ItemType="PlainType" />
|
<Manufacturer ItemType="PlainType" />
|
||||||
<Capacity ItemType="ValueType" UnitType="Wh"/>
|
<Capacity ItemType="ValueType" UnitType="Wh"/>
|
||||||
<Yield ItemType="PercentageType" UnitType="%"/>
|
<Yield ItemType="PercentageType" UnitType="%"/>
|
||||||
<MaxCurrent ItemType="ValueType" UnitType="A"/>
|
<MaxCurrent ItemType="ValueType" UnitType="A">
|
||||||
<MaxVolt ItemType="ValueType" UnitType="V"/>
|
<SubType ItemType="PlainType"/>
|
||||||
|
</MaxCurrent>
|
||||||
|
<MaxVolt ItemType="ValueType" UnitType="V"/>
|
||||||
|
|
||||||
|
<firz ItemType="PlainType"/>
|
||||||
|
|
||||||
</ModelSheet>
|
</ModelSheet>
|
||||||
</Section>
|
</Section>
|
||||||
|
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 4" MaxAmpere="11" MaxVolt="42" PanelID="#4 JA 04" PanelName="JA 04 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 4" MaxAmpere="11" MaxVolt="42" PanelID="#4 JA 04" PanelName="JA 04 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
||||||
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 5" MaxAmpere="11" MaxVolt="42" PanelID="#5 JA 05" PanelName="JA 05 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 5" MaxAmpere="11" MaxVolt="42" PanelID="#5 JA 05" PanelName="JA 05 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
||||||
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 6" MaxAmpere="11" MaxVolt="42" PanelID="#6 JA 06" PanelName="JA 06 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
<Panel FriendlyName="@PanelName" Height="1,70" Manufacturer="JA Solar 6" MaxAmpere="11" MaxVolt="42" PanelID="#6 JA 06" PanelName="JA 06 Solar X58C" WattPeak="440" Weight="12" Width="1,10"/>
|
||||||
<Inverter FriendlyName="@InverterName" InverterID="#1 HM600 01" InverterName="01 HM600 S2 TMax" Manufacturer="HoyMiles" MaxPowerInput="3000,00" MaxPowerInputChoice="2000;4000;6000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
<Inverter FriendlyName="@InverterName" InverterID="#1 HM600 01" InverterName="01 HM600 S2 TMax" Manufacturer="HoyMiles" MaxPowerInput="8000,00" MaxPowerInputChoice="2000;4000;6000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
||||||
<Inverter FriendlyName="@InverterName" InverterID="#2 HM800 02" InverterName="02 HM800 S2 TMax" Manufacturer="HoyMiles" MaxPowerInput="4000" MaxPowerInputChoice="4000;6000;8000" MaxPowerOutput="800" NumStrings="7" Weight="29"/>
|
<Inverter FriendlyName="@InverterName" InverterID="#2 HM800 02" InverterName="02 HM800 S2 TMax" Manufacturer="HoyMiles" MaxPowerInput="4000,00" MaxPowerInputChoice="4000;6000;8000" MaxPowerOutput="800" NumStrings="2" Weight="29"/>
|
||||||
<Inverter FriendlyName="@InverterName" InverterID="#3 HM1600 03" InverterName="03 HM1600 S4 TMax" Manufacturer="HoyMiles" MaxPowerInput="9000,00" MaxPowerInputChoice="6000;8000;10000" MaxPowerOutput="1600" NumStrings="4" Weight="32"/>
|
<Inverter FriendlyName="@InverterName" InverterID="#3 HM1600 03" InverterName="03 HM1600 S4 TMax" Manufacturer="HoyMiles" MaxPowerInput="9000,00" MaxPowerInputChoice="6000;8000;10000" MaxPowerOutput="1600" NumStrings="4" Weight="32"/>
|
||||||
<Inverter FriendlyName="@InverterName" InverterID="#4 D12K 04" InverterName="04 HM600 S2 TMax" Manufacturer="Deye" MaxPowerInput="8000" MaxPowerInputChoice="6000;8000;12000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
<Inverter FriendlyName="@InverterName" InverterID="#4 D12K 04" InverterName="04 HM600 S2 TMax" Manufacturer="Deye" MaxPowerInput="8000,00" MaxPowerInputChoice="6000;8000;12000" MaxPowerOutput="600" NumStrings="2" Weight="28"/>
|
||||||
<Battery BatteryID="#1 BYD 01" BatteryName="01 BYD T01 Stackable" Capacity="4500" FriendlyName="@BatteryName" Manufacturer="BYD" MaxCurrent="120" MaxVolt="48" Yield="90">
|
<Battery BatteryID="#1 BYD 01" BatteryName="01 BYD T01 Stackable" Capacity="4500" FriendlyName="@BatteryName" Manufacturer="BYD" MaxCurrent="120" MaxVolt="48" Yield="90">
|
||||||
<AdditionalData DataItem="Image" DataValue="image.png"/>
|
<AdditionalData DataItem="Image" DataValue="image.png"/>
|
||||||
<AdditionalData DataItem="Manual" DataValue="manual.docx"/>
|
<AdditionalData DataItem="Manual" DataValue="manual.docx"/>
|
||||||
|
Reference in New Issue
Block a user