fw4spl
fwGui::dialog::InputDialog Class Reference

Defines the generic input dialog for IHM. Use the Delegate design pattern. More...

#include <InputDialog.hpp>

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

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWGUI_API InputDialog ()
 Constructor. Create the implementation of the specific input dialog box. More...
 
FWGUI_API InputDialog (const std::string &title, const std::string &message, const std::string &text="")
 
virtual FWGUI_API ~InputDialog ()
 Destructor. Do nothing.
 
virtual FWGUI_API void setTitle (const std::string &title) override
 Set the title of the input dialog.
 
virtual FWGUI_API void setMessage (const std::string &msg) override
 Set the message.
 
virtual FWGUI_API void setInput (const std::string &text) override
 Set the input text in the input field.
 
virtual FWGUI_API std::string getInput () override
 Get the input text in the input field.
 
- Public Member Functions inherited from fwGui::dialog::IInputDialog
FWGUI_API IInputDialog ()
 Constructor. Do nothing.
 
virtual FWGUI_API ~IInputDialog ()
 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 showInputDialog (const std::string &title, const std::string &message, const std::string &text="")
 
- Static Public Member Functions inherited from fwGui::dialog::IInputDialog
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::IInputDialog::sptr m_implementation
 Implementation of an input dialog in a specific IHM (wx/Qt)
 

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::IInputDialog
typedef std::string FactoryRegistryKeyType
 
- Public Types inherited from fwGui::GuiBaseObject
typedef ::fwGui::factory::Key Key
 
- Static Public Attributes inherited from fwGui::dialog::IInputDialog
static FWGUI_API const FactoryRegistryKeyType REGISTRY_KEY = "::fwGui::dialog::InputDialog"
 
- Protected Member Functions inherited from fwGui::GuiBaseObject
 GuiBaseObject ()
 
virtual ~GuiBaseObject ()
 

Detailed Description

Defines the generic input dialog for IHM. Use the Delegate design pattern.

Example of use:

1 ::fwGui::dialog::InputDialog inputDlg;
2 inputDlg.setTitle("Identification dialog");
3 inputDlg.setMessage("Enter Pin Code: ");
4 inputDlg.setInput ("<Enter your code here>");
5 std::string inputText = inputDlg.getInput();

Definition at line 31 of file include/fwGui/dialog/InputDialog.hpp.

Constructor & Destructor Documentation

fwGui::dialog::InputDialog::InputDialog ( )

Constructor. Create the implementation of the specific input dialog box.

Example of use:

1 ::fwGui::dialog::InputDialog inputDlg;
2 inputDlg.setTitle("Identification dialog");
3 inputDlg.setMessage("Enter Pin Code: ");
4 inputDlg.setInput ("<Enter your code here>");
5 std::string inputText = inputDlg.getInput();

Definition at line 25 of file src/fwGui/dialog/InputDialog.cpp.

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

+ Here is the call graph for this function:

fwGui::dialog::InputDialog::InputDialog ( const std::string &  title,
const std::string &  message,
const std::string &  text = "" 
)

Constructor. Creates a input box with the specified title and message.

Parameters
titleTitle of the input box
messageMessage of the input box
textthe input text in the input field

Definition at line 36 of file src/fwGui/dialog/InputDialog.cpp.

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

+ Here is the call graph for this function:

Member Function Documentation

std::string fwGui::dialog::InputDialog::showInputDialog ( const std::string &  title,
const std::string &  message,
const std::string &  text = "" 
)
static

Opens a default input box with the specified title and message.

Parameters
titleTitle of the input box
messageMessage of the input box
textthe input text in the input field
Returns
Returns text in the input field

Definition at line 17 of file src/fwGui/dialog/InputDialog.cpp.

References getInput().

Referenced by uiMedDataQt::action::SExportSeries::updating(), and uiMedDataQt::editor::SActivityWizard::updating().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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