void QPaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, QPainter::PixmapFragmentHints /*hints*/) { if (pixmap.isNull()) return; qreal oldOpacity = state()->opacity; QTransform oldTransform = state()->matrix; for (int i = 0; i < fragmentCount; ++i) { QTransform transform = oldTransform; transform.translate(fragments[i].x, fragments[i].y); transform.rotate(fragments[i].rotation); state()->opacity = oldOpacity * fragments[i].opacity; state()->matrix = transform; opacityChanged(); transformChanged(); qreal w = fragments[i].scaleX * fragments[i].width; qreal h = fragments[i].scaleY * fragments[i].height; QRectF sourceRect(fragments[i].sourceLeft, fragments[i].sourceTop, fragments[i].width, fragments[i].height); drawPixmap(QRectF(-0.5 * w, -0.5 * h, w, h), pixmap, sourceRect); } state()->opacity = oldOpacity; state()->matrix = oldTransform; opacityChanged(); transformChanged(); }
void SurfaceItem::setOpacity(qreal op) { if (op != m_opacity) { m_opacity = op; emit opacityChanged(); } }
void MapGraphicsObject::setOpacity(qreal nOpacity) { _opacity = nOpacity; if (_constructed) this->opacityChanged(); else QTimer::singleShot(1, this, SIGNAL(opacityChanged())); }
void QcWmtsPluginLayerData::set_opacity(float opacity) { if (m_opacity != opacity) { m_opacity = opacity; emit opacityChanged(opacity); } }
void PictureModel::setOpacity(qreal opacity) { if(std::abs(mImageOpacity - opacity) > 0.0001) { mImageOpacity = opacity; emit opacityChanged(mImageOpacity); emit composedImageUpdated(); } }
//private void PrivateQGraphicsObject::setMGObj(MapGraphicsObject * mgObj) { _mgObj = mgObj; if (_mgObj == 0) return; //Connect signals/slots for all of the changes in the MapGraphicsObject that we must be able to handle connect(_mgObj, SIGNAL(enabledChanged()), this, SLOT(handleEnabledChanged())); connect(_mgObj, SIGNAL(opacityChanged()), this, SLOT(handleOpacityChanged())); connect(_mgObj, SIGNAL(parentChanged()), this, SLOT(handleParentChanged())); connect(_mgObj, SIGNAL(posChanged()), this, SLOT(handlePosChanged())); connect(_mgObj, SIGNAL(rotationChanged()), this, SLOT(handleRotationChanged())); connect(_mgObj, SIGNAL(visibleChanged()), this, SLOT(handleVisibleChanged())); connect(_mgObj, SIGNAL(zValueChanged()), this, SLOT(handleZValueChanged())); connect(_mgObj, SIGNAL(selectedChanged()), this, SLOT(handleMGSelectedChanged())); connect(_mgObj, SIGNAL(flagsChanged()), this, SLOT(handleMGFlagsChanged())); connect(mgObj, SIGNAL(keyFocusRequested()), this, SLOT(handleKeyFocusRequested())); //Get all of the info about the MGObject this->updateAllFromMG(); connect(mgObj, SIGNAL(destroyed()), this, SLOT(deleteLater())); }
void ModelItem::setOpacity(qreal opacity, bool notify) { if(m_opacity != opacity) { m_opacity = opacity; if(notify) { emit opacityChanged(); } } }
void ColorEditor::setOpacity(int opacity) { Q_ASSERT(opacity >= 0 && opacity <= 255); if (d->opacitySlider->value() != opacity) { d->opacitySlider->setValue(opacity); emit opacityChanged(opacity); } }
void MediaSourceBase::opcatiyFaderChanged() { if (syncVolToOpacityCheckBox->isChecked()) { setVolume(opacitySlider->value() / 1000.0); volumeFaderChanged(); } updateBackground(); emit opacityChanged(opacitySlider->value() / 1000.0); }
KateFadeEffect::KateFadeEffect(QWidget* widget) : QObject(widget) , m_widget(widget) , m_effect(0) // effect only exists during fading animation { m_timeLine = new QTimeLine(500, this); m_timeLine->setUpdateInterval(40); connect(m_timeLine, SIGNAL(valueChanged(qreal)), this, SLOT(opacityChanged(qreal))); connect(m_timeLine, SIGNAL(finished()), this, SLOT(animationFinished())); }
void Toplevel::setOpacity(double new_opacity) { double old_opacity = opacity(); new_opacity = qBound(0.0, new_opacity, 1.0); if (old_opacity == new_opacity) return; info->setOpacity(static_cast< unsigned long >(new_opacity * 0xffffffff)); if (compositing()) { addRepaintFull(); emit opacityChanged(this, old_opacity); } }
void QDeclarativeBasePositionerPrivate::unwatchChanges(QGraphicsObject* other) { if (QGraphicsItemPrivate::get(other)->isDeclarativeItem) { QDeclarativeItemPrivate *otherPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(other)); otherPrivate->removeItemChangeListener(this, watchedChanges); } else { Q_Q(QDeclarativeBasePositioner); QObject::disconnect(other, SIGNAL(widthChanged()), q, SLOT(graphicsWidgetGeometryChanged())); QObject::disconnect(other, SIGNAL(heightChanged()), q, SLOT(graphicsWidgetGeometryChanged())); QObject::disconnect(other, SIGNAL(opacityChanged()), q, SLOT(graphicsWidgetGeometryChanged())); QObject::disconnect(other, SIGNAL(visibleChanged()), q, SLOT(graphicsWidgetGeometryChanged())); } }
void ModelItem::sendAttributeChanges() { emit valueChanged(); emit enabledChanged(); emit selectedChanged(); emit opacityChanged(); emit visibilityChanged(); emit brushChanged(); emit fontChanged(); emit penChanged(); emit posChanged(true, true); }
void WWindow::setOpacity(qreal opacity) { Q_D(WWindow); #ifdef QT_4 if (d->view->windowOpacity() == opacity) return; d->view->setWindowOpacity(opacity); #else if (d->view->opacity() == opacity) return; d->view->setOpacity(opacity); #endif emit opacityChanged(); }
void QGraphicsOpacityEffect::setOpacity(qreal opacity) { Q_D(QGraphicsOpacityEffect); opacity = qBound(qreal(0.0), opacity, qreal(1.0)); if (qFuzzyCompare(d->opacity, opacity)) return; d->opacity = opacity; if ((d->isFullyTransparent = qFuzzyIsNull(d->opacity))) d->isFullyOpaque = 0; else d->isFullyOpaque = qFuzzyIsNull(d->opacity - 1); update(); emit opacityChanged(opacity); }
void tst_QXYSeries::seriesOpacity() { QSignalSpy opacitySpy(m_series, SIGNAL(opacityChanged())); QCOMPARE(m_series->opacity(), 1.0); m_series->setOpacity(0.5); QCOMPARE(m_series->opacity(), 0.5); QCOMPARE(opacitySpy.count(), 1); m_series->setOpacity(0.0); QCOMPARE(m_series->opacity(), 0.0); QCOMPARE(opacitySpy.count(), 2); m_series->setOpacity(1.0); QCOMPARE(m_series->opacity(), 1.0); QCOMPARE(opacitySpy.count(), 3); }
void tst_QGraphicsObject::opacity() { MyGraphicsObject object; QSignalSpy spy(&object, SIGNAL(opacityChanged())); QVERIFY(object.opacity() == 1.); object.setOpacity(0); QCOMPARE(spy.count(), 1); QVERIFY(object.opacity() == 0.); object.setOpacity(0); QCOMPARE(spy.count(), 1); object.setProperty("opacity", .5); QCOMPARE(spy.count(), 2); QVERIFY(object.property("opacity") == .5); }
void QBlitterPaintEngine::setState(QPainterState *s) { Q_D(QBlitterPaintEngine); d->lock(); QPaintEngineEx::setState(s); d->raster->setState(s); clipEnabledChanged(); penChanged(); brushChanged(); brushOriginChanged(); opacityChanged(); compositionModeChanged(); renderHintsChanged(); transformChanged(); d->updateClip(); }
void OpacityCommand::setOpacity(float opacity) { this->opacity = opacity; emit opacityChanged(this->opacity); }
void BrushEngine::setOpacity(int opacity) { if (this->opacity == opacity) return; this->opacity = opacity; emit opacityChanged(opacity); }
void ItemVisibilityControllerPropertyObject::setOpacity(qreal opacity) { m_opacity = opacity; emit opacityChanged(); }
void UserButton::setOpacity(double opa) { if (m_opacity != opa) { m_opacity = opa; emit opacityChanged(); } }
void HappyTreeWidget::setopacity(qreal opacity) { this->verticalScrollBar()->setWindowOpacity(opacity); this->verticalScrollBar()->update(); emit opacityChanged(opacity); }