maliput_viz
ParameterTableModel Class Reference

Detailed Description

A table model for a table of Maliput's RoadNetworkLoader's parameters.

#include <src/maliput_viz/plugins/maliput_backend_selection.hh>

Inheritance diagram for ParameterTableModel:
[legend]

Public Member Functions

 ParameterTableModel (QObject *parent=nullptr)
 Constructor. More...
 
std::map< std::string, std::string > GetMapFromParameters () const
 Get the parameter list in a std map. More...
 
Q_INVOKABLE void AddParameter (const QString &_parameterName, const QString &_parameterValue)
 Adds a parameter to the table. More...
 
Q_INVOKABLE void DeleteParameter (const QString &_parameterName)
 Removes a parameter from the table. More...
 
Q_INVOKABLE void ClearParameters ()
 Removes all parameters from the table. More...
 
Q_INVOKABLE QString GetData (int row, int role) const
 Get data from a row. More...
 

Static Public Attributes

static constexpr int kParameterRole {101}
 
static constexpr int kValueRole {102}
 

Protected Member Functions

Q_INVOKABLE int rowCount (const QModelIndex &parent=QModelIndex()) const override
 Documentation inherited. More...
 
Q_INVOKABLE int columnCount (const QModelIndex &parent=QModelIndex()) const override
 Documentation inherited. More...
 
Q_INVOKABLE QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 Documentation inherited. More...
 
Q_INVOKABLE QHash< int, QByteArray > roleNames () const override
 Documentation inherited. More...
 

Constructor & Destructor Documentation

◆ ParameterTableModel()

ParameterTableModel ( QObject parent = nullptr)

Constructor.

Parameters
parentParent object,

Member Function Documentation

◆ AddParameter()

void AddParameter ( const QString &  _parameterName,
const QString &  _parameterValue 
)

Adds a parameter to the table.

Parameters
_parameterNameParameter to add.
_parameterValueValue of the parameter.

◆ ClearParameters()

void ClearParameters ( )

Removes all parameters from the table.

◆ columnCount()

int columnCount ( const QModelIndex &  parent = QModelIndex()) const
overrideprotected

Documentation inherited.

◆ data()

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

Documentation inherited.

◆ DeleteParameter()

void DeleteParameter ( const QString &  _parameterName)

Removes a parameter from the table.

Parameters
_parameterNameParameter to remove.

◆ GetData()

QString GetData ( int  row,
int  role 
) const

Get data from a row.

◆ GetMapFromParameters()

std::map< std::string, std::string > GetMapFromParameters ( ) const

Get the parameter list in a std map.

◆ roleNames()

QHash< int, QByteArray > roleNames ( ) const
overrideprotected

Documentation inherited.

◆ rowCount()

int rowCount ( const QModelIndex &  parent = QModelIndex()) const
overrideprotected

Documentation inherited.

Member Data Documentation

◆ kParameterRole

constexpr int kParameterRole {101}
staticconstexpr

◆ kValueRole

constexpr int kValueRole {102}
staticconstexpr

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