浏览代码

Expose signal so users of app widget know about directory imports

Allows users of the widget to process the data after it
has been imported.
Steve Pieper 13 年之前
父节点
当前提交
b1f6b10bc4
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 5 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp
  2. 2 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.h

+ 5 - 0
Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp

@@ -448,10 +448,15 @@ void ctkDICOMAppWidget::onImportDirectory(QString directory)
     connect(d->DICOMIndexer.data(), SIGNAL(progress(int)),
             this, SLOT(onProgress(int)));
 
+    // close the dialog
     connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
             progress, SLOT(close()));
+    // reset the database to show new data
     connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
             &d->DICOMModel, SLOT(reset()));
+    // allow users of this widget to know that the process has finished
+    connect(d->DICOMIndexer.data(), SIGNAL(indexingComplete()),
+            this, SIGNAL(directoryImported()));
 
     d->DICOMIndexer->addDirectory(*d->DICOMDatabase,directory,targetDirectory);
   }

+ 2 - 0
Libs/DICOM/Widgets/ctkDICOMAppWidget.h

@@ -70,6 +70,8 @@ Q_SIGNALS:
   void databaseDirectoryChanged(const QString&);
   /// Emited when query/retrieve operation has happened
   void queryRetrieveFinished();
+  /// Emited when the directory import operation has completed
+  void directoryImported();
 
 protected:
     QScopedPointer<ctkDICOMAppWidgetPrivate> d_ptr;