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_
15 #include "structBCSettings.h"
19 /*! @namespace <creaButtonContainer>
20 * @brief Contains the creaButtonContainer library included in creaMaracasVisu.
22 namespace creaButtonContainer
24 /*! @namespace <creaButtonContainer::model>
25 * @brief Contains the implementation of the model in creaButtonContainer library.
26 * @see <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC Software Architecture</a>
30 /*! @class ContainerSettings containerSettings.h "containerSettings.h"
31 * @brief This class contains the settings of the button container.
33 class ContainerSettings
37 // ----------------------------------------------------------------------------------
38 /*! @typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
39 * @brief Defines the BCSettingsStruct type.
41 typedef creaButtonContainer::model::BCSettingsStruct BCSettingsStruct;
42 // ----------------------------------------------------------------------------------
43 /*! @typedef std::vector< BCPSettingsStruct* > BCStructVectorType;
44 * @brief Defines the BCStructVectorType type.
46 typedef std::vector< BCSettingsStruct* > BCStructVectorType;
47 // ----------------------------------------------------------------------------------
48 //end of typedef definition
50 // ----------------------------------------------------------------------------------
51 /*! @fn ContainerSettings::ContainerSettings( )
52 * @brief This is the constructor.
55 // ----------------------------------------------------------------------------------
56 /*! @fn virtual ContainerSettings::~ContainerSettings( )
57 * @brief This is the destructor.
60 ~ContainerSettings( );
61 // ----------------------------------------------------------------------------------
62 /*! @fn ButtonGroupMap ContainerSettings::GetButtonGroupContainer( )
63 * @brief This method returns a container of buttons ordered by group.
64 * @return ButtonGroupMap A container with buttons
67 GetButtonGroupContainer( );
68 // ----------------------------------------------------------------------------------
69 /*! @fn KeyMapList ContainerSettings::GetGroupNameList( )
70 * @brief This method returns a container with the name of the groups.
71 * @return KeyMapList A list with the name of the button groups.
75 // ----------------------------------------------------------------------------------
76 /*! void ContainerSettings::SetButtonGroupContainer( ButtonGroupMap m_ButtonGroupContainer )
77 * @brief This method allows to create the ButtonGroupContainer.
78 * @param bgContainer The ButtonGroupMap with all buttons.
81 SetButtonGroupContainer( ButtonGroupMap bgContainer );
82 // ----------------------------------------------------------------------------------
83 /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
84 * @brief This method sets a container with the name of the groups.
85 * @param gNameList the KeyMapList with all groupNames.
88 SetGroupNameList( KeyMapList gNameList );
89 // ----------------------------------------------------------------------------------
91 * @fn ContainerSettings::AddButton( const std::string & groupName, const std::string buttonName,
92 const std::string iconpath, const std::string buttonDescription,
93 FunctionEventType event )
94 * @brief This method adds a new button to the container.
95 * @param groupName The name of the group of buttons.
96 * @param buttonName The ID of the button.
97 * @param iconpath The path of the button icon.
98 * @param buttonDescription The description of the button.
99 * @param event The event associated to the button.
100 * @see class Functor, ConcreteFunctor for add an event for a button.
101 * @exception std::bad_alloc
104 AddButton( const std::string & groupName, const std::string buttonName,
105 const std::string iconpath, const std::string buttonDescription,
106 FunctionEventType event );
107 // ----------------------------------------------------------------------------------
108 /*! @fn void AddButton( BCSettingsStruct* info );
109 * @brief This method adds a new button to the container.
110 * @exception std::bad_alloc
114 AddButton( BCSettingsStruct* info );
115 // ----------------------------------------------------------------------------------
116 /*! @fn void AddButtons( BCStructVectorType infoList );
117 * @brief This method adds new buttons to the container.
118 * @exception std::bad_alloc
122 AddButtons( BCStructVectorType infoList );
123 // ----------------------------------------------------------------------------------
125 ButtonGroupMap m_ButtonGroupContainer; //! <std::map< std::string, ButtonList > View pointer.
126 KeyMapList m_GroupNameList; //! <ButtonContainerPanel View pointer.
131 #endif /* BUTTONGROUPSETTINGS_H_ */