more commenting

This commit is contained in:
2025-08-11 22:27:55 +02:00
parent 71c612d8a0
commit 4ceac220e6
10 changed files with 23 additions and 42 deletions

View File

@@ -138,24 +138,6 @@ void XQChildModel::setContent( const XQNodePtr& contentRoot )
}
//! firz
void XQChildModel::createModelContentChildRow( QStandardItem* parent, XQNodePtr contentNode )
{
/*
parent->appendRow( { new XQItem("Optionals", XQItemType::HeaderStyle ), new XQItem( "Value", XQItemType::HeaderStyle )} );
for( auto& child : contentNode->children() )
{
XQItemList list;
list.append( new XQItem( child->attribute("DataItem"), XQItemType::StaticStyle ) );
list.append( new XQItem( child->attribute("DataValue"), XQItemType::StaticStyle ) );
parent->appendRow( list );
}
*/
}
//! erzeugt ein adhoc-contextmenu, je nachdem welche aktionen gerade möflich sind.
void XQChildModel::initContextMenu()

View File

@@ -34,7 +34,7 @@ public:
protected:
virtual void createModelContentChildRow(QStandardItem* parent, XQNodePtr contentNode );
//void setupViewProperties() override;
void initContextMenu() override;

View File

@@ -16,7 +16,7 @@
#include <xqitem.h>
#include <QFile>
//! firz
//! erzeugt ein docukument
XQDocument::XQDocument(const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
: fileName{ aFileName }, friendlyName{ aFriendlyName }, treeItem{ aTreeItem }, modelView{ aModelView }
@@ -24,12 +24,6 @@ XQDocument::XQDocument(const QString& aFileName, const QString& aFriendlyName, X
}
//! firz
XQDocument::~XQDocument()
{
//delete _documentRoot;
}
///
@@ -37,7 +31,7 @@ XQDocument::~XQDocument()
///
//! firz
//! destruktor
XQDocumentStore::~XQDocumentStore()
{
@@ -48,11 +42,11 @@ XQDocumentStore::~XQDocumentStore()
}
//! firz
//! erzeugt ein document eintrag
void XQDocumentStore::addDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
{
XQDocument newDocument( aFileName, aFriendlyName, aTreeItem,aModelView );
XQDocument newDocument( aFileName, aFriendlyName, aTreeItem, aModelView );
addAtKey( aFileName, newDocument );
// attention: this assumes the presence of the 'ProjectID' value
//addAlias( aFileName, aTreeItem->attribute(c_ProjectID) );

View File

@@ -28,7 +28,7 @@ struct XQDocument
XQDocument() = default;
XQDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView );
virtual ~XQDocument();
virtual ~XQDocument() = default;
QString fileName; // also used as key
QString friendlyName;

View File

@@ -77,7 +77,7 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
throw XQException( "createTreeEntry: main model should not be emtpy!" );
}
//! firz
//! leere default implementation
void XQMainModel::initContextMenu()
{

View File

@@ -125,6 +125,9 @@ XQItemType* XQItemType::replaceAttribute( const QVariant& newValue, int role )
}
//! formatiert den content() string eines items.
QVariant XQItemType::formatText( const XQItem& item ) const
{
XQItem::UnitType uType = unitType();
@@ -134,7 +137,8 @@ QVariant XQItemType::formatText( const XQItem& item ) const
return cont;
}
//! firz
//! formatiert einen zahlenwert als string mit einheit.
QString XQItemType::formatToSI( const QString& valueTxt, XQItem::UnitType unitType ) const
{
@@ -172,7 +176,8 @@ QString XQItemType::formatToSI( const QString& valueTxt, XQItem::UnitType unitTy
}
//! firz
//! entfernt die einheit aus einem formatierten string
QString XQItemType::unFormatFromSI(const QString& formText ) const
{

View File

@@ -17,7 +17,7 @@
#include <xqtreetable.h>
//! firz
//! hilfsfunktion: zeigt alle position und die zugehörigen knoten an.
void XQNodeStore::dumpList( const QString& title ) const
{
@@ -37,7 +37,7 @@ XQCommand::XQCommand(CmdType cmdType, XQViewModel* modelView )
}
//! firz
//! destruktor
XQCommand::~XQCommand()
{

View File

@@ -15,7 +15,7 @@
#include <znode.h>
//! firz
//! überwachungszähler
namespace znode
{

View File

@@ -14,7 +14,7 @@
#include <xqexception.h>
//! firz
//! erzeugt einen std::runtime_error mit text und optionalem parameter
XQException::XQException(const QString& what, const QString& param )
: std::runtime_error( param.isEmpty() ? what.toStdString() : QString( "%1: %2" ).arg(what,param).toStdString( ) )

View File

@@ -20,7 +20,7 @@
#define DB_TIMESTAMP QTime::currentTime().toString(" -- HH:mm:ss.zzz")
//! firz
//! standardkonstruktor
XQTreeTable::XQTreeTable(QWidget* parent)
: QTreeView(parent)
@@ -36,15 +36,15 @@ XQTreeTable::XQTreeTable(QWidget* parent)
}
//! firz
//! gibt die verbundene modelview zurück, cast auf 'model()'
XQViewModel* XQTreeTable::modelView()
{
return static_cast<XQViewModel*>(model());
}
// __fixme: necessary?
//! firz
//! shortcut: gibt das item für index zurück
XQItem& XQTreeTable::xqItemFromIndex(const QModelIndex& index )
{
@@ -52,7 +52,7 @@ XQItem& XQTreeTable::xqItemFromIndex(const QModelIndex& index )
}
//! firz
//! override von 'currentChanged' (noch nicht implementiert)
void XQTreeTable::currentChanged(const QModelIndex& current, const QModelIndex& previous)
{