Преглед изворни кода

Added model reset method to dicom app widget

Allows it to refresh the tree when new data has been
added.
Steve Pieper пре 13 година
родитељ
комит
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&);