]> Creatis software - creaMaracasVisu.git/commitdiff
#2507 creaMaracasVisu Feature New Normal - creaPanelButtonContainer ListPanel
authordavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 26 Jan 2015 13:33:21 +0000 (14:33 +0100)
committerdavila <eduardo.davila@creatis.insa-lyon.fr>
Mon, 26 Jan 2015 13:33:21 +0000 (14:33 +0100)
bbtk/src/bbcreaMaracasVisuPanelButtonContainer.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/ColorLayerImageView.cxx
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/creaButtonContainer/model/listGroupFactory.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/model/system.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/buttonContainerPanel.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listGroup.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaButtonContainer/view/listWx.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/creaPanelButtonContainer/buttonContainerSettings.h

index 85f630b0b402d553d57d05829aef89790a328451..882d3d0d675cb402b6ec07afe81de64fedac567f 100644 (file)
@@ -46,7 +46,6 @@ PanelButtonContainer::Process( )
 
          settings->AddButtons(bbGetInputIn( ), bbGetInputType());
 
-
        
        PBContainer* panel = new PBContainer( myPanel, settings, bbGetInputType() );
        wxBoxSizer* sizer  = new wxBoxSizer( wxHORIZONTAL );
@@ -75,7 +74,7 @@ void PanelButtonContainer::CreateWidget( wxWindow* parent )
 void
 PanelButtonContainer::bbUserSetDefaultValues( )
 {
-
+   bbSetInputType("0");
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
index cbba163e24222ba889e5b5523b03627f940770a2..515784ac9bafcd641b0e7ec0a7272af50b657dda 100644 (file)
@@ -345,7 +345,7 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
       delta = GetGreyLevelBoundaries(1) - GetGreyLevelBoundaries(0);
       for (int ii = 1; ii <= delta ; ii++)
        {
-         thresholdTable->SetTableValue( GetGreyLevelBoundaries(0) + ii, GetBaseColors(0) * ii/delta,
+         thresholdTable->SetTableValue( (GetGreyLevelBoundaries(0) + ii), GetBaseColors(0) * ii/delta,
                                         GetBaseColors(1) * ii/delta, GetBaseColors(2) * ii/delta, 1);
        }
            
@@ -359,7 +359,7 @@ void ColorLayerImageView::ConfigLookupTable()  // virtual
              for (int ii = 1; ii <= delta; ii++)
                {
                  // Color computation : previous_color + (current_color - previous_color)/delta * ii
-                 thresholdTable->SetTableValue(GetGreyLevelBoundaries(i) + ii,
+                 thresholdTable->SetTableValue((GetGreyLevelBoundaries(i) + ii),
                                                GetBaseColors((i-1)*3) + (GetBaseColors(i*3) - GetBaseColors((i-1)*3)) / delta * ii , 
                                                GetBaseColors((i-1)*3 + 1) + (GetBaseColors(i*3 + 1) - GetBaseColors((i-1)*3 + 1)) / delta * ii ,
                                                GetBaseColors((i-1)*3 + 2) + (GetBaseColors(i*3 + 2) - GetBaseColors((i-1)*3 + 2)) / delta * ii ,
index 7b640cd6d32cf8fd3e36535574a2d80fdaf0451e..45d2932a4cc9f2c5ee8a15f9aa69504c07cc7fcd 100644 (file)
@@ -79,6 +79,7 @@ namespace creaButtonContainer
                // ----------------------------------------------------------------------------------
 
 
+
                void
                ContainerSettings::AddButton( const StringType & groupName,
                    const StringType &buttonName, const wxBitmap &icon,
@@ -164,7 +165,6 @@ namespace creaButtonContainer
                        }//hctac
                }
 
-
        // ----------------------------------------------------------------------------------
        }//ecapseman
 }//ecapseman
index 7aa3dc5663a3e89c03b7458936152f61072a7d58..23029770c283b5f5a3b1a7c2be2c256df5a914e2 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <vector>
 #include <wx/bitmap.h>
-#include <wx/listctrl.h>
+//EED-MLER  #include <wx/listctrl.h>
 
 #include "structBCSettings.h"
 #include "system.h"
@@ -107,6 +107,8 @@ namespace creaButtonContainer
                                 */
                                void
                                SetButtonGroupContainer( ButtonGroupMap bgContainer );
+
+
                                // ----------------------------------------------------------------------------------
                                /*! void ContainerSettings::SetGroupNameList( KeyMapList gNameList )
                                 * @brief This method sets a container with the name of the groups.
@@ -153,13 +155,6 @@ namespace creaButtonContainer
                                AddButtons( BCStructVectorType infoList );
 
                                // ----------------------------------------------------------------------------------
-                       /*      void
-                               AddItem(const StringType & groupName);
-
-                               void
-                               AddItem( BCSettingsStruct* info );
-
-                               void
                                AddItems( BCStructVectorType infoList );*/
 
                                // ----------------------------------------------------------------------------------
index 747372613949f1e913f1ee7ca049c7657fe9f39a..987a5653342625a0f7c5b19c7b605bcb42367643 100644 (file)
@@ -43,7 +43,9 @@
 
 namespace creaButtonContainer
 {
+
        //using namespace view;
+
        // ----------------------------------------------------------------------------------
        /*!     @typedef std::string* StringType;
         *      @brief Defines the StringType type.
index 7696062979c0a7256f4f28a212110c35be76580c..5e145418c67106d564e33a79487b905346fbffe0 100644 (file)
@@ -46,8 +46,8 @@
 #include "buttonGroupFactory.h"
 #include "containerSettings.h"
 #include "buttonContainerController.h"
-#include "listGroup.h"
-#include "listGroupFactory.h"
+//EED-MLER #include "listGroup.h"
+//EED-MLER #include "listGroupFactory.h"
 
 /*!    @namespace <creaButtonContainer>
  *     @brief Contains the creaButtonContainer library included in creaMaracasVisu.
@@ -133,6 +133,7 @@ namespace creaButtonContainer
                                typedef creaButtonContainer::controller::ButtonContainerController
                                    BCController;
 
+
                                //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
 
                                //typedef creaButtonContainer::view::ListGroup ListGroup;
@@ -141,6 +142,7 @@ namespace creaButtonContainer
 
                                //typedef creaButtonContainer::model::ListGroupFactory ListGroupFactory;
 
+
                                // ----------------------------------------------------------------------------------
                                //end of typedef definition
                        public:
@@ -184,12 +186,14 @@ namespace creaButtonContainer
                        public:
                                friend class creaButtonContainer::controller::ButtonContainerController;
                        private:
-                               GroupManagerList m_GroupManagerList; //!<The container of managers.
-                               ButtonGroupList m_ButtonGroupList; //!<The list of button groups.
-                               BCController* m_ButtonCController; //!<Pontier to controller.
-                               Sizer* m_Sizer; //!<Pointer to wxSizer
+                               GroupManagerList        m_GroupManagerList; //!<The container of managers.
+                               ButtonGroupList         m_ButtonGroupList; //!<The list of button groups.
+                               BCController*           m_ButtonCController; //!<Pontier to controller.
+                               Sizer*                          m_Sizer; //!<Pointer to wxSizer
+
 
                                //ListGroupList m_ListGroupList;
+
                        DECLARE_EVENT_TABLE() //!<Event Table declaration.
                };
        }//ecapseman
index 9ba6cee0e3386a3065da0ba4a54eddd486135fe4..04686b098403493fce4faf03d6edf47b7f954744 100644 (file)
@@ -94,3 +94,5 @@ namespace creaButtonContainer
        // ----------------------------------------------------------------------------------
        }//ecapseman
 }//ecapseman*/
+
+
index 9fd986bbfa1604cec070aca5faa724175adb3ab7..5de552c2ff816d48b423f769209fda1f4c9b92f2 100644 (file)
@@ -24,6 +24,7 @@
 # ------------------------------------------------------------------------ */
 
 
+
 #include "listWx.h"
 
 namespace creaButtonContainer
@@ -82,3 +83,5 @@ namespace creaButtonContainer
        // ----------------------------------------------------------------------------------
        }//ecapseman
 }//ecapseman
+
+
index cc82378b606649f6426f3264b20b7f52e1651da6..e93c87a03fcc78994b6dda0b3a478429507dd985 100644 (file)
@@ -281,6 +281,9 @@ namespace creaPanelButtonContainer
                }//hctac
        }
 
+
+//EED-MLER
+/*
        void
        ButtonContainerSettings::AddItems(BCPSettingsStruct* info)
        {
@@ -304,6 +307,24 @@ namespace creaPanelButtonContainer
                }//yrt
                catch ( const std::exception& e )
                {
+<<<<<<< HEAD
+                       try
+                       {
+                               for( BCStructVectorType::iterator it = infoList.begin( ); it
+                                   != infoList.end( ); ++it )
+                               {
+                                       this->AddItem(*it);
+                               }//rof
+                       }//yrt
+                       catch ( const std::exception& e )
+                       {
+                               std::cerr
+                           << "ContainerSettings::AddButtons( BCStructVectorType infoList ) "
+                           << "exception: " << e.what( ) << std::endl;
+                       }//hctac
+               }
+*/
+=======
                        std::cerr
                        << "ButtonContainerSettings::AddButton( BCPSettingsStruct* info )"
                        << "exception: " << e.what( ) << std::endl;
@@ -318,6 +339,7 @@ namespace creaPanelButtonContainer
                return m_itemsMap;
        }
 
+>>>>>>> b8c5a565c70ac0def1f21518afa2d847a9582d79
 
 // ----------------------------------------------------------------------------------
 }//ecapseman
index bb00f7dff81a165f03ff055861531a7f3b23adad..9f3e5245db7d7f17cdb1cfc1e433f710951ecfb9 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <wx/panel.h>
 #include <wx/bitmap.h>
-#include <wx/listctrl.h>
+//EED-MLER #include <wx/listctrl.h>
 
 #include <list>
 #include <map>
@@ -126,7 +126,9 @@ namespace creaPanelButtonContainer
                         *      @brief This class contains the settings of the button container.
                         */
 
+
                        typedef std::map< std::string, wxPanel* > ItemsMap;
+
                public:
                        // ----------------------------------------------------------------------------------
                        /*! @fn ButtonContainerSettings( );
@@ -232,23 +234,15 @@ namespace creaPanelButtonContainer
                        void
                        AddButtons( BCStructVectorType infoList, int type );
 
-                       void
-                       AddItems(BCPSettingsStruct* info);
-
-                       ItemsMap
-                       GetItemsMap();
-
-                       PanelButton
-                       GetPanelList( const StringType &buttonName );
-
-
                        // ----------------------------------------------------------------------------------
                private:
                        ButtonGroupMap m_ButtonGroupContainer; //!<This is the map with the groups of buttons.
                        KeyMapList m_GroupNameList; //!<This is a container with the name of the groups.
 
+
                        //MLER
                        ItemsMap m_itemsMap; //This is the map with the name and the wPanel
                };
+
 }//ecapseman
 #endif /* BUTTONCONTAINERSETTINGS_H_ */