7 #include <QApplication> 9 #include <fwGui/dialog/IMessageDialog.hpp> 10 #include <fwGui/dialog/MessageDialog.hpp> 11 #include <fwGui/registry/macros.hpp> 13 #include "fwGuiQt/Application.hpp" 30 dlg.
setIcon(::fwGui::dialog::IMessageDialog::QUESTION);
31 dlg.
addButton(::fwGui::dialog::IMessageDialog::YES_NO);
35 if(res == ::fwGui::dialog::IMessageDialog::YES)
37 qApp->exit(returncode);
42 qApp->exit(returncode);
Gives access to the qt application part.
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.
The namespace fwGuiQt contains classes which provide the implementation of the Gui using Qt library...
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 void setIcon(IMessageDialog::Icons icon) override
Set the icon (CRITICAL, WARNING, INFO or QUESTION)
bool m_confirm
Asks confirmation before exiting application.
virtual FWGUI_API void setTitle(const std::string &title) override
Set the title of the message box.
virtual FWGUIQT_API void exit(int returncode=0)
Tells the application to exit with a returncode.