#include <Libs/Widgets/ctkCheckableHeaderView.h>
|
QScopedPointer< ctkCheckableHeaderViewPrivate > | d_ptr |
|
ctkCheckableHeaderView is a QHeaderView that can display a checkbox for any header section. If propageteToItems, the check state of the header section is set to all items in the header row/column of the QAbstractItemModel if the items are checkable. ctkCheckableHeaderView also supports row/column sorting. TBD: It should probably be a QSortFilterProxyModel that adds a checkability data on top of the indexes.
Definition at line 74 of file ctkCheckableHeaderView.h.
◆ ctkCheckableHeaderView()
ctkCheckableHeaderView::ctkCheckableHeaderView |
( |
Qt::Orientation |
orient, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
◆ ~ctkCheckableHeaderView()
virtual ctkCheckableHeaderView::~ctkCheckableHeaderView |
( |
| ) |
|
|
virtual |
◆ checkableModelHelper()
◆ checkState() [1/2]
Qt::CheckState ctkCheckableHeaderView::checkState |
( |
int |
section | ) |
const |
Utility function that returns the checkState of the section. One can access the same value through the model: model->headerData(orientation, section, Qt::CheckStateRole)
◆ checkState() [2/2]
bool ctkCheckableHeaderView::checkState |
( |
int |
section, |
|
|
Qt::CheckState & |
checkState |
|
) |
| const |
Utility function that returns the checkState of the section. One can access the same value through the model: model->headerData(orientation, section, Qt::CheckStateRole)
◆ eventFilter()
virtual bool ctkCheckableHeaderView::eventFilter |
( |
QObject * |
object, |
|
|
QEvent * |
e |
|
) |
| |
|
virtual |
Used to listen for focus in/out events.
- Parameters
-
object | The object receiving the event. |
e | Event specific data. |
- Returns
- True if the event should be filtered out.
◆ initStyleSectionOption()
virtual void ctkCheckableHeaderView::initStyleSectionOption |
( |
QStyleOptionHeader * |
option, |
|
|
int |
section, |
|
|
QRect |
rect |
|
) |
| const |
|
protectedvirtual |
◆ isPointInCheckBox()
bool ctkCheckableHeaderView::isPointInCheckBox |
( |
int |
section, |
|
|
QPoint |
pos |
|
) |
| const |
|
protected |
◆ mousePressEvent()
virtual void ctkCheckableHeaderView::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
◆ mouseReleaseEvent()
virtual void ctkCheckableHeaderView::mouseReleaseEvent |
( |
QMouseEvent * |
e | ) |
|
|
protectedvirtual |
◆ setCheckState
void ctkCheckableHeaderView::setCheckState |
( |
int |
section, |
|
|
Qt::CheckState |
checkState |
|
) |
| |
|
slot |
Warning, setting the check state automatically set the header section checkable
◆ setModel()
virtual void ctkCheckableHeaderView::setModel |
( |
QAbstractItemModel * |
model | ) |
|
|
virtual |
When setting the model, if PropagateToItems is true (by default), the check state of the checkable headers is updated from the check state of the items If you want to make sure of the check state of a header, after setting the (done by myView.setHeader(myCheckableHeaderView)), you can call myModel.setHeaderData(0, Qt::Horizontal, Qt::Checked, Qt::CheckStateRole) or myCheckableHeaderView->setCheckState(0, Qt::Checked)
◆ setRootIndex()
virtual void ctkCheckableHeaderView::setRootIndex |
( |
const QModelIndex & |
index | ) |
|
|
virtual |
Reimplemented for internal reasons.
◆ updateHeaderPixmaps()
virtual void ctkCheckableHeaderView::updateHeaderPixmaps |
( |
int |
first, |
|
|
int |
last |
|
) |
| |
|
protectedvirtual |
◆ d_ptr
QScopedPointer<ctkCheckableHeaderViewPrivate> ctkCheckableHeaderView::d_ptr |
|
protected |
The documentation for this class was generated from the following file: