Krita Source Code Documentation
Loading...
Searching...
No Matches
StoryboardStyle Class Reference
+ Inheritance diagram for StoryboardStyle:

Public Member Functions

void drawPrimitive (PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override
 
 StoryboardStyle (QStyle *baseStyle=0)
 

Detailed Description

Definition at line 19 of file StoryboardView.cpp.

Constructor & Destructor Documentation

◆ StoryboardStyle()

StoryboardStyle::StoryboardStyle ( QStyle * baseStyle = 0)
inline

Definition at line 22 of file StoryboardView.cpp.

22: QProxyStyle(baseStyle) {}

Member Function Documentation

◆ 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: