first commit, again.

This commit is contained in:
2025-08-22 22:57:06 +02:00
commit c8e59b10db
79 changed files with 24448 additions and 0 deletions

58
src/widgets/xqtreetable.h Normal file
View File

@@ -0,0 +1,58 @@
/***************************************************************************
source::worx xtree
Copyright © 2024-2025 c.holzheuer
christoph.holzheuer@gmail.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
***************************************************************************/
#ifndef XQTREETABLE_H
#define XQTREETABLE_H
#include <QTreeView>
#include <QMouseEvent>
#include <QDebug>
class XQItem;
class XQViewModel;
/**
* @brief A specialized QTreeView that will handle the drawing of
* empty or non-existing items in the future.
*/
class XQTreeTable : public QTreeView
{
Q_OBJECT
// wird hier lieber ncht benutzt
//Q_DECLARE_PRIVATE(QTreeView)
public:
XQTreeTable(QWidget* parent = nullptr );
virtual ~XQTreeTable() = default;
XQViewModel* modelView();
XQItem& xqItemFromIndex(const QModelIndex& index );
protected:
void currentChanged(const QModelIndex& current, const QModelIndex& previous) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
void mouseResizeHeaderEntry(int xpos);
void wheelEvent(QWheelEvent* event) override;
//! used by the mouse events
QModelIndex _indexToResize;
};
#endif // XQTREETABLE_H