fw4spl
fwGui::dialog::SelectorDialog Class Reference

SelectorDialog allows the choice of an element among several (_selections) Use the Delegate design pattern. The specific implementation selection is ensured by fwGuiRegisterMacro. The specific implementation are in fwGuiWX and fwGuiQT libraries. More...

#include <SelectorDialog.hpp>

+ Inheritance diagram for fwGui::dialog::SelectorDialog:
+ Collaboration diagram for fwGui::dialog::SelectorDialog:

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWGUI_API SelectorDialog ()
 will instanciate the concrete implementation
 
FWGUI_API void create ()
 Called by the constructor in the GUI thread.
 
FWGUI_API SelectorDialog (const std::string &title, const std::string &message, std::vector< std::string > _selections)
 
FWGUI_API void setTitle (std::string title) override
 Sets the selector title.
 
virtual FWGUI_API void setSelections (std::vector< std::string > _selections) override
 Set the string list that can be chosen by the selector.
 
FWGUI_API std::string show () override
 Show the selector and return the selection.
 
virtual FWGUI_API void setMessage (const std::string &msg) override
 Set the message.
 
virtual FWGUI_API void addCustomButton (const std::string &label, std::function< void()> clickedFn) override
 Add a custom button to this dialog.
 
- Public Member Functions inherited from fwGui::dialog::ISelectorDialog
FWGUI_API ISelectorDialog ()
 Constructor builds a selector proposing a string list.
 
virtual FWGUI_API ~ISelectorDialog ()
 Destructor. Do nothing.
 
- Public Member Functions inherited from fwGui::GuiBaseObject
- Public Member Functions inherited from fwCore::BaseObject

Static Public Member Functions

static bool isTypeOf (const std::string &type)
 
static FWGUI_API std::string showSelectorDialog (const std::string &title, const std::string &message, std::vector< std::string > _selections)
 
- Static Public Member Functions inherited from fwGui::dialog::ISelectorDialog
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwGui::GuiBaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & classname ()
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
- Static Public Member Functions inherited from fwCore::BaseObject
static bool isTypeOf (const std::string &type)
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Protected Attributes

::fwGui::dialog::ISelectorDialog::sptr m_implementation
 

Friends

template<class , class , class >
class ::fwTools::ClassFactory
 
class ::fwTools::Factory
 

Demangling methods

virtual const std::string & getLeafClassname () const override
 return object's classname without its namespace, i.e. BaseObject
 
virtual const std::string & getClassname () const override
 return full object's classname with its namespace, i.e. fwCore::BaseObject
 
static const std::string & leafClassname ()
 return object's classname without its namespace, i.e. BaseObject
 
static const std::string & classname ()
 return object's classname without its namespace, i.e. BaseObject
 

Additional Inherited Members

- Public Types inherited from fwGui::dialog::ISelectorDialog
typedef std::string FactoryRegistryKeyType
 
- Public Types inherited from fwGui::GuiBaseObject
typedef ::fwGui::factory::Key Key
 
- Static Public Attributes inherited from fwGui::dialog::ISelectorDialog
static FWGUI_API const FactoryRegistryKeyType REGISTRY_KEY = "::fwGui::dialog::SelectorDialog"
 this unique key should be used for all factory for specific Selector(qt,wx,...)
 
- Protected Member Functions inherited from fwGui::GuiBaseObject
 GuiBaseObject ()
 
virtual ~GuiBaseObject ()
 

Detailed Description

SelectorDialog allows the choice of an element among several (_selections) Use the Delegate design pattern. The specific implementation selection is ensured by fwGuiRegisterMacro. The specific implementation are in fwGuiWX and fwGuiQT libraries.

Definition at line 21 of file include/fwGui/dialog/SelectorDialog.hpp.

Constructor & Destructor Documentation

fwGui::dialog::SelectorDialog::SelectorDialog ( const std::string &  title,
const std::string &  message,
std::vector< std::string >  _selections 
)

Constructor. Create a selector with the specified title, message and choices.

Parameters
titleTitle of the selector
messageMessage of the selector
_selectionslist of choices in the selector

Definition at line 27 of file src/fwGui/dialog/SelectorDialog.cpp.

References create(), and fwServices::registry::ActiveWorkers::getDefaultWorker().

+ Here is the call graph for this function:

Member Function Documentation

std::string fwGui::dialog::SelectorDialog::showSelectorDialog ( const std::string &  title,
const std::string &  message,
std::vector< std::string >  _selections 
)
static

Opens a default selector with the specified title, message and choices.

Parameters
titleTitle of the selector
messageMessage of the selector
_selectionslist of choices in the selector
Returns
Returns selected choice

Definition at line 18 of file src/fwGui/dialog/SelectorDialog.cpp.

References show().

+ Here is the call graph for this function:


The documentation for this class was generated from the following files: