1 // krazy:excludeall=qclasses 2 3 ////////////////////////////////////////////////////////////////////////////// 4 // oxygencomboboxengine.cpp 5 // stores event filters and maps widgets to animations 6 // ------------------- 7 // 8 // SPDX-FileCopyrightText: 2009 Hugo Pereira Da Costa <hugo.pereira@free.fr> 9 // 10 // SPDX-License-Identifier: MIT 11 ////////////////////////////////////////////////////////////////////////////// 12 13 #include "oxygencomboboxengine.h" 14 15 namespace Oxygen 16 { 17 18 //____________________________________________________________ registerWidget(QComboBox * widget)19 bool ComboBoxEngine::registerWidget( QComboBox* widget ) 20 { 21 22 if( !widget ) return false; 23 if( !_data.contains( widget ) ) { _data.insert( widget, new ComboBoxData( this, widget, duration() ), enabled() ); } 24 25 // connect destruction signal 26 disconnect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); 27 connect( widget, SIGNAL(destroyed(QObject*)), this, SLOT(unregisterWidget(QObject*)) ); 28 29 return true; 30 31 } 32 33 } 34