26 split_background_color(background_color),
27 split_foreground_color(foreground_color),
49 QRectF first_drawing_rectangle(QPointF(0, 0), geometry().adjusted(0, 0, -
split_size, 0).size());
50 QRectF second_drawing_rectangle(first_drawing_rectangle.topRight(), QSize(
split_size, first_drawing_rectangle.height()));
52 painter -> setPen(Qt::black);
54 painter -> drawRect(first_drawing_rectangle);
56 painter -> drawRect(second_drawing_rectangle);
59 painter -> drawText(first_drawing_rectangle, Qt::AlignHCenter | Qt::AlignVCenter,
label);
61 painter -> drawText(second_drawing_rectangle, Qt::AlignHCenter | Qt::AlignVCenter,
split_label);
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
QString split_label
Text displayed on the split side.
int split_size
Length of the split side.
QColor background_color
Background color when rendering this cell.
void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *=nullptr) override
~SplittedHelperCell() override
QColor split_background_color
Background color on the split side.
QColor foreground_color
Text color when rendering this cell.
QColor split_foreground_color
Text color on the split side.
SplittedHelperCell(QGraphicsItem *=nullptr)
QString label
Label displayed in this cell.