more commenting
This commit is contained in:
@@ -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.
|
//! erzeugt ein adhoc-contextmenu, je nachdem welche aktionen gerade möflich sind.
|
||||||
|
|
||||||
void XQChildModel::initContextMenu()
|
void XQChildModel::initContextMenu()
|
||||||
|
@@ -34,7 +34,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void createModelContentChildRow(QStandardItem* parent, XQNodePtr contentNode );
|
|
||||||
|
|
||||||
//void setupViewProperties() override;
|
//void setupViewProperties() override;
|
||||||
void initContextMenu() override;
|
void initContextMenu() override;
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#include <xqitem.h>
|
#include <xqitem.h>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
//! firz
|
//! erzeugt ein docukument
|
||||||
|
|
||||||
XQDocument::XQDocument(const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
|
XQDocument::XQDocument(const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
|
||||||
: fileName{ aFileName }, friendlyName{ aFriendlyName }, treeItem{ aTreeItem }, modelView{ 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()
|
XQDocumentStore::~XQDocumentStore()
|
||||||
{
|
{
|
||||||
@@ -48,7 +42,7 @@ XQDocumentStore::~XQDocumentStore()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! firz
|
//! erzeugt ein document eintrag
|
||||||
|
|
||||||
void XQDocumentStore::addDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
|
void XQDocumentStore::addDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView )
|
||||||
{
|
{
|
||||||
|
@@ -28,7 +28,7 @@ struct XQDocument
|
|||||||
XQDocument() = default;
|
XQDocument() = default;
|
||||||
XQDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView );
|
XQDocument( const QString& aFileName, const QString& aFriendlyName, XQItem* aTreeItem, XQViewModel* aModelView );
|
||||||
|
|
||||||
virtual ~XQDocument();
|
virtual ~XQDocument() = default;
|
||||||
|
|
||||||
QString fileName; // also used as key
|
QString fileName; // also used as key
|
||||||
QString friendlyName;
|
QString friendlyName;
|
||||||
|
@@ -77,7 +77,7 @@ XQItem* XQMainModel::createTreeEntry( XQNodePtr contentNode )
|
|||||||
throw XQException( "createTreeEntry: main model should not be emtpy!" );
|
throw XQException( "createTreeEntry: main model should not be emtpy!" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//! firz
|
//! leere default implementation
|
||||||
|
|
||||||
void XQMainModel::initContextMenu()
|
void XQMainModel::initContextMenu()
|
||||||
{
|
{
|
||||||
|
@@ -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
|
QVariant XQItemType::formatText( const XQItem& item ) const
|
||||||
{
|
{
|
||||||
XQItem::UnitType uType = unitType();
|
XQItem::UnitType uType = unitType();
|
||||||
@@ -134,7 +137,8 @@ QVariant XQItemType::formatText( const XQItem& item ) const
|
|||||||
return cont;
|
return cont;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! firz
|
|
||||||
|
//! formatiert einen zahlenwert als string mit einheit.
|
||||||
|
|
||||||
QString XQItemType::formatToSI( const QString& valueTxt, XQItem::UnitType unitType ) const
|
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
|
QString XQItemType::unFormatFromSI(const QString& formText ) const
|
||||||
{
|
{
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include <xqtreetable.h>
|
#include <xqtreetable.h>
|
||||||
|
|
||||||
|
|
||||||
//! firz
|
//! hilfsfunktion: zeigt alle position und die zugehörigen knoten an.
|
||||||
|
|
||||||
void XQNodeStore::dumpList( const QString& title ) const
|
void XQNodeStore::dumpList( const QString& title ) const
|
||||||
{
|
{
|
||||||
@@ -37,7 +37,7 @@ XQCommand::XQCommand(CmdType cmdType, XQViewModel* modelView )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! firz
|
//! destruktor
|
||||||
|
|
||||||
XQCommand::~XQCommand()
|
XQCommand::~XQCommand()
|
||||||
{
|
{
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
#include <znode.h>
|
#include <znode.h>
|
||||||
|
|
||||||
|
|
||||||
//! firz
|
//! überwachungszähler
|
||||||
|
|
||||||
namespace znode
|
namespace znode
|
||||||
{
|
{
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <xqexception.h>
|
#include <xqexception.h>
|
||||||
|
|
||||||
//! firz
|
//! erzeugt einen std::runtime_error mit text und optionalem parameter
|
||||||
|
|
||||||
XQException::XQException(const QString& what, const QString& param )
|
XQException::XQException(const QString& what, const QString& param )
|
||||||
: std::runtime_error( param.isEmpty() ? what.toStdString() : QString( "%1: %2" ).arg(what,param).toStdString( ) )
|
: std::runtime_error( param.isEmpty() ? what.toStdString() : QString( "%1: %2" ).arg(what,param).toStdString( ) )
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define DB_TIMESTAMP QTime::currentTime().toString(" -- HH:mm:ss.zzz")
|
#define DB_TIMESTAMP QTime::currentTime().toString(" -- HH:mm:ss.zzz")
|
||||||
|
|
||||||
//! firz
|
//! standardkonstruktor
|
||||||
|
|
||||||
XQTreeTable::XQTreeTable(QWidget* parent)
|
XQTreeTable::XQTreeTable(QWidget* parent)
|
||||||
: QTreeView(parent)
|
: QTreeView(parent)
|
||||||
@@ -36,15 +36,15 @@ XQTreeTable::XQTreeTable(QWidget* parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! firz
|
//! gibt die verbundene modelview zurück, cast auf 'model()'
|
||||||
|
|
||||||
XQViewModel* XQTreeTable::modelView()
|
XQViewModel* XQTreeTable::modelView()
|
||||||
{
|
{
|
||||||
return static_cast<XQViewModel*>(model());
|
return static_cast<XQViewModel*>(model());
|
||||||
}
|
}
|
||||||
|
|
||||||
// __fixme: necessary?
|
|
||||||
//! firz
|
//! shortcut: gibt das item für index zurück
|
||||||
|
|
||||||
XQItem& XQTreeTable::xqItemFromIndex(const QModelIndex& index )
|
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)
|
void XQTreeTable::currentChanged(const QModelIndex& current, const QModelIndex& previous)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user