Workspace 6.21.5
Signals | Public Member Functions | List of all members
CheckBoxList Class Reference

List widget containing items that each have their own checkbox.

#include <Workspace/Presentation/Logging/checkboxlist.h>

Inherits QWidget.

Signals

void currentRowChanged (int currentRow)
 Emitted whenever the current selection changes.
 
void itemCheckStateChanged (int row, Qt::CheckState state)
 Emitted whenever the checked state of an item changes.
 

Public Member Functions

 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)
 

Constructor & Destructor Documentation

◆ CheckBoxList()

CheckBoxList ( QWidget *  parent = nullptr)
Parameters
parentSpecifies the parent of the CheckBoxList widget.

Member Function Documentation

◆ addItem()

void addItem ( const QString &  text,
Qt::CheckState  state,
const QTextCharFormat &  format = QTextCharFormat() 
)
Parameters
textThe text for the new item.
stateThe check state the item should be created with.
formatSets 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()

int count ( ) const
Returns
The number of items in the list.

◆ currentRow()

int currentRow ( ) const
Returns
The index of the current row.

◆ currentRowChanged

void currentRowChanged ( int  currentRow)
signal
Parameters
currentRowis the current row selected.

◆ item()

QListWidgetItem * item ( int  index) const
Parameters
indexThe index of the item to return.
Returns
The specified item from the checkbox.

◆ itemCheckStateChanged

void itemCheckStateChanged ( int  row,
Qt::CheckState  state 
)
signal
Parameters
rowis the row of the item that has changed check state
stateis the new check state of the item at row

◆ setCurrentRow()

void setCurrentRow ( int  row)
Parameters
rowIndex of the item to set as the current one.

◆ setFormat()

void setFormat ( int  index,
const QTextCharFormat &  format 
)
Parameters
indexIndex of the item to modify.
formatText 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
indexIndex of the item to modify.
nameThe new name for the specified item.