Add [BETA] as postfix to user interface

Add postfix to SUMO and OSDU cloud import features.
This commit is contained in:
Magne Sjaastad
2024-08-26 13:51:26 +02:00
parent a89fe80de3
commit 0fd27a3a8d
6 changed files with 23 additions and 5 deletions

View File

@@ -374,3 +374,11 @@ std::vector<double> RiaDefines::viewScaleOptions()
{
return { 0.005, 0.01, 0.05, 0.1, 0.2, 0.5, 1.0, 2.0, 3.0, 4.0, 5.0, 10.0, 15.0, 20.0, 50.0 };
}
//--------------------------------------------------------------------------------------------------
///
//--------------------------------------------------------------------------------------------------
QString RiaDefines::betaFeaturePostfix()
{
return " [BETA]";
}

View File

@@ -252,6 +252,8 @@ enum class ItemIn3dView
ALL = 0b00000011
};
QString betaFeaturePostfix();
}; // namespace RiaDefines
// Activate bit mask operators at global scope

View File

@@ -21,6 +21,7 @@
#include "Cloud/RiaOsduConnector.h"
#include "RiaApplication.h"
#include "RiaColorTables.h"
#include "RiaDefines.h"
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
@@ -82,7 +83,7 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
caf::ProgressInfo progress( importedWells.size(), "Importing wells from OSDU", false, true );
int colorIndex = 0;
std::vector<RimOsduWellPath*> newWells;
for ( auto w : importedWells )
for ( const auto& w : importedWells )
{
auto wellPath = new RimOsduWellPath;
wellPath->setName( w.name );
@@ -118,6 +119,6 @@ void RicWellPathsImportOsduFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicWellPathsImportOsduFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Import Well Paths from &OSDU" );
actionToSetup->setText( "Import Well Paths from &OSDU" + RiaDefines::betaFeaturePostfix() );
actionToSetup->setIcon( QIcon( ":/WellCollection.png" ) );
}

View File

@@ -19,6 +19,7 @@
#include "RicImportWellLogOsduFeature.h"
#include "Cloud/RiaOsduConnector.h"
#include "RiaDefines.h"
#include "RiaGuiApplication.h"
#include "RiaLogging.h"
#include "RiaPreferences.h"
@@ -118,5 +119,5 @@ void RicImportWellLogOsduFeature::onActionTriggered( bool isChecked )
void RicImportWellLogOsduFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setIcon( QIcon( ":/LasFile16x16.png" ) );
actionToSetup->setText( "Import Well Log From OSDU" );
actionToSetup->setText( "Import Well Log From OSDU" + RiaDefines::betaFeaturePostfix() );
}

View File

@@ -18,6 +18,7 @@
#include "RicCreateSumoEnsembleFeature.h"
#include "RiaDefines.h"
#include "RiaSummaryTools.h"
#include "PlotBuilderCommands/RicSummaryPlotBuilder.h"
@@ -57,6 +58,6 @@ void RicCreateSumoEnsembleFeature::onActionTriggered( bool isChecked )
//--------------------------------------------------------------------------------------------------
void RicCreateSumoEnsembleFeature::setupActionLook( QAction* actionToSetup )
{
actionToSetup->setText( "Create Sumo Ensemble" );
actionToSetup->setText( "Create Sumo Ensemble" + RiaDefines::betaFeaturePostfix() );
actionToSetup->setIcon( QIcon( ":/SummaryEnsemble.svg" ) );
}

View File

@@ -1475,7 +1475,12 @@ int RimContextCommandBuilder::appendImportMenu( caf::CmdFeatureMenuBuilder& menu
candidates << "RicImportWellLogCsvFileFeature";
candidates << "RicReloadWellPathFormationNamesFeature";
if ( addOsduImportMenuItem ) candidates << "RicImportWellLogOsduFeature";
// Import of well logs from OSDU is disabled by default. The quality of well log data from OSDU is not sufficient for effective
// use. The environment variable RESINSIGHT_DEVEL must be set to enable this feature.
if ( addOsduImportMenuItem && RiaApplication::enableDevelopmentFeatures() )
{
candidates << "RicImportWellLogOsduFeature";
}
return appendSubMenuWithCommands( menuBuilder, candidates, "Import", QIcon(), addSeparatorBeforeMenu );
}