VivoQuant
Public Member Functions | List of all members
CheckListTableModel Class Reference

Object to access a Checklist table functionalities. More...

Public Member Functions

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

Detailed Description

Object to access a Checklist table functionalities.

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

See also WholeBodyAtlasDialog::getROIsList(), WholeBodyAtlasDialog::getModalitiesList() or WholeBodyAtlasDialog::getImagesList() to obtain this object.

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