fw4spl
include/fwGui/dialog/SelectorDialog.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/ISelectorDialog.hpp"
11 
12 namespace fwGui
13 {
14 namespace dialog
15 {
21 class FWGUI_CLASS_API SelectorDialog : public ISelectorDialog
22 {
23 
24 public:
25 
28 
29 
37  FWGUI_API static std::string showSelectorDialog(const std::string& title, const std::string& message,
38  std::vector< std::string > _selections);
39 
41  FWGUI_API SelectorDialog();
42 
44  FWGUI_API void create();
45 
53  FWGUI_API SelectorDialog(const std::string& title, const std::string& message,
54  std::vector< std::string > _selections);
55 
57  FWGUI_API void setTitle(std::string title) override;
58 
60  FWGUI_API virtual void setSelections(std::vector< std::string > _selections) override;
61 
63  FWGUI_API std::string show() override;
64 
66  FWGUI_API virtual void setMessage(const std::string& msg) override;
67 
69  FWGUI_API virtual void addCustomButton(const std::string& label, std::function<void()> clickedFn) override;
70 
71 protected:
72 
73  ::fwGui::dialog::ISelectorDialog::sptr m_implementation;
74 
75 };
76 
77 } //namespace dialog
78 } // namespace fwGui
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
STL namespace.
SelectorDialog allows the choice of an element among several (_selections) Use the Delegate design pa...
ISelectorDialog allows the choice of an element among several (_selections)
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.