コード例 #1
0
ファイル: controller.cpp プロジェクト: r1k/vlc
/**
 * Hidding fullscreen controller slowly
 * Linux: need composite manager
 * Windows: it is blinking, so it can be enabled by define TRASPARENCY
 */
void FullscreenControllerWidget::slowHideFSC()
{
#if HAVE_TRANSPARENCY
    if( b_slow_hide_begin )
    {
        b_slow_hide_begin = false;

        p_slowHideTimer->stop();
        /* the last part of time divided to 100 pieces */
        p_slowHideTimer->start( (int)( i_slow_hide_timeout / 2 / ( windowOpacity() * 100 ) ) );

    }
    else
    {
         if ( windowOpacity() > 0.0 )
         {
             /* we should use 0.01 because of 100 pieces ^^^
                but than it cannt be done in time */
             setWindowOpacity( windowOpacity() - 0.02 );
         }

         if ( windowOpacity() <= 0.0 )
             p_slowHideTimer->stop();
    }
#endif
}
コード例 #2
0
ファイル: popupmessage.cpp プロジェクト: Legotckoi/EColor
void PopUpMessage::show()
{
    setGeometry(QApplication::desktop()->availableGeometry().width() - 36 - width() + QApplication::desktop() -> availableGeometry().x(),
                QApplication::desktop()->availableGeometry().height() - 36 - height() + QApplication::desktop() -> availableGeometry().y(),
                width(),
                height());
    if(!isVisible()){
        setWindowOpacity(0.0);

        animation.setDuration(150);
        animation.setStartValue(0.0);
        animation.setEndValue(1.0);

        QWidget::show();

        animation.start();
        timer->start(3000);
    } else {
        animation.setDuration(windowOpacity()*150);
        animation.setStartValue(windowOpacity());
        animation.setEndValue(1.0);
        animation.start();
        timer->start(3000);
    }
}
コード例 #3
0
ファイル: OsdFloat.cpp プロジェクト: ntadej/tano
void OsdFloat::slowShow()
{
    setWindowOpacity(windowOpacity() + 0.08);

    if (windowOpacity() >= 1) {
        _slowShowTimer->stop();
    }
}
コード例 #4
0
ファイル: OsdFloat.cpp プロジェクト: ntadej/tano
void OsdFloat::slowHide()
{
    setWindowOpacity(windowOpacity() - 0.04);

    if (windowOpacity() <= 0) {
        _slowHideTimer->stop();

#if !defined(Qt4) && !defined(Q_WS_X11)
        hide();
#else
        if (_alwaysHide)
            hide();
#endif
    }
}
コード例 #5
0
ファイル: notifywin.cpp プロジェクト: CVGVZh/SoXy3
void NotifyWin::timeOut()
{
    delete animation_geometry;
    if(	windowOpacity()> 0.5 ){
        animation_geometry = new QPropertyAnimation(this, "geometry");
        animation_geometry->setDuration(500);
        animation_geometry->setEndValue(QRect(avar.width()-width(), avar.height()/2 - height()/2, width()/2, height()/2));
        animation_geometry->setEasingCurve(QEasingCurve::InCubic);

        animation_opacity = new QPropertyAnimation(this, "windowOpacity");
        //connect(animation, SIGNAL(finished()), this, SLOT(timeOut()));
        animation_opacity->setDuration(500);
        animation_opacity->setStartValue(qreal(0.75));
        animation_opacity->setEndValue(qreal(0.0));
        animation_opacity->setEasingCurve(QEasingCurve::InCubic);

        ani_group = new QParallelAnimationGroup;
        ani_group->addAnimation(animation_geometry);
        ani_group->addAnimation(animation_opacity);
        connect( ani_group, SIGNAL(finished()), this , SLOT(timeOut()));
        ani_group->start();
    }
    else
    {
        life_timer->stop();
        emit iGonnaDie();
    }
}
コード例 #6
0
ファイル: splashscreen.cpp プロジェクト: cserhalmi/srh
void SplashScreen::fade()
{
  if (timer < 40)
  {
    timer++;
  }
  else
  {
    if (windowOpacity() > 0)
    {
      setWindowOpacity(windowOpacity() - 0.01);
    }
    else
    {
      label->clear();
      startup = false;
    }
  }
}
コード例 #7
0
ファイル: OsdFloat.cpp プロジェクト: ntadej/tano
void OsdFloat::floatShow()
{
#if !defined(Q_OS_WIN32)
    _slowHideTimer->stop();

    if (isVisible() && windowOpacity() >= 1)
        return;

    _slowShowTimer->start(5);
#endif
    show();
}
コード例 #8
0
void kWarningWindow::timerEvent(QTimerEvent *event){
	if (event->timerId() == timeid){
		double opa = windowOpacity();
		if (opa > 0){
			opa -= 0.025;
			setWindowOpacity(opa);
		}
		else{
			hide();
			killTimer(timeid);
		}
	}
}
コード例 #9
0
int QWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        if (_id < 23)
            qt_static_metacall(this, _c, _id, _a);
        _id -= 23;
    }
#ifndef QT_NO_PROPERTIES
      else if (_c == QMetaObject::ReadProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 0: *reinterpret_cast< bool*>(_v) = isModal(); break;
        case 1: *reinterpret_cast< Qt::WindowModality*>(_v) = windowModality(); break;
        case 2: *reinterpret_cast< bool*>(_v) = isEnabled(); break;
        case 3: *reinterpret_cast< QRect*>(_v) = geometry(); break;
        case 4: *reinterpret_cast< QRect*>(_v) = frameGeometry(); break;
        case 5: *reinterpret_cast< QRect*>(_v) = normalGeometry(); break;
        case 6: *reinterpret_cast< int*>(_v) = x(); break;
        case 7: *reinterpret_cast< int*>(_v) = y(); break;
        case 8: *reinterpret_cast< QPoint*>(_v) = pos(); break;
        case 9: *reinterpret_cast< QSize*>(_v) = frameSize(); break;
        case 10: *reinterpret_cast< QSize*>(_v) = size(); break;
        case 11: *reinterpret_cast< int*>(_v) = width(); break;
        case 12: *reinterpret_cast< int*>(_v) = height(); break;
        case 13: *reinterpret_cast< QRect*>(_v) = rect(); break;
        case 14: *reinterpret_cast< QRect*>(_v) = childrenRect(); break;
        case 15: *reinterpret_cast< QRegion*>(_v) = childrenRegion(); break;
        case 16: *reinterpret_cast< QSizePolicy*>(_v) = sizePolicy(); break;
        case 17: *reinterpret_cast< QSize*>(_v) = minimumSize(); break;
        case 18: *reinterpret_cast< QSize*>(_v) = maximumSize(); break;
        case 19: *reinterpret_cast< int*>(_v) = minimumWidth(); break;
        case 20: *reinterpret_cast< int*>(_v) = minimumHeight(); break;
        case 21: *reinterpret_cast< int*>(_v) = maximumWidth(); break;
        case 22: *reinterpret_cast< int*>(_v) = maximumHeight(); break;
        case 23: *reinterpret_cast< QSize*>(_v) = sizeIncrement(); break;
        case 24: *reinterpret_cast< QSize*>(_v) = baseSize(); break;
        case 25: *reinterpret_cast< QPalette*>(_v) = palette(); break;
        case 26: *reinterpret_cast< QFont*>(_v) = font(); break;
        case 27: *reinterpret_cast< QCursor*>(_v) = cursor(); break;
        case 28: *reinterpret_cast< bool*>(_v) = hasMouseTracking(); break;
        case 29: *reinterpret_cast< bool*>(_v) = isActiveWindow(); break;
        case 30: *reinterpret_cast< Qt::FocusPolicy*>(_v) = focusPolicy(); break;
        case 31: *reinterpret_cast< bool*>(_v) = hasFocus(); break;
        case 32: *reinterpret_cast< Qt::ContextMenuPolicy*>(_v) = contextMenuPolicy(); break;
        case 33: *reinterpret_cast< bool*>(_v) = updatesEnabled(); break;
        case 34: *reinterpret_cast< bool*>(_v) = isVisible(); break;
        case 35: *reinterpret_cast< bool*>(_v) = isMinimized(); break;
        case 36: *reinterpret_cast< bool*>(_v) = isMaximized(); break;
        case 37: *reinterpret_cast< bool*>(_v) = isFullScreen(); break;
        case 38: *reinterpret_cast< QSize*>(_v) = sizeHint(); break;
        case 39: *reinterpret_cast< QSize*>(_v) = minimumSizeHint(); break;
        case 40: *reinterpret_cast< bool*>(_v) = acceptDrops(); break;
        case 41: *reinterpret_cast< QString*>(_v) = windowTitle(); break;
        case 42: *reinterpret_cast< QIcon*>(_v) = windowIcon(); break;
        case 43: *reinterpret_cast< QString*>(_v) = windowIconText(); break;
        case 44: *reinterpret_cast< double*>(_v) = windowOpacity(); break;
        case 45: *reinterpret_cast< bool*>(_v) = isWindowModified(); break;
        case 46: *reinterpret_cast< QString*>(_v) = toolTip(); break;
        case 47: *reinterpret_cast< QString*>(_v) = statusTip(); break;
        case 48: *reinterpret_cast< QString*>(_v) = whatsThis(); break;
        case 49: *reinterpret_cast< QString*>(_v) = accessibleName(); break;
        case 50: *reinterpret_cast< QString*>(_v) = accessibleDescription(); break;
        case 51: *reinterpret_cast< Qt::LayoutDirection*>(_v) = layoutDirection(); break;
        case 52: *reinterpret_cast< bool*>(_v) = autoFillBackground(); break;
        case 53: *reinterpret_cast< QString*>(_v) = styleSheet(); break;
        case 54: *reinterpret_cast< QLocale*>(_v) = locale(); break;
        case 55: *reinterpret_cast< QString*>(_v) = windowFilePath(); break;
        case 56: *reinterpret_cast< Qt::InputMethodHints*>(_v) = inputMethodHints(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::WriteProperty) {
        void *_v = _a[0];
        switch (_id) {
        case 1: setWindowModality(*reinterpret_cast< Qt::WindowModality*>(_v)); break;
        case 2: setEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 3: setGeometry(*reinterpret_cast< QRect*>(_v)); break;
        case 8: move(*reinterpret_cast< QPoint*>(_v)); break;
        case 10: resize(*reinterpret_cast< QSize*>(_v)); break;
        case 16: setSizePolicy(*reinterpret_cast< QSizePolicy*>(_v)); break;
        case 17: setMinimumSize(*reinterpret_cast< QSize*>(_v)); break;
        case 18: setMaximumSize(*reinterpret_cast< QSize*>(_v)); break;
        case 19: setMinimumWidth(*reinterpret_cast< int*>(_v)); break;
        case 20: setMinimumHeight(*reinterpret_cast< int*>(_v)); break;
        case 21: setMaximumWidth(*reinterpret_cast< int*>(_v)); break;
        case 22: setMaximumHeight(*reinterpret_cast< int*>(_v)); break;
        case 23: setSizeIncrement(*reinterpret_cast< QSize*>(_v)); break;
        case 24: setBaseSize(*reinterpret_cast< QSize*>(_v)); break;
        case 25: setPalette(*reinterpret_cast< QPalette*>(_v)); break;
        case 26: setFont(*reinterpret_cast< QFont*>(_v)); break;
        case 27: setCursor(*reinterpret_cast< QCursor*>(_v)); break;
        case 28: setMouseTracking(*reinterpret_cast< bool*>(_v)); break;
        case 30: setFocusPolicy(*reinterpret_cast< Qt::FocusPolicy*>(_v)); break;
        case 32: setContextMenuPolicy(*reinterpret_cast< Qt::ContextMenuPolicy*>(_v)); break;
        case 33: setUpdatesEnabled(*reinterpret_cast< bool*>(_v)); break;
        case 34: setVisible(*reinterpret_cast< bool*>(_v)); break;
        case 40: setAcceptDrops(*reinterpret_cast< bool*>(_v)); break;
        case 41: setWindowTitle(*reinterpret_cast< QString*>(_v)); break;
        case 42: setWindowIcon(*reinterpret_cast< QIcon*>(_v)); break;
        case 43: setWindowIconText(*reinterpret_cast< QString*>(_v)); break;
        case 44: setWindowOpacity(*reinterpret_cast< double*>(_v)); break;
        case 45: setWindowModified(*reinterpret_cast< bool*>(_v)); break;
        case 46: setToolTip(*reinterpret_cast< QString*>(_v)); break;
        case 47: setStatusTip(*reinterpret_cast< QString*>(_v)); break;
        case 48: setWhatsThis(*reinterpret_cast< QString*>(_v)); break;
        case 49: setAccessibleName(*reinterpret_cast< QString*>(_v)); break;
        case 50: setAccessibleDescription(*reinterpret_cast< QString*>(_v)); break;
        case 51: setLayoutDirection(*reinterpret_cast< Qt::LayoutDirection*>(_v)); break;
        case 52: setAutoFillBackground(*reinterpret_cast< bool*>(_v)); break;
        case 53: setStyleSheet(*reinterpret_cast< QString*>(_v)); break;
        case 54: setLocale(*reinterpret_cast< QLocale*>(_v)); break;
        case 55: setWindowFilePath(*reinterpret_cast< QString*>(_v)); break;
        case 56: setInputMethodHints(*reinterpret_cast< Qt::InputMethodHints*>(_v)); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::ResetProperty) {
        switch (_id) {
        case 27: unsetCursor(); break;
        case 51: unsetLayoutDirection(); break;
        case 54: unsetLocale(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyDesignable) {
        bool *_b = reinterpret_cast<bool*>(_a[0]);
        switch (_id) {
        case 41: *_b = isWindow(); break;
        case 42: *_b = isWindow(); break;
        case 43: *_b = isWindow(); break;
        case 44: *_b = isWindow(); break;
        case 45: *_b = isWindow(); break;
        case 55: *_b = isWindow(); break;
        }
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyScriptable) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyStored) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyEditable) {
        _id -= 57;
    } else if (_c == QMetaObject::QueryPropertyUser) {
        _id -= 57;
    }
#endif // QT_NO_PROPERTIES
    return _id;
}