7 #include "ioPacs/SProgressBarController.hpp" 9 #include <fwCom/Slot.hpp> 10 #include <fwCom/Slot.hxx> 11 #include <fwCom/Slots.hpp> 12 #include <fwCom/Slots.hxx> 13 #include <fwData/Composite.hpp> 14 #include <fwGuiQt/container/QtContainer.hpp> 15 #include <fwGuiQt/dialog/ProgressDialog.hpp> 16 #include <fwServices/macros.hpp> 17 #include <fwServices/registry/ActiveWorkers.hpp> 19 #include <boost/foreach.hpp> 26 static const ::fwCom::Slots::SlotKeyType s_START_PROGRESS_SLOT =
"startProgress";
27 static const ::fwCom::Slots::SlotKeyType s_UPDATE_PROGRESS_SLOT =
"updateProgress";
28 static const ::fwCom::Slots::SlotKeyType s_STOP_PROGRESS_SLOT =
"stopProgress";
34 newSlot(s_START_PROGRESS_SLOT, &SProgressBarController::startProgress,
this);
35 newSlot(s_UPDATE_PROGRESS_SLOT, &SProgressBarController::updateProgress,
this);
36 newSlot(s_STOP_PROGRESS_SLOT, &SProgressBarController::stopProgress,
this);
48 _sstream <<
"SProgressBarController::info";
81 void SProgressBarController::startProgress(std::string
id)
83 ::fwCore::mt::ScopedLock lock(
m_mutex);
89 void SProgressBarController::updateProgress(std::string
id,
float percentage, std::string message)
91 ::fwCore::mt::ScopedLock lock(
m_mutex);
99 SLM_WARN(
"Trying to update a progress bar which is not started !");
106 void SProgressBarController::stopProgress(std::string
id)
108 ::fwCore::mt::ScopedLock lock(
m_mutex);
This editor service is used to display a progress bar.
virtual IOPACS_API ~SProgressBarController() noexcept
destructor
IOPACS_API void updating() override
Override.
ioPacs contains services use to deal with PACS using DCMTK library.
#define SLM_TRACE_FUNC()
Trace contextual function signature.
IOPACS_API void info(std::ostream &_sstream) override
Override.
::fwCore::mt::Mutex m_mutex
mutex for progress dialog access
IOPACS_API SProgressBarController() noexcept
constructor
#define SLM_WARN(message)
virtual IOPACS_API void configuring() override
Configuring method. This method is used to configure the service.
This interface defines control service API. Does nothing particularly, can be considered as a default...
ProgressDialogContainerType m_progressDialogs
Progress Dialog.
This class defines a composite object.
virtual IOPACS_API void starting() override
Override.
virtual IOPACS_API void stopping() override
Override.