Object to access a Checklist table functionalities.
More...
#include <CheckListTableModel.h>
|
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.
|
|
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.
◆ addRow()
void addRow |
( |
bool |
checked, |
|
|
string |
name |
|
) |
| |
Add a new row to the list.
- Parameters
-
checked | The checked state of the row |
name | The 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
-
index | The row index (0-based) |
◆ getChecked() [2/2]
bool getChecked |
( |
string |
name | ) |
|
Get the checked state of a row by name.
- Parameters
-
◆ getElement()
Variant getElement |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
Get extra element value of a given cell.
- Parameters
-
row | The cell row index (0-based) |
col | The cell col index (0-based) |
- Returns
- The variable extra element value
◆ getName()
string getName |
( |
int |
index | ) |
|
Get the name of a given row.
- Parameters
-
index | The 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
-
row | The row index (0-based) |
checked | The checked state |
◆ setChecked() [2/2]
bool setChecked |
( |
string |
name, |
|
|
bool |
checked |
|
) |
| |
Check a row by index.
- Parameters
-
name | The row name |
checked | The checked state |
◆ setElement()
void setElement |
( |
int |
row, |
|
|
int |
col, |
|
|
Variant |
value |
|
) |
| |
Set an extra element value of a given cell.
- Parameters
-
row | The cell row index (0-based) |
col | The cell col index (0-based) |
value | the variant element |
◆ setHeader() [1/2]
void setHeader |
( |
int |
col, |
|
|
string |
h |
|
) |
| |
Sets the header title of a given column.
- Parameters
-
col | The column index (0-based) |
h | The title string |
◆ setHeader() [2/2]
void setHeader |
( |
string |
h1, |
|
|
string |
h2 |
|
) |
| |
Sets the header title of both column.
- Parameters
-
h1 | The title of the first column |
h2 | The title of the second column |