Logo Search packages:      
Sourcecode: caret version File versions  Download package

void GuiDisplayControlDialog::updatePageSelectionComboBox (  )  [private]

Update the page selection combo box based upon enabled pages.

Update the page selection combo box based upon enabled pages.

Definition at line 960 of file GuiDisplayControlDialog.cxx.

References getPageName(), pageComboBox, pageComboBoxItems, updateDataValidityFlags(), validArealEstimationData, validBorderData, validCellData, validCocomacData, validContourData, validDeformationFieldData, validFociData, validGeodesicData, validImageData, validLatLonData, validMetricData, validModelData, validPaintData, validProbAtlasSurfaceData, validProbAtlasVolumeData, validRegionData, validRgbPaintData, validSceneData, validSectionData, validShapeData, validSurfaceAndVolumeData, validSurfaceData, validTopographyData, validVectorData, validVolumeData, and validVolumeFunctionalData.

Referenced by GuiDisplayControlDialog(), updateAllItemsInDialog(), updateArealEstimationItems(), updateBorderItems(), updateCellItems(), updateCocomacItems(), updateContourItems(), updateDeformationFieldPage(), updateFociItems(), updateGeodesicItems(), updateImagesItems(), updateLatLonItems(), updateMetricItems(), updateMiscItems(), updateModelItems(), updateOverlayUnderlayItemsNew(), updatePaintItems(), updateProbAtlasSurfaceItems(), updateProbAtlasVolumeItems(), updateRegionItems(), updateRgbPaintOverlayUnderlaySelection(), updateSceneItems(), updateShapeItems(), updateShapeSelections(), updateShapeSettings(), updateSurfaceAndVolumeItems(), updateTopographyItems(), updateVectorItems(), and updateVolumeItems().

{
   updateDataValidityFlags();
   
   PAGE_NAME currentPageName = PAGE_NAME_INVALID;
   if (pageComboBoxItems.empty() == false) {
      const int item = pageComboBox->currentIndex();
      if ((item >= 0) && (item < static_cast<int>(pageComboBoxItems.size()))) {
         currentPageName = pageComboBoxItems[item];
      }
   }
   
   pageComboBox->clear();
   pageComboBoxItems.clear();
   
   if (validSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SURFACE_OVERLAY_UNDERLAY_NEW));
      pageComboBoxItems.push_back(PAGE_NAME_SURFACE_OVERLAY_UNDERLAY_NEW);
   }
   if (validVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_VOLUME_SELECTION));
      pageComboBoxItems.push_back(PAGE_NAME_VOLUME_SELECTION);
   }
   if (validArealEstimationData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_AREAL_ESTIMATION));
      pageComboBoxItems.push_back(PAGE_NAME_AREAL_ESTIMATION);
   }
   if (validBorderData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_BORDER_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_BORDER_MAIN);
   }
   if (validBorderData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_BORDER_COLOR));
      pageComboBoxItems.push_back(PAGE_NAME_BORDER_COLOR);
   }
   if (validBorderData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_BORDER_NAME));
      pageComboBoxItems.push_back(PAGE_NAME_BORDER_NAME);
   }
   if (validCellData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CELL_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_CELL_MAIN);
   }
   if (validCellData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CELL_CLASS));
      pageComboBoxItems.push_back(PAGE_NAME_CELL_CLASS);
   }
   if (validCellData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CELL_COLOR));
      pageComboBoxItems.push_back(PAGE_NAME_CELL_COLOR);
   }
   if (validCocomacData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_COCOMAC_DISPLAY));
      pageComboBoxItems.push_back(PAGE_NAME_COCOMAC_DISPLAY);
   }
   if (validCocomacData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_COCOMAC_INFORMATION));
      pageComboBoxItems.push_back(PAGE_NAME_COCOMAC_INFORMATION);
   }
   if (validContourData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CONTOUR_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_CONTOUR_MAIN);
   }
   if (validContourData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CONTOUR_CLASS));
      pageComboBoxItems.push_back(PAGE_NAME_CONTOUR_CLASS);
   }
   if (validContourData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_CONTOUR_COLOR));
      pageComboBoxItems.push_back(PAGE_NAME_CONTOUR_COLOR);
   }
   if (validDeformationFieldData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_DEFORMATION_FIELD));
      pageComboBoxItems.push_back(PAGE_NAME_DEFORMATION_FIELD);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_MAIN);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_CLASS));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_CLASS);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_COLOR));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_COLOR);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_KEYWORD));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_KEYWORD);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_NAME));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_NAME);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_SEARCH));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_SEARCH);
   }
   if (validFociData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_FOCI_TABLE));
      pageComboBoxItems.push_back(PAGE_NAME_FOCI_TABLE);
   }
   if (validGeodesicData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_GEODESIC));
      pageComboBoxItems.push_back(PAGE_NAME_GEODESIC);
   }
   if (validImageData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_IMAGES));
      pageComboBoxItems.push_back(PAGE_NAME_IMAGES);
   }
   if (validLatLonData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_LATLON));
      pageComboBoxItems.push_back(PAGE_NAME_LATLON);
   }
   if (validMetricData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_METRIC_MISCELLANEOUS));
      pageComboBoxItems.push_back(PAGE_NAME_METRIC_MISCELLANEOUS);
   }
   if (validMetricData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_METRIC_SELECTION));
      pageComboBoxItems.push_back(PAGE_NAME_METRIC_SELECTION);
   }
   if (validMetricData || validVolumeFunctionalData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_METRIC_SETTINGS));
      pageComboBoxItems.push_back(PAGE_NAME_METRIC_SETTINGS);
   }
   if (validModelData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_MODELS_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_MODELS_MAIN);
   }
   if (validModelData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_MODELS_SETTINGS));
      pageComboBoxItems.push_back(PAGE_NAME_MODELS_SETTINGS);
   }
   if (validPaintData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PAINT_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_PAINT_MAIN);
      pageComboBox->addItem(getPageName(PAGE_NAME_PAINT_COLUMN));
      pageComboBoxItems.push_back(PAGE_NAME_PAINT_COLUMN);
      pageComboBox->addItem(getPageName(PAGE_NAME_PAINT_NAMES));
      pageComboBoxItems.push_back(PAGE_NAME_PAINT_NAMES);
   }
   if (validProbAtlasSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_SURFACE_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_SURFACE_MAIN);
   }
   if (validProbAtlasSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_SURFACE_AREA));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_SURFACE_AREA);
   }
   if (validProbAtlasSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_SURFACE_CHANNEL));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_SURFACE_CHANNEL);
   }
   if (validProbAtlasVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_VOLUME_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_VOLUME_MAIN);
   }
   if (validProbAtlasVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_VOLUME_AREA));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_VOLUME_AREA);
   }
   if (validProbAtlasVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_PROB_ATLAS_VOLUME_CHANNEL));
      pageComboBoxItems.push_back(PAGE_NAME_PROB_ATLAS_VOLUME_CHANNEL);
   }
   if (validRegionData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_REGION));
      pageComboBoxItems.push_back(PAGE_NAME_REGION);
   }
   if (validRgbPaintData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_RGB_PAINT_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_RGB_PAINT_MAIN);
      pageComboBox->addItem(getPageName(PAGE_NAME_RGB_PAINT_SELECTION));
      pageComboBoxItems.push_back(PAGE_NAME_RGB_PAINT_SELECTION);
   }
   if (validSceneData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SCENE));
      pageComboBoxItems.push_back(PAGE_NAME_SCENE);
   }
   if (validSectionData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SECTION_MAIN));
      pageComboBoxItems.push_back(PAGE_NAME_SECTION_MAIN);
   }
   if (validShapeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SHAPE_SELECTION));
      pageComboBoxItems.push_back(PAGE_NAME_SHAPE_SELECTION);
   }
   if (validShapeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SHAPE_SETTINGS));
      pageComboBoxItems.push_back(PAGE_NAME_SHAPE_SETTINGS);
   }
   if (validSurfaceAndVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SURFACE_AND_VOLUME));
      pageComboBoxItems.push_back(PAGE_NAME_SURFACE_AND_VOLUME);
   }
   if (validSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SURFACE_CLIPPING));
      pageComboBoxItems.push_back(PAGE_NAME_SURFACE_CLIPPING);
   }
   if (validSurfaceData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_SURFACE_MISC));
      pageComboBoxItems.push_back(PAGE_NAME_SURFACE_MISC);
   }
   if (validTopographyData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_TOPOGRAPHY));
      pageComboBoxItems.push_back(PAGE_NAME_TOPOGRAPHY);
   }
   if (validVectorData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_VECTOR_SELECTION));
      pageComboBoxItems.push_back(PAGE_NAME_VECTOR_SELECTION);
      pageComboBox->addItem(getPageName(PAGE_NAME_VECTOR_SETTINGS));
      pageComboBoxItems.push_back(PAGE_NAME_VECTOR_SETTINGS);
   }
   if (validVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_VOLUME_SETTINGS));
      pageComboBoxItems.push_back(PAGE_NAME_VOLUME_SETTINGS);
   }
   if (validVolumeData) {
      pageComboBox->addItem(getPageName(PAGE_NAME_VOLUME_SURFACE_OUTLINE));
      pageComboBoxItems.push_back(PAGE_NAME_VOLUME_SURFACE_OUTLINE);
   }
   
   int defaultItem = 0;
   for (int i = 0; i < static_cast<int>(pageComboBoxItems.size()); i++) {
      if (pageComboBoxItems[i] == currentPageName) {
         defaultItem = i;
         break;
      }
   }
   if (pageComboBoxItems.empty() == false) {
      pageComboBox->blockSignals(true);
      pageComboBox->setCurrentIndex(defaultItem);
      pageComboBox->blockSignals(false);
   }
}


Generated by  Doxygen 1.6.0   Back to index