2 * @file containerSettings.h
3 * @brief Contains the ContainerSettings class
4 * @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
8 #ifndef BUTTONGROUPSETTINGS_H_
9 #define BUTTONGROUPSETTINGS_H_
16 #include "structBCSettings.h"
20 /*! @namespace <creaButtonContainer>
21 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
23 namespace creaButtonContainer
25 /*! @namespace <creaButtonContainer::model>
26 * @brief Contains the implementation of the model in creaButtonContainer library.
27 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
31 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
32 * @brief This class contains the settings of the button container.
34 class ContainerSettings
38 // ----------------------------------------------------------------------------------
39 /*! @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
40 * @brief Defines the BCSettingsStruct type.
42 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
43 // ----------------------------------------------------------------------------------
44 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
45 * @brief Defines the BCStructVectorType type.
47 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
48 // ----------------------------------------------------------------------------------
49 //end of typedef definition
51 // ----------------------------------------------------------------------------------
52 /*! @fn ContainerSettings::ContainerSettings( )
53 * @brief This is the constructor.
56 // ----------------------------------------------------------------------------------
57 /*! @fn virtual ContainerSettings::~ContainerSettings( )
58 * @brief This is the destructor.
61 ~ContainerSettings( );
62 // ----------------------------------------------------------------------------------
63 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
64 * @brief This method returns a container of buttons ordered by group.
65 * @return ButtonGroupMap A container with buttons
68 GetButtonGroupContainer( );
69 // ----------------------------------------------------------------------------------
70 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
71 * @brief This method returns a container with the name of the groups.
72 * @return KeyMapList A list with the name of the button groups.
76 // ----------------------------------------------------------------------------------
77 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
78 * @brief This method allows to create the ButtonGroupContainer.
79 * @param bgContainer The ButtonGroupMap with all buttons.
82 SetButtonGroupContainer( ButtonGroupMap bgContainer );
83 // ----------------------------------------------------------------------------------
84 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
85 * @brief This method sets a container with the name of the groups.
86 * @param gNameList the KeyMapList with all groupNames.
89 SetGroupNameList( KeyMapList gNameList );
90 // ----------------------------------------------------------------------------------
92 * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
93 const std::string iconpath, const std::string buttonDescription,
94 FunctionEventType event )
95 * @brief This method adds a new button to the container.
96 * @param groupName The name of the group of buttons.
97 * @param buttonName The ID of the button.
98 * @param iconpath The path of the button icon.
99 * @param buttonDescription The description of the button.
100 * @param event The event associated to the button.
101 * @see class Functor, ConcreteFunctor for add an event for a button.
102 * @exception std::bad_alloc
105 AddButton( const std::string & groupName, const std::string buttonName,
106 const std::string iconpath, const std::string buttonDescription,
107 FunctionEventType event );
108 // ----------------------------------------------------------------------------------
109 /*! @fn void AddButton( BCSettingsStruct* info );
110 * @brief This method adds a new button to the container.
111 * @exception std::bad_alloc
115 AddButton( BCSettingsStruct* info );
116 // ----------------------------------------------------------------------------------
117 /*! @fn void AddButtons( BCStructVectorType infoList );
118 * @brief This method adds new buttons to the container.
119 * @exception std::bad_alloc
123 AddButtons( BCStructVectorType infoList );
124 // ----------------------------------------------------------------------------------
126 ButtonGroupMap m_ButtonGroupContainer; //! <std::map< std::string, ButtonList > View pointer.
127 KeyMapList m_GroupNameList; //! <ButtonContainerPanel View pointer.
132 #endif /* BUTTONGROUPSETTINGS_H_ */