ManiVault 1.0.0
A Flexible and Extensible Visual Analytics Framework for High-Dimensional Data
Loading...
Searching...
No Matches
hdps::gui::DatasetPickerAction::DatasetsModel Class Reference

#include <DatasetPickerAction.h>

Inheritance diagram for hdps::gui::DatasetPickerAction::DatasetsModel:

Public Types

enum class  Column { Name , GUID }
 

Public Member Functions

 DatasetsModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 
int rowIndex (const hdps::Dataset< hdps::DatasetImpl > &dataset) const
 
int columnCount (const QModelIndex &parent=QModelIndex()) const
 
QVariant data (const QModelIndex &index, int role) const
 
const QVector< hdps::Dataset< hdps::DatasetImpl > > & getDatasets () const
 
hdps::Dataset< hdps::DatasetImplgetDataset (const std::int32_t &rowIndex) const
 
void setDatasets (const QVector< hdps::Dataset< hdps::DatasetImpl > > &datasets)
 
void addDataset (const hdps::Dataset< hdps::DatasetImpl > &dataset)
 
void removeDataset (const hdps::Dataset< hdps::DatasetImpl > &dataset)
 
void removeAllDatasets ()
 
bool getShowIcon () const
 
void setShowIcon (bool showIcon)
 
bool getShowLocation () const
 
void setShowLocation (bool showLocation)
 
void updateData ()
 

Protected Attributes

QVector< hdps::Dataset< hdps::DatasetImpl > > _datasets
 
bool _showIcon
 
bool _showLocation
 

Detailed Description

Datasets list model class

List model class which serves as input to the dataset picker option action class

Author
Thomas Kroes

Member Enumeration Documentation

◆ Column

Model columns

Enumerator
Name 
GUID 

Constructor & Destructor Documentation

◆ DatasetsModel()

hdps::gui::DatasetPickerAction::DatasetsModel::DatasetsModel ( QObject *  parent = nullptr)

(Default) constructor

Member Function Documentation

◆ addDataset()

void hdps::gui::DatasetPickerAction::DatasetsModel::addDataset ( const hdps::Dataset< hdps::DatasetImpl > &  dataset)

Add dataset

Parameters
datasetSmart pointer to dataset

◆ columnCount()

int hdps::gui::DatasetPickerAction::DatasetsModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const

Get the number of columns

Parameters
parentParent model index
Returns
Number of columns in the model

◆ data()

QVariant hdps::gui::DatasetPickerAction::DatasetsModel::data ( const QModelIndex &  index,
int  role 
) const

Get data

Parameters
indexModel index to query
roleData role
Returns
Data

◆ getDataset()

Dataset< DatasetImpl > hdps::gui::DatasetPickerAction::DatasetsModel::getDataset ( const std::int32_t &  rowIndex) const

Get dataset at the specified row index

Parameters
rowIndexIndex of the row
Returns
Smart pointer to dataset

◆ getDatasets()

const QVector< Dataset< DatasetImpl > > & hdps::gui::DatasetPickerAction::DatasetsModel::getDatasets ( ) const

Get datasets

Returns
Vector of smart pointers to datasets

◆ getShowIcon()

bool hdps::gui::DatasetPickerAction::DatasetsModel::getShowIcon ( ) const

Get whether to show the dataset icon

◆ getShowLocation()

bool hdps::gui::DatasetPickerAction::DatasetsModel::getShowLocation ( ) const

Get to show the dataset location

◆ removeAllDatasets()

void hdps::gui::DatasetPickerAction::DatasetsModel::removeAllDatasets ( )

Remove all datasets from the model

◆ removeDataset()

void hdps::gui::DatasetPickerAction::DatasetsModel::removeDataset ( const hdps::Dataset< hdps::DatasetImpl > &  dataset)

Remove specific dataset

Parameters
datasetSmart pointer to dataset

◆ rowCount()

int hdps::gui::DatasetPickerAction::DatasetsModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Get the number of row

Parameters
parentParent model index
Returns
Number of rows in the model

◆ rowIndex()

int hdps::gui::DatasetPickerAction::DatasetsModel::rowIndex ( const hdps::Dataset< hdps::DatasetImpl > &  dataset) const

Get the row index of a dataset

Parameters
parentParent model index
Returns
Row index of the dataset

◆ setDatasets()

void hdps::gui::DatasetPickerAction::DatasetsModel::setDatasets ( const QVector< hdps::Dataset< hdps::DatasetImpl > > &  datasets)

Set datasets (resets the model)

Parameters
datasetsVector of smart pointers to datasets

◆ setShowIcon()

void hdps::gui::DatasetPickerAction::DatasetsModel::setShowIcon ( bool  showIcon)

Set whether to show the icon

Parameters
showFullPathNameWhether to show the icon

◆ setShowLocation()

void hdps::gui::DatasetPickerAction::DatasetsModel::setShowLocation ( bool  showLocation)

Set whether to show the full path name in the GUI

Parameters
showFullPathNameWhether to show the full path name in the GUI

◆ updateData()

void hdps::gui::DatasetPickerAction::DatasetsModel::updateData ( )

Updates the model from the datasets

Member Data Documentation

◆ _datasets

QVector<hdps::Dataset<hdps::DatasetImpl> > hdps::gui::DatasetPickerAction::DatasetsModel::_datasets
protected

◆ _showIcon

bool hdps::gui::DatasetPickerAction::DatasetsModel::_showIcon
protected

Datasets from which can be picked

◆ _showLocation

bool hdps::gui::DatasetPickerAction::DatasetsModel::_showLocation
protected

Whether to show the dataset icon


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