void TransparentBg::init(QWidget *p) { QObject *obj = p->topLevelWidget()->child(_TRANSPARENT); if (obj == NULL) return; bgX = bgY = 0; connect(obj, SIGNAL(backgroundUpdated()), this, SLOT(backgroundUpdated())); }
bool TransparentBg::eventFilter(QObject*, QEvent *e) { if ((e->type() == QEvent::Show) || (e->type() == QEvent::Resize) || (e->type() == QEvent::User)){ backgroundUpdated(); }else if (e->type() == QEvent::Paint){ QTextEdit *text = static_cast<QTextEdit*>(parent()); QPoint pp = text->viewportToContents(QPoint(0, 0)); if ((bgX != pp.x()) || (bgY != pp.y())) backgroundUpdated(); } return false; }
void TransparentTop::updateBackground(const QPixmap &pm) { #if defined(USE_KDE) && defined(HAVE_KROOTPIXMAP_H) saveBG = pm; genBG = QPixmap(); genFade = 0; emit backgroundUpdated(); #endif }
void TransparentTop::updateBackground(const QPixmap&) #endif { #if defined(USE_KDE) && defined(HAVE_KROOTPIXMAP_H) if (pm.isNull()) return; saveBG = pm; genBG = QPixmap(); genFade = 0; emit backgroundUpdated(); #endif }
void TransparentTop::transparentChanged() { #ifdef WIN32 QWidget *p = static_cast<QWidget*>(parent()); setTransparent(p,useTransparent, transparent); #endif #if defined(USE_KDE) && defined(HAVE_KROOTPIXMAP_H) if (useTransparent()){ rootpixmap->start(); }else{ rootpixmap->stop(); saveBG = QPixmap(); genBG = QPixmap(); genFade = 0; emit backgroundUpdated(); } #endif }
void KRootPixmap::updateBackground(KSharedPixmap *spm) { QPixmap pm = *spm; if(m_Fade > 1e-6) { KPixmapIO io; QImage img = io.convertToImage(pm); img = KImageEffect::fade(img, m_Fade, m_FadeColor); pm = io.convertToPixmap(img); } if(!m_bCustomPaint) m_pWidget->setBackgroundPixmap(pm); else { emit backgroundUpdated(pm); } }
void TransparentTop::transparentChanged() { #ifdef WIN32 QWidget *p = static_cast<QWidget*>(parent()); bool bTransparent = true; if (pMain->TransparentIfInactive) bTransparent = !p->isActiveWindow(); setTransparent(p, useTransparent && bTransparent, transparent); #endif #if defined(USE_KDE) && defined(HAVE_KROOTPIXMAP_H) if (useTransparent){ rootpixmap->start(); }else{ rootpixmap->stop(); saveBG = QPixmap(); genBG = QPixmap(); genFade = 0; emit backgroundUpdated(); } #endif }
void FboBlending::setBackgroundImage(ofImage* bg){ this->backgroundImage = bg; backgroundUpdated(); }