27#ifndef NODELISTMODEL_H
28#define NODELISTMODEL_H
33#include <peak/node_map/peak_node_map.hpp>
35#include <QAbstractListModel>
71 void setNodeMap(
const std::shared_ptr<peak::core::NodeMap>& nodeMap);
72 int rowCount(
const QModelIndex& index = QModelIndex())
const override;
73 QVariant
data(
const QModelIndex& index,
int role = Qt::DisplayRole)
const override;
82 void updateList(
int a,
int b, QVector<int> changedRoles = QVector<int>());
85 QHash<int, QByteArray>
roleNames()
const override;
88 std::vector<std::shared_ptr<NodeListObject>>
m_objects;
Definition modelupdatethreadworker.h:44
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Definition nodelistmodel.cpp:99
std::vector< std::shared_ptr< NodeListObject > > m_objects
Definition nodelistmodel.h:88
ModelUpdateThreadWorker * m_updateThreadWorker
Definition nodelistmodel.h:92
QMutex mutex
Definition nodelistmodel.h:97
int m_objectCount
Definition nodelistmodel.h:94
QStringList m_nodeNames
Definition nodelistmodel.h:90
QThread * updateThread()
Definition nodelistmodel.cpp:197
QThread * m_updateThread
Definition nodelistmodel.h:93
~NodeListModel() override=default
void stopUpdating()
Definition nodelistmodel.cpp:202
void setNodeMap(const std::shared_ptr< peak::core::NodeMap > &nodeMap)
Definition nodelistmodel.cpp:51
int rowCount(const QModelIndex &index=QModelIndex()) const override
Definition nodelistmodel.cpp:94
NodeListModel()
Definition nodelistmodel.cpp:32
std::shared_ptr< peak::core::NodeMap > m_nodeMap
Definition nodelistmodel.h:89
void clear()
Definition nodelistmodel.cpp:44
void updateList(int a, int b, QVector< int > changedRoles=QVector< int >())
Definition nodelistmodel.cpp:210
Q_INVOKABLE NodeListObject * get(const QString &name)
Definition nodelistmodel.cpp:151
void pauseUpdating()
Definition nodelistmodel.cpp:187
void resumeUpdating()
Definition nodelistmodel.cpp:192
QHash< int, QByteArray > roleNames() const override
Definition nodelistmodel.cpp:318
Roles
Definition nodelistmodel.h:48
@ IncRole
Definition nodelistmodel.h:60
@ DisplayNameRole
Definition nodelistmodel.h:50
@ NodeObjectRole
Definition nodelistmodel.h:66
@ AccessStatusRole
Definition nodelistmodel.h:65
@ EntryListModelRole
Definition nodelistmodel.h:56
@ VisibilityRole
Definition nodelistmodel.h:55
@ TypeRole
Definition nodelistmodel.h:52
@ ValueRole
Definition nodelistmodel.h:57
@ WriteableRole
Definition nodelistmodel.h:64
@ UnitRole
Definition nodelistmodel.h:61
@ CategoryRole
Definition nodelistmodel.h:51
@ ReadableRole
Definition nodelistmodel.h:63
@ MinRole
Definition nodelistmodel.h:58
@ MaxRole
Definition nodelistmodel.h:59
@ AvailableRole
Definition nodelistmodel.h:62
@ TooltipRole
Definition nodelistmodel.h:53
@ DescriptionRole
Definition nodelistmodel.h:54
@ NameRole
Definition nodelistmodel.h:49
Definition nodelistobject.h:39
The ModelUpdateThreadWorker class is used in a worker thread to receive callbacks and check for chang...
The NodeListObject is a prototype for camera property nodes of the types 'Enumeration',...