浏览代码

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&);