1 /***************************************************************
2 * Name: ButtonGroupSettings.cxx
3 * Purpose: It is the ButtonGroupSettings
4 * Author: Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
6 * Copyright: Diego CACERES (http://www.creatis.insa-lyon.fr/~caceres/)
8 **************************************************************/
9 #include "containerSettings.h"
11 namespace creaButtonContainer
16 ContainerSettings::ContainerSettings( )
20 ContainerSettings::~ContainerSettings( )
25 ContainerSettings::GetButtonGroupContainer( )
27 return m_ButtonGroupContainer;
31 ContainerSettings::GetGroupNameList( )
33 return m_GroupNameList;
37 ContainerSettings::SetButtonGroupContainer(
38 ButtonGroupMap m_ButtonGroupContainer )
40 this->m_ButtonGroupContainer = m_ButtonGroupContainer;
44 ContainerSettings::SetGroupNameList( KeyMapList m_GroupNameList )
46 this->m_GroupNameList = m_GroupNameList;
50 ContainerSettings::CreateGroup( const std::string & groupName )
52 this->m_GroupNameList.push_back( groupName );
55 ContainerSettings::AddButton( const std::string & groupName,
56 const std::string buttonName, const std::string iconpath,
57 const std::string buttonDescription, FunctionEventType event )
59 for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
60 != this->m_GroupNameList.end( ); ++it )
61 if ( ( *it ).compare( groupName ) == 0 )
63 ButtonPair* pair = new ButtonPair(
64 new ButtonInfo( buttonName, iconpath ),
65 new ActionButton( buttonDescription, event ) );
66 this->m_ButtonGroupContainer[ groupName ].push_back( pair );