diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.cpp index f92f90138b..f38068f801 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.cpp +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.cpp @@ -1,124 +1,123 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkDicomDirectoryListener.h" #include #include #include QmitkDicomDirectoryListener::QmitkDicomDirectoryListener() : m_FileSystemWatcher(new QFileSystemWatcher()) , m_FilesToImport(new QStringList()) , m_ImportingFiles(new QStringList()) -, m_DicomListenerDirectory(QString()) { connect(m_FileSystemWatcher,SIGNAL(directoryChanged(const QString&)),this,SLOT(OnDirectoryChanged(const QString&))); } QmitkDicomDirectoryListener::~QmitkDicomDirectoryListener() { delete m_FilesToImport; delete m_ImportingFiles; delete m_FileSystemWatcher; } void QmitkDicomDirectoryListener::OnDirectoryChanged(const QString&) { //m_Mutex.lock(); SetFilesToImport(); m_ImportingFiles->append(*m_FilesToImport); emit SignalAddDicomData(*m_FilesToImport); //m_Mutex.unlock(); } void QmitkDicomDirectoryListener::OnDicomImportFinished(const QStringList& finishedFiles) { //m_Mutex.lock(); RemoveFilesFromDirectoryAndImportingFilesList(finishedFiles); //m_Mutex.unlock(); } void QmitkDicomDirectoryListener::SetFilesToImport() { m_FilesToImport->clear(); QDir listenerDirectory(m_DicomListenerDirectory); QFileInfoList entries = listenerDirectory.entryInfoList(QDir::Files); if(!entries.isEmpty()) { QFileInfoList::const_iterator file; for(file = entries.constBegin(); file != entries.constEnd(); ++file ) { if(!m_ImportingFiles->contains((*file).absoluteFilePath())) { m_FilesToImport->append((*file).absoluteFilePath()); } } } } void QmitkDicomDirectoryListener::RemoveFilesFromDirectoryAndImportingFilesList(const QStringList& files) { QStringListIterator fileToDeleteIterator(files); while(fileToDeleteIterator.hasNext()) { QFile file(fileToDeleteIterator.next()); if(m_ImportingFiles->contains(file.fileName())) { m_ImportingFiles->removeOne(file.fileName()); file.remove(); } } } void QmitkDicomDirectoryListener::SetDicomListenerDirectory(const QString& directory) { if(isOnlyListenedDirectory(directory)) { QDir listenerDirectory = QDir(directory); CreateListenerDirectory(listenerDirectory); m_DicomListenerDirectory=listenerDirectory.absolutePath(); m_FileSystemWatcher->addPath(m_DicomListenerDirectory); } } const QString& QmitkDicomDirectoryListener::GetDicomListenerDirectory() { return m_DicomListenerDirectory; } void QmitkDicomDirectoryListener::CreateListenerDirectory(const QDir& directory) { if(!directory.exists()) { directory.mkpath(directory.absolutePath()); } } bool QmitkDicomDirectoryListener::isOnlyListenedDirectory(const QString& directory) { bool isOnlyListenedDirectory = false; if(m_FileSystemWatcher->directories().count()==0||m_FileSystemWatcher->directories().count()==1) { if(!m_FileSystemWatcher->directories().contains(directory)) { isOnlyListenedDirectory = true; } } return isOnlyListenedDirectory; } \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.h b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.h index a8f694ebee..b4540abd25 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.h +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomDirectoryListener.h @@ -1,80 +1,78 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkDicomDirectoryListener_h #define QmitkDicomDirectoryListener_h #include #include #include #include #include -#include #include class QmitkDicomDirectoryListener : public QObject { Q_OBJECT public: QmitkDicomDirectoryListener(); virtual ~QmitkDicomDirectoryListener(); /// @brief sets listened directory, note that only one directory can be set. void SetDicomListenerDirectory(const QString&); /// @brief get filepath to the listened directory. const QString& GetDicomListenerDirectory(); signals: /// @brief signal starts the dicom import of the given file (the QStringList will only contain one file here). void SignalAddDicomData(const QStringList&); public slots: /// \brief called when listener directory changes void OnDirectoryChanged(const QString&); /// \brief called when import is finished void OnDicomImportFinished(const QStringList&); protected: /// \brief creates directory if it's not already existing. void CreateListenerDirectory(const QDir& directory); /// \brief checks wheter the given directory is the only directory that is listened. bool isOnlyListenedDirectory(const QString& directory); /// \brief Composes the filename and initializes m_LastRetrievedFile with it void SetFilesToImport(); /// \brief removes files from void RemoveFilesFromDirectoryAndImportingFilesList(const QStringList& files); QFileSystemWatcher* m_FileSystemWatcher; QStringList* m_FilesToImport; QStringList* m_ImportingFiles; QString m_DicomListenerDirectory; - QMutex m_Mutex; }; #endif // QmitkDicomListener_h \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.cpp index 6507cab0fc..7f0262123e 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.cpp +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.cpp @@ -1,245 +1,249 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ // Blueberry #include #include #include #include #include #include #include #include #include "berryFileEditorInput.h" // Qmitk #include "QmitkDicomEditor.h" #include "mitkPluginActivator.h" #include //#include "mitkProgressBar.h" // Qt #include #include #include #include #include #include #include #include #include #include #include #include #include #include //CTK #include #include #include #include #include const std::string QmitkDicomEditor::EDITOR_ID = "org.mitk.editors.dicomeditor"; QmitkDicomEditor::QmitkDicomEditor() : m_Thread(new QThread()) , m_DicomDirectoryListener(new QmitkDicomDirectoryListener()) -, m_StoreSCPLauncher(new QmitkStoreSCPLauncher(&builder)) +, m_StoreSCPLauncher(new QmitkStoreSCPLauncher(&m_Builder)) , m_Publisher(new QmitkDicomDataEventPublisher()) { } QmitkDicomEditor::~QmitkDicomEditor() { m_Thread->quit(); m_Thread->wait(1000); delete m_Handler; delete m_Publisher; delete m_StoreSCPLauncher; delete m_Thread; delete m_DicomDirectoryListener; } void QmitkDicomEditor::CreateQtPartControl(QWidget *parent ) { m_Controls.setupUi( parent ); m_Controls.LocalStorageButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/drive-harddisk_32.png")); m_Controls.FolderButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/folder_32.png")); m_Controls.CDButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/media-optical_32.png")); m_Controls.QueryRetrieveButton->setIcon(QIcon(":/org.mitk.gui.qt.dicom/network-workgroup_32.png")); m_Controls.StoreSCPStatusLabel->setTextFormat(Qt::RichText); m_Controls.StoreSCPStatusLabel->setText(""); TestHandler(); SetPluginDirectory(); SetDatabaseDirectory("DatabaseDirectory"); SetListenerDirectory("ListenerDirectory"); StartDicomDirectoryListener(); m_Controls.m_ctkDICOMQueryRetrieveWidget->useProgressDialog(false); connect(m_Controls.externalDataWidget,SIGNAL(SignalAddDicomData(const QString&)),m_Controls.internalDataWidget,SLOT(StartDicomImport(const QString&))); connect(m_Controls.externalDataWidget,SIGNAL(SignalAddDicomData(const QStringList&)),m_Controls.internalDataWidget,SLOT(StartDicomImport(const QStringList&))); connect(m_Controls.externalDataWidget,SIGNAL(SignalDicomToDataManager(const QStringList&)),this,SLOT(OnViewButtonAddToDataManager(const QStringList&))); connect(m_Controls.externalDataWidget,SIGNAL(SignalChangePage(int)), this, SLOT(OnChangePage(int))); connect(m_Controls.internalDataWidget,SIGNAL(FinishedImport(const QString&)),this,SLOT(OnDicomImportFinished(const QString&))); connect(m_Controls.internalDataWidget,SIGNAL(FinishedImport(const QStringList&)),this,SLOT(OnDicomImportFinished(const QStringList&))); connect(m_Controls.internalDataWidget,SIGNAL(SignalDicomToDataManager(const QStringList&)),this,SLOT(OnViewButtonAddToDataManager(const QStringList&))); connect(m_Controls.CDButton, SIGNAL(clicked()), m_Controls.externalDataWidget, SLOT(OnFolderCDImport())); connect(m_Controls.FolderButton, SIGNAL(clicked()), m_Controls.externalDataWidget, SLOT(OnFolderCDImport())); connect(m_Controls.FolderButton, SIGNAL(clicked()), this, SLOT(OnFolderCDImport())); connect(m_Controls.QueryRetrieveButton, SIGNAL(clicked()), this, SLOT(OnQueryRetrieve())); connect(m_Controls.LocalStorageButton, SIGNAL(clicked()), this, SLOT(OnLocalStorage())); //connect(m_Controls.radioButton,SIGNAL(clicked()),this,SLOT(StartStopStoreSCP())); } void QmitkDicomEditor::Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input) { this->SetSite(site); this->SetInput(input); } void QmitkDicomEditor::SetFocus() { } berry::IPartListener::Events::Types QmitkDicomEditor::GetPartEventTypes() const { return Events::CLOSED | Events::HIDDEN | Events::VISIBLE; } void QmitkDicomEditor::OnQueryRetrieve() { OnChangePage(2); QString storagePort = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StoragePort"].toString(); QString storageAET = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StorageAETitle"].toString(); + if(!((m_Builder.GetAETitle()->compare(storageAET,Qt::CaseSensitive)==0)&& + (m_Builder.GetPort()->compare(storagePort,Qt::CaseSensitive)==0))) { StopStoreSCP(); StartStoreSCP(); } } void QmitkDicomEditor::OnFolderCDImport() { } void QmitkDicomEditor::OnLocalStorage() { OnChangePage(0); } void QmitkDicomEditor::OnChangePage(int page) { try{ m_Controls.stackedWidget->setCurrentIndex(page); }catch(std::exception e){ MITK_ERROR <<"error: "<< e.what(); return; } } -void QmitkDicomEditor::OnDicomImportFinished(const QString& /*path*/) +void QmitkDicomEditor::OnDicomImportFinished(const QString&) { } -void QmitkDicomEditor::OnDicomImportFinished(const QStringList& /*path*/) +void QmitkDicomEditor::OnDicomImportFinished(const QStringList&) { } void QmitkDicomEditor::StartDicomDirectoryListener() { if(!m_Thread->isRunning()) { m_DicomDirectoryListener->SetDicomListenerDirectory(m_ListenerDirectory); connect(m_DicomDirectoryListener,SIGNAL(SignalAddDicomData(const QStringList&)),m_Controls.internalDataWidget,SLOT(StartDicomImport(const QStringList&)),Qt::DirectConnection); connect(m_Controls.internalDataWidget,SIGNAL(FinishedImport(const QStringList&)),m_DicomDirectoryListener,SLOT(OnDicomImportFinished(const QStringList&)),Qt::DirectConnection); m_DicomDirectoryListener->moveToThread(m_Thread); m_Thread->start(); } } -//TODO Remove + void QmitkDicomEditor::TestHandler() { m_Handler = new DicomEventHandler(); m_Handler->SubscribeSlots(); } void QmitkDicomEditor::OnViewButtonAddToDataManager(const QStringList& eventProperties) { ctkDictionary properties; properties["PatientName"] = eventProperties.at(0); properties["StudyUID"] = eventProperties.at(1); properties["StudyName"] = eventProperties.at(2); properties["SeriesUID"] = eventProperties.at(3); properties["SeriesName"] = eventProperties.at(4); properties["Path"] = eventProperties.at(5); m_Publisher->PublishSignals(mitk::PluginActivator::getContext()); m_Publisher->AddSeriesToDataManagerEvent(properties); } void QmitkDicomEditor::StartStoreSCP() { QString storagePort = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StoragePort"].toString(); QString storageAET = m_Controls.m_ctkDICOMQueryRetrieveWidget->getServerParameters()["StorageAETitle"].toString(); + m_Builder.AddPort(storagePort)->AddAETitle(storageAET)->AddTransferSyntax()->AddOtherNetworkOptions()->AddMode()->AddOutputDirectory(m_ListenerDirectory); + m_StoreSCPLauncher = new QmitkStoreSCPLauncher(&m_Builder); connect(m_StoreSCPLauncher, SIGNAL(SignalStatusOfStoreSCP(const QString&)), this, SLOT(OnStoreSCPStatusChanged(const QString&))); m_StoreSCPLauncher->StartStoreSCP(); } void QmitkDicomEditor::OnStoreSCPStatusChanged(const QString& status) { m_Controls.StoreSCPStatusLabel->setText(" "+status); } void QmitkDicomEditor::StopStoreSCP() { delete m_StoreSCPLauncher; } void QmitkDicomEditor::SetPluginDirectory() { m_PluginDirectory = mitk::PluginActivator::getContext()->getDataFile("").absolutePath(); m_PluginDirectory.append("/"); } void QmitkDicomEditor::SetDatabaseDirectory(const QString& databaseDirectory) { m_DatabaseDirectory.clear(); m_DatabaseDirectory.append(m_PluginDirectory); m_DatabaseDirectory.append(databaseDirectory); m_Controls.internalDataWidget->SetDatabaseDirectory(m_DatabaseDirectory); } void QmitkDicomEditor::SetListenerDirectory(const QString& listenerDirectory) { m_ListenerDirectory.clear(); m_ListenerDirectory.append(m_PluginDirectory); m_ListenerDirectory.append(listenerDirectory); } diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.h b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.h index 323d269405..7493e1c02e 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.h +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkDicomEditor.h @@ -1,134 +1,135 @@ -/*=================================================================== +/*========================================================================= The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #ifndef QmitkDicomEditor_h #define QmitkDicomEditor_h #include #include #include #include "ui_QmitkDicomEditorControls.h" #include "QmitkDicomDirectoryListener.h" #include "QmitkStoreSCPLauncher.h" #include "QmitkStoreSCPLauncherBuilder.h" #include "DicomEventHandler.h" #include "QmitkDicomDataEventPublisher.h" #include #include #include #include #include #include #include #include #include #include /*! \brief QmitkDicomEditor \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation. \sa QmitkFunctionality \ingroup ${plugin_target}_internal */ class DICOM_EXPORT QmitkDicomEditor : public berry::QtEditorPart, virtual public berry::IPartListener { // this is needed for all Qt objects that should have a Qt meta-object // (everything that derives from QObject and wants to have signal/slots) Q_OBJECT public: berryObjectMacro(QmitkDicomEditor) static const std::string EDITOR_ID; QmitkDicomEditor(); virtual ~QmitkDicomEditor(); void Init(berry::IEditorSite::Pointer site, berry::IEditorInput::Pointer input); void SetFocus(); void DoSave() {} void DoSaveAs() {} bool IsDirty() const { return false; } bool IsSaveAsAllowed() const { return false; } signals: protected slots: /// \brief Called when StoreSCP shold start void StartStoreSCP(); /// \brief Called when StoreSCP should stop void StopStoreSCP(); /// \brief Called when import is finished void OnDicomImportFinished(const QString& path); /// \brief Called when import is finished void OnDicomImportFinished(const QStringList& path); /// \brief Called when Query Retrieve or Import Folder was clicked. void OnQueryRetrieve(); /// \brief Called when LocalStorageButton was clicked. void OnLocalStorage(); /// \brief Called when FolderCDButton was clicked. void OnFolderCDImport(); /// \brief Called when view button is clicked. Sends out an event for adding the current selected file to the mitkDataStorage. void OnViewButtonAddToDataManager(const QStringList& eventProperties); void StartDicomDirectoryListener(); void OnChangePage(int); void OnStoreSCPStatusChanged(const QString& status); + void TestHandler(); void SetDatabaseDirectory(const QString& databaseDirectory); void SetListenerDirectory(const QString& listenerDirectory); protected: void CreateQtPartControl(QWidget *parent); void SetPluginDirectory(); Events::Types GetPartEventTypes() const; Ui::QmitkDicomEditorControls m_Controls; QThread* m_Thread; QmitkDicomDirectoryListener* m_DicomDirectoryListener; - QmitkStoreSCPLauncherBuilder builder; + QmitkStoreSCPLauncherBuilder m_Builder; QmitkStoreSCPLauncher* m_StoreSCPLauncher; DicomEventHandler* m_Handler; QmitkDicomDataEventPublisher* m_Publisher; QString m_PluginDirectory; QString m_ListenerDirectory; QString m_DatabaseDirectory; }; #endif // QmitkDicomEditor_h diff --git a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkStoreSCPLauncher.cpp b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkStoreSCPLauncher.cpp index f70107e5b0..942ec06842 100644 --- a/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkStoreSCPLauncher.cpp +++ b/Plugins/org.mitk.gui.qt.dicom/src/internal/QmitkStoreSCPLauncher.cpp @@ -1,140 +1,145 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkStoreSCPLauncher.h" #include #include #include #include #include #include #include #include #include #include #include QmitkStoreSCPLauncher::QmitkStoreSCPLauncher(QmitkStoreSCPLauncherBuilder* builder) : m_StoreSCP(new QProcess()) { connect( m_StoreSCP, SIGNAL(error(QProcess::ProcessError)),this, SLOT(OnProcessError(QProcess::ProcessError))); connect( m_StoreSCP, SIGNAL(stateChanged(QProcess::ProcessState)),this, SLOT(OnStateChanged(QProcess::ProcessState))); SetArgumentList(builder); } QmitkStoreSCPLauncher::~QmitkStoreSCPLauncher() { - m_StoreSCP->kill(); + m_StoreSCP->close(); + m_StoreSCP->waitForFinished(1000); delete m_StoreSCP; } void QmitkStoreSCPLauncher::StartStoreSCP() { FindPathToStoreSCP(); MITK_INFO << m_PathToStoreSCP.toStdString(); m_StoreSCP->start(m_PathToStoreSCP,m_ArgumentList); } void QmitkStoreSCPLauncher::FindPathToStoreSCP() { if(m_PathToStoreSCP.isEmpty()) { QString fileName; #ifdef _WIN32 fileName = "/storescp.exe"; #else fileName = "/storescp"; #endif QString appPath= QCoreApplication::applicationDirPath(); appPath; m_PathToStoreSCP = appPath; m_PathToStoreSCP.append(fileName); //In developement the storescp isn't copied into bin directory if(!QFile::exists(m_PathToStoreSCP)) { m_PathToStoreSCP.clear(); appPath.append("/../../../DCMTK-install/bin"); m_PathToStoreSCP = appPath; m_PathToStoreSCP.append(fileName); } } } void QmitkStoreSCPLauncher::OnProcessError(QProcess::ProcessError err) { switch(err) { case QProcess::FailedToStart: - MITK_INFO << QString("Failed to start storage provider: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Failed to start storage provider: ").append(m_StoreSCP->errorString()); break; case QProcess::Crashed: - MITK_INFO << QString("Storage provider crashed: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider crashed: ").append(m_StoreSCP->errorString()); break; case QProcess::Timedout: - MITK_INFO << QString("Storage provider timeout: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider timeout: ").append(m_StoreSCP->errorString()); break; case QProcess::WriteError: - MITK_INFO << QString("Storage provider write error: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider write error: ").append(m_StoreSCP->errorString()); break; case QProcess::ReadError: - MITK_INFO << QString("Storage provider read error: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider read error: ").append(m_StoreSCP->errorString()); break; case QProcess::UnknownError: - MITK_INFO << QString("Storage provider unknown error: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider unknown error: ").append(m_StoreSCP->errorString()); break; default: - MITK_INFO << QString("Storage provider unknown error: ").append(m_StoreSCP->errorString()).toStdString(); + m_ErrorText = QString("Storage provider unknown error: ").append(m_StoreSCP->errorString()); break; } } void QmitkStoreSCPLauncher::OnStateChanged(QProcess::ProcessState status) { switch(status) { case QProcess::NotRunning: - MITK_INFO << QString("Storage provider not running: ").append(m_StoreSCP->errorString()).toStdString(); + m_StatusText = QString("Storage provider not running: "); + emit SignalStatusOfStoreSCP(m_StatusText); break; case QProcess::Starting: - MITK_INFO << QString("Starting storage provider").toStdString(); + m_StatusText = QString("Starting ").append(m_ArgumentList[2]).append(" on port ").append(m_ArgumentList[0]); + emit SignalStatusOfStoreSCP(m_StatusText); break; case QProcess::Running: - MITK_INFO << QString("Running storage provider").toStdString(); + m_StatusText = QString("Running ").append(m_ArgumentList[2]).append(" on port ").append(m_ArgumentList[0]);; + emit SignalStatusOfStoreSCP(m_StatusText); break; default: - MITK_INFO << QString("Storage provider unknown error: ").append(m_StoreSCP->errorString()).toStdString(); + m_StatusText = QString("Storage provider unknown error: "); + emit SignalStatusOfStoreSCP(m_StatusText); break; } } void QmitkStoreSCPLauncher::SetArgumentList(QmitkStoreSCPLauncherBuilder* builder) { m_ArgumentList << *builder->GetPort() << QString("-aet") <<*builder->GetAETitle() << *builder->GetTransferSyntax() << *builder->GetOtherNetworkOptions() << *builder->GetMode() << QString("-od") << *builder->GetOutputDirectory(); } QString QmitkStoreSCPLauncher::ArgumentListToQString() { QString argumentString; QStringListIterator argumentIterator(m_ArgumentList); while(argumentIterator.hasNext()) { argumentString.append(" "); argumentString.append(argumentIterator.next()); } return argumentString; }