Check box header view.
More...
#include <CheckBoxHeader.h>
|
|
void | sigCheckStateChanged (int index, Qt::CheckState state) |
|
|
| CCheckBoxHeader (Qt::Orientation orientation, QWidget *parent=nullptr) |
| void | SetCheckable (int index, bool checkable, Qt::CheckState state=Qt::Unchecked) |
| bool | isCheckable (int index) const |
| void | SetCheckState (int index, Qt::CheckState state) |
| Qt::CheckState | GetCheckState (int index) const |
|
| void | paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const override |
| void | mousePressEvent (QMouseEvent *event) override |
|
| QRect | CheckboxRect (const QRect §ionRect) const |
| void | DrawText (QPainter *painter, const QRect &rect, const QString &text, Qt::Alignment alignment) const |
| void | DrawCheckBox (QPainter *painter, const QRect &rect, Qt::CheckState state, bool enabled) const |
Check box header view.
- If the model is a QStandardItemModel, whether to show a checkbox is determined by QStandardItem::isCheckable()
- If the model is not a QStandardItemModel, SetCheckState() is used to decide whether to show a checkbox
Definition at line 18 of file CheckBoxHeader.h.
◆ CheckboxRect()
| QRect CCheckBoxHeader::CheckboxRect |
( |
const QRect & | sectionRect | ) |
const |
|
private |
◆ DrawCheckBox()
| void CCheckBoxHeader::DrawCheckBox |
( |
QPainter * | painter, |
|
|
const QRect & | rect, |
|
|
Qt::CheckState | state, |
|
|
bool | enabled ) const |
|
private |
◆ DrawText()
| void CCheckBoxHeader::DrawText |
( |
QPainter * | painter, |
|
|
const QRect & | rect, |
|
|
const QString & | text, |
|
|
Qt::Alignment | alignment ) const |
|
private |
◆ GetCheckState()
| Qt::CheckState CCheckBoxHeader::GetCheckState |
( |
int | index | ) |
const |
◆ isCheckable()
| bool CCheckBoxHeader::isCheckable |
( |
int | index | ) |
const |
◆ mousePressEvent()
| void CCheckBoxHeader::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
◆ paintSection()
| void CCheckBoxHeader::paintSection |
( |
QPainter * | painter, |
|
|
const QRect & | rect, |
|
|
int | logicalIndex ) const |
|
overrideprotected |
◆ SetCheckable()
| void CCheckBoxHeader::SetCheckable |
( |
int | index, |
|
|
bool | checkable, |
|
|
Qt::CheckState | state = Qt::Unchecked ) |
◆ SetCheckState()
| void CCheckBoxHeader::SetCheckState |
( |
int | index, |
|
|
Qt::CheckState | state ) |
◆ m_CheckableSections
| QHash<int, Qt::CheckState> CCheckBoxHeader::m_CheckableSections |
|
private |
The documentation for this class was generated from the following files: