Changeset View
Changeset View
Standalone View
Standalone View
kstyle/animations/breezestackedwidgetdata.cpp
Show All 31 Lines | 30 | { | |||
---|---|---|---|---|---|
32 | //______________________________________________________ | 32 | //______________________________________________________ | ||
33 | StackedWidgetData::StackedWidgetData( QObject* parent, QStackedWidget* target, int duration ): | 33 | StackedWidgetData::StackedWidgetData( QObject* parent, QStackedWidget* target, int duration ): | ||
34 | TransitionData( parent, target, duration ), | 34 | TransitionData( parent, target, duration ), | ||
35 | _target( target ), | 35 | _target( target ), | ||
36 | _index( target->currentIndex() ) | 36 | _index( target->currentIndex() ) | ||
37 | { | 37 | { | ||
38 | 38 | | |||
39 | // configure transition | 39 | // configure transition | ||
40 | connect( _target.data(), SIGNAL(destroyed()), SLOT(targetDestroyed()) ); | 40 | connect( _target.data(), &QObject::destroyed, this, &StackedWidgetData::targetDestroyed ); | ||
41 | connect( _target.data(), SIGNAL(currentChanged(int)), SLOT(animate()) ); | 41 | connect( _target.data(), SIGNAL(currentChanged(int)), SLOT(animate()) ); | ||
42 | 42 | | |||
43 | // disable focus | 43 | // disable focus | ||
44 | transition().data()->setAttribute(Qt::WA_NoMousePropagation, true); | 44 | transition().data()->setAttribute(Qt::WA_NoMousePropagation, true); | ||
45 | transition().data()->setFlag(TransitionWidget::PaintOnWidget, true); | 45 | transition().data()->setFlag(TransitionWidget::PaintOnWidget, true); | ||
46 | 46 | | |||
47 | setMaxRenderTime( 50 ); | 47 | setMaxRenderTime( 50 ); | ||
48 | 48 | | |||
▲ Show 20 Lines • Show All 91 Lines • Show Last 20 Lines |