7 #include "fwGui/dialog/MessageDialog.hpp" 9 #include <fwServices/registry/ActiveWorkers.hpp> 24 messageBox.
addButton(::fwGui::dialog::IMessageDialog::OK);
25 return messageBox.
show();
34 ::fwGui::GuiBaseObject::sptr guiObj = ::fwGui::factory::New(IMessageDialog::REGISTRY_KEY);
46 ::fwGui::GuiBaseObject::sptr guiObj = ::fwGui::factory::New(IMessageDialog::REGISTRY_KEY);
148 typedef ::fwGui::dialog::IMessageDialog::Buttons R;
158 return ::fwGui::dialog::IMessageDialog::NOBUTTON;
FWGUI_API MessageDialog()
Constructor. Create the implementation of the specific message box.
The namespace fwGui contains the base interface for IHM services.
virtual FWGUI_API void setMessage(const std::string &msg) override
Set the message.
Defines the generic message box for IHM. Use the Delegate design pattern.
static FWGUI_API IMessageDialog::Buttons showMessageDialog(const std::string &title, const std::string &message,::fwGui::dialog::IMessageDialog::Icons icon=INFO)
virtual FWGUI_API void addCustomButton(const std::string &label, std::function< void()> clickedFn) override
Add a custom button to this dialog.
virtual FWGUI_API void addButton(IMessageDialog::Buttons button) override
Add a button (OK, YES_NO, YES, NO, CANCEL)
virtual FWGUI_API IMessageDialog::Buttons show() override
Show the message box and return the clicked button.
virtual FWGUI_API ~MessageDialog()
Destructor. Do nothing.
virtual FWGUI_API void setIcon(IMessageDialog::Icons icon) override
Set the icon (CRITICAL, WARNING, INFO or QUESTION)
static FWSERVICES_API::fwThread::Worker::sptr getDefaultWorker()
Get the default registered worker.
virtual FWGUI_API void setDefaultButton(IMessageDialog::Buttons button) override
Set the default button.
virtual FWGUI_API Buttons show()=0
Show the message box and return the clicked button.
::fwGui::dialog::IMessageDialog::sptr m_implementation
Implementation of a message box in a specific IHM (wx/Qt)
virtual FWGUI_API void setTitle(const std::string &title) override
Set the title of the message box.