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_
13 #include "structBCSettings.h"
16 /*! @namespace <creaButtonContainer>
17 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
19 namespace creaButtonContainer
21 /*! @namespace <creaButtonContainer::model>
22 * @brief Contains the implementation of the model in creaButtonContainer library.
23 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
27 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
28 * @brief This class contains the settings of the button container.
30 class ContainerSettings
34 // ----------------------------------------------------------------------------------
35 /*! @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
36 * @brief Defines the BCSettingsStruct type.
38 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
39 // ----------------------------------------------------------------------------------
40 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
41 * @brief Defines the BCStructVectorType type.
43 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
44 // ----------------------------------------------------------------------------------
45 //end of typedef definition
47 // ----------------------------------------------------------------------------------
48 /*! @fn ContainerSettings::ContainerSettings( )
49 * @brief This is the constructor.
52 // ----------------------------------------------------------------------------------
53 /*! @fn virtual ContainerSettings::~ContainerSettings( )
54 * @brief This is the destructor.
57 ~ContainerSettings( );
58 // ----------------------------------------------------------------------------------
59 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
60 * @brief This method returns a container of buttons ordered by group.
61 * @return ButtonGroupMap A container with buttons
64 GetButtonGroupContainer( );
65 // ----------------------------------------------------------------------------------
66 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
67 * @brief This method returns a container with the name of the groups.
68 * @return KeyMapList A list with the name of the button groups.
72 // ----------------------------------------------------------------------------------
73 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
74 * @brief This method allows to create the ButtonGroupContainer.
75 * @param bgContainer The ButtonGroupMap with all buttons.
78 SetButtonGroupContainer( ButtonGroupMap bgContainer );
79 // ----------------------------------------------------------------------------------
80 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
81 * @brief This method sets a container with the name of the groups.
82 * @param gNameList the KeyMapList with all groupNames.
85 SetGroupNameList( KeyMapList gNameList );
86 // ----------------------------------------------------------------------------------
88 * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
89 const std::string iconpath, const std::string buttonDescription,
90 FunctionEventType event )
91 * @brief This method adds a new button to the container.
92 * @param groupName The name of the group of buttons.
93 * @param buttonName The ID of the button.
94 * @param iconpath The path of the button icon.
95 * @param buttonDescription The description of the button.
96 * @param event The event associated to the button.
97 * @see class Functor, ConcreteFunctor for add an event for a button.
98 * @exception std::bad_alloc
101 AddButton( const StringType & groupName, const StringType &buttonName,
102 const StringType &iconpath, const StringType &buttonDescription,
103 FunctionEventType event );
104 // ----------------------------------------------------------------------------------
105 /*! @fn void AddButton( BCSettingsStruct* info );
106 * @brief This method adds a new button to the container using the
107 * BCSettingsStruct structure.
108 * @exception std::bad_alloc
112 AddButton( BCSettingsStruct* info );
113 // ----------------------------------------------------------------------------------
114 /*! @fn void AddButtons( BCStructVectorType infoList );
115 * @brief This method adds new buttons to the container.
116 * @exception std::bad_alloc
120 AddButtons( BCStructVectorType infoList );
121 // ----------------------------------------------------------------------------------
123 ButtonGroupMap m_ButtonGroupContainer; //! <The container with the group of buttons.
124 KeyMapList m_GroupNameList; //! <The container with the name of the groups of buttons.
129 #endif /* BUTTONGROUPSETTINGS_H_ */