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

void GuiDisplayControlDialog::showDisplayControlPage ( const PAGE_NAME  pageName,
const bool  updatePagesVisited 
) [private]

show a display control page

show a display control page.

Definition at line 1311 of file GuiDisplayControlDialog.cxx.

References createArealEstimationPage(), createBorderColorPage(), createBorderMainPage(), createBorderNamePage(), createCellClassPage(), createCellColorPage(), createCellMainPage(), createCocomacDisplayPage(), createCocomacFileInformationPage(), createContourClassPage(), createContourColorPage(), createContourMainPage(), createDeformationFieldPage(), createFociClassPage(), createFociColorPage(), createFociKeywordPage(), createFociMainPage(), createFociNamePage(), createFociSearchPage(), createFociTablePage(), createGeodesicPage(), createImagesPage(), createLatLonPage(), createMetricMiscellaneousPage(), createMetricSelectionPage(), createMetricSettingsPage(), createModelsMainPage(), createModelsSettingsPage(), createOverlayUnderlaySurfacePageNew(), createOverlayUnderlayVolumeSelectionPage(), createOverlayUnderlayVolumeSettingsPage(), createOverlayUnderlayVolumeSurfaceOutlinePage(), createPaintColumnPage(), createPaintMainPage(), createPaintNamePage(), createProbAtlasSurfaceAreaPage(), createProbAtlasSurfaceChannelPage(), createProbAtlasSurfaceMainPage(), createProbAtlasVolumeAreaPage(), createProbAtlasVolumeChannelPage(), createProbAtlasVolumeMainPage(), createRegionPage(), createRgbPaintMainPage(), createRgbPaintSelectionPage(), createScenePage(), createSectionMainPage(), createShapeSelectionPage(), createShapeSettingsPage(), createSurfaceAndVolumePage(), createSurfaceClippingPage(), createSurfaceMiscPage(), createTopographyPage(), createVectorSelectionPage(), createVectorSettingsPage(), DebugControl::getDebugOn(), getPageName(), initializeSelectedOverlay(), metricApplySelectionToLeftAndRightStructuresFlagCheckBox, overlayNumberWidgetGroup, pageArealEstimation, pageBackToolButton, pageBorderColor, pageBorderMain, pageBorderName, pageCellsClass, pageCellsColor, pageCellsMain, pageCocomacDisplay, pageCocomacInformation, pageComboBox, pageComboBoxItems, pageContourClass, pageContourColor, pageContourMain, pageDeformationField, pageFociClass, pageFociColor, pageFociKeyword, pageFociMain, pageFociName, pageFociSearch, pageFociTable, pageForwardToolButton, pageGeodesicMain, pageImages, pageLatLonMain, pageMetricMiscellaneous, pageMetricSelection, pageMetricSettings, pageModelsMain, pageModelsSettings, pageOverlayUnderlaySurfaceNew, pagePaintColumn, pagePaintMain, pagePaintName, pageProbAtlasSurfaceArea, pageProbAtlasSurfaceChannel, pageProbAtlasSurfaceMain, pageProbAtlasVolumeArea, pageProbAtlasVolumeChannel, pageProbAtlasVolumeMain, pageRegionMain, pageRgbPaintMain, pageRgbPaintSelection, pageSceneMain, pageSectionMain, pageSurfaceAndVolume, pageSurfaceClipping, pageSurfaceMisc, pageSurfaceShapeSelections, pageSurfaceShapeSettings, pagesVisited, pagesVisitedIndex, pageTopography, pageVectorSelection, pageVectorSettings, pageVolumeSelection, pageVolumeSettings, pageVolumeSurfaceOutline, pageWidgetStack, paintApplySelectionToLeftAndRightStructuresFlagCheckBox, probAtlasSurfaceApplySelectionToLeftAndRightStructuresFlagCheckBox, rgbApplySelectionToLeftAndRightStructuresFlagCheckBox, sceneListBox, WuQWidgetGroup::setHidden(), shapeApplySelectionToLeftAndRightStructuresFlagCheckBox, surfaceModelGroupBox, updateAllItemsInDialog(), updateArealEstimationItems(), updateBorderColorPage(), updateBorderMainPage(), updateBorderNamePage(), updateCellClassPage(), updateCellColorPage(), updateCellMainPage(), updateCocomacDisplayPage(), updateCocomacInformationPage(), updateContourClassPage(), updateContourColorPage(), updateContourMainPage(), updateDeformationFieldPage(), updateFociClassPage(), updateFociColorPage(), updateFociKeywordPage(), updateFociMainPage(), updateFociNamePage(), updateFociSearchPage(), updateFociTablePage(), updateGeodesicItems(), updateImagesItems(), updateLatLonItems(), updateMetricMiscellaneousPage(), updateMetricSelectionPage(), updateMetricSettingsPage(), updateMetricSettingsThresholdColumnComboBox(), updateMiscItems(), updateModelMainPage(), updateModelSettingsPage(), updatePaintColumnPage(), updatePaintMainPage(), updatePaintNamePage(), updateProbAtlasSurfaceAreaPage(), updateProbAtlasSurfaceChannelPage(), updateProbAtlasSurfaceMainPage(), updateProbAtlasVolumeAreaPage(), updateProbAtlasVolumeChannelPage(), updateProbAtlasVolumeMainPage(), updateRegionItems(), updateRgbPaintMainPage(), updateRgbPaintSelectionPage(), updateSceneItems(), updateSectionMainPage(), updateShapeSelections(), updateShapeSettings(), updateShapeSettingsColorMappingComboBox(), updateSurfaceAndVolumeItems(), updateSurfaceClippingPage(), updateTopographyItems(), updateVectorSelectionPage(), updateVectorSettingsPage(), updateVolumeSelectionPage(), updateVolumeSettingsPage(), updateVolumeSurfaceOutlinePage(), and widgetStackScrollArea.

Referenced by GuiDisplayControlDialog(), pageComboBoxSelection(), showScenePage(), slotPageBackToolButtonPressed(), and slotPageForwardToolButtonPressed().

{
   bool enableSurfaceModelIndexComboBox = false;
   bool enableSurfaceModelOverlayNumberComboBox = false;
   pageComboBox->blockSignals(true);
   for (int i = 0; i < static_cast<int>(pageComboBoxItems.size()); i++) {
      if (pageComboBoxItems[i] == pageName) {
         pageComboBox->blockSignals(true);
         pageComboBox->setCurrentIndex(i);
         pageComboBox->blockSignals(false);
      }
   }
   pageComboBox->blockSignals(false);
   
   metricApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(true);
   shapeApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(true);
   paintApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(true);
   rgbApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(true);
   probAtlasSurfaceApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(true);
   
   switch(pageName) {
      case PAGE_NAME_SURFACE_OVERLAY_UNDERLAY_NEW:
         if (pageOverlayUnderlaySurfaceNew == NULL) {
            createOverlayUnderlaySurfacePageNew();
            updateAllItemsInDialog(true, false);
         }
         pageWidgetStack->setCurrentWidget(pageOverlayUnderlaySurfaceNew);
         enableSurfaceModelIndexComboBox = true;
         break;
      case PAGE_NAME_AREAL_ESTIMATION:
         if (pageArealEstimation == NULL) {
            createArealEstimationPage();
            updateArealEstimationItems();
         }
         pageWidgetStack->setCurrentWidget(pageArealEstimation);
         enableSurfaceModelIndexComboBox = true;
         enableSurfaceModelOverlayNumberComboBox = true;
         break;
      case PAGE_NAME_BORDER_MAIN:
         if (pageBorderMain == NULL) {
            createBorderMainPage();
            updateBorderMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageBorderMain);
         break;
      case PAGE_NAME_BORDER_COLOR:
         if (pageBorderColor == NULL) {
            createBorderColorPage();
            updateBorderColorPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageBorderColor);
         break;
      case PAGE_NAME_BORDER_NAME:
         if (pageBorderName == NULL) {
            createBorderNamePage();
            updateBorderNamePage(true);
         }
         pageWidgetStack->setCurrentWidget(pageBorderName);
         break;
      case PAGE_NAME_CELL_MAIN:
         if (pageCellsMain == NULL) {
            createCellMainPage();
            updateCellMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageCellsMain);
         break;
      case PAGE_NAME_CELL_CLASS:
         if (pageCellsClass == NULL) {
            createCellClassPage();
            updateCellClassPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageCellsClass);
         break;
      case PAGE_NAME_CELL_COLOR:
         if (pageCellsColor == NULL) {
            createCellColorPage();
            updateCellColorPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageCellsColor);
         break;
      case PAGE_NAME_COCOMAC_DISPLAY:
         if (pageCocomacDisplay == NULL) {
            createCocomacDisplayPage();
            updateCocomacDisplayPage();
         }
         pageWidgetStack->setCurrentWidget(pageCocomacDisplay);
         break;
      case PAGE_NAME_COCOMAC_INFORMATION:
         if (pageCocomacInformation == NULL) {
            createCocomacFileInformationPage();
            updateCocomacInformationPage();
         }
         pageWidgetStack->setCurrentWidget(pageCocomacInformation);
         break;
      case PAGE_NAME_CONTOUR_MAIN:
         if (pageContourMain == NULL) {
            createContourMainPage();
            updateContourMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageContourMain);
         break;
      case PAGE_NAME_CONTOUR_CLASS:
         if (pageContourClass == NULL) {
            createContourClassPage();
            updateContourClassPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageContourClass);
         break;
      case PAGE_NAME_CONTOUR_COLOR:
         if (pageContourColor == NULL) {
            createContourColorPage();
            updateContourColorPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageContourColor);
         break;
      case PAGE_NAME_DEFORMATION_FIELD:
         if (pageDeformationField == NULL) {
            createDeformationFieldPage();
            updateDeformationFieldPage();
         }
         pageWidgetStack->setCurrentWidget(pageDeformationField);
         break;
      case PAGE_NAME_FOCI_MAIN:
         if (pageFociMain == NULL) {
            createFociMainPage();
            updateFociMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageFociMain);
         break;
      case PAGE_NAME_FOCI_CLASS:
         if (pageFociClass == NULL) {
            createFociClassPage();
            updateFociClassPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageFociClass);
         break;
      case PAGE_NAME_FOCI_COLOR:
         if (pageFociColor == NULL) {
            createFociColorPage();
            updateFociColorPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageFociColor);
         break;
      case PAGE_NAME_FOCI_KEYWORD:
         if (pageFociKeyword == NULL) {
            createFociKeywordPage();
            updateFociKeywordPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageFociKeyword);
         break;
      case PAGE_NAME_FOCI_NAME:
         if (pageFociName == NULL) {
            createFociNamePage();
            updateFociNamePage(true);
         }
         pageWidgetStack->setCurrentWidget(pageFociName);
         break;
      case PAGE_NAME_FOCI_SEARCH:
         if (pageFociSearch == NULL) {
            createFociSearchPage();
            updateFociSearchPage(true);
         }
         pageFociSearch->updateGeometry();
         pageWidgetStack->setCurrentWidget(pageFociSearch);
         break;
      case PAGE_NAME_FOCI_TABLE:
         if (pageFociTable == NULL) {
            createFociTablePage();
            updateFociTablePage(true);
         }
         pageWidgetStack->setCurrentWidget(pageFociTable);
         break;
      case PAGE_NAME_GEODESIC:
         if (pageGeodesicMain == NULL) {
            createGeodesicPage();
            updateGeodesicItems();
         }
         pageWidgetStack->setCurrentWidget(pageGeodesicMain);
         break;
      case PAGE_NAME_IMAGES:
         if (pageImages == NULL) {
            createImagesPage();
            updateImagesItems();
         }
         pageWidgetStack->setCurrentWidget(pageImages);
         break;
      case PAGE_NAME_LATLON:
         if (pageLatLonMain == NULL) {
            createLatLonPage();
            updateLatLonItems();
         }
         pageWidgetStack->setCurrentWidget(pageLatLonMain);
         break;
      case PAGE_NAME_METRIC_MISCELLANEOUS:
         if (pageMetricMiscellaneous == NULL) {
            createMetricMiscellaneousPage();
            updateMetricMiscellaneousPage();
         }
         pageWidgetStack->setCurrentWidget(pageMetricMiscellaneous);
         break;
      case PAGE_NAME_METRIC_SELECTION:
         if (pageMetricSelection == NULL) {
            createMetricSelectionPage();
            updateMetricSelectionPage();
         }
         pageWidgetStack->setCurrentWidget(pageMetricSelection);
         enableSurfaceModelIndexComboBox = true;
         enableSurfaceModelOverlayNumberComboBox = true;
         metricApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(false);
         break;
      case PAGE_NAME_METRIC_SETTINGS:
         if (pageMetricSettings == NULL) {
            createMetricSettingsPage();
            updateMetricSettingsPage();
         }
         updateMetricSettingsThresholdColumnComboBox();
         pageWidgetStack->setCurrentWidget(pageMetricSettings);
         break;
      case PAGE_NAME_MODELS_MAIN:
         if (pageModelsMain == NULL) {
            createModelsMainPage();
            updateModelMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageModelsMain);
         break;
      case PAGE_NAME_MODELS_SETTINGS:
         if (pageModelsSettings == NULL) {
            createModelsSettingsPage();
            updateModelSettingsPage();
         }
         pageWidgetStack->setCurrentWidget(pageModelsSettings);
         break;
      case PAGE_NAME_PAINT_MAIN:
         if (pagePaintMain == NULL) {
            createPaintMainPage();
            updatePaintMainPage();
         }
         pageWidgetStack->setCurrentWidget(pagePaintMain);
         break;
      case PAGE_NAME_PAINT_COLUMN:
         if (pagePaintColumn == NULL) {
            createPaintColumnPage();
            updatePaintColumnPage();
         }
         pageWidgetStack->setCurrentWidget(pagePaintColumn);
         enableSurfaceModelIndexComboBox = true;
         enableSurfaceModelOverlayNumberComboBox = true;
         paintApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(false);
         break;
      case PAGE_NAME_PAINT_NAMES:
         if (pagePaintName == NULL) {
            createPaintNamePage();
            updatePaintNamePage();
         }
         pageWidgetStack->setCurrentWidget(pagePaintName);
         break;
      case PAGE_NAME_PROB_ATLAS_SURFACE_MAIN:
         if (pageProbAtlasSurfaceMain == NULL) {
            createProbAtlasSurfaceMainPage();
            updateProbAtlasSurfaceMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasSurfaceMain);
         enableSurfaceModelIndexComboBox = true;
         probAtlasSurfaceApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(false);
         break;
      case PAGE_NAME_PROB_ATLAS_SURFACE_AREA:
         if (pageProbAtlasSurfaceArea == NULL) {
            createProbAtlasSurfaceAreaPage();
            updateProbAtlasSurfaceAreaPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasSurfaceArea);
         break;
      case PAGE_NAME_PROB_ATLAS_SURFACE_CHANNEL:
         if (pageProbAtlasSurfaceChannel == NULL) {
            createProbAtlasSurfaceChannelPage();
            updateProbAtlasSurfaceChannelPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasSurfaceChannel);
         break;
      case PAGE_NAME_PROB_ATLAS_VOLUME_MAIN:
         if (pageProbAtlasVolumeMain == NULL) {
            createProbAtlasVolumeMainPage();
            updateProbAtlasVolumeMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasVolumeMain);
         break;
      case PAGE_NAME_PROB_ATLAS_VOLUME_AREA:
         if (pageProbAtlasVolumeArea == NULL) {
            createProbAtlasVolumeAreaPage();
            updateProbAtlasVolumeAreaPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasVolumeArea);
         break;
      case PAGE_NAME_PROB_ATLAS_VOLUME_CHANNEL:
         if (pageProbAtlasVolumeChannel == NULL) {
            createProbAtlasVolumeChannelPage();
            updateProbAtlasVolumeChannelPage(true);
         }
         pageWidgetStack->setCurrentWidget(pageProbAtlasVolumeChannel);
         break;
      case PAGE_NAME_REGION:
         if (pageRegionMain == NULL) {
            createRegionPage();
            updateRegionItems();
         }
         pageWidgetStack->setCurrentWidget(pageRegionMain);
         break;
      case PAGE_NAME_RGB_PAINT_MAIN:
         if (pageRgbPaintMain == NULL) {
            createRgbPaintMainPage();
            updateRgbPaintMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageRgbPaintMain);
         break;
      case PAGE_NAME_RGB_PAINT_SELECTION:
         if (pageRgbPaintSelection == NULL) {
            createRgbPaintSelectionPage();
            updateRgbPaintSelectionPage();
         }
         pageWidgetStack->setCurrentWidget(pageRgbPaintSelection);
         enableSurfaceModelIndexComboBox = true;
         enableSurfaceModelOverlayNumberComboBox = true;
         rgbApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(false);
         break;
      case PAGE_NAME_SCENE:
         if (pageSceneMain == NULL) {
            createScenePage();
            updateSceneItems();
         }
         sceneListBox->blockSignals(true);
         pageWidgetStack->setCurrentWidget(pageSceneMain);
         sceneListBox->blockSignals(false);
         break;
      case PAGE_NAME_SECTION_MAIN:
         if (pageSectionMain == NULL) {
            createSectionMainPage();
            updateSectionMainPage();
         }
         pageWidgetStack->setCurrentWidget(pageSectionMain);
         break;
      case PAGE_NAME_SHAPE_SELECTION:
         if (pageSurfaceShapeSelections == NULL) {
            createShapeSelectionPage();
            updateShapeSelections();
         }
         pageWidgetStack->setCurrentWidget(pageSurfaceShapeSelections);
         enableSurfaceModelIndexComboBox = true;
         enableSurfaceModelOverlayNumberComboBox = true;
         shapeApplySelectionToLeftAndRightStructuresFlagCheckBox->setHidden(false);
         break;
      case PAGE_NAME_SHAPE_SETTINGS:
         if (pageSurfaceShapeSettings == NULL) {
            createShapeSettingsPage();
            updateShapeSettings();
         }
         updateShapeSettingsColorMappingComboBox();
         pageWidgetStack->setCurrentWidget(pageSurfaceShapeSettings);
         break;
      case PAGE_NAME_SURFACE_AND_VOLUME:
         if (pageSurfaceAndVolume == NULL) {
            createSurfaceAndVolumePage();
            updateSurfaceAndVolumeItems();
         }
         pageWidgetStack->setCurrentWidget(pageSurfaceAndVolume);
         break;
      case PAGE_NAME_SURFACE_CLIPPING:
         if (pageSurfaceClipping == NULL) {
            createSurfaceClippingPage();
            updateSurfaceClippingPage();
         }
         pageWidgetStack->setCurrentWidget(pageSurfaceClipping);
         break;
      case PAGE_NAME_SURFACE_MISC:
         if (pageSurfaceMisc == NULL) {
            createSurfaceMiscPage();
            updateMiscItems();
         }
         pageWidgetStack->setCurrentWidget(pageSurfaceMisc);
         break;
      case PAGE_NAME_VECTOR_SELECTION:
         if (pageVectorSelection == NULL) {
            createVectorSelectionPage();
            updateVectorSelectionPage();
         }
         pageWidgetStack->setCurrentWidget(pageVectorSelection);
         break;
      case PAGE_NAME_VECTOR_SETTINGS:
         if (pageVectorSettings == NULL) {
            createVectorSettingsPage();
            updateVectorSettingsPage();
         }
         pageWidgetStack->setCurrentWidget(pageVectorSettings);
         break;
      case PAGE_NAME_TOPOGRAPHY:
         if (pageTopography == NULL) {
            createTopographyPage();
            updateTopographyItems();
         }
         pageWidgetStack->setCurrentWidget(pageTopography);
         enableSurfaceModelIndexComboBox = true;
         break;
      case PAGE_NAME_VOLUME_SELECTION:
         if (pageVolumeSelection == NULL) {
            createOverlayUnderlayVolumeSelectionPage();
            updateVolumeSelectionPage();
         }
         pageWidgetStack->setCurrentWidget(pageVolumeSelection);
         break;
      case PAGE_NAME_VOLUME_SETTINGS:
         if (pageVolumeSettings == NULL) {
            createOverlayUnderlayVolumeSettingsPage();
            updateVolumeSettingsPage();
         }
         pageWidgetStack->setCurrentWidget(pageVolumeSettings);
         break;
      case PAGE_NAME_VOLUME_SURFACE_OUTLINE:
         if (pageVolumeSurfaceOutline == NULL) {
            createOverlayUnderlayVolumeSurfaceOutlinePage();
            updateVolumeSurfaceOutlinePage();
         }
         pageWidgetStack->setCurrentWidget(pageVolumeSurfaceOutline);
         break;
      case PAGE_NAME_INVALID:
         break;
   }
   
   //
   // Should pages visited be updated
   //
   if (updatePagesVisited) {
      //
      // Remove any pages "forward" of the current page index
      //
      const int numPages = static_cast<int>(pagesVisited.size());
      if ((pagesVisitedIndex >= 0) &&
          (pagesVisitedIndex < (numPages - 1))) {
         pagesVisited.erase(pagesVisited.begin() + pagesVisitedIndex + 1,
                            pagesVisited.end());
      }
      
      //
      // Add new pages
      //
      pagesVisited.push_back(pageName);
      pagesVisitedIndex = static_cast<int>(pagesVisited.size() - 1);
   }
   
   if (DebugControl::getDebugOn()) {
      std::cout << "PAGES VISITED TRACKING" << std::endl;
      for (int i = 0; i < static_cast<int>(pagesVisited.size()); i++) {
         std::cout << i
                   << ": " 
                   << getPageName(pagesVisited[i]).toAscii().constData();
         if (pagesVisitedIndex == i) {
            std::cout << " <==== current page visited index";
         }
         std::cout << std::endl;
      }
      std::cout << std::endl;
   }


   surfaceModelGroupBox->setHidden((enableSurfaceModelIndexComboBox == false) &&
                                   (enableSurfaceModelOverlayNumberComboBox == false));
   overlayNumberWidgetGroup->setHidden(enableSurfaceModelOverlayNumberComboBox == false);
   
   //
   // Scroll to top of page and left
   //
   QScrollBar* vertScrollBar = widgetStackScrollArea->verticalScrollBar();
   vertScrollBar->setValue(vertScrollBar->minimum());
   QScrollBar* horizScrollBar = widgetStackScrollArea->horizontalScrollBar();
   horizScrollBar->setValue(horizScrollBar->minimum());
   
   //
   // Enable/Disable back and forward buttons
   //
   pageBackToolButton->setEnabled(pagesVisitedIndex > 0);
   pageForwardToolButton->setEnabled(pagesVisitedIndex 
                                     < static_cast<int>((pagesVisited.size() - 1)));
                                     
   if (enableSurfaceModelOverlayNumberComboBox) {
      initializeSelectedOverlay(pageName);
   }
}


Generated by  Doxygen 1.6.0   Back to index