5 Commits

Author SHA1 Message Date
0f8addbe7f add ignore 2025-09-13 22:54:25 +02:00
b6890257f1 cosmetics 2025-09-13 22:53:32 +02:00
10752908ca try to fix vcx proj 2025-09-13 22:44:33 +02:00
32c5121fcd Merge branch 'experimental/qml-edit' into experimental/add-tree-children
# Conflicts:
#	src/application/xqchildmodel.cpp
2025-09-12 17:21:35 +02:00
Christoph Holzheuer
d07ef3fbf9 First steps. 2025-09-12 15:38:06 +02:00
16 changed files with 218 additions and 186 deletions

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ UsersC998D~1.HOLAppDataLocalTemptmpj0mbo3rd
xml/fitzefatz.xml
build*
doc/
src/xtree.vcxproj.user

View File

@@ -33,18 +33,38 @@ TreeView
//color: TreeView.isSelected ? "#d0eaff" : (row % 2 === 0 ? "#f9f9f9" : "#ffffff")
//color: TreeView.isSelected ? "#d0eaff" : (row % 2 === 0 ? "#f9f9f9" : "#ffffff")
TextField
{
id: entry
id: currentEntry
anchors.centerIn: parent
text: display
font.pixelSize: 12
background: Rectangle
{
//color: entry.enabled ? "transparent" : "#353637"
//border.color: entry.enabled ? "#21be2b" : "transparent"
border.color: "transparent"
// Ändere die Border-Farbe je nachdem, ob das Feld den Fokus hat
property color borderColor: currentEntry.activeFocus ? "dodgerblue" : "gray"
property int borderWidth: currentEntry.activeFocus ? 2 : 1
background: Rectangle {
// Die Farbe des Hintergrunds im Normalzustand
color: "#ffffff"
// Hier werden Rahmenfarbe und -breite definiert
border.color: currentEntry.borderColor
border.width: currentEntry.borderWidth
// Abgerundete Ecken für ein modernes Aussehen
radius: 4
// Sanfter Übergang der Rahmenfarbe und -breite
Behavior on border.color {
ColorAnimation { duration: 150 }
}
Behavior on border.width {
NumberAnimation { duration: 150 }
}
}
onEditingFinished:

View File

@@ -49,6 +49,7 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
// Das ist hier der Typ des Eintrags: Panel, Battery ...
QString key = contentEntry->tag_name();
// 'silent failure' hier der Datenbaum kann auch Knoten enthalten
// die nicht für uns gedacht sind.
if (!_sections.hasValidSection(key))
@@ -67,9 +68,12 @@ void XQChildModel::addModelData( const XQNodePtr& contentRoot )
// _hinter_ der letzen zeile einfügen
insertRow( newRow+1, list);
if( contentEntry->has_children() )
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

View File

@@ -183,6 +183,7 @@ bool XQItem::hasContentNode() const
XQItem& firstItem = xqItemFromIndex( pIndex );
return firstItem.hasContentNode();
}
return false;
}
//! gibt den content-node zurück.

View File

@@ -52,7 +52,7 @@ public:
//! kontruktor mit dem zusändigen viewModel
XQItemDelegate::XQItemDelegate( XQViewModel& viewModel)
: _modelView{viewModel}
: QStyledItemDelegate(), _modelView{viewModel}
{
static XQItemEditorFactory s_EditorFactory;
setItemEditorFactory(&s_EditorFactory);
@@ -86,6 +86,7 @@ void XQItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option
{
case XQItem::HeaderStyle :
return drawHeaderStyle( painter, option, item );
//return drawHeaderStyleX( painter, option, index );
case XQItem::ComboBoxStyle :
return drawComboBoxStyle( painter, option, item );
@@ -122,8 +123,8 @@ void XQItemDelegate::drawHeaderStyle(QPainter* painter, const QStyleOptionViewIt
// use the header as "parent" for style init
QWidget* srcWidget = treeTable();//->header();
headerOption.initFrom(srcWidget);
headerOption.text = item.text();
headerOption.rect = option.rect.adjusted(0,0,0,3);
headerOption.text = item.text();//index.data(Qt::DisplayRole).toString();
headerOption.rect = option.rect;//.adjusted(0,0,0,3);
headerOption.styleObject = option.styleObject;
// __ch: reduce inner offset when painting
headerOption.textAlignment |= Qt::AlignVCenter;
@@ -131,12 +132,20 @@ void XQItemDelegate::drawHeaderStyle(QPainter* painter, const QStyleOptionViewIt
// save painter
painter->save();
//value = index.data(Qt::ForegroundRole);
//if (value.canConvert<QBrush>())
//headerOption.palette.setBrush(QPalette::Text, Qt::red );
//headerOption.palette.setBrush(QPalette::Window, Qt::red );
//QCommonStyle itemStyle;
QStyle* widgetStyle = srcWidget->style();
widgetStyle->drawControl(QStyle::CE_Header, &headerOption, painter, srcWidget);
//qApp->style()->drawControl(QStyle::CE_Header, &headerOption, painter, srcWidget);
//srcWidget->style()->drawControl(QStyle::CE_Header, &headerOption, painter, srcWidget);
// warum das nur mit dem commonstyle, ist mir echt unklar.
_commonStyle.drawControl(QStyle::CE_Header, &headerOption, painter, srcWidget);
// restore painter
painter->restore();
}
@@ -161,14 +170,12 @@ void XQItemDelegate::drawColorBarStyle(QPainter* painter, const QStyleOptionView
painter->setRenderHint(QPainter::Antialiasing);
QRect barRect(rect.left(), rect.top(), barWidth, rect.height());
QColor barColor = QColor(100, 180, 255); // z.B. hellblau
QColor barColor = QColor(100, 180, 255);
painter->setBrush(barColor);
painter->setPen(Qt::NoPen);
painter->drawRect(barRect);
// Text (Zahl) zentriert zeichnen
painter->setPen(Qt::black);
//painter->drawText(rect, Qt::AlignCenter, QString::number(value)+" %");
painter->drawText(rect, Qt::AlignCenter, item.text() );
painter->restore();
@@ -197,6 +204,8 @@ void XQItemDelegate::drawComboBoxStyle(QPainter* painter, const QStyleOptionView
// save painter
painter->save();
// hier wiederum funktioniert der '_commonStyle' nicht
QStyle* widgetStyle = srcWidget->style();
// draw combo
widgetStyle->drawComplexControl(QStyle::CC_ComboBox, &comboOption, painter, srcWidget);
@@ -219,8 +228,6 @@ void XQItemDelegate::drawSpinBoxStyle(QPainter* painter, const QStyleOptionViewI
QStyleOptionSpinBox spinBoxOption;
spinBoxOption.initFrom(srcWidget);
// 1. Grundlegende Optionen initialisieren und Hintergrund zeichnen (wichtig für Selektion)
initStyleOption(&viewOption, item.index());
if (option.state & QStyle::State_HasFocus)
{
@@ -228,16 +235,15 @@ void XQItemDelegate::drawSpinBoxStyle(QPainter* painter, const QStyleOptionViewI
}
QApplication::style()->drawPrimitive(QStyle::PE_PanelItemViewItem, &viewOption, painter);
spinBoxOption.rect = option.rect;
spinBoxOption.rect = option.rect;//.adjusted( 0,0,-40,0);
spinBoxOption.state = option.state | QStyle::State_Sunken; // Sunken-State für den "LineEdit"-Look
spinBoxOption.buttonSymbols = QAbstractSpinBox::UpDownArrows;
spinBoxOption.stepEnabled = QAbstractSpinBox::StepUpEnabled | QAbstractSpinBox::StepDownEnabled;
spinBoxOption.frame = true;
QStyle* widgetStyle = srcWidget->style();
widgetStyle->drawComplexControl(QStyle::CC_SpinBox, &spinBoxOption, painter, nullptr);
QRect editRect = widgetStyle->subControlRect(QStyle::CC_SpinBox, &spinBoxOption, QStyle::SC_SpinBoxEditField, nullptr);
painter->drawText(editRect.adjusted(1, 0, -1, 0), Qt::AlignCenter, item.text());
_commonStyle.drawComplexControl(QStyle::CC_SpinBox, &spinBoxOption, painter, nullptr);
QRect editRect =_commonStyle.subControlRect(QStyle::CC_SpinBox, &spinBoxOption, QStyle::SC_SpinBoxEditField, nullptr);
painter->drawText(spinBoxOption.rect, Qt::AlignCenter, item.text());
}

View File

@@ -16,6 +16,7 @@
#define XQITEMDELEGATE_H
#include <QStyledItemDelegate>
#include <QCommonStyle>
#include <xqappdata.h>
class XQItem;
@@ -52,6 +53,7 @@ protected:
void drawSpinBoxStyle(QPainter* painter, const QStyleOptionViewItem& option, const XQItem& item) const;
XQViewModel& _modelView;
QCommonStyle _commonStyle;
};

View File

@@ -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

View File

@@ -33,6 +33,7 @@ public:
XQNodePtr findModelSheet( const QString& modelName ) const;
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 );
void setItemTypeDataFromString( XQItem& item, const QString& roleKey, const QString& source ) const;

View File

@@ -4,9 +4,6 @@
#include <vector>
#include <map>
//#include <znode_stringmap.h>
//#include <znode_attributes.h>
namespace znode
{
template<typename str_t>

View File

@@ -7,14 +7,14 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "xtree", "xtree.vcxproj", "{
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
Debug|x64 = Debug|x64
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Debug|x86.ActiveCfg = Debug|Win32
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Debug|x86.Build.0 = Debug|Win32
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Release|x86.ActiveCfg = Release|Win32
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Release|x86.Build.0 = Release|Win32
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Debug|x64.ActiveCfg = Debug|x64
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Debug|x64.Build.0 = Debug|x64
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Release|x64.ActiveCfg = Release|x64
{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@@ -5,16 +5,26 @@
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D9E56CB4-F99F-4F88-B721-1443A0AFD5D0}</ProjectGuid>
<Keyword>QtVS_v304</Keyword>
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(Configuration)|$(Platform)'=='Release|x64'">10.0</WindowsTargetPlatformVersion>
<QtMsBuild Condition="'$(QtMsBuild)'=='' OR !Exists('$(QtMsBuild)\qt.targets')">$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@@ -24,6 +34,12 @@
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
@@ -31,13 +47,25 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt_defaults.props')">
<Import Project="$(QtMsBuild)\qt_defaults.props" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="QtSettings">
<QtInstall>qt691</QtInstall>
<QtModules>core;gui;widgets</QtModules>
<QtInstall>qt692</QtInstall>
<QtModules>core;gui;quick;quickcontrols2;quickdialogs2;quicklayouts;widgets;quickwidgets</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="QtSettings">
<QtInstall>qt692</QtInstall>
<QtModules>core;gui;quick;widgets;quickwidgets</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="QtSettings">
@@ -45,6 +73,11 @@
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>release</QtBuildConfig>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="QtSettings">
<QtInstall>VS2017x86Default</QtInstall>
<QtModules>core;gui;widgets</QtModules>
<QtBuildConfig>release</QtBuildConfig>
</PropertyGroup>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
@@ -54,13 +87,22 @@
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(QtMsBuild)\Qt.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'">
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'">
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
@@ -69,6 +111,12 @@
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<AdditionalIncludeDirectories>items;model;application;widgets;util;nodes;pugixml;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|Win32'" Label="Configuration">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@@ -81,6 +129,18 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)' == 'Release|Win32'" Label="Configuration">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
@@ -97,62 +157,70 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<ConformanceMode>true</ConformanceMode>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<QtRcc Include="xtree.qrc" />
<QtUic Include="application\xqmainwindow.ui" />
<ClCompile Include="application\xqappdata.cpp" />
<ClCompile Include="application\xqchildmodelview.cpp" />
<ClCompile Include="application\xqchildmodel.cpp" />
<ClCompile Include="application\xqdocumentstore.cpp" />
<ClCompile Include="application\xqmainmodelview.cpp" />
<ClCompile Include="application\xqmainmodel.cpp" />
<ClCompile Include="application\xqmainwindow.cpp" />
<ClCompile Include="items\xqgenericitem.cpp" />
<ClCompile Include="items\xqitem.cpp" />
<ClCompile Include="items\xqitemdelegate.cpp" />
<ClCompile Include="items\xqitemfactory.cpp" />
<ClCompile Include="items\xqitemtype.cpp" />
<ClCompile Include="model\xqcommand.cpp" />
<ClCompile Include="model\xqitemtype.cpp" />
<ClCompile Include="model\xqitemtypefactory.cpp" />
<ClCompile Include="model\xqnodewriter.cpp" />
<ClCompile Include="model\xqsectionmanager.cpp" />
<ClCompile Include="model\xqselectionmodel.cpp" />
<ClCompile Include="model\xqitem.cpp" />
<ClCompile Include="model\xqmodelview.cpp" />
<ClCompile Include="model\xqmodelsections.cpp" />
<ClCompile Include="model\xqsimpleclipboard.cpp" />
<ClCompile Include="model\xqitemfactory.cpp" />
<ClCompile Include="model\xqnode.cpp" />
<ClCompile Include="model\xqviewmodel.cpp" />
<ClCompile Include="nodes\znode.cpp" />
<ClCompile Include="pugixml\pugixml.cpp" />
<ClCompile Include="util\xqexception.cpp" />
<ClCompile Include="widgets\xqitemdelegate.cpp" />
<ClCompile Include="widgets\xqcontextmenu.cpp" />
<ClCompile Include="widgets\xqtreeview.cpp" />
<ClCompile Include="widgets\xqquickwidget.cpp" />
<ClCompile Include="widgets\xqtreetable.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="application\xqchildmodelview.h" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="application\xqmainmodelview.h" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="application\xqmainwindow.h" />
</ItemGroup>
<ItemGroup>
<QtMoc Include="widgets\xqtreetable.h" />
<QtMoc Include="widgets\xqquickwidget.h" />
<QtMoc Include="application\xqdocumentstore.h" />
<ClInclude Include="application\xqappdata.h" />
<ClInclude Include="items\xqgenericitem.h" />
<QtMoc Include="application\xqchildmodel.h" />
<QtMoc Include="application\xqmainmodel.h" />
<ClInclude Include="items\xqitem.h" />
<ClInclude Include="items\xqitemdelegate.h" />
<ClInclude Include="items\xqitemfactory.h" />
<ClInclude Include="items\xqitemtype.h" />
<ClInclude Include="model\xqcommand.h" />
<ClInclude Include="model\xqmodelsections.h" />
<ClInclude Include="model\xqnodewriter.h" />
<ClInclude Include="model\xqsectionmanager.h" />
<ClInclude Include="model\xqsimpleclipboard.h" />
<ClInclude Include="model\xqnode.h" />
<QtMoc Include="model\xqviewmodel.h" />
<ClInclude Include="nodes\znode.h" />
<ClInclude Include="nodes\znode_attributes.h" />
<ClInclude Include="nodes\znode_factory.h" />
<ClInclude Include="nodes\znode_id.h" />
<ClInclude Include="nodes\znode_iterator.h" />
@@ -166,10 +234,7 @@
<ClInclude Include="util\xqptrmaptor.h" />
<ClInclude Include="util\xsingleton.h" />
<ClInclude Include="util\xtreewalker.h" />
<QtMoc Include="widgets\xqtreeview.h" />
<QtMoc Include="widgets\xqcontextmenu.h" />
<QtMoc Include="widgets\xqitemdelegate.h" />
<QtMoc Include="model\xqmodelview.h" />
<QtMoc Include="model\xqselectionmodel.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

View File

@@ -76,42 +76,21 @@
<ClCompile Include="model\xqcommand.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqitem.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqmodelview.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqnode.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="application\xqmainmodelview.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
<ClCompile Include="application\xqmainwindow.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
<ClCompile Include="nodes\znode.cpp">
<Filter>Source Files\nodes</Filter>
</ClCompile>
<ClCompile Include="widgets\xqitemdelegate.cpp">
<Filter>Source Files\widgets</Filter>
</ClCompile>
<ClCompile Include="widgets\xqtreeview.cpp">
<Filter>Source Files\widgets</Filter>
</ClCompile>
<ClCompile Include="pugixml\pugixml.cpp">
<Filter>Source Files\pugixml</Filter>
</ClCompile>
<ClCompile Include="model\xqmodelsections.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqselectionmodel.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="application\xqchildmodelview.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
<ClCompile Include="model\xqsimpleclipboard.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
@@ -127,21 +106,9 @@
<ClCompile Include="model\xqnodewriter.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqitemfactory.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="application\xqappdata.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
<ClCompile Include="model\xqitemtypefactory.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqitemtype.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="items\xqgenericitem.cpp">
<Filter>Source Files\Items</Filter>
</ClCompile>
<ClCompile Include="items\xqitem.cpp">
<Filter>Source Files\Items</Filter>
</ClCompile>
@@ -154,6 +121,24 @@
<ClCompile Include="items\xqitemtype.cpp">
<Filter>Source Files\Items</Filter>
</ClCompile>
<ClCompile Include="model\xqsectionmanager.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="model\xqviewmodel.cpp">
<Filter>Source Files\model</Filter>
</ClCompile>
<ClCompile Include="widgets\xqquickwidget.cpp">
<Filter>Source Files\widgets</Filter>
</ClCompile>
<ClCompile Include="widgets\xqtreetable.cpp">
<Filter>Source Files\widgets</Filter>
</ClCompile>
<ClCompile Include="application\xqchildmodel.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
<ClCompile Include="application\xqmainmodel.cpp">
<Filter>Source Files\application</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="model\xqcommand.h">
@@ -183,9 +168,6 @@
<ClInclude Include="pugixml\pugixml.hpp">
<Filter>Header Files\pugixml</Filter>
</ClInclude>
<ClInclude Include="model\xqmodelsections.h">
<Filter>Header Files\model</Filter>
</ClInclude>
<ClInclude Include="util\xqmapindex.h">
<Filter>Header Files\util</Filter>
</ClInclude>
@@ -216,12 +198,6 @@
<ClInclude Include="nodes\znode_payload.h">
<Filter>Header Files\nodes</Filter>
</ClInclude>
<ClInclude Include="nodes\znode_attributes.h">
<Filter>Header Files\nodes</Filter>
</ClInclude>
<ClInclude Include="items\xqgenericitem.h">
<Filter>Header Files\items</Filter>
</ClInclude>
<ClInclude Include="items\xqitem.h">
<Filter>Header Files\items</Filter>
</ClInclude>
@@ -234,33 +210,36 @@
<ClInclude Include="items\xqitemtype.h">
<Filter>Header Files\items</Filter>
</ClInclude>
<ClInclude Include="model\xqsectionmanager.h">
<Filter>Header Files\model</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<QtMoc Include="model\xqmodelview.h">
<Filter>Header Files\model</Filter>
</QtMoc>
<QtMoc Include="application\xqmainmodelview.h">
<Filter>Header Files\application</Filter>
</QtMoc>
<QtMoc Include="application\xqmainwindow.h">
<Filter>Header Files\application</Filter>
</QtMoc>
<QtMoc Include="widgets\xqitemdelegate.h">
<Filter>Header Files\widgets</Filter>
</QtMoc>
<QtMoc Include="widgets\xqtreeview.h">
<Filter>Header Files\widgets</Filter>
</QtMoc>
<QtMoc Include="widgets\xqcontextmenu.h">
<Filter>Header Files\widgets</Filter>
</QtMoc>
<QtMoc Include="model\xqselectionmodel.h">
<Filter>Header Files\model</Filter>
</QtMoc>
<QtMoc Include="application\xqchildmodelview.h">
<QtMoc Include="application\xqdocumentstore.h">
<Filter>Header Files\application</Filter>
</QtMoc>
<QtMoc Include="application\xqdocumentstore.h">
<QtMoc Include="model\xqviewmodel.h">
<Filter>Header Files\model</Filter>
</QtMoc>
<QtMoc Include="widgets\xqquickwidget.h">
<Filter>Header Files\widgets</Filter>
</QtMoc>
<QtMoc Include="widgets\xqtreetable.h">
<Filter>Header Files\widgets</Filter>
</QtMoc>
<QtMoc Include="application\xqchildmodel.h">
<Filter>Header Files\application</Filter>
</QtMoc>
<QtMoc Include="application\xqmainmodel.h">
<Filter>Header Files\application</Filter>
</QtMoc>
</ItemGroup>

View File

@@ -1,12 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
<PropertyGroup Label="QtSettings" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<QtTouchProperty>
</QtTouchProperty>
</PropertyGroup>
</Project>

View File

@@ -15,9 +15,8 @@
<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"/>
<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"/>
<AdditionalData DataItem="Manual" DataValue="manual.docx"/>
<AdditionalData DataItem="Certificate" DataValue="certificate.pdf"/>
<Images FrontView="image.png" PackageView="package.png" InstalledView="installed.png"/>
<Documents Manual="manual.docx" Certificate="certificate.pdf"/>
</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="#3 BYD 03" FriendlyName="@BatteryName" BatteryName="03 BYD T01 Stackable" Manufacturer="BYD" Capacity="4500" Yield="86" MaxCurrent="120" MaxVolt="48"/>

View File

@@ -124,8 +124,18 @@
<Manufacturer ItemType="PlainType" />
<Capacity ItemType="ValueType" UnitType="Wh"/>
<Yield ItemType="PercentageType" UnitType="%"/>
<MaxCurrent ItemType="ValueType" UnitType="A"/>
<MaxCurrent ItemType="ValueType" UnitType="A">
<SubType ItemType="PlainType"/>
</MaxCurrent>
<MaxVolt ItemType="ValueType" UnitType="V"/>
<firz ItemType="PlainType"/>
<Image DataValue="image.png" ItemType="PlainType"/>
<Manual DataValue="manual.docx" ItemType="PlainType"/>
<Certificate DataValue="certificate.pdf" ItemType="PlainType"/>
</ModelSheet>
</Section>

View File

@@ -7,13 +7,12 @@
<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"/>
<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="#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" 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="#4 D12K 04" InverterName="04 HM600 S2 TMax" Manufacturer="Deye" MaxPowerInput="8000" 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">
<AdditionalData DataItem="Image" DataValue="image.png"/>
<AdditionalData DataItem="Manual" DataValue="manual.docx"/>
<AdditionalData DataItem="Certificate" DataValue="certificate.pdf"/>
<Images FrontView="image.png" InstalledView="installed.png" PackageView="package.png"/>
<Documents Certificate="certificate.pdf" Manual="manual.docx"/>
</Battery>
<Battery BatteryID="#2 BYD 02" BatteryName="02 BYD T02 Stackable" Capacity="9000" FriendlyName="@BatteryName" Manufacturer="BYD" MaxCurrent="120" MaxVolt="48" Yield="94"/>
<Battery BatteryID="#3 BYD 03" BatteryName="03 BYD T01 Stackable" Capacity="4500" FriendlyName="@BatteryName" Manufacturer="BYD" MaxCurrent="120" MaxVolt="48" Yield="86"/>