fw4spl
include/fwGui/dialog/MessageDialog.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwGui/config.hpp"
10 #include "fwGui/dialog/IMessageDialog.hpp"
11 
12 #include <fwCore/base.hpp>
13 
14 namespace fwGui
15 {
16 namespace dialog
17 {
22 class FWGUI_CLASS_API MessageDialog : public ::fwGui::dialog::IMessageDialog
23 {
24 
25 public:
26 
28 
29 
37  FWGUI_API static IMessageDialog::Buttons showMessageDialog(
38  const std::string& title, const std::string& message, ::fwGui::dialog::IMessageDialog::Icons icon = INFO);
39 
41  FWGUI_API MessageDialog();
42 
51  FWGUI_API MessageDialog(
52  const std::string& title, const std::string& message, ::fwGui::dialog::IMessageDialog::Icons icon = INFO);
53 
55  FWGUI_API virtual ~MessageDialog();
56 
58  FWGUI_API virtual void setTitle(const std::string& title) override;
59 
61  FWGUI_API virtual void setMessage(const std::string& msg) override;
62 
64  FWGUI_API virtual void setIcon( IMessageDialog::Icons icon) override;
65 
67  FWGUI_API virtual void addButton(IMessageDialog::Buttons button ) override;
68 
70  FWGUI_API virtual void setDefaultButton(IMessageDialog::Buttons button ) override;
71 
73  FWGUI_API virtual void addCustomButton(const std::string& label, std::function<void()> clickedFn) override;
74 
76  FWGUI_API virtual IMessageDialog::Buttons show() override;
77 
78 protected:
79 
81  ::fwGui::dialog::IMessageDialog::sptr m_implementation;
82 };
83 
84 } //namespace dialog
85 } // namespace fwGui
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
Defines the generic message box for IHM. Use the Delegate design pattern.
STL namespace.
Defines the generic message box for IHM.
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.