|
ParaView
|
Delegate for QTableView to draw a checkbox as an left-right (unchecked) and top-bottom (checked) arrow. More...
#include <pqCheckBoxDelegate.h>
Inherits QStyledItemDelegate.
Public Types | |
| enum | CheckBoxValues { NOT_EXPANDED, EXPANDED, NOT_EXPANDED_DISABLED } |
Public Member Functions | |
| pqCheckBoxDelegate (QObject *parent) | |
| ~pqCheckBoxDelegate () | |
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| bool | editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) |
Delegate for QTableView to draw a checkbox as an left-right (unchecked) and top-bottom (checked) arrow.
The checkbox has an extra state for unchecked disabled. Based on a Stack overflow answer: http://stackoverflow.com/questions/3363190/qt-qtableview-how-to-have-a-checkbox-only-column
Definition at line 43 of file pqCheckBoxDelegate.h.
| Enumerator | |
|---|---|
| NOT_EXPANDED | |
| EXPANDED | |
| NOT_EXPANDED_DISABLED | |
Definition at line 48 of file pqCheckBoxDelegate.h.
| pqCheckBoxDelegate::pqCheckBoxDelegate | ( | QObject * | parent | ) |
| pqCheckBoxDelegate::~pqCheckBoxDelegate | ( | ) |
| void pqCheckBoxDelegate::paint | ( | QPainter * | painter, |
| const QStyleOptionViewItem & | option, | ||
| const QModelIndex & | index | ||
| ) | const |
| bool pqCheckBoxDelegate::editorEvent | ( | QEvent * | event, |
| QAbstractItemModel * | model, | ||
| const QStyleOptionViewItem & | option, | ||
| const QModelIndex & | index | ||
| ) |
1.8.12