ソースを参照

Reset database so after query/retrieve operation

This way the results of the latest retrieve operation
are visible right away in the database
Steve Pieper 13 年 前
コミット
d71c9b72c6
共有2 個のファイルを変更した14 個の追加0 個の削除を含む
  1. 9 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp
  2. 5 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.h

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

@@ -172,6 +172,7 @@ ctkDICOMAppWidget::ctkDICOMAppWidget(QWidget* _parent):Superclass(_parent),
   connect(d->ImportDialog, SIGNAL(fileSelected(QString)),this,SLOT(onImportDirectory(QString)));
 
   connect(d->QueryRetrieveWidget, SIGNAL(canceled()), d->QueryRetrieveWidget, SLOT(hide()) );
+  connect(d->QueryRetrieveWidget, SIGNAL(canceled()), this, SLOT(onQueryRetrieveFinished()) );
 
   connect(d->ImagePreview, SIGNAL(requestNextImage()), this, SLOT(onNextImage()));
   connect(d->ImagePreview, SIGNAL(requestPreviousImage()), this, SLOT(onPreviousImage()));
@@ -304,6 +305,14 @@ void ctkDICOMAppWidget::openQueryDialog()
 }
 
 //----------------------------------------------------------------------------
+void ctkDICOMAppWidget::onQueryRetrieveFinished()
+{
+  Q_D(ctkDICOMAppWidget);
+  d->DICOMModel.reset();
+  emit this->queryRetrieveFinished();
+}
+
+//----------------------------------------------------------------------------
 void ctkDICOMAppWidget::onRemoveAction()
 {
   Q_D(ctkDICOMAppWidget);

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

@@ -65,6 +65,8 @@ public Q_SLOTS:
 Q_SIGNALS:
   /// Emited when directory is changed
   void databaseDirectoryChanged(const QString&);
+  /// Emited when query/retrieve operation has happened
+  void queryRetrieveFinished();
 
 protected:
     QScopedPointer<ctkDICOMAppWidgetPrivate> d_ptr;
@@ -86,6 +88,9 @@ protected Q_SLOTS:
     void onNextStudy();
     void onPreviousStudy();
 
+    /// To be called when dialog finishes
+    void onQueryRetrieveFinished();
+
     /// To be called when an entry of the tree list is collapsed
     void onTreeCollapsed(const QModelIndex& index);