| 37 | } |
| 38 | |
| 39 | void QmitkDoseVisualStyleDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const |
| 40 | { |
| 41 | bool checkValue = index.data(Qt::DisplayRole).toBool(); |
| 42 | |
| 43 | QStyleOptionButton BtnStyle; |
| 44 | BtnStyle.state = QStyle::State_Enabled; |
| 45 | |
| 46 | if(checkValue) |
| 47 | { |
| 48 | BtnStyle.state |= QStyle::State_On; |
| 49 | } |
| 50 | else |
| 51 | { |
| 52 | BtnStyle.state |= QStyle::State_Off; |
| 53 | } |
| 54 | |
| 55 | BtnStyle.direction = QApplication::layoutDirection(); |
| 56 | BtnStyle.rect = CheckBoxRect(option); |
| 57 | QApplication::style()->drawControl(QStyle::CE_CheckBox,&BtnStyle,painter ); |
| 58 | } |
| 59 | |
| 60 | bool QmitkDoseVisualStyleDelegate::editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &, |
| 61 | const QModelIndex &index) |
nothing calls this directly
no test coverage detected