VivoQuant 6.4.0
Loading...
Searching...
No Matches
CheckListTableModel Class Reference

Description

Object to access the functions of a check list table.

This object can be used to manipulate the items of a check list widget.

Obtain this object from the Multi-Atlas Segmentation Tool with VQ.MASTool().getROIsList(), VQ.MASTool().getModalitiesList() or VQ.MASTool().getImagesList().

var rois = VQ.MASTool().getROIsList();

Public Member Functions

int rowCount (Index parent=Index())
 Get the number of rows of the list.
int columnCount (Index parent=Index())
 Get the number of columns of the list.
void setHeader (string h1, string h2)
 Sets the header title of both column.
void setHeader (int col, string h)
 Sets the header title of a given column.
void addRow (bool checked, string name)
 Add a new row to the list.
void removeAllRows ()
 Clear the list of all rows.
bool getChecked (int index)
 Get the checked state of a row by index.
bool getChecked (string name)
 Get the checked state of a row by name.
bool setChecked (int row, bool checked)
 Check a row by index.
bool setChecked (string name, bool checked)
 Check a row by index.
string getName (int index)
 Get the name of a given row.
Variant getElement (int row, int col)
 Get extra element value of a given cell.
void setElement (int row, int col, Variant value)
 Set an extra element value of a given cell.

Member Function Documentation

◆ addRow()

void addRow ( bool checked,
string name )

Add a new row to the list.

Parameters
checkedThe checked state of the row
nameThe row name

◆ columnCount()

int columnCount ( Index parent = Index())

Get the number of columns of the list.

Returns
The number of columns

◆ getChecked() [1/2]

bool getChecked ( int index)

Get the checked state of a row by index.

Parameters
indexThe row index (0-based)

◆ getChecked() [2/2]

bool getChecked ( string name)

Get the checked state of a row by name.

Parameters
nameThe row name

◆ getElement()

Variant getElement ( int row,
int col )

Get extra element value of a given cell.

Parameters
rowThe cell row index (0-based)
colThe cell col index (0-based)
Returns
The variable extra element value

◆ getName()

string getName ( int index)

Get the name of a given row.

Parameters
indexThe index of the row to the name from

◆ rowCount()

int rowCount ( Index parent = Index())

Get the number of rows of the list.

Returns
The number of rows

◆ setChecked() [1/2]

bool setChecked ( int row,
bool checked )

Check a row by index.

Parameters
rowThe row index (0-based)
checkedThe checked state

◆ setChecked() [2/2]

bool setChecked ( string name,
bool checked )

Check a row by index.

Parameters
nameThe row name
checkedThe checked state

◆ setElement()

void setElement ( int row,
int col,
Variant value )

Set an extra element value of a given cell.

Parameters
rowThe cell row index (0-based)
colThe cell col index (0-based)
valuethe variant element

◆ setHeader() [1/2]

void setHeader ( int col,
string h )

Sets the header title of a given column.

Parameters
colThe column index (0-based)
hThe title string

◆ setHeader() [2/2]

void setHeader ( string h1,
string h2 )

Sets the header title of both column.

Parameters
h1The title of the first column
h2The title of the second column