|
| void | drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override |
| |
| | StoryboardStyle (QStyle *baseStyle=0) |
| |
Definition at line 19 of file StoryboardView.cpp.
◆ StoryboardStyle()
| StoryboardStyle::StoryboardStyle |
( |
QStyle * | baseStyle = 0 | ) |
|
|
inline |
◆ drawPrimitive()
| void StoryboardStyle::drawPrimitive |
( |
PrimitiveElement | element, |
|
|
const QStyleOption * | option, |
|
|
QPainter * | painter, |
|
|
const QWidget * | widget ) const |
|
inlineoverride |
Definition at line 24 of file StoryboardView.cpp.
28 {
29 if (element == QStyle::PE_IndicatorItemViewItemDrop)
30 {
31 QColor color(widget->palette().color(QPalette::Highlight).lighter());
32 if (option->rect.width() == 0 && option->rect.height() == 0){
33 return;
34 }
35 else if (option->rect.width() == 0) {
36 QBrush brush(color);
37
38 QRect
r(option->rect);
39 r.setLeft(
r.left() - 4);
40 r.setRight(
r.right() + 4);
41
42 painter->fillRect(r, brush);
43 }
44 else if (option->rect.height() == 0) {
45 QBrush brush(color);
46
47 QRect
r(option->rect);
48 r.setTop(
r.top() - 4);
49 r.setBottom(
r.bottom() + 4);
50
51 painter->fillRect(r, brush);
52 }
53 }
54 else
55 {
56 QProxyStyle::drawPrimitive(element, option, painter, widget);
57 }
58 }
The documentation for this class was generated from the following file: