You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1022 B
31 lines
1022 B
////////////////////////////////////////////////////////////////////////////// |
|
// breezestackedwidgetengine.cpp |
|
// stores event filters and maps widgets to animations |
|
// ------------------- |
|
// |
|
// SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> |
|
// |
|
// SPDX-License-Identifier: MIT |
|
////////////////////////////////////////////////////////////////////////////// |
|
|
|
#include "breezestackedwidgetengine.h" |
|
|
|
namespace Breeze |
|
{ |
|
|
|
//____________________________________________________________ |
|
bool StackedWidgetEngine::registerWidget( QStackedWidget* widget ) |
|
{ |
|
|
|
if( !widget ) return false; |
|
if( !_data.contains( widget ) ) { _data.insert( widget, new StackedWidgetData( this, widget, duration() ), enabled() ); } |
|
|
|
// connect destruction signal |
|
disconnect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); |
|
connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); |
|
|
|
return true; |
|
|
|
} |
|
|
|
}
|
|
|