Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
qMRMLNodeAttributeTableView Class Reference

#include <Libs/MRML/Widgets/qMRMLNodeAttributeTableView.h>

Inheritance diagram for qMRMLNodeAttributeTableView:
Inheritance graph
[legend]
Collaboration diagram for qMRMLNodeAttributeTableView:
Collaboration graph
[legend]

Public Slots

void addAttribute ()
 
void removeSelectedAttributes ()
 Remove selected attributes. More...
 
void renameAttribute (const QString &oldName, const QString &newName)
 Rename an attribute with a given name. More...
 
void setAttribute (const QString &attributeName, const QString &attributeValue)
 Set value of an attribute with a given name. More...
 

Public Member Functions

int attributeCount () const
 Return number of attributes (rows) in the table. More...
 
QStringList attributes () const
 Return lost of names of all attributes in the table. More...
 
QString attributeValue (const QString &attributeName) const
 Get value of an attribute with a given name. More...
 
vtkMRMLNodeinspectedNode ()
 Get the inspected MRML node. More...
 
 qMRMLNodeAttributeTableView (QWidget *parent=nullptr)
 Constructor. More...
 
QItemSelectionModel * selectionModel ()
 Get item selection model (for testing purposes) More...
 
void selectItemRange (const int topRow, const int leftColumn, const int bottomRow, const int rightColumn)
 Make an item range selected (for testing purposes) More...
 
void setInspectedNode (vtkMRMLNode *node)
 Set the inspected MRML node. More...
 
 ~qMRMLNodeAttributeTableView () override
 Destructor. More...
 

Protected Slots

void onAttributeChanged (QTableWidgetItem *changedItem)
 Handles changing of text in a cell (attribute name or value) More...
 
void populateAttributeTable ()
 Populate attribute table according to the inspected node. More...
 

Protected Member Functions

QTableWidgetItem * findAttributeNameItem (const QString &attributeName) const
 Get table widget item of an attribute name cell containing the given attribute name. More...
 
QString generateNewAttributeName () const
 Generate the next new attribute name that is added. More...
 

Protected Attributes

QScopedPointer< qMRMLNodeAttributeTableViewPrivate > d_ptr
 

Detailed Description

Definition at line 40 of file qMRMLNodeAttributeTableView.h.

Constructor & Destructor Documentation

◆ qMRMLNodeAttributeTableView()

qMRMLNodeAttributeTableView::qMRMLNodeAttributeTableView ( QWidget *  parent = nullptr)
explicit

Constructor.

◆ ~qMRMLNodeAttributeTableView()

qMRMLNodeAttributeTableView::~qMRMLNodeAttributeTableView ( )
override

Destructor.

Member Function Documentation

◆ addAttribute

void qMRMLNodeAttributeTableView::addAttribute ( )
slot

Add empty attribute row. The name of the added attribute is unique, NewAttributeName for the first added name, NewAttributeName1 if attribute NewAttributeName already exists, NewAttributeName2 if attribute NewAttributeName1 already exists, etc.

◆ attributeCount()

int qMRMLNodeAttributeTableView::attributeCount ( ) const

Return number of attributes (rows) in the table.

◆ attributes()

QStringList qMRMLNodeAttributeTableView::attributes ( ) const

Return lost of names of all attributes in the table.

◆ attributeValue()

QString qMRMLNodeAttributeTableView::attributeValue ( const QString &  attributeName) const

Get value of an attribute with a given name.

◆ findAttributeNameItem()

QTableWidgetItem* qMRMLNodeAttributeTableView::findAttributeNameItem ( const QString &  attributeName) const
protected

Get table widget item of an attribute name cell containing the given attribute name.

◆ generateNewAttributeName()

QString qMRMLNodeAttributeTableView::generateNewAttributeName ( ) const
protected

Generate the next new attribute name that is added.

◆ inspectedNode()

vtkMRMLNode* qMRMLNodeAttributeTableView::inspectedNode ( )

Get the inspected MRML node.

◆ onAttributeChanged

void qMRMLNodeAttributeTableView::onAttributeChanged ( QTableWidgetItem *  changedItem)
protectedslot

Handles changing of text in a cell (attribute name or value)

◆ populateAttributeTable

void qMRMLNodeAttributeTableView::populateAttributeTable ( )
protectedslot

Populate attribute table according to the inspected node.

◆ removeSelectedAttributes

void qMRMLNodeAttributeTableView::removeSelectedAttributes ( )
slot

Remove selected attributes.

◆ renameAttribute

void qMRMLNodeAttributeTableView::renameAttribute ( const QString &  oldName,
const QString &  newName 
)
slot

Rename an attribute with a given name.

◆ selectionModel()

QItemSelectionModel* qMRMLNodeAttributeTableView::selectionModel ( )

Get item selection model (for testing purposes)

◆ selectItemRange()

void qMRMLNodeAttributeTableView::selectItemRange ( const int  topRow,
const int  leftColumn,
const int  bottomRow,
const int  rightColumn 
)

Make an item range selected (for testing purposes)

◆ setAttribute

void qMRMLNodeAttributeTableView::setAttribute ( const QString &  attributeName,
const QString &  attributeValue 
)
slot

Set value of an attribute with a given name.

◆ setInspectedNode()

void qMRMLNodeAttributeTableView::setInspectedNode ( vtkMRMLNode node)

Set the inspected MRML node.

Member Data Documentation

◆ d_ptr

QScopedPointer<qMRMLNodeAttributeTableViewPrivate> qMRMLNodeAttributeTableView::d_ptr
protected

Definition at line 102 of file qMRMLNodeAttributeTableView.h.


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