]> Creatis software - creaMaracasVisu.git/commitdiff
Diego Caceres: creaButtonContainer & creaPanelButtonContainer
authorDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Mon, 9 May 2011 12:26:37 +0000 (12:26 +0000)
committerDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Mon, 9 May 2011 12:26:37 +0000 (12:26 +0000)
CMakeLists.txt modification.
New changes in the project - CreateButtonGroup function has been removed from the project.

CMakeLists.txt
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/containerSettings.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h

index 06f8a72..9ed5f29 100644 (file)
@@ -64,10 +64,10 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWi
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint )
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView )
 #DCH
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller/include )
-INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/include )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/controller )
+INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer )
 #DCH
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/CutModule/interface )
 INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/lib/maracasVisuLib/src/CutModule/kernel )
index 297ac43..060211b 100644 (file)
@@ -45,27 +45,24 @@ namespace creaButtonContainer
                {
                        this->m_GroupNameList = m_GroupNameList;
                }
-
-               void
-               ContainerSettings::CreateGroup( const std::string & groupName )
-               {
-                       this->m_GroupNameList.push_back( groupName );
-               }
                void
                ContainerSettings::AddButton( const std::string & groupName,
                    const std::string buttonName, const std::string iconpath,
                    const std::string buttonDescription, FunctionEventType event )
                {
+                       ButtonPair* pair = new ButtonPair(
+                           new ButtonInfo( buttonName, iconpath ),
+                           new ActionButton( buttonDescription, event ) );
                        for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                            != this->m_GroupNameList.end( ); ++it )
                                if ( ( *it ).compare( groupName ) == 0 )
                                {
-                                       ButtonPair* pair = new ButtonPair(
-                                           new ButtonInfo( buttonName, iconpath ),
-                                           new ActionButton( buttonDescription, event ) );
                                        this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                                        return;
-                               }
+                               }//fi
+                       //rof
+                       this->m_GroupNameList.push_back( groupName );
+                       this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                }
        }
 }
index 1707176..6d10f7a 100644 (file)
@@ -75,14 +75,6 @@ namespace creaButtonContainer
                                 * @return The wx button group container.
                                 */
                                void
-                               CreateGroup( const std::string & groupName );
-                               /*!
-                                * @brief This function allows to create the ButtonGroupContainer.
-                                * @param the wxWindow* parent to be attached.
-                                * @param The Container settings.
-                                * @return The wx button group container.
-                                */
-                               void
                                AddButton( const std::string & groupName, const std::string buttonName,
                                    const std::string iconpath, const std::string buttonDescription,
                                    FunctionEventType event );
index 9f60e03..55e595e 100644 (file)
@@ -78,29 +78,27 @@ namespace creaPanelButtonContainer
                this->m_GroupNameList = m_GroupNameList;
        }
 
-       void
-       ButtonContainerSettings::CreateGroup( const std::string & groupName )
-       {
-               this->m_GroupNameList.push_back( groupName );
-       }
        void
        ButtonContainerSettings::AddButton( const std::string & groupName,
            const std::string buttonName, const std::string iconpath,
            const std::string buttonDescription, PanelButton panel )
        {
+               //builds the button information
+               ButtonPair* pair = new ButtonPair( new ButtonInfo( buttonName, iconpath ),
+                   new ActionButton( buttonDescription, panel ) );
+               panel->Show( false );
                for( KeyMapList::iterator it = this->m_GroupNameList.begin( ); it
                    != this->m_GroupNameList.end( ); ++it )
                {
                        if ( ( *it ).compare( groupName ) == 0 )
                        {
-                               panel->Show( false );
-                               ButtonPair* pair = new ButtonPair(
-                                   new ButtonInfo( buttonName, iconpath ),
-                                   new ActionButton( buttonDescription, panel ) );
                                this->m_ButtonGroupContainer[ groupName ].push_back( pair );
                                return;
                        }//fi
                }//rof
+               //if the group doesn't exist it creates a new groupName
+               this->m_GroupNameList.push_back( groupName );
+               this->m_ButtonGroupContainer[ groupName ].push_back( pair );
        }
 }//ecapseman
 
index dd24670..31d6993 100644 (file)
@@ -49,11 +49,9 @@ namespace creaPanelButtonContainer
                        void
                        SetGroupNameList( KeyMapList m_GroupNameList );
                        void
-                       CreateGroup( const std::string & groupName );
-                       void
                        AddButton( const std::string & groupName, const std::string buttonName,
                            const std::string iconpath, const std::string buttonDescription,
-                           PanelButton event );
+                           PanelButton panel );
 
                private:
                        ButtonGroupMap m_ButtonGroupContainer;