event more commenting.

This commit is contained in:
2025-08-11 22:55:32 +02:00
parent 4ceac220e6
commit 756ec3f1fc
9 changed files with 32 additions and 61 deletions

View File

@@ -18,7 +18,7 @@
//! firz
//! hilfsfunktion: gibt diesen teilbaum rekursiv aus
void inspect( const XQNodePtr& node, int indent )
{
@@ -34,9 +34,7 @@ void inspect( const XQNodePtr& node, int indent )
}
//! firz
//! operator<< für QString und std::ostream
// Overload the operator<< for MyClass and std::ostream
std::ostream& operator<<(std::ostream& os, const QString& obj)
@@ -47,7 +45,8 @@ std::ostream& operator<<(std::ostream& os, const QString& obj)
}
//! firz
//! 'QString' implementation von split
template<>
bool znode::zpayload<QString>::xstr_split_by(const QString& entry, const QString& sep, QString& key, QString& value )
{
@@ -60,7 +59,7 @@ bool znode::zpayload<QString>::xstr_split_by(const QString& entry, const QString
}
//! firz
//! 'QString' implementation von substr
template<>
QString znode::zpayload<QString>::xstr_sub_str( const QString& entry, int pos ) const
@@ -69,7 +68,7 @@ QString znode::zpayload<QString>::xstr_sub_str( const QString& entry, int pos )
}
//! firz
//! 'QString' implementation vom test auf 'empty'
template<>
bool znode::zpayload<QString>::xstr_is_empty(const QString& entry ) const
@@ -78,7 +77,7 @@ bool znode::zpayload<QString>::xstr_is_empty(const QString& entry ) const
}
//! firz
//! 'QString' varianten der keystrings.
template<>
const QString znode::zpayload<QString>::cType = "Type";

View File

@@ -22,7 +22,7 @@
//! firz
//! schreibt einen (teil)baum in ein file
void XQNodeWriter::dumpTree( XQNodePtr rootNode, const QString& fileName ) const
{
@@ -40,7 +40,8 @@ void XQNodeWriter::dumpTree( XQNodePtr rootNode, const QString& fileName ) const
treeFile.close();
}
//! firz
//! schreibt einen knoten in einen stream
void XQNodeWriter::dumpNode( QXmlStreamWriter& writer, XQNodePtr node ) const
{

View File

@@ -17,7 +17,7 @@
//! firz
//! konstruiert ein selectionmodel.
XQSelectionModel::XQSelectionModel(QAbstractItemModel* model)
: QItemSelectionModel(model)
@@ -26,7 +26,7 @@ XQSelectionModel::XQSelectionModel(QAbstractItemModel* model)
}
//! firz
//! konstruiert ein selectionmodel.
XQSelectionModel::XQSelectionModel(QAbstractItemModel* model, QObject* parent)
: QItemSelectionModel(model, parent)
@@ -40,7 +40,7 @@ XQSelectionModel::XQSelectionModel(QAbstractItemModel* model, QObject* parent)
void XQSelectionModel::select(const QItemSelection& selection, QItemSelectionModel::SelectionFlags command)
{
// step #0: fetch selected indices.
QModelIndexList list = selection.indexes();
const QModelIndexList list = selection.indexes();
if (list.isEmpty() || selectedRows().isEmpty() )
return QItemSelectionModel::select(selection, command);

View File

@@ -16,7 +16,7 @@
#include <xqviewmodel.h>
//! firz
//! true, wenn paste an er stelle 'curIdx' möglich ist.
bool XQSimpleClipBoard::canPaste( const QModelIndex& curIdx ) const
{
@@ -38,7 +38,9 @@ bool XQSimpleClipBoard::canPaste( const QModelIndex& curIdx ) const
}
//! firz
//! erzeugt eine positions-list aus der liste selectierter indicies.
//! Der mit seiner position zusammen gespeicherter knoten muss hier
//! gekloned werden.
void XQSimpleClipBoard::saveNodes( const QModelIndexList& list )
{

View File

@@ -15,21 +15,7 @@
#include <xqcontextmenu.h>
//! firz
XQContextMenu::XQContextMenu(const QString& title, QWidget* parent )
: QMenu( title, parent )
{
/*
QAction* titleDummy = new QAction(title,this);
QWidget::addAction(titleDummy);
addSeparator();
titleDummy->setEnabled(false);
*/
}
//! firz
//! konstruktor.
XQContextMenu::XQContextMenu(QWidget* parent)
: QMenu( parent )
@@ -37,7 +23,8 @@ XQContextMenu::XQContextMenu(QWidget* parent)
}
//! firz
//! erzeugt eine action mit text
//! aus einem command-type und fügt sie hinzu.
void XQContextMenu::addAction(const QString& text, XQCommand::CmdType commandType, bool enabled)
{
@@ -49,7 +36,8 @@ void XQContextMenu::addAction(const QString& text, XQCommand::CmdType commandTyp
}
//! firz
//! erzeugt eine action mit text und icon aus
//! einem command-type und fügt sie hinzu.
void XQContextMenu::addAction(const QString& iconKey, const QString& name, XQCommand::CmdType commandType, bool enabled)
{
@@ -57,7 +45,8 @@ void XQContextMenu::addAction(const QString& iconKey, const QString& name, XQCom
}
//! firz
//! erzeugt eine action mit text und icon aus
//! einem command-type und fügt sie hinzu.
void XQContextMenu::addAction(const QIcon& icon, const QString& text, XQCommand::CmdType commandType, bool enabled)
{
@@ -69,7 +58,7 @@ void XQContextMenu::addAction(const QIcon& icon, const QString& text, XQCommand:
}
//! firz
//! schaltet die action mit 'commandType'
void XQContextMenu::setActionEnabled(XQCommand::CmdType commandType, bool enabled)
{

View File

@@ -29,7 +29,6 @@ class XQContextMenu : public QMenu
public:
XQContextMenu(const QString& title, QWidget* parent = nullptr );
XQContextMenu(QWidget* parent = nullptr );
virtual ~XQContextMenu() = default;

View File

@@ -137,25 +137,7 @@ void XQTreeTable::mouseMoveEvent(QMouseEvent* event)
}
//! firz
void XQTreeTable::mouseDoubleClickEvent(QMouseEvent* event)
{
/*
QModelIndex idxFromPos = indexAt(event->pos());
if (idxFromPos.isValid())
{
if ( NTItem::isHeaderType(idxFromPos) && cursor().shape() == Qt::SplitHCursor)
{
return resizeColumnToContents(idxFromPos.column());
}
}
*/
QTreeView::mouseDoubleClickEvent(event);
}
//! firz
//! speichert die start-position fürs header-resizing.
void XQTreeTable::mousePressEvent(QMouseEvent* event)
{
@@ -174,18 +156,18 @@ void XQTreeTable::mousePressEvent(QMouseEvent* event)
}
//! firz
//! speichert die index-position fürs header-resizing.
void XQTreeTable::mouseReleaseEvent(QMouseEvent* event)
{
// reset index for resize column
_indexToResize = QModelIndex();
setCursor(QCursor(Qt::ArrowCursor));
setCursor(QCursor(Qt::ArrowCursor));
QTreeView::mouseReleaseEvent(event);
}
//! firz
//! zoom-in / zoom-out mit mausrad & ctrl
void XQTreeTable::wheelEvent(QWheelEvent* event)
{

View File

@@ -46,7 +46,6 @@ protected:
void currentChanged(const QModelIndex& current, const QModelIndex& previous) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseDoubleClickEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseResizeHeaderEntry(int xpos);

View File

@@ -50,9 +50,9 @@
<X>
<Section>
<Header>
</Header1>
<data>
</data>
</Header>
<data>
</data>
</Section>
</X>