fw4spl
fwGui::dialog::MessageDialog Class Reference

Defines the generic message box for IHM. Use the Delegate design pattern. More...

#include <MessageDialog.hpp>

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

Public Member Functions

virtual bool isA (const std::string &type) const override
 
FWGUI_API MessageDialog ()
 Constructor. Create the implementation of the specific message box.
 
FWGUI_API MessageDialog (const std::string &title, const std::string &message,::fwGui::dialog::IMessageDialog::Icons icon=INFO)
 
virtual FWGUI_API ~MessageDialog ()
 Destructor. Do nothing.
 
virtual FWGUI_API void setTitle (const std::string &title) override
 Set the title of the message box.
 
virtual FWGUI_API void setMessage (const std::string &msg) override
 Set the message.
 
virtual FWGUI_API void setIcon (IMessageDialog::Icons icon) override
 Set the icon (CRITICAL, WARNING, INFO or QUESTION)
 
virtual FWGUI_API void addButton (IMessageDialog::Buttons button) override
 Add a button (OK, YES_NO, YES, NO, CANCEL)
 
virtual FWGUI_API void setDefaultButton (IMessageDialog::Buttons button) override
 Set the default button.
 
virtual FWGUI_API void addCustomButton (const std::string &label, std::function< void()> clickedFn) override
 Add a custom button to this dialog.
 
virtual FWGUI_API IMessageDialog::Buttons show () override
 Show the message box and return the clicked button.
 
- Public Member Functions inherited from fwGui::dialog::IMessageDialog
FWGUI_API IMessageDialog ()
 Constructor. Do nothing.
 
virtual FWGUI_API ~IMessageDialog ()
 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 IMessageDialog::Buttons showMessageDialog (const std::string &title, const std::string &message,::fwGui::dialog::IMessageDialog::Icons icon=INFO)
 
- Static Public Member Functions inherited from fwGui::dialog::IMessageDialog
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::IMessageDialog::sptr m_implementation
 Implementation of a message box 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::IMessageDialog
enum  Icons {
  CRITICAL, WARNING, INFO, QUESTION,
  NONE
}
 Icon type.
 
enum  Buttons {
  NOBUTTON = 0, OK = 1 << 1, YES = 1 << 2, NO = 1 << 3,
  CANCEL = 1 << 4, YES_NO = YES | NO
}
 Buttons type.
 
typedef std::string FactoryRegistryKeyType
 
- Public Types inherited from fwGui::GuiBaseObject
typedef ::fwGui::factory::Key Key
 
- Static Public Attributes inherited from fwGui::dialog::IMessageDialog
static FWGUI_API const FactoryRegistryKeyType REGISTRY_KEY = "::fwGui::dialog::MessageDialog"
 
- Protected Member Functions inherited from fwGui::GuiBaseObject
 GuiBaseObject ()
 
virtual ~GuiBaseObject ()
 

Detailed Description

Defines the generic message box for IHM. Use the Delegate design pattern.

Definition at line 22 of file include/fwGui/dialog/MessageDialog.hpp.

Constructor & Destructor Documentation

fwGui::dialog::MessageDialog::MessageDialog ( const std::string &  title,
const std::string &  message,
::fwGui::dialog::IMessageDialog::Icons  icon = INFO 
)

Constructor Creates a message box with the specified title text and icon.

Parameters
titleTitle of the message box
messageMessage of the message box
iconIcon of the message box (CRITICAL, WARNING, INFO or QUESTION)

Definition at line 41 of file src/fwGui/dialog/MessageDialog.cpp.

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

+ Here is the call graph for this function:

Member Function Documentation

IMessageDialog::Buttons fwGui::dialog::MessageDialog::showMessageDialog ( const std::string &  title,
const std::string &  message,
::fwGui::dialog::IMessageDialog::Icons  icon = INFO 
)
static

Opens a default message box with the specified title, text and icon.

Parameters
titleTitle of the message box
messageMessage of the message box
iconIcon of the message box (CRITICAL, WARNING, INFO or QUESTION)
Returns
Returns the button enum value corresponding to the pressed button

Definition at line 20 of file src/fwGui/dialog/MessageDialog.cpp.

References addButton(), and show().

Referenced by monitorQt::DumpEditor::changeStatus(), visuVTKAdaptor::SImagesBlend::checkImageInformations(), guiQt::editor::SDynamicView::closeTabSignal(), basicRegistration::SPointListRegistration::computeRegistration(), ioITK::SInrSeriesDBReader::configureWithIHM(), fwGui::view::IActivityView::createMainActivity(), ioVtkGdcm::SSeriesDBLazyReader::getSelectorDialogTitle(), ioVtkGdcm::SSeriesDBReader::getSelectorDialogTitle(), ioGdcm::SDicomSeriesDBReader::getSelectorDialogTitle(), ioDcmtk::SSeriesDBReader::getSelectorDialogTitle(), ioGdcm::SSeriesDBReader::getSelectorDialogTitle(), ioITK::InrImageWriterService::info(), ioITK::InrImageReaderService::info(), ioITK::JpgImageWriterService::info(), ioVTK::SMeshReader::info(), ioVTK::SSeriesDBReader::info(), guiQt::editor::DynamicView::info(), guiQt::editor::DynamicView::launchTab(), ioVTK::SImageReader::loadImage(), uiMedDataQt::editor::SSelector::onDoubleClick(), ioVTK::SImageWriter::saveImage(), ioDicom::SFilterSelectionEditor::starting(), uiMeasurement::action::SaveLandmark::stopping(), uiTF::TransferFunctionEditor::swapping(), guiQt::editor::SDynamicView::swapping(), monitor::action::MemoryInfo::updating(), monitor::action::SDumpAll::updating(), uiMeasurement::action::AddLandmark::updating(), uiMeasurement::action::SaveLandmark::updating(), uiMeasurement::action::LoadLandmark::updating(), basicRegistration::SImagesSubstract::updating(), uiMeasurement::action::SFocusLandmark::updating(), Tuto14MeshGenerator::SMeshModifier::updating(), ioGdcm::SSeriesDBWriter::updating(), ioGdcm::SDicomSeriesConverter::updating(), ioGdcm::SSurfaceSegmentationWriter::updating(), ioGdcm::SDicomSeriesWriter::updating(), ioVtkGdcm::SSeriesDBLazyReader::updating(), ioVtkGdcm::SImageSeriesWriter::updating(), ioVtkGdcm::SSeriesDBReader::updating(), guiQt::editor::SActivityView::updating(), ioDcmtk::SSeriesDBReader::updating(), activities::action::SCreateActivity::updating(), ioData::STrianMeshReader::updating(), ioVTK::SModelSeriesReader::updating(), ioVTK::SMeshWriter::updating(), ioVTK::SModelSeriesWriter::updating(), activities::SActivitySequencer::updating(), ioData::MeshWriterService::updating(), ioAtoms::SWriter::updating(), uiIO::editor::SIOSelector::updating(), gui::action::SStarter::updating(), ioAtoms::SReader::updating(), activities::action::SActivityLauncher::updating(), and fwGui::view::IActivityView::validateActivity().

+ Here is the call graph for this function:


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