浏览代码

Select all the rows in studiesTable when a patient is selected and all the rows in seriesTable when a study is selected

Alireza Mehrtash 11 年之前
父节点
当前提交
8ad1f550bf

+ 33 - 1
Libs/DICOM/Widgets/Resources/UI/ctkDICOMTableManager.ui

@@ -61,7 +61,7 @@ QSplitter::handle:vertical {height: 2px;}</string>
  </customwidgets>
  <resources/>
  <connections>
- <connection>
+  <connection>
    <sender>patientsTable</sender>
    <signal>selectionChanged(QStringList)</signal>
    <receiver>ctkDICOMTableManager</receiver>
@@ -189,6 +189,38 @@ QSplitter::handle:vertical {height: 2px;}</string>
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>patientsTable</sender>
+   <signal>selectionChanged(QStringList)</signal>
+   <receiver>studiesTable</receiver>
+   <slot>selectAll()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>143</x>
+     <y>227</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>416</x>
+     <y>227</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>studiesTable</sender>
+   <signal>selectionChanged(QStringList)</signal>
+   <receiver>seriesTable</receiver>
+   <slot>selectAll()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>416</x>
+     <y>227</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>688</x>
+     <y>227</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <signal>seriesSelectionChanged(QStringList)</signal>

+ 7 - 0
Libs/DICOM/Widgets/ctkDICOMTableView.cpp

@@ -287,6 +287,13 @@ void ctkDICOMTableView::onInstanceAdded()
 }
 
 //------------------------------------------------------------------------------
+void ctkDICOMTableView::selectAll()
+{
+  Q_D(ctkDICOMTableView);
+  d->tblDicomDatabaseView->selectAll();
+}
+
+//------------------------------------------------------------------------------
 void ctkDICOMTableView::setQuery(const QStringList &uids)
 {
   Q_D(ctkDICOMTableView);

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

@@ -145,6 +145,8 @@ protected Q_SLOTS:
    */
   void onInstanceAdded();
 
+  void selectAll();
+
 Q_SIGNALS:
   /**
    * @brief Is emitted when the selection in the tableview has changed