minor cleanups.

This commit is contained in:
2025-08-07 02:36:13 +02:00
parent 97836f19dd
commit e3256c68f0
9 changed files with 20 additions and 186 deletions

View File

@@ -73,47 +73,11 @@ XQItem& XQModel::xqItemFromIndex(const QModelIndex& index) const
return XQItem::fallBackDummyItem();
}
XQItem& XQModel::xqFirstItem(int row) const
{
return *static_cast<XQItem*>( QStandardItemModel::item(row) );
}
QString XQModel::fetchNodeAttribute(int row, const QString& key )
{
/*
__fix
XQItem* item = fromRow(row);
if( item && item->hasNode() )
return item->contentNode()->attribute( key );
*/
return "";
}
/**
* @brief XQModel::fetchNodeTagName get the tag_name of the contentNode
* in a row
* @param row the row
* @return
*/
QString XQModel::fetchNodeTagName( int row )
{
// __fix
/*
XQItem* item = fromRow(row);
if( item && item->hasNode() )
return item->contentNode()->tag_name();
*/
return "";
}
void XQModel::onActionTriggered(QAction* action)
{
qDebug() << " --- onActionTriggered: count:" << XQNode::s_Count;

View File

@@ -69,10 +69,6 @@ public:
XQItem& xqItemFromIndex(const QModelIndex& index) const;
XQItem& xqFirstItem(int row) const;
// was ist das?
QString fetchNodeAttribute(int row, const QString& key );
QString fetchNodeTagName(int row );
// undo-/redo-able stuff
virtual void cmdToggleSection( const QModelIndex& index );

View File

@@ -34,48 +34,18 @@ std::ostream& operator<<(std::ostream& os, const QString& obj);
using XQNode = znode::zbasic_node<QString>;
// default shared node
using XQNodePtr = std::shared_ptr<znode::zbasic_node<QString>>;
// const ref on XQNodePtr, ok but what its good for?
//using const XQNodePtr& = const XQNodePtr&;
/*
class XQBasicSheetNode : public znode::zbasic_node<QString>
{
public:
//...
};
using XQSheetNode = std::shared_ptr<const XQBasicSheetNode>;
using XQSheetNodeCRef = const XQSheetNode&;
*/
///
/// __fix
/// sollte man einen XQNodePtr einführen, um 'setAttr<XQNodePtr>()' von
/// setAttr<XQNodePtr>() unterscheiden zu können?
///
/// nice try. (siehe oben). Haut aber so nicht hin, node.children() gibt wieder
/// Pointer auf die Basisklasse zurück, ( vgl. XQItemList -> QList<QStandardItem*>.
/// Erst dass behandeln!
///
// weak pointer to znode, used for parent()
using XQWeakNode = std::weak_ptr<znode::zbasic_node<QString>>;
// the node factory
using XQNodeFactory = znode::znode_factory<QString>;
class XQNodeList : public znode::zbasic_node<QString>::znode_list
{
friend class XQSimpleClipBoard;
public:
XQNodeList() = default;
virtual ~XQNodeList() = default;
};