void KFileIVIDesktop::paintItem( TQPainter *p, const TQColorGroup &cg) { TQColorGroup colors = updateColors(cg); TQIconView* view = iconView(); Q_ASSERT( view ); if ( !view ) return; if ( !wordWrap() ) return; p->save(); // draw the pixmap as in TDEIconViewItem::paintItem(...) paintPixmap(p, colors); // // Paint the text as shadowed if the shadow is available // if (m_shadow != 0L && (static_cast<KDesktopShadowSettings *> (m_shadow->shadowSettings()))->isEnabled()) drawShadowedText(p, colors); else { paintFontUpdate(p); paintText(p, colors); } p->restore(); paintOverlay(p); paintOverlayProgressBar(p); }
void SceneViewport::paintEvent(QPaintEvent *) { QPainter painter(this); painter.setRenderHint(QPainter::Antialiasing); #ifdef USE_VTUNE_PROFILER __itt_frame_begin_v3(m_traceDomain, NULL); #endif double currentTimestamp = (double)m_gameTimer->nsecsElapsed() * 0.000000001; m_scene->update(currentTimestamp); m_scene->draw(); #ifdef USE_VTUNE_PROFILER __itt_frame_end_v3(m_traceDomain, NULL); #endif paintOverlay(painter); // XXX fix QPainter overlay artifacts on Windows. }
void ZmqClientProcess::send(GenericSendMessage &message, EventHandler &handler) { m_zmqMutex.lock(); if (m_isAlive) { switch (message.type) { case None: { throw std::invalid_argument("Message type must not be 'None'"); break; } case Track: { auto &m = static_cast<SendTrackMessage &>(message); track(m, handler); break; } case Paint: { auto &m = static_cast<SendPaintMessage &>(message); paint(m, handler); break; } case PaintOverlay: { auto &m = static_cast<SendPaintOverlayMessage &>(message); paintOverlay(m, handler); break; } case RequestTools: { auto &m = static_cast<SendRequestWidgetsMessage &>(message); requestTools(m, handler); break; } case ButtonClick: { auto &m = static_cast<SendButtonClickMessage &>(message); buttonClicked(m, handler); break; } case ValueChanged: { auto &m = static_cast<SendValueChangedMessage &>(message); sendValue(m, handler); break; } } } m_zmqMutex.unlock(); }
void DockModeWindow::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { painter->setRenderHint(QPainter::SmoothPixmapTransform, !m_maximized); QPainter::CompositionMode previous = painter->compositionMode(); painter->setCompositionMode(m_compMode); paintBase(painter, m_maximized); if (m_loadingOverlayEnabled) { bool maximized = qFuzzyCompare(scale(), (qreal)1.0) && qFuzzyCompare(x(), (qreal)0.0); painter->setRenderHint(QPainter::SmoothPixmapTransform, true); QPainter::CompositionMode previous = painter->compositionMode(); painter->setCompositionMode(QPainter::CompositionMode_SourceOver); painter->fillRect(boundingRect(), QColor (0, 0, 0, 0xff)); painter->setCompositionMode(QPainter::CompositionMode_SourceOver); // Draw the glow pulse painter->setBrushOrigin(boundingRect().x(), boundingRect().y()); if (s_dockGlow) { painter->setOpacity(opacity() * pulseOpacity()); painter->drawPixmap (boundingRect(), *s_dockGlow, (*s_dockGlow).rect()); painter->setOpacity(opacity()); } painter->setBrushOrigin(0, 0); // Draw the icon in front of the glow painter->drawPixmap(-m_icon.width()/2, -m_icon.height()/2, m_icon); painter->setCompositionMode(previous); painter->setRenderHint(QPainter::SmoothPixmapTransform, false); } paintOverlay(painter, m_maximized); painter->setCompositionMode(previous); painter->setRenderHint(QPainter::SmoothPixmapTransform, false); }