Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::InformationItemModel Class Reference

Item model for viewing Variables in a tree view. More...

#include <InformationItemModel.h>

Inheritance diagram for sf::InformationItemModel:
[legend]
Collaboration diagram for sf::InformationItemModel:
[legend]

Public Member Functions

 InformationItemModel (gii::SelectionMode mode, gii::TypeId idType, QObject *parent)
 Constructor.
 ~InformationItemModel () override
 Overridden destructor.
gii::IdType getIdType () const
 Gets the type of id's this instance was created for.
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 Overridden from base class to provide column display names.
int columnCount (const QModelIndex &parent) const override
 Overridden from base class to provide the amount of columns.
int rowCount (const QModelIndex &parent) const override
 Overridden from base class to provide the amount of rows.
QVariant data (const QModelIndex &index, int role) const override
 Overridden from base class to provide the data to present.
Qt::ItemFlags flags (const QModelIndex &index) const override
 Overridden from base class to provide flags on an item by index.
QModelIndex index (int row, int column, const QModelIndex &parent) const override
 Overridden from base class.
QModelIndex parent (const QModelIndex &child) const override
 Overridden from base class.
void toggleSelection (const QModelIndex &index)
 Toggle the selection of the item at the passed index.
bool isFolder (const QModelIndex &index)
 Gets the status of a folder type entry of the passed index.
gii::IdType getId (const QModelIndex &index)
 Gets the information ID from the passed index.
InformationTypes::IdVector getSelectedIds () const
 Toggle the selection of the item at the passed index.
void updateList ()
 Updates the list data.

Detailed Description

Item model for viewing Variables in a tree view.

Constructor & Destructor Documentation

◆ InformationItemModel()

sf::InformationItemModel::InformationItemModel ( gii::SelectionMode mode,
gii::TypeId idType,
QObject * parent )
explicit

Constructor.

◆ ~InformationItemModel()

sf::InformationItemModel::~InformationItemModel ( )
override

Overridden destructor.

Member Function Documentation

◆ columnCount()

int sf::InformationItemModel::columnCount ( const QModelIndex & parent) const
override

Overridden from base class to provide the amount of columns.

◆ data()

QVariant sf::InformationItemModel::data ( const QModelIndex & index,
int role ) const
override

Overridden from base class to provide the data to present.

◆ flags()

Qt::ItemFlags sf::InformationItemModel::flags ( const QModelIndex & index) const
override

Overridden from base class to provide flags on an item by index.

◆ getId()

gii::IdType sf::InformationItemModel::getId ( const QModelIndex & index)

Gets the information ID from the passed index.

◆ getIdType()

gii::IdType sf::InformationItemModel::getIdType ( ) const

Gets the type of id's this instance was created for.

◆ getSelectedIds()

InformationTypes::IdVector sf::InformationItemModel::getSelectedIds ( ) const
nodiscard

Toggle the selection of the item at the passed index.

◆ headerData()

QVariant sf::InformationItemModel::headerData ( int section,
Qt::Orientation orientation,
int role ) const
override

Overridden from base class to provide column display names.

◆ index()

QModelIndex sf::InformationItemModel::index ( int row,
int column,
const QModelIndex & parent ) const
override

Overridden from base class.

◆ isFolder()

bool sf::InformationItemModel::isFolder ( const QModelIndex & index)

Gets the status of a folder type entry of the passed index.

◆ parent()

QModelIndex sf::InformationItemModel::parent ( const QModelIndex & child) const
nodiscardoverride

Overridden from base class.

◆ rowCount()

int sf::InformationItemModel::rowCount ( const QModelIndex & parent) const
override

Overridden from base class to provide the amount of rows.

◆ toggleSelection()

void sf::InformationItemModel::toggleSelection ( const QModelIndex & index)

Toggle the selection of the item at the passed index.

◆ updateList()

void sf::InformationItemModel::updateList ( )

Updates the list data.


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