+//------------------------------------------------------------------------------
+void vvToolStructureSetManager::UpdateAllROIStatus() {
+ int nbVisible = 0;
+ int nb = mCurrentStructureSetActor->GetROIList().size();
+ for(int i=0; i<nb; i++) {
+ if (mCurrentStructureSetActor->GetROIList()[i]->IsVisible()) {
+ nbVisible++;
+ }
+ }
+
+ disconnect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int)));
+ disconnect(mContourCheckBoxShowAll, SIGNAL(toggled(bool)), this, SLOT(AllVisibleContourROIToggled(bool)));
+ if (nbVisible == nb) mCheckBoxShowAll->setCheckState(Qt::Checked);
+ else {
+ if (nbVisible == 0) mCheckBoxShowAll->setCheckState(Qt::Unchecked);
+ else mCheckBoxShowAll->setCheckState(Qt::PartiallyChecked);
+ }
+ connect(mContourCheckBoxShowAll, SIGNAL(toggled(bool)), this, SLOT(AllVisibleContourROIToggled(bool)));
+ connect(mCheckBoxShowAll, SIGNAL(stateChanged(int)), this, SLOT(AllVisibleROIToggled(int)));
+}
+//------------------------------------------------------------------------------
+