Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/Lts/Viewer/LtsDataView/check_state_proxy_model.h
T
torstenandCopilot 4c9861a469 BUILD_RTI conditional fixes and Qt6 API updates
- cmake/FindRTI.cmake: Add INTERFACE placeholder targets when RTI not found
- cmake/FindRTI.cmake: Force BUILD_RTI=OFF when RTI not installed
- Lts/Common/LtsSession/CMakeLists.txt: Make LtsSessionDataDds conditional on BUILD_RTI
- Lts/Viewer/CMakeLists.txt: Make LtsDataView conditional on BUILD_RTI
- Lts/Plugins/*/CMakeLists.txt: 97 plugin files wrapped in BUILD_RTI conditionals
- cmake/NGLMacros.cmake: Fix NGL_ADD_BIG_RESOURCES macro (removed premature return())
- Multiple Qt6 API fixes: QLinkedList→std::list, QStringRef→QStringView, etc.
- BUILD_RTI_FIXES_SUMMARY.md: Comprehensive documentation of all fixes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-19 09:24:50 +02:00

61 lines
1.6 KiB
C++
Executable File

/**
* @RDE_HEADER@
* The model is used to handle CheckState Boxes in an LtsDataView (QTreeModel).
* Only the nodes of a TreeView are handled in this model. Leaves are forwarded to the transferred model and must be edited there.
* $Id$
* $HeadURL$
* $Author$
* Created by hjl/Christian Froebel, NLE, 2019-05-10
*/
#pragma once
#include <QIdentityProxyModel>
#include "lts_data_view_export.h"
namespace LtsDataView
{
class LTSDATAVIEW_EXPORT CheckStateProxyModel : public QIdentityProxyModel
{
public:
using QIdentityProxyModel::QIdentityProxyModel;
/**
* Handles the 'ItemIsUserCheckable' flags
* @param[in] sourceModel index
*
*/
Qt::ItemFlags flags(const QModelIndex &index) const override;
/**
* Handles the representation of data
* @param[in] sourceModel index
* @param[in] role role to which the data relates
*
*/
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
/**
* Handles the storage of data
* @param[in] index index
* @param[in] value value to be set
* @param[in] role role to which the data relates
*
*/
bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole) override;
private:
/**
* Returns true if the item with the given index is an leaf
* @param[in] index item index whose information is requested
* will be internally mapped to source model data
*/
bool isLeaf(const QModelIndex &index) const;
}; // class CheckStateProxyModel
} // namespace LtsDataView