34#include <NDEVR/QTModelManager.h>
35#include <NDEVR/QTModelManagerView.h>
37#include <QSortFilterProxyModel>
58 QIcon::Mode
iconMode(
const QModelIndex& index)
const;
68 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
69 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
70 QVariant
data(
const QModelIndex& proxyIndex,
int role = Qt::DisplayRole)
const override;
71 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole)
override;
84 virtual bool lessThan(
const QModelIndex& left,
const QModelIndex& right)
const override;
89 void _autosetCheckState(
const Model& parent, Qt::CheckState default_check_state);
90 bool filterAcceptsRow(
int row,
const QModelIndex& parent)
const override;
91 bool isTreeVisible(
const Model& m)
const;
92 bool calculateTreeVisible(
const Model& m)
const;
94 std::function<bool(
const Model&)> m_visible_filter;
99 String m_custom_header_icon;
100 bool m_allow_selections;
103 bool m_show_selected;
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A hash-based key-value store, useful for quick associative lookups. Key features include:
Definition Dictionary.h:61
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
Filters and sorts Models from a ModelManager for views such as in a table or in a tree view.
Definition ProxyModelViewFilter.h:46
QModelIndex getIndex(const UUID &id) const
void setShowSelected(bool show_selected)
Buffer< UUID > getModelRoots() const
void setCheckStateAll(const String &model_type, Qt::CheckState check_state)
void setGreyHidden(bool grey_hidden)
void setVisibleFilter(const std::function< bool(const Model &)> &filter)
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void setCheckStateRecursive(const Model &model, Qt::CheckState check_state)
void setCheckState(const Model &model, Qt::CheckState check_state)
ProxyModelViewFilter(QTModelManagerView *view, QObject *parent=nullptr)
Qt::ItemFlags flags(const QModelIndex &index) const override
QModelIndex getIndex(const Model &model) const
ProxyModelViewFilter(QTModelManager *manager, QObject *parent=nullptr)
void setRootModels(const Buffer< UUID > &ids)
void setCheckStateAll(GeometryType type, Qt::CheckState check_state)
QVariant data(const QModelIndex &proxyIndex, int role=Qt::DisplayRole) const override
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const override
void setAllowEdits(bool allow)
Buffer< UUID > getSelectedModelRoots() const
bool hasIndex(const UUID &id) const
QTModelManager & manager() const
UUID getID(const QModelIndex &index) const
void setCustomHeader(const TranslatedString &header_title, const String &header_icon)
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
void setCheckStateAll(const std::function< bool(const Model &model)> &model_type, Qt::CheckState check_state)
Model model(const QModelIndex &index) const
void setCheckStateAll(Qt::CheckState check_state)
void setSelectedModelRoots(const Buffer< UUID > &roots, bool only_visible_children)
void setIsRootFilter(const std::function< bool(const Model &)> &filter)
void setAllowSelections(bool allow)
Qt::CheckState checkState(const Model &model) const
QIcon::Mode iconMode(const QModelIndex &index) const
void setCheckStateAll(const String &model_type, GeometryType type, Qt::CheckState check_state)
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
Definition QTModelManager.h:105
A Qt compatible ItemModel for interfacing with a DesignObjectLookup.
Definition QTModelManagerView.h:44
The core String class for the NDEVR API.
Definition String.h:69
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
Definition TranslatedString.h:13
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
GeometryType
Definition DesignObjectBase.h:86