22#ifndef __qMRMLNodeAttributeTableView_h
23#define __qMRMLNodeAttributeTableView_h
29#include "qMRMLWidgetsExport.h"
33#include <ctkVTKObject.h>
36class qMRMLNodeAttributeTableViewPrivate;
37class QTableWidgetItem;
38class QItemSelectionModel;
66 void selectItemRange(
const int topRow,
const int leftColumn,
const int bottomRow,
const int rightColumn);
104 QScopedPointer<qMRMLNodeAttributeTableViewPrivate>
d_ptr;
QItemSelectionModel * selectionModel()
Get item selection model (for testing purposes)
void populateAttributeTable()
Populate attribute table according to the inspected node.
void setAttribute(const QString &attributeName, const QString &attributeValue)
Set value of an attribute with a given name.
void onAttributeChanged(QTableWidgetItem *changedItem)
Handles changing of text in a cell (attribute name or value)
QString attributeValue(const QString &attributeName) const
Get value of an attribute with a given name.
void selectItemRange(const int topRow, const int leftColumn, const int bottomRow, const int rightColumn)
Make an item range selected (for testing purposes)
~qMRMLNodeAttributeTableView() override
Destructor.
void removeSelectedAttributes()
Remove selected attributes.
QString generateNewAttributeName() const
Generate the next new attribute name that is added.
QTableWidgetItem * findAttributeNameItem(const QString &attributeName) const
Get table widget item of an attribute name cell containing the given attribute name.
QScopedPointer< qMRMLNodeAttributeTableViewPrivate > d_ptr
QStringList attributes() const
Return lost of names of all attributes in the table.
vtkMRMLNode * inspectedNode()
Get the inspected MRML node.
int attributeCount() const
Return number of attributes (rows) in the table.
void setInspectedNode(vtkMRMLNode *node)
Set the inspected MRML node.
qMRMLNodeAttributeTableView(QWidget *parent=nullptr)
Constructor.
void renameAttribute(const QString &oldName, const QString &newName)
Rename an attribute with a given name.
Abstract Superclass for all specific types of MRML nodes.