From 1da509166a87d4a299e07e8c5bc25ea5af055315 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Mon, 26 Jun 2023 14:28:46 +0200 Subject: [PATCH] Improve CmdFeature base class Add default implementation of isEnabled() and add const --- .../RicNewAnalysisPlotFeature.cpp | 2 +- .../RicNewAnalysisPlotFeature.h | 2 +- .../RicNewPlotDataFilterFeature.cpp | 2 +- .../RicNewPlotDataFilterFeature.h | 2 +- .../RicCreateReachCircleAnnotationFeature.cpp | 2 +- .../RicCreateReachCircleAnnotationFeature.h | 2 +- .../RicCreateTextAnnotationFeature.cpp | 2 +- .../RicCreateTextAnnotationFeature.h | 2 +- ...RicCreateTextAnnotationIn3dViewFeature.cpp | 8 --- .../RicCreateTextAnnotationIn3dViewFeature.h | 1 - ...eUserDefinedPolylinesAnnotationFeature.cpp | 2 +- ...ateUserDefinedPolylinesAnnotationFeature.h | 2 +- .../RicImportPolylinesAnnotationFeature.cpp | 2 +- .../RicImportPolylinesAnnotationFeature.h | 2 +- .../RicCloseProjectFeature.cpp | 8 --- .../RicCloseProjectFeature.h | 1 - .../RicEditPreferencesFeature.cpp | 8 --- .../RicEditPreferencesFeature.h | 1 - .../RicExitApplicationFeature.cpp | 8 --- .../RicExitApplicationFeature.h | 1 - ...RicExportObjectAndFieldKeywordsFeature.cpp | 8 --- .../RicExportObjectAndFieldKeywordsFeature.h | 1 - .../ApplicationCommands/RicHelpFeatures.cpp | 56 ------------------- .../ApplicationCommands/RicHelpFeatures.h | 7 --- .../RicLaunchRegressionTestsFeature.cpp | 16 ------ .../RicLaunchRegressionTestsFeature.h | 2 - .../RicLaunchUnitTestsFeature.cpp | 8 --- .../RicLaunchUnitTestsFeature.h | 1 - .../RicOpenInTextEditorFeature.cpp | 8 --- .../RicOpenInTextEditorFeature.h | 1 - .../RicOpenLastUsedFileFeature.cpp | 8 --- .../RicOpenLastUsedFileFeature.h | 1 - .../RicOpenProjectFeature.cpp | 8 --- .../RicOpenProjectFeature.h | 1 - .../RicRunCommandFileFeature.cpp | 8 --- .../RicRunCommandFileFeature.h | 1 - .../RicSaveProjectAsFeature.cpp | 8 --- .../RicSaveProjectAsFeature.h | 1 - .../RicSaveProjectFeature.cpp | 8 --- .../RicSaveProjectFeature.h | 1 - .../RicSaveProjectNoGlobalPathsFeature.cpp | 8 --- .../RicSaveProjectNoGlobalPathsFeature.h | 1 - .../RicShowClassNamesFeature.cpp | 10 +--- .../RicShowClassNamesFeature.h | 3 +- .../RicShowMainWindowFeature.cpp | 8 --- .../RicShowMainWindowFeature.h | 1 - .../RicShowMemoryCleanupDialogFeature.cpp | 8 --- .../RicShowMemoryCleanupDialogFeature.h | 1 - .../RicShowPlotDataCtxFeature.cpp | 2 +- .../RicShowPlotDataCtxFeature.h | 2 +- .../RicShowPlotDataFeature.cpp | 4 +- .../RicShowPlotDataFeature.h | 4 +- .../RicShowPlotWindowFeature.cpp | 8 --- .../RicShowPlotWindowFeature.h | 1 - .../RicTileWindowsFeature.cpp | 24 ++++---- .../RicTileWindowsFeature.h | 24 ++++---- .../RicNewPolygonFilter3dviewFeature.cpp | 8 --- .../RicNewPolygonFilter3dviewFeature.h | 1 - .../RicNewPolygonFilterFeature.cpp | 8 --- .../RicNewPolygonFilterFeature.h | 1 - .../RicNewRangeFilterSlice3dviewFeature.cpp | 2 +- .../RicNewRangeFilterSlice3dviewFeature.h | 2 +- .../RicNewRangeFilterSliceFeature.cpp | 8 --- .../RicNewRangeFilterSliceFeature.h | 1 - .../RicNewUserDefinedFilterFeature.cpp | 8 --- .../RicNewUserDefinedFilterFeature.h | 1 - .../RicCopyStandardLegendFeature.cpp | 2 +- .../RicCopyStandardLegendFeature.h | 4 +- .../RicImportColorCategoriesFeature.cpp | 2 +- .../RicImportColorCategoriesFeature.h | 2 +- .../RicInsertColorLegendFeature.cpp | 2 +- .../RicInsertColorLegendFeature.h | 4 +- .../RicInsertColorLegendItemFeature.cpp | 2 +- .../RicInsertColorLegendItemFeature.h | 4 +- .../RicDeleteValveTemplateFeature.cpp | 2 +- .../RicDeleteValveTemplateFeature.h | 2 +- .../RicEditPerforationCollectionFeature.cpp | 2 +- .../RicEditPerforationCollectionFeature.h | 2 +- .../RicExportFishbonesLateralsFeature.cpp | 2 +- .../RicExportFishbonesLateralsFeature.h | 2 +- ...mportEnsembleFractureStatisticsFeature.cpp | 8 --- ...cImportEnsembleFractureStatisticsFeature.h | 1 - ...NewFishbonesSubsAtMeasuredDepthFeature.cpp | 2 +- ...icNewFishbonesSubsAtMeasuredDepthFeature.h | 2 +- .../RicNewFishbonesSubsFeature.cpp | 2 +- .../RicNewFishbonesSubsFeature.h | 2 +- ...forationIntervalAtMeasuredDepthFeature.cpp | 2 +- ...erforationIntervalAtMeasuredDepthFeature.h | 2 +- .../RicNewPerforationIntervalFeature.cpp | 2 +- .../RicNewPerforationIntervalFeature.h | 4 +- .../RicNewStimPlanModelPlotFeature.cpp | 8 --- .../RicNewStimPlanModelPlotFeature.h | 1 - .../RicNewValveAtMeasuredDepthFeature.cpp | 2 +- .../RicNewValveAtMeasuredDepthFeature.h | 2 +- .../CompletionCommands/RicNewValveFeature.cpp | 2 +- .../CompletionCommands/RicNewValveFeature.h | 2 +- .../RicNewValveTemplateFeature.cpp | 8 --- .../RicNewValveTemplateFeature.h | 1 - ...lPathImportPerforationIntervalsFeature.cpp | 2 +- ...ellPathImportPerforationIntervalsFeature.h | 2 +- ...portCompletionsForTemporaryLgrsFeature.cpp | 2 +- ...ExportCompletionsForTemporaryLgrsFeature.h | 2 +- ...rtCompletionsForVisibleSimWellsFeature.cpp | 2 +- ...portCompletionsForVisibleSimWellsFeature.h | 4 +- ...tCompletionsForVisibleWellPathsFeature.cpp | 2 +- ...ortCompletionsForVisibleWellPathsFeature.h | 2 +- ...icExportCompletionsWellSegmentsFeature.cpp | 2 +- .../RicExportCompletionsWellSegmentsFeature.h | 2 +- ...RicWellPathExportCompletionDataFeature.cpp | 2 +- .../RicWellPathExportCompletionDataFeature.h | 4 +- .../RicNewCorrelationMatrixPlotFeature.cpp | 2 +- .../RicNewCorrelationMatrixPlotFeature.h | 2 +- .../RicNewCorrelationPlotFeature.cpp | 2 +- .../RicNewCorrelationPlotFeature.h | 2 +- .../RicNewCorrelationReportPlotFeature.cpp | 2 +- .../RicNewCorrelationReportPlotFeature.h | 2 +- .../RicNewParameterResultCrossPlotFeature.cpp | 2 +- .../RicNewParameterResultCrossPlotFeature.h | 2 +- .../RicAppendIntersectionFeature.cpp | 8 --- .../RicAppendIntersectionFeature.h | 1 - ...ppendSeparateIntersectionResultFeature.cpp | 8 --- ...cAppendSeparateIntersectionResultFeature.h | 1 - ...pyIntersectionsToAllViewsInCaseFeature.cpp | 2 +- ...CopyIntersectionsToAllViewsInCaseFeature.h | 2 +- .../RicNewAzimuthDipIntersectionFeature.cpp | 8 --- .../RicNewAzimuthDipIntersectionFeature.h | 1 - .../RicNewPolylineIntersectionFeature.cpp | 8 --- .../RicNewPolylineIntersectionFeature.h | 1 - .../RicNewSimWellIntersectionFeature.cpp | 8 --- .../RicNewSimWellIntersectionFeature.h | 1 - .../RicNewWellPathIntersectionFeature.cpp | 8 --- .../RicNewWellPathIntersectionFeature.h | 1 - .../RicEclipseWellShowFeatures.cpp | 24 ++++---- .../EclipseWell/RicEclipseWellShowFeatures.h | 24 ++++---- .../RicAddEclipseInputPropertyFeature.cpp | 2 +- .../RicAddEclipseInputPropertyFeature.h | 2 +- .../RicAddGridCalculationFeature.cpp | 8 --- .../RicAddGridCalculationFeature.h | 1 - ...ApplyPropertyFilterAsCellResultFeature.cpp | 2 +- ...icApplyPropertyFilterAsCellResultFeature.h | 2 +- .../RicComputeStatisticsFeature.cpp | 2 +- .../RicComputeStatisticsFeature.h | 4 +- ...RicCreateGridCaseGroupFromFilesFeature.cpp | 8 --- .../RicCreateGridCaseGroupFromFilesFeature.h | 1 - .../RicEclipseCaseNewGroupFeature.cpp | 2 +- .../RicEclipseCaseNewGroupFeature.h | 2 +- .../RicEclipseHideFaultFeature.cpp | 2 +- .../RicEclipseHideFaultFeature.h | 2 +- .../RicEclipsePropertyFilterInsertFeature.cpp | 2 +- .../RicEclipsePropertyFilterInsertFeature.h | 2 +- .../RicEclipsePropertyFilterNewFeature.cpp | 2 +- .../RicEclipsePropertyFilterNewFeature.h | 2 +- ...cEclipsePropertyFilterNewInViewFeature.cpp | 2 +- ...RicEclipsePropertyFilterNewInViewFeature.h | 2 +- .../RicEclipseShowOnlyFaultFeature.cpp | 2 +- .../RicEclipseShowOnlyFaultFeature.h | 2 +- .../RicImportEclipseCaseFeature.cpp | 8 --- .../RicImportEclipseCaseFeature.h | 1 - ...ImportEclipseCaseTimeStepFilterFeature.cpp | 8 --- ...icImportEclipseCaseTimeStepFilterFeature.h | 1 - .../RicImportEclipseCasesFeature.cpp | 8 --- .../RicImportEclipseCasesFeature.h | 1 - .../RicImportInputEclipseCaseFeature.cpp | 8 --- .../RicImportInputEclipseCaseFeature.h | 1 - .../RicImportRoffCaseFeature.cpp | 8 --- .../RicImportRoffCaseFeature.h | 1 - .../RicNewStatisticsCaseFeature.cpp | 2 +- .../RicNewStatisticsCaseFeature.h | 6 +- .../EclipseCommands/RicRenameCaseFeature.cpp | 2 +- .../EclipseCommands/RicRenameCaseFeature.h | 2 +- .../RicAdvancedSnapshotExportFeature.cpp | 2 +- .../RicAdvancedSnapshotExportFeature.h | 2 +- .../RicCreateDepthAdjustedLasFilesFeature.cpp | 8 --- .../RicCreateDepthAdjustedLasFilesFeature.h | 1 - .../ExportCommands/RicExportCarfin.cpp | 2 +- .../Commands/ExportCommands/RicExportCarfin.h | 2 +- .../RicExportEclipseSectorModelFeature.cpp | 2 +- .../RicExportEclipseSectorModelFeature.h | 2 +- .../ExportCommands/RicExportFaultsFeature.cpp | 2 +- .../ExportCommands/RicExportFaultsFeature.h | 2 +- .../ExportCommands/RicExportLgrFeature.cpp | 2 +- .../ExportCommands/RicExportLgrFeature.h | 2 +- .../RicExportSelectedWellPathsFeature.cpp | 2 +- .../RicExportSelectedWellPathsFeature.h | 2 +- .../RicExportToLasFileFeature.cpp | 2 +- .../RicExportToLasFileFeature.h | 2 +- .../RicExportVisibleWellPathsFeature.cpp | 2 +- .../RicExportVisibleWellPathsFeature.h | 2 +- .../RicSaveEclipseInputPropertyFeature.cpp | 2 +- .../RicSaveEclipseInputPropertyFeature.h | 2 +- ...RicSaveEclipseInputVisibleCellsFeature.cpp | 4 +- .../RicSaveEclipseInputVisibleCellsFeature.h | 4 +- ...aveEclipseResultAsInputPropertyFeature.cpp | 2 +- ...cSaveEclipseResultAsInputPropertyFeature.h | 2 +- .../RicSnapshotAllPlotsToFileFeature.cpp | 8 --- .../RicSnapshotAllPlotsToFileFeature.h | 1 - .../RicSnapshotAllViewsToFileFeature.cpp | 8 --- .../RicSnapshotAllViewsToFileFeature.h | 1 - .../RicSnapshotViewToClipboardFeature.cpp | 8 --- .../RicSnapshotViewToClipboardFeature.h | 1 - .../RicSnapshotViewToFileFeature.cpp | 8 --- .../RicSnapshotViewToFileFeature.h | 1 - .../RicSnapshotViewToPdfFeature.cpp | 8 --- .../RicSnapshotViewToPdfFeature.h | 1 - ...ddStoredFlowCharacteristicsPlotFeature.cpp | 2 +- ...cAddStoredFlowCharacteristicsPlotFeature.h | 2 +- .../RicAddStoredWellAllocationPlotFeature.cpp | 2 +- .../RicAddStoredWellAllocationPlotFeature.h | 2 +- .../RicPlotProductionRateFeature.cpp | 2 +- .../RicPlotProductionRateFeature.h | 2 +- .../RicShowContributingWellsFeature.cpp | 2 +- .../RicShowContributingWellsFeature.h | 2 +- ...icShowContributingWellsFromPlotFeature.cpp | 2 +- .../RicShowContributingWellsFromPlotFeature.h | 2 +- .../RicShowCumulativePhasePlotFeature.cpp | 2 +- .../RicShowCumulativePhasePlotFeature.h | 2 +- .../RicShowFlowCharacteristicsPlotFeature.cpp | 2 +- .../RicShowFlowCharacteristicsPlotFeature.h | 2 +- .../RicShowTotalAllocationDataFeature.cpp | 2 +- .../RicShowTotalAllocationDataFeature.h | 2 +- .../RicShowWellAllocationPlotFeature.cpp | 2 +- .../RicShowWellAllocationPlotFeature.h | 2 +- ...vertAllFractureTemplatesToFieldFeature.cpp | 8 --- ...onvertAllFractureTemplatesToFieldFeature.h | 1 - ...ertAllFractureTemplatesToMetricFeature.cpp | 8 --- ...nvertAllFractureTemplatesToMetricFeature.h | 1 - ...licateTemplateInOtherUnitSystemFeature.cpp | 8 --- ...uplicateTemplateInOtherUnitSystemFeature.h | 1 - .../RicCreateMultipleFracturesFeature.cpp | 2 +- .../RicCreateMultipleFracturesFeature.h | 2 +- .../RicDeleteOptionItemFeature.cpp | 2 +- .../RicDeleteOptionItemFeature.h | 2 +- .../RicNewElasticPropertyScalingFeature.cpp | 8 --- .../RicNewElasticPropertyScalingFeature.h | 1 - .../RicNewEllipseFractureTemplateFeature.cpp | 8 --- .../RicNewEllipseFractureTemplateFeature.h | 1 - .../RicNewOptionItemFeature.cpp | 8 --- .../RicNewOptionItemFeature.h | 1 - .../RicNewSimWellFractureAtPosFeature.cpp | 2 +- .../RicNewSimWellFractureAtPosFeature.h | 2 +- .../RicNewSimWellFractureFeature.cpp | 2 +- .../RicNewSimWellFractureFeature.h | 2 +- .../RicNewStimPlanFractureTemplateFeature.cpp | 8 --- .../RicNewStimPlanFractureTemplateFeature.h | 1 - .../RicNewStimPlanModelFeature.cpp | 2 +- .../RicNewStimPlanModelFeature.h | 2 +- .../RicNewStimPlanModelTemplateFeature.cpp | 8 --- .../RicNewStimPlanModelTemplateFeature.h | 1 - .../RicNewThermalFractureTemplateFeature.cpp | 8 --- .../RicNewThermalFractureTemplateFeature.h | 1 - .../RicNewWellPathFractureAtPosFeature.cpp | 8 --- .../RicNewWellPathFractureAtPosFeature.h | 1 - .../RicNewWellPathFractureFeature.cpp | 2 +- .../RicNewWellPathFractureFeature.h | 2 +- ...icNewWellPathStimPlanModelAtPosFeature.cpp | 8 --- .../RicNewWellPathStimPlanModelAtPosFeature.h | 1 - .../RicPasteEllipseFractureFeature.cpp | 2 +- .../RicPasteEllipseFractureFeature.h | 2 +- .../RicPasteStimPlanFractureFeature.cpp | 2 +- .../RicPasteStimPlanFractureFeature.h | 2 +- ...hermalFractureUsingTemplateDataFeature.cpp | 2 +- ...eThermalFractureUsingTemplateDataFeature.h | 2 +- .../RicGeoMechCopyCaseFeature.cpp | 8 --- .../RicGeoMechCopyCaseFeature.h | 1 - .../RicGeoMechPropertyFilterInsertFeature.cpp | 2 +- .../RicGeoMechPropertyFilterInsertFeature.h | 2 +- .../RicGeoMechPropertyFilterNewFeature.cpp | 2 +- .../RicGeoMechPropertyFilterNewFeature.h | 2 +- ...cGeoMechPropertyFilterNewInViewFeature.cpp | 2 +- ...RicGeoMechPropertyFilterNewInViewFeature.h | 2 +- .../RicImportGeoMechCaseFeature.cpp | 8 --- .../RicImportGeoMechCaseFeature.h | 1 - ...ImportGeoMechCaseTimeStepFilterFeature.cpp | 8 --- ...icImportGeoMechCaseTimeStepFilterFeature.h | 1 - .../RicNewWellIntegrityAnalysisFeature.cpp | 2 +- .../RicNewWellIntegrityAnalysisFeature.h | 2 +- .../RicRunWellIntegrityAnalysisFeature.cpp | 8 --- .../RicRunWellIntegrityAnalysisFeature.h | 1 - .../RicCreateGridCrossPlotDataSetFeature.cpp | 2 +- .../RicCreateGridCrossPlotDataSetFeature.h | 2 +- .../RicCreateGridCrossPlotFeature.cpp | 8 --- .../RicCreateGridCrossPlotFeature.h | 1 - ...icCreateSaturationPressurePlotsFeature.cpp | 8 --- .../RicCreateSaturationPressurePlotsFeature.h | 1 - .../RicPasteGridCrossPlotDataSetFeature.cpp | 2 +- .../RicPasteGridCrossPlotDataSetFeature.h | 2 +- ...RicSwapGridCrossPlotDataSetAxesFeature.cpp | 2 +- .../RicSwapGridCrossPlotDataSetAxesFeature.h | 2 +- ...loLensAutoExportToSharingServerFeature.cpp | 4 +- ...HoloLensAutoExportToSharingServerFeature.h | 4 +- ...ensCreateDummyFileBackedSessionFeature.cpp | 2 +- ...oLensCreateDummyFileBackedSessionFeature.h | 2 +- .../RicHoloLensCreateSessionFeature.cpp | 2 +- .../RicHoloLensCreateSessionFeature.h | 2 +- .../RicHoloLensExportToFolderFeature.cpp | 8 --- .../RicHoloLensExportToFolderFeature.h | 1 - ...icHoloLensExportToSharingServerFeature.cpp | 2 +- .../RicHoloLensExportToSharingServerFeature.h | 2 +- .../RicHoloLensTerminateSessionFeature.cpp | 2 +- .../RicHoloLensTerminateSessionFeature.h | 2 +- .../RicAppendIntersectionBoxFeature.cpp | 2 +- .../RicAppendIntersectionBoxFeature.h | 2 +- .../RicIntersectionBoxAtPosFeature.cpp | 8 --- .../RicIntersectionBoxAtPosFeature.h | 1 - .../RicIntersectionBoxXSliceFeature.cpp | 8 --- .../RicIntersectionBoxXSliceFeature.h | 1 - .../RicIntersectionBoxYSliceFeature.cpp | 8 --- .../RicIntersectionBoxYSliceFeature.h | 1 - .../RicIntersectionBoxZSliceFeature.cpp | 8 --- .../RicIntersectionBoxZSliceFeature.h | 1 - .../RicNewIntersectionViewFeature.cpp | 2 +- .../RicNewIntersectionViewFeature.h | 2 +- .../RicToggleMeasurementModeFeature.cpp | 6 +- .../RicToggleMeasurementModeFeature.h | 6 +- .../RicAddScriptPathFeature.cpp | 2 +- .../RicAddScriptPathFeature.h | 2 +- .../RicDeleteScriptPathFeature.cpp | 2 +- .../RicDeleteScriptPathFeature.h | 2 +- .../RicEditScriptFeature.cpp | 2 +- .../RicEditScriptFeature.h | 2 +- .../RicExecuteLastUsedScriptFeature.cpp | 8 --- .../RicExecuteLastUsedScriptFeature.h | 1 - .../RicExecuteScriptFeature.cpp | 2 +- .../RicExecuteScriptFeature.h | 2 +- .../RicExecuteScriptForCasesFeature.cpp | 2 +- .../RicExecuteScriptForCasesFeature.h | 2 +- .../RicNewOctaveScriptFeature.cpp | 2 +- .../RicNewOctaveScriptFeature.h | 2 +- .../RicNewPythonScriptFeature.cpp | 2 +- .../RicNewPythonScriptFeature.h | 2 +- .../RicRefreshScriptsFeature.cpp | 8 --- .../RicRefreshScriptsFeature.h | 1 - .../RicCopyReferencesToClipboardFeature.cpp | 2 +- .../RicCopyReferencesToClipboardFeature.h | 2 +- .../RicCutReferencesToClipboardFeature.cpp | 2 +- .../RicCutReferencesToClipboardFeature.h | 2 +- .../RicPasteEclipseCasesFeature.cpp | 2 +- .../RicPasteEclipseCasesFeature.h | 2 +- .../RicPasteEclipseViewsFeature.cpp | 2 +- .../RicPasteEclipseViewsFeature.h | 2 +- .../RicPasteGeoMechViewsFeature.cpp | 2 +- .../RicPasteGeoMechViewsFeature.h | 2 +- .../RicPasteIntersectionsFeature.cpp | 2 +- .../RicPasteIntersectionsFeature.h | 2 +- ...icAppendSummaryCurvesForObjectsFeature.cpp | 2 +- .../RicAppendSummaryCurvesForObjectsFeature.h | 2 +- ...ummaryCurvesForSummaryAddressesFeature.cpp | 2 +- ...dSummaryCurvesForSummaryAddressesFeature.h | 2 +- ...endSummaryCurvesForSummaryCasesFeature.cpp | 2 +- ...ppendSummaryCurvesForSummaryCasesFeature.h | 2 +- ...RicAppendSummaryPlotsForObjectsFeature.cpp | 2 +- .../RicAppendSummaryPlotsForObjectsFeature.h | 2 +- ...SummaryPlotsForSummaryAddressesFeature.cpp | 2 +- ...ndSummaryPlotsForSummaryAddressesFeature.h | 2 +- ...pendSummaryPlotsForSummaryCasesFeature.cpp | 2 +- ...AppendSummaryPlotsForSummaryCasesFeature.h | 2 +- .../RicNewEmptySummaryMultiPlotFeature.cpp | 8 --- .../RicNewEmptySummaryMultiPlotFeature.h | 1 - .../RicNewMultiPlotFeature.cpp | 2 +- .../RicNewMultiPlotFeature.h | 2 +- .../RicNewSummaryMultiPlotFeature.cpp | 2 +- .../RicNewSummaryMultiPlotFeature.h | 8 +-- ...wSummaryMultiPlotFromDataVectorFeature.cpp | 2 +- ...NewSummaryMultiPlotFromDataVectorFeature.h | 2 +- .../RicNewSummaryPlotFromCurveFeature.cpp | 8 --- .../RicNewSummaryPlotFromCurveFeature.h | 2 - ...RicNewSummaryPlotFromDataVectorFeature.cpp | 2 +- .../RicNewSummaryPlotFromDataVectorFeature.h | 2 +- .../RicSplitMultiPlotFeature.cpp | 4 +- .../RicSplitMultiPlotFeature.h | 4 +- ...RicCreateMultiPlotFromSelectionFeature.cpp | 8 --- .../RicCreateMultiPlotFromSelectionFeature.h | 1 - .../RicCreateNewPlotFromTemplateFeature.cpp | 2 +- .../RicCreateNewPlotFromTemplateFeature.h | 2 +- ...reatePlotFromTemplateByShortcutFeature.cpp | 8 --- ...cCreatePlotFromTemplateByShortcutFeature.h | 1 - .../RicDeletePlotTemplateFeature.cpp | 2 +- .../RicDeletePlotTemplateFeature.h | 2 +- .../RicReloadPlotTemplatesFeature.cpp | 8 --- .../RicReloadPlotTemplatesFeature.h | 1 - .../RicRenamePlotTemplateFeature.cpp | 2 +- .../RicRenamePlotTemplateFeature.h | 2 +- .../RicSaveMultiPlotTemplateFeature.cpp | 2 +- .../RicSaveMultiPlotTemplateFeature.h | 2 +- .../RicSetAsDefaultTemplateFeature.cpp | 4 +- .../RicSetAsDefaultTemplateFeature.h | 4 +- .../Commands/RicCloseCaseFeature.cpp | 2 +- .../Commands/RicCloseCaseFeature.h | 2 +- .../Commands/RicCloseObservedDataFeature.cpp | 2 +- .../Commands/RicCloseObservedDataFeature.h | 2 +- .../Commands/RicCloseSourSimDataFeature.cpp | 2 +- .../Commands/RicCloseSourSimDataFeature.h | 2 +- .../Commands/RicCloseSummaryCaseFeature.cpp | 2 +- .../Commands/RicCloseSummaryCaseFeature.h | 2 +- ...RicCloseSummaryCaseInCollectionFeature.cpp | 2 +- .../RicCloseSummaryCaseInCollectionFeature.h | 2 +- .../RicConvertGroupToEnsembleFeature.cpp | 2 +- .../RicConvertGroupToEnsembleFeature.h | 2 +- ...icCopyGridStatisticsToClipboardFeature.cpp | 2 +- .../RicCopyGridStatisticsToClipboardFeature.h | 2 +- ...eEnsembleFractureStatisticsPlotFeature.cpp | 8 --- ...ateEnsembleFractureStatisticsPlotFeature.h | 1 - .../RicCreateEnsembleSurfaceFeature.cpp | 8 --- .../RicCreateEnsembleSurfaceFeature.h | 1 - .../RicCreateEnsembleWellLogFeature.cpp | 8 --- .../RicCreateEnsembleWellLogFeature.h | 1 - .../RicCreateGridStatisticsPlotFeature.cpp | 8 --- .../RicCreateGridStatisticsPlotFeature.h | 1 - .../RicCreateSummaryCaseCollectionFeature.cpp | 2 +- .../RicCreateSummaryCaseCollectionFeature.h | 2 +- ...icCreateSurfaceIntersectionBandFeature.cpp | 2 +- .../RicCreateSurfaceIntersectionBandFeature.h | 2 +- ...cCreateSurfaceIntersectionCurveFeature.cpp | 8 --- ...RicCreateSurfaceIntersectionCurveFeature.h | 1 - .../Commands/RicCreateTemporaryLgrFeature.cpp | 2 +- .../Commands/RicCreateTemporaryLgrFeature.h | 2 +- .../Commands/RicDeleteItemFeature.cpp | 2 +- .../Commands/RicDeleteItemFeature.h | 2 +- .../RicDeletePressureTableItemFeature.cpp | 2 +- .../RicDeletePressureTableItemFeature.h | 2 +- .../Commands/RicDeleteSubItemsFeature.cpp | 2 +- .../Commands/RicDeleteSubItemsFeature.h | 2 +- .../RicDeleteSummaryCaseCollectionFeature.cpp | 2 +- .../RicDeleteSummaryCaseCollectionFeature.h | 2 +- .../RicDeleteTemporaryLgrsFeature.cpp | 2 +- .../Commands/RicDeleteTemporaryLgrsFeature.h | 2 +- .../RicDeleteUncheckedSubItemsFeature.cpp | 2 +- .../RicDeleteUncheckedSubItemsFeature.h | 2 +- ...icDeleteWellMeasurementFilePathFeature.cpp | 2 +- .../RicDeleteWellMeasurementFilePathFeature.h | 2 +- .../RicExportContourMapToTextFeature.cpp | 2 +- .../RicExportContourMapToTextFeature.h | 2 +- .../RicExportStimPlanModelToFileFeature.cpp | 8 --- .../RicExportStimPlanModelToFileFeature.h | 1 - .../Commands/RicFlyToObjectFeature.cpp | 2 +- .../Commands/RicFlyToObjectFeature.h | 2 +- .../RicHideIntersectionBoxFeature.cpp | 2 +- .../Commands/RicHideIntersectionBoxFeature.h | 2 +- .../Commands/RicHideIntersectionFeature.cpp | 2 +- .../Commands/RicHideIntersectionFeature.h | 2 +- .../RicImportElasticPropertiesFeature.cpp | 8 --- .../RicImportElasticPropertiesFeature.h | 1 - .../RicImportElementPropertyFeature.cpp | 8 --- .../RicImportElementPropertyFeature.h | 1 - .../Commands/RicImportEnsembleFeature.cpp | 8 --- .../Commands/RicImportEnsembleFeature.h | 1 - .../RicImportEnsembleSurfaceFeature.cpp | 8 --- .../RicImportEnsembleSurfaceFeature.h | 1 - .../RicImportEnsembleWellLogsFeature.cpp | 8 --- .../RicImportEnsembleWellLogsFeature.h | 1 - .../Commands/RicImportFaciesFeature.cpp | 8 --- .../Commands/RicImportFaciesFeature.h | 1 - .../RicImportFormationNamesFeature.cpp | 8 --- .../Commands/RicImportFormationNamesFeature.h | 1 - .../Commands/RicImportGeneralDataFeature.cpp | 8 --- .../Commands/RicImportGeneralDataFeature.h | 1 - ...cImportGridModelFromSummaryCaseFeature.cpp | 8 --- ...RicImportGridModelFromSummaryCaseFeature.h | 1 - ...ImportGridModelFromSummaryCurveFeature.cpp | 8 --- ...icImportGridModelFromSummaryCurveFeature.h | 1 - .../Commands/RicImportObservedDataFeature.cpp | 2 +- .../Commands/RicImportObservedDataFeature.h | 2 +- .../RicImportObservedFmuDataFeature.cpp | 2 +- .../RicImportObservedFmuDataFeature.h | 2 +- .../RicImportPressureDepthDataFeature.cpp | 2 +- .../RicImportPressureDepthDataFeature.h | 2 +- .../RicImportRevealSummaryCaseFeature.cpp | 8 --- .../RicImportRevealSummaryCaseFeature.h | 1 - .../RicImportStimPlanSummaryCaseFeature.cpp | 8 --- .../RicImportStimPlanSummaryCaseFeature.h | 1 - .../Commands/RicImportSummaryCaseFeature.cpp | 8 --- .../Commands/RicImportSummaryCaseFeature.h | 1 - .../Commands/RicImportSummaryCasesFeature.cpp | 8 --- .../Commands/RicImportSummaryCasesFeature.h | 1 - .../Commands/RicImportSummaryGroupFeature.cpp | 8 --- .../Commands/RicImportSummaryGroupFeature.h | 1 - .../Commands/RicNewContourMapViewFeature.cpp | 2 +- .../Commands/RicNewContourMapViewFeature.h | 2 +- .../RicNewCustomObjectiveFunctionFeature.cpp | 8 --- .../RicNewCustomObjectiveFunctionFeature.h | 1 - ...ewCustomObjectiveFunctionWeightFeature.cpp | 8 --- ...cNewCustomObjectiveFunctionWeightFeature.h | 1 - .../RicNewPressureTableItemFeature.cpp | 2 +- .../Commands/RicNewPressureTableItemFeature.h | 2 +- .../Commands/RicNewVfpPlotFeature.cpp | 2 +- .../Commands/RicNewVfpPlotFeature.h | 2 +- .../Commands/RicNewViewFeature.cpp | 2 +- .../Commands/RicNewViewFeature.h | 2 +- .../Commands/RicReloadCaseFeature.cpp | 2 +- .../Commands/RicReloadCaseFeature.h | 2 +- .../RicReloadFormationNamesFeature.cpp | 2 +- .../Commands/RicReloadFormationNamesFeature.h | 2 +- .../RicReloadPressureDepthDataFeature.cpp | 8 --- .../RicReloadPressureDepthDataFeature.h | 1 - .../Commands/RicReloadSummaryCaseFeature.cpp | 2 +- .../Commands/RicReloadSummaryCaseFeature.h | 2 +- .../RicReloadWellMeasurementsFeature.cpp | 2 +- .../RicReloadWellMeasurementsFeature.h | 2 +- ...RicReloadWellPathFormationNamesFeature.cpp | 2 +- .../RicReloadWellPathFormationNamesFeature.h | 2 +- .../Commands/RicRenameSummaryCaseFeature.cpp | 2 +- .../Commands/RicRenameSummaryCaseFeature.h | 2 +- .../Commands/RicReplaceCaseFeature.cpp | 2 +- .../Commands/RicReplaceCaseFeature.h | 2 +- .../Commands/RicReplaceSummaryCaseFeature.cpp | 2 +- .../Commands/RicReplaceSummaryCaseFeature.h | 2 +- .../Commands/RicSelectColorResult.cpp | 2 +- .../Commands/RicSelectColorResult.h | 2 +- .../RicShowDataSourcesForRealization.cpp | 4 +- .../RicShowDataSourcesForRealization.h | 4 +- .../Commands/RicShowGridCalculatorFeature.cpp | 8 --- .../Commands/RicShowGridCalculatorFeature.h | 1 - .../Commands/RicShowGridStatisticsFeature.cpp | 2 +- .../Commands/RicShowGridStatisticsFeature.h | 2 +- .../RicStackSelectedCurvesFeature.cpp | 2 +- .../Commands/RicStackSelectedCurvesFeature.h | 2 +- .../Commands/RicThemeColorEditorFeature.cpp | 8 --- .../Commands/RicThemeColorEditorFeature.h | 1 - .../RicTogglePerspectiveViewFeature.cpp | 3 +- .../RicTogglePerspectiveViewFeature.h | 2 +- .../RicUnstackSelectedCurvesFeature.cpp | 2 +- .../RicUnstackSelectedCurvesFeature.h | 2 +- .../RicImportSeismicFeature.cpp | 8 --- .../SeismicCommands/RicImportSeismicFeature.h | 1 - .../RicNewInlineSeismicSectionFeature.cpp | 8 --- .../RicNewInlineSeismicSectionFeature.h | 1 - .../RicNewPolylineSeismicSectionFeature.cpp | 8 --- .../RicNewPolylineSeismicSectionFeature.h | 1 - .../RicNewSeismicDifferenceFeature.cpp | 2 +- .../RicNewSeismicDifferenceFeature.h | 4 +- .../RicNewWellpathSeismicSectionFeature.cpp | 8 --- .../RicNewWellpathSeismicSectionFeature.h | 1 - .../RicNewXlineSeismicSectionFeature.cpp | 8 --- .../RicNewXlineSeismicSectionFeature.h | 1 - .../RicNewZSliceSeismicSectionFeature.cpp | 8 --- .../RicNewZSliceSeismicSectionFeature.h | 1 - ...cSeismicSectionFromIntersectionFeature.cpp | 4 +- ...RicSeismicSectionFromIntersectionFeature.h | 4 +- .../RicWellPathsImportSsihubFeature.cpp | 8 --- .../RicWellPathsImportSsihubFeature.h | 1 - .../RicNewStreamlineFeature.cpp | 8 --- .../RicNewStreamlineFeature.h | 1 - .../RicAsciiExportSummaryPlotFeature.cpp | 8 --- .../RicAsciiExportSummaryPlotFeature.h | 1 - ...rSourceSteppingEnsembleCurveSetFeature.cpp | 2 +- ...earSourceSteppingEnsembleCurveSetFeature.h | 2 +- ...ClearSourceSteppingSummaryCurveFeature.cpp | 2 +- ...icClearSourceSteppingSummaryCurveFeature.h | 2 +- .../RicCreateDeclineCurvesFeature.cpp | 2 +- .../RicCreateDeclineCurvesFeature.h | 2 +- ...icCreateRegressionAnalysisCurveFeature.cpp | 2 +- .../RicCreateRegressionAnalysisCurveFeature.h | 2 +- .../RicDeleteSubPlotCtxFeature.cpp | 2 +- .../RicDeleteSubPlotCtxFeature.h | 2 +- ...cDuplicateSummaryCrossPlotCurveFeature.cpp | 2 +- ...RicDuplicateSummaryCrossPlotCurveFeature.h | 2 +- .../RicDuplicateSummaryCrossPlotFeature.cpp | 2 +- .../RicDuplicateSummaryCrossPlotFeature.h | 2 +- .../RicDuplicateSummaryCurveFeature.cpp | 2 +- .../RicDuplicateSummaryCurveFeature.h | 2 +- .../RicDuplicateSummaryPlotFeature.cpp | 2 +- .../RicDuplicateSummaryPlotFeature.h | 2 +- .../RicDuplicateSummaryTableFeature.cpp | 8 --- .../RicDuplicateSummaryTableFeature.h | 1 - .../RicEditSummaryCrossPlotFeature.cpp | 2 +- .../RicEditSummaryCrossPlotFeature.h | 2 +- .../RicEditSummaryCurveCalculationFeature.cpp | 2 +- .../RicEditSummaryCurveCalculationFeature.h | 2 +- .../RicEditSummaryPlotCtxFeature.cpp | 2 +- .../RicEditSummaryPlotCtxFeature.h | 2 +- .../RicEditSummaryPlotFeature.cpp | 4 +- .../RicEditSummaryPlotFeature.h | 4 +- .../RicNewDefaultSummaryPlotFeature.cpp | 2 +- .../RicNewDefaultSummaryPlotFeature.h | 2 +- .../RicNewDerivedEnsembleFeature.cpp | 2 +- .../RicNewDerivedEnsembleFeature.h | 2 +- .../RicNewDerivedSummaryFeature.cpp | 2 +- .../RicNewDerivedSummaryFeature.h | 2 +- .../RicNewEnsembleCurveFilterFeature.cpp | 8 --- .../RicNewEnsembleCurveFilterFeature.h | 1 - .../RicNewGridTimeHistoryCurveFeature.cpp | 2 +- .../RicNewGridTimeHistoryCurveFeature.h | 2 +- .../RicNewPlotAxisPropertiesFeature.cpp | 2 +- .../RicNewPlotAxisPropertiesFeature.h | 2 +- .../RicNewSummaryCrossPlotCurveFeature.cpp | 2 +- .../RicNewSummaryCrossPlotCurveFeature.h | 2 +- .../RicNewSummaryCrossPlotFeature.cpp | 2 +- .../RicNewSummaryCrossPlotFeature.h | 2 +- .../RicNewSummaryCurveFeature.cpp | 2 +- .../RicNewSummaryCurveFeature.h | 2 +- .../RicNewSummaryEnsembleCurveSetFeature.cpp | 2 +- .../RicNewSummaryEnsembleCurveSetFeature.h | 2 +- .../RicNewSummaryTableFeature.cpp | 2 +- .../RicNewSummaryTableFeature.h | 2 +- .../RicOpenSummaryPlotEditorFeature.cpp | 2 +- .../RicOpenSummaryPlotEditorFeature.h | 2 +- ...penSummaryPlotEditorFromMdiAreaFeature.cpp | 2 +- ...cOpenSummaryPlotEditorFromMdiAreaFeature.h | 2 +- .../RicPasteAsciiDataCurveFeature.cpp | 2 +- .../RicPasteAsciiDataCurveFeature.h | 2 +- .../RicPasteAsciiDataToSummaryPlotFeature.cpp | 2 +- .../RicPasteAsciiDataToSummaryPlotFeature.h | 2 +- .../RicPasteEnsembleCurveSetFeature.cpp | 2 +- .../RicPasteEnsembleCurveSetFeature.h | 2 +- .../RicPasteSummaryCaseFeature.cpp | 2 +- .../RicPasteSummaryCaseFeature.h | 2 +- .../RicPasteSummaryCrossPlotCurveFeature.cpp | 2 +- .../RicPasteSummaryCrossPlotCurveFeature.h | 2 +- .../RicPasteSummaryCrossPlotFeature.cpp | 2 +- .../RicPasteSummaryCrossPlotFeature.h | 2 +- .../RicPasteSummaryCurveFeature.cpp | 2 +- .../RicPasteSummaryCurveFeature.h | 2 +- .../RicPasteSummaryMultiPlotFeature.cpp | 2 +- .../RicPasteSummaryMultiPlotFeature.h | 2 +- .../RicPasteSummaryPlotFeature.cpp | 2 +- .../RicPasteSummaryPlotFeature.h | 2 +- .../RicPasteTimeHistoryCurveFeature.cpp | 2 +- .../RicPasteTimeHistoryCurveFeature.h | 2 +- ...tSourceSteppingEnsembleCurveSetFeature.cpp | 2 +- ...SetSourceSteppingEnsembleCurveSetFeature.h | 2 +- ...icSetSourceSteppingSummaryCurveFeature.cpp | 2 +- .../RicSetSourceSteppingSummaryCurveFeature.h | 2 +- .../RicShowSummaryCurveCalculatorFeature.cpp | 8 --- .../RicShowSummaryCurveCalculatorFeature.h | 1 - .../RicShowSummaryPlotManagerFeature.cpp | 8 --- .../RicShowSummaryPlotManagerFeature.h | 1 - .../RicSummaryCurveSwitchAxisFeature.cpp | 2 +- .../RicSummaryCurveSwitchAxisFeature.h | 2 +- .../RicToggleXAxisLinkingFeature.cpp | 2 +- .../RicToggleXAxisLinkingFeature.h | 2 +- .../RicToggleYAxisLinkingFeature.cpp | 2 +- .../RicToggleYAxisLinkingFeature.h | 2 +- .../RicViewZoomAllFeature.cpp | 8 --- .../RicViewZoomAllFeature.h | 1 - .../SurfaceCommands/RicCopySurfaceFeature.cpp | 8 --- .../SurfaceCommands/RicCopySurfaceFeature.h | 1 - .../RicExportKLayerToPtlFeature.cpp | 5 +- .../RicExportKLayerToPtlFeature.h | 2 +- .../RicExportSurfaceToTsurfFeature.cpp | 2 +- .../RicExportSurfaceToTsurfFeature.h | 2 +- .../RicImportSurfacesFeature.cpp | 8 --- .../RicImportSurfacesFeature.h | 1 - .../RicNewGridCaseSurfaceFeature.cpp | 8 --- .../RicNewGridCaseSurfaceFeature.h | 1 - .../RicNewSurfaceCollectionFeature.cpp | 8 --- .../RicNewSurfaceCollectionFeature.h | 1 - .../RicReloadSurfaceFeature.cpp | 8 --- .../SurfaceCommands/RicReloadSurfaceFeature.h | 1 - .../RicCollapseSiblingsFeature.cpp | 2 +- .../RicCollapseSiblingsFeature.h | 2 +- .../RicMoveItemsToTopFeature.cpp | 2 +- .../ToggleCommands/RicMoveItemsToTopFeature.h | 2 +- .../ToggleCommands/RicToggleItemsFeature.cpp | 2 +- .../ToggleCommands/RicToggleItemsFeature.h | 2 +- .../RicToggleItemsOffFeature.cpp | 2 +- .../ToggleCommands/RicToggleItemsOffFeature.h | 2 +- .../RicToggleItemsOnFeature.cpp | 2 +- .../ToggleCommands/RicToggleItemsOnFeature.h | 2 +- .../RicToggleItemsOnOthersOffFeature.cpp | 2 +- .../RicToggleItemsOnOthersOffFeature.h | 8 +-- .../ViewLink/RicCompareTo3dViewFeature.cpp | 8 --- .../ViewLink/RicCompareTo3dViewFeature.h | 1 - .../RicDeleteAllLinkedViewsFeature.cpp | 2 +- .../ViewLink/RicDeleteAllLinkedViewsFeature.h | 2 +- .../Commands/ViewLink/RicLinkViewFeature.cpp | 2 +- .../Commands/ViewLink/RicLinkViewFeature.h | 2 +- .../ViewLink/RicLinkVisibleViewsFeature.cpp | 2 +- .../ViewLink/RicLinkVisibleViewsFeature.h | 2 +- .../RicRemoveComparison3dViewFeature.cpp | 2 +- .../RicRemoveComparison3dViewFeature.h | 2 +- .../ViewLink/RicSetMasterViewFeature.cpp | 2 +- .../ViewLink/RicSetMasterViewFeature.h | 2 +- .../ViewLink/RicShowAllLinkedViewsFeature.cpp | 2 +- .../ViewLink/RicShowAllLinkedViewsFeature.h | 2 +- .../ViewLink/RicShowLinkOptionsFeature.cpp | 2 +- .../ViewLink/RicShowLinkOptionsFeature.h | 2 +- .../ViewLink/RicUnLinkViewFeature.cpp | 2 +- .../Commands/ViewLink/RicUnLinkViewFeature.h | 2 +- .../Ric3dWellLogCurveDeleteFeature.cpp | 2 +- .../Ric3dWellLogCurveDeleteFeature.h | 2 +- .../RicAdd3dWellLogCurveFeature.cpp | 2 +- .../RicAdd3dWellLogCurveFeature.h | 2 +- .../RicAdd3dWellLogFileCurveFeature.cpp | 2 +- .../RicAdd3dWellLogFileCurveFeature.h | 2 +- .../RicAdd3dWellLogRftCurveFeature.cpp | 2 +- .../RicAdd3dWellLogRftCurveFeature.h | 2 +- .../RicAddWellLogToPlotFeature.cpp | 2 +- .../RicAddWellLogToPlotFeature.h | 4 +- .../RicAsciiExportWellLogPlotFeature.cpp | 8 --- .../RicAsciiExportWellLogPlotFeature.h | 1 - .../RicChangeDataSourceFeature.cpp | 2 +- .../RicChangeDataSourceFeature.h | 2 +- .../RicDeleteSubPlotFeature.cpp | 4 +- .../WellLogCommands/RicDeleteSubPlotFeature.h | 4 +- .../RicMoveWellLogFilesFeature.cpp | 2 +- .../RicMoveWellLogFilesFeature.h | 2 +- .../RicNewEnsembleWellLogCurveSetFeature.cpp | 2 +- .../RicNewEnsembleWellLogCurveSetFeature.h | 2 +- .../RicNewMultiPhaseRftSegmentPlotFeature.cpp | 8 --- .../RicNewMultiPhaseRftSegmentPlotFeature.h | 1 - .../WellLogCommands/RicNewPltPlotFeature.cpp | 2 +- .../WellLogCommands/RicNewPltPlotFeature.h | 2 +- .../WellLogCommands/RicNewRftPlotFeature.cpp | 2 +- .../WellLogCommands/RicNewRftPlotFeature.h | 2 +- .../RicNewRftSegmentWellLogPlotFeature.cpp | 8 --- .../RicNewRftSegmentWellLogPlotFeature.h | 1 - .../RicNewRftWellLogPlotFeature.cpp | 8 --- .../RicNewRftWellLogPlotFeature.h | 1 - .../RicNewWellBoreStabilityPlotFeature.cpp | 2 +- .../RicNewWellBoreStabilityPlotFeature.h | 2 +- .../RicNewWellLogCalculatedCurveFeature.cpp | 2 +- .../RicNewWellLogCalculatedCurveFeature.h | 2 +- .../RicNewWellLogExtractionCurveFeature.cpp | 2 +- .../RicNewWellLogExtractionCurveFeature.h | 2 +- .../RicNewWellLogFileCurveFeature.cpp | 2 +- .../RicNewWellLogFileCurveFeature.h | 2 +- .../RicNewWellLogPlotFeature.cpp | 8 --- .../RicNewWellLogPlotFeature.h | 1 - .../RicNewWellLogPlotTrackFeature.cpp | 2 +- .../RicNewWellLogPlotTrackFeature.h | 4 +- .../RicNewWellLogRftCurveFeature.cpp | 2 +- .../RicNewWellLogRftCurveFeature.h | 2 +- .../RicNewWellMeasurementCurveFeature.cpp | 2 +- .../RicNewWellMeasurementCurveFeature.h | 2 +- .../RicPasteWellLogCurveFeature.cpp | 2 +- .../RicPasteWellLogCurveFeature.h | 2 +- .../RicPasteWellLogPlotFeature.cpp | 2 +- .../RicPasteWellLogPlotFeature.h | 2 +- .../RicPasteWellLogTrackFeature.cpp | 2 +- .../RicPasteWellLogTrackFeature.h | 2 +- .../RicWellLogFileCloseFeature.cpp | 2 +- .../RicWellLogFileCloseFeature.h | 2 +- .../RicWellLogsImportFileFeature.cpp | 8 --- .../RicWellLogsImportFileFeature.h | 1 - .../RicAppendPointsToPolygonFilterFeature.cpp | 2 +- .../RicAppendPointsToPolygonFilterFeature.h | 2 +- .../RicCreateMultipleWellPathLaterals.cpp | 8 --- .../RicCreateMultipleWellPathLaterals.h | 1 - .../RicDeletePolylineTargetFeature.cpp | 2 +- .../RicDeletePolylineTargetFeature.h | 2 +- .../RicDeleteWellPathAttributeFeature.cpp | 2 +- .../RicDeleteWellPathAttributeFeature.h | 2 +- .../RicDeleteWellPathFeature.cpp | 2 +- .../RicDeleteWellPathFeature.h | 2 +- .../RicDeleteWellPathTargetFeature.cpp | 2 +- .../RicDeleteWellPathTargetFeature.h | 2 +- .../RicDuplicateWellPathFeature.cpp | 2 +- .../RicDuplicateWellPathFeature.h | 2 +- .../RicImportWellMeasurementsFeature.cpp | 2 +- .../RicImportWellMeasurementsFeature.h | 2 +- .../WellPathCommands/RicImportWellPaths.cpp | 8 --- .../WellPathCommands/RicImportWellPaths.h | 1 - .../RicLinkWellPathFeature.cpp | 4 +- .../WellPathCommands/RicLinkWellPathFeature.h | 4 +- .../RicNewEditableWellPathFeature.cpp | 2 +- .../RicNewEditableWellPathFeature.h | 2 +- .../RicNewPolylineTargetFeature.cpp | 2 +- .../RicNewPolylineTargetFeature.h | 2 +- .../RicNewWellPathAttributeFeature.cpp | 2 +- .../RicNewWellPathAttributeFeature.h | 2 +- .../RicNewWellPathLateralAtDepthFeature.cpp | 2 +- .../RicNewWellPathLateralAtDepthFeature.h | 2 +- .../RicNewWellPathLateralFeature.cpp | 2 +- .../RicNewWellPathLateralFeature.h | 2 +- .../RicNewWellPathListTargetFeature.cpp | 2 +- .../RicNewWellPathListTargetFeature.h | 2 +- .../RicPasteModeledWellPathFeature.cpp | 2 +- .../RicPasteModeledWellPathFeature.h | 2 +- .../RicShowWellPlanFeature.cpp | 2 +- .../WellPathCommands/RicShowWellPlanFeature.h | 2 +- ...RicWellPathFormationsImportFileFeature.cpp | 8 --- .../RicWellPathFormationsImportFileFeature.h | 1 - Fwk/AppFwk/cafCommand/cafCmdFeature.cpp | 12 +++- Fwk/AppFwk/cafCommand/cafCmdFeature.h | 6 +- .../AddAndDelete/cafCmdAddItemFeature.cpp | 2 +- .../AddAndDelete/cafCmdAddItemFeature.h | 2 +- .../AddAndDelete/cafCmdDeleteItemFeature.cpp | 2 +- .../AddAndDelete/cafCmdDeleteItemFeature.h | 2 +- .../ToggleCommands/cafToggleItemsFeature.cpp | 4 +- .../ToggleCommands/cafToggleItemsFeature.h | 4 +- .../cafToggleItemsOffFeature.cpp | 4 +- .../ToggleCommands/cafToggleItemsOffFeature.h | 4 +- .../cafToggleItemsOnFeature.cpp | 4 +- .../ToggleCommands/cafToggleItemsOnFeature.h | 4 +- .../cafToggleItemsOnOthersOffFeature.cpp | 2 +- .../cafToggleItemsOnOthersOffFeature.h | 10 ++-- 786 files changed, 638 insertions(+), 1857 deletions(-) diff --git a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.cpp b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.cpp index 361f1cc967..9a1f1fb3ff 100644 --- a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.cpp +++ b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewAnalysisPlotFeature, "RicNewAnalysisPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewAnalysisPlotFeature::isCommandEnabled() +bool RicNewAnalysisPlotFeature::isCommandEnabled() const { if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; diff --git a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.h b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.h index cce5271826..ede042cc43 100644 --- a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.h +++ b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewAnalysisPlotFeature.h @@ -28,7 +28,7 @@ class RicNewAnalysisPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.cpp b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.cpp index a65a21cd32..ca0b6c6468 100644 --- a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.cpp +++ b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicNewPlotDataFilterFeature, "RicNewPlotDataFilterFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPlotDataFilterFeature::isCommandEnabled() +bool RicNewPlotDataFilterFeature::isCommandEnabled() const { RimAnalysisPlot* analysisPlot = caf::SelectionManager::instance()->selectedItemAncestorOfType(); diff --git a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.h b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.h index ba17f7d5d4..8f5b62268b 100644 --- a/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.h +++ b/ApplicationLibCode/Commands/AnalysisPlotCommands/RicNewPlotDataFilterFeature.h @@ -28,7 +28,7 @@ class RicNewPlotDataFilterFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.cpp index 7dd288ac44..b69c7cfbb9 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateReachCircleAnnotationFeature, "RicCreateReachCircl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateReachCircleAnnotationFeature::isCommandEnabled() +bool RicCreateReachCircleAnnotationFeature::isCommandEnabled() const { auto selObjs = caf::selectedObjectsByTypeStrict(); auto selGroupColl = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.h b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.h index 7b822e3b6e..4c487e4ea8 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.h +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateReachCircleAnnotationFeature.h @@ -32,7 +32,7 @@ class RicCreateReachCircleAnnotationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp index de1c783db9..6340c519aa 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationFeature, "RicCreateTextAnnotationFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateTextAnnotationFeature::isCommandEnabled() +bool RicCreateTextAnnotationFeature::isCommandEnabled() const { auto selObjsGlobal = caf::selectedObjectsByTypeStrict(); auto selObjs2InView = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.h b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.h index e9910a5c55..141de39a49 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.h +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationFeature.h @@ -34,7 +34,7 @@ class RicCreateTextAnnotationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp index 6cbd92102e..8ee1c57dfa 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.cpp @@ -39,14 +39,6 @@ CAF_CMD_SOURCE_INIT( RicCreateTextAnnotationIn3dViewFeature, "RicCreateTextAnnotationIn3dViewFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateTextAnnotationIn3dViewFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.h b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.h index 1deff83c68..8a2b811ad5 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.h +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateTextAnnotationIn3dViewFeature.h @@ -28,7 +28,6 @@ class RicCreateTextAnnotationIn3dViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.cpp index 787cbd846c..43d2f566cf 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicCreateUserDefinedPolylinesAnnotationFeature, "RicCreateU //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled() +bool RicCreateUserDefinedPolylinesAnnotationFeature::isCommandEnabled() const { auto selObjs = caf::selectedObjectsByTypeStrict(); auto selGroupColl = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.h b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.h index f1563dc2bb..2046649ffa 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.h +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicCreateUserDefinedPolylinesAnnotationFeature.h @@ -32,7 +32,7 @@ class RicCreateUserDefinedPolylinesAnnotationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.cpp b/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.cpp index a68982f962..b1dea910c5 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.cpp +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicImportPolylinesAnnotationFeature, "RicImportPolylinesAnn //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportPolylinesAnnotationFeature::isCommandEnabled() +bool RicImportPolylinesAnnotationFeature::isCommandEnabled() const { auto selObjs = caf::selectedObjectsByTypeStrict(); auto selGroupColl = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.h b/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.h index 945cc864f9..31ca5d1046 100644 --- a/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.h +++ b/ApplicationLibCode/Commands/AnnotationCommands/RicImportPolylinesAnnotationFeature.h @@ -28,7 +28,7 @@ class RicImportPolylinesAnnotationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp index 8ea28cec34..b2d0f1caad 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicCloseProjectFeature, "RicCloseProjectFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCloseProjectFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.h index 8b9cbf937a..f52ef1b042 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicCloseProjectFeature.h @@ -28,7 +28,6 @@ class RicCloseProjectFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp index 80b539737e..55beb9ad61 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.cpp @@ -35,14 +35,6 @@ CAF_CMD_SOURCE_INIT( RicEditPreferencesFeature, "RicEditPreferencesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicEditPreferencesFeature::isCommandEnabled() -{ - return true; -} - std::vector findFontObjects() { auto project = RimProject::current(); diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.h index 13016b8d19..79c4655d3c 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicEditPreferencesFeature.h @@ -31,7 +31,6 @@ class RicEditPreferencesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp index 85d4f05279..a0c235b9a5 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicExitApplicationFeature, "RicExitApplicationFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicExitApplicationFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.h index e436c474e7..251a66fbe9 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicExitApplicationFeature.h @@ -28,7 +28,6 @@ class RicExitApplicationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.cpp index 64db3d0206..062878bf10 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.cpp @@ -35,14 +35,6 @@ CAF_CMD_SOURCE_INIT( RicExportObjectAndFieldKeywordsFeature, "RicExportObjectAndFieldKeywordsFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicExportObjectAndFieldKeywordsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.h index 21707e7794..ecdd111636 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicExportObjectAndFieldKeywordsFeature.h @@ -28,7 +28,6 @@ class RicExportObjectAndFieldKeywordsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp index 0386025286..8ef6c4b160 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.cpp @@ -46,14 +46,6 @@ CAF_CMD_SOURCE_INIT( RicSearchHelpFeature, "RicSearchHelpFeature" ); CAF_CMD_SOURCE_INIT( RicSearchIssuesHelpFeature, "RicSearchIssuesHelpFeature" ); CAF_CMD_SOURCE_INIT( RicCreateNewIssueHelpFeature, "RicCreateNewIssueHelpFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicHelpAboutFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -205,14 +197,6 @@ QString RicHelpAboutFeature::getPythonVersion( const QString& pathToPythonExecut return versionString; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicHelpCommandLineFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -234,14 +218,6 @@ void RicHelpCommandLineFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicHelpSummaryCommandLineFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -263,14 +239,6 @@ void RicHelpSummaryCommandLineFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicHelpOpenUsersGuideFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -291,14 +259,6 @@ void RicHelpOpenUsersGuideFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSearchHelpFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -337,14 +297,6 @@ void RicSearchHelpFeature::setupActionLook( QAction* actionToSetup ) applyShortcutWithHintToAction( actionToSetup, QKeySequence::HelpContents ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSearchIssuesHelpFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -363,14 +315,6 @@ void RicSearchIssuesHelpFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/HelpCircle.svg" ) ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateNewIssueHelpFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.h b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.h index e4ba2c0fe5..d49d19123d 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicHelpFeatures.h @@ -30,7 +30,6 @@ class RicHelpAboutFeature : public caf::CmdFeature static QString getPythonVersion( const QString& pathToPythonExecutable ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -43,7 +42,6 @@ class RicHelpCommandLineFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -56,7 +54,6 @@ class RicHelpSummaryCommandLineFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -69,7 +66,6 @@ class RicHelpOpenUsersGuideFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -82,7 +78,6 @@ class RicSearchHelpFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -95,7 +90,6 @@ class RicSearchIssuesHelpFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -108,7 +102,6 @@ class RicCreateNewIssueHelpFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp index 812bf6e0d8..dbc61cbc9d 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicLaunchRegressionTestsFeature, "RicLaunchRegressionTestsFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicLaunchRegressionTestsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -73,14 +65,6 @@ void RicLaunchRegressionTestDialogFeature::showRegressionTestDialog() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicLaunchRegressionTestDialogFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.h index d91b6675ee..4d9b6dfc9c 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchRegressionTestsFeature.h @@ -28,7 +28,6 @@ class RicLaunchRegressionTestsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; @@ -43,7 +42,6 @@ class RicLaunchRegressionTestDialogFeature : public caf::CmdFeature static void showRegressionTestDialog(); private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp index 0040e45b09..224fcc2c10 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.cpp @@ -25,14 +25,6 @@ CAF_CMD_SOURCE_INIT( RicLaunchUnitTestsFeature, "RicLaunchUnitTestsFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicLaunchUnitTestsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.h index 33f6de842a..d6d27b45d7 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicLaunchUnitTestsFeature.h @@ -29,7 +29,6 @@ class RicLaunchUnitTestsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.cpp index 89c9f8370c..42e300119c 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.cpp @@ -56,14 +56,6 @@ void RicOpenInTextEditorFeature::openFileInTextEditor( const QString& filePath, } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicOpenInTextEditorFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.h index 513cd616d7..ad7f57ae19 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenInTextEditorFeature.h @@ -30,7 +30,6 @@ class RicOpenInTextEditorFeature : public caf::CmdFeature static void openFileInTextEditor( const QString& filePath, QObject* parent ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp index ab74272cea..bfeb4a10f9 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicOpenLastUsedFileFeature, "RicOpenLastUsedFileFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicOpenLastUsedFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.h index e092a0f4e4..a9cac22d6c 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenLastUsedFileFeature.h @@ -28,7 +28,6 @@ class RicOpenLastUsedFileFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp index ef8d52edea..136dc2cb67 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.cpp @@ -29,14 +29,6 @@ CAF_CMD_SOURCE_INIT( RicOpenProjectFeature, "RicOpenProjectFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicOpenProjectFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.h index 5832cd9e9e..b3528fadb8 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicOpenProjectFeature.h @@ -28,7 +28,6 @@ class RicOpenProjectFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.cpp index 80098c725d..51712ed4af 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.cpp @@ -28,14 +28,6 @@ CAF_CMD_SOURCE_INIT( RicRunCommandFileFeature, "RicRunCommandFileFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicRunCommandFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.h index c87ef32f32..44e612213b 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicRunCommandFileFeature.h @@ -28,7 +28,6 @@ class RicRunCommandFileFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp index 15ba3385d6..3239f900ad 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.cpp @@ -51,14 +51,6 @@ caf::PdmScriptResponse RicSaveProjectAsFeature::execute() return caf::PdmScriptResponse(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSaveProjectAsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.h index 149c7d9143..ff27185c25 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectAsFeature.h @@ -35,7 +35,6 @@ public: caf::PdmScriptResponse execute() override; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp index 174014233a..b0dd2ff69c 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.cpp @@ -60,14 +60,6 @@ caf::PdmScriptResponse RicSaveProjectFeature::execute() return caf::PdmScriptResponse(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSaveProjectFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.h index 30fe1a49b6..b296076070 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectFeature.h @@ -35,7 +35,6 @@ public: caf::PdmScriptResponse execute() override; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.cpp index c81bf2ee72..20e16d692d 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.cpp @@ -25,14 +25,6 @@ CAF_CMD_SOURCE_INIT( RicSaveProjectNoGlobalPathsFeature, "RicSaveProjectNoGlobalPathsFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSaveProjectNoGlobalPathsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.h index 307592d231..fdfce92577 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicSaveProjectNoGlobalPathsFeature.h @@ -28,7 +28,6 @@ class RicSaveProjectNoGlobalPathsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.cpp index 83e47b19d2..60b6447416 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicShowClassNamesFeature, "RicShowClassNamesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowClassNamesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- @@ -59,7 +51,7 @@ void RicShowClassNamesFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowClassNamesFeature::isCommandChecked() +bool RicShowClassNamesFeature::isCommandChecked() const { return RiaPreferences::current()->systemPreferences()->appendClassNameToUiText(); } diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.h index 6584dad0a6..0dc7cd02d6 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowClassNamesFeature.h @@ -28,8 +28,7 @@ class RicShowClassNamesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp index 0a04392faa..8cffdb5853 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.cpp @@ -75,14 +75,6 @@ void RicShowMainWindowFeature::showMainWindow() } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowMainWindowFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.h index 3b733b3f9c..e71c41fee6 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMainWindowFeature.h @@ -31,7 +31,6 @@ public: static void showMainWindow(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.cpp index 32fc9965ac..2958e9b563 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicShowMemoryCleanupDialogFeature, "RicShowMemoryCleanupDialogFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowMemoryCleanupDialogFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.h index 776e877d26..12eb8ab6fa 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowMemoryCleanupDialogFeature.h @@ -28,7 +28,6 @@ class RicShowMemoryCleanupDialogFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.cpp index d5f358191f..37834b46b8 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.cpp @@ -23,7 +23,7 @@ CAF_CMD_SOURCE_INIT( RicShowPlotDataCtxFeature, "RicShowPlotDataCtxFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowPlotDataCtxFeature::isCommandEnabled() +bool RicShowPlotDataCtxFeature::isCommandEnabled() const { return true; } diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.h index bb703f03d1..b1eb2b90b2 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataCtxFeature.h @@ -28,5 +28,5 @@ class RicShowPlotDataCtxFeature : public RicShowPlotDataFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp index 0ef5756c75..e54d035fff 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.cpp @@ -168,7 +168,7 @@ private: /// /// //-------------------------------------------------------------------------------------------------- -bool RicShowPlotDataFeature::isCommandEnabled() +bool RicShowPlotDataFeature::isCommandEnabled() const { QString content = RiaFeatureCommandContext::instance()->contentString(); if ( !content.isEmpty() ) @@ -355,7 +355,7 @@ void RicShowPlotDataFeature::showTextWindow( const QString& title, const QString //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicShowPlotDataFeature::getSelection( std::vector& selection ) +void RicShowPlotDataFeature::getSelection( std::vector& selection ) const { if ( sender() ) { diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h index f3ff0837fc..a6d54f5e0a 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotDataFeature.h @@ -33,12 +33,12 @@ class RicShowPlotDataFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - void getSelection( std::vector& selection ); + void getSelection( std::vector& selection ) const; public: static void showTabbedTextWindow( RiuTabbedTextProvider* textProvider ); diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp index ca3dd03f5f..4f97acb89e 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicShowPlotWindowFeature, "RicShowPlotWindowFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowPlotWindowFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.h index bea243301a..fd3eab92e6 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicShowPlotWindowFeature.h @@ -28,7 +28,6 @@ class RicShowPlotWindowFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp index fdf87cabd3..b9f9b4167f 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.cpp @@ -56,7 +56,7 @@ void RicTileWindowsFeature::applyTiling( RiuMainWindow* mainWindow, RiaDefines:: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsFeature::isCommandEnabled() +bool RicTileWindowsFeature::isCommandEnabled() const { auto* mainWindow = RiuMainWindow::instance(); if ( mainWindow ) @@ -91,7 +91,7 @@ void RicTileWindowsFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsFeature::isCommandChecked() +bool RicTileWindowsFeature::isCommandChecked() const { auto proj = RimProject::current(); @@ -124,7 +124,7 @@ void RicTilePlotWindowsFeature::applyTiling( RiuPlotMainWindow* mainWindow, RiaD //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsFeature::isCommandEnabled() +bool RicTilePlotWindowsFeature::isCommandEnabled() const { RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow(); if ( mainPlotWindow ) @@ -159,7 +159,7 @@ void RicTilePlotWindowsFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsFeature::isCommandChecked() +bool RicTilePlotWindowsFeature::isCommandChecked() const { auto proj = RimProject::current(); @@ -171,7 +171,7 @@ CAF_CMD_SOURCE_INIT( RicTileWindowsVerticallyFeature, "RicTileWindowsVerticallyF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsVerticallyFeature::isCommandEnabled() +bool RicTileWindowsVerticallyFeature::isCommandEnabled() const { RiuMainWindow* mainWindow = RiuMainWindow::instance(); if ( mainWindow ) @@ -205,7 +205,7 @@ void RicTileWindowsVerticallyFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsVerticallyFeature::isCommandChecked() +bool RicTileWindowsVerticallyFeature::isCommandChecked() const { auto proj = RimProject::current(); @@ -217,7 +217,7 @@ CAF_CMD_SOURCE_INIT( RicTileWindowsHorizontallyFeature, "RicTileWindowsHorizonta //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsHorizontallyFeature::isCommandEnabled() +bool RicTileWindowsHorizontallyFeature::isCommandEnabled() const { RiuMainWindow* mainWindow = RiuMainWindow::instance(); if ( mainWindow ) @@ -251,7 +251,7 @@ void RicTileWindowsHorizontallyFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTileWindowsHorizontallyFeature::isCommandChecked() +bool RicTileWindowsHorizontallyFeature::isCommandChecked() const { auto proj = RimProject::current(); @@ -269,7 +269,7 @@ CAF_CMD_SOURCE_INIT( RicTilePlotWindowsVerticallyFeature, "RicTilePlotWindowsVer //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsVerticallyFeature::isCommandEnabled() +bool RicTilePlotWindowsVerticallyFeature::isCommandEnabled() const { auto* mainWindow = RiuPlotMainWindow::instance(); if ( mainWindow ) @@ -303,7 +303,7 @@ void RicTilePlotWindowsVerticallyFeature::setupActionLook( QAction* actionToSetu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsVerticallyFeature::isCommandChecked() +bool RicTilePlotWindowsVerticallyFeature::isCommandChecked() const { auto proj = RimProject::current(); @@ -315,7 +315,7 @@ CAF_CMD_SOURCE_INIT( RicTilePlotWindowsHorizontallyFeature, "RicTilePlotWindowsH //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsHorizontallyFeature::isCommandEnabled() +bool RicTilePlotWindowsHorizontallyFeature::isCommandEnabled() const { auto* mainWindow = RiuPlotMainWindow::instance(); if ( mainWindow ) @@ -349,7 +349,7 @@ void RicTilePlotWindowsHorizontallyFeature::setupActionLook( QAction* actionToSe //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTilePlotWindowsHorizontallyFeature::isCommandChecked() +bool RicTilePlotWindowsHorizontallyFeature::isCommandChecked() const { auto proj = RimProject::current(); diff --git a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h index 83732d3efe..57729c238d 100644 --- a/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h +++ b/ApplicationLibCode/Commands/ApplicationCommands/RicTileWindowsFeature.h @@ -37,10 +37,10 @@ public: static void applyTiling( RiuMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -51,10 +51,10 @@ class RicTileWindowsVerticallyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -65,10 +65,10 @@ class RicTileWindowsHorizontallyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -82,10 +82,10 @@ public: static void applyTiling( RiuPlotMainWindow* mainWindow, RiaDefines::WindowTileMode requestedTileMode ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -96,10 +96,10 @@ class RicTilePlotWindowsVerticallyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -110,8 +110,8 @@ class RicTilePlotWindowsHorizontallyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp index 49b3895f61..20b07254e8 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicNewPolygonFilter3dviewFeature, "RicNewPolygonFilter3dviewFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewPolygonFilter3dviewFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.h index 4bcee853da..66c70e262b 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilter3dviewFeature.h @@ -28,7 +28,6 @@ class RicNewPolygonFilter3dviewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp index ac1e333faf..4e8ba926b2 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.cpp @@ -30,14 +30,6 @@ CAF_CMD_SOURCE_INIT( RicNewPolygonFilterFeature, "RicNewPolygonFilterFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewPolygonFilterFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h index 588e163fc6..570408e305 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewPolygonFilterFeature.h @@ -28,7 +28,6 @@ class RicNewPolygonFilterFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.cpp index b9f79b1e0c..fba1a94bc4 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicNewRangeFilterSlice3dviewFeature, "RicNewRangeFilterSlic //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewRangeFilterSlice3dviewFeature::isCommandEnabled() +bool RicNewRangeFilterSlice3dviewFeature::isCommandEnabled() const { RimGridView* view = RiaApplication::instance()->activeGridView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.h index b1769496ce..17c3925cbe 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSlice3dviewFeature.h @@ -28,7 +28,7 @@ class RicNewRangeFilterSlice3dviewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.cpp index 5cc1b0c10f..124d299f63 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.cpp @@ -34,14 +34,6 @@ RicNewRangeFilterSliceFeature::RicNewRangeFilterSliceFeature( QString cmdText, i { } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewRangeFilterSliceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.h index 5bf0d8c25f..a5f3d0b156 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewRangeFilterSliceFeature.h @@ -29,7 +29,6 @@ protected: RicNewRangeFilterSliceFeature( QString cmdText, int sliceDirection ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.cpp b/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.cpp index 10ad34a469..08ee5292b2 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.cpp +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.cpp @@ -30,14 +30,6 @@ CAF_CMD_SOURCE_INIT( RicNewUserDefinedFilterFeature, "RicNewUserDefinedFilterFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewUserDefinedFilterFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.h b/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.h index 41e0e84d62..dbea9e88ff 100644 --- a/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.h +++ b/ApplicationLibCode/Commands/CellFilterCommands/RicNewUserDefinedFilterFeature.h @@ -28,7 +28,6 @@ class RicNewUserDefinedFilterFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.cpp b/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.cpp index a1aca765fd..aaf880fdf7 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.cpp +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicCopyStandardLegendFeature, "RicCopyStandardLegendFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCopyStandardLegendFeature::isCommandEnabled() +bool RicCopyStandardLegendFeature::isCommandEnabled() const { return selectedColorLegend() != nullptr; } diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.h b/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.h index ffb271b03d..1175a8ea0a 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.h +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicCopyStandardLegendFeature.h @@ -30,10 +30,10 @@ class RicCopyStandardLegendFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimColorLegend* selectedColorLegend(); + static RimColorLegend* selectedColorLegend(); }; diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.cpp b/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.cpp index 5e4a492388..2b99cd8af3 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.cpp +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.cpp @@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicImportColorCategoriesFeature, "RicImportColorCategoriesF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportColorCategoriesFeature::isCommandEnabled() +bool RicImportColorCategoriesFeature::isCommandEnabled() const { return caf::firstAncestorOfTypeFromSelectedObject() != nullptr; } diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.h b/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.h index 84d8d3c484..cb7991ee60 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.h +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicImportColorCategoriesFeature.h @@ -28,7 +28,7 @@ class RicImportColorCategoriesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.cpp b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.cpp index fac693df0b..71227539aa 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.cpp +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicInsertColorLegendFeature, "RicInsertColorLegendFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicInsertColorLegendFeature::isCommandEnabled() +bool RicInsertColorLegendFeature::isCommandEnabled() const { return selectedColorLegendCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.h b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.h index 5de8c99ba4..29c04e4972 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.h +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendFeature.h @@ -30,10 +30,10 @@ class RicInsertColorLegendFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimColorLegendCollection* selectedColorLegendCollection(); + static RimColorLegendCollection* selectedColorLegendCollection(); }; diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.cpp b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.cpp index 65bc3bde80..6951af9a67 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.cpp +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicInsertColorLegendItemFeature, "RicInsertColorLegendItemF //-------------------------------------------------------------------------------------------------- /// Disallows insert of color legend item in standard color legends //-------------------------------------------------------------------------------------------------- -bool RicInsertColorLegendItemFeature::isCommandEnabled() +bool RicInsertColorLegendItemFeature::isCommandEnabled() const { RimColorLegend* legend = selectedColorLegend(); diff --git a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.h b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.h index 0cedebd1d1..29db07e032 100644 --- a/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.h +++ b/ApplicationLibCode/Commands/ColorLegendCommands/RicInsertColorLegendItemFeature.h @@ -30,10 +30,10 @@ class RicInsertColorLegendItemFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimColorLegend* selectedColorLegend(); + static RimColorLegend* selectedColorLegend(); }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.cpp index e694e41905..b48354b442 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteValveTemplateFeature, "RicDeleteValveTemplateFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteValveTemplateFeature::isCommandEnabled() +bool RicDeleteValveTemplateFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.h index deed2540d9..b45f874f00 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicDeleteValveTemplateFeature.h @@ -28,7 +28,7 @@ class RicDeleteValveTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.cpp index 201eefcc72..be9702829b 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicEditPerforationCollectionFeature, "RicEditPerforationCol //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditPerforationCollectionFeature::isCommandEnabled() +bool RicEditPerforationCollectionFeature::isCommandEnabled() const { return selectedPerforationCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.h index 42c9f6be5c..36730914b2 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicEditPerforationCollectionFeature.h @@ -30,7 +30,7 @@ class RicEditPerforationCollectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.cpp index 03ab58b603..27c1b7b7ee 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.cpp @@ -123,7 +123,7 @@ void RicExportFishbonesLateralsFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportFishbonesLateralsFeature::isCommandEnabled() +bool RicExportFishbonesLateralsFeature::isCommandEnabled() const { return selectedFishbonesCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.h index 3cf41f9110..84c59966cf 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicExportFishbonesLateralsFeature.h @@ -47,7 +47,7 @@ class RicExportFishbonesLateralsFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; private: static RimFishbonesCollection* selectedFishbonesCollection(); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp index 536dafacaf..b276dc5465 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.cpp @@ -42,14 +42,6 @@ CAF_CMD_SOURCE_INIT( RicImportEnsembleFractureStatisticsFeature, "RicImportEnsem QString RicImportEnsembleFractureStatisticsFeature::m_pathFilter = "*"; QString RicImportEnsembleFractureStatisticsFeature::m_fileNameFilter = "*"; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEnsembleFractureStatisticsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h index 65a8445650..ea730a16c0 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicImportEnsembleFractureStatisticsFeature.h @@ -40,7 +40,6 @@ public: protected: static void importSingleEnsembleFractureStatistics( const QStringList& fileNames ); - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp index 77fb77879c..6b42aee199 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.cpp @@ -74,7 +74,7 @@ void RicNewFishbonesSubsAtMeasuredDepthFeature::setupActionLook( QAction* action //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() +bool RicNewFishbonesSubsAtMeasuredDepthFeature::isCommandEnabled() const { return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h index 9d550c5ef2..b4851f1b73 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsAtMeasuredDepthFeature.h @@ -30,5 +30,5 @@ class RicNewFishbonesSubsAtMeasuredDepthFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp index 3103c2c8e4..f14a192f7f 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.cpp @@ -131,7 +131,7 @@ void RicNewFishbonesSubsFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewFishbonesSubsFeature::isCommandEnabled() +bool RicNewFishbonesSubsFeature::isCommandEnabled() const { return selectedFishbonesCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h index 1de111fe0e..2912c95f55 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewFishbonesSubsFeature.h @@ -35,7 +35,7 @@ public: protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; private: static RimFishbonesCollection* selectedFishbonesCollection(); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.cpp index d60ffc3dae..d8cee714d3 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.cpp @@ -77,7 +77,7 @@ void RicNewPerforationIntervalAtMeasuredDepthFeature::setupActionLook( QAction* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPerforationIntervalAtMeasuredDepthFeature::isCommandEnabled() +bool RicNewPerforationIntervalAtMeasuredDepthFeature::isCommandEnabled() const { return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.h index e70afc4370..2f16ad98ef 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalAtMeasuredDepthFeature.h @@ -32,5 +32,5 @@ class RicNewPerforationIntervalAtMeasuredDepthFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.cpp index bf71d02530..b643b18762 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicNewPerforationIntervalFeature, "RicNewPerforationInterva //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPerforationIntervalFeature::isCommandEnabled() +bool RicNewPerforationIntervalFeature::isCommandEnabled() const { return selectedPerforationCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.h index d74c680b6a..fe6b8674b4 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewPerforationIntervalFeature.h @@ -31,10 +31,10 @@ class RicNewPerforationIntervalFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimPerforationCollection* selectedPerforationCollection(); + static RimPerforationCollection* selectedPerforationCollection(); }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp index 0a6e0b17a3..bd16c33b13 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.cpp @@ -171,14 +171,6 @@ RimStimPlanModelPlot* RicNewStimPlanModelPlotFeature::createPlot( RimStimPlanMod return plot; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewStimPlanModelPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.h index ed2586fef3..a9d315587a 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewStimPlanModelPlotFeature.h @@ -43,7 +43,6 @@ public: static RimStimPlanModelPlot* createPlot( RimStimPlanModel* stimPlanModel ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.cpp index 763fc0dfb1..db6da1b4e8 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.cpp @@ -88,7 +88,7 @@ void RicNewValveAtMeasuredDepthFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewValveAtMeasuredDepthFeature::isCommandEnabled() +bool RicNewValveAtMeasuredDepthFeature::isCommandEnabled() const { auto wellPathSelectionItem = RiuWellPathSelectionItem::wellPathSelectionItem(); return wellPathSelectionItem && dynamic_cast( wellPathSelectionItem->m_wellPathComponent ); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.h index ea65cfcc95..7572ef7c47 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveAtMeasuredDepthFeature.h @@ -30,5 +30,5 @@ class RicNewValveAtMeasuredDepthFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.cpp index f0a0d94e8b..f450a565ff 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.cpp @@ -16,7 +16,7 @@ CAF_CMD_SOURCE_INIT( RicNewValveFeature, "RicNewValveFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewValveFeature::isCommandEnabled() +bool RicNewValveFeature::isCommandEnabled() const { std::vector allSelectedItems; caf::SelectionManager::instance()->selectedItems( allSelectedItems ); diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.h index 38663edfa6..0bbc743cd5 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveFeature.h @@ -28,7 +28,7 @@ class RicNewValveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.cpp index 4b439bdddf..30f846cf87 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.cpp @@ -120,11 +120,3 @@ void RicNewValveTemplateFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/ICDValve16x16.png" ) ); actionToSetup->setText( "New Valve Template" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewValveTemplateFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.h index 61512d8b00..3ca8d74d8d 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicNewValveTemplateFeature.h @@ -41,5 +41,4 @@ protected: static RimValveTemplate* createNewValveTemplate(); void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.cpp b/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.cpp index efc678210e..ac91ac40f7 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.cpp @@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicWellPathImportPerforationIntervalsFeature, "RicWellPathI //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicWellPathImportPerforationIntervalsFeature::isCommandEnabled() +bool RicWellPathImportPerforationIntervalsFeature::isCommandEnabled() const { return RicWellPathImportPerforationIntervalsFeature::selectedWellPathCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.h b/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.h index 88ea29f586..8bc5c5972a 100644 --- a/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.h +++ b/ApplicationLibCode/Commands/CompletionCommands/RicWellPathImportPerforationIntervalsFeature.h @@ -30,7 +30,7 @@ class RicWellPathImportPerforationIntervalsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp index 8c51c76c50..c649af87cf 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicExportCompletionsForTemporaryLgrsFeature, "RicExportComp //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportCompletionsForTemporaryLgrsFeature::isCommandEnabled() +bool RicExportCompletionsForTemporaryLgrsFeature::isCommandEnabled() const { if ( wellPathsAssociatedWithLgrs().empty() ) { diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.h index 75d48ac10b..3745925820 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForTemporaryLgrsFeature.h @@ -32,7 +32,7 @@ class RicExportCompletionsForTemporaryLgrsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp index 912fe72875..276b9b3895 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicExportCompletionsForVisibleSimWellsFeature, "RicExportCo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportCompletionsForVisibleSimWellsFeature::isCommandEnabled() +bool RicExportCompletionsForVisibleSimWellsFeature::isCommandEnabled() const { std::vector simWells = visibleSimWells(); diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h index 24b91245df..973fa317ce 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleSimWellsFeature.h @@ -30,10 +30,10 @@ class RicExportCompletionsForVisibleSimWellsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - std::vector visibleSimWells(); + static std::vector visibleSimWells(); }; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp index 9609e0bb93..dd77bb0a27 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicExportCompletionsForVisibleWellPathsFeature, "RicExportC //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportCompletionsForVisibleWellPathsFeature::isCommandEnabled() +bool RicExportCompletionsForVisibleWellPathsFeature::isCommandEnabled() const { bool foundWellPathCollection = false; std::vector selectedObjects; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.h index d0965858c8..e7952f0b93 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsForVisibleWellPathsFeature.h @@ -31,7 +31,7 @@ class RicExportCompletionsForVisibleWellPathsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.cpp index 0b3488b85b..95ae5dd63d 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.cpp @@ -130,7 +130,7 @@ void RicExportCompletionsWellSegmentsFeature::setupActionLook( QAction* actionTo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportCompletionsWellSegmentsFeature::isCommandEnabled() +bool RicExportCompletionsWellSegmentsFeature::isCommandEnabled() const { if ( caf::SelectionManager::instance()->selectedItemAncestorOfType() ) { diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.h index 1abc3eb013..6b78db3b8f 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicExportCompletionsWellSegmentsFeature.h @@ -36,5 +36,5 @@ class RicExportCompletionsWellSegmentsFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp index 784b11e688..9a4ce31232 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.cpp @@ -202,7 +202,7 @@ void RicWellPathExportCompletionDataFeature::prepareExportSettingsAndExportCompl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicWellPathExportCompletionDataFeature::isCommandEnabled() +bool RicWellPathExportCompletionDataFeature::isCommandEnabled() const { std::vector wellPaths = selectedWellPaths(); diff --git a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h index f8ed746b01..b74182ec34 100644 --- a/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h +++ b/ApplicationLibCode/Commands/CompletionExportCommands/RicWellPathExportCompletionDataFeature.h @@ -36,10 +36,10 @@ public: const std::vector& simWells ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - std::vector selectedWellPaths(); + static std::vector selectedWellPaths(); }; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.cpp b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.cpp index 8464071282..d3e80c8650 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicNewCorrelationMatrixPlotFeature, "RicNewCorrelationMatri //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewCorrelationMatrixPlotFeature::isCommandEnabled() +bool RicNewCorrelationMatrixPlotFeature::isCommandEnabled() const { if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.h b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.h index ccefe65f41..c0daf3eb33 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.h +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationMatrixPlotFeature.h @@ -28,7 +28,7 @@ class RicNewCorrelationMatrixPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.cpp b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.cpp index f28e90624e..ddf7f48e2f 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicNewCorrelationPlotFeature, "RicNewCorrelationPlotFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewCorrelationPlotFeature::isCommandEnabled() +bool RicNewCorrelationPlotFeature::isCommandEnabled() const { if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.h b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.h index feca8d1215..45412207e0 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.h +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationPlotFeature.h @@ -53,7 +53,7 @@ class RicNewCorrelationPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.cpp b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.cpp index 07e3994e5d..19e810e676 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicNewCorrelationReportPlotFeature, "RicNewCorrelationRepor //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewCorrelationReportPlotFeature::isCommandEnabled() +bool RicNewCorrelationReportPlotFeature::isCommandEnabled() const { if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.h b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.h index 7e907c54c7..22cd043226 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.h +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewCorrelationReportPlotFeature.h @@ -28,7 +28,7 @@ class RicNewCorrelationReportPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.cpp b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.cpp index b28c0e5479..9f4b0cc049 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewParameterResultCrossPlotFeature, "RicNewParameterResu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewParameterResultCrossPlotFeature::isCommandEnabled() +bool RicNewParameterResultCrossPlotFeature::isCommandEnabled() const { if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; if ( caf::firstAncestorOfTypeFromSelectedObject() ) return true; diff --git a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.h b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.h index e602879035..ac750e74f4 100644 --- a/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/CorrelationPlotCommands/RicNewParameterResultCrossPlotFeature.h @@ -28,7 +28,7 @@ class RicNewParameterResultCrossPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp index e71df61fe2..58e988fd00 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp +++ b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicAppendIntersectionFeature, "RicAppendIntersectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAppendIntersectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h index d4d787b9a9..382e13ffd7 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h +++ b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendIntersectionFeature.h @@ -50,7 +50,6 @@ class RicAppendIntersectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.cpp b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.cpp index 0f9a158373..afadba72d0 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.cpp +++ b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicAppendSeparateIntersectionResultFeature, "RicAppendSeparateIntersectionResultFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAppendSeparateIntersectionResultFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.h b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.h index c45b54aa48..fca51e6bc5 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.h +++ b/ApplicationLibCode/Commands/CrossSectionCommands/RicAppendSeparateIntersectionResultFeature.h @@ -49,7 +49,6 @@ class RicAppendSeparateIntersectionResultFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/CrossSectionCommands/RicCopyIntersectionsToAllViewsInCaseFeature.cpp b/ApplicationLibCode/Commands/CrossSectionCommands/RicCopyIntersectionsToAllViewsInCaseFeature.cpp index dd331606e4..372d01bc64 100644 --- a/ApplicationLibCode/Commands/CrossSectionCommands/RicCopyIntersectionsToAllViewsInCaseFeature.cpp +++ b/ApplicationLibCode/Commands/CrossSectionCommands/RicCopyIntersectionsToAllViewsInCaseFeature.cpp @@ -57,7 +57,7 @@ static RimCase* commonGridCase( std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) @@ -100,7 +100,7 @@ void RicEclipseWellShowHeadFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowHeadFeature::isCommandEnabled() +bool RicEclipseWellShowHeadFeature::isCommandEnabled() const { return RicEclipseWellFeatureImpl::isAnyWellSelected(); } @@ -108,7 +108,7 @@ bool RicEclipseWellShowHeadFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowHeadFeature::isCommandChecked() +bool RicEclipseWellShowHeadFeature::isCommandChecked() const { std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) @@ -148,7 +148,7 @@ void RicEclipseWellShowPipeFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowPipeFeature::isCommandEnabled() +bool RicEclipseWellShowPipeFeature::isCommandEnabled() const { return RicEclipseWellFeatureImpl::isAnyWellSelected(); } @@ -156,7 +156,7 @@ bool RicEclipseWellShowPipeFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowPipeFeature::isCommandChecked() +bool RicEclipseWellShowPipeFeature::isCommandChecked() const { std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) @@ -196,7 +196,7 @@ void RicEclipseWellShowSpheresFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowSpheresFeature::isCommandEnabled() +bool RicEclipseWellShowSpheresFeature::isCommandEnabled() const { return RicEclipseWellFeatureImpl::isAnyWellSelected(); } @@ -204,7 +204,7 @@ bool RicEclipseWellShowSpheresFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowSpheresFeature::isCommandChecked() +bool RicEclipseWellShowSpheresFeature::isCommandChecked() const { std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) @@ -244,7 +244,7 @@ void RicEclipseWellShowWellCellsFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowWellCellsFeature::isCommandEnabled() +bool RicEclipseWellShowWellCellsFeature::isCommandEnabled() const { return RicEclipseWellFeatureImpl::isAnyWellSelected(); } @@ -252,7 +252,7 @@ bool RicEclipseWellShowWellCellsFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowWellCellsFeature::isCommandChecked() +bool RicEclipseWellShowWellCellsFeature::isCommandChecked() const { std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) @@ -292,7 +292,7 @@ void RicEclipseWellShowWellCellFenceFeature::setupActionLook( QAction* actionToS //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowWellCellFenceFeature::isCommandEnabled() +bool RicEclipseWellShowWellCellFenceFeature::isCommandEnabled() const { return RicEclipseWellFeatureImpl::isAnyWellSelected(); } @@ -300,7 +300,7 @@ bool RicEclipseWellShowWellCellFenceFeature::isCommandEnabled() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseWellShowWellCellFenceFeature::isCommandChecked() +bool RicEclipseWellShowWellCellFenceFeature::isCommandChecked() const { std::vector selection = RicEclipseWellFeatureImpl::selectedWells(); if ( selection.size() > 0 ) diff --git a/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h index 95f08ccede..19e4e4e65a 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h +++ b/ApplicationLibCode/Commands/EclipseCommands/EclipseWell/RicEclipseWellShowFeatures.h @@ -30,8 +30,8 @@ class RicEclipseWellShowLabelFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -44,8 +44,8 @@ class RicEclipseWellShowHeadFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -58,8 +58,8 @@ class RicEclipseWellShowPipeFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -72,8 +72,8 @@ class RicEclipseWellShowSpheresFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -86,8 +86,8 @@ class RicEclipseWellShowWellCellsFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; //================================================================================================== @@ -100,6 +100,6 @@ class RicEclipseWellShowWellCellFenceFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; - bool isCommandChecked() override; + bool isCommandEnabled() const override; + bool isCommandChecked() const override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp index e8b7628864..d233fa6533 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.cpp @@ -45,7 +45,7 @@ CAF_CMD_SOURCE_INIT( RicAddEclipseInputPropertyFeature, "RicAddEclipseInputPrope //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAddEclipseInputPropertyFeature::isCommandEnabled() +bool RicAddEclipseInputPropertyFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() || caf::SelectionManager::instance()->selectedItemOfType() || diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.h index fd25216bf6..401942e2fa 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddEclipseInputPropertyFeature.h @@ -31,7 +31,7 @@ class RicAddEclipseInputPropertyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.cpp index 63130133fc..77f6036897 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicAddGridCalculationFeature, "RicAddGridCalculationFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAddGridCalculationFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.h index dac7d32cf0..9d071a78e7 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicAddGridCalculationFeature.h @@ -28,7 +28,6 @@ class RicAddGridCalculationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp index 8a9a378d44..511369b8ee 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicApplyPropertyFilterAsCellResultFeature, "RicApplyPropert //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicApplyPropertyFilterAsCellResultFeature::isCommandEnabled() +bool RicApplyPropertyFilterAsCellResultFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h index e68bdb2824..75c177cf39 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicApplyPropertyFilterAsCellResultFeature.h @@ -28,7 +28,7 @@ class RicApplyPropertyFilterAsCellResultFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.cpp index 7dd34e44da..d92e133580 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicComputeStatisticsFeature, "RicComputeStatisticsFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicComputeStatisticsFeature::isCommandEnabled() +bool RicComputeStatisticsFeature::isCommandEnabled() const { std::vector selection = selectedCases(); if ( selection.size() > 0 ) diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.h index e8bfda31b2..4d87a8b8d8 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicComputeStatisticsFeature.h @@ -33,10 +33,10 @@ class RicComputeStatisticsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - std::vector selectedCases(); + static std::vector selectedCases(); }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.cpp index 4714318bb9..7cf5ad207c 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.cpp @@ -33,14 +33,6 @@ CAF_CMD_SOURCE_INIT( RicCreateGridCaseGroupFromFilesFeature, "RicCreateGridCaseGroupFromFilesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateGridCaseGroupFromFilesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.h index a95e8c5a81..70733c86a8 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicCreateGridCaseGroupFromFilesFeature.h @@ -37,7 +37,6 @@ class RicCreateGridCaseGroupFromFilesFeature : public caf::CmdFeature } protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.cpp index c27874a0b3..3173c9f6fd 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicEclipseCaseNewGroupFeature, "RicEclipseCaseNewGroupFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseCaseNewGroupFeature::isCommandEnabled() +bool RicEclipseCaseNewGroupFeature::isCommandEnabled() const { std::vector caseSelection; caf::SelectionManager::instance()->objectsByType( &caseSelection ); diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.h index 56eb99dbdc..4e81b05ed0 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseCaseNewGroupFeature.h @@ -29,7 +29,7 @@ class RicEclipseCaseNewGroupFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.cpp index 83dcdcbce7..75043349ea 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicEclipseHideFaultFeature, "RicEclipseHideFaultFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseHideFaultFeature::isCommandEnabled() +bool RicEclipseHideFaultFeature::isCommandEnabled() const { Rim3dView* view = RiaApplication::instance()->activeReservoirView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.h index b3441a4582..02f97cc1b2 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseHideFaultFeature.h @@ -28,7 +28,7 @@ class RicEclipseHideFaultFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.cpp index 5a7c3765e3..f15a8aadb3 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterInsertFeature, "RicEclipsePropertyF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled() +bool RicEclipsePropertyFilterInsertFeature::isCommandEnabled() const { std::vector propertyFilters = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilters(); if ( propertyFilters.size() == 1 ) diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.h index 50e239928a..53762e8238 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterInsertFeature.h @@ -29,7 +29,7 @@ class RicEclipsePropertyFilterInsertFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.cpp index 6b955462df..9aed59540a 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterNewFeature, "RicEclipsePropertyFilt //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipsePropertyFilterNewFeature::isCommandEnabled() +bool RicEclipsePropertyFilterNewFeature::isCommandEnabled() const { std::vector filterCollections = RicEclipsePropertyFilterFeatureImpl::selectedPropertyFilterCollections(); diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.h index d9d6a43478..86407ef0cf 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewFeature.h @@ -29,7 +29,7 @@ class RicEclipsePropertyFilterNewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.cpp index 0ba99ec752..8aae89f016 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicEclipsePropertyFilterNewInViewFeature, "RicEclipseProper //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled() +bool RicEclipsePropertyFilterNewInViewFeature::isCommandEnabled() const { Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.h index 1374a92c08..f186f525ff 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipsePropertyFilterNewInViewFeature.h @@ -28,7 +28,7 @@ class RicEclipsePropertyFilterNewInViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.cpp index 292c4b7ece..fada5b5464 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicEclipseShowOnlyFaultFeature, "RicEclipseShowOnlyFaultFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEclipseShowOnlyFaultFeature::isCommandEnabled() +bool RicEclipseShowOnlyFaultFeature::isCommandEnabled() const { Rim3dView* view = RiaApplication::instance()->activeReservoirView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.h index d4325fee94..8a60ca956b 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicEclipseShowOnlyFaultFeature.h @@ -28,7 +28,7 @@ class RicEclipseShowOnlyFaultFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.cpp index 01cc5f19f0..4133ef4320 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.cpp @@ -33,14 +33,6 @@ CAF_CMD_SOURCE_INIT( RicImportEclipseCaseFeature, "RicImportEclipseCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEclipseCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.h index 61e5e13cf1..727bf8e286 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseFeature.h @@ -29,7 +29,6 @@ class RicImportEclipseCaseFeature : public RicImportGeneralDataFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.cpp index d3c4eabebd..bf44072d1f 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.cpp @@ -61,11 +61,3 @@ void RicImportEclipseCaseTimeStepFilterFeature::setupActionLook( QAction* action actionToSetup->setIcon( QIcon( ":/Case48x48.png" ) ); actionToSetup->setText( "Import Eclipse Case (Time Step Filtered)" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEclipseCaseTimeStepFilterFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.h index e984bcc82c..70155239c7 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCaseTimeStepFilterFeature.h @@ -32,5 +32,4 @@ class RicImportEclipseCaseTimeStepFilterFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.cpp index f16aa49ec7..9196e2fe95 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.cpp @@ -36,14 +36,6 @@ CAF_CMD_SOURCE_INIT( RicImportEclipseCasesFeature, "RicImportEclipseCasesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEclipseCasesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.h index 82a0e499df..8c004fde63 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportEclipseCasesFeature.h @@ -38,7 +38,6 @@ public: } protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.cpp index 21eba4b616..f041490ca3 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.cpp @@ -23,14 +23,6 @@ CAF_CMD_SOURCE_INIT( RicImportInputEclipseCaseFeature, "RicImportInputEclipseCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportInputEclipseCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.h index a372c1d75b..6bdfe6aebd 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportInputEclipseCaseFeature.h @@ -29,7 +29,6 @@ class RicImportInputEclipseCaseFeature : public RicImportGeneralDataFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.cpp index 287f6e7ded..eb6593419b 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.cpp @@ -22,14 +22,6 @@ CAF_CMD_SOURCE_INIT( RicImportRoffCaseFeature, "RicImportRoffCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportRoffCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.h index c4b5fa9163..304c4fd546 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicImportRoffCaseFeature.h @@ -28,7 +28,6 @@ class RicImportRoffCaseFeature : public RicImportGeneralDataFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.cpp index b91e11de9c..4a7d90d6e7 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicNewStatisticsCaseFeature, "RicNewStatisticsCaseFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewStatisticsCaseFeature::isCommandEnabled() +bool RicNewStatisticsCaseFeature::isCommandEnabled() const { return selectedValidUIItem() != nullptr; } diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.h index 52901d14cc..878a5abcec 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicNewStatisticsCaseFeature.h @@ -38,11 +38,11 @@ class RicNewStatisticsCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - caf::PdmUiItem* selectedValidUIItem(); - RimEclipseStatisticsCase* addStatisticalCalculation( caf::PdmUiItem* uiItem ); + static caf::PdmUiItem* selectedValidUIItem(); + static RimEclipseStatisticsCase* addStatisticalCalculation( caf::PdmUiItem* uiItem ); }; diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.cpp b/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.cpp index c225f3fa2a..34414dcfad 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.cpp +++ b/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicRenameCaseFeature, "RicRenameCaseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicRenameCaseFeature::isCommandEnabled() +bool RicRenameCaseFeature::isCommandEnabled() const { auto rimCase = caf::SelectionManager::instance()->selectedItemOfType(); return ( rimCase != nullptr ); diff --git a/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.h b/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.h index 66937f5979..03e682d87e 100644 --- a/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.h +++ b/ApplicationLibCode/Commands/EclipseCommands/RicRenameCaseFeature.h @@ -25,7 +25,7 @@ class RicRenameCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp index f0588c4ea7..4ad61eee79 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.cpp @@ -55,7 +55,7 @@ CAF_CMD_SOURCE_INIT( RicAdvancedSnapshotExportFeature, "RicAdvancedSnapshotExpor //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAdvancedSnapshotExportFeature::isCommandEnabled() +bool RicAdvancedSnapshotExportFeature::isCommandEnabled() const { RimProject* proj = RimProject::current(); diff --git a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.h index 4692ccbef4..760b714b87 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicAdvancedSnapshotExportFeature.h @@ -33,7 +33,7 @@ class RicAdvancedSnapshotExportFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.cpp index bd4246d54a..8db1a3563f 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.cpp @@ -43,14 +43,6 @@ CAF_CMD_SOURCE_INIT( RicCreateDepthAdjustedLasFilesFeature, "RicCreateDepthAdjustedLasFilesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateDepthAdjustedLasFilesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.h index 669bff706f..e864212bab 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicCreateDepthAdjustedLasFilesFeature.h @@ -36,7 +36,6 @@ public: RicCreateDepthAdjustedLasFilesFeature() = default; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.cpp index 8f0463d601..8d43308cf6 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicExportCarfin, "RicExportCarfin" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportCarfin::isCommandEnabled() +bool RicExportCarfin::isCommandEnabled() const { return RicExportCarfin::selectedCase() != nullptr; } diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.h b/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.h index 854fd2bdae..e084509baf 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportCarfin.h @@ -30,7 +30,7 @@ class RicExportCarfin : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp index 914ad9e0b8..e7dc3a7923 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.cpp @@ -261,7 +261,7 @@ std::pair RicExportEclipseSectorModelFeature::getVisible //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportEclipseSectorModelFeature::isCommandEnabled() +bool RicExportEclipseSectorModelFeature::isCommandEnabled() const { return selectedView() != nullptr; } diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.h index dfa7cfa595..1b0601d08e 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportEclipseSectorModelFeature.h @@ -40,7 +40,7 @@ public: static std::pair getVisibleCellRange( RimEclipseView* view, const cvf::UByteArray& cellVisibility ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.cpp index 6a24a72126..a215d537c7 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicExportFaultsFeature, "RicExportFaultsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportFaultsFeature::isCommandEnabled() +bool RicExportFaultsFeature::isCommandEnabled() const { std::vector selectedFaults; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.h index f998d1fdd2..48a7d13d86 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportFaultsFeature.h @@ -35,7 +35,7 @@ class RicExportFaultsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.cpp index b85120965d..9bee0f908d 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.cpp @@ -760,7 +760,7 @@ std::vector RicExportLgrFeature::allIntersectedCells( //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportLgrFeature::isCommandEnabled() +bool RicExportLgrFeature::isCommandEnabled() const { std::vector completions = caf::selectedObjectsByTypeStrict(); std::vector wellPaths = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.h index 7bd566bb2f..b0ed25ef21 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportLgrFeature.h @@ -178,7 +178,7 @@ class RicExportLgrFeature : public caf::CmdFeature static std::map> createLgrInfoListForTemporaryLgrs( const RigMainGrid* mainGrid ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.cpp index 9b0ef3799b..6cd44b54af 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.cpp @@ -202,7 +202,7 @@ void RicExportSelectedWellPathsFeature::exportWellPathsToFile( const std::vector //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportSelectedWellPathsFeature::isCommandEnabled() +bool RicExportSelectedWellPathsFeature::isCommandEnabled() const { std::vector wellPaths = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.h index 8e0e8c579d..b0934b20be 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportSelectedWellPathsFeature.h @@ -77,7 +77,7 @@ private: bool showTextMdRkb, bool writeProjectInfo ); - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.cpp index 6691cd296b..59ceedc92a 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.cpp @@ -118,7 +118,7 @@ std::vector RicExportToLasFileFeature::exportToLasFiles( const QString& //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportToLasFileFeature::isCommandEnabled() +bool RicExportToLasFileFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.h index ce19639d20..be0eaa009a 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportToLasFileFeature.h @@ -56,7 +56,7 @@ public: bool convertCurveUnits ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp index d10b899d3b..8ff9fffca6 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicExportVisibleWellPathsFeature, "RicExportVisibleWellPath //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportVisibleWellPathsFeature::isCommandEnabled() +bool RicExportVisibleWellPathsFeature::isCommandEnabled() const { std::vector selectedWellPaths = caf::selectedObjectsByTypeStrict(); std::vector visibleWellPaths = RicExportCompletionsForVisibleWellPathsFeature::visibleWellPaths(); diff --git a/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.h index edf577c8fc..0ffe7059c2 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicExportVisibleWellPathsFeature.h @@ -39,7 +39,7 @@ class RicExportVisibleWellPathsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.cpp index dd567c2837..140cf0f19e 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicSaveEclipseInputPropertyFeature, "RicSaveEclipseInputPro //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSaveEclipseInputPropertyFeature::isCommandEnabled() +bool RicSaveEclipseInputPropertyFeature::isCommandEnabled() const { return selectedInputProperty() != nullptr; } diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.h index 5b2fed9b9f..35cd008734 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputPropertyFeature.h @@ -31,7 +31,7 @@ class RicSaveEclipseInputPropertyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp index 2d2976ef7b..61d5d74cf4 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.cpp @@ -109,7 +109,7 @@ void RicSaveEclipseInputVisibleCellsFeature::executeCommand( RimEclipseView* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSaveEclipseInputVisibleCellsFeature::isCommandEnabled() +bool RicSaveEclipseInputVisibleCellsFeature::isCommandEnabled() const { return selectedView() != nullptr; } @@ -155,7 +155,7 @@ RimEclipseView* RicSaveEclipseInputVisibleCellsFeature::selectedView() const //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSaveEclipseInputActiveVisibleCellsFeature::isCommandEnabled() +bool RicSaveEclipseInputActiveVisibleCellsFeature::isCommandEnabled() const { return selectedView() != nullptr; } diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.h index 8e4ed39d04..701ed4ce66 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseInputVisibleCellsFeature.h @@ -35,7 +35,7 @@ public: static void executeCommand( RimEclipseView* view, const RicSaveEclipseInputVisibleCellsUi& exportSettings, const QString& logPrefix ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; @@ -51,7 +51,7 @@ class RicSaveEclipseInputActiveVisibleCellsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp index f1dd69cd11..27ff26434c 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicSaveEclipseResultAsInputPropertyFeature, "RicSaveEclipse //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSaveEclipseResultAsInputPropertyFeature::isCommandEnabled() +bool RicSaveEclipseResultAsInputPropertyFeature::isCommandEnabled() const { return selectedEclipseCellColors() != nullptr || selectedEclipseView() != nullptr; } diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.h index 3fbe1c0c51..9a4a6b91d1 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSaveEclipseResultAsInputPropertyFeature.h @@ -32,7 +32,7 @@ class RicSaveEclipseResultAsInputPropertyFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp index dc0f70b5be..a3092c4751 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.cpp @@ -115,14 +115,6 @@ void RicSnapshotAllPlotsToFileFeature::exportSnapshotOfPlotsIntoFolder( const QS } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSnapshotAllPlotsToFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h index 4fc2a47035..658bdac2ae 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllPlotsToFileFeature.h @@ -39,7 +39,6 @@ public: const QString& preferredFileSuffix = ".png" ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp index 0b74561329..c7adbdfbbd 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.cpp @@ -145,14 +145,6 @@ void RicSnapshotAllViewsToFileFeature::exportSnapshotOfViewsIntoFolder( const QS } } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSnapshotAllViewsToFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h index 162fb4c844..c95b5d4698 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotAllViewsToFileFeature.h @@ -33,7 +33,6 @@ public: exportSnapshotOfViewsIntoFolder( const QString& snapshotFolderName, const QString& prefix = "", int caseId = -1, int viewId = -1 ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp index e9311791d3..0d69fb9d71 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.cpp @@ -65,14 +65,6 @@ QString RicSnapshotViewToClipboardFeature::text() return "Snapshot To Clipboard"; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSnapshotViewToClipboardFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.h index 997ca50e08..d04fdd06ac 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToClipboardFeature.h @@ -36,7 +36,6 @@ public: static QString text(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp index 61b40fe9d5..efbf0ca313 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.cpp @@ -224,14 +224,6 @@ QString RicSnapshotViewToFileFeature::text() return "Snapshot To File"; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSnapshotViewToFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h index ccc566f263..9eb446ab59 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToFileFeature.h @@ -44,7 +44,6 @@ public: static QString text(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp index a7f954a735..649c46b8fe 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicSnapshotViewToPdfFeature, "RicSnapshotViewToPdfFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicSnapshotViewToPdfFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.h b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.h index dfe38821a6..eaceab3906 100644 --- a/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.h +++ b/ApplicationLibCode/Commands/ExportCommands/RicSnapshotViewToPdfFeature.h @@ -32,7 +32,6 @@ class RicSnapshotViewToPdfFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp index 5964e98d5e..3d9d0aea24 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicAddStoredFlowCharacteristicsPlotFeature, "RicAddStoredFl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAddStoredFlowCharacteristicsPlotFeature::isCommandEnabled() +bool RicAddStoredFlowCharacteristicsPlotFeature::isCommandEnabled() const { RimFlowPlotCollection* flowPlotColl = RimMainPlotCollection::current()->flowPlotCollection(); if ( flowPlotColl ) diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.h index 0b06865f89..bff0a7ed73 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredFlowCharacteristicsPlotFeature.h @@ -28,7 +28,7 @@ class RicAddStoredFlowCharacteristicsPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp index a3e14c40b1..9e2f4b0395 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicAddStoredWellAllocationPlotFeature, "RicAddStoredWellAll //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled() +bool RicAddStoredWellAllocationPlotFeature::isCommandEnabled() const { RimFlowPlotCollection* flowPlotColl = RimMainPlotCollection::current()->flowPlotCollection(); if ( flowPlotColl ) diff --git a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h index 9fb82f09ad..c00165611f 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicAddStoredWellAllocationPlotFeature.h @@ -28,7 +28,7 @@ class RicAddStoredWellAllocationPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp index 96093b1472..83f12609a5 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.cpp @@ -53,7 +53,7 @@ CAF_CMD_SOURCE_INIT( RicPlotProductionRateFeature, "RicPlotProductionRateFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPlotProductionRateFeature::isCommandEnabled() +bool RicPlotProductionRateFeature::isCommandEnabled() const { std::vector collection; caf::SelectionManager::instance()->objectsByType( &collection ); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.h index d3a1ab4f0e..97dbf1df4f 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicPlotProductionRateFeature.h @@ -36,7 +36,7 @@ class RicPlotProductionRateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp index b44b63c4b0..cb623ac95d 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicShowContributingWellsFeature, "RicShowContributingWellsF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowContributingWellsFeature::isCommandEnabled() +bool RicShowContributingWellsFeature::isCommandEnabled() const { std::vector collection; caf::SelectionManager::instance()->objectsByType( &collection ); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.h index 58bf8f5cc5..b6a2973792 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFeature.h @@ -28,7 +28,7 @@ class RicShowContributingWellsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp index faf3b7c1fb..83a86478bc 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicShowContributingWellsFromPlotFeature, "RicShowContributi //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowContributingWellsFromPlotFeature::isCommandEnabled() +bool RicShowContributingWellsFromPlotFeature::isCommandEnabled() const { RimWellAllocationPlot* wellAllocationPlot = dynamic_cast( RiaGuiApplication::instance()->activePlotWindow() ); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h index bab77819f8..c426ae306c 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowContributingWellsFromPlotFeature.h @@ -28,7 +28,7 @@ class RicShowContributingWellsFromPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.cpp index 1b218d6755..43ea8e6e47 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicShowCumulativePhasePlotFeature, "RicShowCumulativePhaseP //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowCumulativePhasePlotFeature::isCommandEnabled() +bool RicShowCumulativePhasePlotFeature::isCommandEnabled() const { auto plot = caf::SelectionManager::instance()->selectedItemAncestorOfType(); if ( plot != nullptr ) return true; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.h index b7cf1f6eb2..5444616d46 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowCumulativePhasePlotFeature.h @@ -32,7 +32,7 @@ class RicShowCumulativePhasePlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp index bb3a5c60b9..05a687a2b1 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.cpp @@ -53,7 +53,7 @@ RimEclipseResultCase* activeEclipseResultCase() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowFlowCharacteristicsPlotFeature::isCommandEnabled() +bool RicShowFlowCharacteristicsPlotFeature::isCommandEnabled() const { RimEclipseResultCase* eclCase = activeEclipseResultCase(); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h index 496641b964..530619dfe1 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowFlowCharacteristicsPlotFeature.h @@ -28,7 +28,7 @@ class RicShowFlowCharacteristicsPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp index a4cd2e8a39..c028e893b8 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicShowTotalAllocationDataFeature, "RicShowTotalAllocationD //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowTotalAllocationDataFeature::isCommandEnabled() +bool RicShowTotalAllocationDataFeature::isCommandEnabled() const { std::set wellAllocPlots = RicShowTotalAllocationDataFeature::selectedWellAllocationPlots(); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h index 6a67ca41a0..933b87a1ac 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowTotalAllocationDataFeature.h @@ -32,7 +32,7 @@ class RicShowTotalAllocationDataFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp b/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp index 1009262249..191d70a879 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicShowWellAllocationPlotFeature, "RicShowWellAllocationPlo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowWellAllocationPlotFeature::isCommandEnabled() +bool RicShowWellAllocationPlotFeature::isCommandEnabled() const { std::vector simWellCollection; caf::SelectionManager::instance()->objectsByType( &simWellCollection ); diff --git a/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h b/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h index ab138f6d35..ee760713b0 100644 --- a/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h +++ b/ApplicationLibCode/Commands/FlowCommands/RicShowWellAllocationPlotFeature.h @@ -28,7 +28,7 @@ class RicShowWellAllocationPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.cpp index c1a43fdbea..fa77ac79de 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.cpp @@ -71,11 +71,3 @@ void RicConvertAllFractureTemplatesToFieldFeature::setupActionLook( QAction* act { actionToSetup->setText( "Convert All Ellipse Fracture Templates to Field" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicConvertAllFractureTemplatesToFieldFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.h index 7c83d02b4a..abcf767e11 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToFieldFeature.h @@ -32,5 +32,4 @@ class RicConvertAllFractureTemplatesToFieldFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.cpp index aa82a57c4d..c23425e58f 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.cpp @@ -71,11 +71,3 @@ void RicConvertAllFractureTemplatesToMetricFeature::setupActionLook( QAction* ac { actionToSetup->setText( "Convert All Ellipse Fracture Templates to Metric" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicConvertAllFractureTemplatesToMetricFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.h index 0d31889e7a..956075b707 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicConvertAllFractureTemplatesToMetricFeature.h @@ -32,5 +32,4 @@ class RicConvertAllFractureTemplatesToMetricFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp index 8baf9db5b9..e79d3fdc8a 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.cpp @@ -104,11 +104,3 @@ void RicCreateDuplicateTemplateInOtherUnitSystemFeature::setupActionLook( QActio actionToSetup->setText( text ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateDuplicateTemplateInOtherUnitSystemFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h index a83b726558..476cc22ce5 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicCreateDuplicateTemplateInOtherUnitSystemFeature.h @@ -32,5 +32,4 @@ class RicCreateDuplicateTemplateInOtherUnitSystemFeature : public caf::CmdFeatur protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp index c564ae2a98..a2c12c1c32 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.cpp @@ -266,7 +266,7 @@ void RicCreateMultipleFracturesFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateMultipleFracturesFeature::isCommandEnabled() +bool RicCreateMultipleFracturesFeature::isCommandEnabled() const { std::vector selWells = caf::selectedObjectsByTypeStrict(); return !selWells.empty(); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.h index e363e1ecd6..024d65e6ec 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicCreateMultipleFracturesFeature.h @@ -56,7 +56,7 @@ private slots: private: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; RiuCreateMultipleFractionsUi* multipleFractionsUi() const; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.cpp index f2adca6e70..bb5e1354ec 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.cpp @@ -60,7 +60,7 @@ void RicDeleteOptionItemFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteOptionItemFeature::isCommandEnabled() +bool RicDeleteOptionItemFeature::isCommandEnabled() const { std::vector optionItems; caf::SelectionManager::instance()->objectsByType( &optionItems, caf::SelectionManager::FIRST_LEVEL ); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.h index 1cf7291763..95eccdac29 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicDeleteOptionItemFeature.h @@ -28,7 +28,7 @@ class RicDeleteOptionItemFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void setupActionLook( QAction* actionToSetup ) override; void onActionTriggered( bool isChecked ) override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.cpp index 5a9b927b9f..aea8a322ff 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.cpp @@ -59,11 +59,3 @@ void RicNewElasticPropertyScalingFeature::setupActionLook( QAction* actionToSetu { actionToSetup->setText( "New Property Scaling" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewElasticPropertyScalingFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.h index f6078b4de9..d41dc5f49a 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewElasticPropertyScalingFeature.h @@ -30,5 +30,4 @@ class RicNewElasticPropertyScalingFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.cpp index 1df7b2d516..4a2e635d8a 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.cpp @@ -100,11 +100,3 @@ void RicNewEllipseFractureTemplateFeature::setupActionLook( QAction* actionToSet actionToSetup->setIcon( QIcon( ":/FractureTemplate16x16.png" ) ); actionToSetup->setText( "New Ellipse Fracture Template" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewEllipseFractureTemplateFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.h index 4579c330bf..928813d8d2 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewEllipseFractureTemplateFeature.h @@ -44,5 +44,4 @@ protected: static RimEllipseFractureTemplate* createNewTemplate(); void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.cpp index 4522bc9e91..0f92fc5cf5 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.cpp @@ -31,14 +31,6 @@ CAF_CMD_SOURCE_INIT( RicNewOptionItemFeature, "RicNewOptionItemFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewOptionItemFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.h index 52df551453..69001cdc7c 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewOptionItemFeature.h @@ -28,7 +28,6 @@ class RicNewOptionItemFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void setupActionLook( QAction* actionToSetup ) override; void onActionTriggered( bool isChecked ) override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp index d0220863e2..dd21cf7e95 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.cpp @@ -130,7 +130,7 @@ void RicNewSimWellFractureAtPosFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSimWellFractureAtPosFeature::isCommandEnabled() +bool RicNewSimWellFractureAtPosFeature::isCommandEnabled() const { RimProject* proj = RimProject::current(); if ( proj->allFractureTemplates().empty() ) return false; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h index 4b3297f39c..18437a7ac3 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureAtPosFeature.h @@ -32,5 +32,5 @@ class RicNewSimWellFractureAtPosFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp index 84194fb9e7..ce7a15c5d3 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.cpp @@ -114,7 +114,7 @@ void RicNewSimWellFractureFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSimWellFractureFeature::isCommandEnabled() +bool RicNewSimWellFractureFeature::isCommandEnabled() const { RimProject* proj = RimProject::current(); if ( proj->allFractureTemplates().empty() ) return false; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h index 3723e10fdb..3360ff858a 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewSimWellFractureFeature.h @@ -32,5 +32,5 @@ class RicNewSimWellFractureFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp index c632fc890e..461cab8bb6 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.cpp @@ -91,14 +91,6 @@ void RicNewStimPlanFractureTemplateFeature::setupActionLook( QAction* actionToSe actionToSetup->setText( "New StimPlan Fracture Template" ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewStimPlanFractureTemplateFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.h index 4864e0e0a6..6fb6cdc150 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanFractureTemplateFeature.h @@ -42,7 +42,6 @@ protected: static std::vector createNewTemplates(); void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; static QString fileFilter(); static QString title(); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.cpp index 80316e560e..5b78dd20e9 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.cpp @@ -127,7 +127,7 @@ void RicNewStimPlanModelFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewStimPlanModelFeature::isCommandEnabled() +bool RicNewStimPlanModelFeature::isCommandEnabled() const { return selectedStimPlanModelCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.h index 989847b896..b084f62f45 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelFeature.h @@ -43,7 +43,7 @@ public: protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; private: static RimStimPlanModelCollection* selectedStimPlanModelCollection(); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.cpp index 22680f7fb3..85e59b9d9d 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.cpp @@ -80,11 +80,3 @@ void RicNewStimPlanModelTemplateFeature::setupActionLook( QAction* actionToSetup actionToSetup->setIcon( QIcon( ":/FractureTemplate16x16.png" ) ); actionToSetup->setText( "New StimPlan Model Template" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewStimPlanModelTemplateFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.h index 024175c6a2..003b512c0d 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewStimPlanModelTemplateFeature.h @@ -32,5 +32,4 @@ class RicNewStimPlanModelTemplateFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.cpp index 911a0ca5f7..2c48e970db 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.cpp @@ -90,14 +90,6 @@ void RicNewThermalFractureTemplateFeature::setupActionLook( QAction* actionToSet actionToSetup->setText( "New Thermal Fracture Template" ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewThermalFractureTemplateFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.h index c92230af07..95b3b84cce 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewThermalFractureTemplateFeature.h @@ -41,7 +41,6 @@ protected: static std::vector createNewTemplates(); void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; static QString fileFilter(); static QString title(); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.cpp index 82ef26e64a..3eec81e5fa 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.cpp @@ -50,11 +50,3 @@ void RicNewWellPathFractureAtPosFeature::setupActionLook( QAction* actionToSetup actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) ); actionToSetup->setText( "Create Fracture at this Depth" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewWellPathFractureAtPosFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.h index ec110fd127..ec33f97195 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureAtPosFeature.h @@ -32,5 +32,4 @@ class RicNewWellPathFractureAtPosFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp index 1dce7ed674..e30b170a07 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.cpp @@ -133,7 +133,7 @@ void RicNewWellPathFractureFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellPathFractureFeature::isCommandEnabled() +bool RicNewWellPathFractureFeature::isCommandEnabled() const { return selectedWellPathFractureCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.h index 4b1bb21744..b31e243268 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathFractureFeature.h @@ -40,7 +40,7 @@ public: protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; private: static RimWellPathFractureCollection* selectedWellPathFractureCollection(); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.cpp index d3e8529749..b6e97825c1 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.cpp @@ -67,11 +67,3 @@ void RicNewWellPathStimPlanModelAtPosFeature::setupActionLook( QAction* actionTo actionToSetup->setIcon( QIcon( ":/FractureSymbol16x16.png" ) ); actionToSetup->setText( "Create StimPlan Model at this Depth" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewWellPathStimPlanModelAtPosFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.h index 2a57254811..4a594d56b9 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicNewWellPathStimPlanModelAtPosFeature.h @@ -32,5 +32,4 @@ class RicNewWellPathStimPlanModelAtPosFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.cpp index 3ba41bb573..7d0fb23e9e 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicPasteEllipseFractureFeature, "RicPasteEllipseFractureFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteEllipseFractureFeature::isCommandEnabled() +bool RicPasteEllipseFractureFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.h index a158d27bd8..4858d62ea5 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicPasteEllipseFractureFeature.h @@ -35,7 +35,7 @@ class RicPasteEllipseFractureFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.cpp index 4e7f133829..a0d4d5ea66 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicPasteStimPlanFractureFeature, "RicPasteStimPlanFractureF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteStimPlanFractureFeature::isCommandEnabled() +bool RicPasteStimPlanFractureFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.h index a3abe899f3..631dfd663f 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicPasteStimPlanFractureFeature.h @@ -35,7 +35,7 @@ class RicPasteStimPlanFractureFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.cpp b/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.cpp index 97c201e29b..fcb8c5ce07 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.cpp +++ b/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.cpp @@ -72,7 +72,7 @@ void RicPlaceThermalFractureUsingTemplateDataFeature::setupActionLook( QAction* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPlaceThermalFractureUsingTemplateDataFeature::isCommandEnabled() +bool RicPlaceThermalFractureUsingTemplateDataFeature::isCommandEnabled() const { return selectedThermalFracture() != nullptr; } diff --git a/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.h b/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.h index dce8b61930..a27da393f6 100644 --- a/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.h +++ b/ApplicationLibCode/Commands/FractureCommands/RicPlaceThermalFractureUsingTemplateDataFeature.h @@ -35,7 +35,7 @@ public: protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; private: static RimWellPathFracture* selectedThermalFracture(); diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.cpp index b93590ddee..880b3337d4 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.cpp @@ -35,14 +35,6 @@ CAF_CMD_SOURCE_INIT( RicGeoMechCopyCaseFeature, "RicGeoMechCopyCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicGeoMechCopyCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.h index 1bd070e138..74982aeb63 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechCopyCaseFeature.h @@ -28,7 +28,6 @@ class RicGeoMechCopyCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.cpp index 77022f5d49..611559053e 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicGeoMechPropertyFilterInsertFeature, "RicGeoMechPropertyF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicGeoMechPropertyFilterInsertFeature::isCommandEnabled() +bool RicGeoMechPropertyFilterInsertFeature::isCommandEnabled() const { std::vector propertyFilters = RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilters(); if ( propertyFilters.size() == 1 ) diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.h index 8e910c7329..025eda6cfc 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterInsertFeature.h @@ -29,7 +29,7 @@ class RicGeoMechPropertyFilterInsertFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.cpp index 7dc0cb7ed3..bbf1fecc2e 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicGeoMechPropertyFilterNewFeature, "RicGeoMechPropertyFilt //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicGeoMechPropertyFilterNewFeature::isCommandEnabled() +bool RicGeoMechPropertyFilterNewFeature::isCommandEnabled() const { std::vector filterCollections = RicGeoMechPropertyFilterFeatureImpl::selectedPropertyFilterCollections(); diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.h index 34cefe105c..31d8932a43 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewFeature.h @@ -29,7 +29,7 @@ class RicGeoMechPropertyFilterNewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.cpp index 34fb0b8d16..985e7180e7 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicGeoMechPropertyFilterNewInViewFeature, "RicGeoMechProper //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicGeoMechPropertyFilterNewInViewFeature::isCommandEnabled() +bool RicGeoMechPropertyFilterNewInViewFeature::isCommandEnabled() const { Rim3dView* view = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.h index 98434fb10f..65d330fc8a 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicGeoMechPropertyFilterNewInViewFeature.h @@ -28,7 +28,7 @@ class RicGeoMechPropertyFilterNewInViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.cpp index bbb538bdc6..17c22cc49d 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicImportGeoMechCaseFeature, "RicImportGeoMechCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportGeoMechCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.h index f40d88af7e..36d3d5c198 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseFeature.h @@ -28,7 +28,6 @@ class RicImportGeoMechCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.cpp index 7790f17924..f6ca60a0a1 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.cpp @@ -62,11 +62,3 @@ void RicImportGeoMechCaseTimeStepFilterFeature::setupActionLook( QAction* action actionToSetup->setIcon( QIcon( ":/GeoMechCaseTime24x24.png" ) ); actionToSetup->setText( "Import Geo Mechanical Model (Time Step Filtered)" ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportGeoMechCaseTimeStepFilterFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.h index 1f05884eda..08926a0665 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicImportGeoMechCaseTimeStepFilterFeature.h @@ -32,5 +32,4 @@ class RicImportGeoMechCaseTimeStepFilterFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.cpp index aa7a1c7d79..ae8f84b407 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.cpp @@ -101,7 +101,7 @@ void RicNewWellIntegrityAnalysisFeature::setupActionLook( QAction* actionToSetup //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellIntegrityAnalysisFeature::isCommandEnabled() +bool RicNewWellIntegrityAnalysisFeature::isCommandEnabled() const { RimGeoMechView* view = dynamic_cast( RiaApplication::instance()->activeGridView() ); return ( view != nullptr ); diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.h index 60cbfa9523..a6ef84be9f 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicNewWellIntegrityAnalysisFeature.h @@ -32,5 +32,5 @@ class RicNewWellIntegrityAnalysisFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.cpp b/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.cpp index fec04732fb..1cbb3ac887 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.cpp +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.cpp @@ -144,11 +144,3 @@ void RicRunWellIntegrityAnalysisFeature::setupActionLook( QAction* actionToSetup actionToSetup->setIcon( QIcon( ":/WellIntAnalysis.png" ) ); actionToSetup->setText( "Run..." ); } - -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicRunWellIntegrityAnalysisFeature::isCommandEnabled() -{ - return true; -} diff --git a/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.h b/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.h index 576b2aee46..3d66c97e08 100644 --- a/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.h +++ b/ApplicationLibCode/Commands/GeoMechCommands/RicRunWellIntegrityAnalysisFeature.h @@ -32,5 +32,4 @@ class RicRunWellIntegrityAnalysisFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandEnabled() override; }; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.cpp b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.cpp index d8ebb8227f..efbbcc3996 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.cpp +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicCreateGridCrossPlotDataSetFeature, "RicCreateGridCrossPl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateGridCrossPlotDataSetFeature::isCommandEnabled() +bool RicCreateGridCrossPlotDataSetFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.h b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.h index 69dc607586..dfc3d4dc08 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.h +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotDataSetFeature.h @@ -27,7 +27,7 @@ class RicCreateGridCrossPlotDataSetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.cpp b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.cpp index aaef05e9d5..004d9f87bf 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.cpp @@ -37,14 +37,6 @@ CAF_CMD_SOURCE_INIT( RicCreateGridCrossPlotFeature, "RicCreateGridCrossPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateGridCrossPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.h b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.h index 7e929416e1..9ed4c6ee1f 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateGridCrossPlotFeature.h @@ -29,7 +29,6 @@ class RicCreateGridCrossPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp index e535c1de4d..6385219a7c 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.cpp @@ -107,14 +107,6 @@ std::vector RicCreateSaturationPressurePlotsFeature: return plots; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateSaturationPressurePlotsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.h b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.h index c558224a10..96416eaaf8 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.h +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicCreateSaturationPressurePlotsFeature.h @@ -34,7 +34,6 @@ public: static std::vector createPlots( RimEclipseResultCase* eclipseCase, int timeStep ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.cpp b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.cpp index 701134a3fa..3ad9e354a8 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.cpp +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicPasteGridCrossPlotDataSetFeature, "RicPasteGridCrossPlot //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteGridCrossPlotDataSetFeature::isCommandEnabled() +bool RicPasteGridCrossPlotDataSetFeature::isCommandEnabled() const { auto curvesOnClipboard = gridCrossPlotDataSetsOnClipboard(); if ( curvesOnClipboard.empty() ) return false; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.h b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.h index 03e0c7579d..7a9addae69 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.h +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicPasteGridCrossPlotDataSetFeature.h @@ -31,7 +31,7 @@ class RicPasteGridCrossPlotDataSetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.cpp b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.cpp index 2c9a531893..cede174175 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.cpp +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.cpp @@ -12,7 +12,7 @@ CAF_CMD_SOURCE_INIT( RicSwapGridCrossPlotDataSetAxesFeature, "RicSwapGridCrossPl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSwapGridCrossPlotDataSetAxesFeature::isCommandEnabled() +bool RicSwapGridCrossPlotDataSetAxesFeature::isCommandEnabled() const { if ( caf::SelectionManager::instance()->selectedItemOfType() ) { diff --git a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.h b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.h index 682c9d87bb..3f1cc00047 100644 --- a/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.h +++ b/ApplicationLibCode/Commands/GridCrossPlotCommands/RicSwapGridCrossPlotDataSetAxesFeature.h @@ -27,7 +27,7 @@ class RicSwapGridCrossPlotDataSetAxesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp index 6d4b1781a9..dd8642aafc 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.cpp @@ -81,7 +81,7 @@ void RicHoloLensAutoExportToSharingServerFeature::triggerUpdateSession() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensAutoExportToSharingServerFeature::isCommandEnabled() +bool RicHoloLensAutoExportToSharingServerFeature::isCommandEnabled() const { return isSessionValid(); } @@ -126,7 +126,7 @@ void RicHoloLensAutoExportToSharingServerFeature::setupActionLook( QAction* acti //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensAutoExportToSharingServerFeature::isCommandChecked() +bool RicHoloLensAutoExportToSharingServerFeature::isCommandChecked() const { return isActive(); } diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.h index e17ee92743..97376c3292 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensAutoExportToSharingServerFeature.h @@ -36,10 +36,10 @@ public: void triggerUpdateSession(); private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; bool isSessionValid() const; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp index 30c5210f64..0ff80b213b 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.cpp @@ -27,7 +27,7 @@ CAF_CMD_SOURCE_INIT( RicHoloLensCreateDummyFiledBackedSessionFeature, "RicHoloLe //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensCreateDummyFiledBackedSessionFeature::isCommandEnabled() +bool RicHoloLensCreateDummyFiledBackedSessionFeature::isCommandEnabled() const { return RicHoloLensSessionManager::instance()->session() == nullptr; } diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.h index be4ba46bde..d5517aea35 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateDummyFileBackedSessionFeature.h @@ -28,7 +28,7 @@ class RicHoloLensCreateDummyFiledBackedSessionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp index f161e14b77..48e532296c 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicHoloLensCreateSessionFeature, "RicHoloLensCreateSessionF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensCreateSessionFeature::isCommandEnabled() +bool RicHoloLensCreateSessionFeature::isCommandEnabled() const { return RicHoloLensSessionManager::instance()->session() == nullptr; } diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.h index 62a20c2311..401df58a9c 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensCreateSessionFeature.h @@ -28,7 +28,7 @@ class RicHoloLensCreateSessionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.cpp index bf2d847c7f..54fe5a77a1 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.cpp @@ -41,14 +41,6 @@ CAF_CMD_SOURCE_INIT( RicHoloLensExportToFolderFeature, "RicHoloLensExportToFolderFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicHoloLensExportToFolderFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.h index 8ff07d724b..b9e7ff868b 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToFolderFeature.h @@ -28,7 +28,6 @@ class RicHoloLensExportToFolderFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp index 68a928a247..d5c69f3021 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicHoloLensExportToSharingServerFeature, "RicHoloLensExport //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensExportToSharingServerFeature::isCommandEnabled() +bool RicHoloLensExportToSharingServerFeature::isCommandEnabled() const { RicHoloLensSession* session = RicHoloLensSessionManager::instance()->session(); return session && session->isSessionValid(); diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.h index a410d946ae..978009e8f7 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensExportToSharingServerFeature.h @@ -28,7 +28,7 @@ class RicHoloLensExportToSharingServerFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp index 3c99fb8c13..648cd4371d 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicHoloLensTerminateSessionFeature, "RicHoloLensTerminateSe //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHoloLensTerminateSessionFeature::isCommandEnabled() +bool RicHoloLensTerminateSessionFeature::isCommandEnabled() const { return RicHoloLensSessionManager::instance()->session() != nullptr; } diff --git a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.h b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.h index 4cb8823197..3d0f077831 100644 --- a/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.h +++ b/ApplicationLibCode/Commands/HoloLensCommands/RicHoloLensTerminateSessionFeature.h @@ -28,7 +28,7 @@ class RicHoloLensTerminateSessionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.cpp b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.cpp index 9f70d1d3ba..754858b8d6 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicAppendIntersectionBoxFeature, "RicAppendIntersectionBoxF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendIntersectionBoxFeature::isCommandEnabled() +bool RicAppendIntersectionBoxFeature::isCommandEnabled() const { RimIntersectionCollection* coll = RicAppendIntersectionBoxFeature::intersectionCollection(); return coll != nullptr; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.h b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.h index 2387d8ccd6..53396fc267 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.h +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicAppendIntersectionBoxFeature.h @@ -32,7 +32,7 @@ class RicAppendIntersectionBoxFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.cpp b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.cpp index da121a2e44..f75dbe04fa 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.cpp @@ -38,14 +38,6 @@ CAF_CMD_SOURCE_INIT( RicIntersectionBoxAtPosFeature, "RicIntersectionBoxAtPosFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicIntersectionBoxAtPosFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.h b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.h index bf1812911c..77e7b0557b 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.h +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxAtPosFeature.h @@ -30,7 +30,6 @@ class RicIntersectionBoxAtPosFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.cpp b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.cpp index 5a7eab8943..dfc3c17861 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.cpp @@ -38,14 +38,6 @@ CAF_CMD_SOURCE_INIT( RicIntersectionBoxXSliceFeature, "RicIntersectionBoxXSliceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicIntersectionBoxXSliceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.h b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.h index 57d3214ed3..b0f6b03e50 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.h +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxXSliceFeature.h @@ -30,7 +30,6 @@ class RicIntersectionBoxXSliceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.cpp b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.cpp index 46c060615d..0b39242758 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.cpp @@ -38,14 +38,6 @@ CAF_CMD_SOURCE_INIT( RicIntersectionBoxYSliceFeature, "RicIntersectionBoxYSliceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicIntersectionBoxYSliceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.h b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.h index 265ed78cfb..68167cd9b4 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.h +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxYSliceFeature.h @@ -30,7 +30,6 @@ class RicIntersectionBoxYSliceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.cpp b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.cpp index 5306eb19aa..2562993c17 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.cpp @@ -38,14 +38,6 @@ CAF_CMD_SOURCE_INIT( RicIntersectionBoxZSliceFeature, "RicIntersectionBoxZSliceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicIntersectionBoxZSliceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.h b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.h index 5cf28ccb63..f1390f2896 100644 --- a/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.h +++ b/ApplicationLibCode/Commands/IntersectionBoxCommands/RicIntersectionBoxZSliceFeature.h @@ -30,7 +30,6 @@ class RicIntersectionBoxZSliceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.cpp b/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.cpp index 98307acfc8..863ecd5715 100644 --- a/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.cpp +++ b/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicNewIntersectionViewFeature, "RicNewIntersectionViewFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewIntersectionViewFeature::isCommandEnabled() +bool RicNewIntersectionViewFeature::isCommandEnabled() const { std::set objects = selectedIntersections(); diff --git a/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.h b/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.h index b2ca78e288..b82978600a 100644 --- a/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.h +++ b/ApplicationLibCode/Commands/IntersectionViewCommands/RicNewIntersectionViewFeature.h @@ -32,7 +32,7 @@ class RicNewIntersectionViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.cpp b/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.cpp index 9042295e82..e271bd4678 100644 --- a/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.cpp +++ b/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.cpp @@ -46,7 +46,7 @@ void RicToggleMeasurementModeFeature::refreshActionLook() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleMeasurementModeFeature::isCommandEnabled() +bool RicToggleMeasurementModeFeature::isCommandEnabled() const { return activeView() != nullptr; } @@ -95,7 +95,7 @@ void RicToggleMeasurementModeFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleMeasurementModeFeature::isCommandChecked() +bool RicToggleMeasurementModeFeature::isCommandChecked() const { auto meas = measurement(); if ( meas ) @@ -181,7 +181,7 @@ void RicTogglePolyMeasurementModeFeature::setupActionLook( QAction* actionToSetu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTogglePolyMeasurementModeFeature::isCommandChecked() +bool RicTogglePolyMeasurementModeFeature::isCommandChecked() const { auto meas = measurement(); if ( meas ) diff --git a/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.h b/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.h index 6fa8cce1a5..0f9e58c1bb 100644 --- a/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.h +++ b/ApplicationLibCode/Commands/MeasurementCommands/RicToggleMeasurementModeFeature.h @@ -35,10 +35,10 @@ class RicToggleMeasurementModeFeature : public caf::CmdFeature void refreshActionLook(); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; protected: RimMeasurement* measurement() const; @@ -58,7 +58,7 @@ class RicTogglePolyMeasurementModeFeature : public RicToggleMeasurementModeFeatu protected: void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; private: void refreshMeasurementActionLook(); diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.cpp index c108a83516..94b904011f 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicAddScriptPathFeature, "RicAddScriptPathFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAddScriptPathFeature::isCommandEnabled() +bool RicAddScriptPathFeature::isCommandEnabled() const { std::vector selection = RicScriptFeatureImpl::selectedScriptCollections(); return selection.size() > 0; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.h index a1c499d7cf..bd5577b4bb 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicAddScriptPathFeature.h @@ -31,7 +31,7 @@ class RicAddScriptPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.cpp index f56618de0e..f801a4b18b 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteScriptPathFeature, "RicDeleteScriptPathFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteScriptPathFeature::isCommandEnabled() +bool RicDeleteScriptPathFeature::isCommandEnabled() const { std::vector selection = RicScriptFeatureImpl::selectedScriptCollections(); if ( selection.size() == 1 ) diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.h index 4621b82084..395fd11c1c 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicDeleteScriptPathFeature.h @@ -31,7 +31,7 @@ class RicDeleteScriptPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.cpp index 32b4925b26..aace8d9a86 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicEditScriptFeature, "RicEditScriptFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditScriptFeature::isCommandEnabled() +bool RicEditScriptFeature::isCommandEnabled() const { std::vector selection = RicScriptFeatureImpl::selectedScripts(); return !selection.empty(); diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.h index 57684fd899..a5d676b103 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicEditScriptFeature.h @@ -31,7 +31,7 @@ class RicEditScriptFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.cpp index 04e3e85453..a5c2ee7997 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.cpp @@ -41,14 +41,6 @@ QString RicExecuteLastUsedScriptFeature::lastUsedScriptPathKey() return "lastUsedScriptPath"; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicExecuteLastUsedScriptFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.h index 4149c11612..634001f533 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteLastUsedScriptFeature.h @@ -32,7 +32,6 @@ class RicExecuteLastUsedScriptFeature : public caf::CmdFeature static QString lastUsedScriptPathKey(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp index 9d290fe6f8..a9f2cff8a4 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicExecuteScriptFeature, "RicExecuteScriptFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExecuteScriptFeature::isCommandEnabled() +bool RicExecuteScriptFeature::isCommandEnabled() const { std::vector selection = RicScriptFeatureImpl::selectedScripts(); return selection.size() > 0; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.h index d38317abc5..a3ca91bd6c 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptFeature.h @@ -35,7 +35,7 @@ class RicExecuteScriptFeature : public caf::CmdFeature static void executeScript( RimCalcScript* calcScript ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp index 34db37ca75..5cf7273114 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicExecuteScriptForCasesFeature, "RicExecuteScriptForCasesF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExecuteScriptForCasesFeature::isCommandEnabled() +bool RicExecuteScriptForCasesFeature::isCommandEnabled() const { std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.h index b9452f670c..8798172889 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicExecuteScriptForCasesFeature.h @@ -30,7 +30,7 @@ class RicExecuteScriptForCasesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.cpp index 1a747b948d..64cc7b2435 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicNewOctaveScriptFeature, "RicNewOctaveScriptFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewOctaveScriptFeature::isCommandEnabled() +bool RicNewOctaveScriptFeature::isCommandEnabled() const { std::vector calcScriptCollections = RicScriptFeatureImpl::selectedScriptCollections(); if ( calcScriptCollections.empty() ) return false; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.h index 5165e78e90..34d1c56cc1 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewOctaveScriptFeature.h @@ -31,7 +31,7 @@ class RicNewOctaveScriptFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.cpp index 7053889a15..14ed63da80 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.cpp @@ -45,7 +45,7 @@ CAF_CMD_SOURCE_INIT( RicNewPythonScriptFeature, "RicNewPythonScriptFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPythonScriptFeature::isCommandEnabled() +bool RicNewPythonScriptFeature::isCommandEnabled() const { std::vector calcScriptCollections = RicScriptFeatureImpl::selectedScriptCollections(); if ( calcScriptCollections.empty() ) return false; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.h index eddf6f7193..6b38294054 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicNewPythonScriptFeature.h @@ -30,7 +30,7 @@ class RicNewPythonScriptFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.cpp b/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.cpp index 86bf9e8886..376a35f43d 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.cpp +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicRefreshScriptsFeature, "RicRefreshScriptsFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicRefreshScriptsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.h b/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.h index 662d9eff2a..8f0b2fe765 100644 --- a/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.h +++ b/ApplicationLibCode/Commands/OctaveScriptCommands/RicRefreshScriptsFeature.h @@ -33,7 +33,6 @@ public: static void refreshScriptFolders(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp index 9a034ebaa3..b25f3a5518 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.cpp @@ -50,7 +50,7 @@ CAF_CMD_SOURCE_INIT( RicCopyReferencesToClipboardFeature, "RicCopyReferencesToCl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCopyReferencesToClipboardFeature::isCommandEnabled() +bool RicCopyReferencesToClipboardFeature::isCommandEnabled() const { return isAnyCopyableObjectSelected(); } diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h index 74820b74c9..31a547b502 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCopyReferencesToClipboardFeature.h @@ -34,7 +34,7 @@ class RicCopyReferencesToClipboardFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.cpp index dd79492440..b95bde5cd4 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicCutReferencesToClipboardFeature, "RicCutReferencesToClip //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCutReferencesToClipboardFeature::isCommandEnabled() +bool RicCutReferencesToClipboardFeature::isCommandEnabled() const { return isAnyCuttableObjectSelected(); } diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.h index 88a843182c..de04acc39c 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicCutReferencesToClipboardFeature.h @@ -33,7 +33,7 @@ class RicCutReferencesToClipboardFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp index 2b59cbb899..1d7baa4b8b 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.cpp @@ -45,7 +45,7 @@ CAF_CMD_SOURCE_INIT( RicPasteEclipseCasesFeature, "RicPasteEclipseCasesFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteEclipseCasesFeature::isCommandEnabled() +bool RicPasteEclipseCasesFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h index 65b362fd06..17c5ef8ece 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseCasesFeature.h @@ -39,7 +39,7 @@ public: static void addCasesToGridCaseGroup( caf::PdmObjectGroup& objectGroup, RimIdenticalGridCaseGroup* gridCaseGroup ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp index d51fa24c09..0b1f0b5301 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicPasteEclipseViewsFeature, "RicPasteEclipseViewsFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteEclipseViewsFeature::isCommandEnabled() +bool RicPasteEclipseViewsFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h index 69b7775214..ff227b4fbb 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteEclipseViewsFeature.h @@ -29,7 +29,7 @@ class RicPasteEclipseViewsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp index bc51a54e49..03941c86ee 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicPasteGeoMechViewsFeature, "RicPasteGeoMechViewsFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteGeoMechViewsFeature::isCommandEnabled() +bool RicPasteGeoMechViewsFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h index 4bcc72b7f8..d9d66b6749 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteGeoMechViewsFeature.h @@ -29,7 +29,7 @@ class RicPasteGeoMechViewsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.cpp b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.cpp index 87fbca67db..780fac584e 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.cpp +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicPasteIntersectionsFeature, "RicPasteIntersectionsFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteIntersectionsFeature::isCommandEnabled() +bool RicPasteIntersectionsFeature::isCommandEnabled() const { caf::PdmObjectGroup objectGroup; RicPasteFeatureImpl::findObjectsFromClipboardRefs( &objectGroup ); diff --git a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.h b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.h index 22bf9755e2..a7730a0f53 100644 --- a/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.h +++ b/ApplicationLibCode/Commands/OperationsUsingObjReferences/RicPasteIntersectionsFeature.h @@ -31,7 +31,7 @@ class RicPasteIntersectionsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp index c18fbfeb14..d789b92ff9 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryCurvesForObjectsFeature, "RicAppendSummaryC //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryCurvesForObjectsFeature::isCommandEnabled() +bool RicAppendSummaryCurvesForObjectsFeature::isCommandEnabled() const { return !RicAppendSummaryPlotsForObjectsFeature::selectedCollections().empty(); } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.h index a33b3e6e48..e8827b313e 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForObjectsFeature.h @@ -28,7 +28,7 @@ class RicAppendSummaryCurvesForObjectsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp index b0009c0677..68337c648f 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryCurvesForSummaryAddressesFeature, "RicAppen //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryCurvesForSummaryAddressesFeature::isCommandEnabled() +bool RicAppendSummaryCurvesForSummaryAddressesFeature::isCommandEnabled() const { return !selectedAddresses().empty(); } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.h index 68c85cd90a..920034f4df 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryAddressesFeature.h @@ -35,7 +35,7 @@ class RicAppendSummaryCurvesForSummaryAddressesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp index abbe5f2da0..d21cab00ad 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryCurvesForSummaryCasesFeature, "RicAppendSum //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryCurvesForSummaryCasesFeature::isCommandEnabled() +bool RicAppendSummaryCurvesForSummaryCasesFeature::isCommandEnabled() const { return !selectedCases().empty(); } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h index 6801526a69..2300ace0d6 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryCurvesForSummaryCasesFeature.h @@ -35,7 +35,7 @@ class RicAppendSummaryCurvesForSummaryCasesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp index 553e16a6f9..9d2fca8c24 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.cpp @@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryPlotsForObjectsFeature, "RicAppendSummaryPl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryPlotsForObjectsFeature::isCommandEnabled() +bool RicAppendSummaryPlotsForObjectsFeature::isCommandEnabled() const { return !selectedCollections().empty(); } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.h index 29d8b814b6..1a73852403 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForObjectsFeature.h @@ -55,7 +55,7 @@ public: const std::vector& ensembles ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp index d9ed3a7dcd..e3d3b30017 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.cpp @@ -61,7 +61,7 @@ void RicAppendSummaryPlotsForSummaryAddressesFeature::appendPlotsForAddresses( R //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryPlotsForSummaryAddressesFeature::isCommandEnabled() +bool RicAppendSummaryPlotsForSummaryAddressesFeature::isCommandEnabled() const { return !selectedAddresses().empty(); } diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.h index 3229bb9281..15ee6bd720 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryAddressesFeature.h @@ -36,7 +36,7 @@ public: static void appendPlotsForAddresses( RimSummaryMultiPlot* summaryMultiPlot, const std::vector& addresses ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp index cc8e9bfe38..0aece309f3 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicAppendSummaryPlotsForSummaryCasesFeature, "RicAppendSumm //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendSummaryPlotsForSummaryCasesFeature::isCommandEnabled() +bool RicAppendSummaryPlotsForSummaryCasesFeature::isCommandEnabled() const { auto cases = selectedCases(); auto ensembles = selectedEnsembles(); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.h index f202d32311..06b1efd555 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicAppendSummaryPlotsForSummaryCasesFeature.h @@ -34,7 +34,7 @@ class RicAppendSummaryPlotsForSummaryCasesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp index 3f827e3658..0d510a8b02 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.cpp @@ -36,14 +36,6 @@ CAF_CMD_SOURCE_INIT( RicNewEmptySummaryMultiPlotFeature, "RicNewEmptySummaryMultiPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewEmptySummaryMultiPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.h index 9e9043c5d6..dc004a327b 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewEmptySummaryMultiPlotFeature.h @@ -28,7 +28,6 @@ class RicNewEmptySummaryMultiPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp index 598c0cf606..261c81f12a 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.cpp @@ -65,7 +65,7 @@ caf::PdmScriptResponse RicNewMultiPlotFeature::execute() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewMultiPlotFeature::isCommandEnabled() +bool RicNewMultiPlotFeature::isCommandEnabled() const { auto plots = selectedPlots(); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.h index 432459a18a..5790ab7e60 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewMultiPlotFeature.h @@ -40,7 +40,7 @@ public: caf::PdmScriptResponse execute() override; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp index 9a9828766d..feee5f339b 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryMultiPlotFeature, "RicNewSummaryMultiPlotFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryMultiPlotFeature::isCommandEnabled() +bool RicNewSummaryMultiPlotFeature::isCommandEnabled() const { std::vector selectedUiItems; caf::SelectionManager::instance()->selectedItems( selectedUiItems ); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.h index bc16de116b..3e4254daaf 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFeature.h @@ -36,13 +36,13 @@ class RicNewSummaryMultiPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimSummaryMultiPlotCollection* selectedCollection( std::vector& items ); + static RimSummaryMultiPlotCollection* selectedCollection( std::vector& items ); - bool selectedCases( std::vector* selectedIndividualSummaryCases, - std::vector* selectedEnsembles ); + static bool selectedCases( std::vector* selectedIndividualSummaryCases, + std::vector* selectedEnsembles ); }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp index 02c9615748..99c622ba24 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryMultiPlotFromDataVectorFeature, "RicNewSummary //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryMultiPlotFromDataVectorFeature::isCommandEnabled() +bool RicNewSummaryMultiPlotFromDataVectorFeature::isCommandEnabled() const { std::vector selectedItems; caf::SelectionManager::instance()->selectedItems( selectedItems ); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.h index 860eba06c2..7935bf1855 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryMultiPlotFromDataVectorFeature.h @@ -31,7 +31,7 @@ class RicNewSummaryMultiPlotFromDataVectorFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp index 350265d02d..4a6fc4833d 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.cpp @@ -28,14 +28,6 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryPlotFromCurveFeature, "RicNewSummaryPlotFromCurveFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewSummaryPlotFromCurveFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.h index 31bdf6aa9e..f2c805d6db 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromCurveFeature.h @@ -30,8 +30,6 @@ class RicNewSummaryPlotFromCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - // Overrides - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp index 3c1b52f5cf..466831b939 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryPlotFromDataVectorFeature, "RicNewSummaryPlotF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryPlotFromDataVectorFeature::isCommandEnabled() +bool RicNewSummaryPlotFromDataVectorFeature::isCommandEnabled() const { std::vector selectedItems; caf::SelectionManager::instance()->selectedItems( selectedItems ); diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.h index b9e65e2a45..7650aaec81 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicNewSummaryPlotFromDataVectorFeature.h @@ -30,7 +30,7 @@ class RicNewSummaryPlotFromDataVectorFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp index 626e2d27f5..31d821f5d8 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicSplitMultiPlotFeature, "RicSplitMultiPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSplitMultiPlotFeature::isCommandEnabled() +bool RicSplitMultiPlotFeature::isCommandEnabled() const { RimSummaryPlot* plot = getSelectedPlot(); if ( plot ) @@ -92,7 +92,7 @@ void RicSplitMultiPlotFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlot* RicSplitMultiPlotFeature::getSelectedPlot() +RimSummaryPlot* RicSplitMultiPlotFeature::getSelectedPlot() const { RimSummaryPlot* plot = nullptr; diff --git a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.h b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.h index 76a73aa853..9c96285456 100644 --- a/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.h +++ b/ApplicationLibCode/Commands/PlotBuilderCommands/RicSplitMultiPlotFeature.h @@ -30,10 +30,10 @@ class RicSplitMultiPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimSummaryPlot* getSelectedPlot(); + RimSummaryPlot* getSelectedPlot() const; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp index 0d5cc987fc..b2f7c1fe96 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.cpp @@ -27,14 +27,6 @@ CAF_CMD_SOURCE_INIT( RicCreateMultiPlotFromSelectionFeature, "RicCreateMultiPlotFromSelectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateMultiPlotFromSelectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.h index 13e98af48f..a5d59a7853 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateMultiPlotFromSelectionFeature.h @@ -30,7 +30,6 @@ class RicCreateMultiPlotFromSelectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp index 659c2297ba..70ab010cfc 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicCreateNewPlotFromTemplateFeature, "RicCreateNewPlotFromT //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateNewPlotFromTemplateFeature::isCommandEnabled() +bool RicCreateNewPlotFromTemplateFeature::isCommandEnabled() const { std::vector uiItems; caf::SelectionManager::instance()->selectedItems( uiItems ); diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.h index 3712ec5be1..f2ae7f7ffb 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreateNewPlotFromTemplateFeature.h @@ -31,7 +31,7 @@ class RicCreateNewPlotFromTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp index 88250ebc3b..48592c1ec9 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicCreatePlotFromTemplateByShortcutFeature, "RicCreatePlotFromTemplateByShortcutFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreatePlotFromTemplateByShortcutFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.h index 2b7cc00fa6..acf5d9bc77 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicCreatePlotFromTemplateByShortcutFeature.h @@ -32,7 +32,6 @@ class RicCreatePlotFromTemplateByShortcutFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.cpp index b825ab508f..ef39e3b52d 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicDeletePlotTemplateFeature, "RicDeletePlotTemplateFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeletePlotTemplateFeature::isCommandEnabled() +bool RicDeletePlotTemplateFeature::isCommandEnabled() const { std::vector uiItems; caf::SelectionManager::instance()->selectedItems( uiItems ); diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.h index 4a87f98d55..965b9783aa 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicDeletePlotTemplateFeature.h @@ -28,7 +28,7 @@ class RicDeletePlotTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.cpp index c23eaa11c5..bbf0950cc8 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.cpp @@ -39,14 +39,6 @@ void RicReloadPlotTemplatesFeature::rebuildFromDisc() proj->rootPlotTemplateItem()->updateConnectedEditors(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicReloadPlotTemplatesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.h index 4bb9f0c9e2..1b9ad23ff2 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicReloadPlotTemplatesFeature.h @@ -31,7 +31,6 @@ public: static void rebuildFromDisc(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.cpp index dec038f9be..efb1ce4630 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicRenamePlotTemplateFeature, "RicRenamePlotTemplateFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicRenamePlotTemplateFeature::isCommandEnabled() +bool RicRenamePlotTemplateFeature::isCommandEnabled() const { std::vector uiItems; caf::SelectionManager::instance()->selectedItems( uiItems ); diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.h index ff978988ec..3411a44097 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicRenamePlotTemplateFeature.h @@ -28,7 +28,7 @@ class RicRenamePlotTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp index 56ef2abd1b..a775b54c60 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.cpp @@ -56,7 +56,7 @@ CAF_CMD_SOURCE_INIT( RicSaveMultiPlotTemplateFeature, "RicSaveMultiPlotTemplateF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSaveMultiPlotTemplateFeature::isCommandEnabled() +bool RicSaveMultiPlotTemplateFeature::isCommandEnabled() const { return selectedSummaryPlot() != nullptr; } diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.h index d402a9fbb6..0ed9754a97 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSaveMultiPlotTemplateFeature.h @@ -33,7 +33,7 @@ class RicSaveMultiPlotTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.cpp b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.cpp index fe04f17581..c7674eade3 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.cpp +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicSetAsDefaultTemplateFeature, "RicSetAsDefaultTemplateFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSetAsDefaultTemplateFeature::isCommandEnabled() +bool RicSetAsDefaultTemplateFeature::isCommandEnabled() const { return selectedTemplate() != nullptr; } @@ -76,7 +76,7 @@ void RicSetAsDefaultTemplateFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimPlotTemplateFileItem* RicSetAsDefaultTemplateFeature::selectedTemplate() +RimPlotTemplateFileItem* RicSetAsDefaultTemplateFeature::selectedTemplate() const { std::vector uiItems; caf::SelectionManager::instance()->selectedItems( uiItems ); diff --git a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.h b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.h index 2aa56e6f33..4b8f01e325 100644 --- a/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.h +++ b/ApplicationLibCode/Commands/PlotTemplateCommands/RicSetAsDefaultTemplateFeature.h @@ -30,10 +30,10 @@ class RicSetAsDefaultTemplateFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimPlotTemplateFileItem* selectedTemplate(); + RimPlotTemplateFileItem* selectedTemplate() const; }; diff --git a/ApplicationLibCode/Commands/RicCloseCaseFeature.cpp b/ApplicationLibCode/Commands/RicCloseCaseFeature.cpp index bc112a8a6d..0b3cc450b7 100644 --- a/ApplicationLibCode/Commands/RicCloseCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseCaseFeature.cpp @@ -48,7 +48,7 @@ CAF_CMD_SOURCE_INIT( RicCloseCaseFeature, "RicCloseCaseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCloseCaseFeature::isCommandEnabled() +bool RicCloseCaseFeature::isCommandEnabled() const { return !selectedCases().empty(); } diff --git a/ApplicationLibCode/Commands/RicCloseCaseFeature.h b/ApplicationLibCode/Commands/RicCloseCaseFeature.h index df38052c4f..0331632539 100644 --- a/ApplicationLibCode/Commands/RicCloseCaseFeature.h +++ b/ApplicationLibCode/Commands/RicCloseCaseFeature.h @@ -40,7 +40,7 @@ public: static bool userConfirmedGridCaseGroupChange( const std::vector& casesToBeDeleted ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicCloseObservedDataFeature.cpp b/ApplicationLibCode/Commands/RicCloseObservedDataFeature.cpp index f7b13ecf84..3c638e0278 100644 --- a/ApplicationLibCode/Commands/RicCloseObservedDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseObservedDataFeature.cpp @@ -97,7 +97,7 @@ void RicCloseObservedDataFeature::deleteObservedRmuRftData( const std::vector summarySelection; caf::SelectionManager::instance()->objectsByType( &summarySelection ); diff --git a/ApplicationLibCode/Commands/RicCloseObservedDataFeature.h b/ApplicationLibCode/Commands/RicCloseObservedDataFeature.h index f9e89c09b7..caa39c1f0e 100644 --- a/ApplicationLibCode/Commands/RicCloseObservedDataFeature.h +++ b/ApplicationLibCode/Commands/RicCloseObservedDataFeature.h @@ -37,7 +37,7 @@ public: static void deleteObservedRmuRftData( const std::vector& data ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.cpp b/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.cpp index 72617ecf05..efb018aeed 100644 --- a/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.cpp @@ -29,7 +29,7 @@ CAF_CMD_SOURCE_INIT( RicCloseSourSimDataFeature, "RicCloseSourSimDataFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCloseSourSimDataFeature::isCommandEnabled() +bool RicCloseSourSimDataFeature::isCommandEnabled() const { return getSelectedEclipseCase() != nullptr; } diff --git a/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.h b/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.h index 2090c7cc95..489cb8ca68 100644 --- a/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.h +++ b/ApplicationLibCode/Commands/RicCloseSourSimDataFeature.h @@ -30,7 +30,7 @@ class RicCloseSourSimDataFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp index d0c08278ff..994c083365 100644 --- a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.cpp @@ -111,7 +111,7 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases( std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); diff --git a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.h index 141158a304..6b19002ce3 100644 --- a/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicCloseSummaryCaseFeature.h @@ -36,7 +36,7 @@ public: static void deleteSummaryCases( std::vector& cases ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.cpp b/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.cpp index eb0bcc4675..764f89a22e 100644 --- a/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.cpp @@ -53,7 +53,7 @@ void RicCloseSummaryCaseInCollectionFeature::setupActionLook( QAction* actionToS //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCloseSummaryCaseInCollectionFeature::isCommandEnabled() +bool RicCloseSummaryCaseInCollectionFeature::isCommandEnabled() const { std::vector summaryCaseMainCollections; caf::SelectionManager::instance()->objectsByType( &summaryCaseMainCollections ); diff --git a/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.h b/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.h index a84fb7c04f..a735f69ce3 100644 --- a/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.h +++ b/ApplicationLibCode/Commands/RicCloseSummaryCaseInCollectionFeature.h @@ -28,7 +28,7 @@ class RicCloseSummaryCaseInCollectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp b/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp index d038cb354b..bb4bfef956 100644 --- a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.cpp @@ -45,7 +45,7 @@ CAF_CMD_SOURCE_INIT( RicConvertGroupToEnsembleFeature, "RicConvertGroupToEnsembl //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicConvertGroupToEnsembleFeature::isCommandEnabled() +bool RicConvertGroupToEnsembleFeature::isCommandEnabled() const { const auto& selGroups = caf::selectedObjectsByTypeStrict(); if ( selGroups.empty() ) return false; diff --git a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h b/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h index 412f1adaa2..2e3ce2a30b 100644 --- a/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h +++ b/ApplicationLibCode/Commands/RicConvertGroupToEnsembleFeature.h @@ -32,7 +32,7 @@ class RicConvertGroupToEnsembleFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.cpp b/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.cpp index 616bfbe099..ec1684d5be 100644 --- a/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.cpp +++ b/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicCopyGridStatisticsToClipboardFeature, "RicCopyGridStatis //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCopyGridStatisticsToClipboardFeature::isCommandEnabled() +bool RicCopyGridStatisticsToClipboardFeature::isCommandEnabled() const { if ( RicWellLogTools::isWellPathOrSimWellSelectedInView() ) return false; diff --git a/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.h b/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.h index 747d0516e5..2d432bf508 100644 --- a/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.h +++ b/ApplicationLibCode/Commands/RicCopyGridStatisticsToClipboardFeature.h @@ -28,7 +28,7 @@ class RicCopyGridStatisticsToClipboardFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.cpp b/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.cpp index 0c931fe31a..5e04688976 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.cpp @@ -31,14 +31,6 @@ CAF_CMD_SOURCE_INIT( RicCreateEnsembleFractureStatisticsPlotFeature, "RicCreateEnsembleFractureStatisticsPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateEnsembleFractureStatisticsPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.h b/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.h index b087127bd1..9c331cc46f 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.h +++ b/ApplicationLibCode/Commands/RicCreateEnsembleFractureStatisticsPlotFeature.h @@ -28,7 +28,6 @@ class RicCreateEnsembleFractureStatisticsPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp index f9e3bbe6c9..883fd839fd 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.cpp @@ -120,14 +120,6 @@ void RicCreateEnsembleSurfaceFeature::executeCommand( const RicCreateEnsembleSur RiaEnsembleNameTools::EnsembleGroupingMode::FMU_FOLDER_STRUCTURE ); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateEnsembleSurfaceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.h b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.h index d95ee48397..2ba8ae587b 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.h +++ b/ApplicationLibCode/Commands/RicCreateEnsembleSurfaceFeature.h @@ -36,7 +36,6 @@ public: static void executeCommand( const RicCreateEnsembleSurfaceUi& ui, const std::vector& fileNames ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp index dc1975650f..9d99f6f8a4 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.cpp @@ -292,14 +292,6 @@ RimEclipseCase* RicCreateEnsembleWellLogFeature::loadEclipseCase( const QString& return nullptr; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateEnsembleWellLogFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.h b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.h index 125e135765..c282eed39b 100644 --- a/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.h +++ b/ApplicationLibCode/Commands/RicCreateEnsembleWellLogFeature.h @@ -38,7 +38,6 @@ public: static RimEclipseCase* loadEclipseCase( const QString& fileName ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.cpp b/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.cpp index df226a8722..503a587d32 100644 --- a/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.cpp @@ -33,14 +33,6 @@ CAF_CMD_SOURCE_INIT( RicCreateGridStatisticsPlotFeature, "RicCreateGridStatisticsPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateGridStatisticsPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.h b/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.h index 79f5bf5d16..f5c2398018 100644 --- a/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.h +++ b/ApplicationLibCode/Commands/RicCreateGridStatisticsPlotFeature.h @@ -28,7 +28,6 @@ class RicCreateGridStatisticsPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp b/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp index 40a3217e27..759bf09728 100644 --- a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.cpp @@ -54,7 +54,7 @@ RimSummaryCaseCollection* //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled() +bool RicCreateSummaryCaseCollectionFeature::isCommandEnabled() const { std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); diff --git a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h b/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h index 8c99e8a650..a9f1cfb1a4 100644 --- a/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h +++ b/ApplicationLibCode/Commands/RicCreateSummaryCaseCollectionFeature.h @@ -35,7 +35,7 @@ class RicCreateSummaryCaseCollectionFeature : public caf::CmdFeature static RimSummaryCaseCollection* groupSummaryCases( std::vector cases, const QString& groupName, bool isEnsemble = false ); private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.cpp b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.cpp index 5f04980bb0..805b5115db 100644 --- a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.cpp @@ -49,7 +49,7 @@ RimSurfaceCollection* RicCreateSurfaceIntersectionBandFeature::surfaceCollection //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateSurfaceIntersectionBandFeature::isCommandEnabled() +bool RicCreateSurfaceIntersectionBandFeature::isCommandEnabled() const { auto* surfColl = RicCreateSurfaceIntersectionBandFeature::surfaceCollection(); auto surfaces = surfColl->ensembleSurfaces(); diff --git a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.h b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.h index e8a832a1bf..29a7bf9d3b 100644 --- a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.h +++ b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionBandFeature.h @@ -33,7 +33,7 @@ public: static RimSurfaceCollection* surfaceCollection(); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.cpp b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.cpp index 2d286cb312..9cc1edff13 100644 --- a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.cpp @@ -29,14 +29,6 @@ CAF_CMD_SOURCE_INIT( RicCreateSurfaceIntersectionCurveFeature, "RicCreateSurfaceIntersectionCurveFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateSurfaceIntersectionCurveFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.h b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.h index aa74574bfc..65e8f2bcf4 100644 --- a/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.h +++ b/ApplicationLibCode/Commands/RicCreateSurfaceIntersectionCurveFeature.h @@ -28,7 +28,6 @@ class RicCreateSurfaceIntersectionCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.cpp b/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.cpp index babe8981b7..d845392420 100644 --- a/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.cpp +++ b/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.cpp @@ -132,7 +132,7 @@ void RicCreateTemporaryLgrFeature::updateViews( RimEclipseCase* eclipseCase ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateTemporaryLgrFeature::isCommandEnabled() +bool RicCreateTemporaryLgrFeature::isCommandEnabled() const { std::vector completions = caf::selectedObjectsByTypeStrict(); std::vector wellPaths = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.h b/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.h index 9c8773457a..ae39c9896c 100644 --- a/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.h +++ b/ApplicationLibCode/Commands/RicCreateTemporaryLgrFeature.h @@ -57,7 +57,7 @@ public: void updateViews( RimEclipseCase* eclipseCase ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicDeleteItemFeature.cpp b/ApplicationLibCode/Commands/RicDeleteItemFeature.cpp index 80607c197a..b8f1ab2019 100644 --- a/ApplicationLibCode/Commands/RicDeleteItemFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteItemFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteItemFeature, "RicDeleteItemFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteItemFeature::isCommandEnabled() +bool RicDeleteItemFeature::isCommandEnabled() const { std::vector items; caf::SelectionManager::instance()->selectedItems( items ); diff --git a/ApplicationLibCode/Commands/RicDeleteItemFeature.h b/ApplicationLibCode/Commands/RicDeleteItemFeature.h index 7ffa01baed..1774b183ed 100644 --- a/ApplicationLibCode/Commands/RicDeleteItemFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteItemFeature.h @@ -37,7 +37,7 @@ public: static void deleteObject( caf::PdmObject* objectToDelete ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.cpp b/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.cpp index 347bba47ef..7e05dc9bee 100644 --- a/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.cpp @@ -29,7 +29,7 @@ CAF_CMD_SOURCE_INIT( RicDeletePressureTableItemFeature, "RicDeletePressureTableI //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeletePressureTableItemFeature::isCommandEnabled() +bool RicDeletePressureTableItemFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects, caf::SelectionManager::FIRST_LEVEL ); diff --git a/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.h b/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.h index 4e160bdd7a..27196f44b1 100644 --- a/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.h +++ b/ApplicationLibCode/Commands/RicDeletePressureTableItemFeature.h @@ -28,7 +28,7 @@ class RicDeletePressureTableItemFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.cpp b/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.cpp index 6f94a59ab8..d1aab67f9e 100644 --- a/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteSubItemsFeature, "RicDeleteSubItemsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteSubItemsFeature::isCommandEnabled() +bool RicDeleteSubItemsFeature::isCommandEnabled() const { return RicDeleteSubItemsFeature::canCommandBeEnabled(); } diff --git a/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.h b/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.h index 2ae8ffe806..1282026684 100644 --- a/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteSubItemsFeature.h @@ -38,7 +38,7 @@ public: static bool canCommandBeEnabled(); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp index cc632e1d9e..85244f9473 100644 --- a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.cpp @@ -63,7 +63,7 @@ void RicDeleteSummaryCaseCollectionFeature::deleteSummaryCaseCollection( RimSumm //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteSummaryCaseCollectionFeature::isCommandEnabled() +bool RicDeleteSummaryCaseCollectionFeature::isCommandEnabled() const { std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); diff --git a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.h b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.h index bc7fcf0b23..d805e37108 100644 --- a/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteSummaryCaseCollectionFeature.h @@ -32,7 +32,7 @@ class RicDeleteSummaryCaseCollectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.cpp b/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.cpp index cd4883771c..0aadabafa3 100644 --- a/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.cpp @@ -48,7 +48,7 @@ void RicDeleteTemporaryLgrsFeature::deleteAllTemporaryLgrs( RimEclipseCase* ecli //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteTemporaryLgrsFeature::isCommandEnabled() +bool RicDeleteTemporaryLgrsFeature::isCommandEnabled() const { std::vector selGridInfos = caf::selectedObjectsByTypeStrict(); if ( selGridInfos.size() == 1 && selGridInfos.front()->uiName() == RimGridCollection::temporaryGridUiName() ) diff --git a/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.h b/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.h index 915165e788..49c6f79806 100644 --- a/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteTemporaryLgrsFeature.h @@ -30,7 +30,7 @@ class RicDeleteTemporaryLgrsFeature : public caf::CmdFeature static void deleteAllTemporaryLgrs( RimEclipseCase* eclipseCase ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.cpp b/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.cpp index 32da49d4b3..6e8888aacc 100644 --- a/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteUncheckedSubItemsFeature, "RicDeleteUncheckedSubIt //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteUncheckedSubItemsFeature::isCommandEnabled() +bool RicDeleteUncheckedSubItemsFeature::isCommandEnabled() const { return RicDeleteSubItemsFeature::canCommandBeEnabled(); } diff --git a/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.h b/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.h index b046e4e5e7..1311205901 100644 --- a/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteUncheckedSubItemsFeature.h @@ -33,7 +33,7 @@ class RicDeleteUncheckedSubItemsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.cpp b/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.cpp index 09f5123979..7f7be234c4 100644 --- a/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.cpp +++ b/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellMeasurementFilePathFeature, "RicDeleteWellMeas //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteWellMeasurementFilePathFeature::isCommandEnabled() +bool RicDeleteWellMeasurementFilePathFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects ); diff --git a/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.h b/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.h index b526f1c64e..6c2ea76283 100644 --- a/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.h +++ b/ApplicationLibCode/Commands/RicDeleteWellMeasurementFilePathFeature.h @@ -28,7 +28,7 @@ class RicDeleteWellMeasurementFilePathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp index e96147b129..7d09675933 100644 --- a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp +++ b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.cpp @@ -60,7 +60,7 @@ RicExportContourMapToTextFeature::RicExportContourMapToTextFeature() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportContourMapToTextFeature::isCommandEnabled() +bool RicExportContourMapToTextFeature::isCommandEnabled() const { auto [existingEclipseContourMap, existingGeoMechContourMap] = findContourMapView(); diff --git a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h index 09aa7c30da..6e1be2456d 100644 --- a/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h +++ b/ApplicationLibCode/Commands/RicExportContourMapToTextFeature.h @@ -42,7 +42,7 @@ public: caf::PdmScriptResponse execute() override; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.cpp b/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.cpp index 7dfdacd22d..eea05d5213 100644 --- a/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.cpp +++ b/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.cpp @@ -33,14 +33,6 @@ CAF_CMD_SOURCE_INIT( RicExportStimPlanModelToFileFeature, "RicExportStimPlanModelToFileFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicExportStimPlanModelToFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.h b/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.h index d71f48c42f..f823b04cc7 100644 --- a/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.h +++ b/ApplicationLibCode/Commands/RicExportStimPlanModelToFileFeature.h @@ -28,7 +28,6 @@ class RicExportStimPlanModelToFileFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicFlyToObjectFeature.cpp b/ApplicationLibCode/Commands/RicFlyToObjectFeature.cpp index 703ccd8a34..17749309a7 100644 --- a/ApplicationLibCode/Commands/RicFlyToObjectFeature.cpp +++ b/ApplicationLibCode/Commands/RicFlyToObjectFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicFlyToObjectFeature, "RicFlyToObjectFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicFlyToObjectFeature::isCommandEnabled() +bool RicFlyToObjectFeature::isCommandEnabled() const { return RicFlyToObjectFeature::boundingBoxForSelectedObjects().isValid(); } diff --git a/ApplicationLibCode/Commands/RicFlyToObjectFeature.h b/ApplicationLibCode/Commands/RicFlyToObjectFeature.h index 63372262ee..7bbb949701 100644 --- a/ApplicationLibCode/Commands/RicFlyToObjectFeature.h +++ b/ApplicationLibCode/Commands/RicFlyToObjectFeature.h @@ -36,7 +36,7 @@ class RicFlyToObjectFeature : public caf::CmdFeature protected: void onActionTriggered( bool isChecked ) override; - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void setupActionLook( QAction* actionToSetup ) override; private: diff --git a/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.cpp b/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.cpp index 2eb745c386..65f5b24f20 100644 --- a/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.cpp +++ b/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicHideIntersectionBoxFeature, "RicHideIntersectionBoxFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHideIntersectionBoxFeature::isCommandEnabled() +bool RicHideIntersectionBoxFeature::isCommandEnabled() const { Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); if ( !activeView ) return false; diff --git a/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.h b/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.h index 459b4873a4..a6e894d7cf 100644 --- a/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.h +++ b/ApplicationLibCode/Commands/RicHideIntersectionBoxFeature.h @@ -28,7 +28,7 @@ class RicHideIntersectionBoxFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicHideIntersectionFeature.cpp b/ApplicationLibCode/Commands/RicHideIntersectionFeature.cpp index a17ce059d8..002c950dee 100644 --- a/ApplicationLibCode/Commands/RicHideIntersectionFeature.cpp +++ b/ApplicationLibCode/Commands/RicHideIntersectionFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicHideIntersectionFeature, "RicHideIntersectionFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicHideIntersectionFeature::isCommandEnabled() +bool RicHideIntersectionFeature::isCommandEnabled() const { Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); if ( !activeView ) return false; diff --git a/ApplicationLibCode/Commands/RicHideIntersectionFeature.h b/ApplicationLibCode/Commands/RicHideIntersectionFeature.h index 0f683db9c2..49a533088d 100644 --- a/ApplicationLibCode/Commands/RicHideIntersectionFeature.h +++ b/ApplicationLibCode/Commands/RicHideIntersectionFeature.h @@ -28,7 +28,7 @@ class RicHideIntersectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.cpp b/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.cpp index b4ed593220..15abf5fe99 100644 --- a/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicImportElasticPropertiesFeature, "RicImportElasticPropertiesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportElasticPropertiesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.h b/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.h index 70ecc360e6..8a18c32aef 100644 --- a/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.h +++ b/ApplicationLibCode/Commands/RicImportElasticPropertiesFeature.h @@ -28,7 +28,6 @@ class RicImportElasticPropertiesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportElementPropertyFeature.cpp b/ApplicationLibCode/Commands/RicImportElementPropertyFeature.cpp index a70c7f176f..2449949ee2 100644 --- a/ApplicationLibCode/Commands/RicImportElementPropertyFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportElementPropertyFeature.cpp @@ -33,14 +33,6 @@ CAF_CMD_SOURCE_INIT( RicImportElementPropertyFeature, "RicImportElementPropertyFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportElementPropertyFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportElementPropertyFeature.h b/ApplicationLibCode/Commands/RicImportElementPropertyFeature.h index 5797b8b987..064c2a026e 100644 --- a/ApplicationLibCode/Commands/RicImportElementPropertyFeature.h +++ b/ApplicationLibCode/Commands/RicImportElementPropertyFeature.h @@ -30,7 +30,6 @@ class RicImportElementPropertyFeature : public caf::CmdFeature static void importElementProperties(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp index 297143ed06..776f36dcd5 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleFeature.cpp @@ -57,14 +57,6 @@ CAF_CMD_SOURCE_INIT( RicImportEnsembleFeature, "RicImportEnsembleFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEnsembleFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportEnsembleFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleFeature.h index beaed73e43..6deb3a09da 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleFeature.h @@ -35,7 +35,6 @@ class RicImportEnsembleFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp index 174bfe7b67..7b258a8b13 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.cpp @@ -49,14 +49,6 @@ RicImportEnsembleSurfaceFeature::RicImportEnsembleSurfaceFeature() { } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEnsembleSurfaceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h index d207bca20f..29f4096f3c 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleSurfaceFeature.h @@ -37,7 +37,6 @@ public: static void importEnsembleSurfaceFromFiles( const QStringList& fileNames, RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp index d20d925f5f..89ad62576b 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.cpp @@ -45,14 +45,6 @@ RicImportEnsembleWellLogsFeature::RicImportEnsembleWellLogsFeature() { } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportEnsembleWellLogsFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h index 2d2068d9e5..7236d3c903 100644 --- a/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h +++ b/ApplicationLibCode/Commands/RicImportEnsembleWellLogsFeature.h @@ -39,7 +39,6 @@ class RicImportEnsembleWellLogsFeature : public caf::CmdFeature RiaEnsembleNameTools::EnsembleGroupingMode groupingMode ); private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportFaciesFeature.cpp b/ApplicationLibCode/Commands/RicImportFaciesFeature.cpp index 7a6f596b7a..8d54d08fad 100644 --- a/ApplicationLibCode/Commands/RicImportFaciesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportFaciesFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicImportFaciesFeature, "RicImportFaciesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportFaciesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportFaciesFeature.h b/ApplicationLibCode/Commands/RicImportFaciesFeature.h index 115bdc8d39..c5a8dad92f 100644 --- a/ApplicationLibCode/Commands/RicImportFaciesFeature.h +++ b/ApplicationLibCode/Commands/RicImportFaciesFeature.h @@ -34,7 +34,6 @@ class RicImportFaciesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp index 73b97dd5e9..bc6d87d164 100644 --- a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.cpp @@ -96,14 +96,6 @@ RimFormationNames* RicImportFormationNamesFeature::importFormationFiles( const Q return nullptr; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportFormationNamesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// If only one formation file is imported, the formation will automatically be set in the active /// view�s case. Import of LYR files with colors create custom color legends according to color diff --git a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.h b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.h index 6a519928ed..0c0381a7c9 100644 --- a/ApplicationLibCode/Commands/RicImportFormationNamesFeature.h +++ b/ApplicationLibCode/Commands/RicImportFormationNamesFeature.h @@ -33,7 +33,6 @@ class RicImportFormationNamesFeature : public caf::CmdFeature static RimFormationNames* importFormationFiles( const QStringList& fileNames ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportGeneralDataFeature.cpp b/ApplicationLibCode/Commands/RicImportGeneralDataFeature.cpp index 2333f15275..403986e172 100644 --- a/ApplicationLibCode/Commands/RicImportGeneralDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportGeneralDataFeature.cpp @@ -149,14 +149,6 @@ QStringList RicImportGeneralDataFeature::fileNamesFromCaseNames( const QStringLi return fileNames; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportGeneralDataFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportGeneralDataFeature.h b/ApplicationLibCode/Commands/RicImportGeneralDataFeature.h index 256e722c86..c8298e5e36 100644 --- a/ApplicationLibCode/Commands/RicImportGeneralDataFeature.h +++ b/ApplicationLibCode/Commands/RicImportGeneralDataFeature.h @@ -62,7 +62,6 @@ public: static QString getFilePattern( const std::vector& fileTypes, bool allowWildcard ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.cpp index 990063700e..4c832db25b 100644 --- a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.cpp @@ -68,14 +68,6 @@ bool RicImportGridModelFromSummaryCaseFeature::openOrImportGridModelFromSummaryC return false; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportGridModelFromSummaryCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.h index cbbb4a81f7..7ea4a8d7bc 100644 --- a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCaseFeature.h @@ -34,7 +34,6 @@ public: static bool openOrImportGridModelFromSummaryCase( const RimFileSummaryCase* summaryCase ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.cpp index 734a03b3b5..80842ec680 100644 --- a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.cpp @@ -29,14 +29,6 @@ CAF_CMD_SOURCE_INIT( RicImportGridModelFromSummaryCurveFeature, "RicImportGridModelFromSummaryCurveFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportGridModelFromSummaryCurveFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.h b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.h index 3bc235eb20..d527f03d88 100644 --- a/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/RicImportGridModelFromSummaryCurveFeature.h @@ -28,7 +28,6 @@ class RicImportGridModelFromSummaryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportObservedDataFeature.cpp b/ApplicationLibCode/Commands/RicImportObservedDataFeature.cpp index 00323f9619..ddeb27382c 100644 --- a/ApplicationLibCode/Commands/RicImportObservedDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportObservedDataFeature.cpp @@ -99,7 +99,7 @@ void RicImportObservedDataFeature::selectObservedDataFileInDialog() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportObservedDataFeature::isCommandEnabled() +bool RicImportObservedDataFeature::isCommandEnabled() const { std::vector selectionObservedDataCollection; caf::SelectionManager::instance()->objectsByType( &selectionObservedDataCollection ); diff --git a/ApplicationLibCode/Commands/RicImportObservedDataFeature.h b/ApplicationLibCode/Commands/RicImportObservedDataFeature.h index 8b127cfcaf..b579ab0941 100644 --- a/ApplicationLibCode/Commands/RicImportObservedDataFeature.h +++ b/ApplicationLibCode/Commands/RicImportObservedDataFeature.h @@ -35,7 +35,7 @@ public: static void selectObservedDataFileInDialog(); private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp index 6fdfff0c20..dad855f52c 100644 --- a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.cpp @@ -94,7 +94,7 @@ void RicImportObservedFmuDataFeature::selectObservedDataPathInDialog() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportObservedFmuDataFeature::isCommandEnabled() +bool RicImportObservedFmuDataFeature::isCommandEnabled() const { std::vector selectionObservedDataCollection; caf::SelectionManager::instance()->objectsByType( &selectionObservedDataCollection ); diff --git a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.h b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.h index dc39baf3e3..71a94613ab 100644 --- a/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.h +++ b/ApplicationLibCode/Commands/RicImportObservedFmuDataFeature.h @@ -34,7 +34,7 @@ public: static void selectObservedDataPathInDialog(); private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp index ee2f0a74f4..439e06765a 100644 --- a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.cpp @@ -75,7 +75,7 @@ void RicImportPressureDepthDataFeature::selectPressureDepthDataPathInDialog() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportPressureDepthDataFeature::isCommandEnabled() +bool RicImportPressureDepthDataFeature::isCommandEnabled() const { std::vector selectionObservedDataCollection; caf::SelectionManager::instance()->objectsByType( &selectionObservedDataCollection ); diff --git a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.h b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.h index acb3a74b99..f3a1243134 100644 --- a/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.h +++ b/ApplicationLibCode/Commands/RicImportPressureDepthDataFeature.h @@ -34,7 +34,7 @@ public: static void selectPressureDepthDataPathInDialog(); private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.cpp index 36d0a9e900..e8f44e6e52 100644 --- a/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicImportRevealSummaryCaseFeature, "RicImportRevealSummaryCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportRevealSummaryCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.h index a241245a0b..ba84191540 100644 --- a/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicImportRevealSummaryCaseFeature.h @@ -28,7 +28,6 @@ class RicImportRevealSummaryCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.cpp index 4e419b7a27..90b82957c0 100644 --- a/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicImportStimPlanSummaryCaseFeature, "RicImportStimPlanSummaryCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportStimPlanSummaryCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.h index 7ff082f1af..79398f5f52 100644 --- a/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicImportStimPlanSummaryCaseFeature.h @@ -28,7 +28,6 @@ class RicImportStimPlanSummaryCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.cpp index c74a84460a..070d8cf7ff 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.cpp @@ -22,14 +22,6 @@ CAF_CMD_SOURCE_INIT( RicImportSummaryCaseFeature, "RicImportSummaryCaseFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportSummaryCaseFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.h index 04d01bc63f..a3ef693a7f 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicImportSummaryCaseFeature.h @@ -28,7 +28,6 @@ class RicImportSummaryCaseFeature : public RicImportGeneralDataFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp index b320fd889f..5de65a539e 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.cpp @@ -61,14 +61,6 @@ CAF_CMD_SOURCE_INIT( RicImportSummaryCasesFeature, "RicImportSummaryCasesFeature QString RicImportSummaryCasesFeature::m_pathFilter = "*"; QString RicImportSummaryCasesFeature::m_fileNameFilter = "*"; -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportSummaryCasesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.h b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.h index b1aa5b2df3..6cd9568e72 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.h +++ b/ApplicationLibCode/Commands/RicImportSummaryCasesFeature.h @@ -62,7 +62,6 @@ public: const QString& pathCacheName ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp index c0de8c92ac..fdeb09b96a 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp +++ b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.cpp @@ -41,14 +41,6 @@ CAF_CMD_SOURCE_INIT( RicImportSummaryGroupFeature, "RicImportSummaryGroupFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportSummaryGroupFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.h b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.h index d40d838ff3..b7a146cdb3 100644 --- a/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.h +++ b/ApplicationLibCode/Commands/RicImportSummaryGroupFeature.h @@ -32,7 +32,6 @@ class RicImportSummaryGroupFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp index c17ed261a4..b39fc11a86 100644 --- a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.cpp @@ -62,7 +62,7 @@ const size_t largeSamplingThresholdCellCount = 5000000u; //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewContourMapViewFeature::isCommandEnabled() +bool RicNewContourMapViewFeature::isCommandEnabled() const { bool selectedView = caf::SelectionManager::instance()->selectedItemOfType() != nullptr; bool selectedCase = caf::SelectionManager::instance()->selectedItemOfType() != nullptr; diff --git a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.h b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.h index b3d7ea21c6..696f2f3455 100644 --- a/ApplicationLibCode/Commands/RicNewContourMapViewFeature.h +++ b/ApplicationLibCode/Commands/RicNewContourMapViewFeature.h @@ -36,7 +36,7 @@ class RicNewContourMapViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.cpp b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.cpp index fdae3048db..48c23fb35a 100644 --- a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.cpp @@ -30,14 +30,6 @@ CAF_CMD_SOURCE_INIT( RicNewCustomObjectiveFunctionFeature, "RicNewCustomObjectiveFunctionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewCustomObjectiveFunctionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.h b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.h index 7e3f3a0d91..02ce43e313 100644 --- a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.h +++ b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionFeature.h @@ -28,7 +28,6 @@ class RicNewCustomObjectiveFunctionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.cpp b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.cpp index 8fc168c5b4..f3670c2c5d 100644 --- a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.cpp @@ -30,14 +30,6 @@ CAF_CMD_SOURCE_INIT( RicNewCustomObjectiveFunctionWeightFeature, "RicNewCustomObjectiveFunctionWeightFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewCustomObjectiveFunctionWeightFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.h b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.h index bab0f9800e..acf6486a59 100644 --- a/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.h +++ b/ApplicationLibCode/Commands/RicNewCustomObjectiveFunctionWeightFeature.h @@ -28,7 +28,6 @@ class RicNewCustomObjectiveFunctionWeightFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.cpp b/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.cpp index 14ffad6db3..de19f0b59b 100644 --- a/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.cpp @@ -29,7 +29,7 @@ CAF_CMD_SOURCE_INIT( RicNewPressureTableItemFeature, "RicNewPressureTableItemFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPressureTableItemFeature::isCommandEnabled() +bool RicNewPressureTableItemFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.h b/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.h index a48195f366..1feab653e5 100644 --- a/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.h +++ b/ApplicationLibCode/Commands/RicNewPressureTableItemFeature.h @@ -28,7 +28,7 @@ class RicNewPressureTableItemFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicNewVfpPlotFeature.cpp b/ApplicationLibCode/Commands/RicNewVfpPlotFeature.cpp index c1b047c00f..5a0ba0e125 100644 --- a/ApplicationLibCode/Commands/RicNewVfpPlotFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewVfpPlotFeature.cpp @@ -45,7 +45,7 @@ CAF_CMD_SOURCE_INIT( RicNewVfpPlotFeature, "RicNewVfpPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewVfpPlotFeature::isCommandEnabled() +bool RicNewVfpPlotFeature::isCommandEnabled() const { RimVfpPlotCollection* plotColl = caf::firstAncestorOfTypeFromSelectedObject(); return ( plotColl != nullptr ); diff --git a/ApplicationLibCode/Commands/RicNewVfpPlotFeature.h b/ApplicationLibCode/Commands/RicNewVfpPlotFeature.h index dbebfd4a4d..ba670d6b07 100644 --- a/ApplicationLibCode/Commands/RicNewVfpPlotFeature.h +++ b/ApplicationLibCode/Commands/RicNewVfpPlotFeature.h @@ -28,7 +28,7 @@ class RicNewVfpPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicNewViewFeature.cpp b/ApplicationLibCode/Commands/RicNewViewFeature.cpp index 2a7d53891a..85051eec71 100644 --- a/ApplicationLibCode/Commands/RicNewViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicNewViewFeature.cpp @@ -51,7 +51,7 @@ void RicNewViewFeature::addReservoirView( RimEclipseCase* eclipseCase, RimGeoMec //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewViewFeature::isCommandEnabled() +bool RicNewViewFeature::isCommandEnabled() const { return selectedEclipseCase() != nullptr || selectedEclipseView() != nullptr || selectedGeoMechCase() != nullptr || selectedGeoMechView() != nullptr; diff --git a/ApplicationLibCode/Commands/RicNewViewFeature.h b/ApplicationLibCode/Commands/RicNewViewFeature.h index d0b0a90407..f5a6645e9a 100644 --- a/ApplicationLibCode/Commands/RicNewViewFeature.h +++ b/ApplicationLibCode/Commands/RicNewViewFeature.h @@ -38,7 +38,7 @@ public: static void addReservoirView( RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicReloadCaseFeature.cpp b/ApplicationLibCode/Commands/RicReloadCaseFeature.cpp index 875461c23d..a0fe62c8c4 100644 --- a/ApplicationLibCode/Commands/RicReloadCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadCaseFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicReloadCaseFeature, "RicReloadCaseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReloadCaseFeature::isCommandEnabled() +bool RicReloadCaseFeature::isCommandEnabled() const { std::vector selectedFormationNamesCollObjs; caf::SelectionManager::instance()->objectsByType( &selectedFormationNamesCollObjs ); diff --git a/ApplicationLibCode/Commands/RicReloadCaseFeature.h b/ApplicationLibCode/Commands/RicReloadCaseFeature.h index b9e6b12651..d7464ed0f2 100644 --- a/ApplicationLibCode/Commands/RicReloadCaseFeature.h +++ b/ApplicationLibCode/Commands/RicReloadCaseFeature.h @@ -26,7 +26,7 @@ class RicReloadCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp index a927db5763..500af2f206 100644 --- a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicReloadFormationNamesFeature, "RicReloadFormationNamesFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReloadFormationNamesFeature::isCommandEnabled() +bool RicReloadFormationNamesFeature::isCommandEnabled() const { std::vector selectedFormationNamesObjs; caf::SelectionManager::instance()->objectsByType( &selectedFormationNamesObjs ); diff --git a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.h b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.h index 743b2a35f7..c16ab69393 100644 --- a/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.h +++ b/ApplicationLibCode/Commands/RicReloadFormationNamesFeature.h @@ -28,7 +28,7 @@ class RicReloadFormationNamesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.cpp b/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.cpp index c34110c0b5..c6ef911caa 100644 --- a/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.cpp @@ -28,14 +28,6 @@ CAF_CMD_SOURCE_INIT( RicReloadPressureDepthDataFeature, "RicReloadPressureDepthDataFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicReloadPressureDepthDataFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.h b/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.h index fb7ffca4bb..a2bae072a5 100644 --- a/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.h +++ b/ApplicationLibCode/Commands/RicReloadPressureDepthDataFeature.h @@ -28,7 +28,6 @@ class RicReloadPressureDepthDataFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp index 11aa94740a..c46bd225be 100644 --- a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.cpp @@ -54,7 +54,7 @@ void RicReloadSummaryCaseFeature::reloadSummaryCase( RimSummaryCase* summaryCase //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReloadSummaryCaseFeature::isCommandEnabled() +bool RicReloadSummaryCaseFeature::isCommandEnabled() const { std::vector caseSelection = selectedSummaryCases(); diff --git a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.h index 7d4ae63a63..fd8b1bdec3 100644 --- a/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicReloadSummaryCaseFeature.h @@ -32,7 +32,7 @@ public: static void reloadSummaryCase( RimSummaryCase* summaryCase ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.cpp b/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.cpp index ef40d2dd4f..19a11e3c44 100644 --- a/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicReloadWellMeasurementsFeature, "RicReloadWellMeasurement //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReloadWellMeasurementsFeature::isCommandEnabled() +bool RicReloadWellMeasurementsFeature::isCommandEnabled() const { std::vector filePaths; caf::SelectionManager::instance()->objectsByType( &filePaths ); diff --git a/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.h b/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.h index 145d45edcd..cf1f742033 100644 --- a/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.h +++ b/ApplicationLibCode/Commands/RicReloadWellMeasurementsFeature.h @@ -25,7 +25,7 @@ class RicReloadWellMeasurementsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.cpp b/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.cpp index 4f5f6c0d3c..083d222fbc 100644 --- a/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.cpp +++ b/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicReloadWellPathFormationNamesFeature, "RicReloadWellPathF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReloadWellPathFormationNamesFeature::isCommandEnabled() +bool RicReloadWellPathFormationNamesFeature::isCommandEnabled() const { std::vector wellPaths; caf::SelectionManager::instance()->objectsByType( &wellPaths ); diff --git a/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.h b/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.h index 863e79f612..40e2624f36 100644 --- a/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.h +++ b/ApplicationLibCode/Commands/RicReloadWellPathFormationNamesFeature.h @@ -28,7 +28,7 @@ class RicReloadWellPathFormationNamesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp index c58e935678..e456f7f1bf 100644 --- a/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicRenameSummaryCaseFeature, "RicRenameSummaryCaseFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicRenameSummaryCaseFeature::isCommandEnabled() +bool RicRenameSummaryCaseFeature::isCommandEnabled() const { auto summaryCase = caf::SelectionManager::instance()->selectedItemOfType(); return ( summaryCase != nullptr ); diff --git a/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h index 6ce2d57f45..325ae07d00 100644 --- a/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h @@ -25,7 +25,7 @@ class RicRenameSummaryCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp b/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp index 534b5c20fa..2eba90951f 100644 --- a/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReplaceCaseFeature.cpp @@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicReplaceCaseFeature, "RicReplaceCaseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReplaceCaseFeature::isCommandEnabled() +bool RicReplaceCaseFeature::isCommandEnabled() const { std::vector selectedFormationNamesCollObjs; caf::SelectionManager::instance()->objectsByType( &selectedFormationNamesCollObjs ); diff --git a/ApplicationLibCode/Commands/RicReplaceCaseFeature.h b/ApplicationLibCode/Commands/RicReplaceCaseFeature.h index ad1e2fd2ad..c31dba9c1c 100644 --- a/ApplicationLibCode/Commands/RicReplaceCaseFeature.h +++ b/ApplicationLibCode/Commands/RicReplaceCaseFeature.h @@ -25,7 +25,7 @@ class RicReplaceCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp index 829c4dd375..aa6449d8ee 100644 --- a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.cpp @@ -68,7 +68,7 @@ void RicReplaceSummaryCaseFeature::updateRequredCalculatedCurves( RimSummaryCase //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicReplaceSummaryCaseFeature::isCommandEnabled() +bool RicReplaceSummaryCaseFeature::isCommandEnabled() const { RimSummaryCase* rimSummaryCase = caf::SelectionManager::instance()->selectedItemOfType(); return rimSummaryCase != nullptr; diff --git a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h b/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h index 956f5680ff..e4ecee7bef 100644 --- a/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/RicReplaceSummaryCaseFeature.h @@ -31,7 +31,7 @@ public: static void updateRequredCalculatedCurves( RimSummaryCase* sourceSummaryCase ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicSelectColorResult.cpp b/ApplicationLibCode/Commands/RicSelectColorResult.cpp index 8924455c48..7bf0b838b7 100644 --- a/ApplicationLibCode/Commands/RicSelectColorResult.cpp +++ b/ApplicationLibCode/Commands/RicSelectColorResult.cpp @@ -54,7 +54,7 @@ void RicSelectColorResult::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSelectColorResult::isCommandEnabled() +bool RicSelectColorResult::isCommandEnabled() const { if ( RicWellLogTools::isWellPathOrSimWellSelectedInView() ) return false; diff --git a/ApplicationLibCode/Commands/RicSelectColorResult.h b/ApplicationLibCode/Commands/RicSelectColorResult.h index 7f34d6ba48..8cfc13acd4 100644 --- a/ApplicationLibCode/Commands/RicSelectColorResult.h +++ b/ApplicationLibCode/Commands/RicSelectColorResult.h @@ -28,7 +28,7 @@ class RicSelectColorResult : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.cpp b/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.cpp index 1aec5c9fa0..c1f9b92e80 100644 --- a/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.cpp +++ b/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.cpp @@ -39,7 +39,7 @@ void RicShowDataSourcesForRealization::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowDataSourcesForRealization::isCommandChecked() +bool RicShowDataSourcesForRealization::isCommandChecked() const { std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); @@ -55,7 +55,7 @@ bool RicShowDataSourcesForRealization::isCommandChecked() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowDataSourcesForRealization::isCommandEnabled() +bool RicShowDataSourcesForRealization::isCommandEnabled() const { std::vector selection; caf::SelectionManager::instance()->objectsByType( &selection ); diff --git a/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.h b/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.h index 87f425d58c..41d2180db1 100644 --- a/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.h +++ b/ApplicationLibCode/Commands/RicShowDataSourcesForRealization.h @@ -28,8 +28,8 @@ class RicShowDataSourcesForRealization : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; }; diff --git a/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.cpp b/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.cpp index 108006df8d..9a52e066d5 100644 --- a/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.cpp +++ b/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.cpp @@ -82,14 +82,6 @@ void RicShowGridCalculatorFeature::hideGridCalculatorDialog() if ( dialog ) dialog->hide(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowGridCalculatorFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.h b/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.h index 4d6dde89af..40b7493059 100644 --- a/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.h +++ b/ApplicationLibCode/Commands/RicShowGridCalculatorFeature.h @@ -37,7 +37,6 @@ private: static RicGridCalculatorDialog* gridCalculatorDialog( bool createIfNotPresent ); static void hideGridCalculatorDialog(); - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.cpp b/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.cpp index ee233b1656..b188b1e251 100644 --- a/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.cpp +++ b/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicShowGridStatisticsFeature, "RicShowGridStatisticsFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowGridStatisticsFeature::isCommandEnabled() +bool RicShowGridStatisticsFeature::isCommandEnabled() const { if ( RicWellLogTools::isWellPathOrSimWellSelectedInView() ) return false; diff --git a/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.h b/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.h index aac8cba751..c52bb5b0c2 100644 --- a/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.h +++ b/ApplicationLibCode/Commands/RicShowGridStatisticsFeature.h @@ -30,7 +30,7 @@ class RicShowGridStatisticsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.cpp b/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.cpp index 592db21c3d..1de7543764 100644 --- a/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.cpp +++ b/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.cpp @@ -97,7 +97,7 @@ caf::PdmScriptResponse RicStackSelectedCurvesFeature::execute() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicStackSelectedCurvesFeature::isCommandEnabled() +bool RicStackSelectedCurvesFeature::isCommandEnabled() const { std::vector selectedItems; caf::SelectionManager::instance()->selectedItems( selectedItems ); diff --git a/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.h b/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.h index 3032ce9c05..6e12b371f9 100644 --- a/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.h +++ b/ApplicationLibCode/Commands/RicStackSelectedCurvesFeature.h @@ -41,7 +41,7 @@ public: bool isStacked ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/RicThemeColorEditorFeature.cpp b/ApplicationLibCode/Commands/RicThemeColorEditorFeature.cpp index 8639d81f09..4e672da562 100644 --- a/ApplicationLibCode/Commands/RicThemeColorEditorFeature.cpp +++ b/ApplicationLibCode/Commands/RicThemeColorEditorFeature.cpp @@ -39,14 +39,6 @@ CAF_CMD_SOURCE_INIT( RicThemeColorEditorFeature, "RicThemeColorEditorFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicThemeColorEditorFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/RicThemeColorEditorFeature.h b/ApplicationLibCode/Commands/RicThemeColorEditorFeature.h index c18dbebdc0..66ac1bdb77 100644 --- a/ApplicationLibCode/Commands/RicThemeColorEditorFeature.h +++ b/ApplicationLibCode/Commands/RicThemeColorEditorFeature.h @@ -28,7 +28,6 @@ class RicThemeColorEditorFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp index da7dc98a36..ade4b00f7d 100644 --- a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp +++ b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.cpp @@ -33,9 +33,8 @@ CAF_CMD_SOURCE_INIT( RicTogglePerspectiveViewFeature, "RicTogglePerspectiveViewF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicTogglePerspectiveViewFeature::isCommandEnabled() +bool RicTogglePerspectiveViewFeature::isCommandEnabled() const { - this->action(); // Retrieve the action to update the looks RimGridView* activeGridView = RiaApplication::instance()->activeGridView(); RimEclipseContourMapView* view2d = dynamic_cast( activeGridView ); return !view2d && activeGridView && RiaApplication::instance()->activeReservoirView()->viewer(); diff --git a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.h b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.h index 3c003590e6..aa02df2621 100644 --- a/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.h +++ b/ApplicationLibCode/Commands/RicTogglePerspectiveViewFeature.h @@ -29,7 +29,7 @@ class RicTogglePerspectiveViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.cpp b/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.cpp index b363bf3658..155940e3d7 100644 --- a/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.cpp +++ b/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.cpp @@ -59,7 +59,7 @@ caf::PdmScriptResponse RicUnstackSelectedCurvesFeature::execute() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicUnstackSelectedCurvesFeature::isCommandEnabled() +bool RicUnstackSelectedCurvesFeature::isCommandEnabled() const { std::vector selectedItems; caf::SelectionManager::instance()->selectedItems( selectedItems ); diff --git a/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.h b/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.h index 6810157789..673a4d13dd 100644 --- a/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.h +++ b/ApplicationLibCode/Commands/RicUnstackSelectedCurvesFeature.h @@ -38,7 +38,7 @@ public: caf::PdmScriptResponse execute() override; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp index d018a2e157..1757444031 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.cpp @@ -40,14 +40,6 @@ CAF_CMD_SOURCE_INIT( RicImportSeismicFeature, "RicImportSeismicFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportSeismicFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.h index a4c1f1a7a8..e4a5eade5e 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicImportSeismicFeature.h @@ -35,7 +35,6 @@ public: static QString convertSEGYtoVDS( QString filename ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.cpp index a416889f7f..49b772cdf2 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicNewInlineSeismicSectionFeature, "RicNewInlineSeismicSectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewInlineSeismicSectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.h index 1a5c4bcf73..0a7dadd382 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewInlineSeismicSectionFeature.h @@ -28,7 +28,6 @@ class RicNewInlineSeismicSectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.cpp index 5e4d497bd3..81f296db45 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicNewPolylineSeismicSectionFeature, "RicNewPolylineSeismicSectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewPolylineSeismicSectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.h index 9b1d23acba..041e94a971 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewPolylineSeismicSectionFeature.h @@ -28,7 +28,6 @@ class RicNewPolylineSeismicSectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.cpp index 68ef9359f4..5d94ddd4bb 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicNewSeismicDifferenceFeature, "RicNewSeismicDifferenceFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSeismicDifferenceFeature::isCommandEnabled() +bool RicNewSeismicDifferenceFeature::isCommandEnabled() const { auto size = selectedSeismic().size(); return size == 2; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.h index c63e007b42..de9440b396 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewSeismicDifferenceFeature.h @@ -30,10 +30,10 @@ class RicNewSeismicDifferenceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - std::vector selectedSeismic(); + static std::vector selectedSeismic(); }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.cpp index 659522aa55..256e4936e8 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicNewWellpathSeismicSectionFeature, "RicNewWellpathSeismicSectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewWellpathSeismicSectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.h index 2cf0a9ea27..724e2dc79b 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewWellpathSeismicSectionFeature.h @@ -28,7 +28,6 @@ class RicNewWellpathSeismicSectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.cpp index 3273527cc0..860c86a097 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicNewXlineSeismicSectionFeature, "RicNewXlineSeismicSectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewXlineSeismicSectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.h index d3324cc718..73d132d82f 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewXlineSeismicSectionFeature.h @@ -28,7 +28,6 @@ class RicNewXlineSeismicSectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.cpp index 416356e138..11b40b9c56 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.cpp @@ -24,14 +24,6 @@ CAF_CMD_SOURCE_INIT( RicNewZSliceSeismicSectionFeature, "RicNewZSliceSeismicSectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewZSliceSeismicSectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.h index b450d61dad..01acfd427d 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicNewZSliceSeismicSectionFeature.h @@ -28,7 +28,6 @@ class RicNewZSliceSeismicSectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.cpp b/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.cpp index 6908df6fed..951c15c64d 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.cpp +++ b/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicSeismicSectionFromIntersectionFeature, "RicSeismicSectio //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSeismicSectionFromIntersectionFeature::isCommandEnabled() +bool RicSeismicSectionFromIntersectionFeature::isCommandEnabled() const { RimExtrudedCurveIntersection* intersection = getSelectedIntersection(); if ( intersection != nullptr ) @@ -120,7 +120,7 @@ void RicSeismicSectionFromIntersectionFeature::setupActionLook( QAction* actionT //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimExtrudedCurveIntersection* RicSeismicSectionFromIntersectionFeature::getSelectedIntersection() +RimExtrudedCurveIntersection* RicSeismicSectionFromIntersectionFeature::getSelectedIntersection() const { std::vector selectedUiItems; caf::SelectionManager::instance()->selectedItems( selectedUiItems ); diff --git a/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.h b/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.h index 183bb62d0f..3ac692d2cc 100644 --- a/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.h +++ b/ApplicationLibCode/Commands/SeismicCommands/RicSeismicSectionFromIntersectionFeature.h @@ -31,10 +31,10 @@ class RicSeismicSectionFromIntersectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimExtrudedCurveIntersection* getSelectedIntersection(); + RimExtrudedCurveIntersection* getSelectedIntersection() const; }; diff --git a/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.cpp b/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.cpp index 23ba04559f..1235366d01 100644 --- a/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.cpp +++ b/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.cpp @@ -38,14 +38,6 @@ CAF_CMD_SOURCE_INIT( RicWellPathsImportSsihubFeature, "RicWellPathsImportSsihubFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicWellPathsImportSsihubFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.h b/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.h index 2dcf2a7d73..2ffb5e84be 100644 --- a/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.h +++ b/ApplicationLibCode/Commands/SsiHubImportCommands/RicWellPathsImportSsihubFeature.h @@ -29,7 +29,6 @@ class RicWellPathsImportSsihubFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.cpp b/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.cpp index ebd8750963..040a74bb74 100644 --- a/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.cpp +++ b/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.cpp @@ -29,14 +29,6 @@ CAF_CMD_SOURCE_INIT( RicNewStreamlineFeature, "RicNewStreamlineFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewStreamlineFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.h b/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.h index a85a088ab5..9ba207794d 100644 --- a/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.h +++ b/ApplicationLibCode/Commands/StreamlineCommands/RicNewStreamlineFeature.h @@ -28,7 +28,6 @@ class RicNewStreamlineFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp index 87fd412a85..dbcb8cb120 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.cpp @@ -42,14 +42,6 @@ CAF_CMD_SOURCE_INIT( RicAsciiExportSummaryPlotFeature, "RicAsciiExportSummaryPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAsciiExportSummaryPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h index 77d021bb07..5eea41aee5 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicAsciiExportSummaryPlotFeature.h @@ -36,7 +36,6 @@ public: static bool exportTextToFile( const QString& fileName, const QString& text ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.cpp index 13f1b536f0..aaf9b7529f 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicClearSourceSteppingEnsembleCurveSetFeature, "RicClearSou //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicClearSourceSteppingEnsembleCurveSetFeature::isCommandEnabled() +bool RicClearSourceSteppingEnsembleCurveSetFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.h index bc95811d89..12e5717671 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingEnsembleCurveSetFeature.h @@ -33,7 +33,7 @@ public: static void clearAllSourceSteppingInSummaryPlot( const RimSummaryPlot* summaryPlot ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.cpp index 92996428d8..bba0b6243d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicClearSourceSteppingSummaryCurveFeature, "RicClearSourceS //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicClearSourceSteppingSummaryCurveFeature::isCommandEnabled() +bool RicClearSourceSteppingSummaryCurveFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.h index b344cbf034..417be2d727 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicClearSourceSteppingSummaryCurveFeature.h @@ -28,7 +28,7 @@ class RicClearSourceSteppingSummaryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.cpp index 8dabda100f..10de3fc79d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicCreateDeclineCurvesFeature, "RicCreateDeclineCurvesFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateDeclineCurvesFeature::isCommandEnabled() +bool RicCreateDeclineCurvesFeature::isCommandEnabled() const { RimSummaryPlot* selectedPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( selectedPlot && !RiaSummaryTools::isSummaryCrossPlot( selectedPlot ) ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.h index 129a960235..ce37d5d13d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateDeclineCurvesFeature.h @@ -33,7 +33,7 @@ class RicCreateDeclineCurvesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.cpp index 9c676750f1..9ad8b0a9d5 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicCreateRegressionAnalysisCurveFeature, "RicCreateRegressi //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCreateRegressionAnalysisCurveFeature::isCommandEnabled() +bool RicCreateRegressionAnalysisCurveFeature::isCommandEnabled() const { RimSummaryPlot* selectedPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( selectedPlot && !RiaSummaryTools::isSummaryCrossPlot( selectedPlot ) ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.h index 213e0a8aa2..19093302c4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicCreateRegressionAnalysisCurveFeature.h @@ -33,7 +33,7 @@ class RicCreateRegressionAnalysisCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.cpp index 12ca362f8e..d987e9389d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.cpp @@ -25,7 +25,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteSubPlotCtxFeature, "RicDeleteSubPlotCtxFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteSubPlotCtxFeature::isCommandEnabled() +bool RicDeleteSubPlotCtxFeature::isCommandEnabled() const { return true; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.h index bf0cc88b31..6ca17a2517 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDeleteSubPlotCtxFeature.h @@ -28,6 +28,6 @@ class RicDeleteSubPlotCtxFeature : public RicDeleteSubPlotFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.cpp index d321c4ec0f..0c038ab98b 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryCrossPlotCurveFeature, "RicDuplicateSumm //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDuplicateSummaryCrossPlotCurveFeature::isCommandEnabled() +bool RicDuplicateSummaryCrossPlotCurveFeature::isCommandEnabled() const { RimSummaryCrossPlot* selectedPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( selectedPlot ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.h index 9805775091..f9f328a8bb 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotCurveFeature.h @@ -34,6 +34,6 @@ class RicDuplicateSummaryCrossPlotCurveFeature : public RicDuplicateSummaryCurve CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.cpp index bfe040093f..f82ea179ab 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryCrossPlotFeature, "RicDuplicateSummaryCr //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDuplicateSummaryCrossPlotFeature::isCommandEnabled() +bool RicDuplicateSummaryCrossPlotFeature::isCommandEnabled() const { RimSummaryCrossPlotCollection* sumPlotColl = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.h index 334819020c..d1b34db0a6 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCrossPlotFeature.h @@ -28,7 +28,7 @@ class RicDuplicateSummaryCrossPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.cpp index ecd4067110..fef3d77ef5 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryCurveFeature, "RicDuplicateSummaryCurveF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDuplicateSummaryCurveFeature::isCommandEnabled() +bool RicDuplicateSummaryCurveFeature::isCommandEnabled() const { RimSummaryPlot* selectedPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( selectedPlot && !RiaSummaryTools::isSummaryCrossPlot( selectedPlot ) ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.h index 011ea04454..f7dc5d57d8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryCurveFeature.h @@ -32,7 +32,7 @@ class RicDuplicateSummaryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.cpp index 8d52433dfd..6e36310b2d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryPlotFeature, "RicDuplicateSummaryPlotFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDuplicateSummaryPlotFeature::isCommandEnabled() +bool RicDuplicateSummaryPlotFeature::isCommandEnabled() const { RimSummaryMultiPlot* multiPlot = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.h index 4bd16223ba..8e97f41d28 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryPlotFeature.h @@ -28,7 +28,7 @@ class RicDuplicateSummaryPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.cpp index 22ee51e814..96d2a3e335 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicDuplicateSummaryTableFeature, "RicDuplicateSummaryTableFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicDuplicateSummaryTableFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.h index 6e1b7aa876..cb92a40a11 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicDuplicateSummaryTableFeature.h @@ -30,7 +30,6 @@ class RicDuplicateSummaryTableFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.cpp index 010e228b95..e3720b39fc 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.cpp @@ -65,7 +65,7 @@ RicSummaryPlotEditorDialog* RicEditSummaryCrossPlotFeature::curveCreatorDialog() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditSummaryCrossPlotFeature::isCommandEnabled() +bool RicEditSummaryCrossPlotFeature::isCommandEnabled() const { return selectedSummaryPlot() != nullptr; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.h index 69458e4090..c478663171 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCrossPlotFeature.h @@ -37,7 +37,7 @@ public: static RicSummaryPlotEditorDialog* curveCreatorDialog(); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.cpp index 96b29afe38..c763c6f43f 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.cpp @@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicEditSummaryCurveCalculationFeature, "RicEditSummaryCurve //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditSummaryCurveCalculationFeature::isCommandEnabled() +bool RicEditSummaryCurveCalculationFeature::isCommandEnabled() const { std::vector selectedCurves = caf::selectedObjectsByType(); return selectedCurves.size() == 1 && selectedCurves.front()->summaryAddressY().isCalculated(); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.h index 61c61dab3a..525ebfecf0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryCurveCalculationFeature.h @@ -28,7 +28,7 @@ class RicEditSummaryCurveCalculationFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.cpp index 93974aa1ac..ef949ea4c4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.cpp @@ -23,7 +23,7 @@ CAF_CMD_SOURCE_INIT( RicEditSummaryPlotCtxFeature, "RicEditSummaryPlotCtxFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditSummaryPlotCtxFeature::isCommandEnabled() +bool RicEditSummaryPlotCtxFeature::isCommandEnabled() const { return true; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.h index b1e307fc72..6abb23b29b 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotCtxFeature.h @@ -28,5 +28,5 @@ class RicEditSummaryPlotCtxFeature : public RicEditSummaryPlotFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.cpp index bd5c935af7..434f7d23bd 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.cpp @@ -102,7 +102,7 @@ void RicEditSummaryPlotFeature::editSummaryPlot( RimSummaryPlot* plot ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicEditSummaryPlotFeature::isCommandEnabled() +bool RicEditSummaryPlotFeature::isCommandEnabled() const { return selectedSummaryPlot() != nullptr; } @@ -127,7 +127,7 @@ void RicEditSummaryPlotFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -RimSummaryPlot* RicEditSummaryPlotFeature::selectedSummaryPlot() +RimSummaryPlot* RicEditSummaryPlotFeature::selectedSummaryPlot() const { RimSummaryPlot* sumPlot = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.h index 816093a460..777b520134 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicEditSummaryPlotFeature.h @@ -38,10 +38,10 @@ public: static void editSummaryPlot( RimSummaryPlot* plot ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimSummaryPlot* selectedSummaryPlot(); + RimSummaryPlot* selectedSummaryPlot() const; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp index fd42219743..93fcee8d9f 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.cpp @@ -93,7 +93,7 @@ RimSummaryPlot* RicNewDefaultSummaryPlotFeature::createFromSummaryCases( const s //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewDefaultSummaryPlotFeature::isCommandEnabled() +bool RicNewDefaultSummaryPlotFeature::isCommandEnabled() const { RimSummaryMultiPlot* multiPlot = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( multiPlot ) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.h index 5dba90a717..5d5ab59b01 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDefaultSummaryPlotFeature.h @@ -36,7 +36,7 @@ public: static RimSummaryPlot* createFromSummaryCases( const std::vector& summaryCases ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp index 520551e3c9..7e445d2e66 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.cpp @@ -60,7 +60,7 @@ bool RicNewDerivedEnsembleFeature::showWarningDialogWithQuestion() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewDerivedEnsembleFeature::isCommandEnabled() +bool RicNewDerivedEnsembleFeature::isCommandEnabled() const { std::vector mainColls = caf::selectedObjectsByTypeStrict(); std::vector ensembles = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.h index b56f98c1ef..bb67669b21 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedEnsembleFeature.h @@ -32,7 +32,7 @@ public: static bool showWarningDialogWithQuestion(); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.cpp index 29d86ea74b..0354f0bb12 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicNewDerivedSummaryFeature, "RicNewDerivedSummaryFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewDerivedSummaryFeature::isCommandEnabled() +bool RicNewDerivedSummaryFeature::isCommandEnabled() const { return mainCollection() != nullptr; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.h index 8c6269de77..ede6fab4c9 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewDerivedSummaryFeature.h @@ -31,7 +31,7 @@ class RicNewDerivedSummaryFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp index 8013c5798b..b70e8c06d7 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.cpp @@ -31,14 +31,6 @@ CAF_CMD_SOURCE_INIT( RicNewEnsembleCurveFilterFeature, "RicNewEnsembleCurveFilterFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewEnsembleCurveFilterFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.h index 438d9d8858..fc73441198 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewEnsembleCurveFilterFeature.h @@ -28,7 +28,6 @@ class RicNewEnsembleCurveFilterFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp index 26d266d71e..4cc30de94c 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.cpp @@ -211,7 +211,7 @@ QString RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewGridTimeHistoryCurveFeature::isCommandEnabled() +bool RicNewGridTimeHistoryCurveFeature::isCommandEnabled() const { if ( RicWellLogTools::isWellPathOrSimWellSelectedInView() ) return false; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h index 86c776ec10..f674f1d153 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewGridTimeHistoryCurveFeature.h @@ -31,7 +31,7 @@ class RicNewGridTimeHistoryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.cpp index 767f23d227..1e00a9f2b2 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicNewPlotAxisPropertiesFeature, "RicNewPlotAxisPropertiesF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPlotAxisPropertiesFeature::isCommandEnabled() +bool RicNewPlotAxisPropertiesFeature::isCommandEnabled() const { auto* summaryPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( summaryPlot != nullptr ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.h index 96044452ff..c7441d61b0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewPlotAxisPropertiesFeature.h @@ -29,7 +29,7 @@ class RicNewPlotAxisPropertiesFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp index 2b014adcb1..4f27eee0c3 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryCrossPlotCurveFeature, "RicNewSummaryCrossPlot //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryCrossPlotCurveFeature::isCommandEnabled() +bool RicNewSummaryCrossPlotCurveFeature::isCommandEnabled() const { return ( selectedCrossPlot() ); } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.h index cf3337e55c..c789c6286b 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotCurveFeature.h @@ -32,7 +32,7 @@ class RicNewSummaryCrossPlotCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.cpp index 51e34b25fc..8c6f44aa7e 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.cpp @@ -43,7 +43,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryCrossPlotFeature, "RicNewSummaryCrossPlotFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryCrossPlotFeature::isCommandEnabled() +bool RicNewSummaryCrossPlotFeature::isCommandEnabled() const { RimSummaryCrossPlotCollection* sumPlotColl = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.h index e8b71e86eb..82c61d4d52 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCrossPlotFeature.h @@ -32,7 +32,7 @@ class RicNewSummaryCrossPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp index 564bc3f299..8735093130 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.cpp @@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryCurveFeature, "RicNewSummaryCurveFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryCurveFeature::isCommandEnabled() +bool RicNewSummaryCurveFeature::isCommandEnabled() const { return ( selectedSummaryPlot() ); } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.h index 12c401b901..85d4f37c75 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryCurveFeature.h @@ -33,7 +33,7 @@ class RicNewSummaryCurveFeature : public caf::CmdFeature public: protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp index b89ab98050..0b066840fe 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.cpp @@ -139,7 +139,7 @@ RimSummaryPlot* RicNewSummaryEnsembleCurveSetFeature::createPlotForCurveSetsAndU //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryEnsembleCurveSetFeature::isCommandEnabled() +bool RicNewSummaryEnsembleCurveSetFeature::isCommandEnabled() const { bool summaryPlotSelected = selectedSummaryPlot(); if ( summaryPlotSelected ) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h index 60ab06d846..e2a15100f3 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryEnsembleCurveSetFeature.h @@ -38,7 +38,7 @@ public: static std::vector addDefaultCurveSets( RimSummaryPlot* plot, RimSummaryCaseCollection* ensemble ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.cpp index f11b71dd49..cb2921b18e 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicNewSummaryTableFeature, "RicNewSummaryTableFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewSummaryTableFeature::isCommandEnabled() +bool RicNewSummaryTableFeature::isCommandEnabled() const { RimSummaryTableCollection* tableColl = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.h index 30990d6dd0..61652bddd6 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicNewSummaryTableFeature.h @@ -32,7 +32,7 @@ class RicNewSummaryTableFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.cpp index b3b895a687..0bb271cae0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.cpp @@ -51,7 +51,7 @@ CAF_CMD_SOURCE_INIT( RicOpenSummaryPlotEditorFeature, "RicOpenSummaryPlotEditorF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicOpenSummaryPlotEditorFeature::isCommandEnabled() +bool RicOpenSummaryPlotEditorFeature::isCommandEnabled() const { RimSummaryMultiPlot* multiPlot = nullptr; RimCustomObjectiveFunctionCollection* customObjFuncCollection = nullptr; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.h index c36c873c34..3207cf28e7 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFeature.h @@ -30,7 +30,7 @@ class RicOpenSummaryPlotEditorFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp index efdac87a1e..7a6161b699 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.cpp @@ -23,7 +23,7 @@ CAF_CMD_SOURCE_INIT( RicOpenSummaryPlotEditorFromMdiAreaFeature, "RicOpenSummary //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicOpenSummaryPlotEditorFromMdiAreaFeature::isCommandEnabled() +bool RicOpenSummaryPlotEditorFromMdiAreaFeature::isCommandEnabled() const { return true; } diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h index 659d33e849..f0df447383 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicOpenSummaryPlotEditorFromMdiAreaFeature.h @@ -28,5 +28,5 @@ class RicOpenSummaryPlotEditorFromMdiAreaFeature : public RicOpenSummaryPlotEdit CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.cpp index 437e248b24..baad7acce8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicPasteAsciiDataCurveFeature, "RicPasteAsciiDataCurveFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteAsciiDataCurveFeature::isCommandEnabled() +bool RicPasteAsciiDataCurveFeature::isCommandEnabled() const { auto summaryPlot = caf::firstAncestorOfTypeFromSelectedObject(); if ( !summaryPlot ) diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.h index 11b6575d10..5974c6a378 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataCurveFeature.h @@ -33,7 +33,7 @@ class RicPasteAsciiDataCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp index 718b8028ca..c1bf23758a 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.cpp @@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT( RicPasteAsciiDataToSummaryPlotFeature, "RicPasteAsciiDataTo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteAsciiDataToSummaryPlotFeature::isCommandEnabled() +bool RicPasteAsciiDataToSummaryPlotFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.h index caadfe6094..715b8213bf 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteAsciiDataToSummaryPlotFeature.h @@ -45,7 +45,7 @@ public: }; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.cpp index 546d186653..f3b7efd1b4 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.cpp @@ -63,7 +63,7 @@ RimEnsembleCurveSet* RicPasteEnsembleCurveSetFeature::copyCurveSetAndAddToCollec //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteEnsembleCurveSetFeature::isCommandEnabled() +bool RicPasteEnsembleCurveSetFeature::isCommandEnabled() const { caf::PdmObject* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( !destinationObject ) return false; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.h index 9186455237..ebbefda0fc 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteEnsembleCurveSetFeature.h @@ -34,7 +34,7 @@ class RicPasteEnsembleCurveSetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.cpp index c71e4a159f..3b263fe329 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicPasteSummaryCaseFeature, "RicPasteSummaryCaseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryCaseFeature::isCommandEnabled() +bool RicPasteSummaryCaseFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( !destinationObject ) return false; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.h index b7e93dfb8c..fe145b92c8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCaseFeature.h @@ -33,7 +33,7 @@ class RicPasteSummaryCaseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* action ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.cpp index 32fa4a2f42..255df615e0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicPasteSummaryCrossPlotCurveFeature, "RicPasteSummaryCross //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryCrossPlotCurveFeature::isCommandEnabled() +bool RicPasteSummaryCrossPlotCurveFeature::isCommandEnabled() const { caf::PdmObject* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.h index 0c11bbb65a..09c43b9ad2 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotCurveFeature.h @@ -36,7 +36,7 @@ class RicPasteSummaryCrossPlotCurveFeature : public RicPasteSummaryCurveFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; // virtual void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.cpp index d52c63c182..09b0b74198 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.cpp @@ -65,7 +65,7 @@ void RicPasteSummaryCrossPlotFeature::copyPlotAndAddToCollection( RimSummaryCros //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryCrossPlotFeature::isCommandEnabled() +bool RicPasteSummaryCrossPlotFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( !destinationObject ) return false; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.h index 6022c6a3c8..52b7284268 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCrossPlotFeature.h @@ -36,7 +36,7 @@ public: static void copyPlotAndAddToCollection( RimSummaryCrossPlot* sourcePlot ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.cpp index cbcc905f7d..12d6306cd7 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.cpp @@ -82,7 +82,7 @@ RimSummaryCurve* RicPasteSummaryCurveFeature::copyCurveAndAddToPlot( RimSummaryC //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryCurveFeature::isCommandEnabled() +bool RicPasteSummaryCurveFeature::isCommandEnabled() const { caf::PdmObject* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( !destinationObject ) return false; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.h index 07da1abe2c..2cbf66cb80 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryCurveFeature.h @@ -37,7 +37,7 @@ public: static RimSummaryCurve* copyCurveAndAddToPlot( RimSummaryCurve* sourceCurve ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp index 0a899a86c5..fd6512cce0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicPasteSummaryMultiPlotFeature, "RicPasteSummaryMultiPlotF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryMultiPlotFeature::isCommandEnabled() +bool RicPasteSummaryMultiPlotFeature::isCommandEnabled() const { auto multiPlots = caf::selectedObjectsByTypeStrict(); return !multiPlots.empty(); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.h index 092d8046c1..5b8b979634 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryMultiPlotFeature.h @@ -33,7 +33,7 @@ class RicPasteSummaryMultiPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp index d89985f3dc..6884840430 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.cpp @@ -60,7 +60,7 @@ void RicPasteSummaryPlotFeature::copyPlotAndAddToCollection( RimSummaryPlot* sou //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteSummaryPlotFeature::isCommandEnabled() +bool RicPasteSummaryPlotFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.h index 940f97131e..dc98882ec8 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteSummaryPlotFeature.h @@ -36,7 +36,7 @@ public: static void copyPlotAndAddToCollection( RimSummaryPlot* sourcePlot ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp index 9d3f5fa541..41efe099cb 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicPasteTimeHistoryCurveFeature, "RicPasteTimeHistoryCurveF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteTimeHistoryCurveFeature::isCommandEnabled() +bool RicPasteTimeHistoryCurveFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h index 29e4a9428f..ebdc62837c 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicPasteTimeHistoryCurveFeature.h @@ -33,7 +33,7 @@ class RicPasteTimeHistoryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.cpp index 3bb6094048..9523929aa3 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicSetSourceSteppingEnsembleCurveSetFeature, "RicSetSourceS //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSetSourceSteppingEnsembleCurveSetFeature::isCommandEnabled() +bool RicSetSourceSteppingEnsembleCurveSetFeature::isCommandEnabled() const { std::vector ensembleCurveSets; caf::SelectionManager::instance()->objectsByType( &ensembleCurveSets ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.h index 4880e292fa..e16140076d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingEnsembleCurveSetFeature.h @@ -28,7 +28,7 @@ class RicSetSourceSteppingEnsembleCurveSetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.cpp index 4420094886..6c6c331a8e 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicSetSourceSteppingSummaryCurveFeature, "RicSetSourceStepp //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSetSourceSteppingSummaryCurveFeature::isCommandEnabled() +bool RicSetSourceSteppingSummaryCurveFeature::isCommandEnabled() const { std::vector summaryCurves; caf::SelectionManager::instance()->objectsByType( &summaryCurves ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.h index c259dab09c..d9bf6052b1 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSetSourceSteppingSummaryCurveFeature.h @@ -28,7 +28,7 @@ class RicSetSourceSteppingSummaryCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.cpp index 375c222b73..478cfb2bda 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.cpp @@ -55,14 +55,6 @@ void RicShowSummaryCurveCalculatorFeature::hideCurveCalculatorDialog() if ( dialog ) dialog->hide(); } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowSummaryCurveCalculatorFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.h index 9d9d30e4a4..f3ae2122cd 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryCurveCalculatorFeature.h @@ -34,7 +34,6 @@ public: static void hideCurveCalculatorDialog(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.cpp index 5a85dc6da4..b290f8ccdc 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.cpp @@ -25,14 +25,6 @@ CAF_CMD_SOURCE_INIT( RicShowSummaryPlotManagerFeature, "RicShowSummaryPlotManagerFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicShowSummaryPlotManagerFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.h index 20c91489da..dcb8f85153 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicShowSummaryPlotManagerFeature.h @@ -28,7 +28,6 @@ class RicShowSummaryPlotManagerFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp index ed4b4d506c..ebbf1018d1 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicSummaryCurveSwitchAxisFeature, "RicSummaryCurveSwitchAxi //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSummaryCurveSwitchAxisFeature::isCommandEnabled() +bool RicSummaryCurveSwitchAxisFeature::isCommandEnabled() const { std::vector summaryCurves; std::vector asciiDataCurves; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h index 1fd902964f..b800edf42d 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicSummaryCurveSwitchAxisFeature.h @@ -35,7 +35,7 @@ class RicSummaryCurveSwitchAxisFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.cpp index 6879942250..53386e7f19 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.cpp @@ -29,7 +29,7 @@ CAF_CMD_SOURCE_INIT( RicToggleXAxisLinkingFeature, "RicToggleXAxisLinkingFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleXAxisLinkingFeature::isCommandEnabled() +bool RicToggleXAxisLinkingFeature::isCommandEnabled() const { auto* summaryMultiPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( summaryMultiPlot != nullptr ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.h index 816d375740..d477fcfc96 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleXAxisLinkingFeature.h @@ -28,7 +28,7 @@ class RicToggleXAxisLinkingFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.cpp index 33b56fb467..aefbbabba6 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicToggleYAxisLinkingFeature, "RicToggleYAxisLinkingFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleYAxisLinkingFeature::isCommandEnabled() +bool RicToggleYAxisLinkingFeature::isCommandEnabled() const { auto* summaryMultiPlot = caf::firstAncestorOfTypeFromSelectedObject(); return ( summaryMultiPlot != nullptr ); diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.h index 7f61cb6d7c..2d90973dd0 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicToggleYAxisLinkingFeature.h @@ -28,7 +28,7 @@ class RicToggleYAxisLinkingFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp index db8fe67ea2..d08cfbbad9 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicViewZoomAllFeature, "RicViewZoomAllFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicViewZoomAllFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.h b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.h index 5807b55efd..0d3b2b96b7 100644 --- a/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.h +++ b/ApplicationLibCode/Commands/SummaryPlotCommands/RicViewZoomAllFeature.h @@ -28,7 +28,6 @@ class RicViewZoomAllFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.cpp index 0eb444860d..c39f5a6326 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicCopySurfaceFeature, "RicCopySurfaceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCopySurfaceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.h index 9a5be040c2..6d1a280ef8 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicCopySurfaceFeature.h @@ -28,7 +28,6 @@ class RicCopySurfaceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.cpp index 88b79d99d4..b3b18b7ded 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.cpp @@ -38,9 +38,8 @@ CAF_CMD_SOURCE_INIT( RicExportKLayerToPtlFeature, "RicExportKLayerToPtlFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportKLayerToPtlFeature::isCommandEnabled() -{ - // std::vector surfaces = caf::selectedObjectsByTypeStrict(); +bool RicExportKLayerToPtlFeature::isCommandEnabled() const +{ // std::vector surfaces = caf::selectedObjectsByTypeStrict(); std::vector surfaces = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.h index 6d75cec07a..f81ed4f80b 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicExportKLayerToPtlFeature.h @@ -32,7 +32,7 @@ class RicExportKLayerToPtlFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.cpp index c907c4251b..20c011c4c2 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicExportSurfaceToTsurfFeature, "RicExportSurfaceToTsurfFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicExportSurfaceToTsurfFeature::isCommandEnabled() +bool RicExportSurfaceToTsurfFeature::isCommandEnabled() const { std::vector surfaces = caf::selectedObjectsByTypeStrict(); diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.h index 9bf4a17fd7..d49c2d742d 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicExportSurfaceToTsurfFeature.h @@ -32,7 +32,7 @@ class RicExportSurfaceToTsurfFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp index 9216528b6d..e937cb00ac 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.cpp @@ -36,14 +36,6 @@ CAF_CMD_SOURCE_INIT( RicImportSurfacesFeature, "RicImportSurfacesFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportSurfacesFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.h index b6bb33dd8b..f24d2d0155 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicImportSurfacesFeature.h @@ -28,7 +28,6 @@ class RicImportSurfacesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.cpp index 218460a5ba..4a354d02c3 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicNewGridSurfaceFeature, "RicNewGridSurfaceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewGridSurfaceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.h index e5435fa1cd..574f989f2c 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicNewGridCaseSurfaceFeature.h @@ -28,7 +28,6 @@ class RicNewGridSurfaceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.cpp index fad9bd0dd9..1a71a47d40 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicNewSurfaceCollectionFeature, "RicNewSurfaceCollectionFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewSurfaceCollectionFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.h index dc5c031481..4e7073e8c6 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicNewSurfaceCollectionFeature.h @@ -28,7 +28,6 @@ class RicNewSurfaceCollectionFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.cpp b/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.cpp index 3055b9ead4..c471773048 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.cpp +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.cpp @@ -32,14 +32,6 @@ CAF_CMD_SOURCE_INIT( RicReloadSurfaceFeature, "RicReloadSurfaceFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicReloadSurfaceFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.h b/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.h index 5f83d2725b..180b5e44fd 100644 --- a/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.h +++ b/ApplicationLibCode/Commands/SurfaceCommands/RicReloadSurfaceFeature.h @@ -28,7 +28,6 @@ class RicReloadSurfaceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.cpp index 257141949e..df4394e267 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicCollapseSiblingsFeature, "RicCollapseSiblingsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicCollapseSiblingsFeature::isCommandEnabled() +bool RicCollapseSiblingsFeature::isCommandEnabled() const { { auto selectedItem = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.h index b4f6765abf..1845a73901 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicCollapseSiblingsFeature.h @@ -28,7 +28,7 @@ class RicCollapseSiblingsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.cpp index e3a39ccd32..1efa1f2279 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicMoveItemsToTopFeature, "RicMoveItemsToTopFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicMoveItemsToTopFeature::isCommandEnabled() +bool RicMoveItemsToTopFeature::isCommandEnabled() const { using namespace caf; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.h index 4d3ad33e95..d5e05db3f6 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicMoveItemsToTopFeature.h @@ -34,7 +34,7 @@ class RicMoveItemsToTopFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp index d612f8146e..50efa62e1f 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicToggleItemsFeature, "RicToggleItemsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleItemsFeature::isCommandEnabled() +bool RicToggleItemsFeature::isCommandEnabled() const { return RicToggleItemsFeatureImpl::isToggleCommandsAvailable(); } diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.h index b7afecd793..9206211e1a 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsFeature.h @@ -29,7 +29,7 @@ class RicToggleItemsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp index fe1dc22331..8429f397d5 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicToggleItemsOffFeature, "RicToggleItemsOffFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleItemsOffFeature::isCommandEnabled() +bool RicToggleItemsOffFeature::isCommandEnabled() const { return RicToggleItemsFeatureImpl::isToggleCommandsAvailable(); } diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h index 2e8ae44f76..ee4f6c95ac 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOffFeature.h @@ -29,7 +29,7 @@ class RicToggleItemsOffFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp index c8d6825238..9ac0f28cea 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicToggleItemsOnFeature, "RicToggleItemsOnFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleItemsOnFeature::isCommandEnabled() +bool RicToggleItemsOnFeature::isCommandEnabled() const { return RicToggleItemsFeatureImpl::isToggleCommandsAvailable(); } diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h index db0e670343..7f6466db59 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnFeature.h @@ -29,7 +29,7 @@ class RicToggleItemsOnFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.cpp b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.cpp index 34e3dc1218..582b24e35f 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.cpp +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicToggleItemsOnOthersOffFeature, "RicToggleItemsOnOthersOf //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicToggleItemsOnOthersOffFeature::isCommandEnabled() +bool RicToggleItemsOnOthersOffFeature::isCommandEnabled() const { std::vector selectedObjects; caf::SelectionManager::instance()->objectsByType( &selectedObjects ); diff --git a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.h b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.h index b764f8b04c..8fa7f5c113 100644 --- a/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.h +++ b/ApplicationLibCode/Commands/ToggleCommands/RicToggleItemsOnOthersOffFeature.h @@ -37,12 +37,12 @@ class RicToggleItemsOnOthersOffFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - caf::PdmFieldHandle* commonParentForAllSelections( const std::vector& selectedObjects ); - std::vector childObjects( caf::PdmFieldHandle* parent ); - caf::PdmField* objectToggleField( caf::PdmObjectHandle* objectHandle ); + static caf::PdmFieldHandle* commonParentForAllSelections( const std::vector& selectedObjects ); + static std::vector childObjects( caf::PdmFieldHandle* parent ); + static caf::PdmField* objectToggleField( caf::PdmObjectHandle* objectHandle ); }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.cpp index d44671a665..0afa0d4acd 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.cpp @@ -29,14 +29,6 @@ CAF_CMD_SOURCE_INIT( RicCompareTo3dViewFeature, "RicCompareTo3dViewFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCompareTo3dViewFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.h b/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.h index 359a07e4d7..c855c073e0 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicCompareTo3dViewFeature.h @@ -28,7 +28,6 @@ class RicCompareTo3dViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp index 0047fb35c9..f2a4227561 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.cpp @@ -57,7 +57,7 @@ public: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteAllLinkedViewsFeature::isCommandEnabled() +bool RicDeleteAllLinkedViewsFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.h b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.h index 214a1b46ab..9179963254 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicDeleteAllLinkedViewsFeature.h @@ -31,7 +31,7 @@ class RicDeleteAllLinkedViewsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.cpp index 5a2a002aba..5fdc7f3234 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.cpp @@ -88,7 +88,7 @@ private: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicLinkViewFeature::isCommandEnabled() +bool RicLinkViewFeature::isCommandEnabled() const { RicLinkViewFeatureImpl cmdImpl; return cmdImpl.prepareToExecute(); diff --git a/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.h b/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.h index a9314815a2..fd5c16d893 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicLinkViewFeature.h @@ -31,7 +31,7 @@ class RicLinkViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.cpp index 71c591f3ff..a1b68fb873 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicLinkVisibleViewsFeature, "RicLinkVisibleViewsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicLinkVisibleViewsFeature::isCommandEnabled() +bool RicLinkVisibleViewsFeature::isCommandEnabled() const { RimProject* proj = RimProject::current(); if ( !proj ) return false; diff --git a/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.h b/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.h index 4f3d4ad0f7..539b0a7bdd 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicLinkVisibleViewsFeature.h @@ -38,7 +38,7 @@ public: static std::vector matchingViews( Rim3dView* primaryView, std::vector& candidates ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.cpp index b90b44f0d2..272db94954 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.cpp @@ -56,7 +56,7 @@ private: //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicRemoveComparison3dViewFeature::isCommandEnabled() +bool RicRemoveComparison3dViewFeature::isCommandEnabled() const { RemoveComparison3dViewImpl cmdImpl; diff --git a/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.h b/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.h index a7949503cb..496cd22a3d 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicRemoveComparison3dViewFeature.h @@ -28,7 +28,7 @@ class RicRemoveComparison3dViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp index e521990720..9031b1fe3e 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicSetMasterViewFeature, "RicSetMasterViewFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicSetMasterViewFeature::isCommandEnabled() +bool RicSetMasterViewFeature::isCommandEnabled() const { RimGridView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !activeView ) return false; diff --git a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.h b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.h index ad76867de2..33ab2e46ce 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicSetMasterViewFeature.h @@ -31,7 +31,7 @@ class RicSetMasterViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp index 42e00ef32d..87c4446d96 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicShowAllLinkedViewsFeature, "RicShowAllLinkedViewsFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowAllLinkedViewsFeature::isCommandEnabled() +bool RicShowAllLinkedViewsFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemAncestorOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.h b/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.h index f8bacae4f3..dd4ccf21be 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicShowAllLinkedViewsFeature.h @@ -31,7 +31,7 @@ class RicShowAllLinkedViewsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.cpp index c982258ada..1ce0ae415d 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicShowLinkOptionsFeature, "RicShowLinkOptionsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowLinkOptionsFeature::isCommandEnabled() +bool RicShowLinkOptionsFeature::isCommandEnabled() const { Rim3dView* activeView = RiaApplication::instance()->activeMainOrComparisonGridView(); if ( !activeView ) return false; diff --git a/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.h b/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.h index 5cc341827c..bc2f4ce973 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicShowLinkOptionsFeature.h @@ -31,7 +31,7 @@ class RicShowLinkOptionsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp index df3629bad8..d7b4806aba 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp +++ b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicUnLinkViewFeature, "RicUnLinkViewFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicUnLinkViewFeature::isCommandEnabled() +bool RicUnLinkViewFeature::isCommandEnabled() const { Rim3dView* activeView = RiaApplication::instance()->activeReservoirView(); if ( !activeView ) return false; diff --git a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.h b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.h index 7fdaab7a50..d597e17556 100644 --- a/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.h +++ b/ApplicationLibCode/Commands/ViewLink/RicUnLinkViewFeature.h @@ -31,7 +31,7 @@ class RicUnLinkViewFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.cpp index ddef4d57c4..ed61f623c2 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( Ric3dWellLogCurveDeleteFeature, "Ric3dWellLogCurveDeleteFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool Ric3dWellLogCurveDeleteFeature::isCommandEnabled() +bool Ric3dWellLogCurveDeleteFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.h b/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.h index c9b4f19c15..d7690fee49 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/Ric3dWellLogCurveDeleteFeature.h @@ -29,7 +29,7 @@ class Ric3dWellLogCurveDeleteFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.cpp index 3cbd78644c..7f0d11246a 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogCurveFeature, "RicAdd3dWellLogCurveFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAdd3dWellLogCurveFeature::isCommandEnabled() +bool RicAdd3dWellLogCurveFeature::isCommandEnabled() const { std::vector cases; RimProject::current()->allCases( cases ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.h index ea90bbf90d..f84a9b7e81 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogCurveFeature.h @@ -28,7 +28,7 @@ class RicAdd3dWellLogCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.cpp index 534a474039..9b8983c68e 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogFileCurveFeature, "RicAdd3dWellLogFileCurveF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAdd3dWellLogFileCurveFeature::isCommandEnabled() +bool RicAdd3dWellLogFileCurveFeature::isCommandEnabled() const { std::vector cases; RimProject::current()->allCases( cases ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.h index 4749016625..45103a3a70 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogFileCurveFeature.h @@ -28,7 +28,7 @@ class RicAdd3dWellLogFileCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.cpp index 8ccabcd309..ee66003613 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.cpp @@ -35,7 +35,7 @@ CAF_CMD_SOURCE_INIT( RicAdd3dWellLogRftCurveFeature, "RicAdd3dWellLogRftCurveFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAdd3dWellLogRftCurveFeature::isCommandEnabled() +bool RicAdd3dWellLogRftCurveFeature::isCommandEnabled() const { std::vector cases; RimProject::current()->allCases( cases ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.h index a874199429..8257c92e8d 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAdd3dWellLogRftCurveFeature.h @@ -28,7 +28,7 @@ class RicAdd3dWellLogRftCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp index 880e3e6838..7525f74df1 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.cpp @@ -47,7 +47,7 @@ CAF_CMD_SOURCE_INIT( RicAddWellLogToPlotFeature, "RicAddWellLogToPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAddWellLogToPlotFeature::isCommandEnabled() +bool RicAddWellLogToPlotFeature::isCommandEnabled() const { std::vector selection = selectedWellLogs(); return selection.size() > 0; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h index 388272cdc4..9ae431c45f 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAddWellLogToPlotFeature.h @@ -36,10 +36,10 @@ class RicAddWellLogToPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - std::vector selectedWellLogs(); + static std::vector selectedWellLogs(); }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp index a6531beff1..0c75e05106 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.cpp @@ -39,14 +39,6 @@ CAF_CMD_SOURCE_INIT( RicAsciiExportWellLogPlotFeature, "RicAsciiExportWellLogPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicAsciiExportWellLogPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h index 49117f7dbb..20298cf178 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicAsciiExportWellLogPlotFeature.h @@ -37,7 +37,6 @@ public: static bool exportAsciiForWellLogPlot( const QString& fileName, const RimWellLogPlot* wellLogPlot ); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp index 259d86c27f..d02747e108 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicChangeDataSourceFeature, "RicChangeDataSourceFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicChangeDataSourceFeature::isCommandEnabled() +bool RicChangeDataSourceFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h index 26f74888cc..c21cbd629e 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicChangeDataSourceFeature.h @@ -32,7 +32,7 @@ class RicChangeDataSourceFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.cpp index 4464f2e376..70cdddaa8e 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.cpp @@ -40,7 +40,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteSubPlotFeature, "RicDeleteSubPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteSubPlotFeature::isCommandEnabled() +bool RicDeleteSubPlotFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; @@ -133,7 +133,7 @@ void RicDeleteSubPlotFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -void RicDeleteSubPlotFeature::getSelection( std::vector& selection ) +void RicDeleteSubPlotFeature::getSelection( std::vector& selection ) const { if ( sender() ) { diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.h index 67f050d60d..1a9ce940cb 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicDeleteSubPlotFeature.h @@ -33,10 +33,10 @@ class RicDeleteSubPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - void getSelection( std::vector& selection ); + void getSelection( std::vector& selection ) const; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.cpp index e7313e9b9b..b98e8ed166 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.cpp @@ -34,7 +34,7 @@ CAF_CMD_SOURCE_INIT( RicMoveWellLogFilesFeature, "RicMoveWellLogFilesFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicMoveWellLogFilesFeature::isCommandEnabled() +bool RicMoveWellLogFilesFeature::isCommandEnabled() const { RimWellLogFile* selectedWellLogFile = caf::firstAncestorOfTypeFromSelectedObject(); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.h index af741473e5..4d8cd37fe4 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicMoveWellLogFilesFeature.h @@ -29,7 +29,7 @@ class RicMoveWellLogFilesFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.cpp index 3368af313b..44acddf506 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicNewEnsembleWellLogCurveSetFeature, "RicNewEnsembleWellLo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewEnsembleWellLogCurveSetFeature::isCommandEnabled() +bool RicNewEnsembleWellLogCurveSetFeature::isCommandEnabled() const { return caf::SelectionManager::instance()->selectedItemOfType() != nullptr; } diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.h index c4b8148378..6e4cae56c5 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewEnsembleWellLogCurveSetFeature.h @@ -28,7 +28,7 @@ class RicNewEnsembleWellLogCurveSetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.cpp index b0fa4c2d7e..1f99b938e3 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.cpp @@ -46,14 +46,6 @@ CAF_CMD_SOURCE_INIT( RicNewMultiPhaseRftSegmentPlotFeature, "RicNewMultiPhaseRftSegmentPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewMultiPhaseRftSegmentPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.h index 4ddd255a75..ad96cdd14a 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewMultiPhaseRftSegmentPlotFeature.h @@ -33,7 +33,6 @@ class RicNewMultiPhaseRftSegmentPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.cpp index 0d378dea50..f0d04b36f6 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.cpp @@ -51,7 +51,7 @@ CAF_CMD_SOURCE_INIT( RicNewPltPlotFeature, "RicNewPltPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPltPlotFeature::isCommandEnabled() +bool RicNewPltPlotFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.h index 9220b09d76..13f1c920f5 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewPltPlotFeature.h @@ -37,7 +37,7 @@ class RicNewPltPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.cpp index 42b9a443e8..7831ebae6b 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.cpp @@ -40,7 +40,7 @@ CAF_CMD_SOURCE_INIT( RicNewRftPlotFeature, "RicNewRftPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewRftPlotFeature::isCommandEnabled() +bool RicNewRftPlotFeature::isCommandEnabled() const { RimRftPlotCollection* simWell = caf::firstAncestorOfTypeFromSelectedObject(); if ( simWell ) return true; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.h index cc95cf9770..2e8a16da94 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftPlotFeature.h @@ -28,7 +28,7 @@ class RicNewRftPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.cpp index ec8882748c..a63a82e1ce 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.cpp @@ -47,14 +47,6 @@ CAF_CMD_SOURCE_INIT( RicNewRftSegmentWellLogPlotFeature, "RicNewRftSegmentWellLogPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewRftSegmentWellLogPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.h index 2d4e3aefc3..762adf7d83 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftSegmentWellLogPlotFeature.h @@ -43,7 +43,6 @@ public: static RimSummaryCase* getSelectedOrFirstRftCase(); private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.cpp index 7629b1627f..dc48f5ce2b 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.cpp @@ -44,14 +44,6 @@ CAF_CMD_SOURCE_INIT( RicNewRftWellLogPlotFeature, "RicNewRftWellLogPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewRftWellLogPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.h index 83d9c617c0..dd361abdfe 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewRftWellLogPlotFeature.h @@ -28,7 +28,6 @@ class RicNewRftWellLogPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp index f54dd005bc..3ac32d03fb 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.cpp @@ -134,7 +134,7 @@ RimWellBoreStabilityPlot* RicNewWellBoreStabilityPlotFeature::createPlot( RimGeo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellBoreStabilityPlotFeature::isCommandEnabled() +bool RicNewWellBoreStabilityPlotFeature::isCommandEnabled() const { Rim3dView* view = RiaApplication::instance()->activeReservoirView(); if ( !view ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.h index f2a02df1fe..e9fd749ae0 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellBoreStabilityPlotFeature.h @@ -38,7 +38,7 @@ public: createPlot( RimGeoMechCase* geoMechCase, RimWellPath* wellPath, int timeStep, const RimWbsParameters* parameters = nullptr ); protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.cpp index 50cde17f75..0bdceba08a 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogCalculatedCurveFeature, "RicNewWellLogCalculat //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellLogCalculatedCurveFeature::isCommandEnabled() +bool RicNewWellLogCalculatedCurveFeature::isCommandEnabled() const { std::vector wellLogCurves; caf::SelectionManager::instance()->objectsByType( &wellLogCurves ); diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.h index c36a149afd..4f8299504f 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogCalculatedCurveFeature.h @@ -28,7 +28,7 @@ class RicNewWellLogCalculatedCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.cpp index d7990adb79..a7f4fb3f60 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.cpp @@ -53,7 +53,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogExtractionCurveFeature, "RicNewWellLogExtracti //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellLogExtractionCurveFeature::isCommandEnabled() +bool RicNewWellLogExtractionCurveFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.h index a4df8ff80c..ffcb09fe0f 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogExtractionCurveFeature.h @@ -29,7 +29,7 @@ class RicNewWellLogExtractionCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp index 637e6e04d0..101f26acdc 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.cpp @@ -44,7 +44,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogFileCurveFeature, "RicNewWellLogFileCurveFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellLogFileCurveFeature::isCommandEnabled() +bool RicNewWellLogFileCurveFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; return ( caf::SelectionManager::instance()->selectedItemAncestorOfType() != nullptr && wellLogFilesAvailable() ) || diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.h index a57432cde6..6f777ac723 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogFileCurveFeature.h @@ -31,7 +31,7 @@ class RicNewWellLogFileCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp index dd9a97a853..a74b614cb3 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.cpp @@ -37,14 +37,6 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogPlotFeature, "RicNewWellLogPlotFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicNewWellLogPlotFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.h index ae20b68218..9b9e534369 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotFeature.h @@ -29,7 +29,6 @@ class RicNewWellLogPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp index 00b6baa3f1..aa32d93bee 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogPlotTrackFeature, "RicNewWellLogPlotTrackFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellLogPlotTrackFeature::isCommandEnabled() +bool RicNewWellLogPlotTrackFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() || RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) { diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.h index 8ae342e129..2389dd0fc7 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogPlotTrackFeature.h @@ -31,10 +31,10 @@ class RicNewWellLogPlotTrackFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - RimWellLogPlot* selectedWellLogPlot(); + static RimWellLogPlot* selectedWellLogPlot(); }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.cpp index 00ef953d5e..1188f1064e 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.cpp @@ -46,7 +46,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellLogRftCurveFeature, "RicNewWellLogRftCurveFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellLogRftCurveFeature::isCommandEnabled() +bool RicNewWellLogRftCurveFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; if ( caf::SelectionManager::instance()->selectedItemOfType() != nullptr ) diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.h index 307466d583..57bbe26cb0 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellLogRftCurveFeature.h @@ -28,7 +28,7 @@ class RicNewWellLogRftCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; private: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.cpp index 68589decbe..18e0c5b9b3 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellMeasurementCurveFeature, "RicNewWellMeasurementCu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellMeasurementCurveFeature::isCommandEnabled() +bool RicNewWellMeasurementCurveFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.h index 9266742d1d..0235ad1f1e 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicNewWellMeasurementCurveFeature.h @@ -30,7 +30,7 @@ class RicNewWellMeasurementCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp index 7afbc22112..79816015d0 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.cpp @@ -42,7 +42,7 @@ CAF_CMD_SOURCE_INIT( RicPasteWellLogCurveFeature, "RicPasteWellLogCurveFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteWellLogCurveFeature::isCommandEnabled() +bool RicPasteWellLogCurveFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; if ( RicWellLogPlotCurveFeatureImpl::parentWellRftPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.h index 464d0a4589..5f0e7c7fa1 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogCurveFeature.h @@ -33,7 +33,7 @@ class RicPasteWellLogCurveFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp index f8b710d541..9e06e9cf43 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicPasteWellLogPlotFeature, "RicPasteWellLogPlotFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteWellLogPlotFeature::isCommandEnabled() +bool RicPasteWellLogPlotFeature::isCommandEnabled() const { caf::PdmObjectHandle* destinationObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem() ); if ( !destinationObject ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.h index 3e486c56d5..3a0dd24e85 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogPlotFeature.h @@ -33,7 +33,7 @@ class RicPasteWellLogPlotFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp index f9d7d546c3..811e2b99d5 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.cpp @@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT( RicPasteWellLogTrackFeature, "RicPasteWellLogTrackFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteWellLogTrackFeature::isCommandEnabled() +bool RicPasteWellLogTrackFeature::isCommandEnabled() const { if ( RicWellLogPlotCurveFeatureImpl::parentWellAllocationPlot() ) return false; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.h index 893215c540..0014acdbc5 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicPasteWellLogTrackFeature.h @@ -33,7 +33,7 @@ class RicPasteWellLogTrackFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.cpp index 45761fd9ad..68ff9c6075 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.cpp @@ -38,7 +38,7 @@ CAF_CMD_SOURCE_INIT( RicWellLogFileCloseFeature, "RicWellLogFileCloseFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicWellLogFileCloseFeature::isCommandEnabled() +bool RicWellLogFileCloseFeature::isCommandEnabled() const { std::vector objects = caf::selectedObjectsByType(); return objects.size() > 0; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.h index eea2effd59..aba98962f1 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogFileCloseFeature.h @@ -33,7 +33,7 @@ class RicWellLogFileCloseFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp index 5c0430d180..914f0e2b2f 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp +++ b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.cpp @@ -62,14 +62,6 @@ QStringList RicWellLogsImportFileFeature::wellLogFileNameFilters() return nameFilters; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicWellLogsImportFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h index 6b11d51605..1d772c98d8 100644 --- a/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h +++ b/ApplicationLibCode/Commands/WellLogCommands/RicWellLogsImportFileFeature.h @@ -35,7 +35,6 @@ class RicWellLogsImportFileFeature : public caf::CmdFeature static QStringList wellLogFileNameFilters(); protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.cpp index 53f0030b31..05908fcacd 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.cpp @@ -36,7 +36,7 @@ CAF_CMD_SOURCE_INIT( RicAppendPointsToPolygonFilterFeature, "RicAppendPointsToPo //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicAppendPointsToPolygonFilterFeature::isCommandEnabled() +bool RicAppendPointsToPolygonFilterFeature::isCommandEnabled() const { auto obj = caf::firstAncestorOfTypeFromSelectedObject(); return obj != nullptr; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.h index 6497249e30..35cee0a6c5 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicAppendPointsToPolygonFilterFeature.h @@ -28,7 +28,7 @@ class RicAppendPointsToPolygonFilterFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp index 337b9694c9..f8fb5fb2f8 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.cpp @@ -45,14 +45,6 @@ CAF_CMD_SOURCE_INIT( RicCreateMultipleWellPathLaterals, "RicCreateMultipleWellPathLaterals" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicCreateMultipleWellPathLaterals::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.h b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.h index 5f491e3cf9..3896f6fbf1 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicCreateMultipleWellPathLaterals.h @@ -37,7 +37,6 @@ class RicCreateMultipleWellPathLaterals : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.cpp index e40e39c91f..274d3b0cb0 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicDeletePolylineTargetFeature, "RicDeletePolylineTargetFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeletePolylineTargetFeature::isCommandEnabled() +bool RicDeletePolylineTargetFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects, caf::SelectionManager::FIRST_LEVEL ); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.h index fe5af178a3..70d29c07d0 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeletePolylineTargetFeature.h @@ -28,7 +28,7 @@ class RicDeletePolylineTargetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.cpp index b86caa11fe..c4d9bdac07 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellPathAttributeFeature, "RicDeleteWellPathAttrib //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteWellPathAttributeFeature::isCommandEnabled() +bool RicDeleteWellPathAttributeFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.h index 60cda7b577..ce739a21a7 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathAttributeFeature.h @@ -28,7 +28,7 @@ class RicDeleteWellPathAttributeFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.cpp index dce970d968..185a3ec548 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellPathFeature, "RicDeleteWellPathFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteWellPathFeature::isCommandEnabled() +bool RicDeleteWellPathFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects ); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.h index 77eb96346b..a5f4594171 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathFeature.h @@ -28,7 +28,7 @@ class RicDeleteWellPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.cpp index 02ced49b73..18ffde9415 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.cpp @@ -30,7 +30,7 @@ CAF_CMD_SOURCE_INIT( RicDeleteWellPathTargetFeature, "RicDeleteWellPathTargetFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDeleteWellPathTargetFeature::isCommandEnabled() +bool RicDeleteWellPathTargetFeature::isCommandEnabled() const { std::vector objects; caf::SelectionManager::instance()->objectsByType( &objects, caf::SelectionManager::FIRST_LEVEL ); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.h index 1197da19c9..f1975fbf55 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDeleteWellPathTargetFeature.h @@ -28,7 +28,7 @@ class RicDeleteWellPathTargetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp index ff50328722..e2a9a0ef49 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.cpp @@ -41,7 +41,7 @@ CAF_CMD_SOURCE_INIT( RicDuplicateWellPathFeature, "RicDuplicateWellPathFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicDuplicateWellPathFeature::isCommandEnabled() +bool RicDuplicateWellPathFeature::isCommandEnabled() const { auto wellPath = caf::firstAncestorOfTypeFromSelectedObject(); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.h index d9b3c28898..e07c1ae31f 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicDuplicateWellPathFeature.h @@ -28,7 +28,7 @@ class RicDuplicateWellPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.cpp index 9e70169f72..18cf167a93 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicImportWellMeasurementsFeature, "RicImportWellMeasurement //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicImportWellMeasurementsFeature::isCommandEnabled() +bool RicImportWellMeasurementsFeature::isCommandEnabled() const { return ( RicWellMeasurementImportTools::selectedWellPathCollection() != nullptr ); } diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.h index 54ed5a6b40..19b6a30f64 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellMeasurementsFeature.h @@ -28,7 +28,7 @@ class RicImportWellMeasurementsFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.cpp index 737e11bf87..9bf01820e6 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.cpp @@ -198,14 +198,6 @@ QStringList RicImportWellPaths::wellPathNameFilters() return nameFilters; } -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicImportWellPaths::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.h b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.h index 3ee26d40dd..6747460dec 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicImportWellPaths.h @@ -47,7 +47,6 @@ public: protected: static QStringList wellPathNameFilters(); - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.cpp index 7c3300e67f..db07ff67fd 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicLinkWellPathFeature, "RicLinkWellPathFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicLinkWellPathFeature::isCommandEnabled() +bool RicLinkWellPathFeature::isCommandEnabled() const { return ( !wellPaths().empty() ); } @@ -70,7 +70,7 @@ void RicLinkWellPathFeature::setupActionLook( QAction* actionToSetup ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicLinkWellPathFeature::isCommandChecked() +bool RicLinkWellPathFeature::isCommandChecked() const { if ( !wellPaths().empty() ) { diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.h index 5f5320aebd..472dae445a 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicLinkWellPathFeature.h @@ -30,10 +30,10 @@ class RicLinkWellPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; - bool isCommandChecked() override; + bool isCommandChecked() const override; private: static std::vector wellPaths(); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp index 13d24e9058..c8ee3aa276 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.cpp @@ -37,7 +37,7 @@ CAF_CMD_SOURCE_INIT( RicNewEditableWellPathFeature, "RicNewEditableWellPathFeatu //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewEditableWellPathFeature::isCommandEnabled() +bool RicNewEditableWellPathFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h index 06470accf1..666fb25fc6 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewEditableWellPathFeature.h @@ -28,7 +28,7 @@ class RicNewEditableWellPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.cpp index 987c371ccd..013eadff30 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicNewPolylineTargetFeature, "RicNewPolylineTargetFeature" //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewPolylineTargetFeature::isCommandEnabled() +bool RicNewPolylineTargetFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.h index 4466fbc078..e2fa09d6ad 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewPolylineTargetFeature.h @@ -28,7 +28,7 @@ class RicNewPolylineTargetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp index 5141cf2550..f92693689a 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathAttributeFeature, "RicNewWellPathAttributeFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellPathAttributeFeature::isCommandEnabled() +bool RicNewWellPathAttributeFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.h index 72a27e7ab7..098dfad942 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathAttributeFeature.h @@ -28,7 +28,7 @@ class RicNewWellPathAttributeFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.cpp index cee60c328a..3d1f092ed1 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.cpp @@ -46,7 +46,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathLateralAtDepthFeature, "RicNewWellPathLateral //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellPathLateralAtDepthFeature::isCommandEnabled() +bool RicNewWellPathLateralAtDepthFeature::isCommandEnabled() const { return RiuWellPathSelectionItem::wellPathSelectionItem() != nullptr; } diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.h index 372ab372f1..ccd539ffe3 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralAtDepthFeature.h @@ -31,7 +31,7 @@ class RicNewWellPathLateralAtDepthFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; public: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.cpp index 1aab548876..5b59bab64d 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.cpp @@ -32,7 +32,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathLateralFeature, "RicNewWellPathLateralFeature //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellPathLateralFeature::isCommandEnabled() +bool RicNewWellPathLateralFeature::isCommandEnabled() const { RimWellPath* wellPath = caf::SelectionManager::instance()->selectedItemOfType(); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.h index 0789991c6f..df6083ffea 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathLateralFeature.h @@ -28,7 +28,7 @@ class RicNewWellPathLateralFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.cpp index d1a3b990ff..d77cd86a2a 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.cpp @@ -31,7 +31,7 @@ CAF_CMD_SOURCE_INIT( RicNewWellPathListTargetFeature, "RicNewWellPathListTargetF //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicNewWellPathListTargetFeature::isCommandEnabled() +bool RicNewWellPathListTargetFeature::isCommandEnabled() const { { std::vector objects; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.h index b3eb4e97b0..94822c8e78 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicNewWellPathListTargetFeature.h @@ -28,7 +28,7 @@ class RicNewWellPathListTargetFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.cpp index cb2efbfba9..d3c3c8832e 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.cpp @@ -40,7 +40,7 @@ CAF_CMD_SOURCE_INIT( RicPasteModeledWellPathFeature, "RicPasteModeledWellPathFea //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicPasteModeledWellPathFeature::isCommandEnabled() +bool RicPasteModeledWellPathFeature::isCommandEnabled() const { if ( !modeledWellPathsFromClipboard().empty() ) return true; { diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.h index af2929597f..0764a70388 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicPasteModeledWellPathFeature.h @@ -29,7 +29,7 @@ class RicPasteModeledWellPathFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.cpp index d31d5cc133..e44c03cf58 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.cpp @@ -33,7 +33,7 @@ CAF_CMD_SOURCE_INIT( RicShowWellPlanFeature, "RicShowWellPlanFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool RicShowWellPlanFeature::isCommandEnabled() +bool RicShowWellPlanFeature::isCommandEnabled() const { auto selectedWellPaths = caf::selectedObjectsByType(); return !selectedWellPaths.empty(); diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.h index 9fb5c62fdb..c7050b47ca 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicShowWellPlanFeature.h @@ -28,7 +28,7 @@ class RicShowWellPlanFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.cpp b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.cpp index 20358c49bb..3c5b5ad614 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.cpp +++ b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.cpp @@ -34,14 +34,6 @@ CAF_CMD_SOURCE_INIT( RicWellPathFormationsImportFileFeature, "RicWellPathFormationsImportFileFeature" ); -//-------------------------------------------------------------------------------------------------- -/// -//-------------------------------------------------------------------------------------------------- -bool RicWellPathFormationsImportFileFeature::isCommandEnabled() -{ - return true; -} - //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- diff --git a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.h b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.h index 198c66880c..ae519a1683 100644 --- a/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.h +++ b/ApplicationLibCode/Commands/WellPathCommands/RicWellPathFormationsImportFileFeature.h @@ -28,7 +28,6 @@ class RicWellPathFormationsImportFileFeature : public caf::CmdFeature CAF_CMD_HEADER_INIT; protected: - bool isCommandEnabled() override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp index dbc48f94c2..0c23f0f54e 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.cpp @@ -151,7 +151,7 @@ void CmdFeature::refreshCheckedState() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool CmdFeature::canFeatureBeExecuted() +bool CmdFeature::canFeatureBeExecuted() const { return this->isCommandEnabled(); } @@ -186,7 +186,15 @@ void CmdFeature::actionTriggered( bool isChecked ) //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool CmdFeature::isCommandChecked() +bool CmdFeature::isCommandEnabled() const +{ + return true; +} + +//-------------------------------------------------------------------------------------------------- +/// +//-------------------------------------------------------------------------------------------------- +bool CmdFeature::isCommandChecked() const { return false; } diff --git a/Fwk/AppFwk/cafCommand/cafCmdFeature.h b/Fwk/AppFwk/cafCommand/cafCmdFeature.h index 79f43e1206..b7e82645f4 100644 --- a/Fwk/AppFwk/cafCommand/cafCmdFeature.h +++ b/Fwk/AppFwk/cafCommand/cafCmdFeature.h @@ -84,7 +84,7 @@ public: void refreshEnabledState(); void refreshCheckedState(); - bool canFeatureBeExecuted(); + bool canFeatureBeExecuted() const; static void applyShortcutWithHintToAction( QAction* action, const QKeySequence& keySequence ); @@ -94,8 +94,8 @@ public slots: protected: virtual void onActionTriggered( bool isChecked ) = 0; virtual void setupActionLook( QAction* actionToSetup ) = 0; - virtual bool isCommandEnabled() = 0; - virtual bool isCommandChecked(); + virtual bool isCommandEnabled() const; + virtual bool isCommandChecked() const; void disableModelChangeContribution(); const QVariant userData() const; diff --git a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.cpp index 629c0bab3b..6383714813 100644 --- a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.cpp @@ -77,7 +77,7 @@ CmdExecuteCommand* CmdAddItemFeature::createExecuteCommand() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool CmdAddItemFeature::isCommandEnabled() +bool CmdAddItemFeature::isCommandEnabled() const { caf::PdmChildArrayFieldHandle* childArrayFieldHandle = SelectionManager::instance()->activeChildArrayFieldHandle(); diff --git a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.h b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.h index e0052b572c..6e4ae279b4 100644 --- a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdAddItemFeature.h @@ -52,7 +52,7 @@ class CmdAddItemFeature : public CmdFeature protected: CmdExecuteCommand* createExecuteCommand(); - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.cpp index 26f11cbcac..e26b765b5f 100644 --- a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.cpp @@ -103,7 +103,7 @@ CmdExecuteCommand* CmdDeleteItemFeature::createExecuteCommand() //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool CmdDeleteItemFeature::isCommandEnabled() +bool CmdDeleteItemFeature::isCommandEnabled() const { caf::PdmObject* currentPdmObject = dynamic_cast( caf::SelectionManager::instance()->selectedItem( caf::SelectionManager::FIRST_LEVEL ) ); diff --git a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.h b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.h index a607b4a7cb..c0626d5def 100644 --- a/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/AddAndDelete/cafCmdDeleteItemFeature.h @@ -51,7 +51,7 @@ protected: CmdExecuteCommand* createExecuteCommand(); // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.cpp index 870fae4572..d2ffcb5d32 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.cpp @@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT( ToggleItemsFeature, "cafToggleItemsFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool ToggleItemsFeature::isCommandEnabled() +bool ToggleItemsFeature::isCommandEnabled() const { return ToggleItemsFeatureImpl::isToggleCommandsAvailable(); } @@ -75,4 +75,4 @@ void ToggleItemsFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/cafCommandFeatures/ToggleOnOffL16x16.png" ) ); } -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.h b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.h index 23e2aaa9c2..2bddd2b1ce 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsFeature.h @@ -49,9 +49,9 @@ class ToggleItemsFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.cpp index 60b535d749..9fb2db20bd 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.cpp @@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT( ToggleItemsOffFeature, "cafToggleItemsOffFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool ToggleItemsOffFeature::isCommandEnabled() +bool ToggleItemsOffFeature::isCommandEnabled() const { return ToggleItemsFeatureImpl::isToggleCommandsAvailable(); } @@ -75,4 +75,4 @@ void ToggleItemsOffFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/cafCommandFeatures/ToggleOffL16x16.png" ) ); } -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.h b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.h index 6fbdbaac12..e776d6915e 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOffFeature.h @@ -49,9 +49,9 @@ class ToggleItemsOffFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.cpp index 6644bd6177..4cfd77f472 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.cpp @@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT( ToggleItemsOnFeature, "cafToggleItemsOnFeature" ); //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool ToggleItemsOnFeature::isCommandEnabled() +bool ToggleItemsOnFeature::isCommandEnabled() const { return ToggleItemsFeatureImpl::isToggleCommandsAvailable(); } @@ -75,4 +75,4 @@ void ToggleItemsOnFeature::setupActionLook( QAction* actionToSetup ) actionToSetup->setIcon( QIcon( ":/cafCommandFeatures/ToggleOnL16x16.png" ) ); } -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.h b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.h index 8869a5f3a4..94498948e5 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnFeature.h @@ -49,9 +49,9 @@ class ToggleItemsOnFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; }; -} // namespace caf \ No newline at end of file +} // namespace caf diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.cpp b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.cpp index ba8a13630b..dfe32df81f 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.cpp +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.cpp @@ -52,7 +52,7 @@ CAF_CMD_SOURCE_INIT( ToggleItemsOnOthersOffFeature, "cafToggleItemsOnOthersOffFe //-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- -bool ToggleItemsOnOthersOffFeature::isCommandEnabled() +bool ToggleItemsOnOthersOffFeature::isCommandEnabled() const { std::vector selectedObjects; caf::SelectionManager::instance()->objectsByType( &selectedObjects ); diff --git a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.h b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.h index 6720989796..c988e4ab3f 100644 --- a/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.h +++ b/Fwk/AppFwk/cafCommandFeatures/ToggleCommands/cafToggleItemsOnOthersOffFeature.h @@ -54,14 +54,14 @@ class ToggleItemsOnOthersOffFeature : public caf::CmdFeature protected: // Overrides - bool isCommandEnabled() override; + bool isCommandEnabled() const override; void onActionTriggered( bool isChecked ) override; void setupActionLook( QAction* actionToSetup ) override; private: - caf::PdmFieldHandle* verifySameParentForSelection( const std::vector& selectedObjects ); - std::vector childObjects( caf::PdmFieldHandle* parent ); - caf::PdmField* objectToggleField( caf::PdmObjectHandle* objectHandle ); + static caf::PdmFieldHandle* verifySameParentForSelection( const std::vector& selectedObjects ); + static std::vector childObjects( caf::PdmFieldHandle* parent ); + static caf::PdmField* objectToggleField( caf::PdmObjectHandle* objectHandle ); }; -} // namespace caf \ No newline at end of file +} // namespace caf