MCPcopy Create free account
hub / github.com/MITK/MITK / CheckBoxRect

Function CheckBoxRect

Modules/RTUI/src/QmitkDoseVisualStyleDelegate.cpp:21–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19#include <QMouseEvent>
20
21static 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
35QmitkDoseVisualStyleDelegate::QmitkDoseVisualStyleDelegate(QObject * /*parent*/)
36{

Callers 1

paintMethod · 0.85

Calls 2

QRectClass · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected