ENLIGHTEN
Cross-platform desktop GUI for Wasatch Photonics spectrometers
Loading...
Searching...
No Matches
EntryListModel Class Reference

#include <entrylistmodel.h>

Inheritance diagram for EntryListModel:
[legend]
Collaboration diagram for EntryListModel:
[legend]

Public Types

enum  Roles {
  NameRole = Qt::UserRole + 1 , DisplayNameRole , TooltipRole , DescriptionRole ,
  VisibilityRole , NumericValueRole , SymbolicValueRole , AvailableRole ,
  ReadableRole , WriteableRole , AccessStatusRole
}
 

Signals

void countChanged ()
 
void currentIndexChanged ()
 

Public Member Functions

int currentIndex ()
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
Q_INVOKABLE QStringList entryDisplayNameList ()
 
 EntryListModel ()=default
 
Q_INVOKABLE EntryListObjectget (const QString &name)
 
Q_INVOKABLE EntryListObjectget (int index)
 
bool operator!= (const EntryListModel &other)
 
bool operator== (const EntryListModel &other)
 
int rowCount (const QModelIndex &index=QModelIndex()) const override
 
void setCurrentIndex (int newIndex)
 
void setNode (const std::shared_ptr< peak::core::nodes::EnumerationNode > &node)
 
bool updateAll ()
 
void updateCurrentIndex ()
 
 ~EntryListModel () override=default
 

Protected Member Functions

QHash< int, QByteArray > roleNames () const override
 

Properties

int count
 
int currentIndex
 

Private Attributes

int m_currentIndex {}
 
QStringList m_entryDisplayNames {}
 
QStringList m_entryNames {}
 
std::shared_ptr< peak::core::nodes::EnumerationNode > m_node
 
std::vector< std::shared_ptr< EntryListObject > > m_objects {}
 
QMutex mutex
 

Member Enumeration Documentation

◆ Roles

Enumerator
NameRole 
DisplayNameRole 
TooltipRole 
DescriptionRole 
VisibilityRole 
NumericValueRole 
SymbolicValueRole 
AvailableRole 
ReadableRole 
WriteableRole 
AccessStatusRole 

Constructor & Destructor Documentation

◆ EntryListModel()

EntryListModel::EntryListModel ( )
default

◆ ~EntryListModel()

EntryListModel::~EntryListModel ( )
overridedefault

Member Function Documentation

◆ countChanged

void EntryListModel::countChanged ( )
signal

◆ currentIndex()

int EntryListModel::currentIndex ( )

◆ currentIndexChanged

void EntryListModel::currentIndexChanged ( )
signal

◆ data()

QVariant EntryListModel::data ( const QModelIndex & index,
int role = Qt::DisplayRole ) const
override

◆ entryDisplayNameList()

QStringList EntryListModel::entryDisplayNameList ( )

◆ get() [1/2]

EntryListObject * EntryListModel::get ( const QString & name)

◆ get() [2/2]

EntryListObject * EntryListModel::get ( int index)

◆ operator!=()

bool EntryListModel::operator!= ( const EntryListModel & other)

◆ operator==()

bool EntryListModel::operator== ( const EntryListModel & other)

◆ roleNames()

QHash< int, QByteArray > EntryListModel::roleNames ( ) const
overrideprotected

◆ rowCount()

int EntryListModel::rowCount ( const QModelIndex & index = QModelIndex()) const
override

◆ setCurrentIndex()

void EntryListModel::setCurrentIndex ( int newIndex)

◆ setNode()

void EntryListModel::setNode ( const std::shared_ptr< peak::core::nodes::EnumerationNode > & node)

◆ updateAll()

bool EntryListModel::updateAll ( )

◆ updateCurrentIndex()

void EntryListModel::updateCurrentIndex ( )

Member Data Documentation

◆ m_currentIndex

int EntryListModel::m_currentIndex {}
private

◆ m_entryDisplayNames

QStringList EntryListModel::m_entryDisplayNames {}
private

◆ m_entryNames

QStringList EntryListModel::m_entryNames {}
private

◆ m_node

std::shared_ptr<peak::core::nodes::EnumerationNode> EntryListModel::m_node
private

◆ m_objects

std::vector<std::shared_ptr<EntryListObject> > EntryListModel::m_objects {}
private

◆ mutex

QMutex EntryListModel::mutex
mutableprivate

Property Documentation

◆ count

int EntryListModel::count
read

◆ currentIndex

int EntryListModel::currentIndex
readwrite

The documentation for this class was generated from the following files: