backup
This commit is contained in:
84
deprecated/reste.cpp
Normal file
84
deprecated/reste.cpp
Normal file
@@ -0,0 +1,84 @@
|
||||
XQItem* createTreeEntry( XQNodePtr contentNode );
|
||||
|
||||
|
||||
|
||||
//! erzeugt einen eintrag in der baum-übersicht.
|
||||
|
||||
XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
{
|
||||
|
||||
/*
|
||||
for(const auto& section : _sections )
|
||||
{
|
||||
qDebug() << " --- wtf1: " << contentNode->to_string();
|
||||
qDebug() << " --- wtf2: " << section.sheetRootNode->to_string();
|
||||
|
||||
if( contentNode->attribute("State") == section.sheetRootNode->attribute("State") )
|
||||
{
|
||||
//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 );
|
||||
// ??
|
||||
_treeTable->setCurrentIndex( section.modelIndex );
|
||||
newTreeentry->setContentNode(contentNode);
|
||||
emit xqItemCreated( newTreeentry );
|
||||
return newTreeentry;
|
||||
}
|
||||
}
|
||||
*/
|
||||
throw XQException( "createTreeEntry: main model should not be empty!" );
|
||||
}
|
||||
<Section ContentType="Inverter">
|
||||
<Header Marker="Inverter">
|
||||
<InverterID Caption="Inverter" ItemType="HeaderType" />
|
||||
<InverterName Caption="Name" ItemType="HeaderType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="HeaderType" />
|
||||
<MaxPowerInput Caption="max. Input" ItemType="HeaderType" />
|
||||
<MaxPowerOutput Caption="max Output" ItemType="HeaderType" />
|
||||
<NumStrings Caption="Strings" ItemType="HeaderType" />
|
||||
<Weight Caption="Weight" ItemType="HeaderType" />
|
||||
</Header>
|
||||
<Data>
|
||||
<InverterID Caption="Inverter" ItemType="ValueType" />
|
||||
<InverterName Caption="Name" ItemType="ValueType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="ValueType" />
|
||||
<MaxPowerInput Caption="max. Input" ItemType="ValueType" ItemType="ChoiceType" ChoiceDataSource="MaxPowerInputChoice" UnitType="W"/>
|
||||
<MaxPowerOutput Caption="max Output" ItemType="ValueType" UnitType="W"/>
|
||||
<NumStrings Caption="Strings" ItemType="ValueType" />
|
||||
<Weight Caption="Weight" ItemType="ValueType" UnitType="kg"/>
|
||||
</Data>
|
||||
</Section>
|
||||
|
||||
<Section ContentType="Battery">
|
||||
<Header Marker="Battery">
|
||||
<BatteryID Caption="Name" ItemType="HeaderType" />
|
||||
<BatteryName Caption="Battery" ItemType="HeaderType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="HeaderType" />
|
||||
<Capacity Caption="Capacity" ItemType="HeaderType"/>
|
||||
<Yield Caption="Yield" ItemType="HeaderType" />
|
||||
<MaxCurrent Caption="max. Current" ItemType="HeaderType" />
|
||||
<MaxVolt Caption="max. Volt" ItemType="HeaderType" />
|
||||
</Header>
|
||||
<Data>
|
||||
<BatteryID Caption="Battery" ItemType="ValueType" />
|
||||
<BatteryName Caption="Name" ItemType="ValueType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="ValueType" />
|
||||
<Capacity Caption="Capacity" ItemType="ValueType" UnitType="Wh"/>
|
||||
<Yield Caption="Yield" ItemType="ValueType" ItemType="PercentageType" UnitType="%"/>
|
||||
<MaxCurrent Caption="max. Current" ItemType="ValueType" UnitType="A"/>
|
||||
<MaxVolt Caption="max. Volt" ItemType="ValueType" UnitType="V"/>
|
||||
</Data>
|
||||
</Section>
|
@@ -32,7 +32,7 @@ namespace XQAppData
|
||||
|
||||
|
||||
|
||||
class XQAppIconMap : public QMap<QString,QIcon>
|
||||
class XQAppIconMap : public QMap<QString,XQIcon>
|
||||
{
|
||||
public:
|
||||
|
||||
@@ -40,85 +40,85 @@ namespace XQAppData
|
||||
|
||||
void init()
|
||||
{
|
||||
insert( "DirIcon" , QApplication::style()->standardIcon(QStyle::SP_DirIcon));
|
||||
insert( "FileDialogBack", QApplication::style()->standardIcon(QStyle::SP_FileDialogBack));
|
||||
insert( "FileDialogContentsView", QApplication::style()->standardIcon(QStyle::SP_FileDialogContentsView));
|
||||
insert( "FileDialogDetailedView", QApplication::style()->standardIcon(QStyle::SP_FileDialogDetailedView));
|
||||
insert( "icn05Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogEnd));
|
||||
insert( "icn06Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogInfoView));
|
||||
insert( "icn07Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogListView));
|
||||
insert( "icn08Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||
insert( "icn09Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogStart));
|
||||
insert( "icn10Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogToParent));
|
||||
insert( "icn11Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowBack));
|
||||
insert( "icn12Dummy", QApplication::style()->standardIcon(QStyle::SP_DirIcon));
|
||||
insert( "icn13Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaSkipBackward));
|
||||
insert( "icn14Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowDown));
|
||||
insert( "icn15Dummy", QApplication::style()->standardIcon(QStyle::SP_DirLinkIcon));
|
||||
insert( "icn16Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaSkipForward));
|
||||
insert( "icn17Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowForward));
|
||||
insert( "icn18Dummy", QApplication::style()->standardIcon(QStyle::SP_DirOpenIcon));
|
||||
insert( "icn19Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaStop));
|
||||
insert( "icn20Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowLeft));
|
||||
insert( "icn21Dummy", QApplication::style()->standardIcon(QStyle::SP_DockWidgetCloseButton));
|
||||
insert( "icn22Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaVolume));
|
||||
insert( "icn23Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowRight));
|
||||
insert( "icn24Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveCDIcon));
|
||||
insert( "icn25Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaVolumeMuted));
|
||||
insert( "icn26Dummy", QApplication::style()->standardIcon(QStyle::SP_ArrowUp));
|
||||
insert( "icn27Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveDVDIcon));
|
||||
insert( "icn28Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxCritical));
|
||||
insert( "icn29Dummy", QApplication::style()->standardIcon(QStyle::SP_BrowserReload));
|
||||
insert( "icn30Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveFDIcon));
|
||||
insert( "icn31Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation));
|
||||
insert( "BrowserStop", QApplication::style()->standardIcon(QStyle::SP_BrowserStop));
|
||||
insert( "icn33Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveHDIcon));
|
||||
insert( "icn34Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxQuestion));
|
||||
insert( "icn35Dummy", QApplication::style()->standardIcon(QStyle::SP_CommandLink));
|
||||
insert( "icn36Dummy", QApplication::style()->standardIcon(QStyle::SP_DriveNetIcon));
|
||||
insert( "icn37Dummy", QApplication::style()->standardIcon(QStyle::SP_MessageBoxWarning));
|
||||
insert( "icn38Dummy", QApplication::style()->standardIcon(QStyle::SP_ComputerIcon));
|
||||
insert( "icn39Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogBack));
|
||||
insert( "icn40Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarCloseButton));
|
||||
insert( "icn41Dummy", QApplication::style()->standardIcon(QStyle::SP_CustomBase));
|
||||
insert( "icn42Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogContentsView));
|
||||
insert( "icn43Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarContextHelpButton));
|
||||
insert( "icn44Dummy", QApplication::style()->standardIcon(QStyle::SP_DesktopIcon));
|
||||
insert( "icn45Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogDetailedView));
|
||||
insert( "icn46Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarMaxButton));
|
||||
insert( "icn47Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogApplyButton));
|
||||
insert( "icn48Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogEnd));
|
||||
insert( "icn49Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarMenuButton));
|
||||
insert( "icn50Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogCancelButton));
|
||||
insert( "icn51Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogInfoView));
|
||||
insert( "icn52Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarMinButton));
|
||||
insert( "icn53Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogCloseButton));
|
||||
insert( "icn54Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogListView));
|
||||
insert( "icn55Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarNormalButton));
|
||||
insert( "icn56Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogDiscardButton));
|
||||
insert( "icn57Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogNewFolder));
|
||||
insert( "icn58Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarShadeButton));
|
||||
insert( "icn59Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogHelpButton));
|
||||
insert( "icn60Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogStart));
|
||||
insert( "icn61Dummy", QApplication::style()->standardIcon(QStyle::SP_TitleBarUnshadeButton));
|
||||
insert( "icn62Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogNoButton));
|
||||
insert( "icn63Dummy", QApplication::style()->standardIcon(QStyle::SP_FileDialogToParent));
|
||||
insert( "icn64Dummy", QApplication::style()->standardIcon(QStyle::SP_ToolBarHorizontalExtensionButton));
|
||||
insert( "icn65Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogOkButton));
|
||||
insert( "FileIcon", QApplication::style()->standardIcon(QStyle::SP_FileIcon));
|
||||
insert( "icn67Dummy", QApplication::style()->standardIcon(QStyle::SP_ToolBarVerticalExtensionButton));
|
||||
insert( "icn68Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogResetButton));
|
||||
insert( "icn70Dummy", QApplication::style()->standardIcon(QStyle::SP_FileLinkIcon));
|
||||
insert( "TrashIcon", QApplication::style()->standardIcon(QStyle::SP_TrashIcon));
|
||||
insert( "icn72Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogSaveButton));
|
||||
insert( "icn73Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaPause));
|
||||
insert( "icn74Dummy", QApplication::style()->standardIcon(QStyle::SP_VistaShield));
|
||||
insert( "icn75Dummy", QApplication::style()->standardIcon(QStyle::SP_DialogYesButton));
|
||||
insert( "icn76Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaPlay));
|
||||
insert( "icn77Dummy", QApplication::style()->standardIcon(QStyle::SP_DirClosedIcon));
|
||||
insert( "icn79Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaSeekBackward));
|
||||
insert( "DirHomeIcon", QApplication::style()->standardIcon(QStyle::SP_DirHomeIcon));
|
||||
insert( "icn81Dummy", QApplication::style()->standardIcon(QStyle::SP_MediaSeekForward));
|
||||
namedInsert( "DirIcon" , QStyle::SP_DirIcon );
|
||||
namedInsert( "FileDialogBack", QStyle::SP_FileDialogBack );
|
||||
namedInsert( "FileDialogContentsView", QStyle::SP_FileDialogContentsView );
|
||||
namedInsert( "FileDialogDetailedView", QStyle::SP_FileDialogDetailedView );
|
||||
namedInsert( "icn05Dummy", QStyle::SP_FileDialogEnd );
|
||||
namedInsert( "icn06Dummy", QStyle::SP_FileDialogInfoView );
|
||||
namedInsert( "icn07Dummy", QStyle::SP_FileDialogListView );
|
||||
namedInsert( "icn08Dummy", QStyle::SP_FileDialogNewFolder );
|
||||
namedInsert( "icn09Dummy", QStyle::SP_FileDialogStart );
|
||||
namedInsert( "icn10Dummy", QStyle::SP_FileDialogToParent );
|
||||
namedInsert( "icn11Dummy", QStyle::SP_ArrowBack );
|
||||
namedInsert( "icn12Dummy", QStyle::SP_DirIcon );
|
||||
namedInsert( "icn13Dummy", QStyle::SP_MediaSkipBackward );
|
||||
namedInsert( "icn14Dummy", QStyle::SP_ArrowDown );
|
||||
namedInsert( "icn15Dummy", QStyle::SP_DirLinkIcon );
|
||||
namedInsert( "icn16Dummy", QStyle::SP_MediaSkipForward );
|
||||
namedInsert( "icn17Dummy", QStyle::SP_ArrowForward );
|
||||
namedInsert( "icn18Dummy", QStyle::SP_DirOpenIcon );
|
||||
namedInsert( "icn19Dummy", QStyle::SP_MediaStop );
|
||||
namedInsert( "icn20Dummy", QStyle::SP_ArrowLeft );
|
||||
namedInsert( "icn21Dummy", QStyle::SP_DockWidgetCloseButton );
|
||||
namedInsert( "icn22Dummy", QStyle::SP_MediaVolume );
|
||||
namedInsert( "icn23Dummy", QStyle::SP_ArrowRight );
|
||||
namedInsert( "icn24Dummy", QStyle::SP_DriveCDIcon );
|
||||
namedInsert( "icn25Dummy", QStyle::SP_MediaVolumeMuted );
|
||||
namedInsert( "icn26Dummy", QStyle::SP_ArrowUp );
|
||||
namedInsert( "icn27Dummy", QStyle::SP_DriveDVDIcon );
|
||||
namedInsert( "icn28Dummy", QStyle::SP_MessageBoxCritical );
|
||||
namedInsert( "icn29Dummy", QStyle::SP_BrowserReload );
|
||||
namedInsert( "icn30Dummy", QStyle::SP_DriveFDIcon );
|
||||
namedInsert( "icn31Dummy", QStyle::SP_MessageBoxInformation );
|
||||
namedInsert( "BrowserStop", QStyle::SP_BrowserStop );
|
||||
namedInsert( "icn33Dummy", QStyle::SP_DriveHDIcon );
|
||||
namedInsert( "icn34Dummy", QStyle::SP_MessageBoxQuestion );
|
||||
namedInsert( "icn35Dummy", QStyle::SP_CommandLink );
|
||||
namedInsert( "icn36Dummy", QStyle::SP_DriveNetIcon );
|
||||
namedInsert( "icn37Dummy", QStyle::SP_MessageBoxWarning );
|
||||
namedInsert( "icn38Dummy", QStyle::SP_ComputerIcon );
|
||||
namedInsert( "icn39Dummy", QStyle::SP_FileDialogBack );
|
||||
namedInsert( "icn40Dummy", QStyle::SP_TitleBarCloseButton );
|
||||
namedInsert( "icn41Dummy", QStyle::SP_CustomBase );
|
||||
namedInsert( "icn42Dummy", QStyle::SP_FileDialogContentsView );
|
||||
namedInsert( "icn43Dummy", QStyle::SP_TitleBarContextHelpButton );
|
||||
namedInsert( "DesktopIcon", QStyle::SP_DesktopIcon );
|
||||
namedInsert( "icn45Dummy", QStyle::SP_FileDialogDetailedView );
|
||||
namedInsert( "icn46Dummy", QStyle::SP_TitleBarMaxButton );
|
||||
namedInsert( "icn47Dummy", QStyle::SP_DialogApplyButton );
|
||||
namedInsert( "icn48Dummy", QStyle::SP_FileDialogEnd );
|
||||
namedInsert( "icn49Dummy", QStyle::SP_TitleBarMenuButton );
|
||||
namedInsert( "icn50Dummy", QStyle::SP_DialogCancelButton );
|
||||
namedInsert( "icn51Dummy", QStyle::SP_FileDialogInfoView );
|
||||
namedInsert( "icn52Dummy", QStyle::SP_TitleBarMinButton );
|
||||
namedInsert( "icn53Dummy", QStyle::SP_DialogCloseButton );
|
||||
namedInsert( "icn54Dummy", QStyle::SP_FileDialogListView );
|
||||
namedInsert( "icn55Dummy", QStyle::SP_TitleBarNormalButton );
|
||||
namedInsert( "icn56Dummy", QStyle::SP_DialogDiscardButton );
|
||||
namedInsert( "icn57Dummy", QStyle::SP_FileDialogNewFolder );
|
||||
namedInsert( "icn58Dummy", QStyle::SP_TitleBarShadeButton );
|
||||
namedInsert( "icn59Dummy", QStyle::SP_DialogHelpButton );
|
||||
namedInsert( "icn60Dummy", QStyle::SP_FileDialogStart );
|
||||
namedInsert( "icn61Dummy", QStyle::SP_TitleBarUnshadeButton );
|
||||
namedInsert( "icn62Dummy", QStyle::SP_DialogNoButton );
|
||||
namedInsert( "icn63Dummy", QStyle::SP_FileDialogToParent );
|
||||
namedInsert( "icn64Dummy", QStyle::SP_ToolBarHorizontalExtensionButton );
|
||||
namedInsert( "icn65Dummy", QStyle::SP_DialogOkButton );
|
||||
namedInsert( "FileIcon", QStyle::SP_FileIcon );
|
||||
namedInsert( "icn67Dummy", QStyle::SP_ToolBarVerticalExtensionButton );
|
||||
namedInsert( "icn68Dummy", QStyle::SP_DialogResetButton );
|
||||
namedInsert( "icn70Dummy", QStyle::SP_FileLinkIcon );
|
||||
namedInsert( "TrashIcon", QStyle::SP_TrashIcon );
|
||||
namedInsert( "icn72Dummy", QStyle::SP_DialogSaveButton );
|
||||
namedInsert( "icn73Dummy", QStyle::SP_MediaPause );
|
||||
namedInsert( "icn74Dummy", QStyle::SP_VistaShield );
|
||||
namedInsert( "icn75Dummy", QStyle::SP_DialogYesButton );
|
||||
namedInsert( "icn76Dummy", QStyle::SP_MediaPlay );
|
||||
namedInsert( "icn77Dummy", QStyle::SP_DirClosedIcon );
|
||||
namedInsert( "icn79Dummy", QStyle::SP_MediaSeekBackward );
|
||||
namedInsert( "DirHomeIcon", QStyle::SP_DirHomeIcon );
|
||||
namedInsert( "icn81Dummy", QStyle::SP_MediaSeekForward );
|
||||
/*
|
||||
auto from = to_underlying(QIcon::ThemeIcon::AddressBookNew);
|
||||
auto to = to_underlying(QIcon::ThemeIcon::NThemeIcons);
|
||||
@@ -134,8 +134,17 @@ namespace XQAppData
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
void namedInsert( const QString& key, QStyle::StandardPixmap pixmapID )
|
||||
{
|
||||
QIcon icon = QApplication::style()->standardIcon( pixmapID );
|
||||
insert( key, XQIcon( icon, key ) );
|
||||
//_keysToNames.insert()
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
QMap<qint64,QString> _keysToNames;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -150,18 +159,15 @@ namespace XQAppData
|
||||
|
||||
static XQAppIconMap s_IconMap;
|
||||
|
||||
bool hasTypeIcon(const QString& key )
|
||||
|
||||
XQIcon typeIcon(const QString& key )
|
||||
{
|
||||
if(s_IconMap.isEmpty())
|
||||
s_IconMap.init();
|
||||
return !key.isEmpty() && s_IconMap.contains(key);
|
||||
}
|
||||
|
||||
QIcon typeIcon(const QString& key )
|
||||
{
|
||||
if( hasTypeIcon(key) )
|
||||
if( s_IconMap.contains(key) )
|
||||
return s_IconMap[key];
|
||||
return QApplication::style()->standardIcon(QStyle::SP_TrashIcon);
|
||||
static XQIcon s_FallBackIcon( QApplication::style()->standardIcon( QStyle::SP_TrashIcon), "NoIcon" );
|
||||
return s_FallBackIcon;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -19,7 +19,8 @@
|
||||
#include <QVariant>
|
||||
#include <QMap>
|
||||
#include <QStringView>
|
||||
#include <QIcon>
|
||||
|
||||
#include <xqicon.h>
|
||||
#include <pugixml.hpp>
|
||||
|
||||
const QString c_Version = "0.1.1 04.09.2024";
|
||||
@@ -48,8 +49,7 @@ namespace XQAppData
|
||||
{
|
||||
//class XQAppIconMap;
|
||||
|
||||
bool hasTypeIcon(const QString& key );
|
||||
QIcon typeIcon(const QString& key );
|
||||
XQIcon typeIcon(const QString& key );
|
||||
}
|
||||
|
||||
#endif // XQAPPDATA_H
|
||||
|
@@ -34,47 +34,6 @@ XQMainModel::XQMainModel(QObject *parent )
|
||||
|
||||
}
|
||||
|
||||
|
||||
//! erzeugt einen eintrag in der baum-übersicht.
|
||||
|
||||
XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
||||
{
|
||||
|
||||
/*
|
||||
for(const auto& section : _sections )
|
||||
{
|
||||
qDebug() << " --- wtf1: " << contentNode->to_string();
|
||||
qDebug() << " --- wtf2: " << section.sheetRootNode->to_string();
|
||||
|
||||
if( contentNode->attribute("State") == section.sheetRootNode->attribute("State") )
|
||||
{
|
||||
//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 );
|
||||
// ??
|
||||
_treeTable->setCurrentIndex( section.modelIndex );
|
||||
newTreeentry->setContentNode(contentNode);
|
||||
emit xqItemCreated( newTreeentry );
|
||||
return newTreeentry;
|
||||
}
|
||||
}
|
||||
*/
|
||||
throw XQException( "createTreeEntry: main model should not be empty!" );
|
||||
}
|
||||
|
||||
//! leere default implementation
|
||||
|
||||
void XQMainModel::initContextMenu()
|
||||
|
@@ -32,7 +32,7 @@ public:
|
||||
explicit XQMainModel(QObject *parent = nullptr);
|
||||
virtual ~XQMainModel() = default;
|
||||
|
||||
XQItem* createTreeEntry( XQNodePtr contentNode );
|
||||
|
||||
|
||||
public slots:
|
||||
|
||||
|
@@ -68,28 +68,32 @@ bool XQItemFactory::isValid()
|
||||
}
|
||||
|
||||
|
||||
//! es reicht nicht, einen itemType aus den itemType-templates zu
|
||||
//! Es reicht nicht, einen itemType aus den itemType-templates zu
|
||||
//! holen: möglicherweise muss der noch mit zusätzlichen attributen
|
||||
//! ergänzt werden, (hier 'UnitType' ).
|
||||
//! ergänzt werden.
|
||||
//! Vom aufwand ist es auch egal, ob ich daten aus dem XML in das
|
||||
//! item oder den itemtyp schreiben muss.
|
||||
|
||||
XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
|
||||
{
|
||||
QString typeKey = sheetEntry->attribute("ItemType");
|
||||
QString typeKey = sheetEntry->attribute( c_ItemType );
|
||||
|
||||
XQItemType* itemType = findItemTypeTemplate(typeKey);
|
||||
|
||||
// wir prüfen, ob im sheetEntry noch zusätzliche attribute vorhanden
|
||||
// sind, die wir in dem itemType müssen
|
||||
|
||||
qDebug() << " --- makeItemType: " << sheetEntry->to_string();
|
||||
|
||||
// über alle attribute
|
||||
for (const auto& attr : sheetEntry->attributes())
|
||||
for (const auto& attrEntry : sheetEntry->attributes())
|
||||
{
|
||||
// prüfen, ob der itemType des attribute schon hat
|
||||
int role = itemType->hasAttribute( attr.first);
|
||||
int role = itemType->roleForAttributeKey( attrEntry.first );
|
||||
// wenn ja, überschreiben
|
||||
if( role != XQItem::NoRole )
|
||||
{
|
||||
QVariant newValue = makeVariant(role,attr.second);
|
||||
QVariant newValue = makeVariant(role, attrEntry.second );
|
||||
itemType = itemType->replaceAttribute( newValue, role );
|
||||
}
|
||||
|
||||
@@ -97,7 +101,7 @@ XQItemType* XQItemFactory::makeItemType(const XQNodePtr& sheetEntry )
|
||||
return itemType;
|
||||
}
|
||||
|
||||
//! firz!
|
||||
//! sucht einen item typ aus der map mit 'vorgefertigen' itemtypen.
|
||||
|
||||
XQItemType* XQItemFactory::findItemTypeTemplate(const QString& key ) const
|
||||
{
|
||||
@@ -107,7 +111,7 @@ XQItemType* XQItemFactory::findItemTypeTemplate(const QString& key ) const
|
||||
}
|
||||
|
||||
|
||||
//! firz!
|
||||
//! sucht eine model-beschreibung
|
||||
|
||||
XQNodePtr XQItemFactory::findModelSheet( const QString& modelName ) const
|
||||
{
|
||||
@@ -153,6 +157,7 @@ QVariant XQItemFactory::makeVariant( int dataRole, const QString& source ) const
|
||||
case XQItem::ItemTypeRole:
|
||||
{
|
||||
// itemType() -> XQItemType*
|
||||
qDebug() << " --- makeVariant: make ItemType: " << source;
|
||||
XQItemType* itemType = findItemTypeTemplate( source );
|
||||
value = QVariant::fromValue(itemType);
|
||||
break;
|
||||
@@ -202,10 +207,8 @@ QVariant XQItemFactory::makeVariant( int dataRole, const QString& source ) const
|
||||
|
||||
|
||||
case XQItem::IconRole:
|
||||
{
|
||||
QIcon typeIcon;
|
||||
if(XQAppData::hasTypeIcon(source))
|
||||
typeIcon = XQAppData::typeIcon(source);
|
||||
{
|
||||
QIcon typeIcon = XQAppData::typeIcon(source);
|
||||
value = QVariant::fromValue(typeIcon);
|
||||
break;
|
||||
}
|
||||
@@ -264,9 +267,8 @@ XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const XQNodePtr& co
|
||||
{
|
||||
// den itemtype des neuen items rausfinden
|
||||
QString typeKey = sheetNode->attribute(c_ItemType);
|
||||
qDebug() << " --- makeItem: typeKey: " << typeKey << ": " << sheetNode->to_string();
|
||||
//XQItemType* itemType = makeItemType(sheetEntry); // throws
|
||||
XQItemType* itemType = findItemTypeTemplate(typeKey);
|
||||
|
||||
XQItemType* itemType = makeItemType(sheetNode); // throws
|
||||
// fallunterscheidung beim inhalt:
|
||||
const QString* contentPtr{};
|
||||
// das ist Unterschied zum normalen Item: Der Titel kommt aus der Modelbeschreibung
|
||||
@@ -280,24 +282,8 @@ XQItem* XQItemFactory::makeItem( const XQNodePtr& sheetNode, const XQNodePtr& co
|
||||
|
||||
}
|
||||
|
||||
XQItemList XQItemFactory::makeHeaderRow( const XQNodePtr& headerNode )
|
||||
{
|
||||
|
||||
XQItemList list;
|
||||
// über alle kinder der <Header> sektion
|
||||
for( const auto& headerEntry : headerNode->children() )
|
||||
{
|
||||
//qDebug() << " --- headerEntry: " << headerEntry->tag_name() << ": " << headerEntry->attribute( "ItemType") << headerEntry->attribute( "Caption");
|
||||
XQItem* headerItem = makeItem( headerEntry );
|
||||
list.append( headerItem );
|
||||
}
|
||||
|
||||
return list;
|
||||
|
||||
}
|
||||
|
||||
|
||||
//! erzeugt eine header item row.
|
||||
//! erzeugt eine item-row.
|
||||
|
||||
XQItemList XQItemFactory::makeContentRow( const XQNodePtr& sheetNode, const XQNodePtr& contentNode )
|
||||
{
|
||||
|
@@ -34,7 +34,7 @@ public:
|
||||
|
||||
XQItem* makeItem( const XQNodePtr& sheetNode, const XQNodePtr& contentNode=nullptr);
|
||||
|
||||
XQItemList makeHeaderRow( const XQNodePtr& sheetNode );
|
||||
|
||||
XQItemList makeContentRow( const XQNodePtr& sheetNode, const XQNodePtr& contentNode );
|
||||
//XQItemList makeEmptyRow( const XQNodePtr& contentNode, const XQNodePtr& sheetNode );
|
||||
|
||||
|
@@ -70,18 +70,17 @@ void XQItemType::setData(const QVariant& value, int role )
|
||||
}
|
||||
|
||||
//! tested, ob ein attribute (z.B. unitType) hier vorhanden ist
|
||||
int XQItemType::hasAttribute( const QString& attrKey )
|
||||
int XQItemType::roleForAttributeKey( const QString& attrKey )
|
||||
{
|
||||
int role = XQItem::fetchItemDataRole(attrKey);
|
||||
// gibbed überhaupt eine rolle für unser attribut?
|
||||
if( role == XQItem::NoRole)
|
||||
return XQItem::NoRole;
|
||||
|
||||
// wenn ja, ist die role hier besetzt?
|
||||
QVariant value = data(role);
|
||||
if( !value.isValid() || value.isNull() )
|
||||
return XQItem::NoRole;
|
||||
|
||||
if( role != XQItem::NoRole)
|
||||
{
|
||||
// wenn ja, ist die role hier besetzt?
|
||||
QVariant value = data(role);
|
||||
if( !value.isValid() || value.isNull() )
|
||||
return XQItem::NoRole;
|
||||
}
|
||||
return role;
|
||||
}
|
||||
|
||||
@@ -91,6 +90,7 @@ int XQItemType::hasAttribute( const QString& attrKey )
|
||||
XQItemType* XQItemType::replaceAttribute( const QVariant& newValue, int role )
|
||||
{
|
||||
|
||||
qDebug() << " --- Before: " << makeItemTypeKey() << " role:" << XQItem::fetchItemDataRoleName(role) << " value:" << newValue.toString();
|
||||
// hat sich überhaupt was geändert?
|
||||
QVariant oldValue = data(role);
|
||||
|
||||
@@ -115,8 +115,10 @@ XQItemType* XQItemType::replaceAttribute( const QVariant& newValue, int role )
|
||||
|
||||
// speichern
|
||||
s_ItemTypeMap.insert( newKey, myClone );
|
||||
// und ins item übernehmen
|
||||
//item.setItemType( myClone );
|
||||
|
||||
|
||||
|
||||
qDebug() << " --- After: " << myClone->makeItemTypeKey();
|
||||
|
||||
/// Obacht! Der alte, geänderte itemType bleibt erhalten
|
||||
/// und verrottet ggf. ohne Daseinszweck
|
||||
@@ -131,6 +133,7 @@ XQItemType* XQItemType::replaceAttribute( const QVariant& newValue, int role )
|
||||
QVariant XQItemType::formatText( const XQItem& item ) const
|
||||
{
|
||||
XQItem::UnitType uType = unitType();
|
||||
//qDebug() << " --- formatText: " << XQItem::fetchUnitTypeToString( uType);
|
||||
const QString& cont = item.content();
|
||||
if( uType != XQItem::NoUnitType )
|
||||
return formatToSI( cont, uType );
|
||||
@@ -244,10 +247,11 @@ QString XQItemType::makeItemTypeKey()
|
||||
key = key.arg( renderStyleToString() );
|
||||
key = key.arg( editorTypeToString() );
|
||||
key = key.arg( unitTypeToString() );
|
||||
key = key.arg( contentFormat() );
|
||||
|
||||
key = key.arg( contentFormat() );
|
||||
key = key.arg( data(XQItem::FlagsRole).toString() );
|
||||
key = key.arg( icon().name() );
|
||||
// icons haben leider keine namen, es sei denn, sie kommen aus einen theme
|
||||
//key = key.arg( icon().name() );
|
||||
key = key.arg( icon().cacheKey() );
|
||||
key = key.arg( fixedChoicesToString() );
|
||||
|
||||
return key;
|
||||
|
@@ -40,12 +40,12 @@ public:
|
||||
QVariant data( int role ) const override;
|
||||
void setData(const QVariant& value, int role ) override;
|
||||
|
||||
virtual QVariant formatText( const XQItem& item ) const;
|
||||
QVariant formatText( const XQItem& item ) const;
|
||||
|
||||
QString formatToSI(const QString& rawText, XQItem::UnitType unitType ) const;
|
||||
QString unFormatFromSI(const QString& valueText ) const;
|
||||
|
||||
int hasAttribute( const QString& attrKey );
|
||||
int roleForAttributeKey( const QString& attrKey );
|
||||
XQItemType* replaceAttribute(const QVariant& newValue, int role );
|
||||
|
||||
QString makeItemTypeKey();
|
||||
|
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <QDebug>
|
||||
#include <QApplication>
|
||||
#include <QMetaType>
|
||||
|
||||
#include <xqmainwindow.h>
|
||||
|
||||
@@ -48,12 +49,13 @@ who is who:
|
||||
|
||||
*/
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
||||
QApplication app(argc, argv);
|
||||
|
||||
QIcon icon;
|
||||
|
||||
//app.setStyle("fusion");
|
||||
XQMainWindow window;
|
||||
window.show();
|
||||
|
@@ -38,7 +38,6 @@ bool XQModelSection::operator==(const XQModelSection& other) const
|
||||
|
||||
bool XQModelSection::isValid() const
|
||||
{
|
||||
qDebug() << " mi: " << modelIndex.isValid() << " sheetNode: " << (bool)(sheetRootNode);
|
||||
return modelIndex.isValid() && sheetRootNode;
|
||||
}
|
||||
|
||||
@@ -62,7 +61,6 @@ XQItem& XQModelSection::XQModelSection::headerItem() const
|
||||
|
||||
bool XQModelSectionList::hasValidSection(const QString& sectionKey) const
|
||||
{
|
||||
qDebug() << " ---- FIND section: " << sectionKey << ":" << contains(sectionKey) << ":" << at(sectionKey).isValid();
|
||||
if (!contains(sectionKey) )
|
||||
return false;
|
||||
return at(sectionKey).isValid();
|
||||
|
@@ -107,8 +107,7 @@ void XQViewModel::initModel(const QString& modelName)
|
||||
// #2: (optionalen?) header erzeugen
|
||||
const XQNodePtr header = section->find_child_by_tag_name( "Header");
|
||||
if( header )
|
||||
{
|
||||
//XQItemList list = _itemFactory.makeHeaderRow( header );
|
||||
{
|
||||
XQItemList list = _itemFactory.makeContentRow( header, nullptr );
|
||||
addSection(list, section );
|
||||
}
|
||||
@@ -318,7 +317,7 @@ void XQViewModel::cmdCutUndo( XQCommand& command )
|
||||
const XQNodePtr& savedNode = entry.contentNode;
|
||||
// __fix! should not be _contentRoot!
|
||||
savedNode->add_me_at( entry.nodePos, _contentRoot );
|
||||
XQItemList list = _itemFactory.makeContentRow( savedNode, section.sheetRootNode );
|
||||
XQItemList list = _itemFactory.makeContentRow( section.sheetRootNode, savedNode );
|
||||
|
||||
XQItem& firstItem = *((XQItem*)list[0]);
|
||||
qDebug() << " --- Cut Undo: " << firstItem.text() << " " << firstItem.row() << " id#" << entry.contentNode->_id << " count: " << entry.contentNode.use_count();
|
||||
@@ -353,7 +352,7 @@ void XQViewModel::cmdPaste( XQCommand& command )
|
||||
XQNodePtr newNode = entry.contentNode->clone(section.contentRootNode );
|
||||
newNode->clone(section.contentRootNode )->add_me_at( nodePos );
|
||||
// ... und damit eine frische item-row erzeugen
|
||||
XQItemList list = _itemFactory.makeContentRow( newNode, section.sheetRootNode );
|
||||
XQItemList list = _itemFactory.makeContentRow( section.sheetRootNode, newNode );
|
||||
insertRow( insRow, list );
|
||||
// die neue item-row selektieren
|
||||
const QModelIndex& selIdx = list[0]->index();
|
||||
|
@@ -43,6 +43,7 @@ HEADERS += \
|
||||
util/xsingleton.h \
|
||||
util/xtreewalker.h \
|
||||
widgets/xqcontextmenu.h \
|
||||
widgets/xqicon.h \
|
||||
widgets/xqtreetable.h
|
||||
|
||||
SOURCES += \
|
||||
@@ -67,6 +68,7 @@ SOURCES += \
|
||||
pugixml/pugixml.cpp \
|
||||
util/xqexception.cpp \
|
||||
widgets/xqcontextmenu.cpp \
|
||||
widgets/xqicon.cpp \
|
||||
widgets/xqtreetable.cpp
|
||||
|
||||
|
||||
|
@@ -9,38 +9,17 @@
|
||||
<ItemTypes>
|
||||
<TreeParentType RenderStyle="PlainStyle" ItemFlags="IsEnabled|IsDropEnabled" Icon="DirIcon" />
|
||||
<TreeChildType RenderStyle="PlainStyle" ItemFlags="IsCheckable|IsEnabled|IsDragEnabled|IsSelectable|IsDropEnabled"/>
|
||||
<HeaderType RenderStyle="HeaderStyle" ItemFlags="IsEnabled" Icon="battery"/>
|
||||
<HeaderType RenderStyle="HeaderStyle" ItemFlags="IsCheckable|IsEnabled" Icon="DirIcon"/>
|
||||
<HiddenType RenderStyle="HiddenStyle"/>
|
||||
<StaticType RenderStyle="PlainStyle"/>
|
||||
<PlainType RenderStyle="PlainStyle" ItemFlags="IsEnabled|IsEditable|IsSelectable"/>
|
||||
<ValueType RenderStyle="FormattedStyle" ItemFlags="IsEnabled|IsEditable|IsSelectable" UnitType="Coulomb"/>
|
||||
<ValueType RenderStyle="FormattedStyle" ItemFlags="IsEnabled|IsEditable|IsSelectable" Icon="DirIcon" UnitType="Coulomb"/>
|
||||
<PercentageType RenderStyle="ProgressBarStyle" ItemFlags="IsEnabled|IsSelectable"/>
|
||||
<ChoiceType RenderStyle="ComboBoxStyle" ItemFlags="IsEnabled|IsSelectable|IsEditable" FixedChoices="la|le|lo|lu"/>
|
||||
<IntValueType RenderStyle="SpinBoxStyle" ItemFlags="IsEnabled|IsSelectable"/>
|
||||
</ItemTypes>
|
||||
|
||||
<!--
|
||||
DocumentTreeModel
|
||||
|
||||
-->
|
||||
<!--
|
||||
<DocumentTreeModel>
|
||||
<ActiveProjects ItemType="PlainType" HeaderItemType="TreeParentType" HeaderCaption="Active Projects" State="runnning">
|
||||
<Project ItemType="TreeChildType" Icon="list-add"/>
|
||||
</ActiveProjects>
|
||||
<PlannedProjects HeaderItemType="TreeParentType" HeaderCaption="Planned Projects" State="planned">
|
||||
<Project ItemType="TreeChildType" Icon="list-add"/>
|
||||
</PlannedProjects>
|
||||
<FinishedProjects HeaderItemType="TreeParentType" HeaderCaption="Finished Projects" State="finished">
|
||||
<Project ItemType="TreeChildType" Icon="list-remove"/>
|
||||
</FinishedProjects>
|
||||
</DocumentTreeModel>
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
DocumentDetailsModel:
|
||||
-->
|
||||
<DocumentTreeModel>
|
||||
<Section ContentType="runnning">
|
||||
<Header>
|
||||
@@ -66,7 +45,6 @@
|
||||
<Project Caption="@ProjectName" ItemType="TreeParentType"/>
|
||||
</Data>
|
||||
</Section>
|
||||
|
||||
</DocumentTreeModel>
|
||||
|
||||
|
||||
@@ -88,11 +66,11 @@
|
||||
</Header>
|
||||
<Data>
|
||||
<!-- 'Icon' überschreibt den default wert im ItemType und erzeugt damit einen neuen ItemType-->
|
||||
<PanelID ItemType="PlainType" Icon="FileIcon"/>
|
||||
<PanelName ItemType="PlainType"/>
|
||||
<PanelID ItemType="PlainType" Icon="DesktopIcon"/>
|
||||
<PanelName ItemType="PlainType" Icon="BrowserStop"/>
|
||||
<Manufacturer ItemType="ValueType"/>
|
||||
<!-- 'UnitType' überschreibt den default wert im ItemType und erzeugt damit einen neuen ItemType-->
|
||||
<WattPeak ItemType="ValueType" UnitType="Wp"/>
|
||||
<WattPeak ItemType="ValueType" UnitType="Wp" Icon="DesktopIcon"/>
|
||||
<Width ItemType="ValueType" UnitType="m"/>
|
||||
<Height ItemType="ValueType" UnitType="m"/>
|
||||
<Weight ItemType="ValueType" UnitType="kg"/>
|
||||
@@ -101,83 +79,7 @@
|
||||
</Data>
|
||||
</Section>
|
||||
|
||||
<Section ContentType="Inverter">
|
||||
<Header Marker="Inverter">
|
||||
<InverterID Caption="Inverter" ItemType="HeaderType" />
|
||||
<InverterName Caption="Name" ItemType="HeaderType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="HeaderType" />
|
||||
<MaxPowerInput Caption="max. Input" ItemType="HeaderType" />
|
||||
<MaxPowerOutput Caption="max Output" ItemType="HeaderType" />
|
||||
<NumStrings Caption="Strings" ItemType="HeaderType" />
|
||||
<Weight Caption="Weight" ItemType="HeaderType" />
|
||||
</Header>
|
||||
<Data>
|
||||
<InverterID Caption="Inverter" ItemType="ValueType" />
|
||||
<InverterName Caption="Name" ItemType="ValueType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="ValueType" />
|
||||
<MaxPowerInput Caption="max. Input" ItemType="ValueType" ItemType="ChoiceType" ChoiceDataSource="MaxPowerInputChoice" UnitType="W"/>
|
||||
<MaxPowerOutput Caption="max Output" ItemType="ValueType" UnitType="W"/>
|
||||
<NumStrings Caption="Strings" ItemType="ValueType" />
|
||||
<Weight Caption="Weight" ItemType="ValueType" UnitType="kg"/>
|
||||
</Data>
|
||||
</Section>
|
||||
|
||||
<Section ContentType="Battery">
|
||||
<Header Marker="Battery">
|
||||
<BatteryID Caption="Name" ItemType="HeaderType" />
|
||||
<BatteryName Caption="Battery" ItemType="HeaderType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="HeaderType" />
|
||||
<Capacity Caption="Capacity" ItemType="HeaderType"/>
|
||||
<Yield Caption="Yield" ItemType="HeaderType" />
|
||||
<MaxCurrent Caption="max. Current" ItemType="HeaderType" />
|
||||
<MaxVolt Caption="max. Volt" ItemType="HeaderType" />
|
||||
</Header>
|
||||
<Data>
|
||||
<BatteryID Caption="Battery" ItemType="ValueType" />
|
||||
<BatteryName Caption="Name" ItemType="ValueType" />
|
||||
<Manufacturer Caption="Manufacturer" ItemType="ValueType" />
|
||||
<Capacity Caption="Capacity" ItemType="ValueType" UnitType="Wh"/>
|
||||
<Yield Caption="Yield" ItemType="ValueType" ItemType="PercentageType" UnitType="%"/>
|
||||
<MaxCurrent Caption="max. Current" ItemType="ValueType" UnitType="A"/>
|
||||
<MaxVolt Caption="max. Volt" ItemType="ValueType" UnitType="V"/>
|
||||
</Data>
|
||||
</Section>
|
||||
|
||||
</DocumentDetailsModel>
|
||||
|
||||
|
||||
<DocumentDetailsModelX>
|
||||
|
||||
<Panel FriendlyName="@PanelName">
|
||||
<PanelID HeaderCaption="Panel" HeaderItemType="HeaderType" ItemType="PlainType" Icon="icn74Dummy"/>
|
||||
<PanelName HeaderCaption="Name" HeaderItemType="HeaderType" ItemType="PlainType"/>
|
||||
<Manufacturer HeaderCaption="Manufacturer" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<WattPeak HeaderCaption="Watt Peak" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="Wp"/>
|
||||
<Width HeaderCaption="Width" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="m"/>
|
||||
<Height HeaderCaption="Height" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="m"/>
|
||||
<Weight HeaderCaption="Weight" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="kg"/>
|
||||
<MaxVolt HeaderCaption="max. Volt" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="V"/>
|
||||
<MaxAmpere HeaderCaption="max. Ampere" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="A"/>
|
||||
</Panel>
|
||||
|
||||
<Inverter FriendlyName="@InverterName">
|
||||
<InverterID HeaderCaption="Inverter" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<InverterName HeaderCaption="Name" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<Manufacturer HeaderCaption="Manufacturer" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<MaxPowerInput HeaderCaption="max. Input" HeaderItemType="HeaderType" ItemType="ChoiceType" ChoiceDataSource="MaxPowerInputChoice" UnitType="W"/>
|
||||
<MaxPowerOutput HeaderCaption="max Output" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="W"/>
|
||||
<NumStrings HeaderCaption="Strings" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<Weight HeaderCaption="Weight" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="kg"/>
|
||||
</Inverter>
|
||||
|
||||
<Battery FriendlyName="@BatteryName">
|
||||
<BatteryID HeaderCaption="Battery" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<BatteryName HeaderCaption="Name" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<Manufacturer HeaderCaption="Manufacturer" HeaderItemType="HeaderType" ItemType="ValueType"/>
|
||||
<Capacity HeaderCaption="Capacity" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="Wh"/>
|
||||
<Yield HeaderCaption="Yield" HeaderItemType="HeaderType" ItemType="PercentageType" UnitType="%"/>
|
||||
<MaxCurrent HeaderCaption="max. Current" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="A"/>
|
||||
<MaxVolt HeaderCaption="max. Volt" HeaderItemType="HeaderType" ItemType="ValueType" UnitType="V"/>
|
||||
</Battery>
|
||||
|
||||
</DocumentDetailsModelX>
|
||||
|
Reference in New Issue
Block a user