- 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>
54 lines
1.7 KiB
C++
Executable File
54 lines
1.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* Search Model for TableViews (has the ability to give the user a row for searching data)
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Mike Wille, SLSE, 2016-03-14
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <LtsDataView/lts_data_view_export.h>
|
|
|
|
#include <QAbstractItemModel>
|
|
#include <QSet>
|
|
#include <QString>
|
|
#include <QPointer>
|
|
|
|
|
|
namespace LtsDataView
|
|
{
|
|
class LTSDATAVIEW_EXPORT SearchModel final : public QAbstractItemModel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit SearchModel(QObject *parent = nullptr);
|
|
|
|
void setSourceModel(QAbstractItemModel* sourceModel);
|
|
QAbstractItemModel *sourceModel() const { return m_sourceModel; }
|
|
|
|
QVariant data(const QModelIndex &index, int role) const override final;
|
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override final;
|
|
int columnCount(const QModelIndex &parent = QModelIndex()) const override final;
|
|
int rowCount(const QModelIndex &parent) const override final;
|
|
bool setData(const QModelIndex &index, const QVariant &value, int role) override final;
|
|
Qt::ItemFlags flags(const QModelIndex &index) const override final;
|
|
QModelIndex index(int row, int column, const QModelIndex &parent) const override final;
|
|
QModelIndex parent(const QModelIndex &child) const override final { (void)child; return QModelIndex(); }
|
|
|
|
signals:
|
|
void stringFilterForColumnChanged(const QString &newFilterString, int column);
|
|
void dataFilterForColumnChanged(const QVariant &newFilterData, int column);
|
|
void signalFilterChanged();
|
|
|
|
private:
|
|
QVariant m_searchIcon;
|
|
QPointer<QAbstractItemModel> m_sourceModel;
|
|
QHash<int, QVariant> m_columnFilters;
|
|
QHash<int, QVariant> m_displayData;
|
|
QHash<int, QVariant> m_comboBoxData;
|
|
QSet<int> m_hideDecorationColumns;
|
|
};
|
|
} // namespace LtsDataView
|