Просмотр исходного кода

Added model reset method to dicom app widget

Allows it to refresh the tree when new data has been
added.
Steve Pieper лет назад: 13
Родитель
Сommit
040b600eff
2 измененных файлов с 10 добавлено и 0 удалено
  1. 8 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.cpp
  2. 2 0
      Libs/DICOM/Widgets/ctkDICOMAppWidget.h

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

@@ -301,6 +301,14 @@ void ctkDICOMAppWidget::openQueryDialog()
 }
 
 //----------------------------------------------------------------------------
+void ctkDICOMAppWidget::resetModel()
+{
+  Q_D(ctkDICOMAppWidget);
+
+  d->DICOMModel.reset();
+}
+
+//----------------------------------------------------------------------------
 void ctkDICOMAppWidget::onThumbnailSelected(const ctkThumbnailWidget& widget)
 {
     Q_D(ctkDICOMAppWidget);

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

@@ -57,6 +57,8 @@ public slots:
   void openExportDialog();
   void openQueryDialog();
 
+  void resetModel();
+
 signals:
   /// Emited when directory is changed
   void databaseDirectoryChanged(const QString&);