void CardAnimationLock::unlock() { if (m_aniEnabled && !m_demoStarted) { CardStack::lockUserInteration(false); emit animationComplete(); } }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void DataContainerCreationWidget::on_applyChangesBtn_clicked() { dataContainerName->setStyleSheet(QString("")); emit parametersChanged(); if (getFaderWidget()) { getFaderWidget()->close(); } QPointer<FaderWidget> faderWidget = new FaderWidget(applyChangesBtn); faderWidget->setFadeOut(); connect(faderWidget, SIGNAL(animationComplete() ), this, SLOT(hideButton())); faderWidget->start(); setFaderWidget(faderWidget); }
// ----------------------------------------------------------------------------- // // ----------------------------------------------------------------------------- void FilterParameterWidget::fadeWidget(QWidget* widget, bool in) { #if 0 if (m_FaderWidget) { m_FaderWidget->close(); } m_FaderWidget = new FaderWidget(widget); if(in) { setVisible(true); m_FaderWidget->setFadeIn(); connect(m_FaderWidget, SIGNAL(animationComplete() ), this, SLOT(show())); connect(m_FaderWidget, SIGNAL(animationComplete()), this, SLOT(showBorder())); widget->setStyleSheet("border: 2px solid MediumBlue;"); } else { m_FaderWidget->setFadeOut(); connect(m_FaderWidget, SIGNAL(animationComplete() ), this, SLOT(hide())); } m_FaderWidget->setStartColor(palette().color(QWidget::backgroundRole())); m_FaderWidget->start(); #else fadeIn = in; QString styleSheet; QTextStream ss (&styleSheet); ss << "QFrame#" << this->objectName() << " { "; ss << "background-color: rgb(223, 183, 175);"; ss << "border: 0px Solid;"; ss << "border-color: rgb(223, 183, 175);"; ss << "border-radius: 5px;"; ss << "}"; if(!fadeIn) { startValue = detail::Max; endValue = 0; } else { widget->show(); widget->setStyleSheet(styleSheet); //qDebug() << styleSheet(); fadeIn = in; startValue = 0; endValue = detail::Max; } QRect rect = geometry(); QLinearGradient alphaGradient(rect.topLeft(), rect.bottomLeft()); alphaGradient.setColorAt(0.5, Qt::black); alphaGradient.setColorAt(1.0, Qt::black); if(!effect) { effect = new QGraphicsOpacityEffect(this); effect->setOpacityMask(alphaGradient); //this->setGraphicsEffect(effect); } if(!animation) { animation = new QPropertyAnimation(effect, "opacity", this); animation->setDuration(detail::Duration); connect(animation, SIGNAL(finished()), this, SLOT(animationFinished())); connect(animation, SIGNAL(finished()), this, SLOT(showBorder())); } animation->setStartValue(startValue); animation->setEndValue(endValue); animation->start(); #endif }