MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / paint

Method paint

src/tools/UBGraphicsCurtainItem.cpp:126–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124
125
126void UBGraphicsCurtainItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
127{
128 QColor color = drawColor();
129 painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
130 if(widget == UBApplication::boardController->controlView()->viewport())
131 {
132 color = UBSettings::paletteColor;
133 if(!UBApplication::displayManager->useMultiScreen() || !UBApplication::displayManager->hasDisplay())
134 {
135 color = opaqueControlColor();
136 }
137 }
138
139 // Never draw the rubber band, we draw our custom selection with the DelegateFrame
140 QStyleOptionGraphicsItem styleOption = QStyleOptionGraphicsItem(*option);
141 styleOption.state &= ~QStyle::State_Selected;
142
143 painter->fillRect(rect(), color);
144 Delegate()->postpaint(painter, option, widget);
145}
146
147
148UBItem* UBGraphicsCurtainItem::deepCopy() const

Callers

nothing calls this directly

Calls 4

hasDisplayMethod · 0.80
postpaintMethod · 0.80
controlViewMethod · 0.45
useMultiScreenMethod · 0.45

Tested by

no test coverage detected