fw4spl
SProgressBarController.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __IOPACS_SPROGRESSBARCONTROLLER_HPP__
8 #define __IOPACS_SPROGRESSBARCONTROLLER_HPP__
9 
10 #include "ioPacs/config.hpp"
11 
12 #include <fwCom/Slot.hpp>
13 
14 #include <fwCore/mt/types.hpp>
15 
16 #include <fwGui/dialog/ProgressDialog.hpp>
17 
18 #include <fwServices/IController.hpp>
19 
20 #include <boost/filesystem/path.hpp>
21 
22 namespace ioPacs
23 {
24 
28 class IOPACS_CLASS_API SProgressBarController : public ::fwServices::IController
29 {
30 
31 public:
32 
34 
36  typedef std::map< std::string, ::fwGui::dialog::ProgressDialog::sptr > ProgressDialogContainerType;
37 
41  IOPACS_API SProgressBarController() noexcept;
42 
46  IOPACS_API virtual ~SProgressBarController() noexcept;
47 
48 protected:
49 
60  IOPACS_API virtual void configuring() override;
61 
63  IOPACS_API virtual void starting() override;
64 
66  IOPACS_API virtual void stopping() override;
67 
69  IOPACS_API void updating() override;
70 
72  IOPACS_API void info(std::ostream& _sstream ) override;
73 
78  void startProgress(std::string id);
79 
80  void updateProgress(std::string id, float percentage, std::string message);
81 
82  void stopProgress(std::string id);
87  ProgressDialogContainerType m_progressDialogs;
89 
90  ::fwCore::mt::Mutex m_mutex;
91 
92 };
93 
94 } // namespace ioPacs
95 
96 #endif // __IOPACS_SPROGRESSBARCONTROLLER_HPP__
This editor service is used to display a progress bar.
ioPacs contains services use to deal with PACS using DCMTK library.
STL namespace.
This namespace fwCore provides common foundations for FW4SPL.
Definition: BaseObject.hpp:16
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
std::map< std::string,::fwGui::dialog::ProgressDialog::sptr > ProgressDialogContainerType
Type of progress bar container.