15 #include "fwGui/layoutManager/TabLayoutManagerBase.hpp" 17 #include <fwCore/base.hpp> 19 #include <boost/lexical_cast.hpp> 20 #include <boost/assign/list_of.hpp> 25 namespace layoutManager
29 const TabLayoutManagerBase::RegistryKeyType TabLayoutManagerBase::REGISTRY_KEY =
"::fwGui::TabLayoutManager";
47 OSLM_ASSERT(
"Bad configuration name "<<configuration->getName()<<
", must be layout",
48 configuration->getName() ==
"layout");
50 std::vector < ConfigurationType > vectViews = configuration->find(
"view");
53 for (ConfigurationType view : vectViews)
56 if( view->hasAttribute(
"caption") )
58 vi.m_caption = view->getExistingAttributeValue(
"caption");
60 if( view->hasAttribute(
"selected") )
62 std::string isSelected = view->getExistingAttributeValue(
"selected");
63 OSLM_ASSERT(
"The value "<<isSelected<<
" it's incorrect, it should either be yes or no.",
64 isSelected ==
"yes" || isSelected ==
"no");
65 vi.m_isSelect = (isSelected ==
"yes");
68 if( view->hasAttribute(
"useScrollBar") )
70 std::string useScrollBar = view->getExistingAttributeValue(
"useScrollBar");
71 OSLM_ASSERT(
"Incorrect value for \"useScrollBar\" attribute "<<useScrollBar,
72 (useScrollBar ==
"yes") || (useScrollBar ==
"no"));
73 vi.m_useScrollBar = (useScrollBar==
"yes");
76 m_views.push_back(vi);
#define SLM_TRACE_IF(message, cond)
#define OSLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
The namespace fwGui contains the base interface for IHM services.
virtual FWGUI_API void initialize(ConfigurationType configuration) override
Initialize tab layout manager before the creation of layout.
virtual FWGUI_API ~TabLayoutManagerBase()
Destructor. Do nothing.
FWGUI_API TabLayoutManagerBase()
Constructor. Do nothing.