List widget containing items that each have their own checkbox.
#include <Workspace/Presentation/Logging/checkboxlist.h>
Inherits QWidget.
|
| CheckBoxList (QWidget *parent=nullptr) |
|
void | addItem (const QString &text, Qt::CheckState state, const QTextCharFormat &format=QTextCharFormat()) |
|
int | count () const |
|
int | currentRow () const |
|
QListWidgetItem * | item (int index) const |
|
void | setCurrentRow (int row) |
|
void | setFormat (int index, const QTextCharFormat &format) |
|
void | setName (int index, const QString &name) |
|
◆ CheckBoxList()
◆ addItem()
void addItem |
( |
const QString & |
text, |
|
|
Qt::CheckState |
state, |
|
|
const QTextCharFormat & |
format = QTextCharFormat() |
|
) |
| |
- Parameters
-
text | The text for the new item. |
state | The check state the item should be created with. |
format | Sets the new item's appearance to this format. |
Appends a new item to the end of the checkbox list. The item will have its appearance influenced by the text formatting information specified in format.
◆ count()
- Returns
- The number of items in the list.
◆ currentRow()
- Returns
- The index of the current row.
◆ currentRowChanged
void currentRowChanged |
( |
int |
currentRow | ) |
|
|
signal |
- Parameters
-
currentRow | is the current row selected. |
◆ item()
QListWidgetItem * item |
( |
int |
index | ) |
const |
- Parameters
-
index | The index of the item to return. |
- Returns
- The specified item from the checkbox.
◆ itemCheckStateChanged
void itemCheckStateChanged |
( |
int |
row, |
|
|
Qt::CheckState |
state |
|
) |
| |
|
signal |
- Parameters
-
row | is the row of the item that has changed check state |
state | is the new check state of the item at row |
◆ setCurrentRow()
void setCurrentRow |
( |
int |
row | ) |
|
- Parameters
-
row | Index of the item to set as the current one. |
◆ setFormat()
void setFormat |
( |
int |
index, |
|
|
const QTextCharFormat & |
format |
|
) |
| |
- Parameters
-
index | Index of the item to modify. |
format | Text format specification for the item. |
This function will modify the appearance of the specified item according to the information in format.
◆ setName()
void setName |
( |
int |
index, |
|
|
const QString & |
name |
|
) |
| |
- Parameters
-
index | Index of the item to modify. |
name | The new name for the specified item. |