| 19 | #include <QMouseEvent> |
| 20 | |
| 21 | static QRect CheckBoxRect(const QStyleOptionViewItem &view_item_style_options) { |
| 22 | QStyleOptionButton check_box_style_option; |
| 23 | QRect check_box_rect = QApplication::style()->subElementRect( |
| 24 | QStyle::SE_CheckBoxIndicator, |
| 25 | &check_box_style_option); |
| 26 | QPoint check_box_point(view_item_style_options.rect.x() + |
| 27 | view_item_style_options.rect.width() / 2 - |
| 28 | check_box_rect.width() / 2, |
| 29 | view_item_style_options.rect.y() + |
| 30 | view_item_style_options.rect.height() / 2 - |
| 31 | check_box_rect.height() / 2); |
| 32 | return QRect(check_box_point, check_box_rect.size()); |
| 33 | } |
| 34 | |
| 35 | QmitkDoseVisualStyleDelegate::QmitkDoseVisualStyleDelegate(QObject * /*parent*/) |
| 36 | { |