33#include <NDEVR/QTModelManager.h>
35#include <NDEVR/Model.h>
36#include <QAbstractItemModel>
56 bool is_visible =
true;
57 bool is_visible_recursive =
true;
58 bool is_selected =
false;
70 QIcon::Mode
iconMode(
const QModelIndex& index)
const;
74 virtual int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
75 int columnCount(
const QModelIndex& parent = QModelIndex())
const override;
76 bool setData(
const QModelIndex &index,
const QVariant &value,
int role = Qt::EditRole)
override;
77 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
78 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
80 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
81 QModelIndex
index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
82 QModelIndex
parent(
const QModelIndex& index)
const override;
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
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
void modelUpdated(UUID id)
Buffer< UUID > m_index_ids
Definition QTModelManagerView.h:106
QModelIndex getIndex(const UUID &id) const
void topLevelChanged(Buffer< UUID > id)
void modelFocussed(UUID id, bool selected)
QTModelManager & manager()
Dictionary< UUID, ModelCache > m_cached_indices
Definition QTModelManagerView.h:107
void modelDeleted(Buffer< UUID > id)
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Qt::ItemFlags flags(const QModelIndex &index) const override
UUID m_project_id
Definition QTModelManagerView.h:105
void recursiveCacheRemove(const UUID &id)
void objectSelected(Buffer< UUID > id, bool selected)
Model model(uint04 row, const QModelIndex &parent) const
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
void updateModel3DVisible(const UUID &id, bool visible)
QModelIndex getIndex(const Model &model) const
Buffer< UUID > m_root_models
Definition QTModelManagerView.h:104
virtual ~QTModelManagerView()=default
void modelUpdatedSlot(const Buffer< UUID > &updated_ids)
void setRootModels(const Buffer< UUID > &roots)
ModelCache createCache(const Model &model, bool recursive, bool parent_visible) const
bool hasCached(const UUID &id) const
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
void projectChanged(UUID id)
QVariant data(const UUID &id, int role) const
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
std::function< bool(const Model &)> m_root_filter
Definition QTModelManagerView.h:108
QTModelManager * m_manager
Definition QTModelManagerView.h:103
UUID m_tree_capture_id
Definition QTModelManagerView.h:102
int columnCount(const QModelIndex &parent=QModelIndex()) const override
QTModelManagerView(QTModelManager *manager, QObject *parent=nullptr)
QModelIndex parent(const QModelIndex &index) const override
void setIsRootFilter(const std::function< bool(const Model &)> &filter)
Definition QTModelManagerView.h:85
void modelAdded(Buffer< UUID > id)
QIcon::Mode iconMode(const QModelIndex &index) const
Model model(const QModelIndex &model_index) const
const Buffer< UUID > & rootModels() const
Definition QTModelManagerView.h:84
UUID getID(const QModelIndex &model_index) const
Represents a color in the RGB space with optional alpha transparency.
Definition RGBColor.h:54
The core String class for the NDEVR API.
Definition String.h:69
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:96
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
Definition BaseValues.hpp:233
Definition QTModelManagerView.h:48
String icon
Definition QTModelManagerView.h:53
Buffer< UUID > children
Definition QTModelManagerView.h:50
QString tooltip
Definition QTModelManagerView.h:54
uint04 cache_index
Definition QTModelManagerView.h:49
QString name
Definition QTModelManagerView.h:52