fw4spl
SJobBar.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 "gui/config.hpp"
10 
11 #include <fwCom/Signal.hpp>
12 #include <fwCom/Slots.hpp>
13 
14 #include <fwGui/editor/IDialogEditor.hpp>
15 #include <fwGui/IActionSrv.hpp>
16 
17 #include <fwJobs/IJob.hpp>
18 
19 #include <fwServices/IService.hpp>
20 
21 #include <set>
22 
23 namespace fwGui
24 {
25 namespace dialog
26 {
27 class ProgressDialog;
28 }
29 }
30 
31 namespace gui
32 {
33 namespace editor
34 {
35 
40 class GUI_CLASS_API SJobBar : public ::fwGui::editor::IDialogEditor
41 {
42 
43 public:
44 
46 
47  typedef ::fwRuntime::ConfigurationElement::sptr ConfigurationType;
48 
50  typedef ::fwCom::Slot< void ( ::fwJobs::IJob::sptr ) > ShowJobSlot;
51 
55  GUI_API SJobBar() noexcept;
56 
60  GUI_API virtual ~SJobBar() noexcept;
61 
62 protected:
63 
67  GUI_API virtual void info(std::ostream& _sstream ) override;
68 
72  GUI_API void updating() override;
73 
77  GUI_API void configuring() override;
78 
79  GUI_API virtual void starting() override;
80 
81  GUI_API virtual void stopping() override;
82 
86  GUI_API virtual void showJob( ::fwJobs::IJob::sptr iJob );
87 
88  typedef std::set< SPTR(::fwGui::dialog::ProgressDialog) > ProgressDialogs;
89  ProgressDialogs m_progressDialogs;
90 
91  typedef ::fwCom::Signal<void () > StartedSignalType;
92  typedef ::fwCom::Signal<void () > EndedSignalType;
93 
94  SPTR(StartedSignalType) m_sigStarted;
95  SPTR(EndedSignalType) m_sigEnded;
96 
97 };
98 
99 } // namespace editor
100 } // namespace gui
#define SPTR(_cls_)
The namespace fwGui contains the base interface for IHM services.
Definition: SJobBar.hpp:23
Namespace containing fw4spl communication tools.
Definition: DumpEditor.hpp:30
The namespace gui contains the basic services to build the application IHM.
STL namespace.
Defines the generic progress dialog for IHM. Use the Delegate design pattern. The specific implementa...
::fwCom::Slot< void(::fwJobs::IJob::sptr) > ShowJobSlot
Type of showJob slot.
Definition: SJobBar.hpp:50
Service displaying a progress bar.
Definition: SJobBar.hpp:40
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
Defines the service interface managing the editor service which create their own container.
This namespace fwJobs provides jobs management.