7 #include "fwGui/dialog/SelectorDialog.hpp" 9 #include <fwServices/registry/ActiveWorkers.hpp> 19 std::vector< std::string > _selections)
22 return selector.
show();
28 std::vector< std::string > _selections)
33 m_implementation->setTitle(title);
34 m_implementation->setMessage( message );
35 m_implementation->setSelections( _selections );
53 m_implementation = ::fwGui::dialog::ISelectorDialog::dynamicCast(guiObj);
63 m_implementation->setTitle(title);
72 std::shared_future< std::string > future =
84 m_implementation->setSelections( _selections );
94 m_implementation->setMessage( msg );
105 m_implementation->addCustomButton( label, clickedFn );
virtual FWGUI_API void setSelections(std::vector< std::string > _selections) override
Set the string list that can be chosen by the selector.
virtual FWGUI_API void setMessage(const std::string &msg) override
Set the message.
virtual FWGUI_API std::string show()=0
Show the selector and return the selection.
The namespace fwGui contains the base interface for IHM services.
static FWGUI_API const FactoryRegistryKeyType REGISTRY_KEY
this unique key should be used for all factory for specific Selector(qt,wx,...)
FWGUI_API void setTitle(std::string title) override
Sets the selector title.
SelectorDialog allows the choice of an element among several (_selections) Use the Delegate design pa...
FWGUI_API SelectorDialog()
will instanciate the concrete implementation
FWGUI_API std::string show() override
Show the selector and return the selection.
virtual FWGUI_API void addCustomButton(const std::string &label, std::function< void()> clickedFn) override
Add a custom button to this dialog.
FWGUI_API void create()
Called by the constructor in the GUI thread.
static FWGUI_API std::string showSelectorDialog(const std::string &title, const std::string &message, std::vector< std::string > _selections)
static FWSERVICES_API::fwThread::Worker::sptr getDefaultWorker()
Get the default registered worker.